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