1 |
var enemy_dead_2 = global.enemy_dead_2 |
2 |
var enemy_spared_2 = global.enemy_spared_2 |
3 |
image_alpha = 1 |
4 |
if (enemy_dead_2 == true) |
5 |
{ |
6 |
instance_destroy() |
7 |
return; |
8 |
} |
9 |
else if (enemy_spared_2 == true) |
10 |
{ |
11 |
instance_destroy() |
12 |
return; |
13 |
} |
14 |
if (damage_disjoint_count > 0) |
15 |
damage_disjoint_count -= 1 |
16 |
else if (enemy_dead_2 == false && enemy_spared_2 == false) |
17 |
{ |
18 |
if (global.enemy_low_hp_2 == true && global.current_hp_enemy_2 < global.max_hp_enemy_2) |
19 |
sprite_index = spr_insomnitot_face_critical |
20 |
else |
21 |
sprite_index = spr_insomnitot_face |
22 |
} |
23 |
if (instance_exists(obj_text_damage_count) && global.fight_number == 2 && no_loop_damage_disjoint_count == false) |
24 |
{ |
25 |
time_elapsed_x = 0 |
26 |
time_elapsed_y = 0 |
27 |
sign_modifier = -1 |
28 |
damage_disjoint_count = 12 |
29 |
no_loop_damage_disjoint_count = true |
30 |
} |
31 |
else if (!instance_exists(obj_text_damage_count)) |
32 |
no_loop_damage_disjoint_count = false |
33 |
if (damage_disjoint_count == 12) |
34 |
damage_disjoint_x = -50 |
35 |
else if (damage_disjoint_count == 10) |
36 |
damage_disjoint_x = 50 |
37 |
else if (damage_disjoint_count == 8) |
38 |
damage_disjoint_x = -20 |
39 |
else if (damage_disjoint_count == 6) |
40 |
damage_disjoint_x = 20 |
41 |
else if (damage_disjoint_count == 4) |
42 |
damage_disjoint_x = -10 |
43 |
else if (damage_disjoint_count == 2) |
44 |
damage_disjoint_x = 10 |
45 |
else if (damage_disjoint_count == 0) |
46 |
damage_disjoint_x = 0 |
47 |
if (damage_disjoint_count > 0 || global.current_hp_enemy_2 <= 0) |
48 |
image_alpha = 0 |
49 |
x = draw_position_x + damage_disjoint_x |
50 |
y = draw_position_y + damage_disjoint_y |