Skip to content

Commit a5c09f4

Browse files
committed
Merge branch 'Archipelago' of https://github.com/Z11Coding/Mixtape-Engine-Rework into Archipelago
2 parents a982167 + 0817efc commit a5c09f4

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

source/archipelago/APItem.hx

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ class APChartModifier extends APItem {
367367
new APChartModifier(modifier);
368368
}
369369
}
370-
class APAprilFools extends APItem {
370+
class APrilFools extends APItem {
371371
private static var options:Map<Int, Void->Void> = new Map();
372372

373373
static function initializeOptions():Void {
@@ -411,6 +411,25 @@ class APAprilFools extends APItem {
411411
if (songList.length == 0) {
412412
archipelago.APItem.popup("No songs available to switch!", "April Fools!");
413413
return;
414+
} else {
415+
var randomSong:Int = FlxG.random.int(0, songList.length-1);
416+
switch (songList[randomSong].songName)
417+
{
418+
case 'Small Argument' | 'Beat Battle 2':
419+
Difficulty.list = ['Hard'];
420+
case "Beat Battle":
421+
Difficulty.list = ["Normal", "Reasonable", "Unreasonable", "Semi-Impossible", "Impossible"];
422+
default:
423+
Difficulty.loadFromWeek(backend.WeekData.weeksLoaded.get(backend.WeekData.weeksList[songList[randomSong].week]));
424+
}
425+
var randomDiff:Int = FlxG.random.int(0, Difficulty.list.length-1);
426+
var songLowercase:String = Paths.formatToSongPath(songList[randomSong].songName);
427+
var poop:String = backend.Highscore.formatSong(songLowercase, randomDiff);
428+
backend.Song.loadFromJson(poop, songLowercase);
429+
states.PlayState.isStoryMode = false;
430+
states.PlayState.storyDifficulty = randomDiff;
431+
LoadingState.prepareToSong();
432+
LoadingState.loadAndSwitchState(APEntryState.inArchipelagoMode ? new archipelago.APPlayState() : new states.PlayState());
414433
}
415434
}
416435
});

0 commit comments

Comments
 (0)