1 |
if live_call() |
2 |
return global.live_result; |
3 |
var battle_box = obj_dialogue_box_battle_transformation_any |
4 |
var soul = obj_heart_battle_fighting_parent |
5 |
if (is_active == false) |
6 |
return; |
7 |
switch scene |
8 |
{ |
9 |
case 0: |
10 |
var xtarget = xstart + (lengthdir_x(40, (90 + 45 * image_xscale))) |
11 |
var ytarget = ystart + (lengthdir_y(40, (90 + 45 * image_xscale))) |
12 |
x = lerp(x, xtarget, 0.15) |
13 |
y = lerp(y, ytarget, 0.15) |
14 |
if (abs(x - xtarget) < 0.5 && abs(y - ytarget) < 0.1) |
15 |
{ |
16 |
xstart = x |
17 |
ystart = y |
18 |
scene++ |
19 |
} |
20 |
break |
21 |
case 1: |
22 |
if cutscene_wait(0.15) |
23 |
audio_play_sound(snd_ceroba_staff_lock, 1, 0) |
24 |
break |
25 |
case 2: |
26 |
var tardist = point_distance(xstart, ystart, battle_box.x, battle_box.y) |
27 |
var tardir = point_direction(xstart, ystart, battle_box.x, battle_box.y) |
28 |
xtarget = xstart + (lengthdir_x(tardist, tardir)) |
29 |
ytarget = ystart + (lengthdir_y(tardist, tardir)) |
30 |
x = lerp(x, xtarget, 0.3) |
31 |
y = lerp(y, ytarget, 0.3) |
32 |
if (abs(x - xtarget) < 0.1 && abs(y - ytarget) < 0.1) |
33 |
scene++ |
34 |
break |
35 |
case 3: |
36 |
sprite_index = -4 |
37 |
var orange = instance_create_depth(x, y, depth, obj_battle_enemy_attack_ceroba_staff_orange) |
38 |
orange.image_xscale = image_xscale |
39 |
orange.spawner = id |
40 |
audio_play_sound(snd_undertale_flash, 1, 0) |
41 |
scene++ |
42 |
break |
43 |
case 4: |
44 |
cutscene_wait(0.15) |
45 |
break |
46 |
case 5: |
47 |
image_angle += (rot_speed * image_xscale) |
48 |
if (rot_speed < 5) |
49 |
rot_speed = lerp(rot_speed, 15, 0.05) |
50 |
cutscene_wait(obj_battle_enemy_attack_ceroba_phase_1_staff.rot_time) |
51 |
break |
52 |
case 6: |
53 |
image_angle += (rot_speed * image_xscale) |
54 |
if (rot_speed > 0.1) |
55 |
rot_speed = lerp(rot_speed, 0, 0.15) |
56 |
else |
57 |
scene++ |
58 |
break |
59 |
case 7: |
60 |
sprite_index = spr_ceroba_staff_attack |
61 |
image_index = 2 |
62 |
image_speed = 1 |
63 |
instance_destroy(obj_battle_enemy_attack_ceroba_staff_orange) |
64 |
audio_play_sound(snd_undertale_flash, 1, 0) |
65 |
scene++ |
66 |
break |
67 |
case 8: |
68 |
if (image_index >= (image_number - 1)) |
69 |
{ |
70 |
image_index = image_number - 1 |
71 |
image_speed = 0 |
72 |
scene++ |
73 |
} |
74 |
break |
75 |
case 9: |
76 |
if (image_xscale == -1) |
77 |
scene++ |
78 |
else |
79 |
{ |
80 |
var xx = battle_box.x - 160 |
81 |
if (obj_heart_battle_fighting_parent.x < battle_box.x) |
82 |
xx = battle_box.x + 160 |
83 |
var spray_spawner = instance_create(xx, soul.y, obj_battle_enemy_attack_ceroba_flower_spray_spawner_pacifist) |
84 |
spray_spawner.bullet_number[0] = 2 |
85 |
spray_spawner.bullet_number[1] = 3 |
86 |
spray_spawner.bullet_speed[0] = 3 |
87 |
spray_spawner.target_x = soul.x |
88 |
spray_spawner.target_y = soul.y |
89 |
scene++ |
90 |
} |
91 |
break |
92 |
case 10: |
93 |
if (!instance_exists(obj_battle_enemy_attack_ceroba_flower_spray_spawner_pacifist)) |
94 |
cutscene_wait(1.5) |
95 |
break |
96 |
case 11: |
97 |
instance_destroy(obj_battle_enemy_attack_ceroba_phase_1_staff) |
98 |
break |
99 |
} |