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() //gml_Script_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 if (global.enemy_count >= 2) { var enemy_dead_2 = global.enemy_dead_2 var enemy_spared_2 = global.enemy_spared_2 } if (global.enemy_count >= 3) { var 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) { global.enemy_attack = "Penilla Lines" global.soul_mode = "Red" ...
() //gml_Script_scr_determine_enemy_attack_yellow
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
    if (global.enemy_count >= 2)
11
    {
12
        var enemy_dead_2 = global.enemy_dead_2
13
        var enemy_spared_2 = global.enemy_spared_2
14
    }
15
    if (global.enemy_count >= 3)
16
    {
17
        var enemy_dead_3 = global.enemy_dead_3
18
        var enemy_spared_3 = global.enemy_spared_3
19
    }
20
    if (battle_enemy_name == "flier solo")
21
    {
22
        random_range_value = irandom_range(0, 2)
23
        if (random_range_value == 0)
24
        {
25
            global.enemy_attack = "Flier Flies"
26
            global.soul_mode = "Red"
27
            global.image_alpha_enemy_attacking_immunity = false
28
        }
29
        else if (random_range_value == 1)
30
        {
31
            global.enemy_attack = "Flier Swarm"
32
            global.soul_mode = "Red"
33
            global.image_alpha_enemy_attacking_immunity = false
34
        }
35
        else if (random_range_value == 2)
36
        {
37
            global.enemy_attack = "Flier Fire"
38
            global.soul_mode = "Red"
39
            global.image_alpha_enemy_attacking_immunity = false
40
        }
41
    }
42
    else if (battle_enemy_name == "flier trio")
43
    {
44
        if ((enemy_dead + enemy_spared + enemy_dead_2 + enemy_spared_2 + enemy_dead_3 + enemy_spared_2) < 2)
45
        {
46
            random_range_value = irandom_range(0, 2)
47
            if (random_range_value == 0)
48
            {
49
                global.enemy_attack = "Flier Flies Double"
50
                global.soul_mode = "Red"
51
                global.image_alpha_enemy_attacking_immunity = false
52
            }
53
            else if (random_range_value == 1)
54
            {
55
                global.enemy_attack = "Flier Swarm Double"
56
                global.soul_mode = "Red"
57
                global.image_alpha_enemy_attacking_immunity = false
58
            }
59
            else if (random_range_value == 2)
60
            {
61
                global.enemy_attack = "Flier Fire Flies"
62
                global.soul_mode = "Red"
63
                global.image_alpha_enemy_attacking_immunity = false
64
            }
65
        }
66
        else
67
        {
68
            random_range_value = irandom_range(0, 2)
69
            if (random_range_value == 0)
70
            {
71
                global.enemy_attack = "Flier Flies"
72
                global.soul_mode = "Red"
73
                global.image_alpha_enemy_attacking_immunity = false
74
            }
75
            else if (random_range_value == 1)
76
            {
77
                global.enemy_attack = "Flier Swarm"
78
                global.soul_mode = "Red"
79
                global.image_alpha_enemy_attacking_immunity = false
80
            }
81
            else if (random_range_value == 2)
82
            {
83
                global.enemy_attack = "Flier Fire"
84
                global.soul_mode = "Red"
85
                global.image_alpha_enemy_attacking_immunity = false
86
            }
87
        }
88
    }
89
    else if (battle_enemy_name == "penilla solo")
90
    {
91
        random_range_value = irandom_range(0, 1)
92
        if (random_range_value == 0)
93
        {
94
            global.enemy_attack = "Penilla Drawing"
95
            global.soul_mode = "Red"
96
            global.image_alpha_enemy_attacking_immunity = false
97
        }
98
        else if (random_range_value == 1)
99
        {
100
            global.enemy_attack = "Penilla Lines"
101
            global.soul_mode = "Red"
102
            global.image_alpha_enemy_attacking_immunity = false
103
        }
104
    }
105
    else if (battle_enemy_name == "flier penilla duo")
106
    {
107
        if ((enemy_dead + enemy_spared + enemy_dead_2 + enemy_spared_2) < 1)
108
        {
109
            global.enemy_attack = "Flier Flies Drawing"
110
            global.soul_mode = "Red"
111
            global.image_alpha_enemy_attacking_immunity = false
112
        }
113
        else if ((enemy_dead_2 + enemy_spared_2) >= 1)
114
        {
115
            random_range_value = irandom_range(0, 1)
116
            if (random_range_value == 0)
117
            {
118
                global.enemy_attack = "Flier Flies"
119
                global.soul_mode = "Red"
120
                global.image_alpha_enemy_attacking_immunity = false
121
            }
122
            else if (random_range_value == 1)
123
            {
124
                global.enemy_attack = "Flier Fire"
125
                global.soul_mode = "Red"
126
                global.image_alpha_enemy_attacking_immunity = false
127
            }
128
        }
129
        else if ((enemy_dead + enemy_spared) >= 1)
130
        {
131
            random_range_value = irandom_range(0, 1)
132
            if (random_range_value == 0)
133
            {
134
                global.enemy_attack = "Penilla Drawing"
135
                global.soul_mode = "Red"
136
                global.image_alpha_enemy_attacking_immunity = false
137
            }
138
            else if (random_range_value == 1)
139
            {
140
                global.enemy_attack = "Penilla Lines"
141
                global.soul_mode = "Red"
142
                global.image_alpha_enemy_attacking_immunity = false
143
            }
144
        }
145
    }
146
    else if (battle_enemy_name == "sweet corn solo")
