Undertale Yellow script viewer

← back to main script listing

gml_GlobalScript_scr_determine_armor_defense

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

function scr_determine_armor_defense() //gml_Script_scr_determine_armor_defense { var return_value = scr_item_stats_armor(global.player_armor) return return_value; }
() //gml_Script_scr_determine_armor_defense
2
{
3
    var return_value = scr_item_stats_armor
scr_item_stats_armor

function scr_item_stats_armor(argument0) //gml_Script_scr_item_stats_armor { switch argument0 { case "Worn Hat": if (global.option_easymode == true) return 3; else return 0; case "Nice Hat": if (global.option_easymode == true) return 5; else return 0; default: return 0; } }
(global.player_armor)
4
    return return_value;
5
}