This commit is contained in:
the me 2022-08-15 18:01:09 -07:00
parent 0ead044da1
commit 51cc3f3ca6
20 changed files with 278 additions and 33 deletions

View file

@ -3,3 +3,4 @@ var i;
for (i=0; i<array_length(global.units[ARMY.US]); i++) {
c_inheritunit(2+i, 2, un.chara);
}
selectedunit = noone;

View file

@ -1,5 +1,5 @@
c_input();
if select {
if select && selectedunit == noone {
var mousex = floor(mouse_x/global.tilesize.x);
var mousey = floor(mouse_y/global.tilesize.y);
log(mousex, mousey);

View file

@ -5,4 +5,25 @@ drawstate = c_null;
hspd = 0;
vspd = 0;
returnpos = new vec2(0, 0);
dir = DIR.NONE;
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 = {};

View file

@ -1,10 +1,11 @@
draw_self();
drawstate();
log(data);
//log(data);
draw_set_color(c_red);
draw_rectangle(x-ts.x/2, y-ts.y/2-1,
x-ts.x/2+(ts.x*(data.hp.val/data.hp.val)),
x-ts.x/2+(ts.x*(data.hp.val/data.hp.cap)),
y-ts.y/2+1, false
);
draw_text(x, y-ts.y, data.hp.val);
//draw_set_color(c_red);
//draw_circle(x, y, 5, false);