Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_holywatercooler_enemy_Draw_0

(view raw script w/o annotations or w/e)
1
if (transformationcon == 0)
2
{
3
    
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); }
();
4
    
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.16666666666666666);
5
}
6
else
7
{
8
    siner += 0.16666666666666666;
9
}
10
if (amimissmizzle)
11
    y = ystart + (sin(siner * 0.5) * 5);
12
if (becomeflash == 0)
13
    flash = 0;
14
becomeflash = 0;
15
if (pinkflashtimer > 0)
16
{
17
    pinkflashtimer--;
18
    draw_sprite_ext(sparedsprite, 0, x, y, image_xscale, image_yscale, image_angle, image_blend, pinkflashtimer / 10);
19
}
20
if (transformationcon == 1)
21
{
22
    transformationtimer++;
23
    if (transformationtimer < 30)
24
    {
25
        if (!audio_is_playing(snd_sneo_overpower))
26
            snd_play_x(snd_sneo_overpower, 0.7, 1.3);
27
        d = instance_create(x + 18, y + 45, obj_rouxls_power_up_orb);
28
        d.direction = irandom(360);
29
        d.depth = depth + 1;
30
        d.image_blend = image_blend;
31
        d.lifetime = 12;
32
        d.parenttarget = id;
33
        d.distance_multiplier = 1.4;
34
    }
35
    draw_sprite_ext(spr_watercooler_centered, siner, x + 18, y + 44, 2, 2, 0, c_white, 1);
36
    d3d_set_fog(true, c_white, 0, 1);
37
    draw_sprite_ext(spr_watercooler_centered, siner, x + 18, y + 44, 2, 2, 0, c_white, lerp(0, 1, transformationtimer / 40));
38
    d3d_set_fog(false, c_black, 0, 0);
39
    if (transformationtimer == 40)
40
    {
41
        transformationcon = 2;
42
        transformationtimer = 0;
43
        snd_play(snd_motor_ghost);
44
    }
45
}
46
if (transformationcon == 2)
47
{
48
    transformationtimer++;
49
    var scale;
50
    if (transformationtimer <= 20)
51
        scale = lerp(2, 0, transformationtimer / 20);
52
    else
53
        scale = 0;
54
    var scale2 = lerp(0, 2, transformationtimer / 30);
55
    if (transformationtimer == 30)
56
    {
57
        transformationcon = 3;
58
        transformationtimer = 0;
59
    }
60
    d3d_set_fog(true, c_white, 0, 1);
61
    draw_sprite_ext(spr_watercooler_centered, siner, x + 18, y + 44, scale, scale, 0, c_white, 1);
62
    d3d_set_fog(false, c_black, 0, 0);
63
    d3d_set_fog(true, c_white, 0, 1);
64
    draw_sprite_ext(spr_mizzle_idle_large_centered, siner, x + 22, y + 40, scale2, scale2, 0, c_white, 1);
65
    d3d_set_fog(false, c_black, 0, 0);
66
}
67
if (transformationcon == 3)
68
{
69
    transformationtimer++;
70
    draw_sprite_ext(spr_mizzle_idle_large_centered, siner, x + 22, y + 40, 2, 2, 0, c_white, 1);
71
    d3d_set_fog(true, c_white, 0, 1);
72
    draw_sprite_ext(spr_mizzle_idle_large_centered, siner, x + 22, y + 40, 2, 2, 0, c_white, lerp(1, 0, transformationtimer / 30));
73
    d3d_set_fog(false, c_black, 0, 0);
74
    if (transformationtimer == 30)
75
    {
76
        transformationcon = 0;
77
        transformationtimer = 0;
78
        turnintomizzle = false;
79
        idlesprite = spr_mizzle_idle_large;
80
        hurtsprite = spr_mizzle_idle_large;
81
        sparedsprite = spr_mizzle_idle_large;
82
        amimissmizzle = true;
83
        siner = 0;
84
        x -= 38;
85
        y -= 58;
86
        ystart = y;
87
        global.monstername[myself] = stringsetloc(
Miss Mizzle
"Miss Mizzle", "obj_holywatercooler_enemy_slash_Draw_0_gml_104_0"
);
88
        global.canact[myself][1] = 1;
89
        global.actname[myself][1] = stringsetloc(
Dazzle
"Dazzle", "obj_holywatercooler_enemy_slash_Draw_0_gml_106_0"
);
90
        global.actdesc[myself][1] = stringsetloc(
???
"???", "obj_holywatercooler_enemy_slash_Draw_0_gml_107_0"
);
91
        global.canact[myself][2] = 1;
92
        global.actname[myself][2] = stringsetloc(
Embezzle
"Embezzle", "obj_holywatercooler_enemy_slash_Draw_0_gml_110_0"
);
93
        global.actactor[myself][2] = 2;
94
        global.actdesc[myself][2] = stringsetloc(
Chance#to steal#item
"Chance#to steal#item", "obj_holywatercooler_enemy_slash_Draw_0_gml_112_0"
);
95
        global.canact[myself][3] = 1;
96
        global.actname[myself][3] = stringsetloc(
Nuzzle
"Nuzzle", "obj_holywatercooler_enemy_slash_Draw_0_gml_115_0"
);
97
        global.actactor[myself][3] = 3;
98
        global.actdesc[myself][3] = stringsetloc(
???
"???", "obj_holywatercooler_enemy_slash_Draw_0_gml_117_0"
);
99
        
scr_spellmenu_setup
scr_spellmenu_setup

function
scr_spellmenu_setup()
{ var __actnamecheck = 0; var __monstertype = global.monstertype[0]; for (__i = 1; __i < 3; __i++) { if (global.monster[__i] == 1 && global.monstertype[__i] != __monstertype) __actnamecheck = 1; } for (__i = 0; __i < 3; __i++) { for (__fj = 0; __fj < 6; __fj++) { global.battlespell[__i][__fj] = 0; if (global.char[__i] == 1) { if (global.canact[0][__fj] == 1) { global.battlespell[__i][__fj] = -1; if (global.battleactcount[__i] < (__fj + 1)) global.battleactcount[__i] = __fj + 1; global.battlespellcost[__i][__fj] = global.actcost[0][__fj]; global.battlespellname[__i][__fj] = global.actname[0][__fj]; global.battlespelldesc[__i][__fj] = global.actdesc[0][__fj]; global.battlespelltarget[__i][__fj] = 0; global.battlespellspecial[__i][__fj] = 1; } } if (global.char[__i] == 2) { if (global.canactsus[0][__fj] == 1) { global.battlespell[__i][__fj] = -1; if (global.battleactcount[__i] < (__fj + 1)) global.battleactcount[__i] = __fj + 1; global.battlespellcost[__i][__fj] = global.actcostsus[0][__fj]; global.battlespellname[__i][__fj] = global.actnamesus[0][__fj]; if (__actnamecheck) global.battlespellname[__i][__fj] = stringsetloc(
S-Action
"S-Action", "scr_monstersetup_slash_scr_monstersetup_gml_1053_0"
);
global.battlespelldesc[__i][__fj] = global.actdescsus[0][__fj]; global.battlespelltarget[__i][__fj] = 2; global.battlespellspecial[__i][__fj] = 2; } } if (global.char[__i] == 3) { if (global.canactral[0][__fj] == 1) { global.battlespell[__i][__fj] = -1; if (global.battleactcount[__i] < (__fj + 1)) global.battleactcount[__i] = __fj + 1; global.battlespellcost[__i][__fj] = global.actcostral[0][__fj]; global.battlespellname[__i][__fj] = global.actnameral[0][__fj]; if (__actnamecheck) global.battlespellname[__i][__fj] = stringsetloc(
R-Action
"R-Action", "scr_monstersetup_slash_scr_monstersetup_gml_1057_0"
);
global.battlespelldesc[__i][__fj] = global.actdescral[0][__fj]; global.battlespelltarget[__i][__fj] = 2; global.battlespellspecial[__i][__fj] = 3; } } if (global.char[__i] == 4) { if (global.canactnoe[0][__fj] == 1) { global.battlespell[__i][__fj] = -1; if (global.battleactcount[__i] < (__fj + 1)) global.battleactcount[__i] = __fj + 1; global.battlespellcost[__i][__fj] = global.actcostnoe[0][__fj]; global.battlespellname[__i][__fj] = global.actnamenoe[0][__fj]; if (__actnamecheck) global.battlespellname[__i][__fj] = stringsetloc(
N-Action
"N-Action", "scr_monstersetup_slash_scr_monstersetup_gml_1061_0"
);
global.battlespelldesc[__i][__fj] = global.actdescnoe[0][__fj]; global.battlespelltarget[__i][__fj] = 2; global.battlespellspecial[__i][__fj] = 4; } } } }
scr_spellinfo_all();
for (__i = 0; __i < 3; __i++) { for (__fj = 0; __fj < 12; __fj++) { __ib = global.battleactcount[__i] + __fj; global.battlespell[__i][__ib] = global.spell[global.char[__i]][__fj]; global.battlespellcost[__i][__ib] = global.spellcost[global.char[__i]][__fj]; global.battlespellname[__i][__ib] = global.spellnameb[global.char[__i]][__fj]; global.battlespelldesc[__i][__ib] = global.spelldescb[global.char[__i]][__fj]; global.battlespelltarget[__i][__ib] = global.spelltarget[global.char[__i]][__fj]; } } }
();
100
    }
101
}