147
    {
148
        random_range_value = irandom_range(0, 2)
149
        if (random_range_value == 0)
150
        {
151
            global.enemy_attack = "Candy Corn"
152
            global.soul_mode = "Red"
153
            global.image_alpha_enemy_attacking_immunity = false
154
        }
155
        else if (random_range_value == 1)
156
        {
157
            global.enemy_attack = "Spear Corn"
158
            global.soul_mode = "Red"
159
            global.image_alpha_enemy_attacking_immunity = false
160
        }
161
        else if (random_range_value == 2)
162
        {
163
            global.enemy_attack = "Homing Corn"
164
            global.soul_mode = "Red"
165
            global.image_alpha_enemy_attacking_immunity = false
166
        }
167
    }
168
    else if (battle_enemy_name == "sweet corn duo")
169
    {
170
        if ((enemy_dead + enemy_spared + enemy_dead_2 + enemy_spared_2) < 1)
171
        {
172
            random_range_value = irandom_range(0, 1)
173
            if (random_range_value == 0)
174
            {
175
                global.enemy_attack = "Candy Spear Corn"
176
                global.soul_mode = "Red"
177
                global.image_alpha_enemy_attacking_immunity = false
178
            }
179
            else if (random_range_value == 1)
180
            {
181
                global.enemy_attack = "Homing Spear Corn"
182
                global.soul_mode = "Red"
183
                global.image_alpha_enemy_attacking_immunity = false
184
            }
185
        }
186
        else
187
        {
188
            random_range_value = irandom_range(0, 2)
189
            if (random_range_value == 0)
190
            {
191
                global.enemy_attack = "Candy Corn"
192
                global.soul_mode = "Red"
193
                global.image_alpha_enemy_attacking_immunity = false
194
            }
195
            else if (random_range_value == 1)
196
            {
197
                global.enemy_attack = "Spear Corn"
198
                global.soul_mode = "Red"
199
                global.image_alpha_enemy_attacking_immunity = false
200
            }
201
            else if (random_range_value == 2)
202
            {
203
                global.enemy_attack = "Homing Corn"
204
                global.soul_mode = "Red"
205
                global.image_alpha_enemy_attacking_immunity = false
206
            }
207
        }
208
    }
209
    else if (battle_enemy_name == "sweet corn penilla duo")
210
    {
211
        if ((enemy_dead + enemy_spared + enemy_dead_2 + enemy_spared_2) < 1)
212
        {
213
            global.enemy_attack = "Drawing Spear Corn"
214
            global.soul_mode = "Red"
215
            global.image_alpha_enemy_attacking_immunity = false
216
        }
217
        else if ((enemy_dead_2 + enemy_spared_2) >= 1)
218
        {
219
            random_range_value = irandom_range(0, 2)
220
            if (random_range_value == 0)
221
            {
222
                global.enemy_attack = "Candy Corn"
223
                global.soul_mode = "Red"
224
                global.image_alpha_enemy_attacking_immunity = false
225
            }
226
            else if (random_range_value == 1)
227
            {
228
                global.enemy_attack = "Spear Corn"
229
                global.soul_mode = "Red"
230
                global.image_alpha_enemy_attacking_immunity = false
231
            }
232
            else if (random_range_value == 2)
233
            {
234
                global.enemy_attack = "Homing Corn"
235
                global.soul_mode = "Red"
236
                global.image_alpha_enemy_attacking_immunity = false
237
            }
238
        }
239
        else if ((enemy_dead + enemy_spared) >= 1)
240
        {
241
            random_range_value = irandom_range(0, 1)
242
            if (random_range_value == 0)
243
            {
244
                global.enemy_attack = "Penilla Drawing"
245
                global.soul_mode = "Red"
246
                global.image_alpha_enemy_attacking_immunity = false
247
            }
248
            else if (random_range_value == 1)
249
            {
250
                global.enemy_attack = "Penilla Lines"
251
                global.soul_mode = "Red"
252
                global.image_alpha_enemy_attacking_immunity = false
253
            }
254
        }
255
    }
256
    else if (battle_enemy_name == "crispy scroll solo")
257
    {
258
        random_range_value = irandom_range(0, 2)
259
        if (random_range_value == 0)
260
        {
261
            global.enemy_attack = "Crispy Slash"
262
            global.soul_mode = "Red"
263
            global.image_alpha_enemy_attacking_immunity = false
264
        }
265
        else if (random_range_value == 1)
266
        {
267
            global.enemy_attack = "Crispy Laser"
268
            global.soul_mode = "Red"
269
            global.image_alpha_enemy_attacking_immunity = false
270
        }
271
        else if (random_range_value == 2)
272
        {
273
            global.enemy_attack = "Crispy Tub"
274
            global.soul_mode = "Red"
275
            global.image_alpha_enemy_attacking_immunity = false
276
        }
277
    }
278
    else if (battle_enemy_name == "crispy scroll penilla duo")
