Deltarune (Chapter 1) script viewer

← back to main script listing

gml_Object_obj_lancerboss_Draw_0

(view raw script w/o annotations or w/e)
1
if (state == 3)
2
{
3
    hurttimer -= 1;
4
    if (hurttimer < 0)
5
    {
6
        state = 0;
7
    }
8
    else
9
    {
10
        if (global.monster[myself] == 0)
11
        {
12
            if (global.plot < 22)
13
                global.plot = 22;
14
            hspeed = 12;
15
            turnt -= 8;
16
            vspeed = -4;
17
        }
18
        hurtshake += 1;
19
        if (hurtshake > 1)
20
        {
21
            if (shakex > 0)
22
                shakex -= 1;
23
            if (shakex < 0)
24
                shakex += 1;
25
            shakex = -shakex;
26
            hurtshake = 0;
27
        }
28
        draw_sprite_ext(spr_lancerbike_hurt, hurttimer / 2, x + shakex, y, 2, 2, 0, image_blend, 1);
29
    }
30
}
31
if (state == 4)
32
{
33
    dodgetimer += 1;
34
    dodgeamt = cos((dodgetimer * 2 * pi) / 15) * 2;
35
    draw_sprite_ext(spr_lancerbike_l, 0, x, y, dodgeamt, 2, 0, image_blend, 1);
36
    if (dodgetimer >= 15)
37
        state = 0;
38
}
39
if (state == 0)
40
{
41
    siner += 1;
42
    thissprite = spr_lancerbike;
43
    if (global.mercymod[myself] >= global.mercymax[myself])
44
        thissprite = spr_lancerbike;
45
    draw_sprite_ext(thissprite, siner / 5, x, y, 2, 2, 0, image_blend, 1);
46
    if (flash == 1)
47
    {
48
        fsiner += 1;
49
        d3d_set_fog(true, c_white, 0, 1);
50
        draw_sprite_ext(thissprite, siner / 5, x, y, 2, 2, 0, image_blend, (-cos(fsiner / 5) * 0.4) + 0.6);
51
        d3d_set_fog(false, c_black, 0, 0);
52
    }
53
}
54
if (becomeflash == 0)
55
    flash = 0;
56
becomeflash = 0;