29 lines
565 B
Plaintext
29 lines
565 B
Plaintext
//unitdata = new unit();
|
|
pos = new vec2(0, 0);
|
|
state = st_standing;
|
|
drawstate = c_null;
|
|
hspd = 0;
|
|
vspd = 0;
|
|
returnpos = new vec2(0, 0);
|
|
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 = {}; |