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_ed_head.image_alpha = image_alpha |
29 |
obj_feisty_four_ed_body.image_alpha = image_alpha |
30 |
obj_feisty_four_ed_hand_left.image_alpha = image_alpha |
31 |
obj_feisty_four_ed_hand_right.image_alpha = image_alpha |
32 |
if (damage_disjoint_count > 0) |
33 |
damage_disjoint_count -= 1 |
34 |
else if (enemy_dead == false && enemy_spared == false) |
35 |
{ |
36 |
if (global.current_hp_enemy <= 0) |
37 |
sprite_index = spr_feisty_four_ed_legs |
38 |
else |
39 |
sprite_index = spr_feisty_four_ed_legs |
40 |
} |
41 |
if (instance_exists(obj_text_damage_count) && ((global.fight_number == 1 && global.enemy_count == 1) || (global.fight_number == 2 && global.enemy_count == 2)) && no_loop_damage_disjoint_count == false) |
42 |
{ |
43 |
time_elapsed = 0 |
44 |
sign_modifier = 1 |
45 |
damage_disjoint_count = 12 |
46 |
no_loop_damage_disjoint_count = true |
47 |
} |
48 |
else if (!instance_exists(obj_text_damage_count)) |
49 |
no_loop_damage_disjoint_count = false |
50 |
if (damage_disjoint_count == 12) |
51 |
damage_disjoint_x = -50 |
52 |
else if (damage_disjoint_count == 10) |
53 |
damage_disjoint_x = 50 |
54 |
else if (damage_disjoint_count == 8) |
55 |
damage_disjoint_x = -20 |
56 |
else if (damage_disjoint_count == 6) |
57 |
damage_disjoint_x = 20 |
58 |
else if (damage_disjoint_count == 4) |
59 |
damage_disjoint_x = -10 |
60 |
else if (damage_disjoint_count == 2) |
61 |
damage_disjoint_x = 10 |
62 |
else if (damage_disjoint_count == 0) |
63 |
damage_disjoint_x = 0 |
64 |
if (damage_disjoint_count > 0) |
65 |
{ |
66 |
if (global.current_hp_enemy <= 0) |
67 |
sprite_index = spr_feisty_four_ed_legs |
68 |
else |
69 |
sprite_index = hurt_sprite |
70 |
image_xscale = starting_point_xscale |
71 |
image_yscale = starting_point_yscale |
72 |
} |
73 |
else if (sprite_index == hurt_sprite) |
74 |
sprite_index = spr_feisty_four_ed_legs |
75 |
if (global.current_hp_enemy <= 0) |
76 |
{ |
77 |
time_elapsed = 0 |
78 |
sign_modifier = 1 |
79 |
} |
80 |
x = draw_position_x + damage_disjoint_x |
81 |
y = draw_position_y + damage_disjoint_y |
82 |
if ((!((instance_exists(obj_text_damage_count) && global.fight_number == 1))) && enemy_dead == false && enemy_spared == false) |
83 |
{ |
84 |
game_maker_cannot_do_math = power((time_elapsed / (time_max / 2 * (1 / sqrt(max_rise))) - sqrt(max_rise)), 2) |
85 |
animation_disjoint_yscale = sign_modifier * (max_rise - game_maker_cannot_do_math) |
86 |
image_yscale = draw_position_yscale + animation_disjoint_yscale |
87 |
image_xscale = draw_position_xscale - animation_disjoint_yscale * (max_rise_ext / max_rise) |
88 |
var image_yscale_store = image_yscale |
89 |
var time_elapsed_head = time_elapsed - time_elapsed_decrease_head |
90 |
if (time_elapsed_head < 0) |
91 |
{ |
92 |
time_elapsed_head += time_max |
93 |
sign_modifier_head = (-sign_modifier) |
94 |
} |
95 |
else |
96 |
sign_modifier_head = sign_modifier |
97 |
game_maker_cannot_do_math = power((time_elapsed_head / (time_max / 2 * (1 / sqrt(max_rise))) - sqrt(max_rise)), 2) |
98 |
animation_disjoint_yscale = sign_modifier_head * (max_rise - game_maker_cannot_do_math) |
99 |
image_yscale = draw_position_yscale + animation_disjoint_yscale |
100 |
head_displacement_y = bbox_top + sprite_height * head_displacement_y_multiplier |
101 |
image_yscale = image_yscale_store |
102 |
var time_elapsed_body = time_elapsed - time_elapsed_decrease_body |
103 |
if (time_elapsed_body < 0) |
104 |
{ |
105 |
time_elapsed_body += time_max |
106 |
sign_modifier_body = (-sign_modifier) |
107 |
} |
108 |
else |
109 |
sign_modifier_body = sign_modifier |
110 |
game_maker_cannot_do_math = power((time_elapsed_body / (time_max / 2 * (1 / sqrt(max_rise))) - sqrt(max_rise)), 2) |
111 |
animation_disjoint_yscale = sign_modifier_body * (max_rise - game_maker_cannot_do_math) |
112 |
image_yscale = draw_position_yscale + animation_disjoint_yscale |
113 |
body_displacement_y = bbox_top + sprite_height * body_displacement_y_multiplier |
114 |
image_yscale = image_yscale_store |
115 |
var time_elapsed_hand_left = time_elapsed - time_elapsed_decrease_hand_left |
116 |
if (time_elapsed_hand_left < 0) |
117 |
{ |
118 |
time_elapsed_hand_left += time_max |
119 |
sign_modifier_hand_left = (-sign_modifier) |
120 |
} |
121 |
else |
122 |
sign_modifier_hand_left = sign_modifier |
123 |
game_maker_cannot_do_math = power((time_elapsed_hand_left / (time_max / 2 * (1 / sqrt(max_rise))) - sqrt(max_rise)), 2) |
124 |
animation_disjoint_yscale = sign_modifier_hand_left * (max_rise - game_maker_cannot_do_math) |
125 |
image_yscale = draw_position_yscale + animation_disjoint_yscale |
126 |
hand_left_displacement_y = bbox_top + sprite_height * hand_left_displacement_y_multiplier |
127 |
image_yscale = image_yscale_store |
128 |
var time_elapsed_hand_right = time_elapsed - time_elapsed_decrease_hand_right |
129 |
if (time_elapsed_hand_right < 0) |
130 |
{ |
131 |
time_elapsed_hand_right += time_max |
132 |
sign_modifier_hand_right = (-sign_modifier) |
133 |
} |
134 |
else |
135 |
sign_modifier_hand_right = sign_modifier |
136 |
game_maker_cannot_do_math = power((time_elapsed_hand_right / (time_max / 2 * (1 / sqrt(max_rise))) - sqrt(max_rise)), 2) |
137 |
animation_disjoint_yscale = sign_modifier_hand_right * (max_rise - game_maker_cannot_do_math) |
138 |
image_yscale = draw_position_yscale + animation_disjoint_yscale |
139 |
hand_right_displacement_y = bbox_top + sprite_height * hand_right_displacement_y_multiplier |
140 |
image_yscale = image_yscale_store |
141 |
time_elapsed += time_increase |
142 |
if (time_elapsed >= time_max) |
143 |
{ |
144 |
time_elapsed = 0 |
145 |
sign_modifier = (-sign_modifier) |
146 |
} |
147 |
animating = true |
148 |
} |
149 |
else |
150 |
animating = false |
151 |
if (vanish == true) |
152 |
{ |
153 |
if (vanish_state == 1) |
154 |
{ |
155 |
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) |
156 |
animation_disjoint_x_move = (-sign_modifier_move) * (max_rise_move * 0.15 - game_maker_cannot_do_math) |
157 |
x = draw_position_x + animation_disjoint_x_move |
158 |
time_elapsed_move += time_increase_move |
159 |
if (time_elapsed_move > (time_max_move * 0.5 / 2)) |
160 |
{ |
161 |
time_elapsed_move = 0 |
162 |
vanish_state = 2 |
163 |
} |
164 |
} |
165 |
if (vanish_state == 2) |
166 |
{ |
167 |
game_maker_cannot_do_math = power((time_elapsed_move / (time_max_move / 2 * (1 / sqrt(max_rise_move))) - sqrt(max_rise_move)), 2) |
168 |
animation_disjoint_x_move = sign_modifier_move * (max_rise_move - game_maker_cannot_do_math) |
169 |
x = draw_position_x + animation_disjoint_x_move |
170 |
time_elapsed_move += time_increase_move |
171 |
if (time_elapsed_move > (time_max_move / 2)) |
172 |
instance_destroy() |
173 |
} |
174 |
} |
175 |
if instance_exists(obj_feisty_four_ed_head) |
176 |
{ |
177 |
with (obj_feisty_four_ed_head) |
178 |
event_user(0) |
179 |
} |
180 |
if instance_exists(obj_feisty_four_ed_body) |
181 |
{ |
182 |
with (obj_feisty_four_ed_body) |
183 |
event_user(0) |
184 |
} |
185 |
if instance_exists(obj_feisty_four_ed_hand_left) |
186 |
{ |
187 |
with (obj_feisty_four_ed_hand_left) |
188 |
event_user(0) |
189 |
} |
190 |
if instance_exists(obj_feisty_four_ed_hand_right) |
191 |
{ |
192 |
with (obj_feisty_four_ed_hand_right) |
193 |
event_user(0) |
194 |
} |