loot
This commit is contained in:
parent
0ead044da1
commit
51cc3f3ca6
20 changed files with 278 additions and 33 deletions
|
@ -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;
|
|
@ -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);
|
||||
|
|
|
@ -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 = {};
|
|
@ -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);
|
Loading…
Add table
Add a link
Reference in a new issue