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