Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_attackpress_Other_11

(view raw script w/o annotations or w/e)
1
if (
scr_monsterpop
scr_monsterpop

function
scr_monsterpop()
{ return global.monster[0] + global.monster[1] + global.monster[2]; }
() > 0)
2
{
3
    for (i = 0; i < 3; i += 1)
4
    {
5
        if (target == i)
6
        {
7
            if (global.chapter == 2 && instance_exists(o_boxingcontroller))
8
            {
9
                o_boxingcontroller.punchcon = 1;
10
                o_boxingcontroller.damageoverride = round((global.battleat[0] * points[0]) / 10);
11
                o_boxingcontroller.acttoenemytalktransition = 1;
12
                if (points[0] == 150 || points[0] == 300)
13
                    o_boxingcontroller.tpoverride = 5;
14
                if (points[0] == 0)
15
                    o_boxingcontroller.damageoverride = 1;
16
            }
17
            else if (i_ex(global.charinstance[i]))
18
            {
19
                global.charinstance[i].points = points[i];
20
                with (global.charinstance[i])
21
                {
22
                    state = 1;
23
                    attacktimer = 0;
24
                }
25
            }
26
        }
27
    }
28
}