Deltarune (Chapter 5) 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
    arg0 = string_lower(arg0);
5
    if (string_pos("star", arg0) != 0)
6
    {
7
        if (global.flag[254 starwalker] > 0)
8
            _recruited = true;
9
    }
10
    if (string_pos("rud", arg0) != 0)
11
    {
12
        if (global.flag[605 recruit_rudinn] == 1)
13
            _recruited = true;
14
    }
15
    if (string_pos("hat", arg0) != 0)
16
    {
17
        if (global.flag[606 recruit_hathy] == 1)
18
            _recruited = true;
19
    }
20
    if (string_pos("pon", arg0) != 0)
21
    {
22
        if (global.flag[611 recruit_ponman] == 1)
23
            _recruited = true;
24
    }
25
    if (string_pos("rab", arg0) != 0)
26
    {
27
        if (global.flag[613 recruit_rabbick] == 1)
28
            _recruited = true;
29
    }
30
    if (string_pos("blo", arg0) != 0)
31
    {
32
        if (global.flag[614 recruit_bloxer] == 1)
33
            _recruited = true;
34
    }
35
    if (arg0 == "jigsawry")
36
    {
37
        if (global.flag[615 recruit_jigsaw] == 1)
38
            _recruited = true;
39
    }
40
    if (string_pos("ran", arg0) != 0 || arg0 == "rudinn ranger" || arg0 == "rudinnranger")
41
    {
42
        if (global.flag[622 recruit_rudinn_ranger] == 1)
43
            _recruited = true;
44
    }
45
    if (string_pos("hea", arg0) != 0)
46
    {
47
        if (global.flag[623 recruit_head_hathy] == 1)
48
            _recruited = true;
49
    }
50
    if (string_pos("amb", arg0) != 0)
51
    {
52
        if (global.flag[630 recruit_medic] == 1)
53
            _recruited = true;
54
    }
55
    if (string_pos("pop", arg0) != 0)
56
    {
57
        if (global.flag[631 recruit_poppup] == 1)
58
            _recruited = true;
59
    }
60
    if (string_pos("tas", arg0) != 0)
61
    {
62
        if (global.flag[632 recruit_tasque] == 1)
63
            _recruited = true;
64
    }
65
    if (string_pos("wer", arg0) != 0)
66
    {
67
        if (global.flag[633 recruit_plugboy] == 1)
68
            _recruited = true;
69
    }
70
    if (string_pos("mau", arg0) != 0)
71
    {
72
        if (global.flag[634 recruit_maus] == 1)
73
            _recruited = true;
74
    }
75
    if (string_pos("vir", arg0) != 0)
76
    {
77
        if (global.flag[635 recruit_viro] == 1)
78
            _recruited = true;
79
    }
80
    if (string_pos("swa", arg0) != 0)
81
    {
82
        if (global.flag[636 recruit_butler] == 1)
83
            _recruited = true;
84
    }
85
    if (string_pos("wwr", arg0) != 0)
86
    {
87
        if (global.flag[640 recruit_www] == 1)
88
            _recruited = true;
89
    }
90
    if (arg0 == "werewerewire")
91
    {
92
        if (global.flag[640 recruit_www] == 1)
93
            _recruited = true;
94
    }
95
    if (string_pos("man", arg0) != 0)
96
    {
97
        if (global.flag[642 recruit_task_manager] == 1)
98
            _recruited = true;
99
    }
100
    if (string_pos("whe", arg0) != 0)
101
    {
102
        if (global.flag[644 recruit_mauswheel] == 1)
103
            _recruited = true;
104
    }
105
    if (arg0 == "mauswheel")
106
    {
107
        if (global.flag[644 recruit_mauswheel] == 1)
108
            _recruited = true;
109
    }
110
    if (string_pos("sha", arg0) != 0)
111
    {
112
        if (global.flag[654 recruit_shadowguy] == 1)
113
            _recruited = true;
114
    }
115
    if (string_pos("shu", arg0) != 0)
116
    {
117
        if (global.flag[655 recruit_shuttah] == 1)
118
            _recruited = true;
119
    }
120
    if (string_pos("zap", arg0) != 0)
121
    {
122
        if (global.flag[656 recruit_zapper] == 1)
123
            _recruited = true;
124
    }
125
    if (string_pos("rib", arg0) != 0)
126
    {
127
        if (global.flag[657 recruit_ribbick] == 1)
128
            _recruited = true;
129
    }
130
    if (string_pos("wat", arg0) != 0)
131
    {
132
        if (global.flag[658 recruit_cooler] == 1)
133
            _recruited = true;
134
    }
135
    if (string_pos("pip", arg0) != 0)
136
    {
137
        if (global.flag[659 recruit_pippins] == 1)
138
            _recruited = true;
139
    }
140
    if (string_pos("guei", arg0) != 0)
141
    {
142
        if (global.flag[662 recruit_guei] == 1)
143
            _recruited = true;
144
    }
