Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_heart_battle_fighting_parent_Other_10

(view raw script w/o annotations or w/e)
1
var enemy_count = global.enemy_count
2
damage = global.enemy_attack_stat - global.player_armor_defense - global.player_armor_modifier_defense - global.player_defense + 10
3
if (damage < 1)
4
    damage = 1
5
if (enemy_count >= 2)
6
{
7
    damage_2 = global.enemy_attack_stat_2 - global.player_armor_defense - global.player_armor_modifier_defense - global.player_defense + 10
8
    if (damage_2 < 1)
9
        damage_2 = 1
10
}
11
if (enemy_count >= 3)
12
{
13
    damage_3 = global.enemy_attack_stat_3 - global.player_armor_defense - global.player_armor_modifier_defense - global.player_defense + 10
14
    if (damage_3 < 1)
15
        damage_3 = 1
16
}