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