Skip to content

Commit a853389

Browse files
committed
yeah i dont even know at this point
1 parent d95babd commit a853389

22 files changed

+758
-30
lines changed

assets/shared/sounds/mus-mode.ogg

46.7 KB
Binary file not shown.

assets/shared/sounds/mus-wawa.ogg

60.7 KB
Binary file not shown.
83.8 KB
Binary file not shown.
23.6 KB
Binary file not shown.
39.6 KB
Binary file not shown.

assets/shared/sounds/uh oh.ogg

51.4 KB
Binary file not shown.

setup/windows.bat

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ haxelib install actuate 1.9.0
2020
haxelib install flixel-ui 2.6.1
2121
haxelib install hscript 2.5.0
2222
haxelib install noisehx 0.0.1
23-
haxelib install deflatex
2423
haxelib install haxeui-core 1.7.0
2524
haxelib install haxeui-flixel 1.7.0
2625
haxelib install funkin-modchart 1.2.3

source/archipelago/APAdvancedSettingsState.hx

Lines changed: 149 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,12 @@ class APAdvancedSettingsState extends MusicBeatState
178178
var MHPWeight:Int = 3;
179179
var MHPDWeight:Int = 3;
180180

181+
// Z11's Optional Hell
182+
var starter_debuff:Bool = false;
183+
var perma_traps:Bool = false;
184+
var hard_mode:Bool = false;
185+
var enable_shop:Bool = false;
186+
181187
// Navigation cooldown
182188
var navigationCooldown:Float = 0;
183189
var navigationDelay:Float = 0.15; // 150ms delay between navigation inputs
@@ -451,6 +457,14 @@ class APAdvancedSettingsState extends MusicBeatState
451457
stagesanity = value == true;
452458
case "charactersanity":
453459
charactersanity = value == true;
460+
case "starter_debuff":
461+
starter_debuff = value == true;
462+
case "perma_traps":
463+
perma_traps = value == true;
464+
case "hard_mode":
465+
hard_mode = value == true;
466+
case "enable_shop":
467+
enable_shop = value == true;
454468
// Handle any other potential fields that might exist
455469
default:
456470
trace('Unknown YAML field during import: $field = $value');
@@ -876,6 +890,83 @@ class APAdvancedSettingsState extends MusicBeatState
876890
)
877891
];
878892

