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