Undertale Yellow script viewer

← back to main script listing

gml_GlobalScript_scr_battle_damage_player

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

function scr_battle_damage_player() //gml_Script_scr_battle_damage_player { var damage = global.enemy_attack_stat - global.player_armor_defense - global.player_armor_modifier_defense - global.player_defense + 10 global.current_hp_self -= damage audio_play_sound(snd_hurt, 1, 0) with (obj_heart_battle_fighting_parent) { vulnerable = false global.hit_self = true alarm[0] } }
() //gml_Script_scr_battle_damage_player
2
{
3
    var damage = global.enemy_attack_stat - global.player_armor_defense - global.player_armor_modifier_defense - global.player_defense + 10
4
    global.current_hp_self -= damage
5
    audio_play_sound(snd_hurt, 1, 0)
6
    with (obj_heart_battle_fighting_parent)
7
    {
8
        vulnerable = false
9
        global.hit_self = true
10
       alarm[0]
11
    }
12
}