Deltarune (Chapter 1) script viewer

← back to main script listing

gml_Object_obj_bloxer_enemy_Step_0

(view raw script w/o annotations or w/e)
1
if (global.monster[myself] == 1)
2
{
3
    if (global.mnfight == 1 && talked == 0)
4
    {
5
        scr_randomtarget
scr_randomtarget

function scr_randomtarget() { abletotarget = 1; if (global.charcantarget[0] == 0 && global.charcantarget[1] == 0 && global.charcantarget[2] == 0) abletotarget = 0; mytarget = choose(0, 1, 2); if (abletotarget == 1) { while (global.charcantarget[mytarget] == 0) mytarget = choose(0, 1, 2); } else { mytarget = 3; } global.targeted[mytarget] = 1; }
();
6
        if (!instance_exists(obj_darkener))
7
            instance_create(0, 0, obj_darkener);
8
        global.typer = 50;
9
        rr = choose(0, 1, 2, 3);
10
        if (rr == 0)
11
            global.msg[0] = 
HOOH...! You
interrupted my
training...!
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_bloxer_enemy_slash_Step_0_gml_11_0")
;
12
        if (rr == 1)
13
            global.msg[0] = 
GOOH...! I'm
gonna knock
your block
off...!
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_bloxer_enemy_slash_Step_0_gml_12_0")
;
14
        if (rr == 2)
15
            global.msg[0] = 
Let's see how
you stack
up...! HIYA!!
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_bloxer_enemy_slash_Step_0_gml_13_0")
;
16
        if (rr == 3)
17
            global.msg[0] = 
Let me show
you my
training!
YIHA!!
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_bloxer_enemy_slash_Step_0_gml_14_0")
;
18
        if (acting == 2)
19
        {
20
            global.msg[0] = 
ARRGH!!
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_bloxer_enemy_slash_Step_0_gml_18_0")
;
21
            if (part[2] == 3)
22
                global.msg[0] = 
ARRGH!! NO!!
MY BUTT IS
MY ABS!
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_bloxer_enemy_slash_Step_0_gml_19_0")
;
23
            if (part[1] == 3)
24
                global.msg[0] = 
ARRGH!! NO!!
MY BUTT IS
MY FACE!!
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_bloxer_enemy_slash_Step_0_gml_20_0")
;
25
            if (part[1] == 2)
26
                global.msg[0] = 
ARRGH!! NO!!
MY ABS ARE
MY FACE!!
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_bloxer_enemy_slash_Step_0_gml_21_0")
;
27
            if (part[1] == 1)
28
                global.msg[0] = 
ARRGH!! NO!!
MY FACE IS
MY FACE!!
Wait...
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_bloxer_enemy_slash_Step_0_gml_22_0")
;
29
            if (global.mercymod[myself] >= 100)
30
                global.msg[0] = 
Oh, you mixed
me up all
nice~
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_bloxer_enemy_slash_Step_0_gml_24_0")
;
31
        }
32
        if (acting == 3)
33
            global.msg[0] = 
My momentum
is totally
blocked
up...
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_bloxer_enemy_slash_Step_0_gml_29_0")
;
34
        scr_enemyblcon
scr_enemyblcon

function scr_enemyblcon(arg0, arg1, arg2) { if (arg2 == 0) { mywriter = instance_create(arg0, arg1, obj_writer); return mywriter; } if (arg2 == 1) { myblcon = instance_create(arg0, arg1, obj_battleblcon); return myblcon; } if (arg2 == 2) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_v; return myblcon; } if (arg2 == 3) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_long; return myblcon; } if (arg2 == 4) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_clubs; myblcon.image_index = 0; myblcon.image_speed = 0; return myblcon; } if (arg2 == 5) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_clubs; myblcon.image_index = 1; myblcon.image_speed = 0; return myblcon; } if (arg2 == 6) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_clubs; myblcon.image_index = 2; myblcon.image_speed = 0; return myblcon; } if (arg2 == 7) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_long_r; myblcon.image_index = 2; myblcon.image_speed = 0; return myblcon; } if (arg2 == 8) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_long_tall; return myblcon; } }
(x - 160, y, 3);
35
        talked = 1;
36
        talktimer = 0;
37
    }
38
    if (talked == 1 && global.mnfight == 1)
39
    {
40
        rtimer = 0;
41
        scr_blconskip
scr_blconskip

function scr_blconskip(arg0) { if (arg0 != -1) { if (button1_p() && talktimer > arg0) talktimer = talkmax; talktimer += 1; if (talktimer >= talkmax) { with (obj_writer) instance_destroy(); global.mnfight = 2; } } if (arg0 == -1) { if (instance_exists(obj_writer) == false) global.mnfight = 2; } }
(15);
42
        if (global.mnfight == 2)
43
        {
44
            if (!instance_exists(obj_moveheart))
45
                scr_moveheart
scr_moveheart

function scr_moveheart() { return instance_create(obj_herokris.x + 10, obj_herokris.y + 40, obj_moveheart); }
();
46
            if (!instance_exists(obj_growtangle))
47
                instance_create(__view_get(e__VW.XView, 0) + 320, __view_get(e__VW.YView, 0) + 170, obj_growtangle);
48
        }
49
    }
