1 |
function scr_healitemspellscr_healitemspellfunction scr_healitemspell(arg0)
{
scr_heal(star, arg0);
global.spelldelay = 15;
with (global.charinstance[star])
{
ha = instance_create(x, y, obj_healanim);
ha.target = id;
if (global.chapter == 2 && instance_exists(o_boxingcontroller))
ha.target = o_boxingcontroller.id;
dmgwr = scr_dmgwriter_selfchar();
with (dmgwr)
{
delay = 8;
type = 3;
damage = arg0;
}
if (global.hp[global.char[myself]] >= global.maxhp[global.char[myself]])
{
with (dmgwr)
specialmessage = 3;
}
tu += 1;
return ha;
}
} (arg0) |
2 |
{ |
3 |
scr_healscr_healfunction scr_heal(arg0, arg1)
{
abovemaxhp = 0;
belowzero = 0;
hltarget = global.char[arg0];
_curhp = global.hp[hltarget];
if (global.hp[hltarget] <= 0)
belowzero = 1;
if (global.hp[hltarget] > global.maxhp[hltarget])
abovemaxhp = 1;
if (abovemaxhp == 0)
{
global.hp[hltarget] += arg1;
if (global.hp[hltarget] > global.maxhp[hltarget])
global.hp[hltarget] = global.maxhp[hltarget];
}
if (belowzero == 1 && global.hp[hltarget] >= 0)
{
if (global.hp[hltarget] < ceil(global.maxhp[hltarget] / 6))
global.hp[hltarget] = ceil(global.maxhp[hltarget] / 6);
scr_revive(arg0);
}
snd_stop(snd_power);
snd_play(snd_power);
return global.hp[hltarget] - _curhp;
} (star, arg0); |
4 |
global.spelldelay = 15; |
5 |
with (global.charinstance[star]) |
6 |
{ |
7 |
ha = instance_create(x, y, obj_healanim); |
8 |
ha.target = id; |
9 |
if (global.chapter == 2 && instance_exists(o_boxingcontroller)) |
10 |
ha.target = o_boxingcontroller.id; |
11 |
dmgwr = scr_dmgwriter_selfchar(); |
12 |
with (dmgwr) |
13 |
{ |
14 |
delay = 8; |
15 |
type = 3; |
16 |
damage = arg0; |
17 |
} |
18 |
if (global.hp[global.char[myself]] >= global.maxhp[global.char[myself]]) |
19 |
{ |
20 |
with (dmgwr) |
21 |
specialmessage = 3; |
22 |
} |
23 |
tu += 1; |
24 |
return ha; |
25 |
} |
26 |
} |