Undertale Yellow script viewer

← back to main script listing

gml_GlobalScript_scr_determine_damage_number_enemy

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

function scr_determine_damage_number_enemy(argument0, argument1, argument2) //gml_Script_scr_determine_damage_number_enemy { var enemy_count = global.enemy_count if (global.battle_enemy_name_1 == argument0) return 1; else if (enemy_count >= 2 && global.battle_enemy_name_2 == argument1) return 2; else if (enemy_count >= 3 && global.battle_enemy_name_3 == argument2) return 3; else return 0; }
(argument0, argument1, argument2) //gml_Script_scr_determine_damage_number_enemy
2
{
3
    var enemy_count = global.enemy_count
4
    if (global.battle_enemy_name_1 == argument0)
5
        return 1;
6
    else if (enemy_count >= 2 && global.battle_enemy_name_2 == argument1)
7
        return 2;
8
    else if (enemy_count >= 3 && global.battle_enemy_name_3 == argument2)
9
        return 3;
10
    else
11
        return 0;
12
}