Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_ceroba_phase_2_attack_spawner_2_Other_11

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
if (created_spawner != obj_quote_battle_ceroba_outro_4)
4
    created_spawner.attack_stop = true
5
var list_pos = irandom_range(0, (ds_list_size(attack_list) - 1))
6
var attack_choice = ds_list_find_value(attack_list, list_pos)
7
switch attack_choice
8
{
9
    case 0:
10
        created_spawner = instance_create_depth(0, 0, 0, obj_battle_enemy_attack_ceroba_phase_2_p2_spawner_mask)
11
        attack_duration = 90
12
        break
13
    case 1:
14
        created_spawner = instance_create_depth(0, 0, 0, obj_ceroba_attack_bullet_spawner_spawner)
15
        attack_duration = 80
16
        break
17
    case 2:
18
        created_spawner = instance_create_depth(0, 0, -100, obj_battle_enemy_attack_ceroba_phase_2_bell_spawner)
19
        attack_duration = 75
20
        break
21
    case 3:
22
        created_spawner = instance_create_depth(0, 0, 0, obj_ceroba_attack_fire_pillar_spawner)
23
        attack_duration = 40
24
        break
25
    case 4:
26
        created_spawner = instance_create_depth(0, 0, 0, obj_battle_enemy_attack_ceroba_flower_circle_full_checker)
27
        attack_duration = 85
28
        break
29
    case 5:
30
        created_spawner = instance_create_depth(0, 0, 0, obj_battle_enemy_attack_ceroba_diamond_attack_phase2_spawner)
31
        created_spawner.alarm[0] = 10
32
        attack_duration = 20
33
        break
34
    case 6:
35
        created_spawner = instance_create_depth(battle_box.x, battle_box.y, -100, obj_battle_enemy_attack_ceroba_phase_2_p2_rope_circle)
36
        attack_duration = 60
37
        break
38
    case 7:
39
        created_spawner = instance_create_depth(0, 0, -100, obj_battle_enemy_attack_ceroba_phase_2_mask)
40
        attack_duration = 100
41
        break
42
    case 8:
43
        created_spawner = instance_create_depth(0, 0, 0, obj_battle_enemy_attack_ceroba_phase_2_p2_circling_lanterns)
44
        if (alarm[1] > 270)
45
           alarm[1]
46
        attack_duration =alarm[1]
47
        modifier_noloop = true
48
        break
49
    case 9:
50
        created_spawner = instance_create_depth(0, 0, 0, obj_battle_enemy_attack_ceroba_phase_2_p2_obstacle_spawner)
51
        if (alarm[1] > 270)
52
           alarm[1]
53
        attack_duration =alarm[1]
54
        modifier_noloop = true
55
        break
56
}
57
58
if (modifier_enabled == 1 && modifier_noloop == false)
59
{
60
    modifier_noloop = true
61
    if (modifier_attack == 1)
62
        instance_create_depth(0, 0, 0, obj_battle_enemy_attack_ceroba_phase_2_black_hole_checker)
63
    if (modifier_attack == 2)
64
        instance_create_depth(battle_box.x, battle_box.y, -100, obj_battle_enemy_attack_ceroba_phase_2_p2_rope_circle)
65
}
66
show_debug_message("Spawning" + string(attack_choice))
67
if (attack_choice != 8 && attack_choice != 9)
68
   alarm[0]
69
var attack_index = ds_list_find_index(attack_list, 8)
70
ds_list_delete(attack_list, attack_index)
71
attack_index = ds_list_find_index(attack_list, 9)
72
ds_list_delete(attack_list, attack_index)