279
    {
280
        if ((enemy_dead + enemy_spared + enemy_dead_2 + enemy_spared_2) < 1)
281
        {
282
            global.enemy_attack = "Crispy Slash Drawing"
283
            global.soul_mode = "Red"
284
            global.image_alpha_enemy_attacking_immunity = false
285
        }
286
        else if ((enemy_dead_2 + enemy_spared_2) >= 1)
287
        {
288
            random_range_value = irandom_range(0, 2)
289
            if (random_range_value == 0)
290
            {
291
                global.enemy_attack = "Crispy Slash"
292
                global.soul_mode = "Red"
293
                global.image_alpha_enemy_attacking_immunity = false
294
            }
295
            else if (random_range_value == 1)
296
            {
297
                global.enemy_attack = "Crispy Laser"
298
                global.soul_mode = "Red"
299
                global.image_alpha_enemy_attacking_immunity = false
300
            }
301
            else if (random_range_value == 2)
302
            {
303
                global.enemy_attack = "Crispy Tub"
304
                global.soul_mode = "Red"
305
                global.image_alpha_enemy_attacking_immunity = false
306
            }
307
        }
308
        else if ((enemy_dead + enemy_spared) >= 1)
309
        {
310
            random_range_value = irandom_range(0, 1)
311
            if (random_range_value == 0)
312
            {
313
                global.enemy_attack = "Penilla Drawing"
314
                global.soul_mode = "Red"
315
                global.image_alpha_enemy_attacking_immunity = false
316
            }
317
            else if (random_range_value == 1)
318
            {
319
                global.enemy_attack = "Penilla Lines"
320
                global.soul_mode = "Red"
321
                global.image_alpha_enemy_attacking_immunity = false
322
            }
323
        }
324
    }
325
    else if (battle_enemy_name == "rorrim solo")
326
    {
327
        random_range_value = irandom_range(0, 1)
328
        if (random_range_value == 0)
329
        {
330
            global.enemy_attack = "Rorrim Mirror"
331
            global.soul_mode = "Red"
332
            global.image_alpha_enemy_attacking_immunity = false
333
        }
334
        else if (random_range_value == 1)
335
        {
336
            global.enemy_attack = "Rorrim Sparkle"
337
            global.soul_mode = "Red"
338
            global.image_alpha_enemy_attacking_immunity = false
339
        }
340
    }
341
    else if (battle_enemy_name == "decibat")
342
    {
343
        if (turns_passed > 5)
344
        {
345
            global.turns_passed = 5
346
            turns_passed = global.turns_passed
347
        }
348
        if (turns_passed == 0)
349
        {
350
            global.enemy_attack = "Decibat Wave Blue"
351
            global.soul_mode = "Red"
352
            global.image_alpha_enemy_attacking_immunity = true
353
        }
354
        else if (turns_passed == 1)
355
        {
356
            global.enemy_attack = "Decibat Wave Orange"
357
            global.soul_mode = "Red"
358
            global.image_alpha_enemy_attacking_immunity = true
359
        }
360
        else if (turns_passed == 2)
361
        {
362
            global.enemy_attack = "Decibat Wave Multi"
363
            global.soul_mode = "Red"
364
            global.image_alpha_enemy_attacking_immunity = true
365
        }
366
        else if (turns_passed == 3)
367
        {
368
            global.enemy_attack = "Decibat Wave Mini"
369
            global.soul_mode = "Red"
370
            global.image_alpha_enemy_attacking_immunity = true
371
        }
372
        else if (turns_passed == 4)
373
        {
374
            global.enemy_attack = "Decibat Stalagmite"
375
            global.soul_mode = "Red"
376
            global.image_alpha_enemy_attacking_immunity = false
377
        }
378
        else if (turns_passed == 5)
379
        {
380
            random_range_value = irandom_range(0, 2)
381
            if (random_range_value == 0)
382
            {
383
                global.enemy_attack = "Decibat Wave Multi"
384
                global.soul_mode = "Red"
385
                global.image_alpha_enemy_attacking_immunity = true
386
            }
387
            else if (random_range_value == 1)
388
            {
389
                global.enemy_attack = "Decibat Wave Mini"
390
                global.soul_mode = "Red"
391
                global.image_alpha_enemy_attacking_immunity = true
392
            }
393
            else if (random_range_value == 2)
394
            {
395
                global.enemy_attack = "Decibat Stalagmite"
396
                global.soul_mode = "Red"
397
                global.image_alpha_enemy_attacking_immunity = false
398
            }
399
        }
400
    }
401
    else if (battle_enemy_name == "dalv")
402
    {
403
        if (turns_passed > 11)
404
        {
405
            global.turns_passed = 11
406
            turns_passed = global.turns_passed
407
        }
408
        if (global.determine_attack_priority == 1)
409
        {
410
            if (turns_passed <= 11)
411
            {
412
                if (global.enemy_attack == "Dalv Start" || global.enemy_attack == "Dalv Lightning Bolt")
413
                {
414
                    global.enemy_attack = "Dalv Lightning Vertical"
415
                    global.soul_mode = "Red"
416
                    global.image_alpha_enemy_attacking_immunity = false
417
                }
418
                else if (global.enemy_attack == "Dalv Lightning Vertical")
419
                {
420
                    global.enemy_attack = "Dalv Lightning Dual"
421
                    global.soul_mode = "Red"
422
                    global.image_alpha_enemy_attacking_immunity = false
423
                }
424
                else if (global.enemy_attack == "Dalv Lightning Dual")
425
                {
426
                    global.enemy_attack = "Dalv Lightning Balls"
427
                    global.soul_mode = "Red"
428
                    global.image_alpha_enemy_attacking_immunity = false
429
                }
430
                else if (global.enemy_attack == "Dalv Lightning Balls")
431
                {
432
                    global.enemy_attack = "Dalv Lightning Shift"
433
                    global.soul_mode = "Red"
434
                    global.image_alpha_enemy_attacking_immunity = false
435
                }
436
                else if (global.enemy_attack == "Dalv Lightning Shift")
437
                {
438
                    global.enemy_attack = "Dalv Lightning Spinner"
439
                    global.soul_mode = "Red"
440
                    global.image_alpha_enemy_attacking_immunity = false
441
                }
442
                else if (global.enemy_attack == "Dalv Lightning Spinner")
443
                {
444
                    global.enemy_attack = "Dalv Lightning Bolt"
445
                    global.soul_mode = "Red"
446
                    global.image_alpha_enemy_attacking_immunity = true
447
                }
448
            }
449
            if (turns_passed == 8)
450
            {
451
                var enemy_mode = global.enemy_mode
452
                switch enemy_mode
453
                {
454
                    case 2:
455
                        global.enemy_sparing = true
456
                        break
457
                }
458
459
            }
460
            else if (turns_passed == 9 && global.enemy_mode == 1 && global.enemy_mode_gen == 0)
461
                global.enemy_sparing = true
462
            else if (turns_passed == 10)
463
            {
464
                enemy_mode = global.enemy_mode
465
                switch enemy_mode
466
                {
467
                    case 0:
468
                        if (global.enemy_sparing == false && global.enemy_mode_gen == 0)
469
                            global.action_2_important = true
470
                }
471
472
            }
473
        }
474
    }
