Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_mainchara_Step_0

(view raw script w/o annotations or w/e)
1
if (ignoredepth == 0)
2
    
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
3
wallcheck = 0;
4
nowx = x;
5
nowy = y;
6
if (press_d == 0 && press_l == 0 && press_u == 0 && press_r == 0)
7
    nopress = 1;
8
press_l = 0;
9
press_r = 0;
10
press_d = 0;
11
press_u = 0;
12
bkx = 0;
13
bky = 0;
14
bkxy = 0;
15
jelly = 2;
16
if (
scr_debug
scr_debug

function
scr_debug()
{ if (global.debug == 1) return 1; }
())
17
{
18
    var noclipinput = false;
19
    var glointforce = false;
20
    for (var i = 0; i < 8; i++)
21
    {
22
        if ((gamepad_button_check(i, gp_shoulderl) || gamepad_button_check(i, gp_shoulderlb)) && (gamepad_button_check(i, gp_shoulderr) || gamepad_button_check(i, gp_shoulderrb)))
23
        {
24
            if (gamepad_button_check_pressed(i, gp_face4))
25
                noclipinput = true;
26
            if (gamepad_button_check_pressed(i, gp_select))
27
                glointforce = true;
28
        }
29
    }
30
    if ((keyboard_check(vk_shift) && keyboard_check(vk_control) && keyboard_check_pressed(ord("N"))) || noclipinput)
31
    {
32
        noclip = !noclip;
33
        var str = "off";
34
        if (noclip == 1)
35
            str = "on";
36
        debug_print("noclip=" + str);
37
    }
38
    if ((keyboard_check(vk_shift) && keyboard_check(vk_control) && keyboard_check_pressed(ord("0"))) || glointforce)
39
    {
40
        debug_print("global.interact set to 0");
41
        global.interact = 0;
42
    }
43
}
44
if (!roomenterfreezeend)
45
{
46
    if (global.interact == 3)
47
    {
48
        if (global.flag[21 door_freeze_timer] > 0)
49
        {
50
            global.flag[21 door_freeze_timer]--;
51
        }
52
        else
53
        {
54
            roomenterfreezeend = 1;
55
            global.interact = 0;
56
            global.flag[21 door_freeze_timer] = -10;
57
        }
58
    }
59
}
60
if (global.interact == 0)
61
{
62
    if (button3_p() && threebuffer < 0)
63
    {
64
        if (global.flag[7 disable_menu?] == 0 && battlemode == 0 && swordmode == 0 && !instance_exists(obj_climb_kris))
65
        {
66
            with (obj_darkcontroller)
67
                threebuffer = 2;
68
            with (obj_overworldc)
69
            {
70
                movenoise = 1;
71
                threebuffer = 2;
72
            }
73
            global.menuno = 0;
74
            global.interact = 5;
75
            threebuffer = 2;
76
            twobuffer = 2;
77
        }
78
    }
79
}
80
if (swordcon == 1)
81
{
82
    swordtimer++;
83
    if (swordtimer >= 15)
84
    {
85
        with (slashmarker)
86
            instance_destroy();
87
        swordcon = 0;
88
        swordsprite = rsprite;
89
        fun = 0;
90
        if (global.interact == 4)
91
            global.interact = 0;
92
        swordtimer = 0;
93
        image_speed = 0;
94
        image_index = 0;
95
        image_alpha = 1;
96
    }
97
}
98
if (global.interact == 0 && freeze == 0)
99
{
100
    if (global.flag[11 auto_run] == 1)
101
    {
102
        if (button2_h() && twobuffer < 0)
103
            run = 0;
104
        else
105
            run = 1;
106
    }
107
    else if (button2_h() && twobuffer < 0)
108
    {
109
        run = 1;
110
    }
111
    else
112
    {
113
        run = 0;
114
    }
115
    if (autorun > 0)
116
    {
117
        if (autorun == 1)
118
        {
119
            run = 1;
120
            runtimer = 200;
121
        }
122
        if (autorun == 2)
123
        {
124
            run = 1;
125
            runtimer = 50;
126
        }
127
    }
128
    if (run == 1)
129
    {
130
        if (darkmode == 0)
131
        {
132
            wspeed = bwspeed + 1;
133
            if (runtimer > 10)
134
                wspeed = bwspeed + 2;
135
            if (runtimer > 60)
136
                wspeed = bwspeed + 3;
137
        }
138
        if (darkmode == 1)
139
        {
140
            wspeed = bwspeed + 2;
141
            if (runtimer > 10)
142
                wspeed = bwspeed + 4;
143
            if (runtimer > 60)
144
                wspeed = bwspeed + 5;
145
        }
146
    }
147
    if (run == 0)
148
        wspeed = bwspeed;
149
    if (climbing == 1)
150
        wspeed = ceil(wspeed * 0.7);
151
    var slowwalker = instance_place(x, y, obj_slowwalk);
152
    if (instance_exists(slowwalker))
153
    {
154
        run = 0;
155
        wspeed = clamp(wspeed, 0, slowwalker.maxwalkspeed);
156
    }
157
    if (global.chapter == 4)
158
    {
159
        if (global.darkzone == 0 && global.plot >= 290)
160
            wspeed = ceil(wspeed * 0.6);
161
    }
162
    if (left_h())
163
        press_l = 1;
164
    if (right_h())
165
        press_r = 1;
166
    if (up_h())
167
        press_u = 1;
168
    if (down_h())
169
        press_d = 1;
170
    px = 0;
171
    py = 0;
172
    pressdir = -1;
173
    if (press_r == 1)
174
    {
175
        px = wspeed;
176
        pressdir = 1;
177
    }
178
    if (press_l == 1)
179
    {
180
        px = -wspeed;
181
        pressdir = 3;
182
    }
183
    if (press_d == 1)
184
    {
185
        py = wspeed;
186
        pressdir = 0;
187
    }
188
    if (press_u == 1)
189
    {
190
        py = -wspeed;
191
        pressdir = 2;
192
    }
193
    if (nopress == 1 && pressdir != -1)
194
        global.facing = pressdir;
195
    if (global.facing == 2)
196
    {
197
        if (press_d == 1)
198
            global.facing = 0;
199
        if (press_u == 0 && pressdir != -1)
200
            global.facing = pressdir;
201
    }
202
    if (global.facing == 0)
203
    {
204
        if (press_u == 1)
205
            global.facing = 2;
206
        if (press_d == 0 && pressdir != -1)
207
            global.facing = pressdir;
208
    }
209
    if (global.facing == 3)
210
    {
211
        if (press_r == 1)
212
            global.facing = 1;
213
        if (press_l == 0 && pressdir != -1)
214
            global.facing = pressdir;
215
    }
216
    if (global.facing == 1)
217
    {
218
        if (press_l == 1)
219
            global.facing = 3;
220
        if (press_r == 0 && pressdir != -1)
221
            global.facing = pressdir;
222
    }
223
    if (press_r == 1)
224
        swordfacing = 1;
225
    if (press_l == 1)
226
        swordfacing = -1;
227
    if (swordmode == 1)
228
    {
229
        if (button1_p() && swordcon == 0 && global.interact == 0)
230
        {
231
            global.interact = 4;
232
            swordsprite = rsprite;
233
            slashmarker = 
scr_dark_marker
scr_dark_marker

function
scr_dark_marker(arg0, arg1, arg2)
{ thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { sprite_index = arg2; image_speed = 0; image_xscale = 2; image_yscale = 2; } return thismarker; }
(x, y, rsprite);
234
            slashmarker.depth = depth;
235
            slashmarker.image_speed = 1;
236
            if (swordfacing == -1)
237
            {
238
                slashmarker.x += sprite_width;
239
                slashmarker.image_xscale = -image_xscale;
240
            }
241
            image_alpha = 0;
242
            fun = 1;
243
            snd_play(snd_laz_c);
244
            image_index = 0;
245
            image_speed = 0.5;
246
            swordtimer = 0;
247
            swordcon = 1;
248
            press_l = 0;
249
            press_r = 0;
250
            press_u = 0;
251
            press_d = 0;
252
            swordhitbox = instance_create(slashmarker.x, slashmarker.y, obj_swordhitbox);
253
            swordhitbox.image_xscale = slashmarker.image_xscale;
254
            swordhitbox.image_yscale = image_yscale;
255
        }
256
    }
257
    nopress = 0;
258
    xmeet = 0;
259
    ymeet = 0;
260
    xymeet = 0;
261
    var checkcol = true;
262
    if (
scr_debug
scr_debug

function
scr_debug()
{ if (global.debug == 1) return 1; }
() && noclip)
263
        checkcol = false;
264
    if (checkcol)
265
    {
266
        if (place_meeting(x + px, y + py, obj_solidblock))
267
            xymeet = 1;
268
        if (place_meeting(x + px, y, obj_solidblock))
269
        {
270
            if (place_meeting(x + px, y, obj_solidblock))
271
            {
272
                for (g = wspeed; g > 0; g -= 1)
273
                {
274
                    mvd = 0;
275
                    if (press_d == 0 && !place_meeting(x + px, y - g, obj_solidblock))
276
                    {
277
                        y -= g;
278
                        py = 0;
279
                        break;
280
                        mvd = 1;
281
                    }
282
                    if (press_u == 0 && mvd == 0 && !place_meeting(x + px, y + g, obj_solidblock))
283
                    {
284
                        y += g;
285
                        py = 0;
286
                        break;
287
                    }
288
                }
289
            }
290
            xmeet = 1;
291
            bkx = 0;
292
            if (px > 0)
293
            {
294
                for (var i = px; i >= 0; i -= 1)
295
                {
296
                    if (!place_meeting(x + i, y, obj_solidblock))
297
                    {
298
                        px = i;
299
                        bkx = 1;
300
                        break;
301
                    }
302
                }
303
            }
304
            if (px < 0)
305
            {
306
                for (var i = px; i <= 0; i += 1)
307
                {
308
                    if (!place_meeting(x + i, y, obj_solidblock))
309
                    {
310
                        px = i;
311
                        bkx = 1;
312
                        break;
313
                    }
314
                }
315
            }
316
            if (bkx == 0)
317
                px = 0;
318
        }
319
        if (place_meeting(x, y + py, obj_solidblock))
320
        {
321
            ymeet = 1;
322
            bky = 0;
323
            if (place_meeting(x, y + py, obj_solidblock))
324
            {
325
                for (g = wspeed; g > 0; g -= 1)
326
                {
327
                    mvd = 0;
328
                    if (press_r == 0 && !place_meeting(x - g, y + py, obj_solidblock))
329
                    {
330
                        x -= g;
331
                        px = 0;
332
                        break;
333
                        mvd = 1;
334
                    }
335
                    if (mvd == 0 && press_l == 0 && !place_meeting(x + g, y + py, obj_solidblock))
336
                    {
337
                        x += g;
338
                        px = 0;
339
                        break;
340
                    }
341
                }
342
            }
343
            if (py > 0)
344
            {
345
                for (var i = py; i >= 0; i -= 1)
346
                {
347
                    if (!place_meeting(x, y + i, obj_solidblock))
348
                    {
349
                        py = i;
350
                        bky = 1;
351
                        break;
352
                    }
353
                }
354
            }
355
            if (py < 0)
356
            {
357
                for (var i = py; i <= 0; i += 1)
358
                {
359
                    if (!place_meeting(x, y + i, obj_solidblock))
360
                    {
361
                        py = i;
362
                        bky = 1;
363
                        break;
364
                    }
365
                }
366
            }
367
            if (bky == 0)
368
                py = 0;
369
        }
370
        if (place_meeting(x + px, y + py, obj_solidblock))
371
        {
372
            xymeet = 1;
373
            bkxy = 0;
374
            var i = px;
375
            j = py;
376
            while (j != 0 || i != 0)
377
            {
378
                if (!place_meeting(x + i, y + j, obj_solidblock))
379
                {
380
                    px = i;
381
                    py = j;
382
                    bkxy = 1;
383
                    break;
384
                }
385
                if (abs(j) >= 1)
386
                {
387
                    if (j > 0)
388
                        j -= 1;
389
                    if (j < 0)
390
                        j += 1;
391
                }
392
                else
393
                {
394
                    j = 0;
395
                }
396
                if (abs(i) >= 1)
397
                {
398
                    if (i > 0)
399
                        i -= 1;
400
                    if (i < 0)
401
                        i += 1;
402
                }
403
                else
404
                {
405
                    i = 0;
406
                }
407
            }
408
            if (bkxy == 0)
409
            {
410
                px = 0;
411
                py = 0;
412
            }
413
        }
414
    }
415
    runmove = 0;
416
    if (run == 1 && xmeet == 0 && ymeet == 0 && xymeet == 0)
417
    {
418
        if (abs(px) > 0 || abs(py) > 0)
419
        {
420
            runmove = 1;
421
            runtimer += 1;
422
            runcounter += 1;
423
        }
424
        else
425
        {
426
            runtimer = 0;
427
        }
428
    }
429
    else
430
    {
431
        runtimer = 0;
432
    }
433
    x += px;
434
    y += py;
435
}
436
if (fun == 0)
437
{
438
    walk = 0;
439
    if (x != nowx && nopress == 0)
440
        walk = 1;
441
    if (y != nowy && nopress == 0)
442
        walk = 1;
443
    if (global.chapter == 4 && i_ex(obj_rotating_tower_controller))
444
    {
445
        if (obj_rotating_tower_controller.yoffset != obj_rotating_tower_controller.yoffset_prev && nopress == 0)
446
            walk = 1;
447
        else if (obj_rotating_tower_controller.tower_angle != obj_rotating_tower_controller.tower_angle_prev && nopress == 0)
448
            walk = 1;
449
    }
450
    if (walk == 1)
451
        walkbuffer = 6;
452
    if (walkbuffer > 3 && fun == 0)
453
    {
454
        if (climbing == 0)
455
        {
456
            walktimer += 1.5;
457
            if (runmove == 1 || (run == 1 && climbing == 1))
458
                walktimer += 1.5;
459
            if (global.chapter == 4)
460
            {
461
                if (global.darkzone == 0 && global.plot >= 290 && (runmove == 1 || run == 1) && xymeet == 0)
462
                    walktimer -= 1.5;
463
            }
464
        }
465
        if (climbing == 1)
466
        {
467
            with (obj_rotating_tower_caterpillar)
468
                index += 0.15;
469
        }
470
        if (walktimer >= 40)
471
            walktimer -= 40;
472
        if (walktimer < 10)
473
            image_index = 0;
474
        if (walktimer >= 10)
475
            image_index = 1;
476
        if (walktimer >= 20)
477
            image_index = 2;
478
        if (walktimer >= 30)
479
            image_index = 3;
480
    }
481
    if (walkbuffer <= 0 && fun == 0 && climbing == 0)
482
    {
483
        if (walktimer < 10)
484
            walktimer = 9.5;
485
        if (walktimer >= 10 && walktimer < 20)
486
            walktimer = 19.5;
487
        if (walktimer >= 20 && walktimer < 30)
488
            walktimer = 29.5;
489
        if (walktimer >= 30)
490
            walktimer = 39.5;
491
        image_index = 0;
492
    }
493
    walkbuffer -= 0.75;
494
}
495
if (fun == 0)
496
{
497
    if (global.facing == 0)
498
        sprite_index = dsprite;
499
    if (global.facing == 1)
500
        sprite_index = rsprite;
501
    if (global.facing == 2)
502
        sprite_index = usprite;
503
    if (global.facing == 3)
504
        sprite_index = lsprite;
505
    if (climbing == 1)
506
        sprite_index = climbsprite;
507
}
508
if (stepping == 1 && fun == 0)
509
{
510
    if (image_index == 1 && stepped == 0)
511
    {
512
        if (global.flag[31 disable_loud_steps] == 0 && climbing == 0)
513
            snd_play(snd_step1);
514
        stepped = 1;
515
    }
516
    if (image_index == 0 || image_index == 2)
517
        stepped = 0;
518
    if (image_index == 3 && stepped == 0)
519
    {
520
        if (global.flag[31 disable_loud_steps] == 0 && climbing == 0)
521
            snd_play(snd_step2);
522
        stepped = 1;
523
    }
524
}
525
if (onebuffer < 0)
526
{
527
    if (global.interact == 0)
528
    {
529
        if (button1_p())
530
        {
531
            thisinteract = 0;
532
            d = global.darkzone + 1;
533
            if (global.facing == 1)
534
            {
535
                if (collision_rectangle(x + (sprite_width / 2), y + (6 * d) + (sprite_height / 2), x + sprite_width + (13 * d), y + sprite_height, obj_interactable, false, true))
536
                    thisinteract = 1;
537
                if (collision_rectangle(x + (sprite_width / 2), y + (6 * d) + (sprite_height / 2), x + sprite_width + (13 * d), y + sprite_height, obj_interactablesolid, false, true))
538
                    thisinteract = 2;
539
            }
540
            if (thisinteract > 0)
541
            {
542
                if (thisinteract == 1)
543
                    interactedobject = collision_rectangle(x + (sprite_width / 2), y + (6 * d) + (sprite_height / 2), x + sprite_width + (13 * d), y + sprite_height, obj_interactable, false, true);
544
                if (thisinteract == 2)
545
                    interactedobject = collision_rectangle(x + (sprite_width / 2), y + (6 * d) + (sprite_height / 2), x + sprite_width + (13 * d), y + sprite_height, obj_interactablesolid, false, true);
546
                if (interactedobject != -4)
547
                {
548
                    with (interactedobject)
549
                        facing = 3;
550
                    with (interactedobject)
551
                        
scr_interact
scr_interact

function
scr_interact()
{ myinteract = 1; event_user(0); }
();
552
                }
553
            }
554
            thisinteract = 0;
555
            if (global.facing == 3)
556
            {
557
                if (collision_rectangle(x + (sprite_width / 2), y + (6 * d) + (sprite_height / 2), x - (13 * d), y + sprite_height, obj_interactable, false, true))
558
                    thisinteract = 1;
559
                if (collision_rectangle(x + (sprite_width / 2), y + (6 * d) + (sprite_height / 2), x - (13 * d), y + sprite_height, obj_interactablesolid, false, true))
560
                    thisinteract = 2;
561
            }
562
            if (thisinteract > 0)
563
            {
564
                if (thisinteract == 1)
565
                    interactedobject = collision_rectangle(x + (sprite_width / 2), y + (6 * d) + (sprite_height / 2), x - (13 * d), y + sprite_height, obj_interactable, false, true);
566
                if (thisinteract == 2)
567
                    interactedobject = collision_rectangle(x + (sprite_width / 2), y + (6 * d) + (sprite_height / 2), x - (13 * d), y + sprite_height, obj_interactablesolid, false, true);
568
                if (interactedobject != -4)
569
                {
570
                    with (interactedobject)
571
                        facing = 1;
572
                    with (interactedobject)
573
                        
scr_interact
scr_interact

function
scr_interact()
{ myinteract = 1; event_user(0); }
();
574
                }
575
            }
576
            thisinteract = 0;
577
            if (global.facing == 0)
578
            {
579
                if (collision_rectangle(x + (4 * d), y + (28 * d), (x + sprite_width) - (4 * d), y + sprite_height + (15 * d), obj_interactable, false, true))
580
                    thisinteract = 1;
581
                if (collision_rectangle(x + (4 * d), y + (28 * d), (x + sprite_width) - (4 * d), y + sprite_height + (15 * d), obj_interactablesolid, false, true))
582
                    thisinteract = 2;
583
            }
584
            if (thisinteract > 0)
585
            {
586
                if (thisinteract == 1)
587
                    interactedobject = collision_rectangle(x + (4 * d), y + (28 * d), (x + sprite_width) - (4 * d), y + sprite_height + (15 * d), obj_interactable, false, true);
588
                if (thisinteract == 2)
589
                    interactedobject = collision_rectangle(x + (4 * d), y + (28 * d), (x + sprite_width) - (4 * d), y + sprite_height + (15 * d), obj_interactablesolid, false, true);
590
                if (interactedobject != -4)
591
                {
592
                    with (interactedobject)
593
                        facing = 2;
594
                    with (interactedobject)
595
                        
scr_interact
scr_interact

function
scr_interact()
{ myinteract = 1; event_user(0); }
();
596
                }
597
            }
598
            thisinteract = 0;
599
            if (global.facing == 2)
600
            {
601
                if (collision_rectangle(x + 3, (y + sprite_height) - (5 * d), (x + sprite_width) - (5 * d), y + (5 * d), obj_interactable, false, true))
602
                    thisinteract = 1;
603
                if (collision_rectangle(x + 3, (y + sprite_height) - (5 * d), (x + sprite_width) - (5 * d), y + (5 * d), obj_interactablesolid, false, true))
604
                    thisinteract = 2;
605
            }
606
            if (thisinteract > 0)
607
            {
608
                if (thisinteract == 1)
609
                    interactedobject = collision_rectangle(x + (3 * d), (y + sprite_height) - (5 * d), (x + sprite_width) - (5 * d), y + (5 * d), obj_interactable, false, true);
610
                if (thisinteract == 2)
611
                    interactedobject = collision_rectangle(x + (3 * d), (y + sprite_height) - (5 * d), (x + sprite_width) - (5 * d), y + (5 * d), obj_interactablesolid, false, true);
612
                if (interactedobject != -4)
613
                {
614
                    with (interactedobject)
615
                        facing = 0;
616
                    with (interactedobject)
617
                        
scr_interact
scr_interact

function
scr_interact()
{ myinteract = 1; event_user(0); }
();
618
                }
619
            }
620
        }
621
    }
622
}
623
onebuffer -= 1;
624
twobuffer -= 1;
625
threebuffer -= 1;
626
climbbuffer--;
627
if (climbbuffer <= 0)
628
    climbing = 0;
