diff --git a/soh/soh/Enhancements/randomizer/3drando/fill.cpp b/soh/soh/Enhancements/randomizer/3drando/fill.cpp index 6d30a7fcf..0fe779cf1 100644 --- a/soh/soh/Enhancements/randomizer/3drando/fill.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/fill.cpp @@ -159,11 +159,6 @@ static void ValidateOtherEntrance(GetAccessibleLocationsStruct& gals) { ApplyStartingInventory(); // RANDOTODO when proper ammo logic is done, this could be moved to the start } } - // If we are not shuffling the guard house, add the key so we can properly check for poe merchant access - if (gals.validatedStartingRegion && gals.foundTempleOfTime && - ctx->GetOption(RSK_SHUFFLE_INTERIOR_ENTRANCES).Is(RO_INTERIOR_ENTRANCE_SHUFFLE_OFF)) { - Rando::StaticData::RetrieveItem(RG_GUARD_HOUSE_KEY).ApplyEffect(); - } } // Apply all items that are necessary for checking all location access @@ -180,10 +175,7 @@ static void ApplyAllAdvancmentItems() { static void ValidateSphereZero(GetAccessibleLocationsStruct& gals) { auto ctx = Rando::Context::GetInstance(); // Condition for verifying everything required for sphere 0, expanding search to all locations - if ((!logic->AreCheckingBigPoes || logic->CanEmptyBigPoes) && gals.validatedStartingRegion && - gals.foundTempleOfTime && gals.haveTimeAccess) { - // stop checking for big poes - logic->AreCheckingBigPoes = false; + if (gals.validatedStartingRegion && gals.foundTempleOfTime && gals.haveTimeAccess) { // Apply all items that are necessary for checking all location access ApplyAllAdvancmentItems(); // Reset access as the non-starting age @@ -213,7 +205,7 @@ void ProcessExits(Region* region, GetAccessibleLocationsStruct& gals, Randomizer // Update Time of Day Access for the exit if (UpdateToDAccess(&exit, exitRegion)) { gals.logicUpdated = true; - if (!gals.sphereZeroComplete || logic->AreCheckingBigPoes) { + if (!gals.sphereZeroComplete) { if (!gals.foundTempleOfTime || !gals.validatedStartingRegion) { ValidateOtherEntrance(gals); } @@ -596,15 +588,12 @@ bool CheckBeatable(RandomizerGet ignore /* = RG_NONE*/) { } // Check if the currently randomised set of entrances is a valid game map. -void ValidateEntrances(bool checkPoeCollectorAccess, bool checkOtherEntranceAccess) { +void ValidateEntrances(bool checkOtherEntranceAccess) { auto ctx = Rando::Context::GetInstance(); GetAccessibleLocationsStruct gals(0); ResetLogic(ctx, gals, !checkOtherEntranceAccess); ctx->allLocationsReachable = false; - if (checkPoeCollectorAccess && !ctx->GetOption(RSK_SKIP_BOTTLING_BIG_POES)) { - logic->AreCheckingBigPoes = true; - } if (checkOtherEntranceAccess) { gals.foundTempleOfTime = false; @@ -620,13 +609,6 @@ void ValidateEntrances(bool checkPoeCollectorAccess, bool checkOtherEntranceAcce RegionTable(RR_ROOT)->adultNight = true; RegionTable(RR_ROOT)->childDay = true; RegionTable(RR_ROOT)->adultDay = true; - } else if (checkPoeCollectorAccess) { - // If we are not shuffling the guard house, add the key so we can properly check for poe merchant access - if (ctx->GetOption(RSK_SHUFFLE_INTERIOR_ENTRANCES).Is(RO_INTERIOR_ENTRANCE_SHUFFLE_OFF)) { - Rando::StaticData::RetrieveItem(RG_GUARD_HOUSE_KEY).ApplyEffect(); - } - RegionTable(RR_ROOT)->adultNight = true; - RegionTable(RR_ROOT)->adultDay = true; } else { ApplyAllAdvancmentItems(); } diff --git a/soh/soh/Enhancements/randomizer/3drando/fill.hpp b/soh/soh/Enhancements/randomizer/3drando/fill.hpp index 7e2e99e12..484331104 100644 --- a/soh/soh/Enhancements/randomizer/3drando/fill.hpp +++ b/soh/soh/Enhancements/randomizer/3drando/fill.hpp @@ -72,4 +72,4 @@ void GeneratePlaythrough(); bool CheckBeatable(RandomizerGet ignore = RG_NONE); -void ValidateEntrances(bool checkPoeCollectorAccess, bool checkOtherEntranceAccess); +void ValidateEntrances(bool checkOtherEntranceAccess); diff --git a/soh/soh/Enhancements/randomizer/3drando/hints.cpp b/soh/soh/Enhancements/randomizer/3drando/hints.cpp index 6a83c498e..394f6636d 100644 --- a/soh/soh/Enhancements/randomizer/3drando/hints.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/hints.cpp @@ -273,8 +273,8 @@ std::vector>> conditionalAlways std::make_pair(RC_MARKET_10_BIG_POES, []() { auto ctx = Rando::Context::GetInstance(); - return ctx->GetOption(RSK_BIG_POE_COUNT).Get() >= 3 && !ctx->GetOption(RSK_BIG_POES_HINT); - }), // Remember, the option's value being 3 means 4 are required + return ctx->GetOption(RSK_BIG_POE_COUNT).Get() > 3 && !ctx->GetOption(RSK_BIG_POES_HINT); + }), std::make_pair(RC_DEKU_THEATER_MASK_OF_TRUTH, []() { auto ctx = Rando::Context::GetInstance(); diff --git a/soh/soh/Enhancements/randomizer/entrance.cpp b/soh/soh/Enhancements/randomizer/entrance.cpp index f58dad3bc..5a19339ce 100644 --- a/soh/soh/Enhancements/randomizer/entrance.cpp +++ b/soh/soh/Enhancements/randomizer/entrance.cpp @@ -441,12 +441,6 @@ static bool ValidateWorld(Entrance* entrancePlaced) { type = entrancePlaced->GetType(); } - bool checkPoeCollectorAccess = - (ctx->GetOption(RSK_SHUFFLE_OVERWORLD_ENTRANCES) || - ctx->GetOption(RSK_SHUFFLE_INTERIOR_ENTRANCES).Is(RO_INTERIOR_ENTRANCE_SHUFFLE_ALL)) && - (entrancePlaced == nullptr || ctx->GetOption(RSK_MIXED_ENTRANCE_POOLS) || type == EntranceType::Interior || - type == EntranceType::SpecialInterior || type == EntranceType::Overworld || type == EntranceType::Spawn || - type == EntranceType::WarpSong || type == EntranceType::OwlDrop); bool checkOtherEntranceAccess = (ctx->GetOption(RSK_SHUFFLE_OVERWORLD_ENTRANCES) || ctx->GetOption(RSK_SHUFFLE_INTERIOR_ENTRANCES).Is(RO_INTERIOR_ENTRANCE_SHUFFLE_ALL) || @@ -459,7 +453,7 @@ static bool ValidateWorld(Entrance* entrancePlaced) { // Conditions will be checked during the search and any that fail will be figured out // afterwards ctx->GetLogic()->Reset(); - ValidateEntrances(checkPoeCollectorAccess, checkOtherEntranceAccess); + ValidateEntrances(checkOtherEntranceAccess); if (!ctx->GetOption(RSK_DECOUPLED_ENTRANCES)) { // Unless entrances are decoupled, we don't want the player to end up through certain entrances as the wrong age @@ -544,15 +538,6 @@ static bool ValidateWorld(Entrance* entrancePlaced) { } } - // The Big Poe shop should always be accessible as adult without the need to use any bottles - // This is important to ensure that players can never lock their only bottles by filling them with Big Poes they - // can't sell - if (checkPoeCollectorAccess) { - if (!RegionTable(RR_MARKET_GUARD_HOUSE)->Adult()) { - SPDLOG_DEBUG("Big Poe Shop access is not guarenteed as adult\n"); - return false; - } - } SPDLOG_DEBUG("All Locations NOT REACHABLE\n"); return false; } diff --git a/soh/soh/Enhancements/randomizer/hook_handlers.cpp b/soh/soh/Enhancements/randomizer/hook_handlers.cpp index 6b59fdbda..bc833f53d 100644 --- a/soh/soh/Enhancements/randomizer/hook_handlers.cpp +++ b/soh/soh/Enhancements/randomizer/hook_handlers.cpp @@ -1081,22 +1081,19 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_l break; } case VB_BOTTLE_BIG_POE: { - if (RAND_GET_OPTION(RSK_SKIP_BOTTLING_BIG_POES)) { - EnPoField* enPoe = va_arg(args, EnPoField*); - enPoe->actor.textId = 0x508F; - Flags_SetSwitch(gPlayState, enPoe->actor.params & 0xFF); - HIGH_SCORE(HS_POE_POINTS) += 100; - if (HIGH_SCORE(HS_POE_POINTS) > 1100) { - HIGH_SCORE(HS_POE_POINTS) = 1100; - } - *should = false; + EnPoField* enPoe = va_arg(args, EnPoField*); + enPoe->actor.textId = 0x508F; + Flags_SetSwitch(gPlayState, enPoe->actor.params & 0xFF); + HIGH_SCORE(HS_POE_POINTS) += 100; + if (HIGH_SCORE(HS_POE_POINTS) > 1100) { + HIGH_SCORE(HS_POE_POINTS) = 1100; } + *should = false; break; } case VB_SELL_POES_TO_POE_COLLECTOR: { - EnGb* enGb = va_arg(args, EnGb*); - if (RAND_GET_OPTION(RSK_SKIP_BOTTLING_BIG_POES) && !Flags_GetRandomizerInf(RAND_INF_10_BIG_POES) && - HIGH_SCORE(HS_POE_POINTS) >= 1000) { + if (!Flags_GetRandomizerInf(RAND_INF_10_BIG_POES) && HIGH_SCORE(HS_POE_POINTS) >= 1000) { + EnGb* enGb = va_arg(args, EnGb*); enGb->textId = 0x70F8; Message_ContinueTextbox(gPlayState, enGb->textId); enGb->actionFunc = func_80A2FB40; diff --git a/soh/soh/Enhancements/randomizer/location_access.cpp b/soh/soh/Enhancements/randomizer/location_access.cpp index d6efe7b9a..c7e98dca2 100644 --- a/soh/soh/Enhancements/randomizer/location_access.cpp +++ b/soh/soh/Enhancements/randomizer/location_access.cpp @@ -379,9 +379,6 @@ void RegionTable_Init() { areaTable[RR_ROOT] = Region("Root", "", {RA_LINKS_POCKET}, NO_DAY_NIGHT_CYCLE, { //Events EventAccess(&logic->KakarikoVillageGateOpen, []{return ctx->GetOption(RSK_KAK_GATE).Is(RO_KAK_GATE_OPEN);}), - //The big poes bottle softlock safety check does not account for the guard house lock if the guard house is not shuffled, so the key is needed before we can safely allow bottle use in logic - //RANDOTODO a setting that lets you drink/dump big poes so we don't need this logic - EventAccess(&logic->CouldEmptyBigPoes, []{return !ctx->GetOption(RSK_SHUFFLE_INTERIOR_ENTRANCES).Is(RO_INTERIOR_ENTRANCE_SHUFFLE_OFF) || logic->CanOpenOverworldDoor(RG_GUARD_HOUSE_KEY);}), }, { //Locations LOCATION(RC_LINKS_POCKET, true), diff --git a/soh/soh/Enhancements/randomizer/location_access/overworld/market.cpp b/soh/soh/Enhancements/randomizer/location_access/overworld/market.cpp index a96f5b37a..dc6058832 100644 --- a/soh/soh/Enhancements/randomizer/location_access/overworld/market.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/overworld/market.cpp @@ -54,7 +54,7 @@ void RegionTable_Init_Market() { EventAccess(&logic->CanEmptyBigPoes, []{return logic->IsAdult;}), }, { //Locations - LOCATION(RC_MARKET_10_BIG_POES, logic->IsAdult && (logic->BigPoeKill || logic->BigPoes > ctx->GetOption(RSK_BIG_POE_COUNT).Get())), + LOCATION(RC_MARKET_10_BIG_POES, logic->IsAdult && (logic->BigPoeKill || logic->BigPoes >= ctx->GetOption(RSK_BIG_POE_COUNT).Get())), LOCATION(RC_MARKET_GS_GUARD_HOUSE, logic->IsChild), LOCATION(RC_MK_GUARD_HOUSE_CHILD_POT_1, logic->IsChild && logic->CanBreakPots()), LOCATION(RC_MK_GUARD_HOUSE_CHILD_POT_2, logic->IsChild && logic->CanBreakPots()), diff --git a/soh/soh/Enhancements/randomizer/logic.cpp b/soh/soh/Enhancements/randomizer/logic.cpp index 85987f0b6..ca52009ac 100644 --- a/soh/soh/Enhancements/randomizer/logic.cpp +++ b/soh/soh/Enhancements/randomizer/logic.cpp @@ -1011,26 +1011,24 @@ Logic::Logic() { uint8_t Logic::BottleCount() { uint8_t count = 0; - if (CouldEmptyBigPoes && !AreCheckingBigPoes) { - for (int i = SLOT_BOTTLE_1; i <= SLOT_BOTTLE_4; i++) { - uint8_t item = GetSaveContext()->inventory.items[i]; - switch (item) { - case ITEM_LETTER_RUTO: - if (DeliverLetter) { - count++; - } - break; - case ITEM_BIG_POE: - if (CanEmptyBigPoes) { - count++; - } - break; - case ITEM_NONE: - break; - default: + for (int i = SLOT_BOTTLE_1; i <= SLOT_BOTTLE_4; i++) { + uint8_t item = GetSaveContext()->inventory.items[i]; + switch (item) { + case ITEM_LETTER_RUTO: + if (DeliverLetter) { count++; - break; - } + } + break; + case ITEM_BIG_POE: + if (CanEmptyBigPoes) { + count++; + } + break; + case ITEM_NONE: + break; + default: + count++; + break; } } return count; @@ -2407,7 +2405,6 @@ void Logic::Reset() { Bottles = 0; NumBottles = 0; CanEmptyBigPoes = false; - CouldEmptyBigPoes = false; // Drops and Bottle Contents Access NutPot = false; diff --git a/soh/soh/Enhancements/randomizer/logic.h b/soh/soh/Enhancements/randomizer/logic.h index 77c49d25f..19d7e173e 100644 --- a/soh/soh/Enhancements/randomizer/logic.h +++ b/soh/soh/Enhancements/randomizer/logic.h @@ -66,12 +66,6 @@ class Logic { uint8_t NumBottles = 0; // this event covers if the player can currently empty big poes in logic bool CanEmptyBigPoes = false; - // this event covers if the player could, if they filled their bottle with big poes in field, empty them at the poe - // merchant. Works in tandem with the big poes safety check during entrance validation - bool CouldEmptyBigPoes = false; - // this check is used to tell logic that we are checking big poes accessibility in logic, to ensure it's not - // bottle-locked. - bool AreCheckingBigPoes = false; // Drops and Bottle Contents Access bool NutPot = false; diff --git a/soh/soh/Enhancements/randomizer/option_descriptions.cpp b/soh/soh/Enhancements/randomizer/option_descriptions.cpp index fb6e2543d..8dc07ce7a 100644 --- a/soh/soh/Enhancements/randomizer/option_descriptions.cpp +++ b/soh/soh/Enhancements/randomizer/option_descriptions.cpp @@ -595,8 +595,6 @@ void Settings::CreateOptionDescriptions() { "rewards on slider does not change."; mOptionDescriptions[RSK_CUCCO_COUNT] = "The amount of cuccos needed to claim the reward from Anju the Cucco Lady."; mOptionDescriptions[RSK_BIG_POE_COUNT] = "The Poe collector will give a reward for turning in this many Big Poes."; - mOptionDescriptions[RSK_SKIP_BOTTLING_BIG_POES] = - "Collecting big poes will not fill a bottle, but still require a bottle."; mOptionDescriptions[RSK_SKIP_CHILD_STEALTH] = "The crawlspace into Hyrule Castle goes straight to Zelda, skipping the guards."; mOptionDescriptions[RSK_SKIP_CHILD_ZELDA] = diff --git a/soh/soh/Enhancements/randomizer/randomizerTypes.h b/soh/soh/Enhancements/randomizer/randomizerTypes.h index b38390a13..31002d16f 100644 --- a/soh/soh/Enhancements/randomizer/randomizerTypes.h +++ b/soh/soh/Enhancements/randomizer/randomizerTypes.h @@ -5797,7 +5797,6 @@ typedef enum { RSK_SHUFFLE_CHEST_MINIGAME, RSK_CUCCO_COUNT, RSK_BIG_POE_COUNT, - RSK_SKIP_BOTTLING_BIG_POES, RSK_SKIP_EPONA_RACE, RSK_COMPLETE_MASK_QUEST, RSK_SKIP_SCARECROWS_SONG, diff --git a/soh/soh/Enhancements/randomizer/savefile.cpp b/soh/soh/Enhancements/randomizer/savefile.cpp index aede3484b..884ade150 100644 --- a/soh/soh/Enhancements/randomizer/savefile.cpp +++ b/soh/soh/Enhancements/randomizer/savefile.cpp @@ -334,7 +334,7 @@ extern "C" void Randomizer_InitSaveFile() { Flags_SetRandomizerInf(RAND_INF_TOT_MASTER_SWORD); } - HIGH_SCORE(HS_POE_POINTS) = 1000 - (100 * (Randomizer_GetSettingValue(RSK_BIG_POE_COUNT) + 1)); + HIGH_SCORE(HS_POE_POINTS) = 1000 - (100 * Randomizer_GetSettingValue(RSK_BIG_POE_COUNT)); if (Randomizer_GetSettingValue(RSK_SKIP_EPONA_RACE)) { Flags_SetEventChkInf(EVENTCHKINF_EPONA_OBTAINED); diff --git a/soh/soh/Enhancements/randomizer/settings.cpp b/soh/soh/Enhancements/randomizer/settings.cpp index 9613fc3a7..7ca0aa82e 100644 --- a/soh/soh/Enhancements/randomizer/settings.cpp +++ b/soh/soh/Enhancements/randomizer/settings.cpp @@ -268,8 +268,7 @@ void Settings::CreateOptions() { OPT_BOOL(RSK_SKIP_CHILD_ZELDA, "Skip Child Zelda", {"Don't Skip", "Skip"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("SkipChildZelda"), mOptionDescriptions[RSK_SKIP_CHILD_ZELDA], WidgetType::Checkbox, RO_GENERIC_DONT_SKIP); OPT_BOOL(RSK_SKIP_EPONA_RACE, "Skip Epona Race", {"Don't Skip", "Skip"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("SkipEponaRace"), mOptionDescriptions[RSK_SKIP_EPONA_RACE], WidgetType::Checkbox, RO_GENERIC_DONT_SKIP); OPT_BOOL(RSK_SKIP_SCARECROWS_SONG, "Skip Scarecrow's Song", CVAR_RANDOMIZER_SETTING("SkipScarecrowsSong"), mOptionDescriptions[RSK_SKIP_SCARECROWS_SONG]); - OPT_U8(RSK_BIG_POE_COUNT, "Big Poe Target Count", {NumOpts(1, 10)}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("BigPoeTargetCount"), mOptionDescriptions[RSK_BIG_POE_COUNT], WidgetType::Slider, 9); - OPT_BOOL(RSK_SKIP_BOTTLING_BIG_POES, "Skip Bottling Big Poes",CVAR_RANDOMIZER_SETTING("SkipBottlingBigPoes"), mOptionDescriptions[RSK_SKIP_BOTTLING_BIG_POES]); + OPT_U8(RSK_BIG_POE_COUNT, "Big Poe Target Count", {NumOpts(0, 10)}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("BigPoeTargetCount"), mOptionDescriptions[RSK_BIG_POE_COUNT], WidgetType::Slider, 10); OPT_U8(RSK_CUCCO_COUNT, "Cuccos to return", {NumOpts(0, 7)}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("CuccosToReturn"), mOptionDescriptions[RSK_CUCCO_COUNT], WidgetType::Slider, 7); OPT_BOOL(RSK_COMPLETE_MASK_QUEST, "Complete Mask Quest", CVAR_RANDOMIZER_SETTING("CompleteMaskQuest"), mOptionDescriptions[RSK_COMPLETE_MASK_QUEST]); OPT_U8(RSK_GOSSIP_STONE_HINTS, "Gossip Stone Hints", {"No Hints", "Need Nothing", "Mask of Truth", "Stone of Agony"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("GossipStoneHints"), mOptionDescriptions[RSK_GOSSIP_STONE_HINTS], WidgetType::Combobox, RO_GOSSIP_STONES_NEED_NOTHING, false, IMFLAG_NONE); @@ -1312,9 +1311,8 @@ void Settings::CreateOptions() { WidgetContainerType::TABLE); mOptionGroups[RSG_TIMESAVERS_IMGUI] = OptionGroup::SubGroup( "Timesavers", - { &mOptions[RSK_CUCCO_COUNT], &mOptions[RSK_BIG_POE_COUNT], &mOptions[RSK_SKIP_BOTTLING_BIG_POES], - &mOptions[RSK_SKIP_CHILD_ZELDA], &mOptions[RSK_SKIP_EPONA_RACE], &mOptions[RSK_COMPLETE_MASK_QUEST], - &mOptions[RSK_SKIP_SCARECROWS_SONG] }, + { &mOptions[RSK_CUCCO_COUNT], &mOptions[RSK_BIG_POE_COUNT], &mOptions[RSK_SKIP_CHILD_ZELDA], + &mOptions[RSK_SKIP_EPONA_RACE], &mOptions[RSK_COMPLETE_MASK_QUEST], &mOptions[RSK_SKIP_SCARECROWS_SONG] }, WidgetContainerType::COLUMN); mOptionGroups[RSG_ITEM_POOL_HINTS_IMGUI] = OptionGroup::SubGroup("", { @@ -1579,7 +1577,6 @@ void Settings::CreateOptions() { &mOptions[RSK_SKIP_EPONA_RACE], &mOptions[RSK_SKIP_SCARECROWS_SONG], &mOptions[RSK_BIG_POE_COUNT], - &mOptions[RSK_SKIP_BOTTLING_BIG_POES], &mOptions[RSK_CUCCO_COUNT], &mOptions[RSK_COMPLETE_MASK_QUEST], });