Deltarune (Chapter 2) script viewer

← back to main script listing

gml_GlobalScript_scr_become_dark

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

function
scr_become_dark()
{ global.darkzone = 1; global.hp[1] = ceil((global.lhp / global.lmaxhp) * global.maxhp[1]); if (global.hp[1] < 1) global.hp[1] = 1; if (global.hp[1] > global.maxhp[1]) global.hp[1] = global.maxhp[1]; }
()
2
{
3
    global.darkzone = 1;
4
    global.hp[1] = ceil((global.lhp / global.lmaxhp) * global.maxhp[1]);
5
    if (global.hp[1] < 1)
6
        global.hp[1] = 1;
7
    if (global.hp[1] > global.maxhp[1])
8
        global.hp[1] = global.maxhp[1];
9
}