629
with (collision_rectangle(bbox_left, bbox_top, bbox_right, bbox_bottom, obj_doorparent, 0, 0))
630
    event_user(9);
631
if (battlemode == 1)
632
{
633
    global.inv -= 1;
634
    if (global.inv < 0)
635
    {
636
        if (sprite_index == climbsprite)
637
        {
638
            with (collision_rectangle(x + 12, y + 28, x + 27, y + 37, obj_overworldbulletparent, 1, 0))
639
                event_user(5);
640
            with (collision_line(x + 12, y + 37, x + 19, y + 45, obj_overworldbulletparent, 1, 0))
641
                event_user(5);
642
            with (collision_line(x + 26, y + 37, x + 19, y + 45, obj_overworldbulletparent, 1, 0))
643
                event_user(5);
644
        }
645
        else
646
        {
647
            with (collision_rectangle(x + 12, y + 40, x + 27, y + 49, obj_overworldbulletparent, 1, 0))
648
                event_user(5);
649
            with (collision_line(x + 12, y + 49, x + 19, y + 57, obj_overworldbulletparent, 1, 0))
650
                event_user(5);
651
            with (collision_line(x + 26, y + 49, x + 19, y + 57, obj_overworldbulletparent, 1, 0))
652
                event_user(5);
653
        }
654
    }
655
}
656
if (global.chapter == 4)
657
{
658
    if (!init_clothes && global.darkzone == 0)
659
    {
660
        init_clothes = true;
661
        if (global.plot >= 11 && global.plot < 35)
662
        {
663
            dsprite = spr_kris_walk_down_church;
664
            rsprite = spr_kris_walk_right_church;
665
            lsprite = spr_kris_walk_left_church;
666
        }
667
        else
668
        {
669
            dsprite = spr_krisd;
670
            rsprite = spr_krisr;
671
            lsprite = spr_krisl;
672
            usprite = spr_krisu;
673
        }
674
    }
675
}
676
if (
scr_debug
scr_debug

function
scr_debug()
{ if (global.debug == 1) return 1; }
())
677
{
678
    if (sunkus_kb_check_pressed(45))
679
    {
680
        if (room_exists(room + ROOM_INITIALIZE))
681
            room_goto_next();
682
    }
683
    if (sunkus_kb_check_pressed(46))
684
    {
685
        if (room_exists(room - ROOM_INITIALIZE))
686
            room_goto_previous();
687
    }
688
    if (sunkus_kb_check_pressed(36) && floorheight == 0)
689
    {
690
        if (sunkus_kb_check(50))
691
        {
692
            room_goto(room_krisroom );
693
            global.plot = 0;
694
            global.darkzone = 0;
695
        }
696
        if (sunkus_kb_check(51))
697
        {
698
            room_goto(room_dw_castle_area_1 );
699
            global.plot = 7;
700
            global.darkzone = 1;
701
        }
702
        if (sunkus_kb_check(55))
703
            room_goto(room_legend_neo );
704
        if (sunkus_kb_check(56))
705
        {
706
            room_goto(room_battletest );
707
            global.darkzone = 1;
708
        }
709
        if (sunkus_kb_check(57))
710
        {
711
            room_goto(room_bullettest );
712
            global.darkzone = 1;
713
        }
714
    }
715
}