1 |
if (!instance_exists(obj_decibat_body) && !instance_exists(obj_decibat_body_intro)) |
2 |
{ |
3 |
instance_destroy(); |
4 |
exit; |
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 |
exit; |
24 |
image_alpha = 0.5; |
25 |
} |
26 |
else if (enemy_spared == true) |
27 |
{ |
28 |
instance_destroy(); |
29 |
exit; |
30 |
} |
31 |
if (damage_disjoint_count > 0) |
32 |
{ |
33 |
damage_disjoint_count -= 1; |
34 |
} |
35 |
else if (enemy_dead == false && enemy_spared == false) |
36 |
{ |
37 |
if (global.enemy_low_hp == true && global.current_hp_enemy < global.max_hp_enemy) |
38 |
image_index = 11; |
39 |
sprite_index = spr_decibat_head; |
40 |
} |
41 |
if (instance_exists(obj_text_damage_count) && global.fight_number == 1 && no_loop_damage_disjoint_count == false) |
42 |
{ |
43 |
time_elapsed = 0; |
44 |
damage_disjoint_count = 12; |
45 |
no_loop_damage_disjoint_count = true; |
46 |
} |
47 |
else if (!instance_exists(obj_text_damage_count)) |
48 |
{ |
49 |
no_loop_damage_disjoint_count = false; |
50 |
} |
51 |
if (damage_disjoint_count == 12) |
52 |
damage_disjoint_x = -50; |
53 |
else if (damage_disjoint_count == 10) |
54 |
damage_disjoint_x = 50; |
55 |
else if (damage_disjoint_count == 8) |
56 |
damage_disjoint_x = -20; |
57 |
else if (damage_disjoint_count == 6) |
58 |
damage_disjoint_x = 20; |
59 |
else if (damage_disjoint_count == 4) |
60 |
damage_disjoint_x = -10; |
61 |
else if (damage_disjoint_count == 2) |
62 |
damage_disjoint_x = 10; |
63 |
else if (damage_disjoint_count == 0) |
64 |
damage_disjoint_x = 0; |
65 |
if (damage_disjoint_count > 0 || global.current_hp_enemy <= 0) |
66 |
image_alpha = 0; |
67 |
} |
68 |
x = draw_position_x + damage_disjoint_x; |
69 |
y = draw_position_y + damage_disjoint_y; |