Deltarune (Chapter 1) script viewer

← back to main script listing

gml_Object_obj_smallcheckers_enemy_Step_0

(view raw script w/o annotations or w/e)
1
if (instance_exists(obj_basicattack))
2
{
3
    if (obj_basicattack.sprite_index == spr_attack_cut1)
4
        global.flag[211 c_round_outcome] = 3;
5
    if (obj_basicattack.sprite_index == spr_attack_slap1)
6
        global.flag[211 c_round_outcome] = 3;
7
}
8
if (global.monster[myself] == 1)
9
{
10
    global.flag[51 + myself] = 4;
11
    if (global.mnfight == 1 && talked == 0)
12
    {
13
        
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; }
();
14
        talked = 1;
15
        talktimer = 0;
16
    }
17
    if (talked == 1 && global.mnfight == 1)
18
    {
19
        rtimer = 0;
20
        if (button1_p() && talktimer > 5)
21
            talktimer = talkmax;
22
        talktimer += 1;
23
        if (talktimer >= talkmax)
24
            global.mnfight = 2;
25
    }
26
    if (global.mnfight == 2 && attacked == 0)
27
    {
28
        with (obj_heartblcon)
29
            instance_destroy();
30
        rtimer += 1;
31
        if (rtimer == 12)
32
        {
33
            rr = 
scr_monsterpop
scr_monsterpop

function
scr_monsterpop()
{ return global.monster[0] + global.monster[1] + global.monster[2]; }
();
34
            global.turntimer = 1;
35
            if (rr == 999)
36
            {
37
                dc = instance_create(x, y, obj_spinheart);
38
                dc.type = 0;
39
                dc.target = mytarget;
40
                dc.damage = global.monsterat[myself] * 5;
41
            }
42
            turns += 1;
43
            attacked = 1;
44
            global.typer = 6;
45
            global.fc = 0;
46
            rr = choose(0);
47
            if (rr == 0)
48
                global.battlemsg[0] = 
* C.Round continues to act extremely violent.
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_smallcheckers_enemy_slash_Step_0_gml_83_0")
;
49
        }
50
        else
51
        {
52
            global.turntimer = 1;
53
        }
54
    }
55
    if (global.mnfight == 2)
56
    {
57
        if (global.turntimer <= 1)
58
        {
59
            if (instance_exists(obj_hathyfightevent) && firstturn == 0)
60
            {
61
                if (checkhp1 <= global.hp[1])
62
                {
63
                    if (checkhp2 <= global.hp[2])
64
                    {
65
                        with (obj_battlecontroller)
66
                            noreturn = 1;
67
                        with (obj_hathyfightevent)
68
                            con = 15;
69
                    }
70
                }
71
            }
72
            firstturn = 1;
73
            if (battlecancel == 1)
74
                global.mercymod[myself] = 999;
75
        }
76
    }
