1 |
var enemy_dead = global.enemy_dead |
2 |
var enemy_spared = global.enemy_spared |
3 |
var enemy_sparing = global.enemy_sparing |
4 |
if (enemy_dead == false && enemy_spared == false) |
5 |
image_alpha = global.image_alpha_enemy_attacking |
6 |
if (enemy_dead == true) |
7 |
{ |
8 |
instance_destroy() |
9 |
return; |
10 |
} |
11 |
else if (enemy_spared == true) |
12 |
{ |
13 |
instance_destroy() |
14 |
return; |
15 |
} |
16 |
if (damage_disjoint_count > 0) |
17 |
damage_disjoint_count -= 1 |
18 |
else if (enemy_dead == false && enemy_spared == false && damage_disjoint_count <= 0) |
19 |
{ |
20 |
if (global.enemy_low_hp == true && global.current_hp_enemy < global.max_hp_enemy) |
21 |
{ |
22 |
if (sprite_index != spr_bowll_head_critical) |
23 |
{ |
24 |
sprite_index = spr_bowll_head_critical |
25 |
event_user(15) |
26 |
} |
27 |
} |
28 |
else if (enemy_sparing == true) |
29 |
{ |
30 |
if (sprite_index != spr_bowll_head_grateful) |
31 |
{ |
32 |
sprite_index = spr_bowll_head_grateful |
33 |
event_user(15) |
34 |
} |
35 |
} |
36 |
else if (sprite_index != spr_bowll_head_normal) |
37 |
{ |
38 |
sprite_index = spr_bowll_head_normal |
39 |
event_user(15) |
40 |
} |
41 |
} |
42 |
if (instance_exists(obj_text_damage_count) && global.fight_number == 1 && no_loop_damage_disjoint_count == false) |
43 |
{ |
44 |
event_user(15) |
45 |
damage_disjoint_count = 12 |
46 |
no_loop_damage_disjoint_count = true |
47 |
} |
48 |
else if (!instance_exists(obj_text_damage_count)) |
49 |
no_loop_damage_disjoint_count = false |
50 |
if (damage_disjoint_count == 12) |
51 |
damage_disjoint_x = -50 |
52 |
else if (damage_disjoint_count == 10) |
53 |
damage_disjoint_x = 50 |
54 |
else if (damage_disjoint_count == 8) |
55 |
damage_disjoint_x = -20 |
56 |
else if (damage_disjoint_count == 6) |
57 |
damage_disjoint_x = 20 |
58 |
else if (damage_disjoint_count == 4) |
59 |
damage_disjoint_x = -10 |
60 |
else if (damage_disjoint_count == 2) |
61 |
damage_disjoint_x = 10 |
62 |
else if (damage_disjoint_count == 0) |
63 |
damage_disjoint_x = 0 |
64 |
if (damage_disjoint_count > 0 || global.current_hp_enemy <= 0) |
65 |
image_alpha = 0 |