1 |
var enemy_dead_2 = global.enemy_dead_2 |
2 |
var enemy_spared_2 = global.enemy_spared_2 |
3 |
if (enemy_dead_2 == false && enemy_spared_2 == false) |
4 |
image_alpha = global.image_alpha_enemy_attacking |
5 |
if (enemy_dead_2 == true) |
6 |
{ |
7 |
x = starting_point_x |
8 |
y = starting_point_y |
9 |
instance_create(starting_point_x, starting_point_y, obj_know_cone_dead) |
10 |
instance_destroy() |
11 |
return; |
12 |
} |
13 |
else if (enemy_spared_2 == true) |
14 |
{ |
15 |
sprite_index = spr_know_cone_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_2 == false && enemy_spared_2 == false) |
29 |
{ |
30 |
if (global.enemy_low_hp_2 == true && global.current_hp_enemy_2 < global.max_hp_enemy_2) |
31 |
sprite_index = spr_know_cone_body_critical |
32 |
else |
33 |
sprite_index = spr_know_cone_body |
34 |
} |
35 |
if (instance_exists(obj_text_damage_count) && global.fight_number == 2 && no_loop_damage_disjoint_count == false) |
36 |
{ |
37 |
time_elapsed = 0 |
38 |
sign_modifier = -1 |
39 |
damage_disjoint_count = 12 |
40 |
no_loop_damage_disjoint_count = true |
41 |
audio_play_sound(enemy_hurt_noise, 1, 0, 1, 0, enemy_hurt_pitch) |
42 |
} |
43 |
else if (!instance_exists(obj_text_damage_count)) |
44 |
no_loop_damage_disjoint_count = false |
45 |
if (damage_disjoint_count == 12) |
46 |
damage_disjoint_x = -50 |
47 |
else if (damage_disjoint_count == 10) |
48 |
damage_disjoint_x = 50 |
49 |
else if (damage_disjoint_count == 8) |
50 |
damage_disjoint_x = -20 |
51 |
else if (damage_disjoint_count == 6) |
52 |
damage_disjoint_x = 20 |
53 |
else if (damage_disjoint_count == 4) |
54 |
damage_disjoint_x = -10 |
55 |
else if (damage_disjoint_count == 2) |
56 |
damage_disjoint_x = 10 |
57 |
else if (damage_disjoint_count == 0) |
58 |
damage_disjoint_x = 0 |
59 |
if (damage_disjoint_count > 0 || global.current_hp_enemy_2 <= 0) |
60 |
sprite_index = spr_know_cone_dead |
61 |
x = draw_position_x + damage_disjoint_x |
62 |
y = draw_position_y + damage_disjoint_y |
63 |
if ((!((instance_exists(obj_text_damage_count) && global.fight_number == 2))) && enemy_dead_2 == false && enemy_spared_2 == false) |
64 |
{ |
65 |
game_maker_cannot_do_math = power((time_elapsed / (time_max / 2 * (1 / sqrt(max_rise))) - sqrt(max_rise)), 2) |
66 |
animation_disjoint_y = sign_modifier * (max_rise - round(game_maker_cannot_do_math)) |
67 |
y = draw_position_y + animation_disjoint_y |
68 |
var y_store = y |
69 |
var time_elapsed_ball = time_elapsed - time_elapsed_decrease_ball |
70 |
if (time_elapsed_ball < 0) |
71 |
{ |
72 |
time_elapsed_ball += time_max |
73 |
sign_modifier_ball = (-sign_modifier) |
74 |
} |
75 |
else |
76 |
sign_modifier_ball = sign_modifier |
77 |
game_maker_cannot_do_math = power((time_elapsed_ball / (time_max / 2 * (1 / sqrt(max_rise))) - sqrt(max_rise)), 2) |
78 |
animation_disjoint_y = sign_modifier_ball * (max_rise - game_maker_cannot_do_math) |
79 |
y = draw_position_y + animation_disjoint_y |
80 |
ball_displacement_y = y - ball_displacement_y_value |
81 |
y = y_store |
82 |
time_elapsed += time_increase |
83 |
if (time_elapsed >= time_max) |
84 |
{ |
85 |
time_elapsed = 0 |
86 |
sign_modifier = (-sign_modifier) |
87 |
} |
88 |
animating = true |
89 |
} |
90 |
else |
91 |
animating = false |