Deltarune (Chapter 1) script viewer

← back to main script listing

gml_Object_obj_laserscythe_Other_15

(view raw script w/o annotations or w/e)
1
if (active == 1)
2
{
3
    if (global.inv < 0)
4
    {
5
        instance_create(0, 0, obj_shake);
6
        snd_stop(snd_hurt1);
7
        snd_play(snd_hurt1);
8
        global.inv = global.invc * 40;
9
        for (i = 0; i < 3; i += 1)
10
        {
11
            temphp[i] = global.hp[global.char[i]];
12
            if (temphp[i] < 0)
13
                temphp[i] = 0;
14
        }
15
        if ((ceil(temphp[0] + temphp[1] + temphp[2]) / 3) >= 10)
16
        {
17
            for (i = 0; i < 3; i += 1)
18
            {
19
                if (temphp[i] > 0)
20
                    global.hp[global.char[i]] = ceil(global.hp[global.char[i]] * 0.7);
21
            }
22
        }
23
        else
24
        {
25
            scr_damage_all
scr_damage_all

function scr_damage_all() { if (global.inv < 0) { scr_damage_cache(); remdamage = damage; _temptarget = target; for (ti = 0; ti < 3; ti += 1) { global.inv = -1; damage = remdamage; target = ti; if (global.hp[global.char[ti]] > 0 && global.char[ti] != 0) scr_damage(); } global.inv = global.invc * 40; target = _temptarget; scr_damage_check(); } }
();
26
        }
27
    }
28
}