50
    if (global.mnfight == 2 && attacked == 0)
51
    {
52
        rtimer += 1;
53
        if (rtimer == 12)
54
        {
55
            rr = choose(0, 1);
56
            biglegoqual = 1;
57
            if (scr_monsterpop
scr_monsterpop

function scr_monsterpop() { return global.monster[0] + global.monster[1] + global.monster[2]; }
() >= 2 && myself >= 1)
58
                biglegoqual = 0;
59
            if (rr == 0 && biglegoqual == 1)
60
            {
61
                dc = instance_create(x, y, obj_dbulletcontroller);
62
                dc.type = 26;
63
                dc.target = mytarget;
64
                dc.damage = global.monsterat[myself] * 5;
65
                dc.grazepoints = 5;
66
                dc.timepoints = 2;
67
            }
68
            else
69
            {
70
                dc = instance_create(x, y, obj_dbulletcontroller);
71
                dc.type = 27;
72
                dc.target = mytarget;
73
                dc.damage = global.monsterat[myself] * 5;
74
                dc.grazepoints = 5;
75
            }
76
            turns += 1;
77
            global.turntimer = 170;
78
            attacked = 1;
79
            global.typer = 6;
80
            global.fc = 0;
81
            rr = choose(0, 1, 2, 3, 4);
82
            if (rr == 0)
83
                global.battlemsg[0] = 
* Bloxer is thinking about training.
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_bloxer_enemy_slash_Step_0_gml_86_0")
;
84
            if (rr == 1)
85
                global.battlemsg[0] = 
* Bloxer is thinking about trains.
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_bloxer_enemy_slash_Step_0_gml_87_0")
;
86
            if (rr == 2)
87
                global.battlemsg[0] = 
* Bloxer is thinking about training wheels.
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_bloxer_enemy_slash_Step_0_gml_88_0")
;
88
            if (rr == 3)
89
                global.battlemsg[0] = 
* Bloxer considers building a house out of its own body.
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_bloxer_enemy_slash_Step_0_gml_89_0")
;
90
            if (rr == 4)
91
                global.battlemsg[0] = 
* Smells like freshly-printed plastic.
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_bloxer_enemy_slash_Step_0_gml_90_0")
;
92
            if (global.monsterstatus[myself] == 1)
93
                global.battlemsg[0] = 
* Bloxer is starting to break apart with exhaustion.
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_bloxer_enemy_slash_Step_0_gml_92_0")
;
94
            if (global.mercymod[myself] >= global.mercymax[myself])
95
                global.battlemsg[0] = 
* Bloxer radiates with the spirit of joy.
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_bloxer_enemy_slash_Step_0_gml_93_0")
;
96
        }
97
        else
98
        {
99
            global.turntimer = 120;
100
        }
101
    }
102
    if (global.mnfight == 2)
103
    {
104
        if (global.turntimer <= 1)
105
        {
106
            if (battlecancel == 1)
107
                global.mercymod[myself] = 999;
108
            if (battlecancel == 2)
109
            {
110
                with (obj_battlecontroller)
111
                    noreturn = 1;
112
                con = 1;
113
                battlecancel = 3;
114
            }
115
        }
116
    }