145
    if (string_pos("balthizard", arg0) != 0)
146
    {
147
        if (global.flag[663 recruit_balthizard] == 1)
148
            _recruited = true;
149
    }
150
    if (string_pos("bibliox", arg0) != 0)
151
    {
152
        if (global.flag[664 recruit_bibliox] == 1)
153
            _recruited = true;
154
    }
155
    if (string_pos("mizzle", arg0) != 0)
156
    {
157
        if (global.flag[665 recruit_mizzle] == 1)
158
            _recruited = true;
159
    }
160
    if (string_pos("wicabel", arg0) != 0)
161
    {
162
        if (global.flag[666 recruit_wicabel] == 1)
163
            _recruited = true;
164
    }
165
    if (string_pos("winglade", arg0) != 0)
166
    {
167
        if (global.flag[667 recruit_winglade] == 1)
168
            _recruited = true;
169
    }
170
    if (string_pos("organikk", arg0) != 0)
171
    {
172
        if (global.flag[668 recruit_organikk] == 1)
173
            _recruited = true;
174
    }
175
    if (string_pos("miss", arg0) != 0)
176
    {
177
        if (global.flag[669 recruit_ms_mizzle] == 1)
178
            _recruited = true;
179
    }
180
    if (string_pos("flora", arg0) != 0)
181
    {
182
        if (global.flag[670] == 1)
183
            _recruited = true;
184
    }
185
    if (string_pos("leafling", arg0) != 0)
186
    {
187
        if (global.flag[671] == 1)
188
            _recruited = true;
189
    }
190
    if (arg0 == "shi")
191
    {
192
        if (global.flag[672] == 1)
193
            _recruited = true;
194
    }
195
    if (string_pos("shino", arg0) != 0)
196
    {
197
        if (global.flag[673] == 1)
198
            _recruited = true;
199
    }
200
    if (string_pos("kaw", arg0) != 0)
201
    {
202
        if (global.flag[674] == 1)
203
            _recruited = true;
204
    }
205
    if (string_pos("sheary", arg0) != 0)
206
    {
207
        if (global.flag[675] == 1)
208
            _recruited = true;
209
    }
210
    if (string_pos("netskie", arg0) != 0)
211
    {
212
        if (global.flag[676] == 1)
213
            _recruited = true;
214
    }
215
    if (string_pos("terracotta", arg0) != 0)
216
    {
217
        if (global.flag[677] == 1)
218
            _recruited = true;
219
    }
220
    debug_message("enemy " + arg0 + " recruited: " + string(_recruited));
221
    return _recruited;
