Deltarune (Chapter 4) 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
    if (string_pos("guei", arg0) != 0)
140
    {
141
        if (global.flag[662 recruit_guei] == 1)
142
            _recruited = true;
143
    }
144
    if (string_pos("balthizard", arg0) != 0)
145
    {
146
        if (global.flag[663 recruit_balthizard] == 1)
147
            _recruited = true;
148
    }
149
    if (string_pos("bibliox", arg0) != 0)
150
    {
151
        if (global.flag[664 recruit_bibliox] == 1)
152
            _recruited = true;
153
    }
154
    if (string_pos("mizzle", arg0) != 0)
155
    {
156
        if (global.flag[665 recruit_mizzle] == 1)
157
            _recruited = true;
158
    }
159
    if (string_pos("wicabel", arg0) != 0)
160
    {
161
        if (global.flag[666 recruit_wicabel] == 1)
162
            _recruited = true;
163
    }
164
    if (string_pos("winglade", arg0) != 0)
165
    {
166
        if (global.flag[667 recruit_winglade] == 1)
167
            _recruited = true;
168
    }
169
    if (string_pos("organikk", arg0) != 0)
170
    {
171
        if (global.flag[668 recruit_organikk] == 1)
172
            _recruited = true;
173
    }
174
    if (string_pos("miss", arg0) != 0)
175
    {
176
        if (global.flag[669 recruit_ms_mizzle] == 1)
177
            _recruited = true;
178
    }
179
    debug_message("enemy " + arg0 + " recruited: " + string(_recruited));
180
    return _recruited;
181
}
182
183
function scr_enemylostcheck(arg0)
184
{
185
    var _lost = false;
186
    if (string_pos("rud", arg0) != 0)
187
    {
188
        if (global.flag[605 recruit_rudinn] == -1)
189
            _lost = true;
190
    }
191
    if (string_pos("hat", arg0) != 0)
192
    {
193
        if (global.flag[606 recruit_hathy] == -1)
194
            _lost = true;
195
    }
196
    if (string_pos("pon", arg0) != 0)
197
    {
198
        if (global.flag[611 recruit_ponman] == -1)
199
            _lost = true;
200
    }
201
    if (string_pos("rab", arg0) != 0)
202
    {
203
        if (global.flag[613 recruit_rabbick] == -1)
204
            _lost = true;
205
    }
206
    if (string_pos("blo", arg0) != 0)
207
    {
208
        if (global.flag[614 recruit_bloxer] == -1)
209
            _lost = true;
210
    }
211
    if (arg0 == "jigsawry")
212
    {
213
        if (global.flag[615 recruit_jigsaw] == -1)
214
            _lost = true;
215
    }
216
    if (string_pos("ran", arg0) != 0 || arg0 == "rudinn ranger" || arg0 == "rudinnranger")
217
    {
218
        if (global.flag[622 recruit_rudinn_ranger] == -1)
219
            _lost = true;
220
    }
221
    if (string_pos("hea", arg0) != 0)
222
    {
223
        if (global.flag[623 recruit_head_hathy] == -1)
224
            _lost = true;
225
    }
226
    if (string_pos("amb", arg0) != 0)
227
    {
228
        if (global.flag[630 recruit_medic] == -1)
229
            _lost = true;
230
    }
231
    if (string_pos("pop", arg0) != 0)
232
    {
233
        if (global.flag[631 recruit_poppup] == -1)
234
            _lost = true;
235
    }
236
    if (string_pos("tas", arg0) != 0)
237
    {
238
        if (global.flag[632 recruit_tasque] == -1)
239
            _lost = true;
240
    }
241
    if (string_pos("wer", arg0) != 0)
242
    {
243
        if (global.flag[633 recruit_plugboy] == -1)
244
            _lost = true;
245
    }
246
    if (string_pos("mau", arg0) != 0)
247
    {
248
        if (global.flag[634 recruit_maus] == -1)
249
            _lost = true;
250
    }
251
    if (string_pos("vir", arg0) != 0)
252
    {
253
        if (global.flag[635 recruit_viro] == -1)
254
            _lost = true;
255
    }
256
    if (string_pos("swa", arg0) != 0)
257
    {
258
        if (global.flag[636 recruit_butler] == -1)
259
            _lost = true;
260
    }
261
    if (string_pos("wwr", arg0) != 0)
262
    {
263
        if (global.flag[640 recruit_www] == -1)
264
            _lost = true;
265
    }
266
    if (arg0 == "werewerewire")
267
    {
268
        if (global.flag[640 recruit_www] == -1)
269
            _lost = true;
270
    }
271
    if (string_pos("man", arg0) != 0)
272
    {
273
        if (global.flag[642 recruit_task_manager] == -1)
274
            _lost = true;
275
    }
276
    if (string_pos("whe", arg0) != 0)
277
    {
278
        if (global.flag[644 recruit_mauswheel] == -1)
279
            _lost = true;
280
    }
281
    if (arg0 == "mauswheel")
282
    {
283
        if (global.flag[644 recruit_mauswheel] == -1)
284
            _lost = true;
285
    }
286
    if (string_pos("sha", arg0) != 0)
287
    {
288
        if (global.flag[654 recruit_shadowguy] == -1)
289
            _lost = true;
290
    }
291
    if (string_pos("shu", arg0) != 0)
292
    {
293
        if (global.flag[655 recruit_shuttah] == -1)
294
            _lost = true;
295
    }
296
    if (string_pos("zap", arg0) != 0)
297
    {
298
        if (global.flag[656 recruit_zapper] == -1)
299
            _lost = true;
300
    }
301
    if (string_pos("rib", arg0) != 0)
302
    {
303
        if (global.flag[657 recruit_ribbick] == -1)
304
            _lost = true;
305
    }
306
    if (string_pos("wat", arg0) != 0)
307
    {
308
        if (global.flag[658 recruit_cooler] == -1)
309
            _lost = true;
310
    }
311
    if (string_pos("pip", arg0) != 0)
312
    {
313
        if (global.flag[659 recruit_pippins] == -1)
314
            _lost = true;
315
    }
316
    if (string_pos("guei", arg0) != 0)
317
    {
318
        if (global.flag[662 recruit_guei] == -1)
319
            _lost = true;
320
    }
321
    if (string_pos("balthizard", arg0) != 0)
322
    {
323
        if (global.flag[663 recruit_balthizard] == -1)
324
            _lost = true;
325
    }
326
    if (string_pos("bibliox", arg0) != 0)
327
    {
328
        if (global.flag[664 recruit_bibliox] == -1)
329
            _lost = true;
330
    }
331
    if (string_pos("mizzle", arg0) != 0)
332
    {
333
        if (global.flag[665 recruit_mizzle] == -1)
334
            _lost = true;
335
    }
336
    if (string_pos("wicabel", arg0) != 0)
337
    {
338
        if (global.flag[666 recruit_wicabel] == -1)
339
            _lost = true;
340
    }
341
    if (string_pos("winglade", arg0) != 0)
342
    {
343
        if (global.flag[667 recruit_winglade] == -1)
344
            _lost = true;
345
    }
346
    if (string_pos("organikk", arg0) != 0)
347
    {
348
        if (global.flag[668 recruit_organikk] == -1)
349
            _lost = true;
350
    }
351
    if (string_pos("miss", arg0) != 0)
352
    {
353
        if (global.flag[669 recruit_ms_mizzle] == -1)
354
            _lost = true;
355
    }
356
    debug_message("enemy " + arg0 + " lost: " + string(_lost));
357
    return _lost;
358
}