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 |
damage = global.current_hp_self - 1 |
17 |
else if (global.current_hp_self > 0.01) |
18 |
{ |
19 |
obj_ceroba_phase_2_red_shader.decimal_count = 2 |
20 |
damage = global.current_hp_self * 0.99 |
21 |
} |
22 |
else |
23 |
{ |
24 |
damage = 0 |
25 |
var hp_self_last = global.current_hp_self |
26 |
global.current_hp_self /= 10 |
27 |
if (global.current_hp_self > 0) |
28 |
obj_ceroba_phase_2_red_shader.decimal_count += 1 |
29 |
else |
30 |
global.current_hp_self = hp_self_last |
31 |
} |
32 |
vulnerable = true |
33 |
if (vulnerable == true) |
34 |
event_user(1) |
35 |
collider_id = other |
36 |
global.hit_self = true |
37 |
} |
38 |
} |