1 |
if (live_call()) |
2 |
return global.live_result; |
3 |
if (global.current_hp_enemy <= 0) |
4 |
{ |
5 |
if (!death_sprite) |
6 |
death_sprite = true; |
7 |
} |
8 |
if (death_sprite == true && death_noloop == false) |
9 |
{ |
10 |
death_noloop = true; |
11 |
sprite_index = spr_axis_body_nocharge; |
12 |
image_index = 0; |
13 |
alarm[0] = 45; |
14 |
image_alpha = 1; |
15 |
} |
16 |
if (sprite_index == spr_axis_body_nocharge) |
17 |
{ |
18 |
if (instance_exists(obj_target_bar_battle)) |
19 |
global.enemy_sparing = true; |
20 |
else |
21 |
global.enemy_sparing = false; |
22 |
} |
23 |
if (global.enemy_dead == false && global.enemy_spared == false) |
24 |
image_alpha = global.image_alpha_enemy_attacking; |
25 |
if (damage_disjoint_count > 0) |
26 |
damage_disjoint_count -= 1; |
27 |
if (((instance_exists(obj_text_damage_count) && global.fight_number == 1 && global.attacking_damage_stat > 0) || axis_damaged_act == true) && no_loop_damage_disjoint_count == false) |
28 |
{ |
29 |
if (!death_sprite) |
30 |
sprite_index = spr_axis_body_hurt; |
31 |
damage_disjoint_count = 12; |
32 |
no_loop_damage_disjoint_count = true; |
33 |
if (instance_exists(obj_text_damage_count) && obj_battlebox_controller_axis.axis_trash_meter >= 100) |
34 |
{ |
35 |
obj_axis_body.axis_damaged_act = true; |
36 |
obj_battlebox_controller_axis.axis_trash_meter = 0; |
37 |
obj_battlebox_controller_axis.axis_hit_count_current -= 1; |
38 |
global.special_action_count += 1; |
39 |
global.enemy_mode += 1; |
40 |
global.attack_repeat = 0; |
41 |
} |
42 |
} |
43 |
else if (!instance_exists(obj_text_damage_count) && axis_damaged_act == false) |
44 |
{ |
45 |
no_loop_damage_disjoint_count = false; |
46 |
} |
47 |
if (damage_disjoint_count == 12) |
48 |
{ |
49 |
damage_disjoint_x = -50; |
50 |
} |
51 |
else if (damage_disjoint_count == 10) |
52 |
{ |
53 |
damage_disjoint_x = 50; |
54 |
} |
55 |
else if (damage_disjoint_count == 8) |
56 |
{ |
57 |
damage_disjoint_x = -20; |
58 |
} |
59 |
else if (damage_disjoint_count == 6) |
60 |
{ |
61 |
damage_disjoint_x = 20; |
62 |
} |
63 |
else if (damage_disjoint_count == 4) |
64 |
{ |
65 |
damage_disjoint_x = -10; |
66 |
} |
67 |
else if (damage_disjoint_count == 2) |
68 |
{ |
69 |
damage_disjoint_x = 10; |
70 |
} |
71 |
else if (damage_disjoint_count == 0) |
72 |
{ |
73 |
damage_disjoint_x = 0; |
74 |
if (axis_damaged_act == true) |
75 |
axis_damaged_act = false; |
76 |
if (sprite_index == spr_axis_body_hurt) |
77 |
sprite_index = base_sprite; |
78 |
} |
79 |
if (death_sprite == true) |
80 |
x = starting_point_x + damage_disjoint_x; |
81 |
else if (!instance_exists(obj_battle_enemy_attack_super_ball_1_creator)) |
82 |
x = lerp(x, starting_point_x, 0.15) + damage_disjoint_x; |