893+
894+
// Z11 Options Page - things you can but probably shouldn't turn on
895+
var z11Options:Array<SettingsOption> = [];
896+
897+
z11Options.push({
898+
name: "Starter Debuffs",
899+
description: "Inflicts you with four near-perminant debuffs (SEE WIKI PAGE FOR DEBUFF DETAILS)",
900+
callback: function() {
901+
starter_debuff = !starter_debuff;
902+
refreshCurrentPage();
903+
},
904+
locked: false,
905+
contextMenu: createBoolContextMenu(starter_debuff, function(value:Bool) {
906+
starter_debuff = value;
907+
// Don't refresh here - the main callback will handle it
908+
})
909+
});
910+
911+
z11Options.push({
912+
name: "Perma-Traps",
913+
description: "Makes the starting debuffs Trap Items instead (SEE WIKI PAGE FOR DEBUFF DETAILS)",
914+
callback: function() {
915+
perma_traps = !perma_traps;
916+
refreshCurrentPage();
917+
},
918+
locked: false,
919+
contextMenu: createBoolContextMenu(perma_traps, function(value:Bool) {
920+
perma_traps = value;
921+
// Don't refresh here - the main callback will handle it
922+
})
923+
});
924+
925+
z11Options.push({
926+
name: "HARD MODE",
927+
description: "Huh? You don't want to be able to play the game right off the bat? No problem! (SEE WIKI PAGE FOR HARD MODE DETAILS)",
928+
callback: function() {
929+
hard_mode = !hard_mode;
930+
if (hard_mode) FlxG.sound.play(Paths.sound('mus-mode'), 2);
931+
refreshCurrentPage();
932+
},
933+
locked: false,
934+
contextMenu: createBoolContextMenu(hard_mode, function(value:Bool) {
935+
hard_mode = value;
936+
if (hard_mode) FlxG.sound.play(Paths.sound('mus-mode'), 2);
937+
// Don't refresh here - the main callback will handle it
938+
})
939+
});
940+
941+
z11Options.push({
942+
name: "Enable Shop",
943+
description: "Hey there. Heard you wanted to buy things from me. (SEE WIKI PAGE FOR SHOP DETAILS)",
944+
callback: function() {
945+
enable_shop = !enable_shop;
946+
if (enable_shop) FlxG.sound.play(Paths.sound('uh oh'), 2);
947+
else FlxG.sound.play(Paths.sound('ok nevermind were good'), 2);
948+
refreshCurrentPage();
949+
},
950+
locked: false,
951+
contextMenu: createBoolContextMenu(enable_shop, function(value:Bool) {
952+
enable_shop = value;
953+
if (enable_shop) FlxG.sound.play(Paths.sound('uh oh'), 2);
954+
else FlxG.sound.play(Paths.sound('ok nevermind were good'), 2);
955+
// Don't refresh here - the main callback will handle it
956+
})
957+
});
958+
959+
z11Options.push({
960+
name: "???",
961+
description: "Oh me? Don't worry about why i'm here. Not yet, at least~",
962+
callback: function() {
963+
FlxG.sound.play(Paths.sound('mus-wawa'));
964+
refreshCurrentPage();
965+
},
966+
locked: true,
967+
contextMenu: createEditContextMenu(() -> giveNotice())
968+
});
969+
879970
pages = [
880971
{
881972
name: "MAIN SETTINGS",
@@ -911,6 +1002,13 @@ class APAdvancedSettingsState extends MusicBeatState
9111002
options: sanityOptions,
9121003
stateOptions: [],
9131004
color: FlxColor.PINK
1005+
},
1006+
{
1007+
name: "Z11'S OPTIONAL HELL",
1008+
description: "Fun(?) things I decided to add for those looking for something more than the usual >:)",
1009+
options: z11Options,
1010+
stateOptions: [],
1011+
color: FlxColor.WHITE
9141012
}
9151013
];
9161014
}
@@ -1337,7 +1435,9 @@ class APAdvancedSettingsState extends MusicBeatState
13371435
pageIndicator.text = '${currentPage + 1} / ${pages.length} - ${page.name}';
13381436

13391437
// Change title color based on page
1340-
titleText.color = page.color;
1438+
if (page.name == "Z11'S OPTIONAL HELL") {
1439+
rainbowText = true;
1440+
} else {rainbowText = false; titleText.color = page.color;}
13411441
if (glowEffect != null)
13421442
{
13431443
glowEffect.color = page.color;
@@ -1493,6 +1593,11 @@ class APAdvancedSettingsState extends MusicBeatState
14931593
case "Sanity Completion Type": sanity_completion_type;
14941594
case "Stagesanity": stagesanity ? "ON" : "OFF";
14951595
case "Charactersanity": charactersanity ? "ON" : "OFF";
1596+
case "Starter Debuffs": starter_debuff ? "ON" : "OFF";
1597+
case "Perma-Traps": perma_traps ? "ON" : "OFF";
1598+
case "HARD MODE": hard_mode ? "ON" : "OFF";
1599+
case "Enable Shop": enable_shop ? "ON" : "OFF";
1600+
case "???": true ? "Not Yet..." : "Not Yet...";
14961601
default: "";
14971602
}
14981603
}
@@ -1920,6 +2025,8 @@ class APAdvancedSettingsState extends MusicBeatState
19202025
openSubState(enumSubstate);
19212026
}
19222027

2028+
function giveNotice() openSubState(new Prompt("Give it time, hun.\nWe'll get to know each other soon enough,\nI promise~ ", 0, null, null, false, "Wait What", "Who the heck-"));
2029+
19232030
function setOptionValue(optionName:String, value:Dynamic)
19242031
{
19252032
switch (optionName)
@@ -2969,6 +3076,10 @@ class APAdvancedSettingsState extends MusicBeatState
29693076
sanity_completion_type = Reflect.hasField(settings, "sanity_completion_type") ? Reflect.field(settings, "sanity_completion_type") : "on_getting";
29703077
stagesanity = Reflect.hasField(settings, "stagesanity") ? settings.stagesanity : false;
29713078
charactersanity = Reflect.hasField(settings, "charactersanity") ? settings.charactersanity : false;
3079+
starter_debuff = Reflect.hasField(settings, "starter_debuff") ? settings.starter_debuff : false;
3080+
hard_mode = Reflect.hasField(settings, "hard_mode") ? settings.hard_mode : false;
3081+
enable_shop = Reflect.hasField(settings, "enable_shop") ? settings.enable_shop : false;
3082+
perma_traps = Reflect.hasField(settings, "perma_traps") ? settings.perma_traps : false;
29723083
}
29733084
}
29743085