475
    else if (battle_enemy_name == "micro froggit")
476
    {
477
        random_range_value = irandom_range(0, 1)
478
        if (random_range_value == 0)
479
        {
480
            global.enemy_attack = "Micro Fly"
481
            global.soul_mode = "Red"
482
            global.image_alpha_enemy_attacking_immunity = false
483
        }
484
        else if (random_range_value == 1)
485
        {
486
            global.enemy_attack = "Micro Barrage"
487
            global.soul_mode = "Red"
488
            global.image_alpha_enemy_attacking_immunity = false
489
        }
490
    }
491
    else if (battle_enemy_name == "insomnitot solo")
492
    {
493
        random_range_value = irandom_range(0, 2)
494
        if (random_range_value == 0)
495
        {
496
            global.enemy_attack = "Insomnitot Sheep"
497
            global.soul_mode = "Red"
498
            global.image_alpha_enemy_attacking_immunity = false
499
        }
500
        else if (random_range_value == 1)
501
        {
502
            global.enemy_attack = "Insomnitot ZZZ"
503
            global.soul_mode = "Red"
504
            global.image_alpha_enemy_attacking_immunity = false
505
        }
506
        else if (random_range_value == 2)
507
        {
508
            global.enemy_attack = "Insomnitot Stars"
509
            global.soul_mode = "Red"
510
            global.image_alpha_enemy_attacking_immunity = false
511
        }
512
    }
513
    else if (battle_enemy_name == "insomnitot duo")
514
    {
515
        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))))
516
        {
517
            random_range_value = 1
518
            if (random_range_value == 0)
519
            {
520
                global.enemy_attack = "Insomnitot Sheep ZZZ"
521
                global.soul_mode = "Red"
522
                global.image_alpha_enemy_attacking_immunity = false
523
            }
524
            else if (random_range_value == 1)
525
            {
526
                global.enemy_attack = "Insomnitot Sheep Stars"
527
                global.soul_mode = "Red"
528
                global.image_alpha_enemy_attacking_immunity = false
529
            }
530
        }
531
        else
532
        {
533
            random_range_value = irandom_range(0, 2)
534
            if (random_range_value == 0)
535
            {
536
                global.enemy_attack = "Insomnitot Sheep"
537
                global.soul_mode = "Red"
538
                global.image_alpha_enemy_attacking_immunity = false
539
            }
540
            else if (random_range_value == 1)
541
            {
542
                global.enemy_attack = "Insomnitot ZZZ"
543
                global.soul_mode = "Red"
544
                global.image_alpha_enemy_attacking_immunity = false
545
            }
546
            else if (random_range_value == 2)
547
            {
548
                global.enemy_attack = "Insomnitot Stars"
549
                global.soul_mode = "Red"
550
                global.image_alpha_enemy_attacking_immunity = false
551
            }
552
        }
553
    }
554
    else if (battle_enemy_name == "know cone solo")
555
    {
556
        random_range_value = irandom_range(0, 9)
557
        if (random_range_value >= 0 && random_range_value <= 2)
558
        {
559
            global.enemy_attack = "Know Cone Blueberries"
560
            global.soul_mode = "Red"
561
            global.image_alpha_enemy_attacking_immunity = false
562
        }
563
        else if (random_range_value >= 3 && random_range_value <= 5)
564
        {
565
            global.enemy_attack = "Know Cone Oranges"
566
            global.soul_mode = "Red"
567
            global.image_alpha_enemy_attacking_immunity = false
568
        }
569
        else if (random_range_value >= 6 && random_range_value <= 8)
570
        {
571
            global.enemy_attack = "Know Cone Cherries"
572
            global.soul_mode = "Red"
573
            global.image_alpha_enemy_attacking_immunity = false
574
        }
575
        else if (random_range_value == 9)
576
        {
577
            global.enemy_attack = "Know Cone Fig"
578
            global.soul_mode = "Red"
579
            global.image_alpha_enemy_attacking_immunity = false
580
        }
581
    }
582
    else if (battle_enemy_name == "know cone insomnitot duo")
