diff --git a/soh/soh/Enhancements/randomizer/3drando/fill.cpp b/soh/soh/Enhancements/randomizer/3drando/fill.cpp index 2ac5a3592..7cc59f176 100644 --- a/soh/soh/Enhancements/randomizer/3drando/fill.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/fill.cpp @@ -413,6 +413,8 @@ void ApplyOrStoreItem(Rando::ItemLocation* loc, GetAccessibleLocationsStruct& ga // Adds the contents of a location to the current progression and optionally playthrough bool AddCheckToLogic(LocationAccess& locPair, GetAccessibleLocationsStruct& gals, RandomizerGet ignore, bool stopOnBeatable, Region* parentRegion, bool addToPlaythrough = false) { + logic->CurrentCheckKey = locPair.GetLocation(); + auto ctx = Rando::Context::GetInstance(); StartPerformanceTimer(PT_LOCATION_LOGIC); RandomizerCheck loc = locPair.GetLocation(); @@ -459,10 +461,12 @@ bool AddCheckToLogic(LocationAccess& locPair, GetAccessibleLocationsStruct& gals } // All we care about is if the game is beatable, used to pare down playthrough if (location->GetPlacedRandomizerGet() == RG_TRIFORCE && stopOnBeatable) { + logic->CurrentCheckKey = RC_UNKNOWN_CHECK; StopPerformanceTimer(PT_LOCATION_LOGIC); return true; // Return early for efficiency } } + logic->CurrentCheckKey = RC_UNKNOWN_CHECK; StopPerformanceTimer(PT_LOCATION_LOGIC); return false; } diff --git a/soh/soh/Enhancements/randomizer/location_access.cpp b/soh/soh/Enhancements/randomizer/location_access.cpp index cb5668b01..15dbaefd6 100644 --- a/soh/soh/Enhancements/randomizer/location_access.cpp +++ b/soh/soh/Enhancements/randomizer/location_access.cpp @@ -58,7 +58,7 @@ bool LocationAccess::ConditionsMet(Region* parentRegion, bool calculatingAvailab conditionsMet = true; } - return conditionsMet && CanBuy(calculatingAvailableChecks); + return conditionsMet; } static uint16_t GetMinimumPrice(const Rando::Location* loc) { @@ -102,24 +102,19 @@ static uint16_t GetMinimumPrice(const Rando::Location* loc) { } } -bool LocationAccess::CanBuy(bool calculatingAvailableChecks) const { - const auto& loc = Rando::StaticData::GetLocation(location); - const auto& itemLoc = OTRGlobals::Instance->gRandoContext->GetItemLocation(location); +uint16_t GetCheckPrice(RandomizerCheck check /* = RC_UNKNOWN_CHECK */) { + RandomizerCheck rc = check != RC_UNKNOWN_CHECK ? check : logic->CurrentCheckKey; + assert(rc != RC_UNKNOWN_CHECK); + const auto& loc = Rando::StaticData::GetLocation(rc); + assert(loc->GetRCType() == RCTYPE_SHOP || loc->GetRCType() == RCTYPE_SCRUB || loc->GetRCType() == RCTYPE_MERCHANT); + const auto& itemLoc = OTRGlobals::Instance->gRandoContext->GetItemLocation(rc); - if (loc->GetRCType() == RCTYPE_SHOP || loc->GetRCType() == RCTYPE_SCRUB || loc->GetRCType() == RCTYPE_MERCHANT) { - // Checks should only be identified while playing - if (calculatingAvailableChecks && itemLoc->GetCheckStatus() != RCSHOW_IDENTIFIED) { - return CanBuyAnother(GetMinimumPrice(loc)); - } else { - return CanBuyAnother(itemLoc->GetPrice()); - } + // Checks should only be identified while playing + if (logic->CalculatingAvailableChecks && itemLoc->GetCheckStatus() != RCSHOW_IDENTIFIED) { + return GetMinimumPrice(loc); } - return true; -} - -bool CanBuyAnother(RandomizerCheck rc) { - return CanBuyAnother(ctx->GetItemLocation(rc)->GetPrice()); + return itemLoc->GetPrice(); } bool CanBuyAnother(uint16_t price) { @@ -763,10 +758,6 @@ bool AdultCanAccess(const RandomizerRegion region) { return areaTable[region].Adult(); } -bool HasAccessTo(const RandomizerRegion region) { - return areaTable[region].HasAccess(); -} - Rando::Context* ctx; std::shared_ptr logic; diff --git a/soh/soh/Enhancements/randomizer/location_access.h b/soh/soh/Enhancements/randomizer/location_access.h index 5cbc84060..857a044b7 100644 --- a/soh/soh/Enhancements/randomizer/location_access.h +++ b/soh/soh/Enhancements/randomizer/location_access.h @@ -91,13 +91,10 @@ class LocationAccess { RandomizerCheck location; ConditionFn condition_function; std::string condition_str; - - // Makes sure shop locations are buyable - bool CanBuy(bool calculatingAvailableChecks) const; }; +uint16_t GetCheckPrice(RandomizerCheck check = RC_UNKNOWN_CHECK); bool CanBuyAnother(uint16_t price); -bool CanBuyAnother(RandomizerCheck rc); namespace Rando { class Entrance; @@ -231,7 +228,6 @@ bool CanPlantBean(const RandomizerRegion region); bool BothAges(const RandomizerRegion region); bool ChildCanAccess(const RandomizerRegion region); bool AdultCanAccess(const RandomizerRegion region); -bool HasAccessTo(const RandomizerRegion region); namespace Regions { extern void AccessReset(); diff --git a/soh/soh/Enhancements/randomizer/location_access/dungeons/deku_tree.cpp b/soh/soh/Enhancements/randomizer/location_access/dungeons/deku_tree.cpp index 1d98e861a..702600264 100644 --- a/soh/soh/Enhancements/randomizer/location_access/dungeons/deku_tree.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/dungeons/deku_tree.cpp @@ -91,7 +91,7 @@ void RegionTable_Init_DekuTree() { //Exits Entrance(RR_DEKU_TREE_LOBBY, []{return true;}), Entrance(RR_DEKU_TREE_BASEMENT_SCRUB_ROOM, []{return Here(RR_DEKU_TREE_BASEMENT_LOWER, []{return logic->HasFireSourceWithTorch() || logic->CanUse(RG_FAIRY_BOW);});}), - Entrance(RR_DEKU_TREE_BASEMENT_UPPER, []{return logic->IsAdult || ctx->GetTrickOption(RT_DEKU_B1_SKIP) || HasAccessTo(RR_DEKU_TREE_BASEMENT_UPPER);}), + Entrance(RR_DEKU_TREE_BASEMENT_UPPER, []{return logic->IsAdult || ctx->GetTrickOption(RT_DEKU_B1_SKIP) || logic->PushedDekuBasementBlock;}), Entrance(RR_DEKU_TREE_OUTSIDE_BOSS_ROOM, []{return false;}), }); @@ -162,8 +162,9 @@ void RegionTable_Init_DekuTree() { areaTable[RR_DEKU_TREE_BASEMENT_UPPER] = Region("Deku Tree Basement Upper", SCENE_DEKU_TREE, { //Events - EventAccess(&logic->DekuBabaSticks, []{return logic->CanGetDekuBabaSticks();}), - EventAccess(&logic->DekuBabaNuts, []{return logic->CanGetDekuBabaNuts();}), + EventAccess(&logic->DekuBabaSticks, []{return logic->CanGetDekuBabaSticks();}), + EventAccess(&logic->DekuBabaNuts, []{return logic->CanGetDekuBabaNuts();}), + EventAccess(&logic->PushedDekuBasementBlock, []{return true;}), }, {}, { //Exits Entrance(RR_DEKU_TREE_BASEMENT_LOWER, []{return true;}), @@ -406,7 +407,7 @@ void RegionTable_Init_DekuTree() { EventAccess(&logic->PushedDekuBasementBlock, []{return true;}), }, { //Locations - LOCATION(RC_DEKU_TREE_MQ_DEKU_SCRUB, logic->CanStunDeku()), + LOCATION(RC_DEKU_TREE_MQ_DEKU_SCRUB, logic->CanStunDeku() && CanBuyAnother(GetCheckPrice())), LOCATION(RC_DEKU_TREE_MQ_BASEMENT_UPPER_GRASS_1, logic->CanCutShrubs()), LOCATION(RC_DEKU_TREE_MQ_BASEMENT_UPPER_GRASS_2, logic->CanCutShrubs()), LOCATION(RC_DEKU_TREE_MQ_BASEMENT_UPPER_GRASS_3, logic->CanCutShrubs()), diff --git a/soh/soh/Enhancements/randomizer/location_access/dungeons/dodongos_cavern.cpp b/soh/soh/Enhancements/randomizer/location_access/dungeons/dodongos_cavern.cpp index d8e64f996..9d8208112 100644 --- a/soh/soh/Enhancements/randomizer/location_access/dungeons/dodongos_cavern.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/dungeons/dodongos_cavern.cpp @@ -27,23 +27,26 @@ void RegionTable_Init_DodongosCavern() { EventAccess(&logic->GossipStoneFairy, []{return (Here(RR_DODONGOS_CAVERN_LOBBY, []{return logic->CanBreakMudWalls();}) || logic->HasItem(RG_GORONS_BRACELET)) && logic->CallGossipFairy();}), }, { //Locations - LOCATION(RC_DODONGOS_CAVERN_MAP_CHEST, Here(RR_DODONGOS_CAVERN_LOBBY, []{return logic->CanBreakMudWalls() || logic->HasItem(RG_GORONS_BRACELET);})), - LOCATION(RC_DODONGOS_CAVERN_DEKU_SCRUB_LOBBY, logic->CanStunDeku() || logic->HasItem(RG_GORONS_BRACELET)), - LOCATION(RC_DODONGOS_CAVERN_GOSSIP_STONE_FAIRY, Here(RR_DODONGOS_CAVERN_LOBBY, []{return logic->CanBreakMudWalls() || logic->HasItem(RG_GORONS_BRACELET);}) && logic->CallGossipFairy()), - LOCATION(RC_DODONGOS_CAVERN_GOSSIP_STONE_FAIRY_BIG, Here(RR_DODONGOS_CAVERN_LOBBY, []{return logic->CanBreakMudWalls() || logic->HasItem(RG_GORONS_BRACELET);}) && logic->CanUse(RG_SONG_OF_STORMS)), - LOCATION(RC_DODONGOS_CAVERN_GOSSIP_STONE, Here(RR_DODONGOS_CAVERN_LOBBY, []{return logic->CanBreakMudWalls() || logic->HasItem(RG_GORONS_BRACELET);})), + LOCATION(RC_DODONGOS_CAVERN_MAP_CHEST, logic->CanBreakMudWalls() || logic->HasItem(RG_GORONS_BRACELET);), + LOCATION(RC_DODONGOS_CAVERN_DEKU_SCRUB_LOBBY, (logic->CanStunDeku() || logic->HasItem(RG_GORONS_BRACELET)) && CanBuyAnother(GetCheckPrice())), + LOCATION(RC_DODONGOS_CAVERN_GOSSIP_STONE_FAIRY, Here(RR_DODONGOS_CAVERN_LOBBY, [] {return logic->CanBreakMudWalls() || logic->HasItem(RG_GORONS_BRACELET); }) && logic->CallGossipFairy()), + LOCATION(RC_DODONGOS_CAVERN_GOSSIP_STONE_FAIRY_BIG, Here(RR_DODONGOS_CAVERN_LOBBY, [] {return logic->CanBreakMudWalls() || logic->HasItem(RG_GORONS_BRACELET); }) && logic->CanUse(RG_SONG_OF_STORMS)), + LOCATION(RC_DODONGOS_CAVERN_GOSSIP_STONE, Here(RR_DODONGOS_CAVERN_LOBBY, [] {return logic->CanBreakMudWalls() || logic->HasItem(RG_GORONS_BRACELET); })), }, { //Exits Entrance(RR_DODONGOS_CAVERN_BEGINNING, []{return true;}), Entrance(RR_DODONGOS_CAVERN_LOBBY_SWITCH, []{return logic->IsAdult;}), Entrance(RR_DODONGOS_CAVERN_SE_CORRIDOR, []{return Here(RR_DODONGOS_CAVERN_LOBBY, []{return logic->CanBreakMudWalls() || logic->HasItem(RG_GORONS_BRACELET);});}), - Entrance(RR_DODONGOS_CAVERN_STAIRS_LOWER, []{return HasAccessTo(RR_DODONGOS_CAVERN_LOBBY_SWITCH);}), - Entrance(RR_DODONGOS_CAVERN_FAR_BRIDGE, []{return HasAccessTo(RR_DODONGOS_CAVERN_FAR_BRIDGE);}), - Entrance(RR_DODONGOS_CAVERN_BOSS_AREA, []{return Here(RR_DODONGOS_CAVERN_FAR_BRIDGE, []{return logic->HasExplosives();});}), + Entrance(RR_DODONGOS_CAVERN_STAIRS_LOWER, []{return logic->DCStairsRoomDoor;}), + Entrance(RR_DODONGOS_CAVERN_FAR_BRIDGE, []{return logic->DCLiftPlatform;}), + Entrance(RR_DODONGOS_CAVERN_BOSS_AREA, []{return logic->DCEyesLit;}), Entrance(RR_DODONGOS_CAVERN_BOSS_ENTRYWAY, []{return false;}), }); - areaTable[RR_DODONGOS_CAVERN_LOBBY_SWITCH] = Region("Dodongos Cavern Lobby Switch", SCENE_DODONGOS_CAVERN, {}, {}, { + areaTable[RR_DODONGOS_CAVERN_LOBBY_SWITCH] = Region("Dodongos Cavern Lobby Switch", SCENE_DODONGOS_CAVERN, { + //Events + EventAccess(&logic->DCStairsRoomDoor, []{return true;}), + }, {}, { //Exits Entrance(RR_DODONGOS_CAVERN_LOBBY, []{return true;}), Entrance(RR_DODONGOS_CAVERN_DODONGO_ROOM, []{return true;}), @@ -80,7 +83,10 @@ void RegionTable_Init_DodongosCavern() { Entrance(RR_DODONGOS_CAVERN_LOWER_LIZALFOS, []{return true;}), }); - areaTable[RR_DODONGOS_CAVERN_LOWER_LIZALFOS] = Region("Dodongos Cavern Lower Lizalfos", SCENE_DODONGOS_CAVERN, {}, { + areaTable[RR_DODONGOS_CAVERN_LOWER_LIZALFOS] = Region("Dodongos Cavern Lower Lizalfos", SCENE_DODONGOS_CAVERN, { + //Events + EventAccess(&logic->DCKilledLowerLizalfos, []{return logic->CanKillEnemy(RE_LIZALFOS, ED_CLOSE, true, 2);}), + }, { //Locations LOCATION(RC_DODONGOS_CAVERN_LIZALFOS_POT_1, logic->CanBreakPots()), LOCATION(RC_DODONGOS_CAVERN_LIZALFOS_POT_2, logic->CanBreakPots()), @@ -89,8 +95,8 @@ void RegionTable_Init_DodongosCavern() { LOCATION(RC_DODONGOS_CAVERN_LOWER_LIZALFOS_HEART, true), }, { //Exits - Entrance(RR_DODONGOS_CAVERN_NEAR_LOWER_LIZALFOS, []{return Here(RR_DODONGOS_CAVERN_LOWER_LIZALFOS, []{return logic->CanKillEnemy(RE_LIZALFOS, ED_CLOSE, true, 2);});}), - Entrance(RR_DODONGOS_CAVERN_DODONGO_ROOM, []{return Here(RR_DODONGOS_CAVERN_LOWER_LIZALFOS, []{return logic->CanKillEnemy(RE_LIZALFOS, ED_CLOSE, true, 2);});}), + Entrance(RR_DODONGOS_CAVERN_NEAR_LOWER_LIZALFOS, []{return logic->DCKilledLowerLizalfos;}), + Entrance(RR_DODONGOS_CAVERN_DODONGO_ROOM, []{return logic->DCKilledLowerLizalfos;}), }); areaTable[RR_DODONGOS_CAVERN_DODONGO_ROOM] = Region("Dodongos Cavern Dodongo Room", SCENE_DODONGOS_CAVERN, {}, { @@ -108,13 +114,16 @@ void RegionTable_Init_DodongosCavern() { areaTable[RR_DODONGOS_CAVERN_NEAR_DODONGO_ROOM] = Region("Dodongos Cavern Near Dodongo Room", SCENE_DODONGOS_CAVERN, {}, { //Locations - LOCATION(RC_DODONGOS_CAVERN_DEKU_SCRUB_SIDE_ROOM_NEAR_DODONGOS, logic->CanStunDeku()), + LOCATION(RC_DODONGOS_CAVERN_DEKU_SCRUB_SIDE_ROOM_NEAR_DODONGOS, logic->CanStunDeku() && CanBuyAnother(GetCheckPrice())), }, { //Exits Entrance(RR_DODONGOS_CAVERN_DODONGO_ROOM, []{return true;}), }); - areaTable[RR_DODONGOS_CAVERN_STAIRS_LOWER] = Region("Dodongos Cavern Stairs Lower", SCENE_DODONGOS_CAVERN, {}, {}, { + areaTable[RR_DODONGOS_CAVERN_STAIRS_LOWER] = Region("Dodongos Cavern Stairs Lower", SCENE_DODONGOS_CAVERN, {}, { + //Locations + LOCATION(RC_DODONGOS_CAVERN_GS_VINES_ABOVE_STAIRS, ctx->GetTrickOption(RT_DC_VINES_GS) && logic->CanGetEnemyDrop(RE_GOLD_SKULLTULA, ED_LONGSHOT)), + }, { //Exits Entrance(RR_DODONGOS_CAVERN_LOBBY, []{return true;}), Entrance(RR_DODONGOS_CAVERN_STAIRS_UPPER, []{return logic->HasExplosives() || logic->HasItem(RG_GORONS_BRACELET) || logic->CanUse(RG_DINS_FIRE) || (ctx->GetTrickOption(RT_DC_STAIRS_WITH_BOW) && logic->CanUse(RG_FAIRY_BOW));}), @@ -123,8 +132,8 @@ void RegionTable_Init_DodongosCavern() { areaTable[RR_DODONGOS_CAVERN_STAIRS_UPPER] = Region("Dodongos Cavern Stairs Upper", SCENE_DODONGOS_CAVERN, {}, { //Locations - LOCATION(RC_DODONGOS_CAVERN_GS_ALCOVE_ABOVE_STAIRS, Here(RR_DODONGOS_CAVERN_FAR_BRIDGE, []{return logic->HookshotOrBoomerang();}) || logic->CanUse(RG_LONGSHOT)), - LOCATION(RC_DODONGOS_CAVERN_GS_VINES_ABOVE_STAIRS, logic->IsAdult || logic->CanAttack() || (HasAccessTo(RR_DODONGOS_CAVERN_STAIRS_LOWER) && logic->CanUse(RG_LONGSHOT) && ctx->GetTrickOption(RT_DC_VINES_GS))), + LOCATION(RC_DODONGOS_CAVERN_GS_ALCOVE_ABOVE_STAIRS, logic->CanGetEnemyDrop(RE_GOLD_SKULLTULA, logic->DCLiftPlatform ? ED_BOOMERANG : ED_LONGSHOT)), + LOCATION(RC_DODONGOS_CAVERN_GS_VINES_ABOVE_STAIRS, logic->IsAdult || logic->CanAttack()), LOCATION(RC_DODONGOS_CAVERN_STAIRCASE_POT_1, logic->CanBreakPots()), LOCATION(RC_DODONGOS_CAVERN_STAIRCASE_POT_2, logic->CanBreakPots()), LOCATION(RC_DODONGOS_CAVERN_STAIRCASE_POT_3, logic->CanBreakPots()), @@ -165,8 +174,8 @@ void RegionTable_Init_DodongosCavern() { areaTable[RR_DODONGOS_CAVERN_2F_SIDE_ROOM] = Region("Dodongos Cavern 2F Side Room", SCENE_DODONGOS_CAVERN, {}, { //Locations - LOCATION(RC_DODONGOS_CAVERN_DEKU_SCRUB_NEAR_BOMB_BAG_LEFT, logic->CanStunDeku()), - LOCATION(RC_DODONGOS_CAVERN_DEKU_SCRUB_NEAR_BOMB_BAG_RIGHT, logic->CanStunDeku()), + LOCATION(RC_DODONGOS_CAVERN_DEKU_SCRUB_NEAR_BOMB_BAG_LEFT, logic->CanStunDeku() && CanBuyAnother(GetCheckPrice())), + LOCATION(RC_DODONGOS_CAVERN_DEKU_SCRUB_NEAR_BOMB_BAG_RIGHT, logic->CanStunDeku() && CanBuyAnother(GetCheckPrice())), }, { //Exits Entrance(RR_DODONGOS_CAVERN_BOMB_ROOM_LOWER, []{return true;}), @@ -188,11 +197,19 @@ void RegionTable_Init_DodongosCavern() { LOCATION(RC_DODONGOS_CAVERN_LOWER_LIZALFOS_HEART, true), LOCATION(RC_DODONGOS_CAVERN_UPPER_LIZALFOS_LEFT_HEART, true), LOCATION(RC_DODONGOS_CAVERN_UPPER_LIZALFOS_RIGHT_HEART, true), + //This room is in different states based on what entrance you entered by, + //So it's simpler to treat them as separate regions with shared checks in both + LOCATION(RC_DODONGOS_CAVERN_LIZALFOS_POT_1, logic->CanBreakPots()), + LOCATION(RC_DODONGOS_CAVERN_LIZALFOS_POT_2, logic->CanBreakPots()), + LOCATION(RC_DODONGOS_CAVERN_LIZALFOS_POT_3, logic->CanBreakPots()), + LOCATION(RC_DODONGOS_CAVERN_LIZALFOS_POT_4, logic->CanBreakPots()), + LOCATION(RC_DODONGOS_CAVERN_LOWER_LIZALFOS_HEART, true), }, { //Exits - Entrance(RR_DODONGOS_CAVERN_LOWER_LIZALFOS, []{return true;}), - Entrance(RR_DODONGOS_CAVERN_FIRST_SLINGSHOT_ROOM, []{return Here(RR_DODONGOS_CAVERN_LOWER_LIZALFOS, []{return logic->CanKillEnemy(RE_LIZALFOS, ED_CLOSE, true, 2);});}), - Entrance(RR_DODONGOS_CAVERN_SECOND_SLINGSHOT_ROOM, []{return Here(RR_DODONGOS_CAVERN_LOWER_LIZALFOS, []{return logic->CanKillEnemy(RE_LIZALFOS, ED_CLOSE, true, 2);});}), + Entrance(RR_DODONGOS_CAVERN_FIRST_SLINGSHOT_ROOM, []{return Here(RR_DODONGOS_CAVERN_UPPER_LIZALFOS, []{return logic->CanKillEnemy(RE_LIZALFOS, ED_CLOSE, true, 2);});}), + Entrance(RR_DODONGOS_CAVERN_SECOND_SLINGSHOT_ROOM, []{return Here(RR_DODONGOS_CAVERN_UPPER_LIZALFOS, []{return logic->CanKillEnemy(RE_LIZALFOS, ED_CLOSE, true, 2);});}), + Entrance(RR_DODONGOS_CAVERN_NEAR_LOWER_LIZALFOS, []{return logic->DCKilledLowerLizalfos;}), + Entrance(RR_DODONGOS_CAVERN_DODONGO_ROOM, []{return logic->DCKilledLowerLizalfos;}), }); areaTable[RR_DODONGOS_CAVERN_SECOND_SLINGSHOT_ROOM] = Region("Dodongos Cavern Second Slingshot Room", SCENE_DODONGOS_CAVERN, {}, { @@ -217,9 +234,13 @@ void RegionTable_Init_DodongosCavern() { Entrance(RR_DODONGOS_CAVERN_FAR_BRIDGE, []{return true;}), }); - areaTable[RR_DODONGOS_CAVERN_FAR_BRIDGE] = Region("Dodongos Cavern Far Bridge", SCENE_DODONGOS_CAVERN, {}, { + areaTable[RR_DODONGOS_CAVERN_FAR_BRIDGE] = Region("Dodongos Cavern Far Bridge", SCENE_DODONGOS_CAVERN, { + //Events + EventAccess(&logic->DCEyesLit, []{return logic->HasExplosives();}), + EventAccess(&logic->DCLiftPlatform, []{return true;}), + }, { //Locations - LOCATION(RC_DODONGOS_CAVERN_END_OF_BRIDGE_CHEST, Here(RR_DODONGOS_CAVERN_FAR_BRIDGE, []{return logic->CanBreakMudWalls();})), + LOCATION(RC_DODONGOS_CAVERN_END_OF_BRIDGE_CHEST, logic->CanBreakMudWalls()), }, { //Exits Entrance(RR_DODONGOS_CAVERN_LOBBY, []{return true;}), @@ -264,8 +285,8 @@ void RegionTable_Init_DodongosCavern() { areaTable[RR_DODONGOS_CAVERN_MQ_LOBBY] = Region("Dodongos Cavern MQ Lobby", SCENE_DODONGOS_CAVERN, {}, { //Locations LOCATION(RC_DODONGOS_CAVERN_MQ_MAP_CHEST, logic->CanBreakMudWalls() || logic->HasItem(RG_GORONS_BRACELET)), - LOCATION(RC_DODONGOS_CAVERN_MQ_DEKU_SCRUB_LOBBY_REAR, logic->CanStunDeku()), - LOCATION(RC_DODONGOS_CAVERN_MQ_DEKU_SCRUB_LOBBY_FRONT, logic->CanStunDeku()), + LOCATION(RC_DODONGOS_CAVERN_MQ_DEKU_SCRUB_LOBBY_REAR, logic->CanStunDeku() && CanBuyAnother(GetCheckPrice())), + LOCATION(RC_DODONGOS_CAVERN_MQ_DEKU_SCRUB_LOBBY_FRONT, logic->CanStunDeku() && CanBuyAnother(GetCheckPrice())), }, { //Exits Entrance(RR_DODONGOS_CAVERN_MQ_BEGINNING, []{return true;}), @@ -274,7 +295,7 @@ void RegionTable_Init_DodongosCavern() { Entrance(RR_DODONGOS_CAVERN_MQ_STAIRS_LOWER, []{return Here(RR_DODONGOS_CAVERN_MQ_LOBBY, []{return logic->BlastOrSmash() || logic->HasItem(RG_GORONS_BRACELET);});}), Entrance(RR_DODONGOS_CAVERN_MQ_LOWER_RIGHT_SIDE, []{return Here(RR_DODONGOS_CAVERN_MQ_LOBBY, []{return logic->CanBreakMudWalls();}) || Here(RR_DODONGOS_CAVERN_MQ_TORCH_PUZZLE_UPPER, []{return logic->HasItem(RG_GORONS_BRACELET) && logic->TakeDamage();});}), //strength 1 and bunny speed works too Entrance(RR_DODONGOS_CAVERN_MQ_POES_ROOM, []{return logic->IsAdult;}), - Entrance(RR_DODONGOS_CAVERN_MQ_BEHIND_MOUTH, []{return Here(RR_DODONGOS_CAVERN_MQ_MOUTH_SIDE_BRIDGE, []{return logic->HasExplosives() || (logic->ClearMQDCUpperLobbyRocks && logic->HasItem(RG_GORONS_BRACELET) && ((logic->IsAdult && ctx->GetTrickOption(RT_DC_MQ_ADULT_EYES)) || (logic->IsChild && ctx->GetTrickOption(RT_DC_MQ_CHILD_EYES))));});}), + Entrance(RR_DODONGOS_CAVERN_MQ_BEHIND_MOUTH, []{return logic->DCEyesLit;}), }); areaTable[RR_DODONGOS_CAVERN_MQ_GOSSIP_STONE] = Region("Dodongos Cavern MQ Gossip Stone", SCENE_DODONGOS_CAVERN, { @@ -293,6 +314,7 @@ void RegionTable_Init_DodongosCavern() { areaTable[RR_DODONGOS_CAVERN_MQ_MOUTH_SIDE_BRIDGE] = Region("Dodongos Cavern MQ Mouth Side Bridge", SCENE_DODONGOS_CAVERN, { //Events EventAccess(&logic->ClearMQDCUpperLobbyRocks, []{return logic->BlastOrSmash() || logic->CanUse(RG_DINS_FIRE);}), + EventAccess(&logic->DCEyesLit, []{return logic->HasExplosives() || (logic->ClearMQDCUpperLobbyRocks && logic->HasItem(RG_GORONS_BRACELET) && ((logic->IsAdult && ctx->GetTrickOption(RT_DC_MQ_ADULT_EYES)) || (logic->IsChild && ctx->GetTrickOption(RT_DC_MQ_CHILD_EYES))));}), }, {}, { //Exits Entrance(RR_DODONGOS_CAVERN_MQ_LOBBY, []{return true;}), @@ -336,7 +358,7 @@ void RegionTable_Init_DodongosCavern() { areaTable[RR_DODONGOS_CAVERN_MQ_STAIRS_UPPER] = Region("Dodongos Cavern MQ Stairs Upper", SCENE_DODONGOS_CAVERN, {}, { //Locations - LOCATION(RC_DODONGOS_CAVERN_MQ_DEKU_SCRUB_STAIRCASE, logic->CanStunDeku()), + LOCATION(RC_DODONGOS_CAVERN_MQ_DEKU_SCRUB_STAIRCASE, logic->CanStunDeku() && CanBuyAnother(GetCheckPrice())), LOCATION(RC_DODONGOS_CAVERN_MQ_STAIRCASE_UPPER_CRATE_1, logic->CanBreakCrates()), LOCATION(RC_DODONGOS_CAVERN_MQ_STAIRCASE_UPPER_CRATE_2, logic->CanBreakCrates()), LOCATION(RC_DODONGOS_CAVERN_MQ_STAIRCASE_UPPER_CRATE_3, logic->CanBreakCrates()), @@ -456,7 +478,7 @@ void RegionTable_Init_DodongosCavern() { areaTable[RR_DODONGOS_CAVERN_MQ_LOWER_RIGHT_SIDE] = Region("Dodongos Cavern MQ Lower Right Side", SCENE_DODONGOS_CAVERN, {}, { //Locations - LOCATION(RC_DODONGOS_CAVERN_MQ_DEKU_SCRUB_SIDE_ROOM_NEAR_LOWER_LIZALFOS, (logic->CanBreakMudWalls() || logic->HasItem(RG_GORONS_BRACELET)) && logic->CanStunDeku()), + LOCATION(RC_DODONGOS_CAVERN_MQ_DEKU_SCRUB_SIDE_ROOM_NEAR_LOWER_LIZALFOS, (logic->CanBreakMudWalls() || logic->HasItem(RG_GORONS_BRACELET)) && logic->CanStunDeku() && CanBuyAnother(GetCheckPrice())), LOCATION(RC_DODONGOS_CAVERN_MQ_RIGHT_SIDE_POT_1, logic->CanBreakPots()), LOCATION(RC_DODONGOS_CAVERN_MQ_RIGHT_SIDE_POT_2, logic->CanBreakPots()), LOCATION(RC_DODONGOS_CAVERN_MQ_RIGHT_SIDE_POT_3, logic->CanBreakPots()), @@ -504,7 +526,7 @@ void RegionTable_Init_DodongosCavern() { areaTable[RR_DODONGOS_CAVERN_MQ_MAD_SCRUB_ROOM] = Region("Dodongos Cavern Mad Scrub Room", SCENE_DODONGOS_CAVERN, {}, { //Locations LOCATION(RC_DODONGOS_CAVERN_MQ_GS_SCRUB_ROOM, (logic->CanGetEnemyDrop(RE_GOLD_SKULLTULA, ED_BOOMERANG, true))), //Implies you can avoid/kill the enemies with what you use on the skull, if this assumption is broken, add - //&& (Here(RR_DODONGOS_CAVERN_MQ_POES_ROOM, []{return logic->CanKillEnemy(RE_FIRE_KEESE) && logic->CanKillEnemy(RE_MAD_SCRUB);}) || (logic->CanAvoidEnemy(RE_FIRE_KEESE) && logic->CanAvoidEnemy(RE_MAD_SCRUB))) + //&& (Here(RR_DODONGOS_CAVERN_MQ_MAD_SCRUB_ROOM, []{return logic->CanKillEnemy(RE_FIRE_KEESE) && logic->CanKillEnemy(RE_MAD_SCRUB);}) || (logic->CanAvoidEnemy(RE_FIRE_KEESE) && logic->CanAvoidEnemy(RE_MAD_SCRUB))) LOCATION(RC_DODONGOS_CAVERN_MQ_SCRUB_GRASS_1, logic->CanCutShrubs()), LOCATION(RC_DODONGOS_CAVERN_MQ_SCRUB_GRASS_2, logic->CanCutShrubs()), }, { @@ -514,6 +536,7 @@ void RegionTable_Init_DodongosCavern() { areaTable[RR_DODONGOS_CAVERN_MQ_BEHIND_MOUTH] = Region("Dodongos Cavern MQ Behind Mouth", SCENE_DODONGOS_CAVERN, {}, { //Locations + LOCATION(RC_DODONGOS_CAVERN_MQ_GS_BACK_AREA, logic->CanGetEnemyDrop(RE_GOLD_SKULLTULA, ED_BOOMERANG) || (logic->IsAdult && logic->CanUse(RG_HOVER_BOOTS) /* || bunny jumps*/)), LOCATION(RC_DODONGOS_CAVERN_MQ_BEFORE_BOSS_SW_POT, logic->CanBreakPots()), LOCATION(RC_DODONGOS_CAVERN_MQ_BEFORE_BOSS_NE_POT, logic->CanBreakPots()), LOCATION(RC_DODONGOS_CAVERN_MQ_ARMOS_ROOM_SE_POT, logic->CanBreakPots()), @@ -527,9 +550,13 @@ void RegionTable_Init_DodongosCavern() { Entrance(RR_DODONGOS_CAVERN_MQ_BACK_SWITCH_GRAVE, []{return logic->IsAdult;}), }); - areaTable[RR_DODONGOS_CAVERN_MQ_BACK_BEHIND_FIRE] = Region("Dodongos Cavern MQ Back Behind Fire", SCENE_DODONGOS_CAVERN, {}, { + areaTable[RR_DODONGOS_CAVERN_MQ_BACK_BEHIND_FIRE] = Region("Dodongos Cavern MQ Back Behind Fire", SCENE_DODONGOS_CAVERN, { + //Events + EventAccess(&logic->MQDCBehindFireSwitch, []{return logic->CanDetonateBombFlowers();}), + }, { //Locations LOCATION(RC_DODONGOS_CAVERN_MQ_UNDER_GRAVE_CHEST, true), //pulling the grave isn't required, as you can open the chest through it + LOCATION(RC_DODONGOS_CAVERN_MQ_GS_BACK_AREA, logic->CanGetEnemyDrop(RE_GOLD_SKULLTULA, ED_BOOMERANG)), LOCATION(RC_DODONGOS_CAVERN_MQ_BACKROOM_POT_1, logic->CanBreakPots()), LOCATION(RC_DODONGOS_CAVERN_MQ_BACKROOM_POT_2, logic->CanBreakPots()), LOCATION(RC_DODONGOS_CAVERN_MQ_BACK_POE_GRASS, logic->CanCutShrubs()), @@ -537,16 +564,17 @@ void RegionTable_Init_DodongosCavern() { //Exits Entrance(RR_DODONGOS_CAVERN_MQ_BEHIND_MOUTH, []{return logic->CanAttack();}), //There's a trick N64 rolls into the child eyes trick for using armos blow up the bomb flowers when dieing, which would be killing an armos - Entrance(RR_DODONGOS_CAVERN_MQ_BACK_SWITCH_GRAVE, []{return Here(RR_DODONGOS_CAVERN_MQ_BACK_BEHIND_FIRE, []{return logic->CanDetonateBombFlowers();}) || Here(RR_DODONGOS_CAVERN_MQ_BACK_SWITCH_GRAVE, []{return logic->CanAttack();});}), + //RANDOTODO investigate using hovers to go from the door ledge to the block directly + Entrance(RR_DODONGOS_CAVERN_MQ_BACK_SWITCH_GRAVE, []{return logic->MQDCBehindFireSwitch;}), }); areaTable[RR_DODONGOS_CAVERN_MQ_BACK_SWITCH_GRAVE] = Region("Dodongos Cavern MQ BossArea", SCENE_DODONGOS_CAVERN, { //Events - EventAccess(&logic->FairyPot, []{return true;}), + EventAccess(&logic->MQDCBehindFireSwitch, []{return true/*str0 || logic->CanHitSwitch() || logic->CanDetonateBombFlowers()*/;}), + EventAccess(&logic->FairyPot, []{return true;}), }, { //Locations - LOCATION(RC_DODONGOS_CAVERN_MQ_GS_BACK_AREA, logic->CanGetEnemyDrop(RE_GOLD_SKULLTULA) || logic->HasItem(RG_GORONS_BRACELET) || //even if you somehow warp to BACK_BEHIND_FIRE, if you can kill the skull at range, you can get to BEHIND_MOUTH - Here(RR_DODONGOS_CAVERN_MQ_BEHIND_MOUTH, []{return (logic->CanGetEnemyDrop(RE_GOLD_SKULLTULA, ED_BOOMERANG)) || (logic->IsAdult && logic->CanUse(RG_HOVER_BOOTS) /* || bunny jumps*/);})), + LOCATION(RC_DODONGOS_CAVERN_MQ_GS_BACK_AREA, logic->CanGetEnemyDrop(RE_GOLD_SKULLTULA) || logic->HasItem(RG_GORONS_BRACELET)), LOCATION(RC_DODONGOS_CAVERN_MQ_ARMOS_ROOM_NW_POT, logic->CanBreakPots()), LOCATION(RC_DODONGOS_CAVERN_MQ_ARMOS_ROOM_NE_POT, logic->CanBreakPots()), LOCATION(RC_DODONGOS_CAVERN_MQ_ARMOS_GRASS, logic->CanCutShrubs()), diff --git a/soh/soh/Enhancements/randomizer/location_access/dungeons/fire_temple.cpp b/soh/soh/Enhancements/randomizer/location_access/dungeons/fire_temple.cpp index f57d6bd21..f0cc5ef3f 100644 --- a/soh/soh/Enhancements/randomizer/location_access/dungeons/fire_temple.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/dungeons/fire_temple.cpp @@ -38,7 +38,7 @@ void RegionTable_Init_FireTemple() { }, { //Exits Entrance(RR_FIRE_TEMPLE_FIRST_ROOM, []{return true;}), - Entrance(RR_FIRE_TEMPLE_BOSS_ENTRYWAY, []{return logic->IsAdult && (ctx->GetTrickOption(RT_FIRE_BOSS_DOOR_JUMP) || Here(RR_FIRE_TEMPLE_FIRE_MAZE_UPPER, []{return logic->CanUse(RG_MEGATON_HAMMER);}) || logic->CanUse(RG_HOVER_BOOTS));}), + Entrance(RR_FIRE_TEMPLE_BOSS_ENTRYWAY, []{return logic->IsAdult && (ctx->GetTrickOption(RT_FIRE_BOSS_DOOR_JUMP) || logic->HitFireTemplePlatform || logic->CanUse(RG_HOVER_BOOTS));}), }); areaTable[RR_FIRE_TEMPLE_LOOP_ENEMIES] = Region("Fire Temple Loop Enemies", SCENE_FIRE_TEMPLE, {}, {}, { @@ -140,8 +140,6 @@ void RegionTable_Init_FireTemple() { }); areaTable[RR_FIRE_TEMPLE_SHORTCUT_ROOM] = Region("Fire Temple Shortcut Room", SCENE_FIRE_TEMPLE, {}, { - //Locations - LOCATION(RC_FIRE_TEMPLE_BOULDER_MAZE_SHORTCUT_CHEST, Here(RR_FIRE_TEMPLE_SHORTCUT_CLIMB, []{return true;})), }, { //Exits Entrance(RR_FIRE_TEMPLE_FIRE_PILLAR_ROOM, []{return logic->SmallKeys(RR_FIRE_TEMPLE, 4);}), @@ -149,7 +147,10 @@ void RegionTable_Init_FireTemple() { Entrance(RR_FIRE_TEMPLE_BOULDER_MAZE_LOWER, []{return logic->IsAdult && (logic->HasItem(RG_GORONS_BRACELET) || ctx->GetTrickOption(RT_FIRE_STRENGTH)) && (logic->HasExplosives() || logic->CanUse(RG_FAIRY_BOW) || logic->CanUse(RG_HOOKSHOT) || logic->CanUse(RG_FAIRY_SLINGSHOT));}), }); - areaTable[RR_FIRE_TEMPLE_SHORTCUT_CLIMB] = Region("Fire Temple Shortcut Climb", SCENE_FIRE_TEMPLE, {}, {}, { + areaTable[RR_FIRE_TEMPLE_SHORTCUT_CLIMB] = Region("Fire Temple Shortcut Climb", SCENE_FIRE_TEMPLE, {}, { + //Locations + LOCATION(RC_FIRE_TEMPLE_BOULDER_MAZE_SHORTCUT_CHEST, true), + }, { //Exits Entrance(RR_FIRE_TEMPLE_SHORTCUT_ROOM, []{return true;}), Entrance(RR_FIRE_TEMPLE_BOULDER_MAZE_UPPER, []{return true;}), @@ -260,7 +261,10 @@ void RegionTable_Init_FireTemple() { Entrance(RR_FIRE_TEMPLE_LATE_FIRE_MAZE, []{return ctx->GetTrickOption(RT_FIRE_FLAME_MAZE) || false;}), }); - areaTable[RR_FIRE_TEMPLE_FIRE_MAZE_UPPER] = Region("Fire Temple Fire Maze Upper", SCENE_FIRE_TEMPLE, {}, {}, { + areaTable[RR_FIRE_TEMPLE_FIRE_MAZE_UPPER] = Region("Fire Temple Fire Maze Upper", SCENE_FIRE_TEMPLE, { + //Events + EventAccess(&logic->HitFireTemplePlatform, []{return logic->CanUse(RG_MEGATON_HAMMER);}), + }, {}, { //Exits Entrance(RR_FIRE_TEMPLE_NEAR_BOSS_ROOM, []{return logic->CanUse(RG_MEGATON_HAMMER);}), Entrance(RR_FIRE_TEMPLE_FIRE_MAZE_ROOM, []{return true;}), @@ -275,17 +279,17 @@ void RegionTable_Init_FireTemple() { Entrance(RR_FIRE_TEMPLE_FIRE_MAZE_ROOM, []{return true;}), }); - areaTable[RR_FIRE_TEMPLE_WEST_CENTRAL_LOWER] = Region("Fire Temple West Central Lower", SCENE_FIRE_TEMPLE, {}, { - //Locations - LOCATION(RC_FIRE_TEMPLE_HIGHEST_GORON_CHEST, Here(RR_FIRE_TEMPLE_WEST_CENTRAL_UPPER, []{return (logic->CanUse(RG_SONG_OF_TIME) || ctx->GetTrickOption(RT_RUSTED_SWITCHES)) && logic->CanUse(RG_MEGATON_HAMMER);})), - }, { + areaTable[RR_FIRE_TEMPLE_WEST_CENTRAL_LOWER] = Region("Fire Temple West Central Lower", SCENE_FIRE_TEMPLE, {}, {}, { //Exits Entrance(RR_FIRE_TEMPLE_FIRE_MAZE_ROOM, []{return logic->SmallKeys(RR_FIRE_TEMPLE, 8);}), Entrance(RR_FIRE_TEMPLE_WEST_CENTRAL_UPPER, []{return logic->IsAdult && logic->CanUse(RG_SONG_OF_TIME);}), Entrance(RR_FIRE_TEMPLE_LATE_FIRE_MAZE, []{return true;}), }); - areaTable[RR_FIRE_TEMPLE_WEST_CENTRAL_UPPER] = Region("Fire Temple West Central Upper", SCENE_FIRE_TEMPLE, {}, {}, { + areaTable[RR_FIRE_TEMPLE_WEST_CENTRAL_UPPER] = Region("Fire Temple West Central Upper", SCENE_FIRE_TEMPLE, {}, { + //Locations + LOCATION(RC_FIRE_TEMPLE_HIGHEST_GORON_CHEST, (logic->CanUse(RG_SONG_OF_TIME) || ctx->GetTrickOption(RT_RUSTED_SWITCHES)) && logic->CanUse(RG_MEGATON_HAMMER)), + }, { //Exits Entrance(RR_FIRE_TEMPLE_BOSS_ENTRYWAY, []{return false;}), Entrance(RR_FIRE_TEMPLE_FIRE_MAZE_UPPER, []{return true;}), @@ -444,7 +448,7 @@ void RegionTable_Init_FireTemple() { Entrance(RR_FIRE_TEMPLE_MQ_FIRST_ROOM_UPPER, []{return true;}), //Child cannot make it to the north side torches without a hook without specifically bunny hood speed + hover boots Entrance(RR_FIRE_TEMPLE_MQ_NEAR_BOSS_ROOM_NORTH, []{return logic->FireTimer() > 32 && (logic->CanUse(RG_HOOKSHOT) || (logic->IsAdult && logic->CanUse(RG_HOVER_BOOTS)));}), - Entrance(RR_FIRE_TEMPLE_BOSS_ENTRYWAY, []{return logic->FireTimer() >= 15 && ((logic->IsAdult && (ctx->GetTrickOption(RT_FIRE_BOSS_DOOR_JUMP) || logic->CanUse(RG_HOVER_BOOTS))) || (logic->IsAdult && logic->HitFireTemplePlatform) || (logic->HitFireTemplePlatform && logic->CanUse(RG_HOVER_BOOTS)));}), + Entrance(RR_FIRE_TEMPLE_BOSS_ENTRYWAY, []{return logic->FireTimer() >= 15 && ((logic->IsAdult && (ctx->GetTrickOption(RT_FIRE_BOSS_DOOR_JUMP) || logic->CanUse(RG_HOVER_BOOTS))) || (logic->HitFireTemplePlatform && (logic->IsAdult || logic->CanUse(RG_HOVER_BOOTS))));}), }); //This room assumes tunic logic is handled on entry. diff --git a/soh/soh/Enhancements/randomizer/location_access/dungeons/forest_temple.cpp b/soh/soh/Enhancements/randomizer/location_access/dungeons/forest_temple.cpp index a4a558297..aa3135994 100644 --- a/soh/soh/Enhancements/randomizer/location_access/dungeons/forest_temple.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/dungeons/forest_temple.cpp @@ -81,7 +81,7 @@ void RegionTable_Init_ForestTemple() { EventAccess(&logic->DekuBabaNuts, []{return logic->CanGetDekuBabaNuts();}), }, { //Locations - LOCATION(RC_FOREST_TEMPLE_GS_LEVEL_ISLAND_COURTYARD, logic->CanUse(RG_LONGSHOT) || Here(RR_FOREST_TEMPLE_NW_OUTDOORS_UPPER, []{return logic->HookshotOrBoomerang();})), + LOCATION(RC_FOREST_TEMPLE_GS_LEVEL_ISLAND_COURTYARD, logic->CanUse(RG_LONGSHOT)), LOCATION(RC_FOREST_TEMPLE_COURTYARD_RIGHT_HEART, logic->CanUse(RG_BOOMERANG) && ctx->GetTrickOption(RT_FOREST_OUTDOORS_HEARTS_BOOMERANG)), LOCATION(RC_FOREST_TEMPLE_COURTYARD_LEFT_HEART, logic->CanUse(RG_BOOMERANG) && ctx->GetTrickOption(RT_FOREST_OUTDOORS_HEARTS_BOOMERANG)), }, { @@ -89,7 +89,7 @@ void RegionTable_Init_ForestTemple() { Entrance(RR_FOREST_TEMPLE_LOBBY, []{return logic->CanUse(RG_SONG_OF_TIME);}), Entrance(RR_FOREST_TEMPLE_NW_OUTDOORS_UPPER, []{return ctx->GetTrickOption(RT_HOVER_BOOST_SIMPLE) && ctx->GetTrickOption(RT_DAMAGE_BOOST_SIMPLE) && logic->HasExplosives() && logic->CanUse(RG_HOVER_BOOTS);}), Entrance(RR_FOREST_TEMPLE_MAP_ROOM, []{return true;}), - Entrance(RR_FOREST_TEMPLE_SEWER, []{return logic->HasItem(RG_GOLDEN_SCALE) || logic->CanUse(RG_IRON_BOOTS) || HasAccessTo(RR_FOREST_TEMPLE_NE_OUTDOORS_UPPER);}), + Entrance(RR_FOREST_TEMPLE_SEWER, []{return logic->HasItem(RG_GOLDEN_SCALE) || logic->CanUse(RG_IRON_BOOTS);}), Entrance(RR_FOREST_TEMPLE_BOSS_ENTRYWAY, []{return false;}), }); @@ -99,8 +99,9 @@ void RegionTable_Init_ForestTemple() { EventAccess(&logic->DekuBabaNuts, []{return logic->CanGetDekuBabaNuts();}), }, { //Locations - LOCATION(RC_FOREST_TEMPLE_COURTYARD_RIGHT_HEART, true), - LOCATION(RC_FOREST_TEMPLE_COURTYARD_LEFT_HEART, true), + LOCATION(RC_FOREST_TEMPLE_GS_LEVEL_ISLAND_COURTYARD, logic->HookshotOrBoomerang()), + LOCATION(RC_FOREST_TEMPLE_COURTYARD_RIGHT_HEART, true), + LOCATION(RC_FOREST_TEMPLE_COURTYARD_LEFT_HEART, true), }, { //Exits Entrance(RR_FOREST_TEMPLE_NW_OUTDOORS_LOWER, []{return true;}), @@ -115,13 +116,13 @@ void RegionTable_Init_ForestTemple() { EventAccess(&logic->DekuBabaNuts, []{return logic->CanGetDekuBabaNuts();}), }, { //Locations - LOCATION(RC_FOREST_TEMPLE_RAISED_ISLAND_COURTYARD_CHEST, logic->CanUse(RG_HOOKSHOT) || HasAccessTo(RR_FOREST_TEMPLE_FALLING_ROOM) || (HasAccessTo(RR_FOREST_TEMPLE_NE_OUTDOORS_UPPER) && logic->IsAdult && ctx->GetTrickOption(RT_FOREST_OUTDOORS_LEDGE) && logic->CanUse(RG_HOVER_BOOTS))), - LOCATION(RC_FOREST_TEMPLE_GS_RAISED_ISLAND_COURTYARD, logic->CanUse(RG_HOOKSHOT) || (ctx->GetTrickOption(RT_FOREST_OUTDOORS_EAST_GS) && logic->CanUse(RG_BOOMERANG)) || Here(RR_FOREST_TEMPLE_FALLING_ROOM, []{return logic->CanUse(RG_FAIRY_BOW) || logic->CanUse(RG_FAIRY_SLINGSHOT) || logic->CanUse(RG_DINS_FIRE) || logic->HasExplosives();})), + LOCATION(RC_FOREST_TEMPLE_RAISED_ISLAND_COURTYARD_CHEST, logic->CanUse(RG_HOOKSHOT)), + LOCATION(RC_FOREST_TEMPLE_GS_RAISED_ISLAND_COURTYARD, logic->CanUse(RG_HOOKSHOT) || (ctx->GetTrickOption(RT_FOREST_OUTDOORS_EAST_GS) && logic->CanUse(RG_BOOMERANG))), }, { //Exits Entrance(RR_FOREST_TEMPLE_LOBBY, []{return true;}), Entrance(RR_FOREST_TEMPLE_NE_OUTDOORS_UPPER, []{return logic->CanUse(RG_LONGSHOT) || (ctx->GetTrickOption(RT_FOREST_VINES) && logic->CanUse(RG_HOOKSHOT));}), - Entrance(RR_FOREST_TEMPLE_SEWER, []{return logic->HasItem(RG_GOLDEN_SCALE) || logic->CanUse(RG_IRON_BOOTS) || HasAccessTo(RR_FOREST_TEMPLE_NE_OUTDOORS_UPPER);}), + Entrance(RR_FOREST_TEMPLE_SEWER, []{return logic->HasItem(RG_GOLDEN_SCALE) || logic->CanUse(RG_IRON_BOOTS);}), Entrance(RR_FOREST_TEMPLE_FALLING_ROOM, []{return false;}), }); @@ -129,10 +130,14 @@ void RegionTable_Init_ForestTemple() { //Events EventAccess(&logic->DekuBabaSticks, []{return logic->CanGetDekuBabaSticks();}), EventAccess(&logic->DekuBabaNuts, []{return logic->CanGetDekuBabaNuts();}), - }, {}, { + }, { + //Locations + LOCATION(RC_FOREST_TEMPLE_RAISED_ISLAND_COURTYARD_CHEST, logic->IsAdult && ctx->GetTrickOption(RT_FOREST_OUTDOORS_LEDGE) && logic->CanUse(RG_HOVER_BOOTS)), + }, { //Exits Entrance(RR_FOREST_TEMPLE_NE_OUTDOORS_LOWER, []{return true;}), Entrance(RR_FOREST_TEMPLE_MAP_ROOM, []{return true;}), + Entrance(RR_FOREST_TEMPLE_DRAINED_SEWER, []{return true;}), Entrance(RR_FOREST_TEMPLE_FALLING_ROOM, []{return ctx->GetTrickOption(RT_FOREST_DOORFRAME) && logic->CanJumpslashExceptHammer() && logic->CanUse(RG_HOVER_BOOTS) && logic->CanUse(RG_SCARECROW);}), }); @@ -147,9 +152,20 @@ void RegionTable_Init_ForestTemple() { areaTable[RR_FOREST_TEMPLE_SEWER] = Region("Forest Temple Sewer", SCENE_FOREST_TEMPLE, {}, { //Locations - LOCATION(RC_FOREST_TEMPLE_WELL_CHEST, HasAccessTo(RR_FOREST_TEMPLE_NE_OUTDOORS_UPPER) || (logic->CanOpenUnderwaterChest() && logic->WaterTimer() >= 8)), - LOCATION(RC_FOREST_TEMPLE_WELL_WEST_HEART, HasAccessTo(RR_FOREST_TEMPLE_NE_OUTDOORS_UPPER) || (logic->CanUse(RG_IRON_BOOTS) && logic->WaterTimer() >= 8)), - LOCATION(RC_FOREST_TEMPLE_WELL_EAST_HEART, HasAccessTo(RR_FOREST_TEMPLE_NE_OUTDOORS_UPPER) || (logic->CanUse(RG_IRON_BOOTS) && logic->WaterTimer() >= 8)), + LOCATION(RC_FOREST_TEMPLE_WELL_CHEST, logic->CanOpenUnderwaterChest() && logic->WaterTimer() >= 8), + LOCATION(RC_FOREST_TEMPLE_WELL_WEST_HEART, logic->CanUse(RG_IRON_BOOTS) && logic->WaterTimer() >= 8), + LOCATION(RC_FOREST_TEMPLE_WELL_EAST_HEART, logic->CanUse(RG_IRON_BOOTS) && logic->WaterTimer() >= 8), + }, { + //Exits + Entrance(RR_FOREST_TEMPLE_NW_OUTDOORS_LOWER, []{return logic->HasItem(RG_BRONZE_SCALE);}), + Entrance(RR_FOREST_TEMPLE_NE_OUTDOORS_LOWER, []{return logic->HasItem(RG_BRONZE_SCALE);}), + }); + + areaTable[RR_FOREST_TEMPLE_DRAINED_SEWER] = Region("Forest Temple Drained Well", SCENE_FOREST_TEMPLE, {}, { + //Locations + LOCATION(RC_FOREST_TEMPLE_WELL_CHEST, true), + LOCATION(RC_FOREST_TEMPLE_WELL_WEST_HEART, true), + LOCATION(RC_FOREST_TEMPLE_WELL_EAST_HEART, true), }, { //Exits Entrance(RR_FOREST_TEMPLE_NW_OUTDOORS_LOWER, []{return true;}), @@ -265,7 +281,9 @@ void RegionTable_Init_ForestTemple() { areaTable[RR_FOREST_TEMPLE_FALLING_ROOM] = Region("Forest Temple Falling Room", SCENE_FOREST_TEMPLE, {}, { //Locations - LOCATION(RC_FOREST_TEMPLE_FALLING_CEILING_ROOM_CHEST, true), + LOCATION(RC_FOREST_TEMPLE_GS_RAISED_ISLAND_COURTYARD, logic->CanUse(RG_FAIRY_BOW) || logic->CanUse(RG_FAIRY_SLINGSHOT) || logic->CanUse(RG_DINS_FIRE) || logic->HasExplosives()), + LOCATION(RC_FOREST_TEMPLE_FALLING_CEILING_ROOM_CHEST, true), + LOCATION(RC_FOREST_TEMPLE_RAISED_ISLAND_COURTYARD_CHEST, true), }, { //Exits Entrance(RR_FOREST_TEMPLE_NE_OUTDOORS_LOWER, []{return true;}), diff --git a/soh/soh/Enhancements/randomizer/location_access/dungeons/ganons_castle.cpp b/soh/soh/Enhancements/randomizer/location_access/dungeons/ganons_castle.cpp index 8571ba384..aea3db68f 100644 --- a/soh/soh/Enhancements/randomizer/location_access/dungeons/ganons_castle.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/dungeons/ganons_castle.cpp @@ -38,10 +38,10 @@ void RegionTable_Init_GanonsCastle() { EventAccess(&logic->FreeFairies, []{return true;}), }, { //Locations - LOCATION(RC_GANONS_CASTLE_DEKU_SCRUB_CENTER_LEFT, logic->CanStunDeku()), - LOCATION(RC_GANONS_CASTLE_DEKU_SCRUB_CENTER_RIGHT, logic->CanStunDeku()), - LOCATION(RC_GANONS_CASTLE_DEKU_SCRUB_RIGHT, logic->CanStunDeku()), - LOCATION(RC_GANONS_CASTLE_DEKU_SCRUB_LEFT, logic->CanStunDeku()), + LOCATION(RC_GANONS_CASTLE_DEKU_SCRUB_CENTER_LEFT, logic->CanStunDeku() && CanBuyAnother(GetCheckPrice())), + LOCATION(RC_GANONS_CASTLE_DEKU_SCRUB_CENTER_RIGHT, logic->CanStunDeku() && CanBuyAnother(GetCheckPrice())), + LOCATION(RC_GANONS_CASTLE_DEKU_SCRUB_RIGHT, logic->CanStunDeku() && CanBuyAnother(GetCheckPrice())), + LOCATION(RC_GANONS_CASTLE_DEKU_SCRUB_LEFT, logic->CanStunDeku() && CanBuyAnother(GetCheckPrice())), LOCATION(RC_GANONS_CASTLE_SCRUBS_FAIRY_1, true), LOCATION(RC_GANONS_CASTLE_SCRUBS_FAIRY_2, true), LOCATION(RC_GANONS_CASTLE_SCRUBS_FAIRY_3, true), @@ -166,11 +166,11 @@ void RegionTable_Init_GanonsCastle() { EventAccess(&logic->FreeFairies, []{return true;}), }, { //Locations - LOCATION(RC_GANONS_CASTLE_MQ_DEKU_SCRUB_CENTER_LEFT, logic->CanStunDeku()), - LOCATION(RC_GANONS_CASTLE_MQ_DEKU_SCRUB_CENTER, logic->CanStunDeku()), - LOCATION(RC_GANONS_CASTLE_MQ_DEKU_SCRUB_CENTER_RIGHT, logic->CanStunDeku()), - LOCATION(RC_GANONS_CASTLE_MQ_DEKU_SCRUB_LEFT, logic->CanStunDeku()), - LOCATION(RC_GANONS_CASTLE_MQ_DEKU_SCRUB_RIGHT, logic->CanStunDeku()), + LOCATION(RC_GANONS_CASTLE_MQ_DEKU_SCRUB_CENTER_LEFT, logic->CanStunDeku() && CanBuyAnother(GetCheckPrice())), + LOCATION(RC_GANONS_CASTLE_MQ_DEKU_SCRUB_CENTER, logic->CanStunDeku() && CanBuyAnother(GetCheckPrice())), + LOCATION(RC_GANONS_CASTLE_MQ_DEKU_SCRUB_CENTER_RIGHT, logic->CanStunDeku() && CanBuyAnother(GetCheckPrice())), + LOCATION(RC_GANONS_CASTLE_MQ_DEKU_SCRUB_LEFT, logic->CanStunDeku() && CanBuyAnother(GetCheckPrice())), + LOCATION(RC_GANONS_CASTLE_MQ_DEKU_SCRUB_RIGHT, logic->CanStunDeku() && CanBuyAnother(GetCheckPrice())), LOCATION(RC_GANONS_CASTLE_MQ_SCRUBS_FAIRY_1, true), LOCATION(RC_GANONS_CASTLE_MQ_SCRUBS_FAIRY_2, true), LOCATION(RC_GANONS_CASTLE_MQ_SCRUBS_FAIRY_3, true), diff --git a/soh/soh/Enhancements/randomizer/location_access/dungeons/jabujabus_belly.cpp b/soh/soh/Enhancements/randomizer/location_access/dungeons/jabujabus_belly.cpp index 51e80fc0c..5e5ffbdf3 100644 --- a/soh/soh/Enhancements/randomizer/location_access/dungeons/jabujabus_belly.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/dungeons/jabujabus_belly.cpp @@ -28,7 +28,7 @@ void RegionTable_Init_JabuJabusBelly() { EventAccess(&logic->JabuWestTentacle, []{return logic->JabuRutoIn1F && logic->CanKillEnemy(RE_TENTACLE, ED_BOOMERANG);}), }, { //Locations - LOCATION(RC_JABU_JABUS_BELLY_DEKU_SCRUB, logic->HasItem(RG_BRONZE_SCALE) && (logic->IsChild || logic->HasItem(RG_SILVER_SCALE) || ctx->GetTrickOption(RT_JABU_ALCOVE_JUMP_DIVE) || logic->CanUse(RG_IRON_BOOTS)) && logic->CanStunDeku()), + LOCATION(RC_JABU_JABUS_BELLY_DEKU_SCRUB, logic->HasItem(RG_BRONZE_SCALE) && (logic->IsChild || logic->HasItem(RG_SILVER_SCALE) || ctx->GetTrickOption(RT_JABU_ALCOVE_JUMP_DIVE) || logic->CanUse(RG_IRON_BOOTS)) && logic->CanStunDeku() && CanBuyAnother(GetCheckPrice())), //We can kill the Stingers with ruto LOCATION(RC_JABU_JABUS_BELLY_BOOMERANG_CHEST, logic->JabuRutoIn1F), LOCATION(RC_JABU_JABUS_BELLY_MAP_CHEST, logic->JabuWestTentacle), diff --git a/soh/soh/Enhancements/randomizer/location_access/dungeons/spirit_temple.cpp b/soh/soh/Enhancements/randomizer/location_access/dungeons/spirit_temple.cpp index e2a13ecc1..ef0a60006 100644 --- a/soh/soh/Enhancements/randomizer/location_access/dungeons/spirit_temple.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/dungeons/spirit_temple.cpp @@ -335,7 +335,7 @@ void RegionTable_Init_SpiritTemple() { Entrance(RR_SPIRIT_TEMPLE_MQ_LOBBY, []{return true;}), //The block here is unusual in that it is a permanent flag, but reset anyway as child. This is because there's a check that would be blocked off by pushing them otherwise //It may be worth considering making this always temp in future so adult doesn't have the same issue - Entrance(RR_SPIRIT_TEMPLE_MQ_BIG_BLOCK_ROOM_NORTH, []{return logic->IsChild ? logic->CanUse(RG_SILVER_GAUNTLETS) : Here(RR_SPIRIT_TEMPLE_MQ_LOBBY, []{return logic->CanUse(RG_SILVER_GAUNTLETS);});}), + Entrance(RR_SPIRIT_TEMPLE_MQ_BIG_BLOCK_ROOM_NORTH, []{return logic->IsChild ? logic->CanUse(RG_SILVER_GAUNTLETS) : Here(RR_SPIRIT_TEMPLE_MQ_BIG_BLOCK_ROOM_SOUTH, []{return logic->CanUse(RG_SILVER_GAUNTLETS);});}), }); areaTable[RR_SPIRIT_TEMPLE_MQ_BIG_BLOCK_ROOM_NORTH] = Region("Spirit Temple MQ Block Room North", SCENE_SPIRIT_TEMPLE, {}, { @@ -457,7 +457,7 @@ void RegionTable_Init_SpiritTemple() { areaTable[RR_SPIRIT_TEMPLE_MQ_EAST_IRON_KNUCKLE] = Region("Spirit Temple MQ East Iron Knuckle", SCENE_SPIRIT_TEMPLE, {}, {}, { //Exits Entrance(RR_SPIRIT_TEMPLE_MQ_EAST_STAIRS_TO_HAND, []{return true;}), - Entrance(RR_SPIRIT_TEMPLE_MQ_MIRROR_SHIELD_HAND, []{return Here(RR_SPIRIT_TEMPLE_MQ_EAST_STAIRS_TO_HAND, []{return logic->CanKillEnemy(RE_IRON_KNUCKLE);});}), + Entrance(RR_SPIRIT_TEMPLE_MQ_MIRROR_SHIELD_HAND, []{return Here(RR_SPIRIT_TEMPLE_MQ_EAST_IRON_KNUCKLE, []{return logic->CanKillEnemy(RE_IRON_KNUCKLE);});}), }); areaTable[RR_SPIRIT_TEMPLE_MQ_MIRROR_SHIELD_HAND] = Region("Spirit Temple MQ Mirror Shield Hand", SCENE_SPIRIT_TEMPLE, {}, { diff --git a/soh/soh/Enhancements/randomizer/location_access/dungeons/water_temple.cpp b/soh/soh/Enhancements/randomizer/location_access/dungeons/water_temple.cpp index 03cc44645..0e8ab62bb 100644 --- a/soh/soh/Enhancements/randomizer/location_access/dungeons/water_temple.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/dungeons/water_temple.cpp @@ -85,7 +85,7 @@ void RegionTable_Init_WaterTemple() { areaTable[RR_WATER_TEMPLE_BOULDERS_LOWER] = Region("Water Temple Boulders Lower", SCENE_WATER_TEMPLE, {}, { //Locations - LOCATION(RC_WATER_TEMPLE_GS_NEAR_BOSS_KEY_CHEST, logic->CanUse(RG_LONGSHOT) || Here(RR_WATER_TEMPLE_BOULDERS_UPPER, []{return (logic->IsAdult && logic->HookshotOrBoomerang()) || (logic->CanUse(RG_IRON_BOOTS) && logic->CanUse(RG_HOOKSHOT));})), + LOCATION(RC_WATER_TEMPLE_GS_NEAR_BOSS_KEY_CHEST, logic->CanUse(RG_LONGSHOT)), }, { //Exits Entrance(RR_WATER_TEMPLE_NORTH_LOWER, []{return logic->SmallKeys(RR_WATER_TEMPLE, 4);}), @@ -109,7 +109,10 @@ void RegionTable_Init_WaterTemple() { Entrance(RR_WATER_TEMPLE_BOULDERS_UPPER, []{return true;}), }); - areaTable[RR_WATER_TEMPLE_BOULDERS_UPPER] = Region("Water Temple Boulders Upper", SCENE_WATER_TEMPLE, {}, {}, { + areaTable[RR_WATER_TEMPLE_BOULDERS_UPPER] = Region("Water Temple Boulders Upper", SCENE_WATER_TEMPLE, {}, { + //Locations + LOCATION(RC_WATER_TEMPLE_GS_NEAR_BOSS_KEY_CHEST, (logic->IsAdult && logic->HookshotOrBoomerang()) || (logic->CanUse(RG_IRON_BOOTS) && logic->CanUse(RG_HOOKSHOT))), + }, { //Exits Entrance(RR_WATER_TEMPLE_BOULDERS_LOWER, []{return true;}), Entrance(RR_WATER_TEMPLE_JETS_ROOM, []{return logic->IsAdult;}), @@ -149,8 +152,7 @@ void RegionTable_Init_WaterTemple() { areaTable[RR_WATER_TEMPLE_DRAGON_ROOM] = Region("Water Temple Dragon Room", SCENE_WATER_TEMPLE, {}, { //Locations - LOCATION(RC_WATER_TEMPLE_DRAGON_CHEST, (logic->CanUse(RG_HOOKSHOT) && logic->CanUse(RG_IRON_BOOTS)) || (((logic->IsAdult && ctx->GetTrickOption(RT_WATER_ADULT_DRAGON) && (logic->CanUse(RG_HOOKSHOT) || logic->CanUse(RG_FAIRY_BOW) || logic->CanUse(RG_BOMBCHU_5))) || (logic->IsChild && ctx->GetTrickOption(RT_WATER_CHILD_DRAGON) && (logic->CanUse(RG_FAIRY_SLINGSHOT) || logic->CanUse(RG_BOOMERANG) || logic->CanUse(RG_BOMBCHU_5)))) && (logic->HasItem(RG_SILVER_SCALE) || logic->CanUse(RG_IRON_BOOTS))) || - Here(RR_WATER_TEMPLE_RIVER, []{return logic->IsAdult && logic->CanUse(RG_FAIRY_BOW) && ((ctx->GetTrickOption(RT_WATER_ADULT_DRAGON) && (logic->HasItem(RG_SILVER_SCALE) || logic->CanUse(RG_IRON_BOOTS))) || ctx->GetTrickOption(RT_WATER_DRAGON_JUMP_DIVE));})), + LOCATION(RC_WATER_TEMPLE_DRAGON_CHEST, (logic->CanUse(RG_HOOKSHOT) && logic->CanUse(RG_IRON_BOOTS)) || (((logic->IsAdult && ctx->GetTrickOption(RT_WATER_ADULT_DRAGON) && (logic->CanUse(RG_HOOKSHOT) || logic->CanUse(RG_FAIRY_BOW) || logic->CanUse(RG_BOMBCHU_5))) || (logic->IsChild && ctx->GetTrickOption(RT_WATER_CHILD_DRAGON) && (logic->CanUse(RG_FAIRY_SLINGSHOT) || logic->CanUse(RG_BOOMERANG) || logic->CanUse(RG_BOMBCHU_5)))) && (logic->HasItem(RG_SILVER_SCALE) || logic->CanUse(RG_IRON_BOOTS)))), }, { //Exits Entrance(RR_WATER_TEMPLE_WEST_LOWER, []{return true;}), @@ -262,6 +264,7 @@ void RegionTable_Init_WaterTemple() { LOCATION(RC_WATER_TEMPLE_RIVER_HEART_2, (logic->CanUse(RG_IRON_BOOTS) && logic->WaterTimer() >= 16) || logic->HasItem(RG_BRONZE_SCALE)), LOCATION(RC_WATER_TEMPLE_RIVER_HEART_3, (logic->CanUse(RG_IRON_BOOTS) && logic->WaterTimer() >= 16) || logic->HasItem(RG_BRONZE_SCALE)), LOCATION(RC_WATER_TEMPLE_RIVER_HEART_4, (logic->CanUse(RG_IRON_BOOTS) && logic->WaterTimer() >= 24) || logic->HasItem(RG_BRONZE_SCALE)), + LOCATION(RC_WATER_TEMPLE_DRAGON_CHEST, logic->IsAdult && logic->CanUse(RG_FAIRY_BOW) && ((ctx->GetTrickOption(RT_WATER_ADULT_DRAGON) && (logic->HasItem(RG_SILVER_SCALE) || logic->CanUse(RG_IRON_BOOTS))) || ctx->GetTrickOption(RT_WATER_DRAGON_JUMP_DIVE))), }, { //Exits Entrance(RR_WATER_TEMPLE_DRAGON_ROOM, []{return (logic->CanUse(RG_FAIRY_SLINGSHOT) || logic->CanUse(RG_FAIRY_BOW)) && (logic->IsAdult || logic->CanUse(RG_HOVER_BOOTS) || logic->CanUse(RG_HOOKSHOT));}), diff --git a/soh/soh/Enhancements/randomizer/location_access/overworld/death_mountain_crater.cpp b/soh/soh/Enhancements/randomizer/location_access/overworld/death_mountain_crater.cpp index be1b2043a..010eb58f7 100644 --- a/soh/soh/Enhancements/randomizer/location_access/overworld/death_mountain_crater.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/overworld/death_mountain_crater.cpp @@ -35,7 +35,7 @@ void RegionTable_Init_DeathMountainCrater() { areaTable[RR_DMC_LADDER_AREA_NEARBY] = Region("DMC Ladder Region Nearby", SCENE_DEATH_MOUNTAIN_CRATER, {}, { //Locations - LOCATION(RC_DMC_DEKU_SCRUB, logic->IsChild && logic->CanStunDeku()), + LOCATION(RC_DMC_DEKU_SCRUB, logic->IsChild && logic->CanStunDeku() && CanBuyAnother(GetCheckPrice())), }, { //Exits Entrance(RR_DMC_UPPER_NEARBY, []{return logic->Hearts() >= 3;}), @@ -127,9 +127,9 @@ void RegionTable_Init_DeathMountainCrater() { areaTable[RR_DMC_HAMMER_GROTTO] = Region("DMC Hammer Grotto", SCENE_GROTTOS, {}, { //Locations - LOCATION(RC_DMC_DEKU_SCRUB_GROTTO_LEFT, logic->CanStunDeku()), - LOCATION(RC_DMC_DEKU_SCRUB_GROTTO_RIGHT, logic->CanStunDeku()), - LOCATION(RC_DMC_DEKU_SCRUB_GROTTO_CENTER, logic->CanStunDeku()), + LOCATION(RC_DMC_DEKU_SCRUB_GROTTO_LEFT, logic->CanStunDeku() && CanBuyAnother(GetCheckPrice())), + LOCATION(RC_DMC_DEKU_SCRUB_GROTTO_RIGHT, logic->CanStunDeku() && CanBuyAnother(GetCheckPrice())), + LOCATION(RC_DMC_DEKU_SCRUB_GROTTO_CENTER, logic->CanStunDeku() && CanBuyAnother(GetCheckPrice())), LOCATION(RC_DMC_HAMMER_GROTTO_BEEHIVE, logic->CanBreakUpperBeehives()), }, { //Exits diff --git a/soh/soh/Enhancements/randomizer/location_access/overworld/desert_colossus.cpp b/soh/soh/Enhancements/randomizer/location_access/overworld/desert_colossus.cpp index f4b8b01c3..a353ad852 100644 --- a/soh/soh/Enhancements/randomizer/location_access/overworld/desert_colossus.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/overworld/desert_colossus.cpp @@ -68,8 +68,8 @@ void RegionTable_Init_DesertColossus() { areaTable[RR_COLOSSUS_GROTTO] = Region("Colossus Grotto", SCENE_GROTTOS, {}, { //Locations - LOCATION(RC_COLOSSUS_DEKU_SCRUB_GROTTO_REAR, logic->CanStunDeku()), - LOCATION(RC_COLOSSUS_DEKU_SCRUB_GROTTO_FRONT, logic->CanStunDeku()), + LOCATION(RC_COLOSSUS_DEKU_SCRUB_GROTTO_REAR, logic->CanStunDeku() && CanBuyAnother(GetCheckPrice())), + LOCATION(RC_COLOSSUS_DEKU_SCRUB_GROTTO_FRONT, logic->CanStunDeku() && CanBuyAnother(GetCheckPrice())), LOCATION(RC_COLOSSUS_GROTTO_BEEHIVE, logic->CanBreakUpperBeehives()), }, { //Exits diff --git a/soh/soh/Enhancements/randomizer/location_access/overworld/gerudo_valley.cpp b/soh/soh/Enhancements/randomizer/location_access/overworld/gerudo_valley.cpp index a9f0299ba..d9ba4b974 100644 --- a/soh/soh/Enhancements/randomizer/location_access/overworld/gerudo_valley.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/overworld/gerudo_valley.cpp @@ -108,8 +108,8 @@ void RegionTable_Init_GerudoValley() { areaTable[RR_GV_STORMS_GROTTO] = Region("GV Storms Grotto", SCENE_GROTTOS, {}, { //Locations - LOCATION(RC_GV_DEKU_SCRUB_GROTTO_REAR, logic->CanStunDeku()), - LOCATION(RC_GV_DEKU_SCRUB_GROTTO_FRONT, logic->CanStunDeku()), + LOCATION(RC_GV_DEKU_SCRUB_GROTTO_REAR, logic->CanStunDeku() && CanBuyAnother(GetCheckPrice())), + LOCATION(RC_GV_DEKU_SCRUB_GROTTO_FRONT, logic->CanStunDeku() && CanBuyAnother(GetCheckPrice())), LOCATION(RC_GV_DEKU_SCRUB_GROTTO_BEEHIVE, logic->CanBreakUpperBeehives()), }, { //Exits diff --git a/soh/soh/Enhancements/randomizer/location_access/overworld/goron_city.cpp b/soh/soh/Enhancements/randomizer/location_access/overworld/goron_city.cpp index 9d155c3a0..f7b10164f 100644 --- a/soh/soh/Enhancements/randomizer/location_access/overworld/goron_city.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/overworld/goron_city.cpp @@ -26,7 +26,7 @@ void RegionTable_Init_GoronCity() { LOCATION(RC_GC_ROLLING_GORON_AS_ADULT, logic->StopGCRollingGoronAsAdult), LOCATION(RC_GC_GS_BOULDER_MAZE, logic->IsChild && logic->BlastOrSmash()), LOCATION(RC_GC_GS_CENTER_PLATFORM, logic->IsAdult && logic->CanAttack()), - LOCATION(RC_GC_MEDIGORON, logic->IsAdult && (logic->CanBreakMudWalls() || logic->HasItem(RG_GORONS_BRACELET))), + LOCATION(RC_GC_MEDIGORON, logic->IsAdult && (logic->CanBreakMudWalls() || logic->HasItem(RG_GORONS_BRACELET)) && CanBuyAnother(GetCheckPrice())), LOCATION(RC_GC_MAZE_GOSSIP_STONE_FAIRY, (logic->BlastOrSmash() || logic->CanUse(RG_SILVER_GAUNTLETS)) && logic->CallGossipFairyExceptSuns()), LOCATION(RC_GC_MAZE_GOSSIP_STONE_FAIRY_BIG, (logic->BlastOrSmash() || logic->CanUse(RG_SILVER_GAUNTLETS)) && logic->CanUse(RG_SONG_OF_STORMS)), LOCATION(RC_GC_MAZE_GOSSIP_STONE, logic->BlastOrSmash() || logic->CanUse(RG_SILVER_GAUNTLETS)), @@ -90,14 +90,14 @@ void RegionTable_Init_GoronCity() { areaTable[RR_GC_SHOP] = Region("GC Shop", SCENE_GORON_SHOP, {}, { //Locations - LOCATION(RC_GC_SHOP_ITEM_1, true), - LOCATION(RC_GC_SHOP_ITEM_2, true), - LOCATION(RC_GC_SHOP_ITEM_3, true), - LOCATION(RC_GC_SHOP_ITEM_4, true), - LOCATION(RC_GC_SHOP_ITEM_5, true), - LOCATION(RC_GC_SHOP_ITEM_6, true), - LOCATION(RC_GC_SHOP_ITEM_7, true), - LOCATION(RC_GC_SHOP_ITEM_8, true), + LOCATION(RC_GC_SHOP_ITEM_1, CanBuyAnother(GetCheckPrice())), + LOCATION(RC_GC_SHOP_ITEM_2, CanBuyAnother(GetCheckPrice())), + LOCATION(RC_GC_SHOP_ITEM_3, CanBuyAnother(GetCheckPrice())), + LOCATION(RC_GC_SHOP_ITEM_4, CanBuyAnother(GetCheckPrice())), + LOCATION(RC_GC_SHOP_ITEM_5, CanBuyAnother(GetCheckPrice())), + LOCATION(RC_GC_SHOP_ITEM_6, CanBuyAnother(GetCheckPrice())), + LOCATION(RC_GC_SHOP_ITEM_7, CanBuyAnother(GetCheckPrice())), + LOCATION(RC_GC_SHOP_ITEM_8, CanBuyAnother(GetCheckPrice())), }, { //Exits Entrance(RR_GORON_CITY, []{return true;}), @@ -105,9 +105,9 @@ void RegionTable_Init_GoronCity() { areaTable[RR_GC_GROTTO] = Region("GC Grotto", SCENE_GROTTOS, {}, { //Locations - LOCATION(RC_GC_DEKU_SCRUB_GROTTO_LEFT, logic->CanStunDeku()), - LOCATION(RC_GC_DEKU_SCRUB_GROTTO_RIGHT, logic->CanStunDeku()), - LOCATION(RC_GC_DEKU_SCRUB_GROTTO_CENTER, logic->CanStunDeku()), + LOCATION(RC_GC_DEKU_SCRUB_GROTTO_LEFT, logic->CanStunDeku() && CanBuyAnother(GetCheckPrice())), + LOCATION(RC_GC_DEKU_SCRUB_GROTTO_RIGHT, logic->CanStunDeku() && CanBuyAnother(GetCheckPrice())), + LOCATION(RC_GC_DEKU_SCRUB_GROTTO_CENTER, logic->CanStunDeku() && CanBuyAnother(GetCheckPrice())), LOCATION(RC_GC_GROTTO_BEEHIVE, logic->CanBreakUpperBeehives()), }, { //Exits diff --git a/soh/soh/Enhancements/randomizer/location_access/overworld/haunted_wasteland.cpp b/soh/soh/Enhancements/randomizer/location_access/overworld/haunted_wasteland.cpp index 930ffcb4f..6f6a13830 100644 --- a/soh/soh/Enhancements/randomizer/location_access/overworld/haunted_wasteland.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/overworld/haunted_wasteland.cpp @@ -19,11 +19,11 @@ void RegionTable_Init_HauntedWasteland() { //Events EventAccess(&logic->FairyPot, []{return true;}), EventAccess(&logic->NutPot, []{return true;}), - EventAccess(&logic->CarpetMerchant, []{return logic->HasItem(RG_ADULT_WALLET) && CanBuyAnother(RC_WASTELAND_BOMBCHU_SALESMAN) && (logic->CanJumpslash() || logic->CanUse(RG_HOVER_BOOTS));}), + EventAccess(&logic->CarpetMerchant, []{return logic->HasItem(RG_ADULT_WALLET) && CanBuyAnother(GetCheckPrice(RC_WASTELAND_BOMBCHU_SALESMAN)) && (logic->CanJumpslash() || logic->CanUse(RG_HOVER_BOOTS));}), }, { //Locations LOCATION(RC_WASTELAND_CHEST, logic->HasFireSource()), - LOCATION(RC_WASTELAND_BOMBCHU_SALESMAN, logic->CanJumpslash() || logic->CanUse(RG_HOVER_BOOTS)), + LOCATION(RC_WASTELAND_BOMBCHU_SALESMAN, (logic->CanJumpslash() || logic->CanUse(RG_HOVER_BOOTS)) && CanBuyAnother(GetCheckPrice())), LOCATION(RC_WASTELAND_GS, logic->HookshotOrBoomerang()), LOCATION(RC_WASTELAND_NEAR_GS_POT_1, logic->CanBreakPots()), LOCATION(RC_WASTELAND_NEAR_GS_POT_2, logic->CanBreakPots()), diff --git a/soh/soh/Enhancements/randomizer/location_access/overworld/hyrule_field.cpp b/soh/soh/Enhancements/randomizer/location_access/overworld/hyrule_field.cpp index 3d850be58..bc209d0fa 100644 --- a/soh/soh/Enhancements/randomizer/location_access/overworld/hyrule_field.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/overworld/hyrule_field.cpp @@ -119,7 +119,7 @@ void RegionTable_Init_HyruleField() { areaTable[RR_HF_INSIDE_FENCE_GROTTO] = Region("HF Inside Fence Grotto", SCENE_GROTTOS, {}, { //Locations - LOCATION(RC_HF_DEKU_SCRUB_GROTTO, logic->CanStunDeku()), + LOCATION(RC_HF_DEKU_SCRUB_GROTTO, logic->CanStunDeku() && CanBuyAnother(GetCheckPrice())), LOCATION(RC_HF_INSIDE_FENCE_GROTTO_BEEHIVE, logic->CanBreakLowerBeehives()), LOCATION(RC_HF_FENCE_GROTTO_STORMS_FAIRY, logic->CanUse(RG_SONG_OF_STORMS)), }, { diff --git a/soh/soh/Enhancements/randomizer/location_access/overworld/kakariko.cpp b/soh/soh/Enhancements/randomizer/location_access/overworld/kakariko.cpp index 92bc9aa37..0b61ec56b 100644 --- a/soh/soh/Enhancements/randomizer/location_access/overworld/kakariko.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/overworld/kakariko.cpp @@ -180,14 +180,14 @@ void RegionTable_Init_Kakariko() { areaTable[RR_KAK_BAZAAR] = Region("Kak Bazaar", SCENE_BAZAAR, {}, { //Locations - LOCATION(RC_KAK_BAZAAR_ITEM_1, true), - LOCATION(RC_KAK_BAZAAR_ITEM_2, true), - LOCATION(RC_KAK_BAZAAR_ITEM_3, true), - LOCATION(RC_KAK_BAZAAR_ITEM_4, true), - LOCATION(RC_KAK_BAZAAR_ITEM_5, true), - LOCATION(RC_KAK_BAZAAR_ITEM_6, true), - LOCATION(RC_KAK_BAZAAR_ITEM_7, true), - LOCATION(RC_KAK_BAZAAR_ITEM_8, true), + LOCATION(RC_KAK_BAZAAR_ITEM_1, CanBuyAnother(GetCheckPrice())), + LOCATION(RC_KAK_BAZAAR_ITEM_2, CanBuyAnother(GetCheckPrice())), + LOCATION(RC_KAK_BAZAAR_ITEM_3, CanBuyAnother(GetCheckPrice())), + LOCATION(RC_KAK_BAZAAR_ITEM_4, CanBuyAnother(GetCheckPrice())), + LOCATION(RC_KAK_BAZAAR_ITEM_5, CanBuyAnother(GetCheckPrice())), + LOCATION(RC_KAK_BAZAAR_ITEM_6, CanBuyAnother(GetCheckPrice())), + LOCATION(RC_KAK_BAZAAR_ITEM_7, CanBuyAnother(GetCheckPrice())), + LOCATION(RC_KAK_BAZAAR_ITEM_8, CanBuyAnother(GetCheckPrice())), }, { //Exits Entrance(RR_KAKARIKO_VILLAGE, []{return true;}), @@ -203,14 +203,14 @@ void RegionTable_Init_Kakariko() { areaTable[RR_KAK_POTION_SHOP_FRONT] = Region("Kak Potion Shop Front", SCENE_POTION_SHOP_KAKARIKO, {}, { //Locations - LOCATION(RC_KAK_POTION_SHOP_ITEM_1, logic->IsAdult), - LOCATION(RC_KAK_POTION_SHOP_ITEM_2, logic->IsAdult), - LOCATION(RC_KAK_POTION_SHOP_ITEM_3, logic->IsAdult), - LOCATION(RC_KAK_POTION_SHOP_ITEM_4, logic->IsAdult), - LOCATION(RC_KAK_POTION_SHOP_ITEM_5, logic->IsAdult), - LOCATION(RC_KAK_POTION_SHOP_ITEM_6, logic->IsAdult), - LOCATION(RC_KAK_POTION_SHOP_ITEM_7, logic->IsAdult), - LOCATION(RC_KAK_POTION_SHOP_ITEM_8, logic->IsAdult), + LOCATION(RC_KAK_POTION_SHOP_ITEM_1, logic->IsAdult && CanBuyAnother(GetCheckPrice())), + LOCATION(RC_KAK_POTION_SHOP_ITEM_2, logic->IsAdult && CanBuyAnother(GetCheckPrice())), + LOCATION(RC_KAK_POTION_SHOP_ITEM_3, logic->IsAdult && CanBuyAnother(GetCheckPrice())), + LOCATION(RC_KAK_POTION_SHOP_ITEM_4, logic->IsAdult && CanBuyAnother(GetCheckPrice())), + LOCATION(RC_KAK_POTION_SHOP_ITEM_5, logic->IsAdult && CanBuyAnother(GetCheckPrice())), + LOCATION(RC_KAK_POTION_SHOP_ITEM_6, logic->IsAdult && CanBuyAnother(GetCheckPrice())), + LOCATION(RC_KAK_POTION_SHOP_ITEM_7, logic->IsAdult && CanBuyAnother(GetCheckPrice())), + LOCATION(RC_KAK_POTION_SHOP_ITEM_8, logic->IsAdult && CanBuyAnother(GetCheckPrice())), }, { //Exits Entrance(RR_KAKARIKO_VILLAGE, []{return true;}), @@ -229,7 +229,7 @@ void RegionTable_Init_Kakariko() { }, { //Locations LOCATION(RC_KAK_TRADE_ODD_MUSHROOM, logic->IsAdult && logic->CanUse(RG_ODD_MUSHROOM)), - LOCATION(RC_KAK_GRANNYS_SHOP, logic->IsAdult && (logic->CanUse(RG_ODD_MUSHROOM) || logic->TradeQuestStep(RG_ODD_MUSHROOM))), + LOCATION(RC_KAK_GRANNYS_SHOP, logic->IsAdult && (logic->CanUse(RG_ODD_MUSHROOM) || logic->TradeQuestStep(RG_ODD_MUSHROOM)) && CanBuyAnother(GetCheckPrice())), }, { // Exits Entrance(RR_KAK_BACKYARD, []{return true;}), diff --git a/soh/soh/Enhancements/randomizer/location_access/overworld/kokiri_forest.cpp b/soh/soh/Enhancements/randomizer/location_access/overworld/kokiri_forest.cpp index 5d8ef11ec..ddee5dd0f 100644 --- a/soh/soh/Enhancements/randomizer/location_access/overworld/kokiri_forest.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/overworld/kokiri_forest.cpp @@ -159,14 +159,14 @@ void RegionTable_Init_KokiriForest() { areaTable[RR_KF_KOKIRI_SHOP] = Region("KF Kokiri Shop", SCENE_KOKIRI_SHOP, {}, { //Locations - LOCATION(RC_KF_SHOP_ITEM_1, true), - LOCATION(RC_KF_SHOP_ITEM_2, true), - LOCATION(RC_KF_SHOP_ITEM_3, true), - LOCATION(RC_KF_SHOP_ITEM_4, true), - LOCATION(RC_KF_SHOP_ITEM_5, true), - LOCATION(RC_KF_SHOP_ITEM_6, true), - LOCATION(RC_KF_SHOP_ITEM_7, true), - LOCATION(RC_KF_SHOP_ITEM_8, true), + LOCATION(RC_KF_SHOP_ITEM_1, CanBuyAnother(GetCheckPrice())), + LOCATION(RC_KF_SHOP_ITEM_2, CanBuyAnother(GetCheckPrice())), + LOCATION(RC_KF_SHOP_ITEM_3, CanBuyAnother(GetCheckPrice())), + LOCATION(RC_KF_SHOP_ITEM_4, CanBuyAnother(GetCheckPrice())), + LOCATION(RC_KF_SHOP_ITEM_5, CanBuyAnother(GetCheckPrice())), + LOCATION(RC_KF_SHOP_ITEM_6, CanBuyAnother(GetCheckPrice())), + LOCATION(RC_KF_SHOP_ITEM_7, CanBuyAnother(GetCheckPrice())), + LOCATION(RC_KF_SHOP_ITEM_8, CanBuyAnother(GetCheckPrice())), }, { //Exits Entrance(RR_KOKIRI_FOREST, []{return true;}), diff --git a/soh/soh/Enhancements/randomizer/location_access/overworld/lake_hylia.cpp b/soh/soh/Enhancements/randomizer/location_access/overworld/lake_hylia.cpp index 964b781ce..ede261c45 100644 --- a/soh/soh/Enhancements/randomizer/location_access/overworld/lake_hylia.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/overworld/lake_hylia.cpp @@ -176,9 +176,9 @@ void RegionTable_Init_LakeHylia() { areaTable[RR_LH_GROTTO] = Region("LH Grotto", SCENE_GROTTOS, {}, { //Locations - LOCATION(RC_LH_DEKU_SCRUB_GROTTO_LEFT, logic->CanStunDeku()), - LOCATION(RC_LH_DEKU_SCRUB_GROTTO_RIGHT, logic->CanStunDeku()), - LOCATION(RC_LH_DEKU_SCRUB_GROTTO_CENTER, logic->CanStunDeku()), + LOCATION(RC_LH_DEKU_SCRUB_GROTTO_LEFT, logic->CanStunDeku() && CanBuyAnother(GetCheckPrice())), + LOCATION(RC_LH_DEKU_SCRUB_GROTTO_RIGHT, logic->CanStunDeku() && CanBuyAnother(GetCheckPrice())), + LOCATION(RC_LH_DEKU_SCRUB_GROTTO_CENTER, logic->CanStunDeku() && CanBuyAnother(GetCheckPrice())), LOCATION(RC_LH_GROTTO_BEEHIVE, logic->CanBreakUpperBeehives()), }, { //Exits diff --git a/soh/soh/Enhancements/randomizer/location_access/overworld/lon_lon_ranch.cpp b/soh/soh/Enhancements/randomizer/location_access/overworld/lon_lon_ranch.cpp index c29a5924e..e871a37c9 100644 --- a/soh/soh/Enhancements/randomizer/location_access/overworld/lon_lon_ranch.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/overworld/lon_lon_ranch.cpp @@ -65,9 +65,9 @@ void RegionTable_Init_LonLonRanch() { areaTable[RR_LLR_GROTTO] = Region("LLR Grotto", SCENE_GROTTOS, {}, { //Locations - LOCATION(RC_LLR_DEKU_SCRUB_GROTTO_LEFT, logic->CanStunDeku()), - LOCATION(RC_LLR_DEKU_SCRUB_GROTTO_RIGHT, logic->CanStunDeku()), - LOCATION(RC_LLR_DEKU_SCRUB_GROTTO_CENTER, logic->CanStunDeku()), + LOCATION(RC_LLR_DEKU_SCRUB_GROTTO_LEFT, logic->CanStunDeku() && CanBuyAnother(GetCheckPrice())), + LOCATION(RC_LLR_DEKU_SCRUB_GROTTO_RIGHT, logic->CanStunDeku() && CanBuyAnother(GetCheckPrice())), + LOCATION(RC_LLR_DEKU_SCRUB_GROTTO_CENTER, logic->CanStunDeku() && CanBuyAnother(GetCheckPrice())), LOCATION(RC_LLR_GROTTO_BEEHIVE, logic->CanBreakUpperBeehives()), }, { //Exits diff --git a/soh/soh/Enhancements/randomizer/location_access/overworld/lost_woods.cpp b/soh/soh/Enhancements/randomizer/location_access/overworld/lost_woods.cpp index 6c6bdb536..9ac44858a 100644 --- a/soh/soh/Enhancements/randomizer/location_access/overworld/lost_woods.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/overworld/lost_woods.cpp @@ -32,7 +32,7 @@ void RegionTable_Init_LostWoods() { //5 buttons => 100% LOCATION(RC_LW_OCARINA_MEMORY_GAME, logic->IsChild && logic->HasItem(RG_FAIRY_OCARINA) && logic->OcarinaButtons() >= 5), LOCATION(RC_LW_TARGET_IN_WOODS, logic->IsChild && logic->CanUse(RG_FAIRY_SLINGSHOT)), - LOCATION(RC_LW_DEKU_SCRUB_NEAR_BRIDGE, logic->IsChild && logic->CanStunDeku()), + LOCATION(RC_LW_DEKU_SCRUB_NEAR_BRIDGE, logic->IsChild && logic->CanStunDeku() && CanBuyAnother(GetCheckPrice())), LOCATION(RC_LW_GS_BEAN_PATCH_NEAR_BRIDGE, logic->CanSpawnSoilSkull() && logic->CanAttack()), //RANDOTODO handle collecting some of these as you leave the shortcut from the other side LOCATION(RC_LW_SHORTCUT_RUPEE_1, logic->IsChild && (logic->HasItem(RG_SILVER_SCALE) || logic->CanUse(RG_IRON_BOOTS))), @@ -68,8 +68,8 @@ void RegionTable_Init_LostWoods() { EventAccess(&logic->ButterflyFairy, []{return logic->CanUse(RG_STICKS);}), }, { //Locations - LOCATION(RC_LW_DEKU_SCRUB_NEAR_DEKU_THEATER_RIGHT, logic->IsChild && logic->CanStunDeku()), - LOCATION(RC_LW_DEKU_SCRUB_NEAR_DEKU_THEATER_LEFT, logic->IsChild && logic->CanStunDeku()), + LOCATION(RC_LW_DEKU_SCRUB_NEAR_DEKU_THEATER_RIGHT, logic->IsChild && logic->CanStunDeku() && CanBuyAnother(GetCheckPrice())), + LOCATION(RC_LW_DEKU_SCRUB_NEAR_DEKU_THEATER_LEFT, logic->IsChild && logic->CanStunDeku() && CanBuyAnother(GetCheckPrice())), LOCATION(RC_LW_GS_ABOVE_THEATER, logic->IsAdult && ((CanPlantBean(RR_LW_BEYOND_MIDO) && logic->CanAttack()) || (ctx->GetTrickOption(RT_LW_GS_BEAN) && logic->CanUse(RG_HOOKSHOT) && (logic->CanUse(RG_LONGSHOT) || logic->CanUse(RG_FAIRY_BOW) || logic->CanUse(RG_FAIRY_SLINGSHOT) || logic->CanUse(RG_BOMBCHU_5) || logic->CanUse(RG_DINS_FIRE)))) && logic->CanGetNightTimeGS()), LOCATION(RC_LW_GS_BEAN_PATCH_NEAR_THEATER, logic->CanSpawnSoilSkull() && (logic->CanAttack() || (ctx->GetOption(RSK_SHUFFLE_SCRUBS).Is(RO_SCRUBS_OFF) && logic->CanReflectNuts()))), LOCATION(RC_LW_BOULDER_RUPEE, logic->BlastOrSmash()), @@ -120,8 +120,8 @@ void RegionTable_Init_LostWoods() { areaTable[RR_LW_SCRUBS_GROTTO] = Region("LW Scrubs Grotto", SCENE_GROTTOS, {}, { //Locations - LOCATION(RC_LW_DEKU_SCRUB_GROTTO_REAR, logic->CanStunDeku()), - LOCATION(RC_LW_DEKU_SCRUB_GROTTO_FRONT, logic->CanStunDeku()), + LOCATION(RC_LW_DEKU_SCRUB_GROTTO_REAR, logic->CanStunDeku() && CanBuyAnother(GetCheckPrice())), + LOCATION(RC_LW_DEKU_SCRUB_GROTTO_FRONT, logic->CanStunDeku() && CanBuyAnother(GetCheckPrice())), LOCATION(RC_LW_DEKU_SCRUB_GROTTO_BEEHIVE, logic->CanBreakUpperBeehives()), LOCATION(RC_LW_DEKU_SCRUB_GROTTO_SUN_FAIRY, logic->CanUse(RG_SUNS_SONG)), }, { diff --git a/soh/soh/Enhancements/randomizer/location_access/overworld/market.cpp b/soh/soh/Enhancements/randomizer/location_access/overworld/market.cpp index 4f62d437f..349bdb1d8 100644 --- a/soh/soh/Enhancements/randomizer/location_access/overworld/market.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/overworld/market.cpp @@ -123,14 +123,14 @@ void RegionTable_Init_Market() { areaTable[RR_MARKET_BAZAAR] = Region("Market Bazaar", SCENE_BAZAAR, {}, { //Locations - LOCATION(RC_MARKET_BAZAAR_ITEM_1, true), - LOCATION(RC_MARKET_BAZAAR_ITEM_2, true), - LOCATION(RC_MARKET_BAZAAR_ITEM_3, true), - LOCATION(RC_MARKET_BAZAAR_ITEM_4, true), - LOCATION(RC_MARKET_BAZAAR_ITEM_5, true), - LOCATION(RC_MARKET_BAZAAR_ITEM_6, true), - LOCATION(RC_MARKET_BAZAAR_ITEM_7, true), - LOCATION(RC_MARKET_BAZAAR_ITEM_8, true), + LOCATION(RC_MARKET_BAZAAR_ITEM_1, CanBuyAnother(GetCheckPrice())), + LOCATION(RC_MARKET_BAZAAR_ITEM_2, CanBuyAnother(GetCheckPrice())), + LOCATION(RC_MARKET_BAZAAR_ITEM_3, CanBuyAnother(GetCheckPrice())), + LOCATION(RC_MARKET_BAZAAR_ITEM_4, CanBuyAnother(GetCheckPrice())), + LOCATION(RC_MARKET_BAZAAR_ITEM_5, CanBuyAnother(GetCheckPrice())), + LOCATION(RC_MARKET_BAZAAR_ITEM_6, CanBuyAnother(GetCheckPrice())), + LOCATION(RC_MARKET_BAZAAR_ITEM_7, CanBuyAnother(GetCheckPrice())), + LOCATION(RC_MARKET_BAZAAR_ITEM_8, CanBuyAnother(GetCheckPrice())), }, { //Exits Entrance(RR_THE_MARKET, []{return true;}), @@ -176,14 +176,14 @@ void RegionTable_Init_Market() { areaTable[RR_MARKET_POTION_SHOP] = Region("Market Potion Shop", SCENE_POTION_SHOP_MARKET, {}, { //Locations - LOCATION(RC_MARKET_POTION_SHOP_ITEM_1, true), - LOCATION(RC_MARKET_POTION_SHOP_ITEM_2, true), - LOCATION(RC_MARKET_POTION_SHOP_ITEM_3, true), - LOCATION(RC_MARKET_POTION_SHOP_ITEM_4, true), - LOCATION(RC_MARKET_POTION_SHOP_ITEM_5, true), - LOCATION(RC_MARKET_POTION_SHOP_ITEM_6, true), - LOCATION(RC_MARKET_POTION_SHOP_ITEM_7, true), - LOCATION(RC_MARKET_POTION_SHOP_ITEM_8, true), + LOCATION(RC_MARKET_POTION_SHOP_ITEM_1, CanBuyAnother(GetCheckPrice())), + LOCATION(RC_MARKET_POTION_SHOP_ITEM_2, CanBuyAnother(GetCheckPrice())), + LOCATION(RC_MARKET_POTION_SHOP_ITEM_3, CanBuyAnother(GetCheckPrice())), + LOCATION(RC_MARKET_POTION_SHOP_ITEM_4, CanBuyAnother(GetCheckPrice())), + LOCATION(RC_MARKET_POTION_SHOP_ITEM_5, CanBuyAnother(GetCheckPrice())), + LOCATION(RC_MARKET_POTION_SHOP_ITEM_6, CanBuyAnother(GetCheckPrice())), + LOCATION(RC_MARKET_POTION_SHOP_ITEM_7, CanBuyAnother(GetCheckPrice())), + LOCATION(RC_MARKET_POTION_SHOP_ITEM_8, CanBuyAnother(GetCheckPrice())), }, { //Exits Entrance(RR_THE_MARKET, []{return true;}), @@ -210,14 +210,14 @@ void RegionTable_Init_Market() { areaTable[RR_MARKET_BOMBCHU_SHOP] = Region("Market Bombchu Shop", SCENE_BOMBCHU_SHOP, {}, { //Locations - LOCATION(RC_MARKET_BOMBCHU_SHOP_ITEM_1, true), - LOCATION(RC_MARKET_BOMBCHU_SHOP_ITEM_2, true), - LOCATION(RC_MARKET_BOMBCHU_SHOP_ITEM_3, true), - LOCATION(RC_MARKET_BOMBCHU_SHOP_ITEM_4, true), - LOCATION(RC_MARKET_BOMBCHU_SHOP_ITEM_5, true), - LOCATION(RC_MARKET_BOMBCHU_SHOP_ITEM_6, true), - LOCATION(RC_MARKET_BOMBCHU_SHOP_ITEM_7, true), - LOCATION(RC_MARKET_BOMBCHU_SHOP_ITEM_8, true), + LOCATION(RC_MARKET_BOMBCHU_SHOP_ITEM_1, CanBuyAnother(GetCheckPrice())), + LOCATION(RC_MARKET_BOMBCHU_SHOP_ITEM_2, CanBuyAnother(GetCheckPrice())), + LOCATION(RC_MARKET_BOMBCHU_SHOP_ITEM_3, CanBuyAnother(GetCheckPrice())), + LOCATION(RC_MARKET_BOMBCHU_SHOP_ITEM_4, CanBuyAnother(GetCheckPrice())), + LOCATION(RC_MARKET_BOMBCHU_SHOP_ITEM_5, CanBuyAnother(GetCheckPrice())), + LOCATION(RC_MARKET_BOMBCHU_SHOP_ITEM_6, CanBuyAnother(GetCheckPrice())), + LOCATION(RC_MARKET_BOMBCHU_SHOP_ITEM_7, CanBuyAnother(GetCheckPrice())), + LOCATION(RC_MARKET_BOMBCHU_SHOP_ITEM_8, CanBuyAnother(GetCheckPrice())), }, { //Exits Entrance(RR_MARKET_BACK_ALLEY, []{return true;}), diff --git a/soh/soh/Enhancements/randomizer/location_access/overworld/sacred_forest_meadow.cpp b/soh/soh/Enhancements/randomizer/location_access/overworld/sacred_forest_meadow.cpp index 9d641ac98..5413c56de 100644 --- a/soh/soh/Enhancements/randomizer/location_access/overworld/sacred_forest_meadow.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/overworld/sacred_forest_meadow.cpp @@ -65,8 +65,8 @@ void RegionTable_Init_SacredForestMeadow() { areaTable[RR_SFM_STORMS_GROTTO] = Region("SFM Storms Grotto", SCENE_GROTTOS, {}, { //Locations - LOCATION(RC_SFM_DEKU_SCRUB_GROTTO_REAR, logic->CanStunDeku()), - LOCATION(RC_SFM_DEKU_SCRUB_GROTTO_FRONT, logic->CanStunDeku()), + LOCATION(RC_SFM_DEKU_SCRUB_GROTTO_REAR, logic->CanStunDeku() && CanBuyAnother(GetCheckPrice())), + LOCATION(RC_SFM_DEKU_SCRUB_GROTTO_FRONT, logic->CanStunDeku() && CanBuyAnother(GetCheckPrice())), LOCATION(RC_SFM_STORMS_GROTTO_BEEHIVE, logic->CanBreakUpperBeehives()), }, { //Exits diff --git a/soh/soh/Enhancements/randomizer/location_access/overworld/zoras_domain.cpp b/soh/soh/Enhancements/randomizer/location_access/overworld/zoras_domain.cpp index 3a626a2f9..a026ac7f7 100644 --- a/soh/soh/Enhancements/randomizer/location_access/overworld/zoras_domain.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/overworld/zoras_domain.cpp @@ -64,14 +64,14 @@ void RegionTable_Init_ZorasDomain() { areaTable[RR_ZD_SHOP] = Region("ZD Shop", SCENE_ZORA_SHOP, {}, { //Locations - LOCATION(RC_ZD_SHOP_ITEM_1, true), - LOCATION(RC_ZD_SHOP_ITEM_2, true), - LOCATION(RC_ZD_SHOP_ITEM_3, true), - LOCATION(RC_ZD_SHOP_ITEM_4, true), - LOCATION(RC_ZD_SHOP_ITEM_5, true), - LOCATION(RC_ZD_SHOP_ITEM_6, true), - LOCATION(RC_ZD_SHOP_ITEM_7, true), - LOCATION(RC_ZD_SHOP_ITEM_8, true), + LOCATION(RC_ZD_SHOP_ITEM_1, CanBuyAnother(GetCheckPrice())), + LOCATION(RC_ZD_SHOP_ITEM_2, CanBuyAnother(GetCheckPrice())), + LOCATION(RC_ZD_SHOP_ITEM_3, CanBuyAnother(GetCheckPrice())), + LOCATION(RC_ZD_SHOP_ITEM_4, CanBuyAnother(GetCheckPrice())), + LOCATION(RC_ZD_SHOP_ITEM_5, CanBuyAnother(GetCheckPrice())), + LOCATION(RC_ZD_SHOP_ITEM_6, CanBuyAnother(GetCheckPrice())), + LOCATION(RC_ZD_SHOP_ITEM_7, CanBuyAnother(GetCheckPrice())), + LOCATION(RC_ZD_SHOP_ITEM_8, CanBuyAnother(GetCheckPrice())), }, { //Exits Entrance(RR_ZORAS_DOMAIN, []{return true;}), diff --git a/soh/soh/Enhancements/randomizer/location_access/overworld/zoras_river.cpp b/soh/soh/Enhancements/randomizer/location_access/overworld/zoras_river.cpp index 5473ee2ca..c989655e5 100644 --- a/soh/soh/Enhancements/randomizer/location_access/overworld/zoras_river.cpp +++ b/soh/soh/Enhancements/randomizer/location_access/overworld/zoras_river.cpp @@ -34,7 +34,7 @@ void RegionTable_Init_ZoraRiver() { EventAccess(&logic->BugShrub, []{return logic->CanCutShrubs();}), }, { //Locations - LOCATION(RC_ZR_MAGIC_BEAN_SALESMAN, logic->HasItem(RG_CHILD_WALLET) && logic->IsChild), + LOCATION(RC_ZR_MAGIC_BEAN_SALESMAN, logic->IsChild && CanBuyAnother(GetCheckPrice())), LOCATION(RC_ZR_FROGS_OCARINA_GAME, logic->IsChild && logic->CanUse(RG_ZELDAS_LULLABY) && logic->CanUse(RG_SARIAS_SONG) && logic->CanUse(RG_SUNS_SONG) && logic->CanUse(RG_EPONAS_SONG) && logic->CanUse(RG_SONG_OF_TIME) && logic->CanUse(RG_SONG_OF_STORMS)), LOCATION(RC_ZR_FROGS_IN_THE_RAIN, logic->IsChild && logic->CanUse(RG_SONG_OF_STORMS)), LOCATION(RC_ZR_FROGS_ZELDAS_LULLABY, logic->IsChild && logic->CanUse(RG_ZELDAS_LULLABY)), @@ -121,8 +121,8 @@ void RegionTable_Init_ZoraRiver() { areaTable[RR_ZR_STORMS_GROTTO] = Region("ZR Storms Grotto", SCENE_GROTTOS, {}, { //Locations - LOCATION(RC_ZR_DEKU_SCRUB_GROTTO_REAR, logic->CanStunDeku()), - LOCATION(RC_ZR_DEKU_SCRUB_GROTTO_FRONT, logic->CanStunDeku()), + LOCATION(RC_ZR_DEKU_SCRUB_GROTTO_REAR, logic->CanStunDeku() && CanBuyAnother(GetCheckPrice())), + LOCATION(RC_ZR_DEKU_SCRUB_GROTTO_FRONT, logic->CanStunDeku() && CanBuyAnother(GetCheckPrice())), LOCATION(RC_ZR_STORMS_GROTTO_BEEHIVE, logic->CanBreakUpperBeehives()), }, { //Exits diff --git a/soh/soh/Enhancements/randomizer/location_list.cpp b/soh/soh/Enhancements/randomizer/location_list.cpp index 2fea752cc..f81a8b0a7 100644 --- a/soh/soh/Enhancements/randomizer/location_list.cpp +++ b/soh/soh/Enhancements/randomizer/location_list.cpp @@ -261,7 +261,7 @@ void Rando::StaticData::InitLocationTable() { locationTable[RC_DMC_DEKU_SCRUB_GROTTO_CENTER] = Location::Base(RC_DMC_DEKU_SCRUB_GROTTO_CENTER, RCQUEST_BOTH, RCTYPE_SCRUB, RCAREA_DEATH_MOUNTAIN_CRATER, ACTOR_EN_DNS, SCENE_GROTTOS, TWO_ACTOR_PARAMS(0x03, 0xF9), "Deku Scrub Grotto Center", RHT_DMC_DEKU_SCRUB_GROTTO_CENTER, RG_BUY_ARROWS_30, SpoilerCollectionCheck::RandomizerInf(RAND_INF_SCRUBS_PURCHASED_DMC_DEKU_SCRUB_GROTTO_CENTER), false, 70); // Zoras River locationTable[RC_ZR_OPEN_GROTTO_CHEST] = Location::Chest(RC_ZR_OPEN_GROTTO_CHEST, RCQUEST_BOTH, RCTYPE_STANDARD, RCAREA_ZORAS_RIVER, ACTOR_EN_BOX, SCENE_GROTTOS, 22985, 0x09, "Open Grotto Chest", RHT_ZR_OPEN_GROTTO_CHEST, RG_RED_RUPEE); - locationTable[RC_ZR_MAGIC_BEAN_SALESMAN] = Location::Base(RC_ZR_MAGIC_BEAN_SALESMAN, RCQUEST_BOTH, RCTYPE_STANDARD, ACTOR_ID_MAX, SCENE_ZORAS_RIVER, 0x00, "Magic Bean Salesman", RHT_ZR_MAGIC_BEAN_SALESMAN, RG_MAGIC_BEAN, SpoilerCollectionCheck::RandomizerInf(RAND_INF_MERCHANTS_MAGIC_BEAN_SALESMAN), true, 60); + locationTable[RC_ZR_MAGIC_BEAN_SALESMAN] = Location::Base(RC_ZR_MAGIC_BEAN_SALESMAN, RCQUEST_BOTH, RCTYPE_MERCHANT, ACTOR_ID_MAX, SCENE_ZORAS_RIVER, 0x00, "Magic Bean Salesman", RHT_ZR_MAGIC_BEAN_SALESMAN, RG_MAGIC_BEAN, SpoilerCollectionCheck::RandomizerInf(RAND_INF_MERCHANTS_MAGIC_BEAN_SALESMAN), true, 60); locationTable[RC_ZR_FROGS_ZELDAS_LULLABY] = Location::Base(RC_ZR_FROGS_ZELDAS_LULLABY, RCQUEST_BOTH, RCTYPE_FROG_SONG, ACTOR_EN_FR, SCENE_ZORAS_RIVER, 0x00, "Frogs Zelda's Lullaby", RHT_ZR_FROGS_ZELDAS_LULLABY, RG_PURPLE_RUPEE, SpoilerCollectionCheck::EventChkInf(EVENTCHKINF_SONGS_FOR_FROGS_ZL)); locationTable[RC_ZR_FROGS_EPONAS_SONG] = Location::Base(RC_ZR_FROGS_EPONAS_SONG, RCQUEST_BOTH, RCTYPE_FROG_SONG, ACTOR_EN_FR, SCENE_ZORAS_RIVER, 0x00, "Frogs Epona's Song", RHT_ZR_FROGS_EPONAS_SONG, RG_PURPLE_RUPEE, SpoilerCollectionCheck::EventChkInf(EVENTCHKINF_SONGS_FOR_FROGS_EPONA)); locationTable[RC_ZR_FROGS_SARIAS_SONG] = Location::Base(RC_ZR_FROGS_SARIAS_SONG, RCQUEST_BOTH, RCTYPE_FROG_SONG, ACTOR_EN_FR, SCENE_ZORAS_RIVER, 0x00, "Frogs Saria's Song", RHT_ZR_FROGS_SARIAS_SONG, RG_PURPLE_RUPEE, SpoilerCollectionCheck::EventChkInf(EVENTCHKINF_SONGS_FOR_FROGS_SARIA)); diff --git a/soh/soh/Enhancements/randomizer/logic.cpp b/soh/soh/Enhancements/randomizer/logic.cpp index 3c0c8345e..216aad0a2 100644 --- a/soh/soh/Enhancements/randomizer/logic.cpp +++ b/soh/soh/Enhancements/randomizer/logic.cpp @@ -2531,6 +2531,11 @@ void Logic::Reset(bool resetSaveContext /*= true*/) { MQSpirit3SunsEnemies = false; Spirit1FSilverRupees = false; JabuRutoIn1F = false; + DCEyesLit = false; + DCLiftPlatform = false; + DCStairsRoomDoor = false; + DCKilledLowerLizalfos = false; + MQDCBehindFireSwitch = false; CalculatingAvailableChecks = false; diff --git a/soh/soh/Enhancements/randomizer/logic.h b/soh/soh/Enhancements/randomizer/logic.h index 2bfea75e9..d94d25bbd 100644 --- a/soh/soh/Enhancements/randomizer/logic.h +++ b/soh/soh/Enhancements/randomizer/logic.h @@ -110,6 +110,7 @@ class Logic { // Other bool AtDay = false; bool AtNight = false; + RandomizerCheck CurrentCheckKey = RC_UNKNOWN_CHECK; // Events bool ShowedMidoSwordAndShield = false; @@ -143,6 +144,7 @@ class Logic { bool LinksCow = false; bool DeliverLetter = false; bool ClearMQDCUpperLobbyRocks = false; + bool MQDCBehindFireSwitch = false; bool LoweredWaterInsideBotw = false; bool OpenedWestRoomMQBotw = false; bool OpenedMiddleHoleMQBotw = false; @@ -181,6 +183,10 @@ class Logic { bool MQSpirit3SunsEnemies = false; bool Spirit1FSilverRupees = false; bool JabuRutoIn1F = false; + bool DCEyesLit = false; + bool DCLiftPlatform = false; + bool DCStairsRoomDoor = false; + bool DCKilledLowerLizalfos = false; /* --- END OF HELPERS AND LOCATION ACCESS --- */ diff --git a/soh/soh/Enhancements/randomizer/randomizerTypes.h b/soh/soh/Enhancements/randomizer/randomizerTypes.h index c2b9cbbdd..8ca811c6d 100644 --- a/soh/soh/Enhancements/randomizer/randomizerTypes.h +++ b/soh/soh/Enhancements/randomizer/randomizerTypes.h @@ -697,6 +697,7 @@ typedef enum { RR_FOREST_TEMPLE_NE_OUTDOORS_UPPER, RR_FOREST_TEMPLE_MAP_ROOM, RR_FOREST_TEMPLE_SEWER, + RR_FOREST_TEMPLE_DRAINED_SEWER, RR_FOREST_TEMPLE_BELOW_BOSS_KEY_CHEST, RR_FOREST_TEMPLE_FLOORMASTER_ROOM, RR_FOREST_TEMPLE_WEST_CORRIDOR,