Undertale Yellow script viewer

← back to main script listing

gml_GlobalScript_scr_determine_enemy_attack_yellow

(view raw script w/o annotations or w/e)
1
function scr_determine_enemy_attack_yellow
scr_determine_enemy_attack_yellow

function scr_determine_enemy_attack_yellow() { if (live_call()) return global.live_result; var determine_attack_priority = global.determine_attack_priority; var battle_enemy_name = global.battle_enemy_name; var turns_passed = global.turns_passed; var enemy_dead = global.enemy_dead; var enemy_spared = global.enemy_spared; var enemy_dead_2, enemy_spared_2; if (global.enemy_count >= 2) { enemy_dead_2 = global.enemy_dead_2; enemy_spared_2 = global.enemy_spared_2; } var enemy_dead_3; if (global.enemy_count >= 3) { enemy_dead_3 = global.enemy_dead_3; var enemy_spared_3 = global.enemy_spared_3; } if (battle_enemy_name == "flier solo") { random_range_value = irandom_range(0, 2); if (random_range_value == 0) { global.enemy_attack = "Flier Flies"; global.soul_mode = "Red"; global.image_alpha_enemy_attacking_immunity = false; } else if (random_range_value == 1) { global.enemy_attack = "Flier Swarm"; global.soul_mode = "Red"; global.image_alpha_enemy_attacking_immunity = false; } else if (random_range_value == 2) { global.enemy_attack = "Flier Fire"; global.soul_mode = "Red"; global.image_alpha_enemy_attacking_immunity = false; } } else if (battle_enemy_name == "flier trio") { if ((enemy_dead + enemy_spared + enemy_dead_2 + enemy_spared_2 + enemy_dead_3 + enemy_spared_2) < 2) { random_range_value = irandom_range(0, 2); if (random_range_value == 0) { global.enemy_attack = "Flier Flies Double"; global.soul_mode = "Red"; global.image_alpha_enemy_attacking_immunity = false; } else if (random_range_value == 1) { global.enemy_attack = "Flier Swarm Double"; global.soul_mode = "Red"; global.image_alpha_enemy_attacking_immunity = false; } else if (random_range_value == 2) { global.enemy_attack = "Flier Fire Flies"; global.soul_mode = "Red"; global.image_alpha_enemy_attacking_immunity = false; } } else { random_range_value = irandom_range(0, 2); if (random_range_value == 0) { global.enemy_attack = "Flier Flies"; global.soul_mode = "Red"; global.image_alpha_enemy_attacking_immunity = false; } else if (random_range_value == 1) { global.enemy_attack = "Flier Swarm"; global.soul_mode = "Red"; global.image_alpha_enemy_attacking_immunity = false; } else if (random_range_value == 2) { global.enemy_attack = "Flier Fire"; global.soul_mode = "Red"; global.image_alpha_enemy_attacking_immunity = false; } } } else if (battle_enemy_name == "penilla solo") { random_range_value = irandom_range(0, 1); if (random_range_value == 0) { global.enemy_attack = "Penilla Drawing"; global.soul_mode = "Red"; global.image_alpha_enemy_attacking_immunity = false; } else if (random_range_value == 1) { ...
()
2
{
3
    if (live_call())
4
        return global.live_result;
5
    var determine_attack_priority = global.determine_attack_priority;
6
    var battle_enemy_name = global.battle_enemy_name;
7
    var turns_passed = global.turns_passed;
8
    var enemy_dead = global.enemy_dead;
9
    var enemy_spared = global.enemy_spared;
10
    var enemy_dead_2, enemy_spared_2;
11
    if (global.enemy_count >= 2)
12
    {
13
        enemy_dead_2 = global.enemy_dead_2;
14
        enemy_spared_2 = global.enemy_spared_2;
15
    }
16
    var enemy_dead_3;
17
    if (global.enemy_count >= 3)
18
    {
19
        enemy_dead_3 = global.enemy_dead_3;
20
        var enemy_spared_3 = global.enemy_spared_3;
21
    }
22
    if (battle_enemy_name == "flier solo")
23
    {
24
        random_range_value = irandom_range(0, 2);
25
        if (random_range_value == 0)
26
        {
27
            global.enemy_attack = "Flier Flies";
28
            global.soul_mode = "Red";
29
            global.image_alpha_enemy_attacking_immunity = false;
30
        }
31
        else if (random_range_value == 1)
32
        {
33
            global.enemy_attack = "Flier Swarm";
34
            global.soul_mode = "Red";
35
            global.image_alpha_enemy_attacking_immunity = false;
36
        }
37
        else if (random_range_value == 2)
38
        {
39
            global.enemy_attack = "Flier Fire";
40
            global.soul_mode = "Red";
41
            global.image_alpha_enemy_attacking_immunity = false;
42
        }
43
    }
44
    else if (battle_enemy_name == "flier trio")
45
    {
46
        if ((enemy_dead + enemy_spared + enemy_dead_2 + enemy_spared_2 + enemy_dead_3 + enemy_spared_2) < 2)
47
        {
48
            random_range_value = irandom_range(0, 2);
49
            if (random_range_value == 0)
50
            {
51
                global.enemy_attack = "Flier Flies Double";
52
                global.soul_mode = "Red";
53
                global.image_alpha_enemy_attacking_immunity = false;
54
            }
55
            else if (random_range_value == 1)
56
            {
57
                global.enemy_attack = "Flier Swarm Double";
58
                global.soul_mode = "Red";
59
                global.image_alpha_enemy_attacking_immunity = false;
60
            }
61
            else if (random_range_value == 2)
62
            {
63
                global.enemy_attack = "Flier Fire Flies";
64
                global.soul_mode = "Red";
65
                global.image_alpha_enemy_attacking_immunity = false;
66
            }
67
        }
68
        else
69
        {
70
            random_range_value = irandom_range(0, 2);
71
            if (random_range_value == 0)
72
            {
73
                global.enemy_attack = "Flier Flies";
74
                global.soul_mode = "Red";
75
                global.image_alpha_enemy_attacking_immunity = false;
76
            }
77
            else if (random_range_value == 1)
78
            {
79
                global.enemy_attack = "Flier Swarm";
80
                global.soul_mode = "Red";
81
                global.image_alpha_enemy_attacking_immunity = false;
82
            }
83
            else if (random_range_value == 2)
84
            {
85
                global.enemy_attack = "Flier Fire";
86
                global.soul_mode = "Red";
87
                global.image_alpha_enemy_attacking_immunity = false;
88
            }
89
        }
90
    }
91
    else if (battle_enemy_name == "penilla solo")
92
    {
93
        random_range_value = irandom_range(0, 1);
94
        if (random_range_value == 0)
95
        {
96
            global.enemy_attack = "Penilla Drawing";
97
            global.soul_mode = "Red";
98
            global.image_alpha_enemy_attacking_immunity = false;
99
        }
100
        else if (random_range_value == 1)
101
        {
102
            global.enemy_attack = "Penilla Lines";
103
            global.soul_mode = "Red";
104
            global.image_alpha_enemy_attacking_immunity = false;
105
        }
106
    }
107
    else if (battle_enemy_name == "flier penilla duo")
108
    {
109
        if ((enemy_dead + enemy_spared + enemy_dead_2 + enemy_spared_2) < 1)
110
        {
111
            global.enemy_attack = "Flier Flies Drawing";
112
            global.soul_mode = "Red";
113
            global.image_alpha_enemy_attacking_immunity = false;
114
        }
115
        else if ((enemy_dead_2 + enemy_spared_2) >= 1)
116
        {
117
            random_range_value = irandom_range(0, 1);
118
            if (random_range_value == 0)
119
            {
120
                global.enemy_attack = "Flier Flies";
121
                global.soul_mode = "Red";
122
                global.image_alpha_enemy_attacking_immunity = false;
123
            }
124
            else if (random_range_value == 1)
125
            {
126
                global.enemy_attack = "Flier Fire";
127
                global.soul_mode = "Red";
128
                global.image_alpha_enemy_attacking_immunity = false;
129
            }
130
        }
131
        else if ((enemy_dead + enemy_spared) >= 1)
132
        {
133
            random_range_value = irandom_range(0, 1);
134
            if (random_range_value == 0)
135
            {
136
                global.enemy_attack = "Penilla Drawing";
137
                global.soul_mode = "Red";
138
                global.image_alpha_enemy_attacking_immunity = false;
139
            }
140
            else if (random_range_value == 1)
141
            {
142
                global.enemy_attack = "Penilla Lines";
143
                global.soul_mode = "Red";
144
                global.image_alpha_enemy_attacking_immunity = false;
145
            }
146
        }
147
    }
148
    else if (battle_enemy_name == "sweet corn solo")
149
    {
150
        random_range_value = irandom_range(0, 2);
151
        if (random_range_value == 0)
152
        {
153
            global.enemy_attack = "Candy Corn";
154
            global.soul_mode = "Red";
155
            global.image_alpha_enemy_attacking_immunity = false;
156
        }
157
        else if (random_range_value == 1)
158
        {
159
            global.enemy_attack = "Spear Corn";
160
            global.soul_mode = "Red";
161
            global.image_alpha_enemy_attacking_immunity = false;
162
        }
163
        else if (random_range_value == 2)
164
        {
165
            global.enemy_attack = "Homing Corn";
166
            global.soul_mode = "Red";
167
            global.image_alpha_enemy_attacking_immunity = false;
168
        }
169
    }
170
    else if (battle_enemy_name == "sweet corn duo")
171
    {
172
        if ((enemy_dead + enemy_spared + enemy_dead_2 + enemy_spared_2) < 1)
173
        {
174
            random_range_value = irandom_range(0, 1);
175
            if (random_range_value == 0)
176
            {
177
                global.enemy_attack = "Candy Spear Corn";
178
                global.soul_mode = "Red";
179
                global.image_alpha_enemy_attacking_immunity = false;
180
            }
181
            else if (random_range_value == 1)
182
            {
183
                global.enemy_attack = "Homing Spear Corn";
184
                global.soul_mode = "Red";
185
                global.image_alpha_enemy_attacking_immunity = false;
186
            }
187
        }
188
        else
189
        {
190
            random_range_value = irandom_range(0, 2);
191
            if (random_range_value == 0)
192
            {
193
                global.enemy_attack = "Candy Corn";
194
                global.soul_mode = "Red";
195
                global.image_alpha_enemy_attacking_immunity = false;
196
            }
197
            else if (random_range_value == 1)
198
            {
199
                global.enemy_attack = "Spear Corn";
200
                global.soul_mode = "Red";
201
                global.image_alpha_enemy_attacking_immunity = false;
202
            }
203
            else if (random_range_value == 2)
204
            {
205
                global.enemy_attack = "Homing Corn";
206
                global.soul_mode = "Red";
207
                global.image_alpha_enemy_attacking_immunity = false;
208
            }
209
        }
210
    }
211
    else if (battle_enemy_name == "sweet corn penilla duo")
212
    {
213
        if ((enemy_dead + enemy_spared + enemy_dead_2 + enemy_spared_2) < 1)
214
        {
215
            global.enemy_attack = "Drawing Spear Corn";
216
            global.soul_mode = "Red";
217
            global.image_alpha_enemy_attacking_immunity = false;
218
        }
219
        else if ((enemy_dead_2 + enemy_spared_2) >= 1)
220
        {
221
            random_range_value = irandom_range(0, 2);
222
            if (random_range_value == 0)
223
            {
224
                global.enemy_attack = "Candy Corn";
225
                global.soul_mode = "Red";
226
                global.image_alpha_enemy_attacking_immunity = false;
227
            }
228
            else if (random_range_value == 1)
229
            {
230
                global.enemy_attack = "Spear Corn";
231
                global.soul_mode = "Red";
232
                global.image_alpha_enemy_attacking_immunity = false;
233
            }
234
            else if (random_range_value == 2)
235
            {
236
                global.enemy_attack = "Homing Corn";
237
                global.soul_mode = "Red";
238
                global.image_alpha_enemy_attacking_immunity = false;
239
            }
240
        }
241
        else if ((enemy_dead + enemy_spared) >= 1)
242
        {
243
            random_range_value = irandom_range(0, 1);
244
            if (random_range_value == 0)
245
            {
246
                global.enemy_attack = "Penilla Drawing";
247
                global.soul_mode = "Red";
248
                global.image_alpha_enemy_attacking_immunity = false;
249
            }
250
            else if (random_range_value == 1)
251
            {
252
                global.enemy_attack = "Penilla Lines";
253
                global.soul_mode = "Red";
254
                global.image_alpha_enemy_attacking_immunity = false;
255
            }
256
        }
257
    }
258
    else if (battle_enemy_name == "crispy scroll solo")
259
    {
260
        random_range_value = irandom_range(0, 2);
261
        if (random_range_value == 0)
262
        {
263
            global.enemy_attack = "Crispy Slash";
264
            global.soul_mode = "Red";
265
            global.image_alpha_enemy_attacking_immunity = false;
266
        }
267
        else if (random_range_value == 1)
268
        {
269
            global.enemy_attack = "Crispy Laser";
270
            global.soul_mode = "Red";
271
            global.image_alpha_enemy_attacking_immunity = false;
272
        }
273
        else if (random_range_value == 2)
274
        {
275
            global.enemy_attack = "Crispy Tub";
276
            global.soul_mode = "Red";
277
            global.image_alpha_enemy_attacking_immunity = false;
278
        }
279
    }
280
    else if (battle_enemy_name == "crispy scroll penilla duo")
281
    {
282
        if ((enemy_dead + enemy_spared + enemy_dead_2 + enemy_spared_2) < 1)
283
        {
284
            global.enemy_attack = "Crispy Slash Drawing";
285
            global.soul_mode = "Red";
286
            global.image_alpha_enemy_attacking_immunity = false;
287
        }
288
        else if ((enemy_dead_2 + enemy_spared_2) >= 1)
289
        {
290
            random_range_value = irandom_range(0, 2);
291
            if (random_range_value == 0)
292
            {
293
                global.enemy_attack = "Crispy Slash";
294
                global.soul_mode = "Red";
295
                global.image_alpha_enemy_attacking_immunity = false;
296
            }
297
            else if (random_range_value == 1)
298
            {
299
                global.enemy_attack = "Crispy Laser";
300
                global.soul_mode = "Red";
301
                global.image_alpha_enemy_attacking_immunity = false;
302
            }
303
            else if (random_range_value == 2)
304
            {
305
                global.enemy_attack = "Crispy Tub";
306
                global.soul_mode = "Red";
307
                global.image_alpha_enemy_attacking_immunity = false;
308
            }
309
        }
310
        else if ((enemy_dead + enemy_spared) >= 1)
311
        {
312
            random_range_value = irandom_range(0, 1);
313
            if (random_range_value == 0)
314
            {
315
                global.enemy_attack = "Penilla Drawing";
316
                global.soul_mode = "Red";
317
                global.image_alpha_enemy_attacking_immunity = false;
318
            }
319
            else if (random_range_value == 1)
320
            {
321
                global.enemy_attack = "Penilla Lines";
322
                global.soul_mode = "Red";
323
                global.image_alpha_enemy_attacking_immunity = false;
324
            }
325
        }
326
    }
327
    else if (battle_enemy_name == "rorrim solo")
328
    {
329
        random_range_value = irandom_range(0, 1);
330
        if (random_range_value == 0)
331
        {
332
            global.enemy_attack = "Rorrim Mirror";
333
            global.soul_mode = "Red";
334
            global.image_alpha_enemy_attacking_immunity = false;
335
        }
336
        else if (random_range_value == 1)
337
        {
338
            global.enemy_attack = "Rorrim Sparkle";
339
            global.soul_mode = "Red";
340
            global.image_alpha_enemy_attacking_immunity = false;
341
        }
342
    }
343
    else if (battle_enemy_name == "decibat")
344
    {
345
        if (turns_passed > 5)
346
        {
347
            global.turns_passed = 5;
348
            turns_passed = global.turns_passed;
349
        }
350
        if (turns_passed == 0)
351
        {
352
            global.enemy_attack = "Decibat Wave Blue";
353
            global.soul_mode = "Red";
354
            global.image_alpha_enemy_attacking_immunity = true;
355
        }
356
        else if (turns_passed == 1)
357
        {
358
            global.enemy_attack = "Decibat Wave Orange";
359
            global.soul_mode = "Red";
360
            global.image_alpha_enemy_attacking_immunity = true;
361
        }
362
        else if (turns_passed == 2)
363
        {
364
            global.enemy_attack = "Decibat Wave Multi";
365
            global.soul_mode = "Red";
366
            global.image_alpha_enemy_attacking_immunity = true;
367
        }
368
        else if (turns_passed == 3)
369
        {
370
            global.enemy_attack = "Decibat Wave Mini";
371
            global.soul_mode = "Red";
372
            global.image_alpha_enemy_attacking_immunity = true;
373
        }
374
        else if (turns_passed == 4)
375
        {
376
            global.enemy_attack = "Decibat Stalagmite";
377
            global.soul_mode = "Red";
378
            global.image_alpha_enemy_attacking_immunity = false;
379
        }
380
        else if (turns_passed == 5)
381
        {
382
            random_range_value = irandom_range(0, 2);
383
            if (random_range_value == 0)
384
            {
385
                global.enemy_attack = "Decibat Wave Multi";
386
                global.soul_mode = "Red";
387
                global.image_alpha_enemy_attacking_immunity = true;
388
            }
389
            else if (random_range_value == 1)
390
            {
391
                global.enemy_attack = "Decibat Wave Mini";
392
                global.soul_mode = "Red";
393
                global.image_alpha_enemy_attacking_immunity = true;
394
            }
395
            else if (random_range_value == 2)
396
            {
397
                global.enemy_attack = "Decibat Stalagmite";
398
                global.soul_mode = "Red";
399
                global.image_alpha_enemy_attacking_immunity = false;
400
            }
401
        }
402
    }
403
    else if (battle_enemy_name == "dalv")
404
    {
405
        if (turns_passed > 11)
406
        {
407
            global.turns_passed = 11;
408
            turns_passed = global.turns_passed;
409
        }
410
        if (global.determine_attack_priority == 1)
411
        {
412
            if (turns_passed <= 11)
413
            {
414
                if (global.enemy_attack == "Dalv Start" || global.enemy_attack == "Dalv Lightning Bolt")
415
                {
416
                    global.enemy_attack = "Dalv Lightning Vertical";
417
                    global.soul_mode = "Red";
418
                    global.image_alpha_enemy_attacking_immunity = false;
419
                }
420
                else if (global.enemy_attack == "Dalv Lightning Vertical")
421
                {
422
                    global.enemy_attack = "Dalv Lightning Dual";
423
                    global.soul_mode = "Red";
424
                    global.image_alpha_enemy_attacking_immunity = false;
425
                }
426
                else if (global.enemy_attack == "Dalv Lightning Dual")
427
                {
428
                    global.enemy_attack = "Dalv Lightning Balls";
429
                    global.soul_mode = "Red";
430
                    global.image_alpha_enemy_attacking_immunity = false;
431
                }
432
                else if (global.enemy_attack == "Dalv Lightning Balls")
433
                {
434
                    global.enemy_attack = "Dalv Lightning Shift";
435
                    global.soul_mode = "Red";
436
                    global.image_alpha_enemy_attacking_immunity = false;
437
                }
438
                else if (global.enemy_attack == "Dalv Lightning Shift")
439
                {
440
                    global.enemy_attack = "Dalv Lightning Spinner";
441
                    global.soul_mode = "Red";
442
                    global.image_alpha_enemy_attacking_immunity = false;
443
                }
444
                else if (global.enemy_attack == "Dalv Lightning Spinner")
445
                {
446
                    global.enemy_attack = "Dalv Lightning Bolt";
447
                    global.soul_mode = "Red";
448
                    global.image_alpha_enemy_attacking_immunity = true;
449
                }
450
            }
451
            if (turns_passed == 8)
452
            {
453
                var enemy_mode = global.enemy_mode;
454
                switch (enemy_mode)
455
                {
456
                    case 2:
457
                        global.enemy_sparing = true;
458
                        break;
459
                }
460
            }
461
            else if (turns_passed == 9 && global.enemy_mode == 1 && global.enemy_mode_gen == 0)
462
            {
463
                global.enemy_sparing = true;
464
            }
465
            else if (turns_passed == 10)
466
            {
467
                var enemy_mode = global.enemy_mode;
468
                switch (enemy_mode)
469
                {
470
                    case 0:
471
                        if (global.enemy_sparing == false && global.enemy_mode_gen == 0)
472
                            global.action_2_important = true;
473
                }
474
            }
475
        }
476
    }
477
    else if (battle_enemy_name == "micro froggit")
478
    {
479
        random_range_value = irandom_range(0, 1);
480
        if (random_range_value == 0)
481
        {
482
            global.enemy_attack = "Micro Fly";
483
            global.soul_mode = "Red";
484
            global.image_alpha_enemy_attacking_immunity = false;
485
        }
486
        else if (random_range_value == 1)
487
        {
488
            global.enemy_attack = "Micro Barrage";
489
            global.soul_mode = "Red";
490
            global.image_alpha_enemy_attacking_immunity = false;
491
        }
492
    }
493
    else if (battle_enemy_name == "insomnitot solo")
494
    {
495
        random_range_value = irandom_range(0, 2);
496
        if (random_range_value == 0)
497
        {
498
            global.enemy_attack = "Insomnitot Sheep";
499
            global.soul_mode = "Red";
500
            global.image_alpha_enemy_attacking_immunity = false;
501
        }
502
        else if (random_range_value == 1)
503
        {
504
            global.enemy_attack = "Insomnitot ZZZ";
505
            global.soul_mode = "Red";
506
            global.image_alpha_enemy_attacking_immunity = false;
507
        }
508
        else if (random_range_value == 2)
509
        {
510
            global.enemy_attack = "Insomnitot Stars";
511
            global.soul_mode = "Red";
512
            global.image_alpha_enemy_attacking_immunity = false;
513
        }
514
    }
515
    else if (battle_enemy_name == "insomnitot duo")
516
    {
517
        if ((enemy_dead + enemy_spared + enemy_dead_2 + enemy_spared_2) < 1 && !(global.enemy_sparing == true && global.enemy_low_hp == false) && !(global.enemy_sparing_2 == true && global.enemy_low_hp_2 == false))
518
        {
519
            random_range_value = 1;
520
            if (random_range_value == 0)
521
            {
522
                global.enemy_attack = "Insomnitot Sheep ZZZ";
523
                global.soul_mode = "Red";
524
                global.image_alpha_enemy_attacking_immunity = false;
525
            }
526
            else if (random_range_value == 1)
527
            {
528
                global.enemy_attack = "Insomnitot Sheep Stars";
529
                global.soul_mode = "Red";
530
                global.image_alpha_enemy_attacking_immunity = false;
531
            }
532
        }
533
        else
534
        {
535
            random_range_value = irandom_range(0, 2);
536
            if (random_range_value == 0)
537
            {
538
                global.enemy_attack = "Insomnitot Sheep";
539
                global.soul_mode = "Red";
540
                global.image_alpha_enemy_attacking_immunity = false;
541
            }
542
            else if (random_range_value == 1)
543
            {
544
                global.enemy_attack = "Insomnitot ZZZ";
545
                global.soul_mode = "Red";
546
                global.image_alpha_enemy_attacking_immunity = false;
547
            }
548
            else if (random_range_value == 2)
549
            {
550
                global.enemy_attack = "Insomnitot Stars";
551
                global.soul_mode = "Red";
552
                global.image_alpha_enemy_attacking_immunity = false;
553
            }
554
        }
555
    }
556
    else if (battle_enemy_name == "know cone solo")
557
    {
558
        random_range_value = irandom_range(0, 9);
559
        if (random_range_value >= 0 && random_range_value <= 2)
560
        {
561
            global.enemy_attack = "Know Cone Blueberries";
562
            global.soul_mode = "Red";
563
            global.image_alpha_enemy_attacking_immunity = false;
564
        }
565
        else if (random_range_value >= 3 && random_range_value <= 5)
566
        {
567
            global.enemy_attack = "Know Cone Oranges";
568
            global.soul_mode = "Red";
569
            global.image_alpha_enemy_attacking_immunity = false;
570
        }
571
        else if (random_range_value >= 6 && random_range_value <= 8)
572
        {
573
            global.enemy_attack = "Know Cone Cherries";
574
            global.soul_mode = "Red";
575
            global.image_alpha_enemy_attacking_immunity = false;
576
        }
577
        else if (random_range_value == 9)
578
        {
579
            global.enemy_attack = "Know Cone Fig";
580
            global.soul_mode = "Red";
581
            global.image_alpha_enemy_attacking_immunity = false;
582
        }
583
    }
584
    else if (battle_enemy_name == "know cone insomnitot duo")
585
    {
586
        if ((enemy_dead + enemy_spared + enemy_dead_2 + enemy_spared_2) < 1 && !(global.enemy_sparing_2 == true && global.enemy_low_hp_2 == false))
587
        {
588
            random_range_value = irandom_range(0, 1);
589
            if (random_range_value == 0)
590
            {
591
                global.enemy_attack = "Know Cone Blueberries ZZZ";
592
                global.soul_mode = "Red";
593
                global.image_alpha_enemy_attacking_immunity = false;
594
            }
595
            else if (random_range_value == 1)
596
            {
597
                global.enemy_attack = "Know Cone Oranges Stars";
598
                global.soul_mode = "Red";
599
                global.image_alpha_enemy_attacking_immunity = false;
600
            }
601
        }
602
        else if ((enemy_dead_2 + enemy_spared_2) >= 1 || (global.enemy_sparing_2 == true && global.enemy_low_hp_2 == false))
603
        {
604
            random_range_value = irandom_range(0, 9);
605
            if (random_range_value >= 0 && random_range_value <= 2)
606
            {
607
                global.enemy_attack = "Know Cone Blueberries";
608
                global.soul_mode = "Red";
609
                global.image_alpha_enemy_attacking_immunity = false;
610
            }
611
            else if (random_range_value >= 3 && random_range_value <= 5)
612
            {
613
                global.enemy_attack = "Know Cone Oranges";
614
                global.soul_mode = "Red";
615
                global.image_alpha_enemy_attacking_immunity = false;
616
            }
617
            else if (random_range_value >= 6 && random_range_value <= 8)
618
            {
619
                global.enemy_attack = "Know Cone Cherries";
620
                global.soul_mode = "Red";
621
                global.image_alpha_enemy_attacking_immunity = false;
622
            }
623
            else if (random_range_value == 9)
624
            {
625
                global.enemy_attack = "Know Cone Fig";
626
                global.soul_mode = "Red";
627
                global.image_alpha_enemy_attacking_immunity = false;
628
            }
629
        }
630
        else if ((enemy_dead + enemy_spared) >= 1)
631
        {
632
            random_range_value = irandom_range(0, 2);
633
            if (random_range_value == 0)
634
            {
635
                global.enemy_attack = "Insomnitot Sheep";
636
                global.soul_mode = "Red";
637
                global.image_alpha_enemy_attacking_immunity = false;
638
            }
639
            else if (random_range_value == 1)
640
            {
641
                global.enemy_attack = "Insomnitot ZZZ";
642
                global.soul_mode = "Red";
643
                global.image_alpha_enemy_attacking_immunity = false;
644
            }
645
            else if (random_range_value == 2)
646
            {
647
                global.enemy_attack = "Insomnitot Stars";
648
                global.soul_mode = "Red";
649
                global.image_alpha_enemy_attacking_immunity = false;
650
            }
651
        }
652
    }
653
    else if (battle_enemy_name == "frostermit solo")
654
    {
655
        var enemy_mode = global.enemy_mode;
656
        switch (enemy_mode)
657
        {
658
            case 0:
659
                random_range_value = irandom_range(0, 1);
660
                break;
661
            case 1:
662
                random_range_value = irandom_range(0, 2);
663
                break;
664
            default:
665
                random_range_value = irandom_range(0, 1);
666
        }
667
        if (random_range_value == 0)
668
        {
669
            global.enemy_attack = "Frostermit Snowflakes";
670
            global.soul_mode = "Red";
671
            global.image_alpha_enemy_attacking_immunity = false;
672
        }
673
        else if (random_range_value == 1)
674
        {
675
            global.enemy_attack = "Frostermit Ice Cubes";
676
            global.soul_mode = "Red";
677
            global.image_alpha_enemy_attacking_immunity = false;
678
        }
679
        else if (random_range_value == 2)
680
        {
681
            global.enemy_attack = "Frostermit Pinchers";
682
            global.soul_mode = "Red";
683
            global.image_alpha_enemy_attacking_immunity = false;
684
        }
685
    }
686
    else if (battle_enemy_name == "frostermit know cone duo")
687
    {
688
        if ((enemy_dead + enemy_spared + enemy_dead_2 + enemy_spared_2) < 1)
689
        {
690
            random_range_value = irandom_range(0, 1);
691
            if (random_range_value == 0)
692
            {
693
                global.enemy_attack = "Frostermit Snowflakes Blueberries";
694
                global.soul_mode = "Red";
695
                global.image_alpha_enemy_attacking_immunity = false;
696
            }
697
            else if (random_range_value == 1)
698
            {
699
                global.enemy_attack = "Frostermit Snowflakes Oranges";
700
                global.soul_mode = "Red";
701
                global.image_alpha_enemy_attacking_immunity = false;
702
            }
703
        }
704
        else if ((enemy_dead_2 + enemy_spared_2) >= 1)
705
        {
706
            var enemy_mode = global.enemy_mode;
707
            switch (enemy_mode)
708
            {
709
                case 0:
710
                    random_range_value = irandom_range(0, 1);
711
                    break;
712
                case 1:
713
                    random_range_value = irandom_range(0, 2);
714
                    break;
715
                default:
716
                    random_range_value = irandom_range(0, 1);
717
            }
718
            if (random_range_value == 0)
719
            {
720
                global.enemy_attack = "Frostermit Snowflakes";
721
                global.soul_mode = "Red";
722
                global.image_alpha_enemy_attacking_immunity = false;
723
            }
724
            else if (random_range_value == 1)
725
            {
726
                global.enemy_attack = "Frostermit Ice Cubes";
727
                global.soul_mode = "Red";
728
                global.image_alpha_enemy_attacking_immunity = false;
729
            }
730
            else if (random_range_value == 2)
731
            {
732
                global.enemy_attack = "Frostermit Pinchers";
733
                global.soul_mode = "Red";
734
                global.image_alpha_enemy_attacking_immunity = false;
735
            }
736
        }
737
        else if ((enemy_dead + enemy_spared) >= 1)
738
        {
739
            random_range_value = irandom_range(0, 9);
740
            if (random_range_value >= 0 && random_range_value <= 2)
741
            {
742
                global.enemy_attack = "Know Cone Blueberries";
743
                global.soul_mode = "Red";
744
                global.image_alpha_enemy_attacking_immunity = false;
745
            }
746
            else if (random_range_value >= 3 && random_range_value <= 5)
747
            {
748
                global.enemy_attack = "Know Cone Oranges";
749
                global.soul_mode = "Red";
750
                global.image_alpha_enemy_attacking_immunity = false;
751
            }
752
            else if (random_range_value >= 6 && random_range_value <= 8)
753
            {
754
                global.enemy_attack = "Know Cone Cherries";
755
                global.soul_mode = "Red";
756
                global.image_alpha_enemy_attacking_immunity = false;
757
            }
758
            else if (random_range_value == 9)
759
            {
760
                global.enemy_attack = "Know Cone Fig";
761
                global.soul_mode = "Red";
762
                global.image_alpha_enemy_attacking_immunity = false;
763
            }
764
        }
765
    }
766
    else if (battle_enemy_name == "trihecta together" || battle_enemy_name == "trihecta separated")
767
    {
768
        random_range_value = irandom_range(0, 2);
769
        if (random_range_value == 0)
770
        {
771
            global.enemy_attack = "Trihecta Circle Bounce";
772
            global.soul_mode = "Red";
773
            global.image_alpha_enemy_attacking_immunity = false;
774
        }
775
        else if (random_range_value == 1)
776
        {
777
            global.enemy_attack = "Trihecta Circle Reflect";
778
            global.soul_mode = "Red";
779
            global.image_alpha_enemy_attacking_immunity = false;
780
        }
781
        else if (random_range_value == 2)
782
        {
783
            global.enemy_attack = "Trihecta Circle Stack";
784
            global.soul_mode = "Red";
785
            global.image_alpha_enemy_attacking_immunity = false;
786
        }
787
    }
788
    else if (battle_enemy_name == "martlet pacifist")
789
    {
790
        if (global.attack_cycle == 0)
791
        {
792
            global.enemy_attack = "Martlet Feather Fall";
793
            global.soul_mode = "Red";
794
            global.image_alpha_enemy_attacking_immunity = false;
795
        }
796
        else if (global.attack_cycle == 1)
797
        {
798
            global.enemy_attack = "Martlet Package";
799
            global.soul_mode = "Red";
800
            global.image_alpha_enemy_attacking_immunity = false;
801
        }
802
        else if (global.attack_cycle == 2)
803
        {
804
            global.enemy_attack = "Martlet Feather Circle";
805
            global.soul_mode = "Red";
806
            global.image_alpha_enemy_attacking_immunity = false;
807
        }
808
        else if (global.attack_cycle == 3)
809
        {
810
            global.enemy_attack = "Martlet Feather Spiral";
811
            global.soul_mode = "Red";
812
            global.image_alpha_enemy_attacking_immunity = false;
813
        }
814
        else if (global.attack_cycle == 4)
815
        {
816
            global.enemy_attack = "Martlet Feather Flow";
817
            global.soul_mode = "Red";
818
            global.image_alpha_enemy_attacking_immunity = false;
819
        }
820
        else if (global.attack_cycle == 5)
821
        {
822
            global.enemy_attack = "Martlet Wing Gust";
823
            global.soul_mode = "Red";
824
            global.image_alpha_enemy_attacking_immunity = true;
825
        }
826
        else if (global.attack_cycle == 6)
827
        {
828
            global.enemy_attack = "Martlet Tornado";
829
            global.soul_mode = "Red";
830
            global.image_alpha_enemy_attacking_immunity = false;
831
        }
832
    }
833
    else if (battle_enemy_name == "martlet genocide")
834
    {
835
        if (global.enemy_mode == 3 && turns_passed == 5)
836
        {
837
            global.enemy_attack = "Martlet Feather Finale";
838
            global.soul_mode = "Red";
839
            global.image_alpha_enemy_attacking_immunity = false;
840
        }
841
        else if (global.attack_cycle == 0)
842
        {
843
            global.enemy_attack = "Martlet Feather Fall";
844
            global.soul_mode = "Red";
845
            global.image_alpha_enemy_attacking_immunity = false;
846
        }
847
        else if (global.attack_cycle == 1)
848
        {
849
            global.enemy_attack = "Martlet Package";
850
            global.soul_mode = "Red";
851
            global.image_alpha_enemy_attacking_immunity = false;
852
        }
853
        else if (global.attack_cycle == 2)
854
        {
855
            global.enemy_attack = "Martlet Feather Circle";
856
            global.soul_mode = "Red";
857
            global.image_alpha_enemy_attacking_immunity = false;
858
        }
859
        else if (global.attack_cycle == 3)
860
        {
861
            global.enemy_attack = "Martlet Feather Flow";
862
            global.soul_mode = "Red";
863
            global.image_alpha_enemy_attacking_immunity = false;
864
        }
865
        else if (global.attack_cycle == 4)
866
        {
867
            global.enemy_attack = "Martlet Feather Spiral";
868
            global.soul_mode = "Red";
869
            global.image_alpha_enemy_attacking_immunity = false;
870
        }
871
        else if (global.attack_cycle == 5)
872
        {
873
            global.enemy_attack = "Martlet Wing Gust";
874
            global.soul_mode = "Red";
875
            global.image_alpha_enemy_attacking_immunity = true;
876
        }
877
        else if (global.attack_cycle == 6)
878
        {
879
            global.enemy_attack = "Martlet Tornado";
880
            global.soul_mode = "Red";
881
            global.image_alpha_enemy_attacking_immunity = false;
882
        }
883
    }
884
    else if (battle_enemy_name == "dunebud solo")
885
    {
886
        random_range_value = irandom_range(0, 2);
887
        if (random_range_value == 0)
888
        {
889
            global.enemy_attack = "Dunebud Chase";
890
            global.soul_mode = "Red";
891
            global.image_alpha_enemy_attacking_immunity = false;
892
        }
893
        else if (random_range_value == 1)
894
        {
895
            global.enemy_attack = "Dunebud Sandcastle";
896
            global.soul_mode = "Red";
897
            global.image_alpha_enemy_attacking_immunity = false;
898
        }
899
        else if (random_range_value == 2)
900
        {
901
            global.enemy_attack = "Dunebud Tumbleweeds";
902
            global.soul_mode = "Red";
903
            global.image_alpha_enemy_attacking_immunity = false;
904
        }
905
    }
906
    else if (battle_enemy_name == "dunebud duo")
907
    {
908
        if ((enemy_dead + enemy_spared + enemy_dead_2 + enemy_spared_2) < 1 && !(global.enemy_spared == true && global.enemy_low_hp == false) && !(global.enemy_spared_2 == true && global.enemy_low_hp_2 == false))
909
        {
910
            random_range_value = 0;
911
            if (random_range_value == 0)
912
            {
913
                global.enemy_attack = "Dunebud Chase Tumbleweeds";
914
                global.soul_mode = "Red";
915
                global.image_alpha_enemy_attacking_immunity = false;
916
            }
917
            else if (random_range_value == 1)
918
            {
919
                global.enemy_attack = "Dunebud Tumbleweeds";
920
                global.soul_mode = "Red";
921
                global.image_alpha_enemy_attacking_immunity = false;
922
            }
923
        }
924
        else
925
        {
926
            random_range_value = irandom_range(0, 2);
927
            if (random_range_value == 0)
928
            {
929
                global.enemy_attack = "Dunebud Chase";
930
                global.soul_mode = "Red";
931
                global.image_alpha_enemy_attacking_immunity = false;
932
            }
933
            else if (random_range_value == 1)
934
            {
935
                global.enemy_attack = "Dunebud Sandcastle";
936
                global.soul_mode = "Red";
937
                global.image_alpha_enemy_attacking_immunity = false;
938
            }
939
            else if (random_range_value == 2)
940
            {
941
                global.enemy_attack = "Dunebud Tumbleweeds";
942
                global.soul_mode = "Red";
943
                global.image_alpha_enemy_attacking_immunity = false;
944
            }
945
        }
946
    }
947
    else if (battle_enemy_name == "cactony solo")
948
    {
949
        if (global.action_1_selected_count >= 1 && global.last_action_selected == "Action 1 Message 0")
950
        {
951
            global.enemy_attack = "Cactony Needle Green";
952
            global.soul_mode = "Red";
953
            global.image_alpha_enemy_attacking_immunity = false;
954
        }
955
        else
956
        {
957
            random_range_value = irandom_range(0, 1);
958
            if (random_range_value == 0)
959
            {
960
                global.enemy_attack = "Cactony Needle Side";
961
                global.soul_mode = "Red";
962
                global.image_alpha_enemy_attacking_immunity = false;
963
            }
964
            else if (random_range_value == 1)
965
            {
966
                global.enemy_attack = "Cactony Needle Top";
967
                global.soul_mode = "Red";
968
                global.image_alpha_enemy_attacking_immunity = false;
969
            }
970
        }
971
    }
972
    else if (battle_enemy_name == "slither solo")
973
    {
974
        random_range_value = irandom_range(0, 1);
975
        if (random_range_value == 0)
976
        {
977
            global.enemy_attack = "Slither Pottery";
978
            global.soul_mode = "Red";
979
            global.image_alpha_enemy_attacking_immunity = false;
980
        }
981
        else if (random_range_value == 1)
982
        {
983
            global.enemy_attack = "Slither Snake";
984
            global.soul_mode = "Red";
985
            global.image_alpha_enemy_attacking_immunity = false;
986
        }
987
    }
988
    else if (battle_enemy_name == "cactony slither duo")
989
    {
990
        if ((enemy_dead + enemy_spared + enemy_dead_2 + enemy_spared_2) < 1)
991
        {
992
            if (global.action_1_selected_count >= 1 && global.last_action_selected == "Action 1 Message 0")
993
            {
994
                global.enemy_attack = "Cactony Slither Attack 2";
995
                global.soul_mode = "Red";
996
                global.image_alpha_enemy_attacking_immunity = false;
997
            }
998
            else
999
            {
1000
                global.enemy_attack = "Cactony Slither Attack 1";
1001
                global.soul_mode = "Red";
1002
                global.image_alpha_enemy_attacking_immunity = false;
1003
            }
1004
        }
1005
        else if ((enemy_dead_2 + enemy_spared_2) >= 1)
1006
        {
1007
            if (global.action_1_selected_count >= 1 && global.last_action_selected == "Action 1 Message 0")
1008
            {
1009
                global.enemy_attack = "Cactony Needle Green";
1010
                global.soul_mode = "Red";
1011
                global.image_alpha_enemy_attacking_immunity = false;
1012
            }
1013
            else
1014
            {
1015
                random_range_value = irandom_range(0, 1);
1016
                if (random_range_value == 0)
1017
                {
1018
                    global.enemy_attack = "Cactony Needle Side";
1019
                    global.soul_mode = "Red";
1020
                    global.image_alpha_enemy_attacking_immunity = false;
1021
                }
1022
                else if (random_range_value == 1)
1023
                {
1024
                    global.enemy_attack = "Cactony Needle Top";
1025
                    global.soul_mode = "Red";
1026
                    global.image_alpha_enemy_attacking_immunity = false;
1027
                }
1028
            }
1029
        }
1030
        else if ((enemy_dead + enemy_spared) >= 1)
1031
        {
1032
            random_range_value = irandom_range(0, 1);
1033
            if (random_range_value == 0)
1034
            {
1035
                global.enemy_attack = "Slither Pottery";
1036
                global.soul_mode = "Red";
1037
                global.image_alpha_enemy_attacking_immunity = false;
1038
            }
1039
            else if (random_range_value == 1)
1040
            {
1041
                global.enemy_attack = "Slither Snake";
1042
                global.soul_mode = "Red";
1043
                global.image_alpha_enemy_attacking_immunity = false;
1044
            }
1045
        }
1046
    }
1047
    else if (battle_enemy_name == "bowll solo")
1048
    {
1049
        random_range_value = irandom_range(0, 2);
1050
        if (random_range_value == 0)
1051
        {
1052
            global.enemy_attack = "Bowll Liquid";
1053
            global.soul_mode = "Red";
1054
            global.image_alpha_enemy_attacking_immunity = false;
1055
        }
1056
        else if (random_range_value == 1)
1057
        {
1058
            global.enemy_attack = "Bowll Silverware";
1059
            global.soul_mode = "Red";
1060
            global.image_alpha_enemy_attacking_immunity = false;
1061
        }
1062
        else if (random_range_value == 2)
1063
        {
1064
            global.enemy_attack = "Bowll Bull";
1065
            global.soul_mode = "Red";
1066
            global.image_alpha_enemy_attacking_immunity = false;
1067
        }
1068
        else if (random_range_value == 3)
1069
        {
1070
            global.enemy_attack = "Bowll Test Song";
1071
            global.soul_mode = "Yellow Rhythm";
1072
            global.image_alpha_enemy_attacking_immunity = false;
1073
        }
1074
    }
1075
    else if (battle_enemy_name == "el bailador")
1076
    {
1077
        global.enemy_attack = "El Bailador Song";
1078
        global.soul_mode = "Yellow Rhythm";
1079
        global.image_alpha_enemy_attacking_immunity = true;
1080
        if (global.route == 3)
1081
        {
1082
            global.soul_mode = "Red";
1083
            if (global.enemy_sparing)
1084
                global.enemy_attack = "Bailador No Attack";
1085
        }
1086
    }
1087
    else if (battle_enemy_name == "flower girls")
1088
    {
1089
        if ((global.dunes_flag[31] == 1 && global.action_2_selected_count > 0) || (global.dunes_flag[31] == 2 && global.action_1_selected_count > 0) || (global.dunes_flag[31] == 3 && global.action_2_selected_count > 0))
1090
        {
1091
            global.enemy_attack = "Falling Flowers";
1092
            global.soul_mode = "Red";
1093
            global.image_alpha_enemy_attacking_immunity = false;
1094
            exit;
1095
        }
1096
        random_range_value = irandom_range(0, 2);
1097
        if (random_range_value == 0)
1098
        {
1099
            global.enemy_attack = "Colored Flowers";
1100
            global.soul_mode = "Red";
1101
            global.image_alpha_enemy_attacking_immunity = false;
1102
        }
1103
        else if (random_range_value == 1)
1104
        {
1105
            global.enemy_attack = "Growing Flowers";
1106
            global.soul_mode = "Red";
1107
            global.image_alpha_enemy_attacking_immunity = false;
1108
        }
1109
        else if (random_range_value == 2)
1110
        {
1111
            global.enemy_attack = "Spinning Flowers";
1112
            global.soul_mode = "Red";
1113
            global.image_alpha_enemy_attacking_immunity = false;
1114
        }
1115
    }
1116
    else if (battle_enemy_name == "dummy training pacifist")
1117
    {
1118
        global.enemy_attack = "Nothing";
1119
        global.soul_mode = "Red";
1120
        global.image_alpha_enemy_attacking_immunity = true;
1121
    }
1122
    else if (battle_enemy_name == "ceroba genocide")
1123
    {
1124
        if (global.current_hp_enemy <= (global.max_hp_enemy * 0.5) && global.battle_phase == 1)
1125
        {
1126
            global.enemy_attack = "Ceroba Phase Switcher";
1127
            global.soul_mode = "Red";
1128
            global.image_alpha_enemy_attacking_immunity = false;
1129
            exit;
1130
        }
1131
        if (global.attack_cycle == 0)
1132
        {
1133
            global.enemy_attack = "Ceroba Opener";
1134
            global.soul_mode = "Red";
1135
            global.image_alpha_enemy_attacking_immunity = false;
1136
        }
1137
        else if (global.attack_cycle == 1)
1138
        {
1139
            global.enemy_attack = "Ceroba Flower Barrage";
1140
            global.soul_mode = "Red";
1141
            global.image_alpha_enemy_attacking_immunity = false;
1142
        }
1143
        else if (global.attack_cycle == 2)
1144
        {
1145
            global.enemy_attack = "Ceroba Diamond Attack";
1146
            global.soul_mode = "Red";
1147
            global.image_alpha_enemy_attacking_immunity = false;
1148
        }
1149
        else if (global.attack_cycle == 3)
1150
        {
1151
            global.enemy_attack = "Ceroba Flower Spray";
1152
            global.soul_mode = "Red";
1153
            global.image_alpha_enemy_attacking_immunity = false;
1154
        }
1155
        else if (global.attack_cycle == 4)
1156
        {
1157
            global.enemy_attack = "Ceroba Fire Circle";
1158
            global.soul_mode = "Red";
1159
            global.image_alpha_enemy_attacking_immunity = false;
1160
        }
1161
        else if (global.attack_cycle == 5)
1162
        {
1163
            global.enemy_attack = "Ceroba Flower Spiral";
1164
            global.soul_mode = "Red";
1165
            global.image_alpha_enemy_attacking_immunity = false;
1166
        }
1167
        else if (global.attack_cycle == 6)
1168
        {
1169
            global.enemy_attack = "Ceroba Jumping Flowers";
1170
            global.soul_mode = "Red";
1171
            global.image_alpha_enemy_attacking_immunity = true;
1172
        }
1173
        else if (global.attack_cycle == 7)
1174
        {
1175
            global.enemy_attack = "Ceroba Pillars G";
1176
            global.soul_mode = "Red";
1177
            global.image_alpha_enemy_attacking_immunity = false;
1178
        }
1179
    }
1180
    else if (battle_enemy_name == "starlo")
1181
    {
1182
        if (global.attack_cycle == -1)
1183
        {
1184
            global.enemy_attack = "Starlo Intro";
1185
            global.soul_mode = "Red";
1186
            global.image_alpha_enemy_attacking_immunity = false;
1187
        }
1188
        else if (global.attack_cycle == 0)
1189
        {
1190
            global.enemy_attack = "Starlo Guns Horizontal";
1191
            global.soul_mode = "Red";
1192
            global.image_alpha_enemy_attacking_immunity = false;
1193
        }
1194
        else if (global.attack_cycle == 1)
1195
        {
1196
            global.enemy_attack = "Starlo Bullet Rain";
1197
            global.soul_mode = "Red";
1198
            global.image_alpha_enemy_attacking_immunity = false;
1199
        }
1200
        else if (global.attack_cycle == 2)
1201
        {
1202
            global.enemy_attack = "Starlo Dynamite";
1203
            global.soul_mode = "Red";
1204
            global.image_alpha_enemy_attacking_immunity = false;
1205
        }
1206
        else if (global.attack_cycle == 3)
1207
        {
1208
            global.enemy_attack = "Starlo Horseshoe";
1209
            global.soul_mode = "Red";
1210
            global.image_alpha_enemy_attacking_immunity = false;
1211
        }
1212
        else if (global.attack_cycle == 4)
1213
        {
1214
            global.enemy_attack = "Starlo Guns n Dynamite";
1215
            global.soul_mode = "Red";
1216
            global.image_alpha_enemy_attacking_immunity = false;
1217
        }
1218
        else if (global.attack_cycle == 5)
1219
        {
1220
            global.enemy_attack = "Starlo Bell";
1221
            global.soul_mode = "Red";
1222
            global.image_alpha_enemy_attacking_immunity = false;
1223
        }
1224
        else if (global.attack_cycle == 6)
1225
        {
1226
            global.enemy_attack = "Starlo Bottles";
1227
            global.soul_mode = "Red";
1228
            global.image_alpha_enemy_attacking_immunity = false;
1229
        }
1230
        else if (global.attack_cycle == 7)
1231
        {
1232
            global.enemy_attack = "Starlo Train";
1233
            global.soul_mode = "Red";
1234
            global.image_alpha_enemy_attacking_immunity = false;
1235
        }
1236
        else if (global.attack_cycle == 8)
1237
        {
1238
            global.enemy_attack = "Starlo Take Aim One";
1239
            global.soul_mode = "Red";
1240
            global.image_alpha_enemy_attacking_immunity = false;
1241
        }
1242
        else if (global.attack_cycle == 9)
1243
        {
1244
            global.enemy_attack = "Starlo Take Aim";
1245
            global.soul_mode = "Red";
1246
            global.image_alpha_enemy_attacking_immunity = false;
1247
        }
1248
        else if (global.attack_cycle == 10)
1249
        {
1250
            global.enemy_attack = "Starlo Guns Surround";
1251
            global.soul_mode = "Red";
1252
            global.image_alpha_enemy_attacking_immunity = false;
1253
        }
1254
        else if (global.attack_cycle == 11)
1255
        {
1256
            global.enemy_attack = "Starlo Bell and Guns";
1257
            global.soul_mode = "Red";
1258
            global.image_alpha_enemy_attacking_immunity = false;
1259
        }
1260
        else if (global.attack_cycle == 12)
1261
        {
1262
            global.enemy_attack = "Starlo Take Aim Slow";
1263
            global.soul_mode = "Red";
1264
            global.image_alpha_enemy_attacking_immunity = false;
1265
        }
1266
        else if (global.attack_cycle == 13)
1267
        {
1268
            global.enemy_attack = "Starlo Shooting Dynamite";
1269
            global.soul_mode = "Red";
1270
            global.image_alpha_enemy_attacking_immunity = false;
1271
        }
1272
        else if (global.attack_cycle == 14)
1273
        {
1274
            global.enemy_attack = "Starlo Surround Slow";
1275
            global.soul_mode = "Red";
1276
            global.image_alpha_enemy_attacking_immunity = false;
1277
        }
1278
        else if (global.attack_cycle == 15)
1279
        {
1280
            global.enemy_attack = "Starlo Finale";
1281
            global.soul_mode = "Red";
1282
            global.image_alpha_enemy_attacking_immunity = false;
1283
        }
1284
        else if (global.attack_cycle == 16)
1285
        {
1286
            global.enemy_attack = "Starlo No Attack";
1287
            global.soul_mode = "Red";
1288
            global.image_alpha_enemy_attacking_immunity = false;
1289
        }
1290
    }
1291
    else if (battle_enemy_name == "boulders minifight")
1292
    {
1293
        global.enemy_attack = "Falling Boulders";
1294
        global.soul_mode = "Red";
1295
        global.image_alpha_enemy_attacking_immunity = false;
1296
    }
1297
    else if (battle_enemy_name == "feisty five")
1298
    {
1299
        switch (global.attack_cycle)
1300
        {
1301
            case 0:
1302
                global.enemy_attack = "Ed Smash";
1303
                break;
1304
            case 1:
1305
                global.enemy_attack = "Moray Balls";
1306
                break;
1307
            case 2:
1308
                global.enemy_attack = "Ace Dealing";
1309
                break;
1310
            case 3:
1311
                global.enemy_attack = "Mooch Bag";
1312
                break;
1313
            case 4:
1314
                global.enemy_attack = "Ed Grab";
1315
                break;
1316
            case 5:
1317
                global.enemy_attack = "Moray Spin";
1318
                break;
1319
            case 6:
1320
                global.enemy_attack = "Ace Cards";
1321
                break;
1322
            case 7:
1323
                global.enemy_attack = "Coin Rain";
1324
                break;
1325
            case 8:
1326
                global.enemy_attack = "Grab & Moray";
1327
                break;
1328
            case 9:
1329
                global.enemy_attack = "Coin Rain & Ace Cards";
1330
                break;
1331
            case 10:
1332
                global.enemy_attack = "Ed Smash";
1333
                break;
1334
        }
1335
        global.soul_mode = "Red";
1336
        global.image_alpha_enemy_attacking_immunity = false;
1337
    }
1338
    else if (battle_enemy_name == "steam minifight")
1339
    {
1340
        global.enemy_attack = "Steam Puffs";
1341
        global.soul_mode = "Red";
1342
        global.image_alpha_enemy_attacking_immunity = false;
1343
    }
1344
    else if (battle_enemy_name == "energy balls minifight")
1345
    {
1346
        global.enemy_attack = "Energy Balls";
1347
        global.soul_mode = "Red";
1348
        global.image_alpha_enemy_attacking_immunity = false;
1349
    }
1350
    else if (battle_enemy_name == "jandroid" || (battle_enemy_name == "jandroid goosic duo" && (enemy_dead_2 + enemy_spared_2) >= 1) || (battle_enemy_name == "jandroid duo" && (enemy_dead_2 + enemy_spared_2 + enemy_dead + enemy_spared) >= 1))
1351
    {
1352
        if (global.last_action_selected == "Action 2 Message 0" || global.last_action_selected_2 == "Action 2 Message 0")
1353
        {
1354
            global.enemy_attack = "Garbage Cans";
1355
            global.soul_mode = "Red";
1356
            global.image_alpha_enemy_attacking_immunity = false;
1357
        }
1358
        else
1359
        {
1360
            random_range_value = irandom_range(0, 1);
1361
            if (random_range_value == 0)
1362
            {
1363
                global.enemy_attack = "Spray Bottle";
1364
                global.soul_mode = "Red";
1365
                global.image_alpha_enemy_attacking_immunity = false;
1366
            }
1367
            else if (random_range_value == 1)
1368
            {
1369
                global.enemy_attack = "Slippery Floor";
1370
                global.soul_mode = "Red";
1371
                global.image_alpha_enemy_attacking_immunity = false;
1372
            }
1373
        }
1374
    }
1375
    else if (battle_enemy_name == "jandroid duo")
1376
    {
1377
        if (global.last_action_selected == "Action 2 Message 0" || global.last_action_selected_2 == "Action 2 Message 0")
1378
        {
1379
            global.enemy_attack = "Double Jandroid Gargbage Cans";
1380
            global.soul_mode = "Red";
1381
            global.image_alpha_enemy_attacking_immunity = false;
1382
        }
1383
        else
1384
        {
1385
            random_range_value = irandom_range(0, 0);
1386
            if (random_range_value == 0)
1387
            {
1388
                global.enemy_attack = "Double Jandroid Slippery Floor";
1389
                global.soul_mode = "Red";
1390
                global.image_alpha_enemy_attacking_immunity = false;
1391
            }
1392
        }
1393
    }
1394
    else if (battle_enemy_name == "goosic" || (battle_enemy_name == "jandroid goosic duo" && (enemy_dead + enemy_spared) >= 1))
1395
    {
1396
        random_range_value = irandom_range(0, 2);
1397
        if (random_range_value == 0)
1398
        {
1399
            global.enemy_attack = "Goosic Speaker";
1400
            global.soul_mode = "Red";
1401
            global.image_alpha_enemy_attacking_immunity = false;
1402
        }
1403
        else if (random_range_value == 1)
1404
        {
1405
            global.enemy_attack = "Goosic Disk";
1406
            global.soul_mode = "Red";
1407
            global.image_alpha_enemy_attacking_immunity = false;
1408
        }
1409
        else if (random_range_value == 2)
1410
        {
1411
            global.enemy_attack = "Goosic EQ Visualizer";
1412
            global.soul_mode = "Red";
1413
            global.image_alpha_enemy_attacking_immunity = false;
1414
        }
1415
    }
1416
    else if (battle_enemy_name == "jandroid goosic duo")
1417
    {
1418
        show_debug_message(global.last_action_selected);
1419
        if (global.last_action_selected == "Action 2 Message 0")
1420
        {
1421
            global.enemy_attack = "Jandroid Goosic Attack 2";
1422
            global.soul_mode = "Red";
1423
            global.image_alpha_enemy_attacking_immunity = false;
1424
        }
1425
        else
1426
        {
1427
            global.enemy_attack = "Jandroid Goosic Attack 1";
1428
            global.soul_mode = "Red";
1429
            global.image_alpha_enemy_attacking_immunity = false;
1430
        }
1431
    }
1432
    else if (battle_enemy_name == "tellyvis")
1433
    {
1434
        random_range_value = irandom_range(0, 2);
1435
        if (random_range_value == 0)
1436
        {
1437
            global.enemy_attack = "Tellyvis Logo";
1438
            global.soul_mode = "Red";
1439
            global.image_alpha_enemy_attacking_immunity = false;
1440
        }
1441
        else if (random_range_value == 1)
1442
        {
1443
            global.enemy_attack = "Tellyvis Remote";
1444
            global.soul_mode = "Red";
1445
            global.image_alpha_enemy_attacking_immunity = false;
1446
        }
1447
        else if (random_range_value == 2)
1448
        {
1449
            global.enemy_attack = "Tellyvis Tape";
1450
            global.soul_mode = "Red";
1451
            global.image_alpha_enemy_attacking_immunity = false;
1452
        }
1453
    }
1454
    else if (battle_enemy_name == "sousborg")
1455
    {
1456
        global.soul_mode = "Red";
1457
        global.image_alpha_enemy_attacking_immunity = false;
1458
    }
1459
    else if (battle_enemy_name == "axis")
1460
    {
1461
        turns_passed = global.special_action_count;
1462
        if (global.enemy_sparing)
1463
            global.enemy_attack = "Guardener No Attack";
1464
        if ((instance_exists(obj_battlebox_controller_axis) && obj_battlebox_controller_axis.axis_trash_meter >= 100) || turns_passed != global.special_action_count_last)
1465
        {
1466
            global.enemy_attack = "Super Ball 1";
1467
            global.image_alpha_enemy_attacking_immunity = false;
1468
        }
1469
        else
1470
        {
1471
            switch (global.attack_cycle)
1472
            {
1473
                case 0:
1474
                    global.enemy_attack = "Introductory Attack";
1475
                    break;
1476
                case 1:
1477
                    global.enemy_attack = "Energy Balls 1";
1478
                    break;
1479
                case 2:
1480
                    global.enemy_attack = "Energy Balls 2";
1481
                    break;
1482
                case 3:
1483
                    global.enemy_attack = "Energy Balls Spin 1";
1484
                    break;
1485
                case 4:
1486
                    global.enemy_attack = "Hand Laser";
1487
                    break;
1488
                case 5:
1489
                    global.enemy_attack = "Color Lasers";
1490
                    break;
1491
                case 6:
1492
                    global.enemy_attack = "Color Lasers 2";
1493
                    break;
1494
                case 7:
1495
                    global.enemy_attack = "Steam Walls Spin";
1496
                    break;
1497
                case 8:
1498
                    global.enemy_attack = "Lobbing Bombs";
1499
                    break;
1500
                case 9:
1501
                    global.enemy_attack = "X Colors";
1502
                    break;
1503
                case 10:
1504
                    global.enemy_attack = "Lobbing Bombs 2";
1505
                    break;
1506
                case 11:
1507
                    global.enemy_attack = "Magnetic Orbs";
1508
                    break;
1509
                case 12:
1510
                    global.enemy_attack = "Axis Turrets";
1511
                    break;
1512
                case 13:
1513
                    global.enemy_attack = "Axis Turrets 2";
1514
                    break;
1515
                case 14:
1516
                    global.enemy_attack = "Laser Grid";
1517
                    break;
1518
                case 15:
1519
                    global.enemy_attack = "Pulse Energy";
1520
                    break;
1521
                case 16:
1522
                    global.enemy_attack = "Axis Turrets 3";
1523
                    break;
1524
            }
1525
            global.image_alpha_enemy_attacking_immunity = false;
1526
        }
1527
        global.soul_mode = "Red";
1528
    }
1529
    else if (battle_enemy_name == "axis genocide")
1530
    {
1531
        if (global.enemy_sparing)
1532
        {
1533
            global.enemy_attack = "Guardener No Attack";
1534
        }
1535
        else
1536
        {
1537
            switch (global.attack_cycle)
1538
            {
1539
                case 0:
1540
                    global.enemy_attack = "Axis Geno At 1";
1541
                    break;
1542
                case 1:
1543
                    global.enemy_attack = "Axis Geno At 2";
1544
                    break;
1545
                case 2:
1546
                    global.enemy_attack = "Axis Geno At 3";
1547
                    break;
1548
                case 3:
1549
                    global.enemy_attack = "Axis Geno At 4";
1550
                    break;
1551
                case 4:
1552
                    global.enemy_attack = "Axis Geno At 5";
1553
                    break;
1554
                case 5:
1555
                    global.enemy_attack = "Axis Geno At 6";
1556
                    break;
1557
                case 6:
1558
                    global.enemy_attack = "Axis Geno At 7";
1559
                    break;
1560
                case 7:
1561
                    global.enemy_attack = "Axis Geno At 8";
1562
                    break;
1563
                case 8:
1564
                    global.enemy_attack = "Axis Geno At 9";
1565
                    break;
1566
                case 9:
1567
                    global.enemy_attack = "Axis Geno At 10";
1568
                    break;
1569
            }
1570
            global.image_alpha_enemy_attacking_immunity = false;
1571
        }
1572
        global.soul_mode = "Red";
1573
    }
1574
    else if (battle_enemy_name == "macro froggit")
1575
    {
1576
        switch (global.turns_passed)
1577
        {
1578
            case 0:
1579
                global.enemy_attack = "Macro Transform";
1580
                break;
1581
            case 1:
1582
                global.enemy_attack = "Tongue Attack";
1583
                break;
1584
            case 2:
1585
                global.enemy_attack = "Frogger";
1586
                break;
1587
            case 3:
1588
                global.enemy_attack = "Flies Bullet Hell";
1589
                break;
1590
            case 4:
1591
                global.enemy_attack = "Log Frogs";
1592
                break;
1593
            case 5:
1594
                global.enemy_attack = "Gun Flies";
1595
                break;
1596
            case 6:
1597
                global.enemy_attack = "Space Frog";
1598
                break;
1599
            case 7:
1600
                global.enemy_attack = "Big Frogs";
1601
                break;
1602
            case 8:
1603
                global.enemy_attack = "Frog Choir";
1604
                break;
1605
            case 9:
1606
                global.enemy_attack = "Sword Frog";
1607
                break;
1608
            case 10:
1609
                global.enemy_attack = "Mecha Frog";
1610
                break;
1611
        }
1612
        global.image_alpha_enemy_attacking_immunity = false;
1613
        global.soul_mode = "Red";
1614
    }
1615
    else if (battle_enemy_name == "guardener")
1616
    {
1617
        if (global.turns_passed > 9 && global.enemy_mode == 0)
1618
            global.turns_passed = 9;
1619
        switch (global.turns_passed)
1620
        {
1621
            case 0:
1622
                global.enemy_attack = "Guardener Attack 1";
1623
                break;
1624
            case 1:
1625
                global.enemy_attack = "Guardener Attack 2";
1626
                break;
1627
            case 2:
1628
                global.enemy_attack = "Guardener Attack 3";
1629
                break;
1630
            case 3:
1631
                global.enemy_attack = "Guardener Attack 4";
1632
                break;
1633
            case 4:
1634
                global.enemy_attack = "Guardener Attack 5";
1635
                break;
1636
            case 5:
1637
                global.enemy_attack = "Guardener Attack 7";
1638
                break;
1639
            case 6:
1640
                global.enemy_attack = "Guardener Attack 8";
1641
                break;
1642
            case 7:
1643
                global.enemy_attack = "Guardener Attack 6";
1644
                break;
1645
            case 8:
1646
                global.enemy_attack = "Guardener Attack 9";
1647
                break;
1648
            case 9:
1649
                global.enemy_attack = "Guardener Attack " + string(irandom_range(1, 9));
1650
                break;
1651
            case 10:
1652
                global.enemy_attack = "Guardener Attack 10";
1653
                break;
1654
            case 11:
1655
                global.enemy_attack = "Guardener Attack " + string(choose(irandom_range(1, 5), irandom_range(7, 8)));
1656
                break;
1657
            case 12:
1658
                global.enemy_attack = "Guardener Attack 12";
1659
                break;
1660
            case 13:
1661
                global.enemy_attack = "Guardener Attack 11";
1662
                break;
1663
            case 14:
1664
            case 15:
1665
            case 16:
1666
                global.enemy_attack = "Guardener Attack " + string(choose(irandom_range(1, 5), irandom_range(7, 8)));
1667
                break;
1668
        }
1669
        if (global.enemy_sparing)
1670
            global.enemy_attack = "Guardener No Attack";
1671
        global.soul_mode = "Red";
1672
        global.image_alpha_enemy_attacking_immunity = false;
1673
    }
1674
    else if (battle_enemy_name == "flowey")
1675
    {
1676
        switch (global.turns_passed)
1677
        {
1678
            case 0:
1679
                global.enemy_attack = "Flowey Opener";
1680
                break;
1681
        }
1682
        global.soul_mode = "Red";
1683
        global.image_alpha_enemy_attacking_immunity = false;
1684
    }
1685
    else if (battle_enemy_name == "ceroba")
1686
    {
1687
        if (instance_exists(obj_ceroba_phase_2_shield))
1688
        {
1689
            if (obj_ceroba_phase_2_shield.scene >= 9)
1690
            {
1691
                global.enemy_attack = "Ceroba Shield Defense";
1692
                global.soul_mode = "Red";
1693
                global.image_alpha_enemy_attacking_immunity = false;
1694
                exit;
1695
            }
1696
        }
1697
        switch (global.attack_cycle)
1698
        {
1699
            case 0:
1700
                global.enemy_attack = "Ceroba Bullets";
1701
                break;
1702
            case 1:
1703
                global.enemy_attack = "Ceroba Shotgun Pacifist";
1704
                break;
1705
            case 2:
1706
                global.enemy_attack = "Ceroba Leaves";
1707
                break;
1708
            case 3:
1709
                global.enemy_attack = "Ceroba Diamond Pacifist";
1710
                break;
1711
            case 4:
1712
                global.enemy_attack = "Ceroba Flower Circle Pacifist";
1713
                break;
1714
            case 5:
1715
                global.enemy_attack = "Ceroba Bells";
1716
                break;
1717
            case 6:
1718
                global.enemy_attack = "Ceroba Black Hole";
1719
                break;
1720
            case 7:
1721
                global.enemy_attack = "Ceroba Pillars";
1722
                break;
1723
            case 8:
1724
                global.enemy_attack = "Ceroba Staff";
1725
                break;
1726
            case 9:
1727
                global.enemy_attack = "Ceroba Rotating Bullets";
1728
                break;
1729
            case 10:
1730
                global.enemy_attack = "Ceroba Transform 1";
1731
                break;
1732
            case 11:
1733
                global.enemy_attack = "Ceroba Phase 2 P1 Lanterns";
1734
                break;
1735
            case 12:
1736
                global.enemy_attack = "Ceroba Phase 2 P1 Spawner Mask";
1737
                break;
1738
            case 13:
1739
                global.enemy_attack = "Ceroba Phase 2 P1 Circling Lanterns";
1740
                break;
1741
            case 14:
1742
                global.enemy_attack = "Ceroba Phase 2 P1 Falling Bells";
1743
                break;
1744
            case 15:
1745
                global.attack_cycle = 16;
1746
            case 16:
1747
                global.enemy_attack = "Ceroba Phase 2 P1 Obstacles";
1748
                break;
1749
            case 17:
1750
                global.enemy_attack = "Ceroba Phase 2 P1 Ribbon Attack";
1751
                break;
1752
            case 18:
1753
                global.enemy_attack = "Ceroba Phase 2 Spawner";
1754
                if (global.hotland_flag[2] == 3)
1755
                    global.enemy_attack = "Ceroba Phase 2 Spawner 2";
1756
                break;
1757
            case 19:
1758
                global.enemy_attack = "Ceroba Special Attack";
1759
                break;
1760
        }
1761
        if (global.enemy_sparing)
1762
            global.enemy_attack = "Guardener No Attack";
1763
        global.soul_mode = "Red";
1764
        global.image_alpha_enemy_attacking_immunity = false;
1765
    }
1766
    else if (battle_enemy_name == "martlet genocide final")
1767
    {
1768
        switch (global.attack_cycle)
1769
        {
1770
            case 0:
1771
                if (global.hotland_flag[9] < 2)
1772
                    global.enemy_attack = "Martlet Final Opener";
1773
                else
1774
                    global.enemy_attack = "Martlet Final 2 Opener";
1775
                break;
1776
            case 1:
1777
                global.enemy_attack = "Splitting Feathers";
1778
                break;
1779
            case 2:
1780
                global.enemy_attack = "Talon Scratch";
1781
                break;
1782
            case 3:
1783
                global.enemy_attack = "Martlet Wings";
1784
                break;
1785
            case 4:
1786
                global.enemy_attack = "Splitting Feathers + Talon Scratch";
1787
                break;
1788
            case 5:
1789
                global.enemy_attack = "Splitting Feathers + Martlet Wings";
1790
                break;
1791
            case 6:
1792
                global.enemy_attack = "Talon Scratch + Martlet Wings";
1793
                break;
1794
            case 7:
1795
                global.enemy_attack = "Martlet Feather Circle Final";
1796
                break;
1797
            case 8:
1798
                global.enemy_attack = "Circular Scratch";
1799
                break;
1800
            case 9:
1801
                global.enemy_attack = "Falling Meteors";
1802
                break;
1803
            case 10:
1804
                global.enemy_attack = "Feathers Meteors";
1805
                break;
1806
            case 11:
1807
                global.enemy_attack = "Splitting Feathers + Talon Scratch 2";
1808
                break;
1809
            case 20:
1810
                global.enemy_attack = "Martlet Talon Walls";
1811
                break;
1812
            case 21:
1813
                global.enemy_attack = "Wing Gust Final";
1814
                break;
1815
            case 30:
1816
                global.enemy_attack = "Martlet Blocks";
1817
                break;
1818
            case 31:
1819
                global.enemy_attack = "Martlet Gauntlet 1";
1820
                break;
1821
            case 32:
1822
                global.enemy_attack = "Martlet Blocks 2";
1823
                break;
1824
            case 33:
1825
                global.enemy_attack = "Martlet Gauntlet 2";
1826
                break;
1827
            case 40:
1828
                global.enemy_attack = "Martlet Phase 2 Blocks";
1829
                break;
1830
            case 41:
1831
                global.enemy_attack = "Martlet Phase 2 Blocks 2";
1832
                break;
1833
            case 42:
1834
                global.enemy_attack = "Martlet Phase 2 Blocks 3";
1835
                break;
1836
            case 43:
1837
                global.enemy_attack = "Martlet Phase 2 Blocks 4";
1838
                break;
1839
        }
1840
        global.soul_mode = "Red";
1841
        global.image_alpha_enemy_attacking_immunity = false;
1842
    }
1843
}