583
    {
584
        if ((enemy_dead + enemy_spared + enemy_dead_2 + enemy_spared_2) < 1 && (!((global.enemy_sparing_2 == true && global.enemy_low_hp_2 == false))))
585
        {
586
            random_range_value = irandom_range(0, 1)
587
            if (random_range_value == 0)
588
            {
589
                global.enemy_attack = "Know Cone Blueberries ZZZ"
590
                global.soul_mode = "Red"
591
                global.image_alpha_enemy_attacking_immunity = false
592
            }
593
            else if (random_range_value == 1)
594
            {
595
                global.enemy_attack = "Know Cone Oranges Stars"
596
                global.soul_mode = "Red"
597
                global.image_alpha_enemy_attacking_immunity = false
598
            }
599
        }
600
        else if ((enemy_dead_2 + enemy_spared_2) >= 1 || (global.enemy_sparing_2 == true && global.enemy_low_hp_2 == false))
601
        {
602
            random_range_value = irandom_range(0, 9)
603
            if (random_range_value >= 0 && random_range_value <= 2)
604
            {
605
                global.enemy_attack = "Know Cone Blueberries"
606
                global.soul_mode = "Red"
607
                global.image_alpha_enemy_attacking_immunity = false
608
            }
609
            else if (random_range_value >= 3 && random_range_value <= 5)
610
            {
611
                global.enemy_attack = "Know Cone Oranges"
612
                global.soul_mode = "Red"
613
                global.image_alpha_enemy_attacking_immunity = false
614
            }
615
            else if (random_range_value >= 6 && random_range_value <= 8)
616
            {
617
                global.enemy_attack = "Know Cone Cherries"
618
                global.soul_mode = "Red"
619
                global.image_alpha_enemy_attacking_immunity = false
620
            }
621
            else if (random_range_value == 9)
622
            {
623
                global.enemy_attack = "Know Cone Fig"
624
                global.soul_mode = "Red"
625
                global.image_alpha_enemy_attacking_immunity = false
626
            }
627
        }
628
        else if ((enemy_dead + enemy_spared) >= 1)
629
        {
630
            random_range_value = irandom_range(0, 2)
631
            if (random_range_value == 0)
632
            {
633
                global.enemy_attack = "Insomnitot Sheep"
634
                global.soul_mode = "Red"
635
                global.image_alpha_enemy_attacking_immunity = false
636
            }
637
            else if (random_range_value == 1)
638
            {
639
                global.enemy_attack = "Insomnitot ZZZ"
640
                global.soul_mode = "Red"
641
                global.image_alpha_enemy_attacking_immunity = false
642
            }
643
            else if (random_range_value == 2)
644
            {
645
                global.enemy_attack = "Insomnitot Stars"
646
                global.soul_mode = "Red"
647
                global.image_alpha_enemy_attacking_immunity = false
648
            }
649
        }
650
    }
651
    else if (battle_enemy_name == "frostermit solo")
652
    {
653
        enemy_mode = global.enemy_mode
654
        switch enemy_mode
655
        {
656
            case 0:
657
                random_range_value = irandom_range(0, 1)
658
                break
659
            case 1:
660
                random_range_value = irandom_range(0, 2)
661
                break
662
            default:
663
                random_range_value = irandom_range(0, 1)
664
        }
665
666
        if (random_range_value == 0)
667
        {
668
            global.enemy_attack = "Frostermit Snowflakes"
669
            global.soul_mode = "Red"
670
            global.image_alpha_enemy_attacking_immunity = false
671
        }
672
        else if (random_range_value == 1)
673
        {
674
            global.enemy_attack = "Frostermit Ice Cubes"
675
            global.soul_mode = "Red"
676
            global.image_alpha_enemy_attacking_immunity = false
677
        }
678
        else if (random_range_value == 2)
679
        {
680
            global.enemy_attack = "Frostermit Pinchers"
681
            global.soul_mode = "Red"
682
            global.image_alpha_enemy_attacking_immunity = false
683
        }
684
    }
685
    else if (battle_enemy_name == "frostermit know cone duo")
686
    {
687
        if ((enemy_dead + enemy_spared + enemy_dead_2 + enemy_spared_2) < 1)
688
        {
689
            random_range_value = irandom_range(0, 1)
690
            if (random_range_value == 0)
691
            {
692
                global.enemy_attack = "Frostermit Snowflakes Blueberries"
693
                global.soul_mode = "Red"
694
                global.image_alpha_enemy_attacking_immunity = false
695
            }
696
            else if (random_range_value == 1)
697
            {
698
                global.enemy_attack = "Frostermit Snowflakes Oranges"
699
                global.soul_mode = "Red"
700
                global.image_alpha_enemy_attacking_immunity = false
701
            }
702
        }
703
        else if ((enemy_dead_2 + enemy_spared_2) >= 1)
704
        {
705
            enemy_mode = global.enemy_mode
706
            switch enemy_mode
707
            {
708
                case 0:
709
                    random_range_value = irandom_range(0, 1)
710
                    break
711
                case 1:
712
                    random_range_value = irandom_range(0, 2)
713
                    break
714
                default:
715
                    random_range_value = irandom_range(0, 1)
716
            }
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
            return;
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
            return;
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
1336
        global.soul_mode = "Red"
1337
        global.image_alpha_enemy_attacking_immunity = false
1338
    }
1339
    else if (battle_enemy_name == "steam minifight")
1340
    {
1341
        global.enemy_attack = "Steam Puffs"
1342
        global.soul_mode = "Red"
1343
        global.image_alpha_enemy_attacking_immunity = false
1344
    }
1345
    else if (battle_enemy_name == "energy balls minifight")
1346
    {
1347
        global.enemy_attack = "Energy Balls"
1348
        global.soul_mode = "Red"
1349
        global.image_alpha_enemy_attacking_immunity = false
1350
    }
1351
    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))
