1 |
if (live_call()) |
2 |
return global.live_result; |
3 |
with (obj_heart_battle_fighting_parent) |
4 |
{ |
5 |
if (!variable_instance_exists(id, "collider_id") || collider_id != other) |
6 |
{ |
7 |
var dmg = global.current_hp_self * 0.5; |
8 |
if (global.current_hp_self > 1) |
9 |
dmg = floor(dmg); |
10 |
if ((global.current_hp_self - dmg) > 1) |
11 |
{ |
12 |
damage_number = 1; |
13 |
damage = dmg; |
14 |
} |
15 |
else if (global.current_hp_self != 1 && global.current_hp_self > 1) |
16 |
{ |
17 |
damage = global.current_hp_self - 1; |
18 |
} |
19 |
else if (global.current_hp_self > 0.01) |
20 |
{ |
21 |
obj_ceroba_phase_2_red_shader.decimal_count = 2; |
22 |
damage = global.current_hp_self * 0.99; |
23 |
} |
24 |
else |
25 |
{ |
26 |
damage = 0; |
27 |
var hp_self_last = global.current_hp_self; |
28 |
global.current_hp_self /= 10; |
29 |
if (global.current_hp_self > 0) |
30 |
obj_ceroba_phase_2_red_shader.decimal_count += 1; |
31 |
else |
32 |
global.current_hp_self = hp_self_last; |
33 |
} |
34 |
vulnerable = true; |
35 |
if (vulnerable == true) |
36 |
event_user(1); |
37 |
collider_id = other; |
38 |
global.hit_self = true; |
39 |
} |
40 |
} |