1 |
if live_call() |
2 |
return global.live_result; |
3 |
var battle_box = obj_dialogue_box_battle_transformation_any |
4 |
switch attack_tick |
5 |
{ |
6 |
case 30: |
7 |
instance_create_depth((battle_box.bbox_left + 20), (battle_box.bbox_top - 60), -100, obj_battle_enemy_attack_martlet_feather_fall_feather_final) |
8 |
break |
9 |
case 60: |
10 |
instance_create_depth(battle_box.x, (battle_box.bbox_top - 50), -100, obj_battle_enemy_attack_martlet_feather_fall_feather_final) |
11 |
break |
12 |
case 90: |
13 |
instance_create_depth((battle_box.bbox_right - 20), (battle_box.bbox_top - 50), -100, obj_battle_enemy_attack_martlet_feather_fall_feather_final) |
14 |
break |
15 |
case 120: |
16 |
instance_create_depth((battle_box.bbox_right + 10), (battle_box.bbox_top - 20), -100, obj_battle_enemy_attack_martlet_feather_fall_feather_final) |
17 |
break |
18 |
case 130: |
19 |
instance_create_depth(battle_box.bbox_right, (battle_box.bbox_top - 40), -100, obj_battle_enemy_attack_martlet_feather_fall_feather_final) |
20 |
break |
21 |
case 140: |
22 |
instance_create_depth((battle_box.bbox_right - 10), (battle_box.bbox_top - 60), -100, obj_battle_enemy_attack_martlet_feather_fall_feather_final) |
23 |
break |
24 |
case 160: |
25 |
instance_create_depth((battle_box.bbox_left - 10), (battle_box.bbox_top - 60), -100, obj_battle_enemy_attack_martlet_feather_fall_feather_final) |
26 |
break |
27 |
case 170: |
28 |
instance_create_depth(battle_box.bbox_left, (battle_box.bbox_top - 80), -100, obj_battle_enemy_attack_martlet_feather_fall_feather_final) |
29 |
break |
30 |
case 180: |
31 |
instance_create_depth((battle_box.bbox_left + 10), (battle_box.bbox_top - 100), -100, obj_battle_enemy_attack_martlet_feather_fall_feather_final) |
32 |
break |
33 |
case 210: |
34 |
var sound_noloop = false |
35 |
for (var i = battle_box.bbox_left + 12; i < (battle_box.bbox_left + 4 + 140); i += 28) |
36 |
{ |
37 |
var feather = instance_create_depth(i, (battle_box.bbox_top - 20), -100, obj_fmartlet_feather_straight) |
38 |
feather.direction = 270 |
39 |
if (sound_noloop == false) |
40 |
{ |
41 |
feather.can_play_sound = true |
42 |
sound_noloop = true |
43 |
} |
44 |
} |
45 |
break |
46 |
case 245: |
47 |
sound_noloop = false |
48 |
for (i = battle_box.bbox_top + 12; i < (battle_box.bbox_top + 4 + 70); i += 14) |
49 |
{ |
50 |
feather = instance_create_depth((battle_box.bbox_left - 20), i, -100, obj_fmartlet_feather_straight) |
51 |
feather.direction = 0 |
52 |
if (sound_noloop == false) |
53 |
{ |
54 |
feather.can_play_sound = true |
55 |
sound_noloop = true |
56 |
} |
57 |
} |
58 |
break |
59 |
case 250: |
60 |
sound_noloop = false |
61 |
for (i = battle_box.bbox_top + 4 + 70; i < (battle_box.bbox_top + 4 + 140); i += 14) |
62 |
{ |
63 |
feather = instance_create_depth((battle_box.bbox_right + 20), i, -100, obj_fmartlet_feather_straight) |
64 |
feather.direction = 180 |
65 |
if (sound_noloop == false) |
66 |
{ |
67 |
feather.can_play_sound = true |
68 |
sound_noloop = true |
69 |
} |
70 |
} |
71 |
break |
72 |
case 280: |
73 |
sound_noloop = false |
74 |
for (i = 0; i < 70; i += 14) |
75 |
{ |
76 |
feather = instance_create_depth((battle_box.bbox_right + 20 + (lengthdir_x(i, 45))), (battle_box.bbox_bottom + (lengthdir_y(i, 45))), -100, obj_fmartlet_feather_straight) |
77 |
feather.direction = 135 |
78 |
if (sound_noloop == false) |
79 |
{ |
80 |
feather.can_play_sound = true |
81 |
sound_noloop = true |
82 |
} |
83 |
} |
84 |
break |
85 |
case 285: |
86 |
sound_noloop = false |
87 |
for (i = 0; i < 70; i += 14) |
88 |
{ |
89 |
feather = instance_create_depth((battle_box.bbox_left - 20 + (lengthdir_x(i, 225))), (battle_box.bbox_top - 20 + (lengthdir_y(i, 225))), -100, obj_fmartlet_feather_straight) |
90 |
feather.direction = 315 |
91 |
if (sound_noloop == false) |
92 |
{ |
93 |
feather.can_play_sound = true |
94 |
sound_noloop = true |
95 |
} |
96 |
} |
97 |
break |
98 |
case 320: |
99 |
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;
} (82, 160, 320, 300) |
100 |
break |
101 |
case 350: |
102 |
instance_create_depth((battle_box.bbox_left + 5), (battle_box.bbox_top - 24), -100, obj_martlet_attack_block_hurt) |
103 |
instance_create_depth((battle_box.bbox_left + 29), (battle_box.bbox_top - 24), -100, obj_martlet_attack_block) |
104 |
instance_create_depth((battle_box.bbox_left + 53), (battle_box.bbox_top - 24), -100, obj_martlet_attack_block) |
105 |
break |
106 |
case 370: |
107 |
instance_create_depth((battle_box.bbox_left + 5), (battle_box.bbox_top - 24), -100, obj_martlet_attack_block) |
108 |
instance_create_depth((battle_box.bbox_left + 29), (battle_box.bbox_top - 24), -100, obj_martlet_attack_block_hurt) |
109 |
instance_create_depth((battle_box.bbox_left + 53), (battle_box.bbox_top - 24), -100, obj_martlet_attack_block_hurt) |
110 |
break |
111 |
case 390: |
112 |
instance_create_depth((battle_box.bbox_left + 5), (battle_box.bbox_top - 24), -100, obj_martlet_attack_block_hurt) |
113 |
instance_create_depth((battle_box.bbox_left + 29), (battle_box.bbox_top - 24), -100, obj_martlet_attack_block_hurt) |
114 |
instance_create_depth((battle_box.bbox_left + 53), (battle_box.bbox_top - 24), -100, obj_martlet_attack_block) |
115 |
break |
116 |
case 420: |
117 |
instance_create_depth((battle_box.bbox_left + 5), (battle_box.bbox_top - 24), -100, obj_martlet_attack_block_hurt) |
118 |
instance_create_depth((battle_box.bbox_left + 29), (battle_box.bbox_top - 24), -100, obj_martlet_attack_block) |
119 |
instance_create_depth((battle_box.bbox_left + 53), (battle_box.bbox_top - 24), -100, obj_martlet_attack_block_hurt) |
120 |
with (obj_martlet_attack_block) |
121 |
vspeed = 6 |
122 |
with (obj_martlet_attack_block_hurt) |
123 |
vspeed = 6 |
124 |
break |
125 |
case 440: |
126 |
instance_create_depth((battle_box.bbox_left + 5), (battle_box.bbox_top - 24), -100, obj_martlet_attack_block) |
127 |
instance_create_depth((battle_box.bbox_left + 29), (battle_box.bbox_top - 24), -100, obj_martlet_attack_block_hurt) |
128 |
instance_create_depth((battle_box.bbox_left + 53), (battle_box.bbox_top - 24), -100, obj_martlet_attack_block) |
129 |
with (obj_martlet_attack_block) |
130 |
vspeed = 6 |
131 |
with (obj_martlet_attack_block_hurt) |
132 |
vspeed = 6 |
133 |
break |
134 |
case 460: |
135 |
instance_create_depth((battle_box.bbox_left + 5), (battle_box.bbox_top - 24), -100, obj_martlet_attack_block) |
136 |
instance_create_depth((battle_box.bbox_left + 29), (battle_box.bbox_top - 24), -100, obj_martlet_attack_block_hurt) |
137 |
instance_create_depth((battle_box.bbox_left + 53), (battle_box.bbox_top - 24), -100, obj_martlet_attack_block_hurt) |
138 |
with (obj_martlet_attack_block) |
139 |
vspeed = 6 |
140 |
with (obj_martlet_attack_block_hurt) |
141 |
vspeed = 6 |
142 |
break |
143 |
case 490: |
144 |
instance_create_depth((battle_box.bbox_left + 5), (battle_box.bbox_top - 24), -100, obj_martlet_attack_glass) |
145 |
instance_create_depth((battle_box.bbox_left + 29), (battle_box.bbox_top - 24), -100, obj_martlet_attack_glass) |
146 |
instance_create_depth((battle_box.bbox_left + 53), (battle_box.bbox_top - 24), -100, obj_martlet_attack_glass) |
147 |
glass_speed_original = 5 |
148 |
with (obj_martlet_attack_glass) |
149 |
vspeed = other.glass_speed_original |
150 |
_speed_perc = 1 |
151 |
break |
152 |
case 500: |
153 |
switch scene |
154 |
{ |
155 |
case -1: |
156 |
if (abs(obj_heart_battle_fighting_parent.y - obj_martlet_attack_glass.y) < 80) |
157 |
scene++ |
158 |
break |
159 |
case 0: |
160 |
if (!instance_exists(obj_martlet_final_slowdown)) |
161 |
instance_create_depth(0, 0, (obj_martlet_final_base.depth - 10), obj_martlet_final_slowdown) |
162 |
var speed_perc = _speed_perc |
163 |
with (obj_martlet_attack_glass) |
164 |
vspeed = other.glass_speed_original * speed_perc |
165 |
with (obj_martlet_final_slowdown) |
166 |
starlo_take_aim_overlay_alpha = 1 - speed_perc |
167 |
with (obj_martlet_final_base) |
168 |
speed_multiplier = speed_perc |
169 |
if (_speed_perc <= 0) |
170 |
{ |
171 |
obj_heart_battle_fighting_parent.moveable = false |
172 |
cutscene_advance() |
173 |
} |
174 |
else |
175 |
_speed_perc -= 0.1 |
176 |
break |
177 |
case 1: |
178 |
cutscene_wait(0.5) |
179 |
break |
180 |
case 2: |
181 |
hint_draw = true |
182 |
if keyboard_multicheck_pressed(1) |
183 |
{ |
184 |
var walk_speed = global.speed_self + 1 * sign(global.current_sp_self) |
185 |
var move_x = 0 |
186 |
var move_y = -1 |
187 |
battle_box = 3154 |
188 |
with (obj_heart_battle_fighting_yellow_final) |
189 |
{ |
190 |
moveable = true |
191 |
is_dashing = true |
192 |
can_cancel_dash = false |
193 |
dash_delay = dash_delay_max |
194 |
move_y_dash = move_y * 2 |
195 |
move_x_dash = 0 |
196 |
} |
197 |
hint_draw = false |
198 |
scene++ |
199 |
} |
200 |
break |
201 |
case 3: |
202 |
speed_perc = _speed_perc |
203 |
with (obj_martlet_attack_glass) |
204 |
vspeed = other.glass_speed_original * speed_perc |
205 |
with (obj_martlet_final_slowdown) |
206 |
starlo_take_aim_overlay_alpha = 1 - speed_perc |
207 |
with (obj_martlet_final_base) |
208 |
speed_multiplier = speed_perc |
209 |
if (_speed_perc >= 1) |
210 |
{ |
211 |
_speed_perc = 1 |
212 |
obj_martlet_final_base.speed_multiplier = 1 |
213 |
attack_tick += 1 |
214 |
cutscene_advance() |
215 |
} |
216 |
else |
217 |
_speed_perc += 0.1 |
218 |
break |
219 |
} |
220 |
|
221 |
break |
222 |
case 560: |
223 |
instance_destroy() |
224 |
break |
225 |
} |
226 |
|
227 |
if (attack_tick != 500) |
228 |
attack_tick += 1 |
229 |
if (global.image_alpha_enemy_attacking >= 0) |
230 |
{ |
231 |
if (bbox_overlay_alpha > 0) |
232 |
bbox_overlay_alpha -= 0.1 |
233 |
} |
234 |
if (hint_draw == true) |
235 |
{ |
236 |
if (hint_alpha < 1) |
237 |
hint_alpha += 0.1 |
238 |
} |
239 |
else |
240 |
hint_alpha = 0 |