@@ -4,6 +4,7 @@ import backend.window.PlatformUtil;
44import haxe .ds .StringMap ;
55import cutscenes .DialogueBoxPsych ;
66import flixel .util .FlxDestroyUtil ;
7+ import archipelago .TrapLinkFunctions ;
78
89typedef Condition = {
910 var checkFn : APItem -> Bool ;
@@ -496,19 +497,27 @@ class APItem {
496497 t .isTrap = true ;
497498 });
498499
499- // TODO: Add the raymarching shader
500+ // TODO: Test if this works
500501 case " Deisometric Trap" :
501502 return new APTrap (name , ConditionHelper . PlayState (), function () {
502503 popup (' Can you tilt your screen? I can\' t see...' , " TrapLink: Deisometric Trap" );
504+ for (cam in FlxG .cameras .list ) {
505+ if (! cam .filters .contains (shaders. ShadersHandler .perspective ))
506+ cam .filters .push (shaders. ShadersHandler .perspective );
507+ }
508+ flixel.tweens. FlxTween .num (shaders. ShadersHandler .perspective .shader .data .zrot .value [0 ], 0 , 15 , function (value : Float ) {
509+ shaders. ShadersHandler .perspective .shader .data .zrot .value = [value ];
510+ });
503511 }, true , true ).funcAndReturn (function (t : APItem ) {
504512 // Set it as a trap.
505513 t .isTrap = true ;
506514 });
507515
508- // TODO: add the car crash script stuff here
516+ // TODO: Test if this works
509517 case " Push Trap" :
510518 return new APTrap (name , ConditionHelper . PlayState (), function () {
511519 popup (' You go bye bye now :)' , " TrapLink: Push Trap" );
520+ TrapLinkFunctions .doCarCrash (true );
512521 }, true , true ).funcAndReturn (function (t : APItem ) {
513522 // Set it as a trap.
514523 t .isTrap = true ;
@@ -523,19 +532,20 @@ class APItem {
523532 t .isTrap = true ;
524533 });
525534
526- // TODO: Grab the bushwack pumpkin mechanic
535+ // TODO: Test if this works
527536 case " Input Sequence Trap" :
528537 return new APTrap (name , ConditionHelper . PlayState (), function () {
529538 popup (' Imma hit you with a QTE just cause.' , " TrapLink: Input Sequence Trap" );
539+ TrapLinkFunctions .doBushwakThings ();
530540 }, true , true ).funcAndReturn (function (t : APItem ) {
531541 // Set it as a trap.
532542 t .isTrap = true ;
533543 });
534544
535- // TODO: Grab the Hypno's Lullaby Typing Mechanic
536545 case " Pokemon Trivia Trap" :
537546 return new APTrap (name , ConditionHelper . PlayState (), function () {
538547 popup (' What is the following word:' , " TrapLink: Pokemon Trivia Trap" );
548+ TrapLinkFunctions .startUnown ();
539549 }, true , true ).funcAndReturn (function (t : APItem ) {
540550 // Set it as a trap.
541551 t .isTrap = true ;
@@ -621,10 +631,12 @@ class APItem {
621631 t .isTrap = true ;
622632 });
623633
624- // TODO: grab the Trampoline Script
634+ // TODO: Test this
625635 case " Jump Trap" | " Spring Trap" :
626636 return new APTrap (name , ConditionHelper . PlayState (), function () {
627- popup (' Don\' t fall off...' , ' TrapLink: $name ' );
637+ popup (' Don\' t break your neck...' , ' TrapLink: $name ' );
638+ var tramp : Trampoline = new Trampoline ();
639+ if (APPlayState .instance != null ) APPlayState .instance .addBehindBF (tramp );
628640 }, true , true ).funcAndReturn (function (t : APItem ) {
629641 // Set it as a trap.
630642 t .isTrap = true ;
0 commit comments