Deltarune (Chapter 3) script viewer

← back to main script listing

gml_GlobalScript_scr_recruitchecks

(view raw script w/o annotations or w/e)
1
function scr_enemyrecruitcheck(arg0)
2
{
3
    var _recruited = false;
4
    if (string_pos("star", arg0) != 0)
5
    {
6
        if (global.flag[254 starwalker] > 0)
7
            _recruited = true;
8
    }
9
    if (string_pos("rud", arg0) != 0)
10
    {
11
        if (global.flag[605 recruit_rudinn] == 1)
12
            _recruited = true;
13
    }
14
    if (string_pos("hat", arg0) != 0)
15
    {
16
        if (global.flag[606 recruit_hathy] == 1)
17
            _recruited = true;
18
    }
19
    if (string_pos("pon", arg0) != 0)
20
    {
21
        if (global.flag[611 recruit_ponman] == 1)
22
            _recruited = true;
23
    }
24
    if (string_pos("rab", arg0) != 0)
25
    {
26
        if (global.flag[613 recruit_rabbick] == 1)
27
            _recruited = true;
28
    }
29
    if (string_pos("blo", arg0) != 0)
30
    {
31
        if (global.flag[614 recruit_bloxer] == 1)
32
            _recruited = true;
33
    }
34
    if (arg0 == "jigsawry")
35
    {
36
        if (global.flag[615 recruit_jigsaw] == 1)
37
            _recruited = true;
38
    }
39
    if (string_pos("ran", arg0) != 0 || arg0 == "rudinn ranger" || arg0 == "rudinnranger")
40
    {
41
        if (global.flag[622 recruit_rudinn_ranger] == 1)
42
            _recruited = true;
43
    }
44
    if (string_pos("hea", arg0) != 0)
45
    {
46
        if (global.flag[623 recruit_head_hathy] == 1)
47
            _recruited = true;
48
    }
49
    if (string_pos("amb", arg0) != 0)
50
    {
51
        if (global.flag[630 recruit_medic] == 1)
52
            _recruited = true;
53
    }
54
    if (string_pos("pop", arg0) != 0)
55
    {
56
        if (global.flag[631 recruit_poppup] == 1)
57
            _recruited = true;
58
    }
59
    if (string_pos("tas", arg0) != 0)
60
    {
61
        if (global.flag[632 recruit_tasque] == 1)
62
            _recruited = true;
63
    }
64
    if (string_pos("wer", arg0) != 0)
65
    {
66
        if (global.flag[633 recruit_plugboy] == 1)
67
            _recruited = true;
68
    }
69
    if (string_pos("mau", arg0) != 0)
70
    {
71
        if (global.flag[634 recruit_maus] == 1)
72
            _recruited = true;
73
    }
74
    if (string_pos("vir", arg0) != 0)
75
    {
76
        if (global.flag[635 recruit_viro] == 1)
77
            _recruited = true;
78
    }
79
    if (string_pos("swa", arg0) != 0)
80
    {
81
        if (global.flag[636 recruit_butler] == 1)
82
            _recruited = true;
83
    }
84
    if (string_pos("wwr", arg0) != 0)
85
    {
86
        if (global.flag[640 recruit_www] == 1)
87
            _recruited = true;
88
    }
89
    if (arg0 == "werewerewire")
90
    {
91
        if (global.flag[640 recruit_www] == 1)
92
            _recruited = true;
93
    }
94
    if (string_pos("man", arg0) != 0)
95
    {
96
        if (global.flag[642 recruit_task_manager] == 1)
97
            _recruited = true;
98
    }
99
    if (string_pos("whe", arg0) != 0)
100
    {
101
        if (global.flag[644 recruit_mauswheel] == 1)
102
            _recruited = true;
103
    }
104
    if (arg0 == "mauswheel")
105
    {
106
        if (global.flag[644 recruit_mauswheel] == 1)
107
            _recruited = true;
108
    }
109
    if (string_pos("sha", arg0) != 0)
110
    {
111
        if (global.flag[654 recruit_shadowguy] == 1)
112
            _recruited = true;
113
    }
114
    if (string_pos("shu", arg0) != 0)
115
    {
116
        if (global.flag[655 recruit_shuttah] == 1)
117
            _recruited = true;
118
    }
119
    if (string_pos("zap", arg0) != 0)
120
    {
121
        if (global.flag[656 recruit_zapper] == 1)
122
            _recruited = true;
123
    }
124
    if (string_pos("rib", arg0) != 0)
125
    {
126
        if (global.flag[657 recruit_ribbick] == 1)
127
            _recruited = true;
128
    }
129
    if (string_pos("wat", arg0) != 0)
130
    {
131
        if (global.flag[658 recruit_cooler] == 1)
132
            _recruited = true;
133
    }
134
    if (string_pos("pip", arg0) != 0)
135
    {
136
        if (global.flag[659 recruit_pippins] == 1)
137
            _recruited = true;
138
    }
139
    debug_message("enemy " + arg0 + " lost: " + string(_recruited));
140
    return _recruited;
141
}
142
143
function scr_enemylostcheck(arg0)
144
{
145
    var _lost = false;
146
    if (string_pos("rud", arg0) != 0)
147
    {
148
        if (global.flag[605 recruit_rudinn] == -1)
149
            _lost = true;
150
    }
151
    if (string_pos("hat", arg0) != 0)
152
    {
153
        if (global.flag[606 recruit_hathy] == -1)
154
            _lost = true;
155
    }
156
    if (string_pos("pon", arg0) != 0)
157
    {
158
        if (global.flag[611 recruit_ponman] == -1)
159
            _lost = true;
160
    }
161
    if (string_pos("rab", arg0) != 0)
162
    {
163
        if (global.flag[613 recruit_rabbick] == -1)
164
            _lost = true;
165
    }
166
    if (string_pos("blo", arg0) != 0)
167
    {
168
        if (global.flag[614 recruit_bloxer] == -1)
169
            _lost = true;
170
    }
171
    if (arg0 == "jigsawry")
172
    {
173
        if (global.flag[615 recruit_jigsaw] == -1)
174
            _lost = true;
175
    }
176
    if (string_pos("ran", arg0) != 0 || arg0 == "rudinn ranger" || arg0 == "rudinnranger")
177
    {
178
        if (global.flag[622 recruit_rudinn_ranger] == -1)
179
            _lost = true;
180
    }
181
    if (string_pos("hea", arg0) != 0)
182
    {
183
        if (global.flag[623 recruit_head_hathy] == -1)
184
            _lost = true;
185
    }
186
    if (string_pos("amb", arg0) != 0)
187
    {
188
        if (global.flag[630 recruit_medic] == -1)
189
            _lost = true;
190
    }
191
    if (string_pos("pop", arg0) != 0)
192
    {
193
        if (global.flag[631 recruit_poppup] == -1)
194
            _lost = true;
195
    }
196
    if (string_pos("tas", arg0) != 0)
197
    {
198
        if (global.flag[632 recruit_tasque] == -1)
199
            _lost = true;
200
    }
201
    if (string_pos("wer", arg0) != 0)
202
    {
203
        if (global.flag[633 recruit_plugboy] == -1)
204
            _lost = true;
205
    }
206
    if (string_pos("mau", arg0) != 0)
207
    {
208
        if (global.flag[634 recruit_maus] == -1)
209
            _lost = true;
210
    }
211
    if (string_pos("vir", arg0) != 0)
212
    {
213
        if (global.flag[635 recruit_viro] == -1)
214
            _lost = true;
215
    }
216
    if (string_pos("swa", arg0) != 0)
217
    {
218
        if (global.flag[636 recruit_butler] == -1)
219
            _lost = true;
220
    }
221
    if (string_pos("wwr", arg0) != 0)
222
    {
223
        if (global.flag[640 recruit_www] == -1)
224
            _lost = true;
225
    }
226
    if (arg0 == "werewerewire")
227
    {
228
        if (global.flag[640 recruit_www] == -1)
229
            _lost = true;
230
    }
231
    if (string_pos("man", arg0) != 0)
232
    {
233
        if (global.flag[642 recruit_task_manager] == -1)
234
            _lost = true;
235
    }
236
    if (string_pos("whe", arg0) != 0)
237
    {
238
        if (global.flag[644 recruit_mauswheel] == -1)
239
            _lost = true;
240
    }
241
    if (arg0 == "mauswheel")
242
    {
243
        if (global.flag[644 recruit_mauswheel] == -1)
244
            _lost = true;
245
    }
246
    if (string_pos("sha", arg0) != 0)
247
    {
248
        if (global.flag[654 recruit_shadowguy] == -1)
249
            _lost = true;
250
    }
251
    if (string_pos("shu", arg0) != 0)
252
    {
253
        if (global.flag[655 recruit_shuttah] == -1)
254
            _lost = true;
255
    }
256
    if (string_pos("zap", arg0) != 0)
257
    {
258
        if (global.flag[656 recruit_zapper] == -1)
259
            _lost = true;
260
    }
261
    if (string_pos("rib", arg0) != 0)
262
    {
263
        if (global.flag[657 recruit_ribbick] == -1)
264
            _lost = true;
265
    }
266
    if (string_pos("wat", arg0) != 0)
267
    {
268
        if (global.flag[658 recruit_cooler] == -1)
269
            _lost = true;
270
    }
271
    if (string_pos("pip", arg0) != 0)
272
    {
273
        if (global.flag[659 recruit_pippins] == -1)
274
            _lost = true;
275
    }
276
    debug_message("enemy " + arg0 + " lost: " + string(_lost));
277
    return _lost;
278
}