eastern-flames/eastern flames/scripts/unit/unit.gml

51 lines
1.1 KiB
Plaintext

//global.units = 5;
global.units = [[],[]];
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;
alignment = noone;
var i;
for (i=0; i<array_length(stats_); i++) {
self[$stats_[i].name] = stats_[i];
}
global.unitdata[$name] = self;
}
nu unit(mydata, mydata, [st.hp.add(92), st.str.add(20), st.def.add(20), st.spd.add(5)]);
mydata = {
name: "kris",
desc: "totally kris",
skills: ["SKILLS.LUNA"],
sprite: s_guy2,
}
nu unit(mydata, mydata, [st.hp.add(92), st.str.add(20), st.def.add(20), st.spd.add(5)]);
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);
unit.alignment = alignment;
log(global.units[alignment]);
}
c_addunit(un.chara, ARMY.US);
#macro un global.unitdata