diff --git a/soh/soh/Enhancements/randomizer/3drando/fill.cpp b/soh/soh/Enhancements/randomizer/3drando/fill.cpp index ff3413e98..351c57fd2 100644 --- a/soh/soh/Enhancements/randomizer/3drando/fill.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/fill.cpp @@ -1077,7 +1077,7 @@ static void RandomizeDungeonItems() { //Randomize Any Dungeon and Overworld pools AssumedFill(anyDungeonItems, anyDungeonLocations, true); - AssumedFill(overworldItems, Rando::StaticData::GetOverworldLocations(), true); + AssumedFill(overworldItems, ctx->overworldLocations, true); //Randomize maps and compasses after since they're not advancement items for (auto dungeon : ctx->GetDungeons()->GetDungeonList()) { @@ -1086,7 +1086,7 @@ static void RandomizeDungeonItems() { AssumedFill(mapAndCompassItems, anyDungeonLocations, true); } else if (ctx->GetOption(RSK_SHUFFLE_MAPANDCOMPASS).Is(RO_DUNGEON_ITEM_LOC_OVERWORLD)) { auto mapAndCompassItems = FilterAndEraseFromPool(ItemPool, [dungeon](const RandomizerGet i){return i == dungeon->GetMap() || i == dungeon->GetCompass();}); - AssumedFill(mapAndCompassItems, Rando::StaticData::GetOverworldLocations(), true); + AssumedFill(mapAndCompassItems, ctx->overworldLocations, true); } } } diff --git a/soh/soh/Enhancements/randomizer/3drando/hints.cpp b/soh/soh/Enhancements/randomizer/3drando/hints.cpp index b9e9f4688..932b97316 100644 --- a/soh/soh/Enhancements/randomizer/3drando/hints.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/hints.cpp @@ -695,15 +695,13 @@ std::vector FindItemsAndMarkHinted(std::vector i void CreateChildAltarHint() { auto ctx = Rando::Context::GetInstance(); - if (!ctx->GetHint(RH_ALTAR_CHILD)->IsEnabled()){ + if (!ctx->GetHint(RH_ALTAR_CHILD)->IsEnabled() && ctx->GetOption(RSK_TOT_ALTAR_HINT)){ std::vector stoneLocs = {}; - if (ctx->GetOption(RSK_TOT_ALTAR_HINT)) { - //force marking the rewards as hinted if they are at the end of dungeons as they can be inferred - if (ctx->GetOption(RSK_SHUFFLE_DUNGEON_REWARDS).Is(RO_DUNGEON_REWARDS_END_OF_DUNGEON) || ctx->GetOption(RSK_SHUFFLE_DUNGEON_REWARDS).Is(RO_DUNGEON_REWARDS_VANILLA)) { - stoneLocs = FindItemsAndMarkHinted({RG_KOKIRI_EMERALD, RG_GORON_RUBY, RG_ZORA_SAPPHIRE}, {}); - } else { - stoneLocs = FindItemsAndMarkHinted({RG_KOKIRI_EMERALD, RG_GORON_RUBY, RG_ZORA_SAPPHIRE}, {RC_ALTAR_HINT_CHILD}); - } + //force marking the rewards as hinted if they are at the end of dungeons as they can be inferred + if (ctx->GetOption(RSK_SHUFFLE_DUNGEON_REWARDS).Is(RO_DUNGEON_REWARDS_END_OF_DUNGEON) || ctx->GetOption(RSK_SHUFFLE_DUNGEON_REWARDS).Is(RO_DUNGEON_REWARDS_VANILLA)) { + stoneLocs = FindItemsAndMarkHinted({RG_KOKIRI_EMERALD, RG_GORON_RUBY, RG_ZORA_SAPPHIRE}, {}); + } else { + stoneLocs = FindItemsAndMarkHinted({RG_KOKIRI_EMERALD, RG_GORON_RUBY, RG_ZORA_SAPPHIRE}, {RC_ALTAR_HINT_CHILD}); } std::vector stoneAreas = {}; for (auto loc : stoneLocs){ diff --git a/soh/soh/Enhancements/randomizer/context.cpp b/soh/soh/Enhancements/randomizer/context.cpp index ba9ab6d2c..9fcf71d55 100644 --- a/soh/soh/Enhancements/randomizer/context.cpp +++ b/soh/soh/Enhancements/randomizer/context.cpp @@ -203,6 +203,7 @@ void Context::GenerateLocationPool() { } // If we've gotten past all the conditions where an overworld location should not be // shuffled, add it to the pool. + AddLocation(location.GetRandomizerCheck(), &overworldLocations); AddLocation(location.GetRandomizerCheck()); } else { // is a dungeon check auto* dungeon = GetDungeon(location.GetArea() - RCAREA_DEKU_TREE); diff --git a/soh/soh/Enhancements/randomizer/context.h b/soh/soh/Enhancements/randomizer/context.h index b90f251c7..bd6bc1735 100644 --- a/soh/soh/Enhancements/randomizer/context.h +++ b/soh/soh/Enhancements/randomizer/context.h @@ -47,6 +47,7 @@ class Context { void PlaceItemInLocation(RandomizerCheck locKey, RandomizerGet item, bool applyEffectImmediately = false, bool setHidden = false); std::vector allLocations; + std::vector overworldLocations; void AddLocation(RandomizerCheck loc, std::vector* destination = nullptr); template void AddLocations(const Container& locations, std::vector* destination = nullptr); diff --git a/soh/soh/Enhancements/randomizer/fishsanity.cpp b/soh/soh/Enhancements/randomizer/fishsanity.cpp index f07546de9..9da52ddc2 100644 --- a/soh/soh/Enhancements/randomizer/fishsanity.cpp +++ b/soh/soh/Enhancements/randomizer/fishsanity.cpp @@ -229,7 +229,7 @@ namespace Rando { if (ageSplit && !IsFish(&mCurrPondFish.second) && tableEntry.second != RC_UNKNOWN_CHECK && (!Flags_GetRandomizerInf(OTRGlobals::Instance->gRandomizer->GetRandomizerInfFromCheck(tableEntry.second)) || i == pondCount - 1)) { - mCurrPondFish.second = mCurrPondFish.second = GetPondFish(params, true); + mCurrPondFish.second = GetPondFish(params, true); } } } diff --git a/soh/soh/Enhancements/randomizer/location_access/overworld/castle_grounds.cpp b/soh/soh/Enhancements/randomizer/location_access/overworld/castle_grounds.cpp index 6a3069b18..c4dcf4f02 100644 --- a/soh/soh/Enhancements/randomizer/location_access/overworld/castle_grounds.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/overworld/castle_grounds.cpp @@ -5,7 +5,7 @@ using namespace Rando; void RegionTable_Init_CastleGrounds() { //With multi-area support {RA_CASTLE_GROUNDS} is not strictly required anymore, as any interior here could inherit both - //{RA_HYRULE_CASTLE} and {RA_OUTSIDE_GANONS_CASTLE}, but an setting to merge the latter 2 into the former may be preffered + //{RA_HYRULE_CASTLE} and {RA_OUTSIDE_GANONS_CASTLE}, but a setting to merge the latter 2 into the former may be preferred areaTable[RR_CASTLE_GROUNDS] = Region("Castle Grounds", "Castle Grounds", {RA_CASTLE_GROUNDS}, NO_DAY_NIGHT_CYCLE, {}, {}, { //Exits Entrance(RR_THE_MARKET, []{return true;}), diff --git a/soh/soh/Enhancements/randomizer/location_list.cpp b/soh/soh/Enhancements/randomizer/location_list.cpp index f005391d7..b4e26c84a 100644 --- a/soh/soh/Enhancements/randomizer/location_list.cpp +++ b/soh/soh/Enhancements/randomizer/location_list.cpp @@ -33,16 +33,6 @@ std::vector Rando::StaticData::GetOverworldFishLocations() { return overworldFishLocations; } -std::vector Rando::StaticData::GetOverworldPotLocations() { - std::vector overworldPotLocations = {}; - for (Location& location : locationTable) { - if (location.GetRCType() == RCTYPE_POT && location.IsOverworld() && location.GetRandomizerCheck() != RC_UNKNOWN_CHECK) { - overworldPotLocations.push_back(location.GetRandomizerCheck()); - } - } - return overworldPotLocations; -} - std::vector Rando::StaticData::GetStaticHintLocations() { std::vector staticHintLocations = {}; for (Location& location : locationTable) { @@ -103,28 +93,6 @@ std::vector Rando::StaticData::GetShopLocations() { return shopLocations; } -std::vector Rando::StaticData::GetOverworldLocations() { - //RANDOTODO better way of filling the initial location pool, among other things. - std::vector overworldLocations = {}; - auto ctx = Rando::Context::GetInstance(); - for (Location& location : locationTable) { - if ( - location.IsOverworld() && - location.GetRandomizerCheck() != RC_UNKNOWN_CHECK && - location.GetRandomizerCheck() != RC_TRIFORCE_COMPLETED && //not really an overworld check - location.GetRCType() != RCTYPE_FISH && // temp fix while locations are properly sorted out - location.GetRCType() != RCTYPE_POT && // Same as fish - location.GetRCType() != RCTYPE_CHEST_GAME && //this is supposed to be excluded - (ctx->GetOption(RSK_SHUFFLE_ADULT_TRADE) || location.GetRCType() != RCTYPE_ADULT_TRADE) && //trade is handled elsewhere in location pool - location.GetRCType() != RCTYPE_STATIC_HINT && - location.GetRCType() != RCTYPE_GOSSIP_STONE //don't put items on hints - ) { - overworldLocations.push_back(location.GetRandomizerCheck()); - } - } - return overworldLocations; -} - std::vector Rando::StaticData::GetAllDungeonLocations() { auto ctx = Rando::Context::GetInstance(); std::vector dungeonLocations; diff --git a/soh/soh/Enhancements/randomizer/static_data.h b/soh/soh/Enhancements/randomizer/static_data.h index 852fe3841..8936294a2 100644 --- a/soh/soh/Enhancements/randomizer/static_data.h +++ b/soh/soh/Enhancements/randomizer/static_data.h @@ -35,7 +35,6 @@ class StaticData { static std::unordered_map PopulateTranslationMap(std::unordered_map input); static std::unordered_map PopulateTranslationMap(std::unordered_map input); static std::multimap, RandomizerCheck> CheckFromActorMultimap; - static std::vector GetOverworldLocations(); static std::vector GetAllDungeonLocations(); static std::vector dungeonRewardLocations; static std::vector GetShopLocations(); @@ -46,7 +45,6 @@ class StaticData { static std::vector GetStaticHintLocations(); static std::vector GetPondFishLocations(); static std::vector GetOverworldFishLocations(); - static std::vector GetOverworldPotLocations(); static std::vector GetOverworldFairyLocations(); static void RegisterFishLocations(); static void RegisterFairyLocations();