77
}
78
if (global.myfight == 3)
79
{
80
    xx = __view_get(e__VW.XView, 0);
81
    yy = __view_get(e__VW.YView, 0);
82
    if (acting == 1 && actcon == 0)
83
    {
84
        actcon = 1;
85
        global.msg[0] = 
* C.ROUND - AT 1 DF 0
* Despite appearances,Delay 11 it's trying its best to defeat you.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_smallcheckers_enemy_slash_Step_0_gml_127_0")
;
86
        
scr_battletext_default
scr_battletext_default

function
scr_battletext_default()
{ global.fc = 0; global.typer = 4;
scr_battletext();
return battlewriter; }
();
87
    }
88
    if (acting == 2 && actcon == 0)
89
    {
90
        global.msg[0] = 
* You ordered Susie to flatter the enemy!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_smallcheckers_enemy_slash_Step_0_gml_136_0")
;
91
        
scr_susface
scr_susface

function
scr_susface(arg0, arg1)
{ global.msg[arg0] =
scr_84_get_subst_string(
Sound X Char 0 Face ~1 Char S Sound S Close Message
scr_84_get_lang_string("scr_susface_slash_scr_susface_gml_1_0")
, string(arg1));
}
(1, 0);
92
        global.msg[2] = 
* ... what?Delay 11 Why the HELL would I do that?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_smallcheckers_enemy_slash_Step_0_gml_138_0")
;
93
        global.msg[3] = 
Face 1* IT attacked US.Delay 11
* Let's smash it before it moves.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_smallcheckers_enemy_slash_Step_0_gml_139_0")
;
94
        
scr_ralface
scr_ralface

function
scr_ralface(arg0, arg1)
{ global.msg[arg0] =
scr_84_get_subst_string(
Sound X Char 0 Face ~1 Char R Sound R Close Message
scr_84_get_lang_string("scr_ralface_slash_scr_ralface_gml_1_0")
, string(arg1));
}
(4, 0);
95
        global.msg[5] = 
* Aww,Delay 11 look,Delay 11 Susie!Delay 11
* It seems harmless!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_smallcheckers_enemy_slash_Step_0_gml_141_0")
;
96
        global.msg[6] = 
Face 8* If you act nice,Delay 11 we might win without hurting it!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_smallcheckers_enemy_slash_Step_0_gml_142_0")
;
97
        
scr_susface
scr_susface

function
scr_susface(arg0, arg1)
{ global.msg[arg0] =
scr_84_get_subst_string(
Sound X Char 0 Face ~1 Char S Sound S Close Message
scr_84_get_lang_string("scr_susface_slash_scr_susface_gml_1_0")
, string(arg1));
}
(7, 0);
98
        global.msg[8] = 
* ...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_smallcheckers_enemy_slash_Step_0_gml_144_0")
;
99
        global.msg[9] = 
Face 2* ... okay,Delay 11 okay.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_smallcheckers_enemy_slash_Step_0_gml_145_0")
;
100
        global.msg[10] = 
Face 1* Hey,Delay 11 little guy.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_smallcheckers_enemy_slash_Step_0_gml_146_0")
;
101
        global.msg[11] = 
Face 4* I really like the ax in your face.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_smallcheckers_enemy_slash_Step_0_gml_147_0")
;
102
        actcon = 5;
103
        
scr_battletext_default
scr_battletext_default

function
scr_battletext_default()
{ global.fc = 0; global.typer = 4;
scr_battletext();
return battlewriter; }
();
104
    }
105
    if (acting == 3 && actcon == 0)
106
    {
107
        actcon = 5;
108
        global.msg[0] = 
* You warned C.Round about Susie.Delay 11
* It seems barely cognizant of what that means.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_smallcheckers_enemy_slash_Step_0_gml_155_0")
;
109
        
scr_susface
scr_susface

function
scr_susface(arg0, arg1)
{ global.msg[arg0] =
scr_84_get_subst_string(
Sound X Char 0 Face ~1 Char S Sound S Close Message
scr_84_get_lang_string("scr_susface_slash_scr_susface_gml_1_0")
, string(arg1));
}
(1, 0);
110
        global.msg[2] = 
* Hey,Delay 11 wait.Delay 11
* Why the hell are you giving the ENEMY advice?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_smallcheckers_enemy_slash_Step_0_gml_157_0")
;
111
        
scr_ralface
scr_ralface

function
scr_ralface(arg0, arg1)
{ global.msg[arg0] =
scr_84_get_subst_string(
Sound X Char 0 Face ~1 Char R Sound R Close Message
scr_84_get_lang_string("scr_ralface_slash_scr_ralface_gml_1_0")
, string(arg1));
}
(3, 6);
112
        global.msg[4] = 
* Umm,Delay 11 so we don't accidentally hurt it...?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_smallcheckers_enemy_slash_Step_0_gml_159_0")
;
113
        
scr_susface
scr_susface

function
scr_susface(arg0, arg1)
{ global.msg[arg0] =
scr_84_get_subst_string(
Sound X Char 0 Face ~1 Char S Sound S Close Message
scr_84_get_lang_string("scr_susface_slash_scr_susface_gml_1_0")
, string(arg1));
}
(5, 0);
114
        global.msg[6] = 
Face 0* ...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_smallcheckers_enemy_slash_Step_0_gml_161_0")
;
115
        global.msg[7] = 
Face 8* HURTING IT's the point,Delay 11 you MORON.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_smallcheckers_enemy_slash_Step_0_gml_162_0")
;
116
        global.msg[8] = 
Face 1* It attacked us.Delay 11
* So it dies.Delay 11
* Simple,Delay 11 right?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_smallcheckers_enemy_slash_Step_0_gml_163_0")
;
117
        
scr_ralface
scr_ralface

function
scr_ralface(arg0, arg1)
{ global.msg[arg0] =
scr_84_get_subst_string(
Sound X Char 0 Face ~1 Char R Sound R Close Message
scr_84_get_lang_string("scr_ralface_slash_scr_ralface_gml_1_0")
, string(arg1));
}
(9, 8);
118
        global.msg[10] = 
* B-but Susie,Delay 11 what if the enemy might be,Delay 11 um,Delay 11 nice?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_smallcheckers_enemy_slash_Step_0_gml_165_0")
;
119
        
scr_susface
scr_susface

function
scr_susface(arg0, arg1)
{ global.msg[arg0] =
scr_84_get_subst_string(
Sound X Char 0 Face ~1 Char S Sound S Close Message
scr_84_get_lang_string("scr_susface_slash_scr_susface_gml_1_0")
, string(arg1));
}
(11, 0);
120
        global.msg[12] = 
* ...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_smallcheckers_enemy_slash_Step_0_gml_167_0")
;
121
        global.msg[13] = 
Face 2* Okay,Delay 11 yeah,Delay 11 there's a word for that.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_smallcheckers_enemy_slash_Step_0_gml_168_0")
;
122
        
scr_ralface
scr_ralface

function
scr_ralface(arg0, arg1)
{ global.msg[arg0] =
scr_84_get_subst_string(
Sound X Char 0 Face ~1 Char R Sound R Close Message
scr_84_get_lang_string("scr_ralface_slash_scr_ralface_gml_1_0")
, string(arg1));
}
(14, 0);
123
        global.msg[15] = 
* Oh?Delay 11
* What is it?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_smallcheckers_enemy_slash_Step_0_gml_170_0")
;
124
        
scr_susface
scr_susface

function
scr_susface(arg0, arg1)
{ global.msg[arg0] =
scr_84_get_subst_string(
Sound X Char 0 Face ~1 Char S Sound S Close Message
scr_84_get_lang_string("scr_susface_slash_scr_susface_gml_1_0")
, string(arg1));
}
(16, 4);
125
        global.msg[17] = 
Face 4* Striking first.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_smallcheckers_enemy_slash_Step_0_gml_172_0")
;
126
        global.monstercomment[myself] = 
(Warned)
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_smallcheckers_enemy_slash_Step_0_gml_174_0")
;
127
        global.automiss[0] = 1;
128
        
scr_battletext_default
scr_battletext_default

function
scr_battletext_default()
{ global.fc = 0; global.typer = 4;
scr_battletext();
return battlewriter; }
();
129
    }
130
    if (actcon == 1 && !instance_exists(obj_writer))
131
    {
132
        actcon = 0;
133
        
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();
} } }
();
134
    }
