|
1
|
function scr_healitemscr_healitem
function scr_healitem(arg0, arg1)
{
scr_heal(arg0, arg1);
healx = scr_charbox_x(arg0);
healtext = instance_create(healx + 70 + xx, yy + 430, obj_healwriter);
healtext.healamt = arg1;
} (arg0, arg1)
|
|
2
|
{
|
|
3
|
scr_healscr_heal
function 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;
} (arg0, arg1);
|
|
4
|
healx = scr_charbox_xscr_charbox_x
function scr_charbox_x(arg0)
{
if (arg0 == 0 && chartotal == 3)
return 0;
if (arg0 == 1 && chartotal == 3)
return 212;
if (arg0 == 2 && chartotal == 3)
return 424;
if (arg0 == 0 && chartotal == 2)
return 106;
if (arg0 == 1 && chartotal == 2)
return 326;
if (arg0 == 0 && chartotal == 1)
return 212;
} (arg0);
|
|
5
|
healtext = instance_create(healx + 70 + xx, yy + 430, obj_healwriter);
|
|
6
|
healtext.healamt = arg1;
|
|
7
|
}
|