eastern-flames/eastern flames/scripts/tiledata/tiledata.gml

110 lines
6.7 KiB
Plaintext
Raw Normal View History

2022-08-22 22:37:11 +00:00
global.gotaya = false;
global.gottkn = false;
2022-08-23 13:06:02 +00:00
global.didmmj = false;
global.didotr = false;
2022-08-23 09:25:43 +00:00
var forest123456 = function() {return new tiledata(u, u, [], [new statmod(st.def, 2, add)])}
2022-08-19 22:06:21 +00:00
var block1234567 = function() {return new tiledata(false, u, [])}
2022-08-22 22:37:11 +00:00
var recruit__aya = function() {return new tiledata(u, u, u, u, function(unitobject) {
if unitobject.alignment == ARMY.US {
switch unitobject.data.name {
case "Momiji":
if !global.gotaya {
2022-08-23 09:25:43 +00:00
textbox_create(txt_momijiyaya);
2022-08-22 22:37:11 +00:00
global.gotaya = true;
2022-08-23 09:25:43 +00:00
c_changealignment(global.units[2][0], ARMY.US);
2022-08-22 22:37:11 +00:00
}
break;
}
2022-08-23 09:25:43 +00:00
}
})}
var recruit__tkn = function() {return new tiledata(u, u, u, [new statmod(st.def, 2, add)], function(unitobject) {
if unitobject.alignment == ARMY.US {
switch unitobject.data.name {
case "Momiji":
if !global.gottkn {
textbox_create(txt_momijiytkn);
global.gottkn = true;
c_changealignment(global.units[2][1], ARMY.US);
}
break;
case "Nitori":
if !global.gottkn {
textbox_create(txt_nitoriytkn);
global.gottkn = true;
c_changealignment(global.units[2][1], ARMY.US);
}
break;
}
2022-08-22 22:37:11 +00:00
}
})}
2022-08-23 13:06:02 +00:00
var talk__reisen = function() {return new tiledata(u, u, u, [new statmod(st.def, 2, add)], function(unitobject) {
if unitobject.alignment == ARMY.US {
switch unitobject.data.name {
case "Momiji":
if !global.didmmj {
textbox_create(txt_momijiyreisen);
global.didmmj = true;
}
break;
default:
if !global.didotr {
textbox_create(txt_reisen);
global.didotr = true;
}
break;
}
}
})}
2022-08-18 20:47:07 +00:00
global.map = c_mapgen([
2022-08-23 13:06:02 +00:00
[block1234567(), block1234567(), block1234567(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), block1234567(), block1234567(), block1234567(), block1234567(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), talk__reisen(), new tiledata()],
[block1234567(), block1234567(), block1234567(), new tiledata(), new tiledata(), recruit__aya(), new tiledata(), new tiledata(), forest123456(), new tiledata(), new tiledata(), block1234567(), block1234567(), block1234567(), new tiledata(), new tiledata(), new tiledata(), talk__reisen(), new tiledata(), talk__reisen()],
[block1234567(), block1234567(), block1234567(), new tiledata(), recruit__aya(), new tiledata(), recruit__aya(), forest123456(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), block1234567(), block1234567(), block1234567(), new tiledata(), new tiledata(), new tiledata(), talk__reisen(), new tiledata()],
2022-08-23 09:25:43 +00:00
[block1234567(), block1234567(), block1234567(), new tiledata(), new tiledata(), recruit__aya(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), block1234567(), block1234567(), block1234567(), new tiledata(), new tiledata(), new tiledata(), new tiledata()],
2022-08-18 20:47:07 +00:00
[block1234567(), block1234567(), block1234567(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), block1234567(), block1234567(), new tiledata(), new tiledata(), new tiledata(), block1234567()],
[block1234567(), block1234567(), block1234567(), forest123456(), new tiledata(), forest123456(), new tiledata(), forest123456(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), block1234567(), new tiledata(), new tiledata(), new tiledata(), block1234567()],
[block1234567(), block1234567(), block1234567(), new tiledata(), forest123456(), new tiledata(), forest123456(), new tiledata(), forest123456(), new tiledata(), forest123456(), new tiledata(), forest123456(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata()],
[block1234567(), block1234567(), block1234567(), forest123456(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata()],
[new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), forest123456(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata()],
[new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), forest123456(), new tiledata(), new tiledata(), forest123456(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata()],
[new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata()],
[new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), forest123456(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata()],
2022-08-23 09:25:43 +00:00
[block1234567(), block1234567(), block1234567(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), recruit__tkn(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), forest123456(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata()],
[block1234567(), block1234567(), block1234567(), new tiledata(), new tiledata(), new tiledata(), recruit__tkn(), new tiledata(), recruit__tkn(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata()],
2022-08-18 20:47:07 +00:00
]); //i simply dont care
2022-08-15 04:36:37 +00:00
function c_informtiles() {
for (i=0; i<array_length(global.map); i++) {
for (j=0; j<array_length(global.map[i]); j++) {
mp[i][j].x = i;
mp[i][j].y = j;
}
}
}
c_informtiles();
2022-08-17 16:49:45 +00:00
global.tilesize = new vec2(20, 20);
2022-08-15 02:35:57 +00:00
2022-08-22 17:10:15 +00:00
function tiledata(passable_=true, contents_=[], overlays_=[], statmods=[], event_=c_null) constructor {
2022-08-16 22:28:01 +00:00
passable = passable_;
contents = contents_;
overlays = overlays_;
modifiers = {};
2022-08-22 17:10:15 +00:00
event = event_;
2022-08-16 22:28:01 +00:00
var i;
for (i=0; i<array_length(statmods); i++) {
modifiers[$statmods[i].name] = statmods[i];
}
2022-08-18 20:47:07 +00:00
}
function c_mapgen(map) {
var map2 = [];
for (i=0; i<array_length(map); i++) {
for (j=0; j<array_length(map[i]); j++) {
map2[j][i] = map[i][j];
}
}
return map2;
2022-08-15 02:35:57 +00:00
}