1352
    {
1353
        if (global.last_action_selected == "Action 2 Message 0" || global.last_action_selected_2 == "Action 2 Message 0")
1354
        {
1355
            global.enemy_attack = "Garbage Cans"
1356
            global.soul_mode = "Red"
1357
            global.image_alpha_enemy_attacking_immunity = false
1358
        }
1359
        else
1360
        {
1361
            random_range_value = irandom_range(0, 1)
1362
            if (random_range_value == 0)
1363
            {
1364
                global.enemy_attack = "Spray Bottle"
1365
                global.soul_mode = "Red"
1366
                global.image_alpha_enemy_attacking_immunity = false
1367
            }
1368
            else if (random_range_value == 1)
1369
            {
1370
                global.enemy_attack = "Slippery Floor"
1371
                global.soul_mode = "Red"
1372
                global.image_alpha_enemy_attacking_immunity = false
1373
            }
1374
        }
1375
    }
1376
    else if (battle_enemy_name == "jandroid duo")
1377
    {
1378
        if (global.last_action_selected == "Action 2 Message 0" || global.last_action_selected_2 == "Action 2 Message 0")
1379
        {
1380
            global.enemy_attack = "Double Jandroid Gargbage Cans"
1381
            global.soul_mode = "Red"
1382
            global.image_alpha_enemy_attacking_immunity = false
1383
        }
1384
        else
1385
        {
1386
            random_range_value = irandom_range(0, 0)
1387
            if (random_range_value == 0)
1388
            {
1389
                global.enemy_attack = "Double Jandroid Slippery Floor"
1390
                global.soul_mode = "Red"
1391
                global.image_alpha_enemy_attacking_immunity = false
1392
            }
1393
        }
1394
    }
1395
    else if (battle_enemy_name == "goosic" || (battle_enemy_name == "jandroid goosic duo" && (enemy_dead + enemy_spared) >= 1))
1396
    {
1397
        random_range_value = irandom_range(0, 2)
1398
        if (random_range_value == 0)
1399
        {
1400
            global.enemy_attack = "Goosic Speaker"
1401
            global.soul_mode = "Red"
1402
            global.image_alpha_enemy_attacking_immunity = false
1403
        }
1404
        else if (random_range_value == 1)
1405
        {
1406
            global.enemy_attack = "Goosic Disk"
1407
            global.soul_mode = "Red"
1408
            global.image_alpha_enemy_attacking_immunity = false
1409
        }
1410
        else if (random_range_value == 2)
1411
        {
1412
            global.enemy_attack = "Goosic EQ Visualizer"
1413
            global.soul_mode = "Red"
1414
            global.image_alpha_enemy_attacking_immunity = false
1415
        }
1416
    }
1417
    else if (battle_enemy_name == "jandroid goosic duo")
1418
    {
1419
        show_debug_message(global.last_action_selected)
1420
        if (global.last_action_selected == "Action 2 Message 0")
1421
        {
1422
            global.enemy_attack = "Jandroid Goosic Attack 2"
1423
            global.soul_mode = "Red"
1424
            global.image_alpha_enemy_attacking_immunity = false
1425
        }
1426
        else
1427
        {
1428
            global.enemy_attack = "Jandroid Goosic Attack 1"
1429
            global.soul_mode = "Red"
1430
            global.image_alpha_enemy_attacking_immunity = false
1431
        }
1432
    }
1433
    else if (battle_enemy_name == "tellyvis")
1434
    {
1435
        random_range_value = irandom_range(0, 2)
1436
        if (random_range_value == 0)
1437
        {
1438
            global.enemy_attack = "Tellyvis Logo"
1439
            global.soul_mode = "Red"
1440
            global.image_alpha_enemy_attacking_immunity = false
1441
        }
1442
        else if (random_range_value == 1)
1443
        {
1444
            global.enemy_attack = "Tellyvis Remote"
1445
            global.soul_mode = "Red"
1446
            global.image_alpha_enemy_attacking_immunity = false
1447
        }
1448
        else if (random_range_value == 2)
1449
        {
1450
            global.enemy_attack = "Tellyvis Tape"
1451
            global.soul_mode = "Red"
1452
            global.image_alpha_enemy_attacking_immunity = false
1453
        }
1454
    }
1455
    else if (battle_enemy_name == "sousborg")
1456
    {
1457
        global.soul_mode = "Red"
1458
        global.image_alpha_enemy_attacking_immunity = false
1459
    }
1460
    else if (battle_enemy_name == "axis")
1461
    {
1462
        turns_passed = global.special_action_count
1463
        if global.enemy_sparing
1464
            global.enemy_attack = "Guardener No Attack"
1465
        if ((instance_exists(obj_battlebox_controller_axis) && obj_battlebox_controller_axis.axis_trash_meter >= 100) || turns_passed != global.special_action_count_last)
1466
        {
1467
            global.enemy_attack = "Super Ball 1"
1468
            global.image_alpha_enemy_attacking_immunity = false
1469
        }
1470
        else
1471
        {
1472
            switch global.attack_cycle
1473
            {
1474
                case 0:
1475
                    global.enemy_attack = "Introductory Attack"
1476
                    break
1477
                case 1:
1478
                    global.enemy_attack = "Energy Balls 1"
1479
                    break
1480
                case 2:
1481
                    global.enemy_attack = "Energy Balls 2"
1482
                    break
1483
                case 3:
1484
                    global.enemy_attack = "Energy Balls Spin 1"
1485
                    break
1486
                case 4:
1487
                    global.enemy_attack = "Hand Laser"
1488
                    break
1489
                case 5:
1490
                    global.enemy_attack = "Color Lasers"
1491
                    break
1492
                case 6:
1493
                    global.enemy_attack = "Color Lasers 2"
1494
                    break
1495
                case 7:
1496
                    global.enemy_attack = "Steam Walls Spin"
1497
                    break
1498
                case 8:
1499
                    global.enemy_attack = "Lobbing Bombs"
1500
                    break
1501
                case 9:
1502
                    global.enemy_attack = "X Colors"
1503
                    break
1504
                case 10:
1505
                    global.enemy_attack = "Lobbing Bombs 2"
1506
                    break
1507
                case 11:
1508
                    global.enemy_attack = "Magnetic Orbs"
1509
                    break
1510
                case 12:
1511
                    global.enemy_attack = "Axis Turrets"
1512
                    break
1513
                case 13:
1514
                    global.enemy_attack = "Axis Turrets 2"
1515
                    break
1516
                case 14:
1517
                    global.enemy_attack = "Laser Grid"
1518
                    break
1519
                case 15:
1520
                    global.enemy_attack = "Pulse Energy"
1521
                    break
1522
                case 16:
1523
                    global.enemy_attack = "Axis Turrets 3"
1524
                    break
1525
            }
1526
1527
            global.image_alpha_enemy_attacking_immunity = false
1528
        }
1529
        global.soul_mode = "Red"
1530
    }
