1 |
function scr_battle_core_directory_action_3_selected_eventscr_battle_core_directory_action_3_selected_eventfunction scr_battle_core_directory_action_3_selected_event()
{
var event_check = false;
if (game_mode == "customs")
{
if (battle_enemy_name == "craniex")
{
global.action_1_selected_count = 0;
global.action_2_selected_count = 0;
global.action_3_selected_count += 1;
global.enemy_sparing = false;
global.enemy_attacking = true;
instance_destroy();
exit;
}
else if (battle_enemy_name == "ms mettaton")
{
global.enemy_sparing = false;
global.enemy_attacking = true;
instance_destroy();
exit;
}
}
else if (game_mode == "yellow")
{
if (battle_enemy_name == "flier a")
{
global.action_1_selected_count = 0;
global.action_2_selected_count = 0;
if (global.action_3_selected_count < 2)
global.action_3_selected_count += 1;
global.enemy_attacking = true;
instance_destroy();
exit;
}
else if (battle_enemy_name == "flier b")
{
global.action_1_selected_count_2 = 0;
global.action_2_selected_count_2 = 0;
if (global.action_3_selected_count_2 < 2)
global.action_3_selected_count_2 += 1;
global.enemy_attacking = true;
instance_destroy();
exit;
}
else if (battle_enemy_name == "flier c")
{
global.action_1_selected_count_3 = 0;
global.action_2_selected_count_3 = 0;
if (global.action_3_selected_count_3 < 2)
global.action_3_selected_count_3 += 1;
global.enemy_attacking = true;
instance_destroy();
exit;
}
else if (battle_enemy_name == "sweet corn a")
{
global.action_1_selected_count = 0;
global.action_2_selected_count = 0;
if (global.action_3_selected_count < 1)
global.action_3_selected_count += 1;
if (global.item_gift != "Nothing")
global.enemy_sparing = true;
global.enemy_attacking = true;
instance_destroy();
exit;
}
else if (battle_enemy_name == "sweet corn b")
{
global.action_1_selected_count_2 = 0;
global.action_2_selected_count_2 = 0;
if (global.action_3_selected_count_2 < 1)
global.action_3_selected_count_2 += 1;
if (global.item_gift != "Nothing")
global.enemy_sparing_2 = true;
global.enemy_attacking = true;
instance_destroy();
exit;
}
else if (battle_enemy_name == "crispy scroll a")
{
global.action_1_selected_count = 0;
global.action_2_selected_count = 0;
if (global.action_3_selected_count < 1)
global.action_3_selected_count += 1;
global.enemy_attacking = true;
instance_destroy();
exit;
}
else if (battle_enemy_name == "rorrim a")
{
global.action_1_selected_count = 0;
global.action_2_selected_count = 0;
if (global.action_3_selected_count < 2)
global.action_3_selected_count += 1;
if (!global.enemy_sparing)
{
global.action_2_important = true;
global.action_2_color = 65535;
}
global.enemy_attacking = true;
... () |
2 |
{ |
3 |
var event_check = false; |
4 |
if (game_mode == "customs") |
5 |
{ |
6 |
if (battle_enemy_name == "craniex") |
7 |
{ |
8 |
global.action_1_selected_count = 0; |
9 |
global.action_2_selected_count = 0; |
10 |
global.action_3_selected_count += 1; |
11 |
global.enemy_sparing = false; |
12 |
global.enemy_attacking = true; |
13 |
instance_destroy(); |
14 |
exit; |
15 |
} |
16 |
else if (battle_enemy_name == "ms mettaton") |
17 |
{ |
18 |
global.enemy_sparing = false; |
19 |
global.enemy_attacking = true; |
20 |
instance_destroy(); |
21 |
exit; |
22 |
} |
23 |
} |
24 |
else if (game_mode == "yellow") |
25 |
{ |
26 |
if (battle_enemy_name == "flier a") |
27 |
{ |
28 |
global.action_1_selected_count = 0; |
29 |
global.action_2_selected_count = 0; |
30 |
if (global.action_3_selected_count < 2) |
31 |
global.action_3_selected_count += 1; |
32 |
global.enemy_attacking = true; |
33 |
instance_destroy(); |
34 |
exit; |
35 |
} |
36 |
else if (battle_enemy_name == "flier b") |
37 |
{ |
38 |
global.action_1_selected_count_2 = 0; |
39 |
global.action_2_selected_count_2 = 0; |
40 |
if (global.action_3_selected_count_2 < 2) |
41 |
global.action_3_selected_count_2 += 1; |
42 |
global.enemy_attacking = true; |
43 |
instance_destroy(); |
44 |
exit; |
45 |
} |
46 |
else if (battle_enemy_name == "flier c") |
47 |
{ |
48 |
global.action_1_selected_count_3 = 0; |
49 |
global.action_2_selected_count_3 = 0; |
50 |
if (global.action_3_selected_count_3 < 2) |
51 |
global.action_3_selected_count_3 += 1; |
52 |
global.enemy_attacking = true; |
53 |
instance_destroy(); |
54 |
exit; |
55 |
} |
56 |
else if (battle_enemy_name == "sweet corn a") |
57 |
{ |
58 |
global.action_1_selected_count = 0; |
59 |
global.action_2_selected_count = 0; |
60 |
if (global.action_3_selected_count < 1) |
61 |
global.action_3_selected_count += 1; |
62 |
if (global.item_gift != "Nothing") |
63 |
global.enemy_sparing = true; |
64 |
global.enemy_attacking = true; |
65 |
instance_destroy(); |
66 |
exit; |
67 |
} |
68 |
else if (battle_enemy_name == "sweet corn b") |
69 |
{ |
70 |
global.action_1_selected_count_2 = 0; |
71 |
global.action_2_selected_count_2 = 0; |
72 |
if (global.action_3_selected_count_2 < 1) |
73 |
global.action_3_selected_count_2 += 1; |
74 |
if (global.item_gift != "Nothing") |
75 |
global.enemy_sparing_2 = true; |
76 |
global.enemy_attacking = true; |
77 |
instance_destroy(); |
78 |
exit; |
79 |
} |
80 |
else if (battle_enemy_name == "crispy scroll a") |
81 |
{ |
82 |
global.action_1_selected_count = 0; |
83 |
global.action_2_selected_count = 0; |
84 |
if (global.action_3_selected_count < 1) |
85 |
global.action_3_selected_count += 1; |
86 |
global.enemy_attacking = true; |
87 |
instance_destroy(); |
88 |
exit; |
89 |
} |
90 |
else if (battle_enemy_name == "rorrim a") |
91 |
{ |
92 |
global.action_1_selected_count = 0; |
93 |
global.action_2_selected_count = 0; |
94 |
if (global.action_3_selected_count < 2) |
95 |
global.action_3_selected_count += 1; |
96 |
if (!global.enemy_sparing) |
97 |
{ |
98 |
global.action_2_important = true; |
99 |
global.action_2_color = 65535; |
100 |
} |
101 |
global.enemy_attacking = true; |
102 |
instance_destroy(); |
103 |
exit; |
104 |
} |
105 |
else if (battle_enemy_name == "decibat") |
106 |
{ |
107 |
if (global.enemy_sparing == false && (global.action_1_selected_count + global.action_3_selected_count) < 6) |
108 |
global.action_3_selected_count += 1; |
109 |
if (global.enemy_sparing == false) |
110 |
global.action_2_selected_count = 0; |
111 |
if (global.enemy_sparing == true && global.enemy_low_hp == false) |
112 |
{ |
113 |
script_execute(scr_start_enemy_sparing_decibat); |
114 |
instance_destroy(); |
115 |
exit; |
116 |
} |
117 |
audio_sound_gain(mus_decibat_yellow, 1, 1500); |
118 |
if ((global.action_1_selected_count + global.action_3_selected_count) == 6 && global.enemy_low_hp == false) |
119 |
global.important_cutscene = true; |
120 |
else |
121 |
global.enemy_attacking = true; |
122 |
instance_destroy(); |
123 |
exit; |
124 |
} |
125 |
else if (battle_enemy_name == "micro froggit") |
126 |
{ |
127 |
if (global.action_1_selected_count == 0) |
128 |
global.action_2_selected_count = 0; |
129 |
if (global.action_3_selected_count < 1) |
130 |
global.action_3_selected_count += 1; |
131 |
if (global.action_3_selected_count == 1) |
132 |
global.important_cutscene = true; |
133 |
else |
134 |
global.enemy_attacking = true; |
135 |
instance_destroy(); |
136 |
exit; |
137 |
} |
138 |
else if (battle_enemy_name == "insomnitot a") |
139 |
{ |
140 |
global.action_1_selected_count = 0; |
141 |
global.action_2_selected_count = 0; |
142 |
if (global.action_3_selected_count < 1) |
143 |
global.action_3_selected_count += 1; |
144 |
if (global.enemy_sparing == true && global.enemy_low_hp == false) |
145 |
{ |
146 |
if (global.battle_enemy_name == "insomnitot solo") |
147 |
{ |
148 |
script_execute(scr_start_enemy_no_attack_insomnitot_solo); |
149 |
} |
150 |
else if (global.battle_enemy_name == "insomnitot duo") |
151 |
{ |
152 |
if ((global.enemy_sparing_2 == true && global.enemy_low_hp_2 == false) || (global.enemy_dead_2 + global.enemy_spared_2) >= 1) |
153 |
script_execute(scr_start_enemy_no_attack_insomnitot_duo); |
154 |
else |
155 |
global.enemy_attacking = true; |
156 |
} |
157 |
else |
158 |
{ |
159 |
global.enemy_attacking = true; |
160 |
} |
161 |
} |
162 |
else |
163 |
{ |
164 |
global.enemy_attacking = true; |
165 |
} |
166 |
instance_destroy(); |
167 |
exit; |
168 |
} |
169 |
else if (battle_enemy_name == "insomnitot b") |
170 |
{ |
171 |
global.action_1_selected_count_2 = 0; |
172 |
global.action_2_selected_count_2 = 0; |
173 |
if (global.action_3_selected_count_2 < 1) |
174 |
global.action_3_selected_count_2 += 1; |
175 |
if (global.enemy_sparing_2 == true && global.enemy_low_hp_2 == false) |
176 |
{ |
177 |
if (global.battle_enemy_name == "insomnitot duo") |
178 |
{ |
179 |
if ((global.enemy_sparing == true && global.enemy_low_hp == false) || (global.enemy_dead + global.enemy_spared) >= 1) |
180 |
script_execute(scr_start_enemy_no_attack_insomnitot_duo); |
181 |
else |
182 |
global.enemy_attacking = true; |
183 |
} |
184 |
else if (global.battle_enemy_name == "know cone insomnitot duo") |
185 |
{ |
186 |
if ((global.enemy_dead + global.enemy_spared) >= 1) |
187 |
script_execute(scr_start_enemy_no_attack_know_cone_insomnitot_duo); |
188 |
else |
189 |
global.enemy_attacking = true; |
190 |
} |
191 |
else |
192 |
{ |
193 |
global.enemy_attacking = true; |
194 |
} |
195 |
} |
196 |
else |
197 |
{ |
198 |
global.enemy_attacking = true; |
199 |
} |
200 |
instance_destroy(); |
201 |
exit; |
202 |
} |
203 |
else if (battle_enemy_name == "know cone a") |
204 |
{ |
205 |
global.action_1_selected_count = 0; |
206 |
global.action_2_selected_count = 0; |
207 |
if (global.action_3_selected_count < 1) |
208 |
global.action_3_selected_count += 1; |
209 |
global.enemy_attacking = true; |
210 |
instance_destroy(); |
211 |
exit; |
212 |
} |
213 |
else if (battle_enemy_name == "know cone b") |
214 |
{ |
215 |
global.action_1_selected_count_2 = 0; |
216 |
global.action_2_selected_count_2 = 0; |
217 |
if (global.action_3_selected_count_2 < 1) |
218 |
global.action_3_selected_count_2 += 1; |
219 |
global.enemy_attacking = true; |
220 |
instance_destroy(); |
221 |
exit; |
222 |
} |
223 |
else if (battle_enemy_name == "frostermit a") |
224 |
{ |
225 |
if (global.action_3_selected_count < 1) |
226 |
global.action_3_selected_count += 1; |
227 |
global.enemy_attacking = true; |
228 |
instance_destroy(); |
229 |
exit; |
230 |
} |
231 |
else if (battle_enemy_name == "trihecta") |
232 |
{ |
233 |
global.action_1_selected_count = 0; |
234 |
global.action_2_selected_count = 0; |
235 |
if (global.action_3_selected_count < 1) |
236 |
global.action_3_selected_count += 1; |
237 |
global.enemy_attacking = true; |
238 |
instance_destroy(); |
239 |
exit; |
240 |
} |
241 |
else if (battle_enemy_name == "tri") |
242 |
{ |
243 |
global.action_1_selected_count = 0; |
244 |
global.action_2_selected_count = 0; |
245 |
if (global.action_3_selected_count < 1) |
246 |
global.action_3_selected_count += 1; |
247 |
global.enemy_attacking = true; |
248 |
instance_destroy(); |
249 |
exit; |
250 |
} |
251 |
else if (battle_enemy_name == "hec") |
252 |
{ |
253 |
global.action_1_selected_count_2 = 0; |
254 |
global.action_2_selected_count_2 = 0; |
255 |
if (global.action_3_selected_count_2 < 1) |
256 |
global.action_3_selected_count_2 += 1; |
257 |
global.enemy_attacking = true; |
258 |
instance_destroy(); |
259 |
exit; |
260 |
} |
261 |
else if (battle_enemy_name == "ta") |
262 |
{ |
263 |
if (global.action_3_selected_count_3 < 1) |
264 |
global.action_3_selected_count_3 += 1; |
265 |
global.enemy_attacking = true; |
266 |
instance_destroy(); |
267 |
exit; |
268 |
} |
269 |
else if (battle_enemy_name == "martlet pacifist") |
270 |
{ |
271 |
if (global.action_3_selected_count < 2) |
272 |
global.action_3_selected_count += 1; |
273 |
event_check = true; |
274 |
} |
275 |
else if (battle_enemy_name == "dunebud a") |
276 |
{ |
277 |
global.action_1_selected_count = 0; |
278 |
global.action_2_selected_count = 0; |
279 |
if (global.action_3_selected_count < 2) |
280 |
global.action_3_selected_count += 1; |
281 |
if (global.action_3_selected_count == 2) |
282 |
{ |
283 |
if (global.enemy_low_hp == false) |
284 |
{ |
285 |
with (obj_dunebud_a) |
286 |
{ |
287 |
if (object_index != obj_dunebud_b) |
288 |
{ |
289 |
sinking_away = true; |
290 |
sprite_index = spr_dunebud_sink; |
291 |
image_speed = image_speed_sink; |
292 |
image_index = 0; |
293 |
image_xscale = 1; |
294 |
image_yscale = 1; |
295 |
} |
296 |
} |
297 |
} |
298 |
else |
299 |
{ |
300 |
global.enemy_attacking = true; |
301 |
} |
302 |
} |
303 |
if (global.action_3_selected_count != 2) |
304 |
global.enemy_attacking = true; |
305 |
instance_destroy(); |
306 |
exit; |
307 |
} |
308 |
else if (battle_enemy_name == "dunebud b") |
309 |
{ |
310 |
global.action_1_selected_count_2 = 0; |
311 |
global.action_2_selected_count_2 = 0; |
312 |
if (global.action_3_selected_count_2 < 2) |
313 |
global.action_3_selected_count_2 += 1; |
314 |
if (global.action_3_selected_count_2 == 2) |
315 |
{ |
316 |
if (global.enemy_low_hp_2 == false) |
317 |
{ |
318 |
with (obj_dunebud_b) |
319 |
{ |
320 |
sinking_away = true; |
321 |
sprite_index = spr_dunebud_sink; |
322 |
image_speed = image_speed_sink; |
323 |
image_index = 0; |
324 |
image_xscale = 1; |
325 |
image_yscale = 1; |
326 |
} |
327 |
} |
328 |
else |
329 |
{ |
330 |
global.enemy_attacking = true; |
331 |
} |
332 |
} |
333 |
if (global.action_3_selected_count_2 != 2) |
334 |
global.enemy_attacking = true; |
335 |
instance_destroy(); |
336 |
exit; |
337 |
} |
338 |
else if (battle_enemy_name == "slither a") |
339 |
{ |
340 |
global.action_1_selected_count = 0; |
341 |
global.action_2_selected_count = 0; |
342 |
if (global.action_3_selected_count < 2) |
343 |
global.action_3_selected_count += 1; |
344 |
if (global.action_3_selected_count >= 2) |
345 |
global.enemy_sparing = true; |
346 |
global.enemy_attacking = true; |
347 |
instance_destroy(); |
348 |
exit; |
349 |
} |
350 |
else if (battle_enemy_name == "slither b") |
351 |
{ |
352 |
global.action_1_selected_count_2 = 0; |
353 |
global.action_2_selected_count_2 = 0; |
354 |
if (global.action_3_selected_count_2 < 2) |
355 |
global.action_3_selected_count_2 += 1; |
356 |
if (global.action_3_selected_count_2 >= 2) |
357 |
{ |
358 |
global.action_3_selected_count_2 = 0; |
359 |
global.enemy_sparing_2 = true; |
360 |
} |
361 |
global.enemy_attacking = true; |
362 |
instance_destroy(); |
363 |
exit; |
364 |
} |
365 |
else if (battle_enemy_name == "bowll a") |
366 |
{ |
367 |
global.action_1_selected_count = 0; |
368 |
global.action_2_selected_count = 0; |
369 |
if (global.action_3_selected_count < 2) |
370 |
global.action_3_selected_count += 1; |
371 |
global.enemy_attacking = true; |
372 |
instance_destroy(); |
373 |
exit; |
374 |
} |
375 |
else if (battle_enemy_name == "el bailador") |
376 |
{ |
377 |
global.action_1_selected_count = 0; |
378 |
global.action_2_selected_count = 0; |
379 |
if (global.action_3_selected_count < 1) |
380 |
global.action_3_selected_count += 1; |
381 |
global.enemy_attacking = true; |
382 |
instance_destroy(); |
383 |
exit; |
384 |
} |
385 |
else if (battle_enemy_name == "flower girls") |
386 |
{ |
387 |
global.action_1_selected_count = 0; |
388 |
global.action_2_selected_count = 0; |
389 |
if (global.action_3_selected_count < 1) |
390 |
global.action_3_selected_count += 1; |
391 |
global.enemy_attacking = true; |
392 |
instance_destroy(); |
393 |
exit; |
394 |
} |
395 |
else if (battle_enemy_name == "ceroba genocide") |
396 |
{ |
397 |
global.enemy_attacking = true; |
398 |
instance_destroy(); |
399 |
} |
400 |
else if (battle_enemy_name == "starlo") |
401 |
{ |
402 |
global.enemy_attacking = true; |
403 |
instance_destroy(); |
404 |
} |
405 |
else if (battle_enemy_name == "tellyvis a") |
406 |
{ |
407 |
if (global.action_3_selected_count < 1) |
408 |
global.action_3_selected_count += 1; |
409 |
global.enemy_attacking = true; |
410 |
instance_destroy(); |
411 |
exit; |
412 |
} |
413 |
else if (battle_enemy_name == "jandroid a") |
414 |
{ |
415 |
if (global.action_3_selected_count < 1) |
416 |
global.action_3_selected_count += 1; |
417 |
global.action_2_selected_count = 0; |
418 |
global.action_1_selected_count = 0; |
419 |
global.enemy_attacking = true; |
420 |
instance_destroy(); |
421 |
exit; |
422 |
} |
423 |
else if (battle_enemy_name == "jandroid b") |
424 |
{ |
425 |
if (global.action_3_selected_count_2 < 1) |
426 |
global.action_3_selected_count_2 += 1; |
427 |
global.action_2_selected_count_2 = 0; |
428 |
global.action_1_selected_count_2 = 0; |
429 |
global.enemy_attacking = true; |
430 |
instance_destroy(); |
431 |
exit; |
432 |
} |
433 |
else if (battle_enemy_name == "goosic a") |
434 |
{ |
435 |
if (global.action_3_selected_count < 1) |
436 |
global.action_3_selected_count += 1; |
437 |
global.enemy_attacking = true; |
438 |
instance_destroy(); |
439 |
exit; |
440 |
} |
441 |
else if (battle_enemy_name == "goosic b") |
442 |
{ |
443 |
if (global.action_3_selected_count_2 < 1) |
444 |
global.action_3_selected_count_2 += 1; |
445 |
global.enemy_attacking = true; |
446 |
instance_destroy(); |
447 |
exit; |
448 |
} |
449 |
else if (battle_enemy_name == "sousborg") |
450 |
{ |
451 |
if (global.enemy_mode == 2) |
452 |
{ |
453 |
global.enemy_mode = 3; |
454 |
global.enemy_attack = "Sousborg Season"; |
455 |
global.action_amount = 0; |
456 |
} |
457 |
else |
458 |
{ |
459 |
global.enemy_attack = "Sousborg Flip"; |
460 |
} |
461 |
global.enemy_attacking = true; |
462 |
instance_destroy(); |
463 |
exit; |
464 |
} |
465 |
else if (battle_enemy_name == "axis") |
466 |
{ |
467 |
global.enemy_attacking = true; |
468 |
instance_destroy(); |
469 |
} |
470 |
else if (battle_enemy_name == "axis genocide") |
471 |
{ |
472 |
global.enemy_attacking = true; |
473 |
instance_destroy(); |
474 |
} |
475 |
else if (battle_enemy_name == "macro froggit") |
476 |
{ |
477 |
global.action_3_selected_count += 1; |
478 |
global.enemy_attacking = true; |
479 |
instance_destroy(); |
480 |
} |
481 |
else if (battle_enemy_name == "guardener") |
482 |
{ |
483 |
global.action_3_selected_count += 1; |
484 |
global.enemy_attacking = true; |
485 |
instance_destroy(); |
486 |
exit; |
487 |
} |
488 |
else if (battle_enemy_name == "ed" || battle_enemy_name == "ace" || battle_enemy_name == "mooch" || battle_enemy_name == "moray") |
489 |
{ |
490 |
global.enemy_attacking = true; |
491 |
instance_destroy(); |
492 |
} |
493 |
else if (battle_enemy_name == "flowey") |
494 |
{ |
495 |
if (global.flowey_act[2] == 4) |
496 |
{ |
497 |
audio_play_sound(snd_heal, 1, 0); |
498 |
if (global.current_hp_self < global.max_hp_self) |
499 |
{ |
500 |
global.current_hp_self += floor(global.max_hp_self * 0.3); |
501 |
if (global.current_hp_self > global.max_hp_self) |
502 |
global.current_hp_self = global.max_hp_self; |
503 |
} |
504 |
global.enemy_attacking = true; |
505 |
} |
506 |
else |
507 |
{ |
508 |
instance_create_depth(0, 0, -100, obj_flowey_battle_screen_glitch_fight); |
509 |
with (obj_heart_battle_menu) |
510 |
event_user(0); |
511 |
} |
512 |
instance_destroy(); |
513 |
} |
514 |
else if (battle_enemy_name == "ceroba") |
515 |
{ |
516 |
if (!instance_exists(obj_ceroba_pacifist_act_helper) || obj_ceroba_pacifist_act_helper.can_skip == true) |
517 |
{ |
518 |
global.action_3_selected_count += 1; |
519 |
global.enemy_attacking = true; |
520 |
instance_destroy(); |
521 |
} |
522 |
exit; |
523 |
} |
524 |
} |
525 |
if (event_check == true) |
526 |
{ |
527 |
var act_number = global.act_number; |
528 |
switch (act_number) |
529 |
{ |
530 |
case 1: |
531 |
scr_determine_special_effect_enemy("Action 3"); |
532 |
break; |
533 |
case 2: |
534 |
scr_determine_special_effect_enemy("Action 3 2"); |
535 |
break; |
536 |
case 3: |
537 |
scr_determine_special_effect_enemy("Action 3 3"); |
538 |
break; |
539 |
} |
540 |
global.important_cutscene = script_execute(scr_determine_important_cutscene_attacking); |
541 |
global.can_attack = script_execute(scr_determine_can_attack_attacking); |
542 |
if (global.important_cutscene == false && global.can_attack == true) |
543 |
global.enemy_attacking = true; |
544 |
if (global.can_attack == false) |
545 |
{ |
546 |
with (obj_dialogue_box_battle) |
547 |
no_loop_can_attack = false; |
548 |
} |
549 |
instance_destroy(); |
550 |
exit; |
551 |
} |
552 |
} |