@@ -278,7 +278,12 @@ class APItem {
278278 return null ;
279279
280280 case " Ghost" :
281- return new APTrap (name , ConditionHelper . PlayState (), function () {
281+ return new APTrap (name , ConditionHelper . PlayState ().funcAndReturn (function (c ) {
282+ c .extraConditions = [];
283+ c .extraConditions .push (function (e ) {
284+ return states. PlayState .instance ?. startedSong == true ;
285+ });
286+ }), function () {
282287 states. PlayState .instance ?. modManager .setValue (' sudden' , 1 );
283288 popup (' Suddenly, Notes.' , " TrapLink: Ghost Trap" );
284289 }, true , true ).funcAndReturn (function (t : APItem ) {
@@ -302,8 +307,13 @@ class APItem {
302307 });
303308
304309 case " Paralyze Trap" :
305- return new APTrap (name , ConditionHelper . PlayState (), function () {
306-
310+ return new APTrap (name , ConditionHelper . PlayState ().funcAndReturn (function (c ) {
311+ c .extraConditions = [];
312+ c .extraConditions .push (function (e ) {
313+ return states. PlayState .instance ?. startedSong == true ;
314+ });
315+ }), function () {
316+
307317 APPlayState .instance .boyfriend .stunned = true ;
308318 new FlxTimer ().start (FlxG .random .int (2 , 5 ), function (tmr : FlxTimer )
309319 {
@@ -368,7 +378,12 @@ class APItem {
368378 });
369379
370380 case ' Ice Trap' :
371- return new APTrap (name , ConditionHelper . PlayState (), function () {
381+ return new APTrap (name , ConditionHelper . PlayState ().funcAndReturn (function (c ) {
382+ c .extraConditions = [];
383+ c .extraConditions .push (function (e ) {
384+ return states. PlayState .instance ?. startedSong == true ;
385+ });
386+ }), function () {
372387 popup (' Effect: Ice Notes' , " TrapLink: Ice Trap" , true );
373388 APPlayState .instance .doEffect (' icebutmoreagressive' );
374389 }, true , false ).funcAndReturn (function (t : APItem ) {
@@ -377,7 +392,12 @@ class APItem {
377392 });
378393
379394 case " Freeze Trap" | " Frozen Trap" :
380- return new APTrap (name , ConditionHelper . PlayState (), function () {
395+ return new APTrap (name , ConditionHelper . PlayState ().funcAndReturn (function (c ) {
396+ c .extraConditions = [];
397+ c .extraConditions .push (function (e ) {
398+ return states. PlayState .instance ?. startedSong == true ;
399+ });
400+ }), function () {
381401 popup (' You\' re Frozen Solid!' , ' TrapLink: $name ' , true );
382402 FlxG .sound .play (Paths .sound (' streamervschat/freeze' ));
383403 frozenInput ++ ;
@@ -409,7 +429,12 @@ class APItem {
409429
410430 // Spawns a huge amount of notes randomly
411431 case " Army Trap" | " Police Trap" | " Buyon Trap" | " OmoTrap" :
412- return new APTrap (name , ConditionHelper . PlayState (), function () {
432+ return new APTrap (name , ConditionHelper . PlayState ().funcAndReturn (function (c ) {
433+ c .extraConditions = [];
434+ c .extraConditions .push (function (e ) {
435+ return states. PlayState .instance ?. startedSong == true ;
436+ });
437+ }), function () {
413438 APPlayState .instance .doEffect (' insanespam' );
414439 popup (' WATCH OUT!' , ' TrapLink: $name ' );
415440 }, true , true ).funcAndReturn (function (t : APItem ) {
@@ -673,8 +698,13 @@ class APItem {
673698 });
674699
675700 case " Poison Trap" | " Poison Mushroom" :
676- return new APTrap (name , ConditionHelper . PlayState (), function () {
677- popup (' Food Poisoning my belovid' , ' TrapLink: Poison Trap' );
701+ return new APTrap (name , ConditionHelper . PlayState ().funcAndReturn (function (c ) {
702+ c .extraConditions = [];
703+ c .extraConditions .push (function (e ) {
704+ return states. PlayState .instance ?. startedSong == true ;
705+ });
706+ }), function () {
707+ popup (' Food Poisoning my beloved' , ' TrapLink: Poison Trap' );
678708 APPlayState .instance .doEffect (' poisonbutworse' );
679709 }, true , true ).funcAndReturn (function (t : APItem ) {
680710 // Set it as a trap.
@@ -717,7 +747,12 @@ class APItem {
717747 });
718748
719749 case " Fast Trap" :
720- return new APTrap (name , ConditionHelper . PlayState (), function () {
750+ return new APTrap (name , ConditionHelper . PlayState ().funcAndReturn (function (c ) {
751+ c .extraConditions = [];
752+ c .extraConditions .push (function (e ) {
753+ return states. PlayState .instance ?. startedSong == true ;
754+ });
755+ }), function () {
721756 popup (' GOTTA GO FAST!' , ' TrapLink: Fast Trap' );
722757 APPlayState .instance .lerpSongSpeed (FlxG .random .float (1.25 , 4 ), 1 );
723758 }, true , true ).funcAndReturn (function (t : APItem ) {
@@ -726,7 +761,12 @@ class APItem {
726761 });
727762
728763 case " Slow Trap" | " Slowness Trap" :
729- return new APTrap (name , ConditionHelper . PlayState (), function () {
764+ return new APTrap (name , ConditionHelper . PlayState ().funcAndReturn (function (c ) {
765+ c .extraConditions = [];
766+ c .extraConditions .push (function (e ) {
767+ return states. PlayState .instance ?. startedSong == true ;
768+ });
769+ }), function () {
730770 popup (' Slow down there, buddy' , ' TrapLink: Slow Trap' );
731771 APPlayState .instance .lerpSongSpeed (FlxG .random .float (0.25 , 0.75 ), 1 );
732772 }, true , true ).funcAndReturn (function (t : APItem ) {
0 commit comments