1 |
if live_call() |
2 |
return global.live_result; |
3 |
var battle_box = obj_dialogue_box_battle_transformation_any |
4 |
switch scene |
5 |
{ |
6 |
case 0: |
7 |
if scr_battle_box_resize_midfightscr_battle_box_resize_midfightfunction scr_battle_box_resize_midfight() //gml_Script_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 = obj_dialogue_box_battle_transformation_any
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;
} (128, 128) |
8 |
cutscene_advance() |
9 |
break |
10 |
case 1: |
11 |
instance_create_depth(battle_box.x, (battle_box.bbox_top - 60), -1100, obj_ceroba_phase_2_opener_lamp) |
12 |
cutscene_advance() |
13 |
break |
14 |
case 2: |
15 |
if (!instance_exists(obj_ceroba_phase_2_opener_lamp)) |
16 |
cutscene_advance() |
17 |
break |
18 |
case 3: |
19 |
cutscene_wait(1) |
20 |
break |
21 |
case 4: |
22 |
var mask = instance_create_depth((battle_box.bbox_right + 18), (battle_box.bbox_top - 18), -100, obj_ceroba_attack_bullet_trail_mask) |
23 |
mask.direction = 270 |
24 |
cutscene_advance() |
25 |
break |
26 |
case 5: |
27 |
cutscene_wait(0.5) |
28 |
break |
29 |
case 6: |
30 |
mask = instance_create_depth((battle_box.bbox_left - 18), (battle_box.bbox_bottom + 18), -100, obj_ceroba_attack_bullet_trail_mask) |
31 |
mask.direction = 90 |
32 |
cutscene_advance() |
33 |
break |
34 |
case 7: |
35 |
if (!instance_exists(obj_ceroba_attack_bullet_trail_mask)) |
36 |
cutscene_wait(1) |
37 |
break |
38 |
case 8: |
39 |
mask = instance_create_depth((battle_box.bbox_right + 18), (battle_box.bbox_bottom + 18), -100, obj_ceroba_attack_bullet_trail_mask) |
40 |
mask.direction = 180 |
41 |
cutscene_advance() |
42 |
break |
43 |
case 9: |
44 |
cutscene_wait(0.5) |
45 |
break |
46 |
case 10: |
47 |
mask = instance_create_depth((battle_box.bbox_left - 18), (battle_box.bbox_top - 18), -100, obj_ceroba_attack_bullet_trail_mask) |
48 |
mask.direction = 0 |
49 |
cutscene_advance() |
50 |
break |
51 |
case 11: |
52 |
cutscene_wait(2) |
53 |
break |
54 |
case 12: |
55 |
if scr_battle_box_resize_midfightscr_battle_box_resize_midfightfunction scr_battle_box_resize_midfight() //gml_Script_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 = obj_dialogue_box_battle_transformation_any
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;
} (50, 128) |
56 |
cutscene_wait(0.5) |
57 |
break |
58 |
case 13: |
59 |
cutscene_instance_create(0, 0, obj_battle_enemy_attack_ceroba_phase_2_obstacle_spawn) |
60 |
break |
61 |
case 14: |
62 |
if (!(variable_instance_exists(id, "bullet_count"))) |
63 |
bullet_count = 6 |
64 |
if cutscene_wait(1) |
65 |
{ |
66 |
if (bullet_count > 0) |
67 |
{ |
68 |
cutscene_advance(13) |
69 |
bullet_count-- |
70 |
break |
71 |
} |
72 |
else |
73 |
{ |
74 |
if scr_battle_box_resize_midfightscr_battle_box_resize_midfightfunction scr_battle_box_resize_midfight() //gml_Script_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 = obj_dialogue_box_battle_transformation_any
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;
} (128, 128) |
75 |
cutscene_advance(15) |
76 |
break |
77 |
} |
78 |
} |
79 |
else |
80 |
break |
81 |
case 15: |
82 |
cutscene_instance_create(obj_heart_battle_fighting_parent.x, obj_heart_battle_fighting_parent.y, obj_battle_enemy_attack_ceroba_flower_circle_half_spawner) |
83 |
break |
84 |
case 16: |
85 |
if (!(variable_instance_exists(id, "circle_count"))) |
86 |
circle_count = 3 |
87 |
if cutscene_wait(2) |
88 |
{ |
89 |
if (circle_count > 0) |
90 |
{ |
91 |
cutscene_advance(15) |
92 |
circle_count-- |
93 |
} |
94 |
else |
95 |
cutscene_advance(17) |
96 |
} |
97 |
break |
98 |
case 17: |
99 |
obj_ceroba_body_pacifist_phase_2.sprite_index = spr_ceroba_p2_idle_reveal |
100 |
obj_ceroba_body_pacifist_phase_2.image_index = 0 |
101 |
obj_ceroba_body_pacifist_phase_2.image_speed = 1 |
102 |
cutscene_advance() |
103 |
break |
104 |
case 18: |
105 |
if (obj_ceroba_body_pacifist_phase_2.image_index >= 9) |
106 |
{ |
107 |
obj_ceroba_body_pacifist_phase_2.image_speed = 0 |
108 |
obj_heart_battle_fighting_parent.moveable = false |
109 |
cutscene_advance() |
110 |
} |
111 |
break |
112 |
case 19: |
113 |
with (obj_heart_battle_fighting_parent) |
114 |
{ |
115 |
var xtarget = battle_box.x |
116 |
var ytarget = battle_box.bbox_bottom - 12 |
117 |
x = lerp(x, xtarget, 0.3) |
118 |
vspeed = 10 |
119 |
if (y >= ytarget) |
120 |
{ |
121 |
y = ytarget |
122 |
vspeed = 0 |
123 |
other.scene++ |
124 |
audio_play_sound(snd_undertale_impact, 1, 0) |
125 |
scr_screenshake_battlescr_screenshake_battlefunction scr_screenshake_battle() //gml_Script_scr_screenshake_battle
{
instance_destroy(obj_screenshake_battle)
var screenshake = instance_create(0, 0, obj_screenshake_battle)
battle_screenshake_duration = argument[0]
battle_screenshake_intensity = argument[1]
battle_screenshake_dec = battle_screenshake_intensity / battle_screenshake_duration
} (1, 2) |
126 |
} |
127 |
} |
128 |
break |
129 |
case 20: |
130 |
cutscene_instance_create(obj_heart_battle_fighting_parent.x, obj_heart_battle_fighting_parent.y, obj_battle_enemy_attack_ceroba_flower_circle_opener) |
131 |
break |
132 |
case 21: |
133 |
with (obj_heart_battle_fighting_parent) |
134 |
{ |
135 |
xtarget = battle_box.x |
136 |
ytarget = battle_box.y |
137 |
x = lerp(x, xtarget, 0.15) |
138 |
y = lerp(y, ytarget, 0.15) |
139 |
if (abs(x - xtarget) < 0.01 && abs(y - ytarget) < 0.01) |
140 |
{ |
141 |
x = xtarget |
142 |
y = ytarget |
143 |
obj_ceroba_body_pacifist_phase_2.image_speed = 1 |
144 |
other.scene++ |
145 |
} |
146 |
} |
147 |
break |
148 |
case 22: |
149 |
if (!instance_exists(obj_battle_enemy_attack_ceroba_flower_circle_opener)) |
150 |
cutscene_advance() |
151 |
break |
152 |
case 23: |
153 |
cutscene_wait(1.5) |
154 |
break |
155 |
case 24: |
156 |
instance_create_depth(obj_ceroba_body_pacifist_phase_2.x, 110, -9999, obj_ceroba_phase_2_shield_reappear) |
157 |
cutscene_advance() |
158 |
break |
159 |
case 25: |
160 |
cutscene_wait(1.5) |
161 |
break |
162 |
case 26: |
163 |
instance_destroy() |
164 |
break |
165 |
} |