1531
    else if (battle_enemy_name == "axis genocide")
1532
    {
1533
        if global.enemy_sparing
1534
            global.enemy_attack = "Guardener No Attack"
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
1571
            global.image_alpha_enemy_attacking_immunity = false
1572
        }
1573
        global.soul_mode = "Red"
1574
    }
1575
    else if (battle_enemy_name == "macro froggit")
1576
    {
1577
        switch global.turns_passed
1578
        {
1579
            case 0:
1580
                global.enemy_attack = "Macro Transform"
1581
                break
1582
            case 1:
1583
                global.enemy_attack = "Tongue Attack"
1584
                break
1585
            case 2:
1586
                global.enemy_attack = "Frogger"
1587
                break
1588
            case 3:
1589
                global.enemy_attack = "Flies Bullet Hell"
1590
                break
1591
            case 4:
1592
                global.enemy_attack = "Log Frogs"
1593
                break
1594
            case 5:
1595
                global.enemy_attack = "Gun Flies"
1596
                break
1597
            case 6:
1598
                global.enemy_attack = "Space Frog"
1599
                break
1600
            case 7:
1601
                global.enemy_attack = "Big Frogs"
1602
                break
1603
            case 8:
1604
                global.enemy_attack = "Frog Choir"
1605
                break
1606
            case 9:
1607
                global.enemy_attack = "Sword Frog"
1608
                break
1609
            case 10:
1610
                global.enemy_attack = "Mecha Frog"
1611
                break
1612
        }
1613
1614
        global.image_alpha_enemy_attacking_immunity = false
1615
        global.soul_mode = "Red"
1616
    }
1617
    else if (battle_enemy_name == "guardener")
1618
    {
1619
        if (global.turns_passed > 9 && global.enemy_mode == 0)
1620
            global.turns_passed = 9
1621
        switch global.turns_passed
1622
        {
1623
            case 0:
1624
                global.enemy_attack = "Guardener Attack 1"
1625
                break
1626
            case 1:
1627
                global.enemy_attack = "Guardener Attack 2"
1628
                break
1629
            case 2:
1630
                global.enemy_attack = "Guardener Attack 3"
1631
                break
1632
            case 3:
1633
                global.enemy_attack = "Guardener Attack 4"
1634
                break
1635
            case 4:
1636
                global.enemy_attack = "Guardener Attack 5"
1637
                break
1638
            case 5:
1639
                global.enemy_attack = "Guardener Attack 7"
1640
                break
1641
            case 6:
1642
                global.enemy_attack = "Guardener Attack 8"
1643
                break
1644
            case 7:
1645
                global.enemy_attack = "Guardener Attack 6"
1646
                break
1647
            case 8:
1648
                global.enemy_attack = "Guardener Attack 9"
1649
                break
1650
            case 9:
1651
                global.enemy_attack = "Guardener Attack " + (string(irandom_range(1, 9)))
1652
                break
1653
            case 10:
1654
                global.enemy_attack = "Guardener Attack 10"
1655
                break
1656
            case 11:
1657
                global.enemy_attack = "Guardener Attack " + (string(choose(irandom_range(1, 5), irandom_range(7, 8))))
1658
                break
1659
            case 12:
1660
                global.enemy_attack = "Guardener Attack 12"
1661
                break
1662
            case 13:
1663
                global.enemy_attack = "Guardener Attack 11"
1664
                break
1665
            case 14:
1666
            case 15:
1667
            case 16:
1668
                global.enemy_attack = "Guardener Attack " + (string(choose(irandom_range(1, 5), irandom_range(7, 8))))
1669
                break
1670
        }
1671
1672
        if global.enemy_sparing
1673
            global.enemy_attack = "Guardener No Attack"
1674
        global.soul_mode = "Red"
1675
        global.image_alpha_enemy_attacking_immunity = false
1676
    }
1677
    else if (battle_enemy_name == "flowey")
1678
    {
1679
        switch global.turns_passed
1680
        {
1681
            case 0:
1682
                global.enemy_attack = "Flowey Opener"
1683
                break
1684
        }
1685
1686
        global.soul_mode = "Red"
1687
        global.image_alpha_enemy_attacking_immunity = false
1688
    }
1689
    else if (battle_enemy_name == "ceroba")
