|
1
|
if (global.inv < 0)
|
|
2
|
{
|
|
3
|
remdamage = damage;
|
|
4
|
_temptarget = target;
|
|
5
|
for (ti = 0; ti < 3; ti += 1)
|
|
6
|
{
|
|
7
|
global.inv = -1;
|
|
8
|
if (global.hp[global.char[ti]] > (global.maxhp[global.char[ti]] * 0.5))
|
|
9
|
damage = floor(global.hp[global.char[ti]] / 5);
|
|
10
|
else if (global.hp[global.char[ti]] >= (global.maxhp[global.char[ti]] * 0.15))
|
|
11
|
damage = floor(global.hp[global.char[ti]] / 10);
|
|
12
|
else if (global.hp[global.char[ti]] < (global.maxhp[global.char[ti]] * 0.15))
|
|
13
|
damage = floor(global.hp[global.char[ti]] / 20);
|
|
14
|
target = ti;
|
|
15
|
if (global.hp[global.char[ti]] > 0 && global.char[ti] != 0)
|
|
16
|
scr_damage_sneo_final_attackscr_damage_sneo_final_attack
function scr_damage_sneo_final_attack()
{
if (global.inv < 0)
{
scr_damage_cache();
var __element = 0;
if (variable_instance_exists(id, "element"))
{
if (is_real(element))
__element = element;
}
if (target < 3)
{
if (global.hp[global.char[target]] <= 0)
{
scr_randomtarget_old();
target = mytarget;
with (global.charinstance[target])
{
image_blend = c_white;
darkify = 0;
}
}
}
var __remtarget = -1;
if (target == 4)
{
__remtarget = 4;
scr_randomtarget_old();
target = mytarget;
if ((global.hp[global.char[target]] / global.maxhp[global.char[target]]) < (scr_party_hpaverage() / 2))
{
scr_randomtarget_old();
target = mytarget;
}
if ((global.hp[global.char[target]] / global.maxhp[global.char[target]]) < (scr_party_hpaverage() / 2))
{
scr_randomtarget_old();
target = mytarget;
}
if (target == 0 && (global.hp[global.char[target]] / global.maxhp[global.char[target]]) < 0.35)
{
scr_randomtarget_old();
target = mytarget;
}
with (global.charinstance[target])
{
image_blend = c_white;
darkify = 0;
}
}
chartarget = 3;
tdamage = damage;
var oldcalculation = 0;
if (target < 3)
{
chartarget = global.char[target];
if (global.charaction[target] == 10)
tdamage = ceil((2 * tdamage) / 2);
tdamage = ceil(tdamage * scr_element_damage_reduction(__element, global.char[target]));
if (tdamage < 1)
tdamage = 1;
}
if (!instance_exists(obj_shake))
instance_create(0, 0, obj_shake);
with (global.charinstance[target])
{
hurt = 1;
hurttimer = 0;
}
hpdiff = tdamage;
with (obj_dmgwriter)
{
if (delaytimer >= 1)
killactive = 1;
}
doomtype = -1;
with (obj_heart)
dmgnoise = 1;
if (target < 3)
{
if (global.hp[chartarget] <= 0)
{
doomtype = 4;
global.hp[chartarget] -= round(tdamage / 4);
hpdiff = round(tdamage / 4);
}
else
{
global.hp[chartarget] -= tdamage;
if (global.hp[chartarget] <= 0)
{
hpdiff = abs(global.hp[chartarget] - (global.maxhp[chartarget] / 2));
doomtype = 4;
global.hp[chartarget] = round(-global.maxhp[chartarget] / 2);
scr_dead(target);
}
}
dmgwriter = instance_create(global.charinstance[target].x, (global.charinstance[target].y + global.charinstance[target].myheight) - 24, obj_dmgwriter);
dmgwriter.damage = hpdiff;
dmgwriter.type = doomtype;
... ();
|
|
17
|
}
|
|
18
|
global.inv = global.invc * 40;
|
|
19
|
target = _temptarget;
|
|
20
|
}
|