Deltarune (Chapter 2) script viewer

← back to main script listing

gml_GlobalScript_scr_healallitemspell

(view raw script w/o annotations or w/e)
1
function 
scr_healallitemspell
scr_healallitemspell

function
scr_healallitemspell(arg0)
{
scr_healall(arg0);
for (i = 0; i < 3; i += 1) { with (global.charinstance[i]) { ha = instance_create(x, y, obj_healanim); ha.target = id; dmgwr =
scr_dmgwriter_selfchar();
with (dmgwr) { delay = 8; type = 3; damage = arg0; } if (global.hp[global.char[myself]] >= global.maxhp[global.char[myself]]) { with (dmgwr) specialmessage = 3; } tu += 1; } } global.spelldelay = 20; }
(arg0)
2
{
3
    
scr_healall
scr_healall

function
scr_healall(arg0)
{ for (i = 0; i < 3; i += 1) { if (global.char[i] != 0)
scr_heal(i, arg0);
} }
(arg0);
4
    for (i = 0; i < 3; i += 1)
5
    {
6
        with (global.charinstance[i])
7
        {
8
            ha = instance_create(x, y, obj_healanim);
9
            ha.target = id;
10
            dmgwr = 
scr_dmgwriter_selfchar
scr_dmgwriter_selfchar

function
scr_dmgwriter_selfchar()
{ return instance_create(x, (y + myheight) - 24 - (tu * 20), obj_dmgwriter); }
();
11
            with (dmgwr)
12
            {
13
                delay = 8;
14
                type = 3;
15
                damage = arg0;
16
            }
17
            if (global.hp[global.char[myself]] >= global.maxhp[global.char[myself]])
18
            {
19
                with (dmgwr)
20
                    specialmessage = 3;
21
            }
22
            tu += 1;
23
        }
24
    }
25
    global.spelldelay = 20;
26
}