Undertale script viewer

← back to main script listing

gml_Object_blt_sizebone_Other_11

(view raw script w/o annotations or w/e)
1
if (active == 1)
2
{
3
    hit = 1;
4
    if (blue == 1)
5
    {
6
        if (scr_blueat
scr_blueat

if (abs(obj_heart.xprevious - obj_heart.x) > 0.01 || abs(obj_heart.yprevious - obj_heart.y) > 0.01) return 1; else return 0;
() == 0)
7
            hit = 0;
8
    }
9
    if (global.invc < 1 && hit == 1)
10
    {
11
        dmgamt = round(dmg - ((global.df + global.adef) / 5));
12
        if (dmgamt < 3)
13
            dmgamt = 3;
14
        if (global.hardmode == 0)
15
        {
16
            if (instance_exists(obj_papyrusboss))
17
            {
18
                if (obj_papyrusboss.fighto > 13)
19
                {
20
                    if (global.hp < 10)
21
                        dmgamt -= 1;
22
                    if (global.hp < 5)
23
                        dmgamt -= 1;
24
                }
25
            }
26
        }
27
        global.hp -= dmgamt;
28
        global.invc = global.inv * 3;
29
        if (!instance_exists(obj_ripoff_papyrus))
30
        {
31
            if (global.hp > 0)
32
            {
33
                snd_play(snd_hurt1);
34
                global.hshake = 2;
35
                global.shakespeed = 2;
36
                global.vshake = 2;
37
                instance_create(0, 0, obj_shaker);
38
                instance_destroy();
39
            }
40
            else if (captured == 0)
41
            {
42
                snd_play(snd_hurt1);
43
                global.hshake = 2;
44
                global.shakespeed = 2;
45
                global.vshake = 2;
46
                instance_create(0, 0, obj_shaker);
47
                visible = false;
48
                global.hp = 1;
49
                captured = 1;
50
                global.turntimer = 300;
51
                with (obj_papyrusboss)
52
                    dontcancel = 1;
53
                global.invc = 50;
54
                hspeed = 0;
55
                if (instance_exists(blt_sizebone))
56
                {
57
                    blt_sizebone.active = 2;
58
                    blt_sizebone.visible = false;
59
                }
60
                if (instance_exists(blt_topbone))
61
                {
62
                    blt_topbone.active = 2;
63
                    blt_sizebone.visible = false;
64
                }
65
                if (instance_exists(obj_blueattackgen))
66
                {
67
                    with (obj_blueattackgen)
68
                        instance_destroy();
69
                }
70
                obj_heart.vspeed = 0;
71
                alarm[2] = 2;
gml_Object_blt_sizebone_Alarm_2.gml

alarm[3] = 2; vol = caster_get_volume(global.batmusic); alarm[4] = 40;
72
            }
73
        }
74
        else
75
        {
76
            snd_play(snd_hurt1);
77
            global.hshake = 2;
78
            global.shakespeed = 2;
79
            global.vshake = 2;
80
            instance_create(0, 0, obj_shaker);
81
            instance_destroy();
82
        }
83
    }
84
}