1 |
var enemy_dead_3 = global.enemy_dead_3 |
2 |
var enemy_spared_3 = global.enemy_spared_3 |
3 |
if (enemy_dead_3 == false && enemy_spared_3 == false) |
4 |
image_alpha = global.image_alpha_enemy_attacking |
5 |
if (enemy_dead_3 == true) |
6 |
{ |
7 |
x = starting_point_x |
8 |
y = starting_point_y |
9 |
instance_create(starting_point_x, starting_point_y, obj_flier_dead) |
10 |
instance_destroy() |
11 |
return; |
12 |
} |
13 |
else if (enemy_spared_3 == true) |
14 |
{ |
15 |
sprite_index = spr_flier_spared |
16 |
x = starting_point_x |
17 |
y = starting_point_y |
18 |
image_alpha = 0.5 |
19 |
if (no_loop_create_clouds == false) |
20 |
{ |
21 |
for (i = 0; i <= 11; i += 1) |
22 |
instance_create(x, y, obj_spare_cloud) |
23 |
} |
24 |
no_loop_create_clouds = true |
25 |
} |
26 |
if (damage_disjoint_count > 0) |
27 |
damage_disjoint_count -= 1 |
28 |
else if (enemy_dead_3 == false && enemy_spared_3 == false) |
29 |
{ |
30 |
if (global.enemy_low_hp_3 == true && global.current_hp_enemy_3 < global.max_hp_enemy_3) |
31 |
sprite_index = spr_flier_critical |
32 |
else |
33 |
sprite_index = spr_flier |
34 |
image_speed = 0.5 |
35 |
} |
36 |
if (instance_exists(obj_text_damage_count) && global.fight_number == 3 && no_loop_damage_disjoint_count == false) |
37 |
{ |
38 |
time_elapsed = 0 |
39 |
sign_modifier = -1 |
40 |
damage_disjoint_count = 12 |
41 |
no_loop_damage_disjoint_count = true |
42 |
audio_play_sound(enemy_hurt_noise, 1, 0, 1, -0.5, enemy_hurt_pitch) |
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_3 <= 0) |
61 |
sprite_index = spr_flier_dead |
62 |
x = draw_position_x + damage_disjoint_x |
63 |
y = draw_position_y + damage_disjoint_y |
64 |
if ((!((instance_exists(obj_text_damage_count) && global.fight_number == 3))) && enemy_dead_3 == false && enemy_spared_3 == false) |
65 |
{ |
66 |
game_maker_cannot_do_math = power((time_elapsed / (time_max / 2 * (1 / sqrt(max_rise))) - sqrt(max_rise)), 2) |
67 |
animation_disjoint_y = sign_modifier * (max_rise - round(game_maker_cannot_do_math)) |
68 |
time_elapsed += time_increase |
69 |
if (time_elapsed >= time_max) |
70 |
{ |
71 |
time_elapsed = 0 |
72 |
sign_modifier = (-sign_modifier) |
73 |
} |
74 |
y = draw_position_y + animation_disjoint_y |
75 |
} |