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 |
x = starting_point_x |
8 |
y = starting_point_y |
9 |
instance_create(starting_point_x, starting_point_y, obj_dalv_dead) |
10 |
instance_destroy() |
11 |
return; |
12 |
} |
13 |
else if (enemy_spared == true) |
14 |
{ |
15 |
sprite_index = spr_dalv_spared |
16 |
x = starting_point_x |
17 |
y = starting_point_y |
18 |
image_xscale = starting_point_xscale |
19 |
image_yscale = starting_point_yscale |
20 |
image_alpha = 0.5 |
21 |
if (no_loop_create_clouds == false) |
22 |
{ |
23 |
for (i = 0; i <= 11; i += 1) |
24 |
instance_create(x, (y - 100), obj_spare_cloud) |
25 |
} |
26 |
no_loop_create_clouds = true |
27 |
} |
28 |
obj_feisty_four_ace_head.image_alpha = image_alpha |
29 |
obj_feisty_four_ace_arm.image_alpha = image_alpha |
30 |
if (damage_disjoint_count > 0) |
31 |
damage_disjoint_count -= 1 |
32 |
else if (enemy_dead == false && enemy_spared == false) |
33 |
{ |
34 |
if (global.current_hp_enemy <= 0) |
35 |
sprite_index = spr_feisty_four_ace_body_legs |
36 |
else |
37 |
sprite_index = spr_feisty_four_ace_body_legs |
38 |
} |
39 |
if (instance_exists(obj_text_damage_count) && global.fight_number == 1 && no_loop_damage_disjoint_count == false) |
40 |
{ |
41 |
time_elapsed = 0 |
42 |
sign_modifier = 1 |
43 |
damage_disjoint_count = 12 |
44 |
no_loop_damage_disjoint_count = true |
45 |
} |
46 |
else if (!instance_exists(obj_text_damage_count)) |
47 |
no_loop_damage_disjoint_count = false |
48 |
if (damage_disjoint_count == 12) |
49 |
damage_disjoint_x = -50 |
50 |
else if (damage_disjoint_count == 10) |
51 |
damage_disjoint_x = 50 |
52 |
else if (damage_disjoint_count == 8) |
53 |
damage_disjoint_x = -20 |
54 |
else if (damage_disjoint_count == 6) |
55 |
damage_disjoint_x = 20 |
56 |
else if (damage_disjoint_count == 4) |
57 |
damage_disjoint_x = -10 |
58 |
else if (damage_disjoint_count == 2) |
59 |
damage_disjoint_x = 10 |
60 |
else if (damage_disjoint_count == 0) |
61 |
damage_disjoint_x = 0 |
62 |
if (damage_disjoint_count > 0) |
63 |
{ |
64 |
if (global.current_hp_enemy <= 0) |
65 |
sprite_index = spr_feisty_four_ace_body_legs |
66 |
else |
67 |
sprite_index = hurt_sprite |
68 |
image_xscale = starting_point_xscale |
69 |
image_yscale = starting_point_yscale |
70 |
} |
71 |
else if (sprite_index == hurt_sprite) |
72 |
sprite_index = spr_feisty_four_ace_body_legs |
73 |
if (global.current_hp_enemy <= 0) |
74 |
{ |
75 |
time_elapsed = 0 |
76 |
sign_modifier = 1 |
77 |
} |
78 |
x = draw_position_x + damage_disjoint_x |
79 |
y = draw_position_y + damage_disjoint_y |
80 |
if ((!((instance_exists(obj_text_damage_count) && global.fight_number == 1))) && enemy_dead == false && enemy_spared == false) |
81 |
{ |
82 |
game_maker_cannot_do_math = power((time_elapsed / (time_max / 2 * (1 / sqrt(max_rise))) - sqrt(max_rise)), 2) |
83 |
animation_disjoint_yscale = sign_modifier * (max_rise - game_maker_cannot_do_math) |
84 |
image_yscale = draw_position_yscale + animation_disjoint_yscale |
85 |
image_xscale = draw_position_xscale - animation_disjoint_yscale * (max_rise_ext / max_rise) |
86 |
var image_yscale_store = image_yscale |
87 |
var time_elapsed_head = time_elapsed - time_elapsed_decrease_head |
88 |
if (time_elapsed_head < 0) |
89 |
{ |
90 |
time_elapsed_head += time_max |
91 |
sign_modifier_head = (-sign_modifier) |
92 |
} |
93 |
else |
94 |
sign_modifier_head = sign_modifier |
95 |
game_maker_cannot_do_math = power((time_elapsed_head / (time_max / 2 * (1 / sqrt(max_rise))) - sqrt(max_rise)), 2) |
96 |
animation_disjoint_yscale = sign_modifier_head * (max_rise - game_maker_cannot_do_math) |
97 |
image_yscale = draw_position_yscale + animation_disjoint_yscale |
98 |
head_displacement_y = bbox_top + sprite_height * head_displacement_y_multiplier |
99 |
image_yscale = image_yscale_store |
100 |
var time_elapsed_hand = time_elapsed - time_elapsed_decrease_hand |
101 |
if (time_elapsed_hand < 0) |
102 |
{ |
103 |
time_elapsed_hand += time_max |
104 |
sign_modifier_hand = (-sign_modifier) |
105 |
} |
106 |
else |
107 |
sign_modifier_hand = sign_modifier |
108 |
game_maker_cannot_do_math = power((time_elapsed_hand / (time_max / 2 * (1 / sqrt(max_rise))) - sqrt(max_rise)), 2) |
109 |
animation_disjoint_yscale = sign_modifier_hand * (max_rise - game_maker_cannot_do_math) |
110 |
image_yscale = draw_position_yscale + animation_disjoint_yscale |
111 |
hand_displacement_y = bbox_top + sprite_height * hand_displacement_y_multiplier |
112 |
image_yscale = image_yscale_store |
113 |
time_elapsed += time_increase |
114 |
if (time_elapsed >= time_max) |
115 |
{ |
116 |
time_elapsed = 0 |
117 |
sign_modifier = (-sign_modifier) |
118 |
} |
119 |
animating = true |
120 |
} |
121 |
else |
122 |
animating = false |
123 |
if (vanish == true) |
124 |
{ |
125 |
if (vanish_state == 1) |
126 |
{ |
127 |
game_maker_cannot_do_math = power((time_elapsed_move / (time_max_move * 0.5 / 2 * (1 / (sqrt(max_rise_move * 0.15)))) - (sqrt(max_rise_move * 0.15))), 2) |
128 |
animation_disjoint_x_move = (-sign_modifier_move) * (max_rise_move * 0.15 - game_maker_cannot_do_math) |
129 |
x = draw_position_x + animation_disjoint_x_move |
130 |
time_elapsed_move += time_increase_move |
131 |
if (time_elapsed_move > (time_max_move * 0.5 / 2)) |
132 |
{ |
133 |
time_elapsed_move = 0 |
134 |
vanish_state = 2 |
135 |
} |
136 |
} |
137 |
if (vanish_state == 2) |
138 |
{ |
139 |
game_maker_cannot_do_math = power((time_elapsed_move / (time_max_move / 2 * (1 / sqrt(max_rise_move))) - sqrt(max_rise_move)), 2) |
140 |
animation_disjoint_x_move = sign_modifier_move * (max_rise_move - game_maker_cannot_do_math) |
141 |
x = draw_position_x + animation_disjoint_x_move |
142 |
time_elapsed_move += time_increase_move |
143 |
if (time_elapsed_move > (time_max_move / 2)) |
144 |
instance_destroy() |
145 |
} |
146 |
} |
147 |
if instance_exists(obj_feisty_four_ace_head) |
148 |
{ |
149 |
with (obj_feisty_four_ace_head) |
150 |
event_user(0) |
151 |
} |
152 |
if instance_exists(obj_feisty_four_ace_arm) |
153 |
{ |
154 |
with (obj_feisty_four_ace_arm) |
155 |
event_user(0) |
156 |
} |