Undertale Yellow script viewer

← back to main script listing

gml_GlobalScript_scr_determine_end_battle_flags_yellow_new

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

function scr_determine_end_battle_flags_yellow_new() //gml_Script_scr_determine_end_battle_flags_yellow_new { if (global.battling_boss == true) var battle_enemy_name = global.battle_enemy_name else { var act_number = global.act_number switch act_number { case 1: battle_enemy_name = global.battle_enemy_name_1 break case 2: battle_enemy_name = global.battle_enemy_name_2 break case 3: battle_enemy_name = global.battle_enemy_name_3 break default: battle_enemy_name = global.battle_enemy_name_1 } } if (battle_enemy_name == "froggit intro") { if (global.enemy_dead == true) global.ruins_flag[1] = 2 else global.ruins_flag[1] = 1 } else if (battle_enemy_name == "flowey intro") global.dark_ruins_flag[2] = 1 else if (battle_enemy_name == "flier a") global.dark_ruins_flag[3] = 1 else if (battle_enemy_name == "penilla a") global.dark_ruins_flag[7] = 1 else if (battle_enemy_name == "sweet corn a") global.dark_ruins_flag[8] = 1 else if (battle_enemy_name == "crispy scroll a") global.dark_ruins_flag[14] = 1 else if (battle_enemy_name == "rorrim a") global.dark_ruins_flag[12] = 1 else if (battle_enemy_name == "decibat") { if (global.enemy_spared == true && global.action_2_selected_count >= 5) global.dark_ruins_flag[13] = 1 else global.dark_ruins_flag[13] = 2 } else if (battle_enemy_name == "dalv") { if (global.enemy_spared == true) global.dark_ruins_flag[21] = 1 else global.dark_ruins_flag[21] = 2 } else if (battle_enemy_name == "micro froggit") { if (global.enemy_spared == true) global.dark_ruins_flag[17] = 1 else global.dark_ruins_flag[17] = 2 } else if (battle_enemy_name == "frostermit a") global.snowdin_flag_enemy[1] = 1 else if (battle_enemy_name == "insomnitot a") global.snowdin_flag_enemy[2] = 1 else if (battle_enemy_name == "know cone a") global.snowdin_flag_enemy[3] = 1 else if (battle_enemy_name == "trihecta" || battle_enemy_name == "tri") global.snowdin_flag_enemy[4] = 1 else if (battle_enemy_name == "martlet pacifist") { if (global.enemy_mode == 10) { } else if (global.enemy_mode == 11) { } else if (global.enemy_mode == 12) { } } else if (battle_enemy_name == "martlet genocide") { if (global.enemy_mode == 5) { } else if (global.enemy_betrayed == true) { } else if (global.enemy_spared == true) { } } else if (battle_enemy_name == "shufflers") global.snowdin_flag[8] = 1 else if (battle_enemy_name == "shufflers") global.snowdin_flag[8] = 1 }
() //gml_Script_scr_determine_end_battle_flags_yellow_new
2
{
3
    if (global.battling_boss == true)
4
        var battle_enemy_name = global.battle_enemy_name
5
    else
6
    {
7
        var act_number = global.act_number
8
        switch act_number
9
        {
10
            case 1:
11
                battle_enemy_name = global.battle_enemy_name_1
12
                break
13
            case 2:
14
                battle_enemy_name = global.battle_enemy_name_2
15
                break
16
            case 3:
17
                battle_enemy_name = global.battle_enemy_name_3
18
                break
19
            default:
20
                battle_enemy_name = global.battle_enemy_name_1
21
        }
22
23
    }
24
    if (battle_enemy_name == "froggit intro")
25
    {
26
        if (global.enemy_dead == true)
27
            global.ruins_flag[1] = 2
28
        else
29
            global.ruins_flag[1] = 1
30
    }
31
    else if (battle_enemy_name == "flowey intro")
32
        global.dark_ruins_flag[2] = 1
33
    else if (battle_enemy_name == "flier a")
34
        global.dark_ruins_flag[3] = 1
35
    else if (battle_enemy_name == "penilla a")
36
        global.dark_ruins_flag[7] = 1
37
    else if (battle_enemy_name == "sweet corn a")
38
        global.dark_ruins_flag[8] = 1
39
    else if (battle_enemy_name == "crispy scroll a")
40
        global.dark_ruins_flag[14] = 1
41
    else if (battle_enemy_name == "rorrim a")
42
        global.dark_ruins_flag[12] = 1
43
    else if (battle_enemy_name == "decibat")
44
    {
45
        if (global.enemy_spared == true && global.action_2_selected_count >= 5)
46
            global.dark_ruins_flag[13] = 1
47
        else
48
            global.dark_ruins_flag[13] = 2
49
    }
50
    else if (battle_enemy_name == "dalv")
51
    {
52
        if (global.enemy_spared == true)
53
            global.dark_ruins_flag[21] = 1
54
        else
55
            global.dark_ruins_flag[21] = 2
56
    }
57
    else if (battle_enemy_name == "micro froggit")
58
    {
59
        if (global.enemy_spared == true)
60
            global.dark_ruins_flag[17] = 1
61
        else
62
            global.dark_ruins_flag[17] = 2
63
    }
64
    else if (battle_enemy_name == "frostermit a")
65
        global.snowdin_flag_enemy[1] = 1
66
    else if (battle_enemy_name == "insomnitot a")
67
        global.snowdin_flag_enemy[2] = 1
68
    else if (battle_enemy_name == "know cone a")
69
        global.snowdin_flag_enemy[3] = 1
70
    else if (battle_enemy_name == "trihecta" || battle_enemy_name == "tri")
71
        global.snowdin_flag_enemy[4] = 1
72
    else if (battle_enemy_name == "martlet pacifist")
73
    {
74
        if (global.enemy_mode == 10)
75
        {
76
        }
77
        else if (global.enemy_mode == 11)
78
        {
79
        }
80
        else if (global.enemy_mode == 12)
81
        {
82
        }
83
    }
84
    else if (battle_enemy_name == "martlet genocide")
85
    {
86
        if (global.enemy_mode == 5)
87
        {
88
        }
89
        else if (global.enemy_betrayed == true)
90
        {
91
        }
92
        else if (global.enemy_spared == true)
93
        {
94
        }
95
    }
96
    else if (battle_enemy_name == "shufflers")
97
        global.snowdin_flag[8] = 1
98
    else if (battle_enemy_name == "shufflers")
99
        global.snowdin_flag[8] = 1
100
}