Deltarune (Chapter 1) script viewer

← back to main script listing

gml_Object_obj_clubsenemy_Draw_0

(view raw script w/o annotations or w/e)
1
if (state == 3)
2
{
3
    if (global.monsterhp[myself] <= (global.monstermaxhp[myself] / 2))
4
    {
5
        global.monsterstatus[myself] = 1;
6
        if (global.monstercomment[myself] == " ")
7
            global.monstercomment[myself] = 
(Tired)
scr_84_get_lang_string
scr_84_get_lang_string

function scr_84_get_lang_string(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_clubsenemy_slash_Draw_0_gml_6_0")
;
8
    }
9
    hurttimer -= 1;
10
    if (hurttimer < 0)
11
    {
12
        state = 0;
13
    }
14
    else
15
    {
16
        if (global.monster[myself] == 0)
17
        {
18
            global.flag[522 clover_violence] += 1;
19
            scr_defeatrun
scr_defeatrun

function scr_defeatrun() { defeatanim = instance_create(x, y, obj_defeatanim); defeatanim.sprite_index = sprite_index; defeatanim.sprite_index = hurtsprite; defeatanim.image_index = 0; defeatanim.image_xscale = image_xscale; defeatanim.image_yscale = image_yscale; instance_destroy(); }
();
20
        }
21
        hurtshake += 1;
22
        if (hurtshake > 1)
23
        {
24
            if (shakex > 0)
25
                shakex -= 1;
26
            if (shakex < 0)
27
                shakex += 1;
28
            shakex = -shakex;
29
            hurtshake = 0;
30
        }
31
        draw_sprite_ext(spr_clubs_hurt, 0, x + shakex, y, 2, 2, 0, image_blend, 1);
32
    }
33
}
34
if (state == 0)
35
{
36
    siner += 1;
37
    thissprite = spr_clubs_idle;
38
    if (global.mercymod[myself] >= global.mercymax[myself])
39
        thissprite = spr_clubs_spared;
40
    draw_sprite_ext(thissprite, siner / 6, x, y, 2, 2, 0, image_blend, 1);
41
    if (flash == 1)
42
    {
43
        fsiner += 1;
44
        d3d_set_fog(true, c_white, 0, 1);
45
        draw_sprite_ext(thissprite, siner / 6, x, y, 2, 2, 0, image_blend, (-cos(fsiner / 5) * 0.4) + 0.6);
46
        d3d_set_fog(false, c_black, 0, 0);
47
    }
48
}
49
if (becomeflash == 0)
50
    flash = 0;
51
becomeflash = 0;