Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_sound_of_justice_enemy_Draw_0

(view raw script w/o annotations or w/e)
1
if (i_ex(obj_gerson_green_switch))
2
    exit;
3
if (state == 0)
4
    movesiner += (1/3);
5
if (state == 14)
6
{
7
    if (state14con == 0)
8
    {
9
        state14timer++;
10
        draw_sprite_ext(spr_statue_sound_of_justice, 0, x - 10, y - 50, 2, 2, 0, c_white, 1);
11
        d3d_set_fog(true, c_black, 0, 1);
12
        draw_sprite_ext(spr_statue_sound_of_justice, 0, x - 10, y - 50, 2, 2, 0, c_white, (10 - state14timer) / 10);
13
        d3d_set_fog(false, c_black, 0, 0);
14
        if (state14timer == 10)
15
        {
16
            state14timer = 0;
17
            state14con = 1;
18
        }
19
    }
20
    if (state14con == 1)
21
    {
22
        state14timer++;
23
        draw_sprite_ext(spr_statue_sound_of_justice, 0, x - 10, y - 50, 2, 2, 0, c_white, 1);
24
        if (state14timer == 60)
25
        {
26
            state14timer = 0;
27
            state14con = 2;
28
            state = 0;
29
        }
30
    }
31
    if (state14con == 2)
32
    {
33
        state14timer++;
34
        draw_sprite_ext(spr_statue_sound_of_justice, 0, x - 10, y - 50, 2, 2, 0, c_white, 1);
35
        d3d_set_fog(true, c_black, 0, 1);
36
        draw_sprite_ext(spr_statue_sound_of_justice, 0, x - 10, y - 50, 2, 2, 0, c_white, state14timer / 10);
37
        d3d_set_fog(false, c_black, 0, 0);
38
        if (state14timer == 10)
39
        {
40
            state14timer = 0;
41
            state14con = 1;
42
            state = 0;
43
        }
44
    }
45
    if (state14con == 3)
46
    {
47
        state14timer++;
48
        draw_sprite_ext(spr_statue_sound_of_justice_crumble, 6 + state14timer, x - 10, y + 15, 2, 2, 0, c_white, 1);
49
        if (state14timer == 11)
50
        {
51
            state14timer = 0;
52
            state14con = 4;
53
        }
54
    }
55
    if (state14con == 4)
56
        draw_sprite_ext(spr_statue_sound_of_justice_crumble, 17, x - 10, y + 15, 2, 2, 0, c_white, 1);
57
}
58
draw_set_color(c_white);
59
if (lightupcon == 1)
60
{
61
    draw_sprite_ext(spr_statue_sound_of_justice_heal_lighting, 0, x, y, image_xscale, image_yscale, image_angle, c_white, lightalpha);
62
    lightalpha -= 0.01;
63
    if (lightalpha == 0)
64
        lightupcon = 0;
65
}
66
else
67
{
68
    
scr_enemy_drawhurt_generic
scr_enemy_drawhurt_generic

function
scr_enemy_drawhurt_generic()
{ if (state == 3 && hurttimer >= 0) draw_sprite_ext(hurtsprite, 0, x + shakex + hurtspriteoffx, y + hurtspriteoffy, 2, 2, 0, image_blend, 1); }
();
69
    
scr_enemy_drawidle_generic
scr_enemy_drawidle_generic

function
scr_enemy_drawidle_generic(arg0)
{ if (state == 0) { fsiner += 1; siner += arg0; thissprite = idlesprite; if (global.mercymod[myself] >= global.mercymax[myself]) thissprite = sparedsprite; draw_monster_body_part(thissprite, siner, x, y); } }
(0);
70
}
71
if (state == 12)
72
{
73
    image_index += 0.23333333333333334;
74
    draw_self();
75
    if (global.turntimer < 0)
76
    {
77
        state = 0;
78
        image_speed = 0.16666666666666666;
79
    }
80
}
81
if (state == 13)
82
{
83
    draw_self();
84
    dodgetimer++;
85
    if (dodgetimer == 2)
86
    {
87
        snd_stop(motor_swing_down);
88
        image_alpha = 0;
89
        var xx = x + 88;
90
        var yy = y - 88;
91
    }
92
    if (dodgetimer == 3)
93
    {
94
        image_speed = 0.16666666666666666;
95
        image_alpha = 1;
96
        sprite_index = spr_gerson_dodge;
97
        image_xscale = 2;
98
        image_yscale = 2;
99
        x -= 104;
100
        y -= 30;
101
        speed = 16;
102
        friction = 4;
103
    }
104
    if (dodgetimer == 1)
105
    {
106
        _ripple = instance_create(513, 533, obj_church_old_man_ripple_effect);
107
        _ripple.type = 2;
108
        _ripple.color = merge_color(c_red, c_black, 0);
109
        _ripple.colorstart = 255;
110
        _ripple.version = 1;
111
    }
112
    if (dodgetimer == 3 || dodgetimer == 5)
113
    {
114
        _ripple = instance_create(x + 96, y + 40, obj_church_old_man_ripple_effect);
115
        _ripple.type = 2;
116
        _ripple.color = merge_color(c_red, c_black, 0);
117
        _ripple.colorstart = 255;
118
        _ripple.version = 1;
119
    }
120
    if (dodgetimer == 38)
121
    {
122
        dodgetimer = 0;
123
        state = 0;
124
        sprite_index = spr_statue_sound_of_justice;
125
        x = xstart;
126
        y = ystart;
127
        image_xscale = 2;
128
        image_yscale = 2;
129
    }
130
}
131
if (becomeflash == 0)
132
    flash = 0;
133
becomeflash = 0;
134
if (global.turntimer > 0)
135
    turnframes++;
136
else
137
    turnframes = 0;
138
draw_set_color(c_white);
139
rippletimer++;
140
if (((rippletimer % 50) == 0 && global.myfight == 0 && global.mnfight != 1.5 && global.mnfight != 1 && phase == 2 && endingcon == 0) || susieripple == 1)
141
{
142
    if (phase == 1)
143
        _ripple = instance_create(camerax() + 140, cameray() + 198, obj_church_old_man_ripple_effect);
144
    if (phase == 2)
145
        _ripple = instance_create(camerax() + 110, cameray() + 198, obj_church_old_man_ripple_effect);
146
    _ripple.type = 2;
147
    _ripple.version = 2;
148
    _ripple.color = merge_color(c_fuchsia, c_black, 0);
149
    _ripple.colorstart = 16711935;
150
    susieripple = 0;
151
}
152
if ((rippletimer % 66) == 0 && global.myfight == 0 && global.mnfight != 1.5 && global.mnfight != 1 && state != 13 && !i_ex(obj_attackpress) && endingcon == 0)
153
{
154
    _ripple = instance_create(x + 56, y + 68, obj_church_old_man_ripple_effect);
155
    _ripple.type = 2;
156
    _ripple.version = 3;
157
    _ripple.color = merge_color(c_red, c_black, 0);
158
    _ripple.colorstart = 255;
159
}
160
if ((rippletimer % 50) == 0 && global.myfight == 0 && global.mnfight != 1.5 && global.mnfight != 1 && i_ex(obj_herokris) && endingcon == 0)
161
{
162
    _ripple = instance_create(obj_herokris.x + 30, obj_herokris.y + 48, obj_church_old_man_ripple_effect);
163
    _ripple.type = 2;
164
    _ripple.version = 2;
165
    _ripple.color = merge_color(c_aqua, c_black, 0);
166
    _ripple.colorstart = 16776960;
167
}