2022-08-15 02:35:57 +00:00
|
|
|
//global.units = 5;
|
2022-08-15 17:51:51 +00:00
|
|
|
global.units = [[],[]];
|
2022-08-15 02:35:57 +00:00
|
|
|
|
|
|
|
enum ARMY {
|
|
|
|
US,
|
|
|
|
THEM,
|
|
|
|
}
|
|
|
|
//exit;
|
|
|
|
global.unitdata = {};
|
|
|
|
var mydata = {
|
|
|
|
name: "chara",
|
|
|
|
desc: "the first fallen human",
|
|
|
|
skills: ["SKILLS.LUNA"],
|
|
|
|
sprite: s_guy,
|
|
|
|
}
|
|
|
|
|
|
|
|
function unit(personaldata_, classdata_, stats_) constructor {
|
|
|
|
name = personaldata_.name;
|
|
|
|
sprite = personaldata_.sprite;
|
2022-08-15 17:51:51 +00:00
|
|
|
alignment = noone;
|
|
|
|
var i;
|
|
|
|
for (i=0; i<array_length(stats_); i++) {
|
|
|
|
self[$stats_[i].name] = stats_[i];
|
|
|
|
}
|
2022-08-15 02:35:57 +00:00
|
|
|
global.unitdata[$name] = self;
|
|
|
|
}
|
|
|
|
|
2022-08-16 01:01:09 +00:00
|
|
|
nu unit(mydata, mydata, [st.hp.add(92), st.str.add(20), st.def.add(20), st.spd.add(5)]);
|
2022-08-15 17:51:51 +00:00
|
|
|
|
|
|
|
mydata = {
|
|
|
|
name: "kris",
|
|
|
|
desc: "totally kris",
|
|
|
|
skills: ["SKILLS.LUNA"],
|
|
|
|
sprite: s_guy2,
|
|
|
|
}
|
2022-08-16 01:01:09 +00:00
|
|
|
nu unit(mydata, mydata, [st.hp.add(92), st.str.add(20), st.def.add(20), st.spd.add(5)]);
|
2022-08-15 02:35:57 +00:00
|
|
|
|
|
|
|
function archetypedata() constructor {
|
|
|
|
//PERSONALDATA AND CLASSDATA ARE THE SAME THINGS
|
|
|
|
}
|
|
|
|
|
|
|
|
function c_addunit(unit, alignment) {
|
|
|
|
//log(5);
|
|
|
|
//log(global.units);
|
|
|
|
array_push(global.units[alignment], unit);
|
2022-08-15 17:51:51 +00:00
|
|
|
unit.alignment = alignment;
|
2022-08-15 02:35:57 +00:00
|
|
|
log(global.units[alignment]);
|
|
|
|
}
|
|
|
|
|
|
|
|
c_addunit(un.chara, ARMY.US);
|
|
|
|
#macro un global.unitdata
|