135
    if (actcon == 5 && instance_exists(obj_writer) == false)
136
    {
137
        global.battleat[1] = 90;
138
        global.battleat[2] = 90;
139
        actcon = 6;
140
        with (obj_herosusie)
141
        {
142
            attacktimer = 0;
143
            state = 1;
144
            points = 100 + round(random(40));
145
            global.faceaction[myself] = 0;
146
            if (global.automiss[0] == 1)
147
                points = 0;
148
            if (global.automiss[0] == 0)
149
            {
150
                with (obj_event_manager)
151
                    trigger_event(UnknownEnum.Value_0, UnknownEnum.Value_22);
152
            }
153
        }
154
        if (global.automiss[0] == 1)
155
        {
156
            hspeed = 5;
157
            global.mercymod[myself] = 200;
158
        }
159
        alarm[4]
 = 50;
gml_Object_obj_smallcheckers_enemy_Alarm_4.gml

actcon += 1;
160
    }
161
    if (actcon == 7)
162
    {
163
        global.monster[myself] = 0;
164
        global.msg[0] = 
* Where'd you get it?Delay 11
* Heh heh heh heh.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_smallcheckers_enemy_slash_Step_0_gml_217_0")
;
165
        
scr_ralface
scr_ralface

function
scr_ralface(arg0, arg1)
{ global.msg[arg0] =
scr_84_get_subst_string(
Sound X Char 0 Face ~1 Char R Sound R Close Message
scr_84_get_lang_string("scr_ralface_slash_scr_ralface_gml_1_0")
, string(arg1));
}
(1, 3);
166
        global.flag[211 c_round_outcome] = 1;
167
        global.msg[2] = 
* (Umm,Delay 11 Kris,Delay 11 maybe I should talk to her...)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_smallcheckers_enemy_slash_Step_0_gml_220_0")
;
168
        if (global.automiss[0] == 1)
169
        {
170
            global.flag[211 c_round_outcome] = 2;
171
            global.msg[0] = 
Face 7* Urgh,Delay 11 you IDIOTS!Delay 11
* It got away!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_smallcheckers_enemy_slash_Step_0_gml_224_0")
;
172
            
scr_ralface
scr_ralface

function
scr_ralface(arg0, arg1)
{ global.msg[arg0] =
scr_84_get_subst_string(
Sound X Char 0 Face ~1 Char R Sound R Close Message
scr_84_get_lang_string("scr_ralface_slash_scr_ralface_gml_1_0")
, string(arg1));
}
(1, 3);
173
            global.msg[2] = 
* (Wow,Delay 11 that was close,Delay 11 Kris...)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_smallcheckers_enemy_slash_Step_0_gml_226_0")
;
174
            global.msg[3] = 
* (M-maybe I should talk to her...)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_smallcheckers_enemy_slash_Step_0_gml_227_0")
;
175
        }
176
        
scr_battletext
scr_battletext

function
scr_battletext()
{ xx = __view_get(e__VW.XView, 0); yy = __view_get(e__VW.YView, 0); if (global.fc != 0) battlewriter = instance_create(xx + 30, yy + 376, obj_writer); if (global.fc == 0) battlewriter = instance_create(xx + 30, yy + 376, obj_writer); myface = instance_create(xx + 26, yy + 380, obj_face); with (battlewriter) { dialoguer = 1; facer = 1; if (global.fc == 0 && originalcharline == 33) charline = 26; } return battlewriter; } enum e__VW { XView, YView, WView, HView, Angle, HBorder, VBorder, HSpeed, VSpeed, Object, Visible, XPort, YPort, WPort, HPort, Camera, SurfaceID }
();
177
        actcon = 1;
178
    }
179
}
180
if (global.myfight == 7)
181
    hspeed = 15;
182
183
enum e__VW
184
{
185
    XView,
186
    YView,
187
    WView,
188
    HView,
189
    Angle,
190
    HBorder,
191
    VBorder,
192
    HSpeed,
193
    VSpeed,
194
    Object,
195
    Visible,
196
    XPort,
197
    YPort,
198
    WPort,
199
    HPort,
200
    Camera,
201
    SurfaceID
202
}
203
204
enum UnknownEnum
205
{
206
    Value_0,
207
    Value_22 = 22
208
}