1690
    {
1691
        if instance_exists(obj_ceroba_phase_2_shield)
1692
        {
1693
            if (obj_ceroba_phase_2_shield.scene >= 9)
1694
            {
1695
                global.enemy_attack = "Ceroba Shield Defense"
1696
                global.soul_mode = "Red"
1697
                global.image_alpha_enemy_attacking_immunity = false
1698
                return;
1699
            }
1700
        }
1701
        switch global.attack_cycle
1702
        {
1703
            case 0:
1704
                global.enemy_attack = "Ceroba Bullets"
1705
                break
1706
            case 1:
1707
                global.enemy_attack = "Ceroba Shotgun Pacifist"
1708
                break
1709
            case 2:
1710
                global.enemy_attack = "Ceroba Leaves"
1711
                break
1712
            case 3:
1713
                global.enemy_attack = "Ceroba Diamond Pacifist"
1714
                break
1715
            case 4:
1716
                global.enemy_attack = "Ceroba Flower Circle Pacifist"
1717
                break
1718
            case 5:
1719
                global.enemy_attack = "Ceroba Bells"
1720
                break
1721
            case 6:
1722
                global.enemy_attack = "Ceroba Black Hole"
1723
                break
1724
            case 7:
1725
                global.enemy_attack = "Ceroba Pillars"
1726
                break
1727
            case 8:
1728
                global.enemy_attack = "Ceroba Staff"
1729
                break
1730
            case 9:
1731
                global.enemy_attack = "Ceroba Rotating Bullets"
1732
                break
1733
            case 10:
1734
                global.enemy_attack = "Ceroba Transform 1"
1735
                break
1736
            case 11:
1737
                global.enemy_attack = "Ceroba Phase 2 P1 Lanterns"
1738
                break
1739
            case 12:
1740
                global.enemy_attack = "Ceroba Phase 2 P1 Spawner Mask"
1741
                break
1742
            case 13:
1743
                global.enemy_attack = "Ceroba Phase 2 P1 Circling Lanterns"
1744
                break
1745
            case 14:
1746
                global.enemy_attack = "Ceroba Phase 2 P1 Falling Bells"
1747
                break
1748
            case 15:
1749
                global.attack_cycle = 16
1750
            case 16:
1751
                global.enemy_attack = "Ceroba Phase 2 P1 Obstacles"
1752
                break
1753
            case 17:
1754
                global.enemy_attack = "Ceroba Phase 2 P1 Ribbon Attack"
1755
                break
1756
            case 18:
1757
                global.enemy_attack = "Ceroba Phase 2 Spawner"
1758
                if (global.hotland_flag[2] == 3)
1759
                    global.enemy_attack = "Ceroba Phase 2 Spawner 2"
1760
                break
1761
            case 19:
1762
                global.enemy_attack = "Ceroba Special Attack"
1763
                break
1764
        }
1765
1766
        if global.enemy_sparing
1767
            global.enemy_attack = "Guardener No Attack"
1768
        global.soul_mode = "Red"
1769
        global.image_alpha_enemy_attacking_immunity = false
1770
    }
1771
    else if (battle_enemy_name == "martlet genocide final")
1772
    {
1773
        switch global.attack_cycle
1774
        {
1775
            case 0:
1776
                if (global.hotland_flag[9] < 2)
1777
                    global.enemy_attack = "Martlet Final Opener"
1778
                else
1779
                    global.enemy_attack = "Martlet Final 2 Opener"
1780
                break
1781
            case 1:
1782
                global.enemy_attack = "Splitting Feathers"
1783
                break
1784
            case 2:
1785
                global.enemy_attack = "Talon Scratch"
1786
                break
1787
            case 3:
1788
                global.enemy_attack = "Martlet Wings"
1789
                break
1790
            case 4:
1791
                global.enemy_attack = "Splitting Feathers + Talon Scratch"
1792
                break
1793
            case 5:
1794
                global.enemy_attack = "Splitting Feathers + Martlet Wings"
1795
                break
1796
            case 6:
1797
                global.enemy_attack = "Talon Scratch + Martlet Wings"
1798
                break
1799
            case 7:
1800
                global.enemy_attack = "Martlet Feather Circle Final"
1801
                break
1802
            case 8:
1803
                global.enemy_attack = "Circular Scratch"
1804
                break
1805
            case 9:
1806
                global.enemy_attack = "Falling Meteors"
1807
                break
1808
            case 10:
1809
                global.enemy_attack = "Feathers Meteors"
1810
                break
1811
            case 11:
1812
                global.enemy_attack = "Splitting Feathers + Talon Scratch 2"
1813
                break
1814
            case 20:
1815
                global.enemy_attack = "Martlet Talon Walls"
1816
                break
1817
            case 21:
1818
                global.enemy_attack = "Wing Gust Final"
1819
                break
1820
            case 30:
1821
                global.enemy_attack = "Martlet Blocks"
1822
                break
1823
            case 31:
1824
                global.enemy_attack = "Martlet Gauntlet 1"
1825
                break
1826
            case 32:
1827
                global.enemy_attack = "Martlet Blocks 2"
1828
                break
1829
            case 33:
1830
                global.enemy_attack = "Martlet Gauntlet 2"
1831
                break
1832
            case 40:
1833
                global.enemy_attack = "Martlet Phase 2 Blocks"
1834
                break
1835
            case 41:
1836
                global.enemy_attack = "Martlet Phase 2 Blocks 2"
1837
                break
1838
            case 42:
1839
                global.enemy_attack = "Martlet Phase 2 Blocks 3"
1840
                break
1841
            case 43:
1842
                global.enemy_attack = "Martlet Phase 2 Blocks 4"
1843
                break
1844
        }
1845
1846
        global.soul_mode = "Red"
1847
        global.image_alpha_enemy_attacking_immunity = false
1848
    }
1849
}