diff --git a/soh/soh/Enhancements/randomizer/logic.cpp b/soh/soh/Enhancements/randomizer/logic.cpp index fd578d7de..382be7bdf 100644 --- a/soh/soh/Enhancements/randomizer/logic.cpp +++ b/soh/soh/Enhancements/randomizer/logic.cpp @@ -2118,6 +2118,21 @@ void Logic::SetQuestItem(uint32_t item, bool state) { } } +const std::vector& GetThievesHideoutSmallKeyDoors() { + // Retrieved from scenes/shared/gerudoway_scene/gerudoway_room_%d + // SOH::SceneCommandID::SetActorList, actor.id == ACTOR_DOOR_GERUDO, actor.params & 0x3F + static const std::vector normalSmallKeyDoors{ 1, 2, 3, 4 }; + static const std::vector fastSmallKeyDoors{ 1 }; + static const std::vector freeSmallKeyDoors{}; + + if (RAND_GET_OPTION(RSK_GERUDO_FORTRESS) == RO_GF_CARPENTERS_NORMAL) { + return normalSmallKeyDoors; + } else if (RAND_GET_OPTION(RSK_GERUDO_FORTRESS) == RO_GF_CARPENTERS_FAST) { + return fastSmallKeyDoors; + } + return freeSmallKeyDoors; +} + // Get the swch bit positions for the dungeon const std::vector& GetDungeonSmallKeyDoors(SceneID sceneId) { static const std::vector emptyVector; @@ -2183,7 +2198,8 @@ const std::vector& GetDungeonSmallKeyDoors(SceneID sceneId) { } int8_t Logic::GetUsedSmallKeyCount(SceneID sceneId) { - const auto& smallKeyDoors = GetDungeonSmallKeyDoors(sceneId); + const auto& smallKeyDoors = + (sceneId == SCENE_THIEVES_HIDEOUT) ? GetThievesHideoutSmallKeyDoors() : GetDungeonSmallKeyDoors(sceneId); // Get the swch value for the scene uint32_t swch;