@@ -3021,6 +3132,10 @@ class APAdvancedSettingsState extends MusicBeatState
30213132
Reflect.setField(settings, "sanity_completion_type", sanity_completion_type);
30223133
settings.stagesanity = stagesanity;
30233134
settings.charactersanity = charactersanity;
3135+
settings.starter_debuff = starter_debuff;
3136+
settings.perma_traps = perma_traps;
3137+
settings.hard_mode = hard_mode;
3138+
settings.enable_shop = enable_shop;
30243139
}
30253140
}
30263141

@@ -3571,6 +3686,10 @@ class APAdvancedSettingsState extends MusicBeatState
35713686
Reflect.setField(yamlThing, "sanity_completion_type", sanity_completion_type);
35723687
Reflect.setField(yamlThing, "stagesanity", stagesanity);
35733688
Reflect.setField(yamlThing, "charactersanity", charactersanity);
3689+
Reflect.setField(yamlThing, "starter_debuff", starter_debuff);
3690+
Reflect.setField(yamlThing, "perma_traps", perma_traps);
3691+
Reflect.setField(yamlThing, "hard_mode", hard_mode);
3692+
Reflect.setField(yamlThing, "enable_shop", enable_shop);
35743693
if (startingSong != null)
35753694
{
35763695
Reflect.setField(yamlThing, "starting_song", startingSong);
@@ -3722,6 +3841,10 @@ class APAdvancedSettingsState extends MusicBeatState
37223841
Reflect.setField(yamlThing, "sanity_completion_type", sanity_completion_type);
37233842
Reflect.setField(yamlThing, "stagesanity", stagesanity);
37243843
Reflect.setField(yamlThing, "charactersanity", charactersanity);
3844+
Reflect.setField(yamlThing, "starter_debuff", starter_debuff);
3845+
Reflect.setField(yamlThing, "perma_traps", perma_traps);
3846+
Reflect.setField(yamlThing, "hard_mode", hard_mode);
3847+
Reflect.setField(yamlThing, "enable_shop", enable_shop);
37253848
if (startingSong != null)
37263849
{
37273850
Reflect.setField(yamlThing, "starting_song", startingSong);
@@ -4111,9 +4234,15 @@ class APAdvancedSettingsState extends MusicBeatState
41114234
openSubState(progressSubstate);
41124235
}
41134236

4237+
var pubE:Float = 0;
4238+
var rainbowText:Bool = false;
41144239
override function update(elapsed:Float)
41154240
{
41164241
super.update(elapsed);
4242+
if (rainbowText) {
4243+
titleText.color = FlxColor.fromHSL(((elapsed / 2) / 300 * 360) % 360, 1.0, 0.5*1.0);
4244+
if (glowEffect != null) glowEffect.color = FlxColor.fromHSL(((elapsed / 2.5) / 300 * 360) % 360, 1.0, 0.5*1.0);
4245+
}
41174246

41184247
if (forceExportPath != null)
41194248
{
@@ -4286,6 +4415,10 @@ class APAdvancedSettingsState extends MusicBeatState
42864415
}
42874416
else
42884417
{
4418+
if (option.name == "???") {
4419+
FlxG.sound.play(Paths.sound('mus-wawa'), 5);
4420+
giveNotice();
4421+
}
42894422
FlxG.sound.play(Paths.sound('cancelMenu'));
42904423
FlxG.camera.shake(0.01, 0.2);
42914424
}
@@ -4410,7 +4543,11 @@ class APAdvancedSettingsState extends MusicBeatState
44104543
enable_sanity_locations: enable_sanity_locations,
44114544
sanity_completion_type: sanity_completion_type,
44124545
stagesanity: stagesanity,
4413-
charactersanity: charactersanity
4546+
charactersanity: charactersanity,
4547+
starter_debuff: starter_debuff,
4548+
perma_traps: perma_traps,
4549+
hard_mode: hard_mode,
4550+
enable_shop: enable_shop
44144551
};
44154552

44164553
if (tempSave != null)
@@ -4488,6 +4625,16 @@ class APAdvancedSettingsState extends MusicBeatState
44884625
stagesanity = data.stagesanity;
44894626
if (Reflect.hasField(data, "charactersanity"))
44904627
charactersanity = data.charactersanity;
4628+
4629+
// Load Z11's Optional Hell
4630+
if (Reflect.hasField(data, "starter_debuff"))
4631+
starter_debuff = data.starter_debuff;
4632+
if (Reflect.hasField(data, "perma_traps"))
4633+
perma_traps = data.perma_traps;
4634+
if (Reflect.hasField(data, "hard_mode"))
4635+
hard_mode = data.hard_mode;
4636+
if (Reflect.hasField(data, "enable_shop"))
4637+
enable_shop = data.enable_shop;
44914638
}
44924639
}
44934640

