2022-08-15 02:35:57 +00:00
|
|
|
//unitdata = new unit();
|
2022-08-15 04:06:41 +00:00
|
|
|
pos = new vec2(0, 0);
|
|
|
|
state = st_standing;
|
|
|
|
drawstate = c_null;
|
|
|
|
hspd = 0;
|
|
|
|
vspd = 0;
|
2022-08-15 04:36:37 +00:00
|
|
|
returnpos = new vec2(0, 0);
|
2022-08-16 01:01:09 +00:00
|
|
|
dir = DIR.NONE;
|
|
|
|
attacks = 0;
|
|
|
|
attacked = 0;
|
|
|
|
|
|
|
|
continuecombat = function(me, them) {
|
|
|
|
//if stamina returnable = true stamina-- return true
|
|
|
|
if !(attacks-(me.data.spd.val > them.data.spd.val+5)) { //DONT USE FIVE, OR ANY OF THIS
|
|
|
|
attacks++;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
action = {
|
|
|
|
effect: function(me, them) {
|
|
|
|
them.data.hp.val -= me.data.str.val;
|
|
|
|
return me.data.str.val;
|
|
|
|
}
|
|
|
|
//animation: new actionanim()
|
|
|
|
|
|
|
|
}
|
|
|
|
hooks = {};
|