Deltarune (Chapter 4) 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)
{ var __healAmount = arg0;
scr_healall(__healAmount);
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
    var __healAmount = arg0;
4
    
scr_healall
scr_healall

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

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