117
}
118
if (global.myfight == 3)
119
{
120
    xx = __view_get(e__VW.XView, 0);
121
    yy = __view_get(e__VW.YView, 0);
122
    if (acting == 1 && actcon == 0)
123
    {
124
        actcon = 1;
125
        global.msg[0] = 
* BLOXER - AT 9 DF 2
* Loves: Training.Delay 11 Hates: Body being the wrong shapeWait for inputClose Message
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_bloxer_enemy_slash_Step_0_gml_127_0")
;
126
        scr_battletext_default
scr_battletext_default

function scr_battletext_default() { global.fc = 0; global.typer = 4; scr_battletext(); return battlewriter; }
();
127
    }
128
    if (acting == 2 && actcon == 0)
129
    {
130
        global.msg[0] = 
* Press
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_bloxer_enemy_slash_Step_0_gml_135_0")
+ scr_get_input_name
scr_get_input_name

function scr_get_input_name(arg0) { var _control = "[?]"; if (global.is_console || obj_gamecontroller.gamepad_active) { _control = global.input_g[arg0]; if (_control == gp_padr) return "\\*D "; if (_control == gp_padl) return "\\*A "; if (_control == global.button0) return "\\*Z "; if (_control == global.button1) return "\\*X "; if (_control == global.button2) return "\\*C "; } var left_bracket = (global.lang == "en") ? "[" : "["; var right_bracket = (global.lang == "en") ? "]" : "]"; _control = left_bracket + global.asc_def[global.input_k[arg0]] + right_bracket; if (!is_string(_control)) _control = "[?]"; else return _control; }
(6) +
to choose:
#1 HEAD, #2 BODY, #3 LEGS.
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_bloxer_enemy_slash_Step_0_gml_135_1")
;
131
        global.mercymod[myself] = 0;
132
        scr_battletext_default
scr_battletext_default

function scr_battletext_default() { global.fc = 0; global.typer = 4; scr_battletext(); return battlewriter; }
();
133
        actcon = 10;
134
        swaptime = 1;
135
        floatsin = 0;
136
        swapx = 0;
137
        sinmomentum = 0;
138
        party[0] = 28;
139
        party[1] = 54;
140
        party[2] = 70;
141
        select[0] = -1;
142
        select[1] = -1;
143
        select[2] = -1;
144
        selecttotal = 0;
145
        movex[0] = 0;
146
        movex[1] = 0;
147
        movex[2] = 0;
148
        finishtimer = 0;
149
    }
150
    if (acting == 3 && actcon == 0)
151
    {
152
        actcon = 1;
153
        global.msg[0] = 
* Susie became antagonistic!Wait for input
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_bloxer_enemy_slash_Step_0_gml_162_0")
;
154
        rr = choose(0, 1, 2);
155
        scr_susface
scr_susface

function scr_susface(arg0, arg1) { global.msg[arg0] = scr_84_get_subst_string(
\TX \F0 \E~1 \FS \TS Close Message
scr_84_get_lang_string("scr_susface_slash_scr_susface_gml_1_0")
, string(arg1)); }
(1, 2);
156
        global.msg[2] = 
* Why bother training?Delay 11 You'll NEVER beat me.Wait for input
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_bloxer_enemy_slash_Step_0_gml_165_0")
;
157
        if (rr == 1)
158
            global.msg[2] = 
* Why train?Delay 11 You're still 100 years too early to beat me.Wait for input
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_bloxer_enemy_slash_Step_0_gml_166_0")
;
159
        if (rr == 2)
160
            global.msg[2] = 
* Training?Delay 11 Yeah,Delay 11 like I need that to beat you down.Wait for input
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_bloxer_enemy_slash_Step_0_gml_167_0")
;
161
        global.msg[3] = 
* The enemies became \cBTIRED\cW...Wait for inputClose Message
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_bloxer_enemy_slash_Step_0_gml_168_0")
;
162
        for (i = 0; i < 3; i += 1)
163
        {
164
            global.monstercomment[i] = 
(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_bloxer_enemy_slash_Step_0_gml_171_0")
;
165
            global.monsterstatus[i] = 1;
166
        }
167
        scr_battletext_default
scr_battletext_default

function scr_battletext_default() { global.fc = 0; global.typer = 4; scr_battletext(); return battlewriter; }
();
168
    }
169
    if (actcon == 1 && !instance_exists(obj_writer))
170
    {
171
        actcon = 0;
172
        scr_attackphase
scr_attackphase

function scr_attackphase() { with (obj_battlecontroller) { techwon = 0; if (scr_monsterpop() == 0) techwon = 1; if (techwon == 0) { fightphase = 1; global.charturn = 3; if (global.charaction[0] == 4 || global.charaction[0] == 2) fightphase = 0; if (global.charaction[1] == 4 || global.charaction[1] == 2) fightphase = 0; if (global.charaction[2] == 4 || global.charaction[2] == 2) fightphase = 0; if (global.myfight == 4) fightphase = 1; if (fightphase == 1) { global.myfight = 1; instance_create(xx + 2, yy + 365, obj_attackpress); } else { global.myfight = 4; instance_create(0, 0, obj_spellphase); } } else { scr_wincombat(); } } }
();
173
    }
174
    if (actcon == 10 && swaptime == 0)
175
    {
176
        with (obj_writer)
177
            instance_destroy();
178
        if (global.mercymod[myself] >= 100)
179
        {
180
            global.msg[0] = 
* Bloxer is pleased with its new self!Wait for inputClose Message
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_bloxer_enemy_slash_Step_0_gml_193_0")
;
181
            fixed = 1;
182
        }
183
        else
184
        {
185
            global.msg[0] = 
* Bloxer is still unhappy with its self...Wait for inputClose Message
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_bloxer_enemy_slash_Step_0_gml_194_0")
;
186
        }
187
        scr_battletext_default
scr_battletext_default

function scr_battletext_default() { global.fc = 0; global.typer = 4; scr_battletext(); return battlewriter; }
();
188
        actcon = 1;
189
    }
190
}
191
if (global.myfight == 7)
192
    hspeed = 15;
193
194
enum e__VW
195
{
196
    XView,
197
    YView,
198
    WView,
199
    HView,
200
    Angle,
201
    HBorder,
202
    VBorder,
203
    HSpeed,
204
    VSpeed,
205
    Object,
206
    Visible,
207
    XPort,
208
    YPort,
209
    WPort,
210
    HPort,
211
    Camera,
212
    SurfaceID
213
}