1 |
if (live_call()) |
2 |
return global.live_result; |
3 |
switch (scene) |
4 |
{ |
5 |
case -1: |
6 |
with (obj_heart_battle_fighting_parent) |
7 |
{ |
8 |
moveable = false; |
9 |
x = lerp(x, 320, 0.15); |
10 |
y = lerp(y, 350, 0.15); |
11 |
} |
12 |
if (scr_battle_box_resize_midfightscr_battle_box_resize_midfightfunction scr_battle_box_resize_midfight()
{
if (instance_exists(obj_dialogue_box_battle_transformation_any))
{
with (obj_dialogue_box_battle_transformation_any)
{
battle_box_resize_midfight = true;
battle_box_target_xscale = argument[0] / sprite_get_width(sprite_index);
battle_box_target_yscale = argument[1] / sprite_get_height(sprite_index);
if (argument_count > 2)
{
battle_box_target_x = argument[2];
battle_box_target_y = argument[3];
}
if (abs(image_xscale - battle_box_target_xscale) < 0.01 && abs(image_yscale - battle_box_target_yscale) < 0.01 && abs(x - battle_box_target_x) < 0.1 && abs(y - battle_box_target_y) < 0.1)
{
var box = 3154;
global.attack_surface_width = box.sprite_width - 8;
global.attack_surface_height = box.sprite_height - 8;
global.attack_surface_x = box.x - (global.attack_surface_width * 0.5);
global.attack_surface_y = box.y - (global.attack_surface_height * 0.5);
if (surface_exists(global.attack_surface))
global.attack_surface = surface_create(global.attack_surface_width, global.attack_surface_height);
return true;
}
}
}
else
{
return false;
}
} (60, 40, 320, 350)) |
13 |
{ |
14 |
obj_heart_battle_fighting_parent.moveable = true; |
15 |
scene++; |
16 |
} |
17 |
break; |
18 |
case 0: |
19 |
with (obj_ceroba_body_pacifist_phase_1) |
20 |
{ |
21 |
if (sprite_index != spr_ceroba_transformation_p1_1 && sprite_index != spr_ceroba_transformation_p1_2) |
22 |
{ |
23 |
sprite_index = spr_ceroba_transformation_p1_1; |
24 |
image_speed = 1; |
25 |
image_index = 0; |
26 |
} |
27 |
else if (image_index >= (image_number - 1)) |
28 |
{ |
29 |
sprite_index = spr_ceroba_transformation_p1_2; |
30 |
image_speed = 0; |
31 |
image_index = image_number - 1; |
32 |
with (other) |
33 |
{ |
34 |
if (cutscene_wait(0.5)) |
35 |
image_speed = 1; |
36 |
} |
37 |
} |
38 |
} |
39 |
break; |
40 |
case 1: |
41 |
var attack_duration = 3; |
42 |
if (global.current_hp_self < 1) |
43 |
cutscene_wait(attack_duration); |
44 |
if (!instance_exists(obj_ceroba_transform_particles)) |
45 |
instance_create_depth(0, 0, -100, obj_ceroba_transform_particles); |
46 |
if (global.hit_self == true) |
47 |
{ |
48 |
if ((soul_hurt_count % 2) == 0) |
49 |
{ |
50 |
instance_create_depth(obj_heart_battle_fighting_parent.x, obj_heart_battle_fighting_parent.y, obj_heart_battle_fighting_parent.depth + 1, obj_ceroba_transform_soul_particles); |
51 |
soul_flash_overlay = 1; |
52 |
audio_play_sound(229, 1, 0, 1, 0, random_range(0.8, 1.2)); |
53 |
} |
54 |
global.hit_self = false; |
55 |
soul_hurt_count += 1; |
56 |
} |
57 |
obj_ceroba_body_pacifist_phase_1.image_speed = 1; |
58 |
break; |
59 |
case 2: |
60 |
if (global.current_hp_self >= 1) |
61 |
exit; |
62 |
with (obj_ceroba_body_pacifist_phase_1) |
63 |
{ |
64 |
if (sprite_index != spr_ceroba_transformation_p1_3) |
65 |
{ |
66 |
sprite_index = spr_ceroba_transformation_p1_3; |
67 |
image_speed = 1; |
68 |
image_index = 0; |
69 |
} |
70 |
else if (image_index >= (image_number - 1)) |
71 |
{ |
72 |
image_speed = 0; |
73 |
image_index = image_number - 1; |
74 |
sprite_index = -4; |
75 |
instance_create_depth(x, y, depth - 1, obj_ceroba_transformation_p1_4_legs); |
76 |
instance_create_depth(x, y, depth - 3, obj_ceroba_transformation_p1_4_arm); |
77 |
instance_create_depth(x, y, depth - 2, obj_ceroba_transformation_p1_4_blouse); |
78 |
instance_create_depth(x, y, depth - 1, obj_ceroba_transformation_p1_4_face); |
79 |
instance_create_depth(x, y, depth + 1, obj_ceroba_transformation_p1_4_staff); |
80 |
other.scene++; |
81 |
} |
82 |
} |
83 |
break; |
84 |
case 3: |
85 |
ring_timer--; |
86 |
if (ring_timer <= 0 && cutscene_timer > 60) |
87 |
{ |
88 |
instance_create_depth(obj_ceroba_body_pacifist_phase_1.x - 117, obj_ceroba_body_pacifist_phase_1.y - 165, -999, obj_attack_ceroba_transform_ring); |
89 |
ring_timer = ring_timer_max; |
90 |
ring_timer_max -= 0.08; |
91 |
} |
92 |
ceroba_shake_intensity += 0.015; |
93 |
var xx = random_range(-ceroba_shake_intensity, ceroba_shake_intensity); |
94 |
var yy = random_range(-ceroba_shake_intensity, ceroba_shake_intensity); |
95 |
with (obj_ceroba_transformation_p1_4_arm) |
96 |
{ |
97 |
x = xstart; |
98 |
y = ystart; |
99 |
x += xx; |
100 |
y += yy; |
101 |
} |
102 |
with (obj_ceroba_transformation_p1_4_staff) |
103 |
{ |
104 |
x = xstart; |
105 |
y = ystart; |
106 |
x += xx; |
107 |
y += yy; |
108 |
} |
109 |
with (obj_ceroba_transformation_p1_4_face) |
110 |
{ |
111 |
x = xstart; |
112 |
y = ystart; |
113 |
x += xx; |
114 |
y += yy; |
115 |
} |
116 |
with (obj_ceroba_transformation_p1_4_blouse) |
117 |
{ |
118 |
x = xstart; |
119 |
y = ystart; |
120 |
x += (xx * 0.5); |
121 |
y += (yy * 0.5); |
122 |
} |
123 |
with (obj_ceroba_transformation_p1_4_legs) |
124 |
{ |
125 |
x = xstart; |
126 |
y = ystart; |
127 |
x += (xx * 0.3); |
128 |
y += (yy * 0.3); |
129 |
} |
130 |
cutscene_wait(6); |
131 |
break; |
132 |
case 4: |
133 |
with (obj_heart_battle_fighting_parent) |
134 |
{ |
135 |
moveable = false; |
136 |
x = lerp(x, 320, 0.25); |
137 |
y = lerp(y, obj_dialogue_box_battle_transformation_any.y, 0.25); |
138 |
} |
139 |
with (obj_ceroba_body_pacifist_phase_1) |
140 |
{ |
141 |
if (sprite_index != spr_ceroba_transformation_p1_4) |
142 |
{ |
143 |
instance_destroy(obj_ceroba_transformation_p1_4_legs); |
144 |
instance_destroy(obj_ceroba_transformation_p1_4_arm); |
145 |
instance_destroy(obj_ceroba_transformation_p1_4_blouse); |
146 |
instance_destroy(obj_ceroba_transformation_p1_4_face); |
147 |
instance_destroy(obj_ceroba_transformation_p1_4_staff); |
148 |
sprite_index = spr_ceroba_transformation_p1_4; |
149 |
image_index = 0; |
150 |
image_speed = 1; |
151 |
} |
152 |
else if (image_index >= (image_number - 1)) |
153 |
{ |
154 |
sprite_index = spr_ceroba_transformation_p1_4_loop; |
155 |
image_index = 0; |
156 |
instance_create_depth(320, y, -999, obj_ceroba_transformation_p1_blast); |
157 |
audio_play_sound(snd_ceroba_big_shot, 1, 0); |
158 |
other.scene++; |
159 |
} |
160 |
} |
161 |
break; |
162 |
case 5: |
163 |
if (!instance_exists(obj_ceroba_transform_slowdown)) |
164 |
instance_create_depth(0, 0, -10000, obj_ceroba_transform_slowdown); |
165 |
with (obj_ceroba_transformation_p1_blast) |
166 |
{ |
167 |
y += other.bullet_speed; |
168 |
if (y > (obj_dialogue_box_battle_transformation_any.bbox_top - 40)) |
169 |
other.bullet_speed = lerp(other.bullet_speed, 0, 0.1); |
170 |
} |
171 |
var speed_perc = bullet_speed / bullet_speed_max; |
172 |
with (obj_ceroba_body_pacifist_phase_1) |
173 |
image_speed = speed_perc; |
174 |
if (instance_exists(obj_petal_generator_phase_1)) |
175 |
instance_destroy(obj_petal_generator_phase_1); |
176 |
with (obj_petal) |
177 |
{ |
178 |
if (!variable_instance_exists(id, "weight_original")) |
179 |
{ |
180 |
weight_original = weight; |
181 |
trajectory_original = trajectory; |
182 |
modifier_original = modifier; |
183 |
} |
184 |
else |
185 |
{ |
186 |
weight = weight_original * speed_perc; |
187 |
trajectory = trajectory_original * speed_perc; |
188 |
modifier = modifier_original * (1000 * (1 - speed_perc)); |
189 |
image_speed = 1 * speed_perc; |
190 |
} |
191 |
} |
192 |
with (obj_ceroba_transform_slowdown) |
193 |
starlo_take_aim_overlay_alpha = 1 - speed_perc; |
194 |
if (speed_perc <= 0) |
195 |
cutscene_wait(0.5); |
196 |
break; |
197 |
case 6: |
198 |
if (!instance_exists(obj_ceroba_transformation_soul)) |
199 |
{ |
200 |
instance_create(0, 0, obj_battle_justice_effect); |
201 |
obj_heart_battle_fighting_parent.image_alpha = 0; |
202 |
instance_create_depth(obj_heart_battle_fighting_parent.x, obj_heart_battle_fighting_parent.y, obj_heart_battle_fighting_parent.depth, obj_ceroba_transformation_soul); |
203 |
instance_create_depth(obj_heart_battle_fighting_parent.x, obj_heart_battle_fighting_parent.y, obj_heart_battle_fighting_parent.depth - 1, obj_ceroba_transformation_soul_effect); |
204 |
} |
205 |
cutscene_wait(1); |
206 |
break; |
207 |
case 7: |
208 |
with (obj_ceroba_transformation_soul) |
209 |
{ |
210 |
if (image_angle > -24) |
211 |
image_angle -= 6; |
212 |
else |
213 |
other.scene = 7.5; |
214 |
} |
215 |
break; |
216 |
case 7.5: |
217 |
with (obj_ceroba_transformation_soul) |
218 |
{ |
219 |
if (image_angle < 180) |
220 |
{ |
221 |
image_angle += 10; |
222 |
} |
223 |
else |
224 |
{ |
225 |
charge_time = 90; |
226 |
charge_time_max = 90; |
227 |
image_angle = 0; |
228 |
sprite_index = spr_heart_yellow_up; |
229 |
image_speed = 0; |
230 |
image_index = 0; |
231 |
other.scene = 8; |
232 |
} |
233 |
} |
234 |
break; |
235 |
case 8: |
236 |
if (cutscene_wait(1)) |
237 |
scene = 9; |
238 |
break; |
239 |
case 9: |
240 |
with (obj_ceroba_transformation_soul) |
241 |
{ |
242 |
is_charging = true; |
243 |
if (is_charged) |
244 |
other.scene++; |
245 |
} |
246 |
break; |
247 |
case 10: |
248 |
bullet_speed_max = 1; |
249 |
if (bullet_speed < bullet_speed_max) |
250 |
bullet_speed += 0.1; |
251 |
var speed_perc = bullet_speed / bullet_speed_max; |
252 |
with (obj_ceroba_body_pacifist_phase_1) |
253 |
{ |
254 |
if (sprite_index <= spr_ceroba_transformation_p1_5) |
255 |
sprite_index = spr_ceroba_transformation_p1_5; |
256 |
image_speed = speed_perc; |
257 |
} |
258 |
with (obj_ceroba_transform_slowdown) |
259 |
starlo_take_aim_overlay_alpha = 1 - speed_perc; |
260 |
with (obj_petal) |
261 |
{ |
262 |
weight = weight_original * speed_perc; |
263 |
trajectory = trajectory_original * speed_perc; |
264 |
modifier = modifier_original * (1000 * (1 - speed_perc)); |
265 |
image_speed = 1 * speed_perc; |
266 |
} |
267 |
if (speed_perc >= 1) |
268 |
cutscene_wait(0.5); |
269 |
break; |
270 |
case 11: |
271 |
instance_destroy(obj_ceroba_transform_slowdown); |
272 |
with (obj_ceroba_transformation_soul) |
273 |
{ |
274 |
can_shoot = true; |
275 |
draw_hint = true; |
276 |
} |
277 |
scene++; |
278 |
break; |
279 |
case 12: |
280 |
if (!instance_exists(obj_heart_yellow_shot_big)) |
281 |
exit; |
282 |
with (obj_heart_yellow_shot_big) |
283 |
{ |
284 |
if (instance_exists(obj_ceroba_transformation_p1_blast) && y <= obj_ceroba_transformation_p1_blast.y) |
285 |
{ |
286 |
instance_destroy(obj_ceroba_transformation_p1_blast); |
287 |
with (obj_petal) |
288 |
{ |
289 |
weight = 0; |
290 |
trajectory = 0; |
291 |
direction = point_direction(obj_heart_yellow_shot_big.x, obj_heart_yellow_shot_big.y, x, y); |
292 |
speed = 20; |
293 |
} |
294 |
} |
295 |
if (y <= obj_ceroba_body_pacifist_phase_1.y) |
296 |
{ |
297 |
with (obj_ceroba_body_pacifist_phase_1) |
298 |
{ |
299 |
image_index = 0; |
300 |
image_speed = 1; |
301 |
sprite_index = spr_ceroba_transformation_p1_6; |
302 |
} |
303 |
other.scene++; |
304 |
} |
305 |
} |
306 |
break; |
307 |
case 13: |
308 |
with (obj_ceroba_body_pacifist_phase_1) |
309 |
{ |
310 |
if (image_index >= 87) |
311 |
{ |
312 |
image_speed = 0; |
313 |
instance_create(402, 68, obj_quote_bubble_battle_yellow_2); |
314 |
instance_create_depth(0, 0, obj_quote_bubble_battle_yellow_2.depth - 1, obj_quote_battle_ceroba_transform); |
315 |
other.scene++; |
316 |
} |
317 |
} |
318 |
break; |
319 |
case 14: |
320 |
if (!instance_exists(obj_quote_battle_ceroba_transform)) |
321 |
obj_ceroba_body_pacifist_phase_1.image_speed = 1; |
322 |
with (obj_ceroba_body_pacifist_phase_1) |
323 |
{ |
324 |
if (image_index >= 103) |
325 |
{ |
326 |
image_speed = 0; |
327 |
instance_create(402, 68, obj_quote_bubble_battle_yellow_2); |
328 |
instance_create_depth(0, 0, obj_quote_bubble_battle_yellow_2.depth - 1, obj_quote_battle_ceroba_transform_2); |
329 |
other.scene++; |
330 |
} |
331 |
} |
332 |
break; |
333 |
case 15: |
334 |
if (!instance_exists(obj_quote_battle_ceroba_transform_2)) |
335 |
obj_ceroba_body_pacifist_phase_1.image_speed = 1; |
336 |
with (obj_ceroba_body_pacifist_phase_1) |
337 |
{ |
338 |
if (image_index >= 109) |
339 |
{ |
340 |
image_speed = 0; |
341 |
instance_create(402, 68, obj_quote_bubble_battle_yellow_2); |
342 |
instance_create_depth(0, 0, obj_quote_bubble_battle_yellow_2.depth - 1, obj_quote_battle_ceroba_transform_3); |
343 |
other.scene++; |
344 |
} |
345 |
} |
346 |
break; |
347 |
case 16: |
348 |
if (!instance_exists(obj_quote_battle_ceroba_transform_3)) |
349 |
obj_ceroba_body_pacifist_phase_1.image_speed = 1; |
350 |
with (obj_ceroba_body_pacifist_phase_1) |
351 |
{ |
352 |
if (image_index >= 143) |
353 |
{ |
354 |
image_speed = 0; |
355 |
instance_create(402, 68, obj_quote_bubble_battle_yellow_2); |
356 |
instance_create_depth(0, 0, obj_quote_bubble_battle_yellow_2.depth - 1, obj_quote_battle_ceroba_transform_4); |
357 |
other.scene++; |
358 |
} |
359 |
} |
360 |
break; |
361 |
case 17: |
362 |
if (!instance_exists(obj_quote_battle_ceroba_transform_4)) |
363 |
{ |
364 |
global.battle_music = audio_play_sound(mus_mothers_love_intro, 20, false); |
365 |
var xx = -1000; |
366 |
var yy = -1000; |
367 |
instance_create_depth(xx, yy, -1000, obj_ceroba_transformation_mask); |
368 |
obj_ceroba_transformation_mask.sprite_index = spr_ceroba_mask_resting; |
369 |
scene++; |
370 |
} |
371 |
break; |
372 |
case 18: |
373 |
with (obj_ceroba_body_pacifist_phase_1) |
374 |
{ |
375 |
if (sprite_index != spr_ceroba_transformation_p1_7) |
376 |
{ |
377 |
instance_create_depth(-500, -500, depth + 1, obj_ceroba_transformation_p1_hair); |
378 |
sprite_index = spr_ceroba_transformation_p1_7; |
379 |
image_speed = 1; |
380 |
image_index = 0; |
381 |
} |
382 |
else if (image_index > 4 && image_index < 16 && !instance_exists(obj_ceroba_transformation_beam_spawner)) |
383 |
{ |
384 |
instance_create_depth(obj_ceroba_transformation_mask.x, obj_ceroba_transformation_mask.y - 10, obj_ceroba_transformation_mask.depth + 1, obj_ceroba_transformation_beam_spawner); |
385 |
audio_play_sound(snd_ceroba_powerup, 1, 0); |
386 |
} |
387 |
else if (image_index > 16 && instance_exists(obj_ceroba_transformation_beam_spawner)) |
388 |
{ |
389 |
instance_destroy(obj_ceroba_transformation_beam_spawner); |
390 |
} |
391 |
else if (image_index >= 24) |
392 |
{ |
393 |
instance_create_depth(obj_ceroba_transformation_mask.x, obj_ceroba_transformation_mask.y - 5, obj_ceroba_transformation_mask.depth + 1, obj_ceroba_transform_white_transition); |
394 |
other.scene = 19; |
395 |
} |
396 |
} |
397 |
break; |
398 |
case 19: |
399 |
with (obj_ceroba_body_pacifist_phase_1) |
400 |
{ |
401 |
if (image_index >= (image_number - 1)) |
402 |
{ |
403 |
image_index = image_number - 1; |
404 |
image_speed = 0; |
405 |
} |
406 |
} |
407 |
if (obj_ceroba_transform_white_transition.multiplier >= 1) |
408 |
scene = 20; |
409 |
break; |
410 |
case 20: |
411 |
cutscene_wait(1); |
412 |
break; |
413 |
case 21: |
414 |
obj_ceroba_transformation_mask.image_alpha -= 0.022; |
415 |
if (obj_ceroba_transformation_mask.image_alpha <= 0) |
416 |
{ |
417 |
obj_ceroba_transformation_mask.image_alpha = 0; |
418 |
cutscene_wait(1); |
419 |
} |
420 |
break; |
421 |
case 22: |
422 |
var bell = instance_create_depth(320, 10, -1100, obj_ceroba_transformation_p1_bell); |
423 |
bell.alarm[0] = 1; |
424 |
bell = instance_create_depth(400, 90, -1100, obj_ceroba_transformation_p1_bell); |
425 |
bell.alarm[0] = 30; |
426 |
bell = instance_create_depth(320, 180, -1100, obj_ceroba_transformation_p1_bell); |
427 |
bell.alarm[0] = 60; |
428 |
bell = instance_create_depth(240, 90, -1100, obj_ceroba_transformation_p1_bell); |
429 |
bell.alarm[0] = 90; |
430 |
scene++; |
431 |
break; |
432 |
case 23: |
433 |
with (obj_ceroba_transformation_p1_bell) |
434 |
{ |
435 |
if (image_alpha < 1) |
436 |
exit; |
437 |
} |
438 |
instance_create_depth(320, 110, -1050, obj_ceroba_transformation_p1_shield); |
439 |
scene++; |
440 |
break; |
441 |
case 24: |
442 |
if (obj_ceroba_transformation_p1_shield.image_index >= (obj_ceroba_transformation_p1_shield.image_number - 1)) |
443 |
cutscene_wait(1.5); |
444 |
break; |
445 |
case 25: |
446 |
obj_ceroba_transformation_p1_shield.image_alpha -= 0.0222; |
447 |
with (obj_ceroba_transformation_p1_bell) |
448 |
{ |
449 |
fade = false; |
450 |
image_alpha = obj_ceroba_transformation_p1_shield.image_alpha; |
451 |
} |
452 |
if (obj_ceroba_transformation_p1_shield.image_alpha <= 0) |
453 |
scene++; |
454 |
break; |
455 |
case 26: |
456 |
if (global.current_hp_self < global.max_hp_self) |
457 |
global.current_hp_self = global.max_hp_self; |
458 |
obj_ceroba_phase_2_red_shader.decimal_count = 0; |
459 |
cutscene_wait(1); |
460 |
break; |
461 |
case 27: |
462 |
draw_alpha += 0.05; |
463 |
if (draw_alpha >= 1) |
464 |
{ |
465 |
scene++; |
466 |
draw_alpha = 1; |
467 |
} |
468 |
break; |
469 |
case 28: |
470 |
instance_destroy(obj_ceroba_body_pacifist_phase_1); |
471 |
obj_ceroba_transformation_mask.y = 78; |
472 |
obj_ceroba_transformation_mask.x = 318; |
473 |
obj_ceroba_transformation_mask.ystart = 80; |
474 |
obj_ceroba_transformation_mask.image_alpha = 0; |
475 |
cutscene_wait(1); |
476 |
break; |
477 |
case 29: |
478 |
obj_ceroba_transformation_mask.image_alpha += 0.035; |
479 |
if (obj_ceroba_transformation_mask.image_alpha >= 1) |
480 |
{ |
481 |
obj_ceroba_transformation_mask.image_alpha = 1; |
482 |
scene++; |
483 |
} |
484 |
break; |
485 |
case 30: |
486 |
with (obj_ceroba_transformation_mask) |
487 |
{ |
488 |
if (sprite_index != spr_ceroba_transformation_p1_mask_start) |
489 |
{ |
490 |
audio_play_sound(snd_ceroba_phase_1_transform, 1, 0); |
491 |
sprite_index = spr_ceroba_transformation_p1_mask_start; |
492 |
image_index = 0; |
493 |
image_speed = 1; |
494 |
} |
495 |
else if (image_index >= (image_number - 1)) |
496 |
{ |
497 |
image_index = image_number - 1; |
498 |
image_speed = 0; |
499 |
other.scene += 1; |
500 |
} |
501 |
} |
502 |
break; |
503 |
case 31: |
504 |
cutscene_wait(0.5); |
505 |
break; |
506 |
case 32: |
507 |
instance_destroy(obj_ceroba_transform_white_transition); |
508 |
instance_destroy(obj_ceroba_transformation_p1_bell); |
509 |
instance_destroy(obj_petal_generator_phase_1); |
510 |
instance_create_depth(0, 0, 0, obj_petal_generator_phase_2); |
511 |
instance_create_depth(318, 250, 100, obj_ceroba_body_pacifist_phase_2); |
512 |
with (obj_ceroba_body_pacifist_phase_2) |
513 |
{ |
514 |
sprite_index = spr_ceroba_p2_1; |
515 |
image_index = 0; |
516 |
image_speed = 1; |
517 |
} |
518 |
scene++; |
519 |
break; |
520 |
case 33: |
521 |
if (draw_alpha > 0) |
522 |
draw_alpha -= 0.03; |
523 |
else |
524 |
scene++; |
525 |
break; |
526 |
case 34: |
527 |
if (scr_battle_box_resize_midfightscr_battle_box_resize_midfightfunction scr_battle_box_resize_midfight()
{
if (instance_exists(obj_dialogue_box_battle_transformation_any))
{
with (obj_dialogue_box_battle_transformation_any)
{
battle_box_resize_midfight = true;
battle_box_target_xscale = argument[0] / sprite_get_width(sprite_index);
battle_box_target_yscale = argument[1] / sprite_get_height(sprite_index);
if (argument_count > 2)
{
battle_box_target_x = argument[2];
battle_box_target_y = argument[3];
}
if (abs(image_xscale - battle_box_target_xscale) < 0.01 && abs(image_yscale - battle_box_target_yscale) < 0.01 && abs(x - battle_box_target_x) < 0.1 && abs(y - battle_box_target_y) < 0.1)
{
var box = 3154;
global.attack_surface_width = box.sprite_width - 8;
global.attack_surface_height = box.sprite_height - 8;
global.attack_surface_x = box.x - (global.attack_surface_width * 0.5);
global.attack_surface_y = box.y - (global.attack_surface_height * 0.5);
if (surface_exists(global.attack_surface))
global.attack_surface = surface_create(global.attack_surface_width, global.attack_surface_height);
return true;
}
}
}
else
{
return false;
}
} (140, 140, 319, 320)) |
528 |
cutscene_wait(1); |
529 |
break; |
530 |
case 35: |
531 |
global.battle_music = audio_play_sound(mus_mothers_love_phase_1, 20, true); |
532 |
global.hotland_flag[2] = 1; |
533 |
global.attack_cycle_max = 17; |
534 |
global.enemy_attack = "Ceroba Phase 2 Opener"; |
535 |
global.attack_end_text = false; |
536 |
global.enemy_attack_stat = 14; |
537 |
if (global.option_autoshoot) |
538 |
instance_create_depth(536, 399, 5, obj_autofire_toggle); |
539 |
obj_ceroba_transformation_mask.image_alpha = 0; |
540 |
if (!instance_exists(obj_heart_battle_fighting_yellow_final)) |
541 |
{ |
542 |
instance_destroy(obj_heart_battle_fighting_parent); |
543 |
instance_create_depth(obj_ceroba_transformation_soul.x, obj_ceroba_transformation_soul.y, obj_ceroba_transformation_soul.depth, obj_heart_battle_fighting_yellow_final); |
544 |
} |
545 |
obj_heart_battle_fighting_yellow_final.moveable = true; |
546 |
obj_heart_battle_fighting_yellow_final.image_alpha = 1; |
547 |
instance_destroy(obj_ceroba_transformation_soul); |
548 |
instance_destroy(self, false); |
549 |
break; |
550 |
} |
551 |
if (instance_exists(obj_ceroba_transformation_soul)) |
552 |
{ |
553 |
with (obj_ceroba_transformation_soul) |
554 |
{ |
555 |
if (sprite_index == spr_heart_yellow_shoot && image_index >= (image_number - 1)) |
556 |
{ |
557 |
sprite_index = spr_heart_yellow_up; |
558 |
image_index = 0; |
559 |
image_speed = 0; |
560 |
} |
561 |
} |
562 |
} |
563 |
if (scene < 7) |
564 |
{ |
565 |
var shake_amount = soul_hurt_count * soul_shake_modif; |
566 |
soul_x_offset = random_range(-shake_amount, shake_amount); |
567 |
soul_y_offset = random_range(-shake_amount, shake_amount); |
568 |
if (soul_flash_overlay > 0.05) |
569 |
soul_flash_overlay = lerp(soul_flash_overlay, 0, 0.15); |
570 |
else |
571 |
soul_flash_overlay = 0; |
572 |
} |