Undertale Yellow script viewer

← back to main script listing

gml_GlobalScript_scr_determine_special_effect_enemy

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

function scr_determine_special_effect_enemy(argument0) //gml_Script_scr_determine_special_effect_enemy { var battle_enemy_name = global.battle_enemy_name if (global.game_mode == "customs") { } else if (global.game_mode == "yellow") { switch battle_enemy_name { case "martlet pacifist": scr_enemy_mode_shift_martlet_pacifist(argument0) break case "martlet genocide": scr_enemy_mode_shift_martlet_genocide(argument0) break } } global.special_effect_end_value = argument0 }
(argument0) //gml_Script_scr_determine_special_effect_enemy
2
{
3
    var battle_enemy_name = global.battle_enemy_name
4
    if (global.game_mode == "customs")
5
    {
6
    }
7
    else if (global.game_mode == "yellow")
8
    {
9
        switch battle_enemy_name
10
        {
11
            case "martlet pacifist":
12
                scr_enemy_mode_shift_martlet_pacifist
scr_enemy_mode_shift_martlet_pacifist

function scr_enemy_mode_shift_martlet_pacifist(argument0) //gml_Script_scr_enemy_mode_shift_martlet_pacifist { var reset_counters = false var enemy_mode = global.enemy_mode switch enemy_mode { case 0: if (argument0 == "Fight 1") { if (global.enemy_hit == true) { global.enemy_mode_previous = global.enemy_mode global.enemy_mode = 3 reset_counters = true } else if (global.enemy_hit == false) { global.enemy_mode_previous = global.enemy_mode global.enemy_mode = 1 reset_counters = true } } else { global.enemy_mode_previous = global.enemy_mode global.enemy_mode = 4 reset_counters = true } break case 1: if (argument0 == "Fight 1") { if (global.enemy_hit == true) { global.enemy_mode_previous = global.enemy_mode global.enemy_mode = 2 reset_counters = true } else if (global.enemy_hit == false) { if (global.miss_count >= 3) { global.enemy_mode_previous = global.enemy_mode global.enemy_mode = 5 reset_counters = true } } } break case 2: global.enemy_mode_previous = global.enemy_mode global.enemy_mode = 3 reset_counters = true break case 3: if (argument0 == "Fight 1") { if (global.enemy_hit == true) { if (global.hit_count >= 7) { global.enemy_mode_previous = global.enemy_mode global.enemy_mode = 10 reset_counters = true } } else if (global.enemy_hit == false) { if ((global.no_hit_count + global.miss_count) >= 3) { global.enemy_mode_previous = global.enemy_mode global.enemy_mode = 5 reset_counters = true } } } else if ((global.no_hit_count + global.miss_count) >= 3) { global.enemy_mode_previous = global.enemy_mode global.enemy_mode = 5 reset_counters = true } break case 4: if (argument0 == "Fight 1") { if (global.enemy_hit == true) { global.enemy_mode_previous = global.enemy_mode global.enemy_mode = 2 reset_counters = true } else if (global.turns_passed >= 4) { global.enemy_mode_previous = global.enemy_mode global.enemy_mode = 5 reset_counters = true } } else if (global.turns_passed >= 4) { ...
(argument0)
13
                break
14
            case "martlet genocide":
15
                scr_enemy_mode_shift_martlet_genocide
scr_enemy_mode_shift_martlet_genocide

function scr_enemy_mode_shift_martlet_genocide(argument0) //gml_Script_scr_enemy_mode_shift_martlet_genocide { var reset_counters = false var enemy_mode = global.enemy_mode switch enemy_mode { case 0: if (argument0 == "Fight 1") { if (global.enemy_hit == true) { global.enemy_mode_previous = global.enemy_mode global.enemy_mode = 2 reset_counters = true } else if (global.enemy_hit == false) { global.enemy_mode_previous = global.enemy_mode global.enemy_mode = 1 reset_counters = true } } else if (argument0 == "Action 1") { global.enemy_mode_previous = global.enemy_mode global.enemy_mode = 4 reset_counters = true } else { global.enemy_mode_previous = global.enemy_mode global.enemy_mode = 1 reset_counters = true } break case 1: if (argument0 == "Fight 1") { if (global.enemy_hit == true) { global.enemy_mode_previous = global.enemy_mode global.enemy_mode = 2 reset_counters = true } } else if (argument0 == "Action 1") { global.enemy_mode_previous = global.enemy_mode global.enemy_mode = 4 reset_counters = true } break case 2: if (argument0 == "Action 1") { global.enemy_mode_previous = global.enemy_mode global.enemy_mode = 4 reset_counters = true } break case 3: if (argument0 == "Fight 1") { if (global.enemy_low_hp == true) { global.enemy_mode_previous = global.enemy_mode global.enemy_mode = 5 reset_counters = true } } break case 4: if (argument0 == "Fight 1") { if (global.enemy_hit == true) { if (global.action_1_selected_count < 2) { global.enemy_mode_previous = global.enemy_mode global.enemy_mode = 3 reset_counters = true } else { global.enemy_mode_previous = global.enemy_mode global.enemy_mode = 6 reset_counters = true } } } break } enemy_mode = global.enemy_mode var enemy_mode_gen_preprevious = global.enemy_mode_gen_previous var enemy_mode_gen_current = global.enemy_mode_gen switch enemy_mode { case 0: global.enemy_mode_gen = 0 break ...
(argument0)
16
                break
17
        }
18
19
    }
20
    global.special_effect_end_value = argument0
21
}