source/archipelago/APEntryState.hx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ typedef APOptions =
8484
var sanity_completion_type:String;
8585
var stagesanity:Bool;
8686
var charactersanity:Bool;
87+
var starter_debuff:Bool;
88+
var hard_mode:Bool;
89+
var enable_shop:Bool;
90+
var perma_traps:Bool;
8791
}
8892

8993
enum ComboRank {
@@ -200,7 +204,11 @@ class APEntryState extends MusicBeatState
200204
enable_sanity_locations: false,
201205
sanity_completion_type: "on_getting",
202206
stagesanity: false,
203-
charactersanity: false
207+
charactersanity: false,
208+
starter_debuff: false,
209+
perma_traps: false,
210+
hard_mode: false,
211+
enable_shop: false
204212
}
205213
};
206214

source/archipelago/APGameState.hx

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,8 @@ class APGameState
532532
{
533533
var locations:Array<Int> = [];
534534

535+
trace('is setting on: ${sanitySettings.enable_sanity_locations}');
536+
535537
if (!sanitySettings.enable_sanity_locations)
536538
return locations;
537539

@@ -1550,7 +1552,7 @@ class APGameState
15501552
specialItems.set(itemName, currentPackages["Friday Night Funkin"].item_name_to_id.get(item));
15511553
}
15521554
}
1553-
trace("Special Items: " + specialItems);
1555+
//trace("Special Items: " + specialItems);
15541556

15551557
return specialItems;
15561558
}
@@ -1725,6 +1727,7 @@ class APGameState
17251727
// Handle sanity items
17261728
for (sanityItemName in result.sanityItems)
17271729
{
1730+
trace('Sanity Item: $sanityItemName');
17281731
handleSanityItemReceived(sanityItemName);
17291732
}
17301733

@@ -1764,7 +1767,8 @@ class APGameState
17641767
// Get sanity item data from slot data
17651768
if (_slotData != null && Reflect.hasField(_slotData, "sanityData"))
17661769
{
1767-
var sanityData:Map<String, SanityItemData> = Reflect.field(_slotData, "sanityData");
1770+
var sanityData:DynamicAccess<SanityItemData> = Reflect.field(_slotData, "sanityData");
1771+
trace('SlotData: $_slotData\nSanityData: $sanityData');
17681772
if (sanityData != null && sanityData.exists(itemName))
17691773
{
17701774
var sanityItemData = sanityData.get(itemName);
@@ -1877,20 +1881,14 @@ class APGameState
18771881

18781882
public function isSanityItemUnlocked(itemType:String, itemName:String):Bool
18791883
{
1880-
// If no sanity system exists at all, everything is unlocked
1881-
if (Lambda.count(unlockedSanityItems) == 0 && Lambda.count(sanityLocationIds) == 0) return true;
1882-
1883-
1884-
18851884
var key = itemType + ": " + itemName;
18861885
return unlockedSanityItems.exists(key);
18871886
}
18881887

18891888
public function checkSongCharactersAndStageUnlocked(song:backend.Song.SwagSong):Array<String>
18901889
{
1890+
trace('Unlocked Sanity Items: $unlockedSanityItems\nSanity Location ID\'s: $sanityLocationIds');
18911891
// Check if sanity system exists at all (regardless of location settings)
1892-
if (Lambda.count(unlockedSanityItems) == 0 && Lambda.count(sanityLocationIds) == 0) return [];
1893-
18941892
var missingItems:Array<String> = [];
18951893

18961894
// Check what types of sanity items we should look for

0 commit comments

Comments
 (0)