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