Deltarune (Chapter 1) script viewer

← back to main script listing

gml_Object_obj_joker_Other_20

(view raw script w/o annotations or w/e)
1
for (i = 0; i < 4; i += 1)
2
{
3
    global.maxhp[i] = remmaxhp[i];
4
    if (global.hp[i] >= global.maxhp[i])
5
        global.hp[i] = global.maxhp[i];
6
}
7
global.invc = reminvc;
8
with (obj_joker_body)
9
{
10
    image_xscale = 2;
11
    image_yscale = 2;
12
    sprite_index = spr_joker_teleport;
13
    sparedsprite = sprite_index;
14
    image_index = 1;
15
    image_speed = 0;
16
}
17
if (global.monsterhp[myself] > 0)
18
{
19
    with (obj_joker_body)
20
    {
21
        x += 20;
22
        y += 18;
23
        
scr_spareanim
scr_spareanim

function
scr_spareanim()
{ spareanim = instance_create(x, y, obj_spareanim); spareanim.sprite_index = sprite_index; spareanim.sprite_index = sparedsprite; spareanim.image_index = 0; spareanim.image_xscale = image_xscale; spareanim.image_yscale = image_yscale; }
();
24
        x -= 20;
25
        y -= 18;
26
    }
27
}
28
with (obj_battlecontroller)
29
    skipvictory = 1;
30
snd_free_all();
31
body.dancelv = 4;
32
body.condition = 0;
33
with (obj_jokerbg_triangle_real)
34
    on = 0;
35
scr_monsterdefeat
scr_monsterdefeat

function
scr_monsterdefeat()
{ if (global.monster[myself] == 1) { global.monstergold[3] += global.monstergold[myself]; global.monsterexp[3] += global.monsterexp[myself]; global.monster[myself] = 0; if (global.flag[51 + myself] == 0) { global.flag[51 + myself] = 2; if (global.monsterhp[myself] <= 0) global.flag[51 + myself] = 1; } if (global.flag[51 + myself] == 1) global.flag[40 violences] += 1; if (global.flag[51 + myself] == 2) global.flag[41 spares] += 1; if (global.flag[51 + myself] == 3) global.flag[42 pacifies] += 1; if (global.flag[51 + myself] == 5) global.flag[43 autosusie_violences] += 1; if (
scr_monsterpop() == 0)
{ _amt_add = 0; _violenced = 0; _spared = 0; _pacified = 0; for (d_i = 0; d_i < 3; d_i += 1) { if (global.flag[51 + d_i] != 0) _amt_add += 1; if (global.flag[51 + d_i] == 1) _violenced += 1; if (global.flag[51 + d_i] == 2) _spared += 1; if (global.flag[51 + d_i] == 3) _pacified += 1; } if (_pacified > 0) global.flag[50 last_encounter_end] = 3; if (_spared > 0) global.flag[50 last_encounter_end] = 2; if (_violenced > 0) global.flag[50 last_encounter_end] = 1; } event_user(11); } }
();
36
global.invc = reminvc;
37
instance_destroy();