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 |
instance_destroy() |
8 |
return; |
9 |
} |
10 |
else if (enemy_spared_2 == true) |
11 |
{ |
12 |
instance_destroy() |
13 |
return; |
14 |
} |
15 |
if (damage_disjoint_count > 0) |
16 |
damage_disjoint_count -= 1 |
17 |
else if (enemy_dead_2 == false && enemy_spared_2 == false) |
18 |
{ |
19 |
if (global.enemy_low_hp_2 == true && global.current_hp_enemy_2 < global.max_hp_enemy_2) |
20 |
sprite_index = spr_penilla_hands_critical |
21 |
else |
22 |
sprite_index = spr_penilla_hands |
23 |
} |
24 |
if (instance_exists(obj_text_damage_count) && global.fight_number == 2 && no_loop_damage_disjoint_count == false) |
25 |
{ |
26 |
time_elapsed = 10 |
27 |
sign_modifier = -1 |
28 |
damage_disjoint_count = 12 |
29 |
no_loop_damage_disjoint_count = true |
30 |
} |
31 |
else if (!instance_exists(obj_text_damage_count)) |
32 |
no_loop_damage_disjoint_count = false |
33 |
if (damage_disjoint_count == 12) |
34 |
damage_disjoint_x = -50 |
35 |
else if (damage_disjoint_count == 10) |
36 |
damage_disjoint_x = 50 |
37 |
else if (damage_disjoint_count == 8) |
38 |
damage_disjoint_x = -20 |
39 |
else if (damage_disjoint_count == 6) |
40 |
damage_disjoint_x = 20 |
41 |
else if (damage_disjoint_count == 4) |
42 |
damage_disjoint_x = -10 |
43 |
else if (damage_disjoint_count == 2) |
44 |
damage_disjoint_x = 10 |
45 |
else if (damage_disjoint_count == 0) |
46 |
damage_disjoint_x = 0 |
47 |
if (damage_disjoint_count > 0 || global.current_hp_enemy_2 <= 0) |
48 |
image_alpha = 0 |
49 |
x = draw_position_x + damage_disjoint_x |
50 |
y = draw_position_y + damage_disjoint_y |
51 |
if ((!((instance_exists(obj_text_damage_count) && global.fight_number == 2))) && enemy_dead_2 == false && enemy_spared_2 == false) |
52 |
{ |
53 |
game_maker_cannot_do_math = power((time_elapsed / (time_max / 2 * (1 / sqrt(max_rise))) - sqrt(max_rise)), 2) |
54 |
animation_disjoint_y = sign_modifier * (max_rise - round(game_maker_cannot_do_math)) |
55 |
time_elapsed += time_increase |
56 |
if (time_elapsed >= time_max) |
57 |
time_elapsed = 0 |
58 |
y = draw_position_y + animation_disjoint_y |
59 |
} |