222
}
223
224
function scr_enemylostcheck(arg0)
225
{
226
    var _lost = false;
227
    arg0 = string_lower(arg0);
228
    if (string_pos("rud", arg0) != 0)
229
    {
230
        if (global.flag[605 recruit_rudinn] == -1)
231
            _lost = true;
232
    }
233
    if (string_pos("hat", arg0) != 0)
234
    {
235
        if (global.flag[606 recruit_hathy] == -1)
236
            _lost = true;
237
    }
238
    if (string_pos("pon", arg0) != 0)
239
    {
240
        if (global.flag[611 recruit_ponman] == -1)
241
            _lost = true;
242
    }
243
    if (string_pos("rab", arg0) != 0)
244
    {
245
        if (global.flag[613 recruit_rabbick] == -1)
246
            _lost = true;
247
    }
248
    if (string_pos("blo", arg0) != 0)
249
    {
250
        if (global.flag[614 recruit_bloxer] == -1)
251
            _lost = true;
252
    }
253
    if (arg0 == "jigsawry")
254
    {
255
        if (global.flag[615 recruit_jigsaw] == -1)
256
            _lost = true;
257
    }
258
    if (string_pos("ran", arg0) != 0 || arg0 == "rudinn ranger" || arg0 == "rudinnranger")
259
    {
260
        if (global.flag[622 recruit_rudinn_ranger] == -1)
261
            _lost = true;
262
    }
263
    if (string_pos("hea", arg0) != 0)
264
    {
265
        if (global.flag[623 recruit_head_hathy] == -1)
266
            _lost = true;
267
    }
268
    if (string_pos("amb", arg0) != 0)
269
    {
270
        if (global.flag[630 recruit_medic] == -1)
271
            _lost = true;
272
    }
273
    if (string_pos("pop", arg0) != 0)
274
    {
275
        if (global.flag[631 recruit_poppup] == -1)
276
            _lost = true;
277
    }
278
    if (string_pos("tas", arg0) != 0)
279
    {
280
        if (global.flag[632 recruit_tasque] == -1)
281
            _lost = true;
282
    }
283
    if (string_pos("wer", arg0) != 0)
284
    {
285
        if (global.flag[633 recruit_plugboy] == -1)
286
            _lost = true;
287
    }
288
    if (string_pos("mau", arg0) != 0)
289
    {
290
        if (global.flag[634 recruit_maus] == -1)
291
            _lost = true;
292
    }
293
    if (string_pos("vir", arg0) != 0)
294
    {
295
        if (global.flag[635 recruit_viro] == -1)
296
            _lost = true;
297
    }
298
    if (string_pos("swa", arg0) != 0)
299
    {
300
        if (global.flag[636 recruit_butler] == -1)
301
            _lost = true;
302
    }
303
    if (string_pos("wwr", arg0) != 0)
304
    {
305
        if (global.flag[640 recruit_www] == -1)
306
            _lost = true;
307
    }
308
    if (arg0 == "werewerewire")
309
    {
310
        if (global.flag[640 recruit_www] == -1)
311
            _lost = true;
312
    }
313
    if (string_pos("man", arg0) != 0)
314
    {
315
        if (global.flag[642 recruit_task_manager] == -1)
316
            _lost = true;
317
    }
318
    if (string_pos("whe", arg0) != 0)
319
    {
320
        if (global.flag[644 recruit_mauswheel] == -1)
321
            _lost = true;
322
    }
323
    if (arg0 == "mauswheel")
324
    {
325
        if (global.flag[644 recruit_mauswheel] == -1)
326
            _lost = true;
327
    }
328
    if (string_pos("sha", arg0) != 0)
329
    {
330
        if (global.flag[654 recruit_shadowguy] == -1)
331
            _lost = true;
332
    }
333
    if (string_pos("shu", arg0) != 0)
334
    {
335
        if (global.flag[655 recruit_shuttah] == -1)
336
            _lost = true;
337
    }
338
    if (string_pos("zap", arg0) != 0)
339
    {
340
        if (global.flag[656 recruit_zapper] == -1)
341
            _lost = true;
342
    }
343
    if (string_pos("rib", arg0) != 0)
344
    {
345
        if (global.flag[657 recruit_ribbick] == -1)
346
            _lost = true;
347
    }
348
    if (string_pos("wat", arg0) != 0)
349
    {
350
        if (global.flag[658 recruit_cooler] == -1)
351
            _lost = true;
352
    }
353
    if (string_pos("pip", arg0) != 0)
354
    {
355
        if (global.flag[659 recruit_pippins] == -1)
356
            _lost = true;
357
    }
358
    if (string_pos("guei", arg0) != 0)
359
    {
360
        if (global.flag[662 recruit_guei] == -1)
361
            _lost = true;
362
    }
363
    if (string_pos("balthizard", arg0) != 0)
364
    {
365
        if (global.flag[663 recruit_balthizard] == -1)
366
            _lost = true;
367
    }
368
    if (string_pos("bibliox", arg0) != 0)
369
    {
370
        if (global.flag[664 recruit_bibliox] == -1)
371
            _lost = true;
372
    }
373
    if (string_pos("mizzle", arg0) != 0)
374
    {
375
        if (global.flag[665 recruit_mizzle] == -1)
376
            _lost = true;
377
    }
378
    if (string_pos("wicabel", arg0) != 0)
379
    {
380
        if (global.flag[666 recruit_wicabel] == -1)
381
            _lost = true;
382
    }
383
    if (string_pos("winglade", arg0) != 0)
384
    {
385
        if (global.flag[667 recruit_winglade] == -1)
386
            _lost = true;
387
    }
388
    if (string_pos("organikk", arg0) != 0)
389
    {
390
        if (global.flag[668 recruit_organikk] == -1)
391
            _lost = true;
392
    }
393
    if (string_pos("miss", arg0) != 0)
394
    {
395
        if (global.flag[669 recruit_ms_mizzle] == -1)
396
            _lost = true;
397
    }
398
    if (string_pos("flora", arg0) != 0)
399
    {
400
        if (global.flag[670] == -1)
401
            _lost = true;
402
    }
403
    if (string_pos("leafling", arg0) != 0)
404
    {
405
        if (global.flag[671] == -1)
406
            _lost = true;
407
    }
408
    if (arg0 == "shi")
409
    {
410
        if (global.flag[672] == -1)
411
            _lost = true;
412
    }
413
    if (string_pos("shino", arg0) != 0)
414
    {
415
        if (global.flag[673] == -1)
416
            _lost = true;
417
    }
418
    if (string_pos("kaw", arg0) != 0)
419
    {
420
        if (global.flag[674] == -1)
421
            _lost = true;
422
    }
423
    if (string_pos("sheary", arg0) != 0)
424
    {
425
        if (global.flag[675] == -1)
426
            _lost = true;
427
    }
428
    if (string_pos("netskie", arg0) != 0)
429
    {
430
        if (global.flag[676] == -1)
431
            _lost = true;
432
    }
433
    if (string_pos("terracotta", arg0) != 0)
434
    {
435
        if (global.flag[677] == -1)
436
            _lost = true;
437
    }
438
    debug_message("enemy " + arg0 + " lost: " + string(_lost));
439
    return _lost;
440
}