Undertale script viewer

← back to main script listing

gml_Object_obj_asbulletparent_Other_17

(view raw script w/o annotations or w/e)
1
if (global.flag[501 conversation_asriel_fight] < 3)
2
{
3
    dmg = 10;
4
    if (global.hope == 1)
5
        dmg = 7;
6
    thishp = global.hp;
7
    thisinvc = global.invc;
8
    scr_damagestandard_x();
9
    if (global.invc > thisinvc)
10
    {
11
        if (abs(global.hp - thishp) < 3)
12
            global.hp = thishp - 3;
13
        if (global.hope == 1)
14
        {
15
            if (thishp > 1 && global.hp <= 1)
16
                global.hp = 1;
17
        }
18
        if (global.hp <= 0)
19
            global.hp = 0;
20
    }
21
    if (global.hope == 2)
22
        global.hp = 1;
23
}
24
else
25
{
26
    if (global.hp >= 14)
27
        dmg = 9;
28
    if (global.hp <= 14)
29
        dmg = 7;
30
    if (global.hp <= 9)
31
        dmg = 6;
32
    if (global.hp <= 5)
33
        dmg = 1;
34
    scr_damagestandard_x();
35
    if (global.hp < 1)
36
        global.hp = 1;
37
}