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