Undertale script viewer

← back to main script listing

gml_Object_blt_uspear_Collision_749

(view raw script w/o annotations or w/e)
1
if (global.invc < 1)
2
{
3
    dmgamt = round(dmg - ((global.df + global.adef) / 5));
4
    dmgamt = 4;
5
    if (global.plot > 110)
6
    {
7
        if (global.hp <= 10)
8
            dmgamt = 3;
9
    }
10
    if (dmgamt < (global.maxhp / 7))
11
        dmgamt = floor(global.maxhp / 7);
12
    global.hp -= dmgamt;
13
    snd_play(snd_hurt1);
14
    global.hshake = 2;
15
    global.shakespeed = 2;
16
    global.vshake = 2;
17
    instance_create(0, 0, obj_shaker);
18
    global.invc = global.inv * 2;
19
    if (global.battlegroup == 22)
20
    {
21
        if (global.hp < 1)
22
            obj_torielboss.sprite_index = spr_torielboss_mouthcover;
23
    }
24
}