Undertale Yellow script viewer

← back to main script listing

gml_GlobalScript_scr_determine_enemy_battle_genocide_yellow

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

function scr_determine_enemy_battle_genocide_yellow() //gml_Script_scr_determine_enemy_battle_genocide_yellow { var current_world_value = script_execute(gml_Script_scr_determine_world_value_yellow) var enemy_count = global.enemy_count var part_1 = 0 var part_2 = 0 switch current_world_value { case 1: part_1 = global.dark_ruins_genocide_max_total - global.dark_ruins_genocide_counter_total break case 2: part_1 = global.snowdin_genocide_max_total - global.snowdin_genocide_counter_total break default: return false; } part_2 += global.enemy_dead if (enemy_count >= 2) part_2 += global.enemy_dead_2 if (enemy_count >= 3) part_2 += global.enemy_dead_3 if ((part_1 - part_2) <= 0) return true; else return false; }
() //gml_Script_scr_determine_enemy_battle_genocide_yellow
2
{
3
    var current_world_value = script_execute(gml_Script_scr_determine_world_value_yellow)
4
    var enemy_count = global.enemy_count
5
    var part_1 = 0
6
    var part_2 = 0
7
    switch current_world_value
8
    {
9
        case 1:
10
            part_1 = global.dark_ruins_genocide_max_total - global.dark_ruins_genocide_counter_total
11
            break
12
        case 2:
13
            part_1 = global.snowdin_genocide_max_total - global.snowdin_genocide_counter_total
14
            break
15
        default:
16
            return false;
17
    }
18
19
    part_2 += global.enemy_dead
20
    if (enemy_count >= 2)
21
        part_2 += global.enemy_dead_2
22
    if (enemy_count >= 3)
23
        part_2 += global.enemy_dead_3
24
    if ((part_1 - part_2) <= 0)
25
        return true;
26
    else
27
        return false;
28
}