From 51e965cf7e79ff17689fd76b96b5c4fef3ebbf95 Mon Sep 17 00:00:00 2001 From: Ralphie Morell Date: Wed, 18 Oct 2023 20:58:09 -0400 Subject: [PATCH] Cleaned up soul helpers; added check for ganon soul --- .../Enhancements/randomizer/3drando/item_pool.cpp | 1 + .../3drando/location_access/locacc_deku_tree.cpp | 2 +- .../location_access/locacc_dodongos_cavern.cpp | 2 +- .../3drando/location_access/locacc_fire_temple.cpp | 2 +- .../3drando/location_access/locacc_forest_temple.cpp | 2 +- .../3drando/location_access/locacc_ganons_castle.cpp | 2 +- .../location_access/locacc_jabujabus_belly.cpp | 2 +- .../3drando/location_access/locacc_shadow_temple.cpp | 2 +- .../3drando/location_access/locacc_spirit_temple.cpp | 2 +- .../3drando/location_access/locacc_water_temple.cpp | 4 ++-- soh/soh/Enhancements/randomizer/3drando/logic.cpp | 12 +++--------- soh/soh/Enhancements/randomizer/3drando/logic.hpp | 1 + 12 files changed, 15 insertions(+), 19 deletions(-) diff --git a/soh/soh/Enhancements/randomizer/3drando/item_pool.cpp b/soh/soh/Enhancements/randomizer/3drando/item_pool.cpp index 22cc5d759..b758b7792 100644 --- a/soh/soh/Enhancements/randomizer/3drando/item_pool.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/item_pool.cpp @@ -822,6 +822,7 @@ void GenerateItemPool() { AddItemToMainPool(BARINADE_BOSS_SOUL); AddItemToMainPool(PHANTOM_GANON_BOSS_SOUL); AddItemToMainPool(VOLVAGIA_BOSS_SOUL); + AddItemToMainPool(MORPHA_BOSS_SOUL); AddItemToMainPool(BONGO_BONGO_BOSS_SOUL); AddItemToMainPool(TWINROVA_BOSS_SOUL); if (ShuffleBossSouls.Is(BOSSSOULS_ON_PLUS_GANON)) { diff --git a/soh/soh/Enhancements/randomizer/3drando/location_access/locacc_deku_tree.cpp b/soh/soh/Enhancements/randomizer/3drando/location_access/locacc_deku_tree.cpp index 8a4b35772..127de3608 100644 --- a/soh/soh/Enhancements/randomizer/3drando/location_access/locacc_deku_tree.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/location_access/locacc_deku_tree.cpp @@ -253,7 +253,7 @@ void AreaTable_Init_DekuTree() { { // Events EventAccess(&DekuTreeClear, { [] { - return DekuTreeClear || (CanSummonGohma && + return DekuTreeClear || (HasBossSoul(GOHMA_BOSS_SOUL) && (CanJumpslash && (Nuts || CanUse(SLINGSHOT) || CanUse(BOW) || HookshotOrBoomerang))); }}), diff --git a/soh/soh/Enhancements/randomizer/3drando/location_access/locacc_dodongos_cavern.cpp b/soh/soh/Enhancements/randomizer/3drando/location_access/locacc_dodongos_cavern.cpp index 784514188..ca2ea13d5 100644 --- a/soh/soh/Enhancements/randomizer/3drando/location_access/locacc_dodongos_cavern.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/location_access/locacc_dodongos_cavern.cpp @@ -290,7 +290,7 @@ void AreaTable_Init_DodongosCavern() { // Events EventAccess(&DodongosCavernClear, { [] { - return DodongosCavernClear || (CanSummonKingDodongo && + return DodongosCavernClear || (HasBossSoul(KING_DODONGO_BOSS_SOUL) && (Here(DODONGOS_CAVERN_BOSS_ROOM, [] { return HasExplosives || (CanUse(MEGATON_HAMMER) && LogicDCHammerFloor); }) && (Bombs || GoronBracelet) && CanJumpslash)); /*todo add chu kill to tricks*/ diff --git a/soh/soh/Enhancements/randomizer/3drando/location_access/locacc_fire_temple.cpp b/soh/soh/Enhancements/randomizer/3drando/location_access/locacc_fire_temple.cpp index 31c59094d..74ac34395 100644 --- a/soh/soh/Enhancements/randomizer/3drando/location_access/locacc_fire_temple.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/location_access/locacc_fire_temple.cpp @@ -407,7 +407,7 @@ void AreaTable_Init_FireTemple() { { // Events EventAccess(&FireTempleClear, - { [] { return FireTempleClear || (CanSummonVolvagia && (FireTimer >= 64 && CanUse(MEGATON_HAMMER))); }}), + { [] { return FireTempleClear || (HasBossSoul(VOLVAGIA_BOSS_SOUL) && (FireTimer >= 64 && CanUse(MEGATON_HAMMER))); }}), }, { // Locations diff --git a/soh/soh/Enhancements/randomizer/3drando/location_access/locacc_forest_temple.cpp b/soh/soh/Enhancements/randomizer/3drando/location_access/locacc_forest_temple.cpp index dc675849b..7ed3dbdce 100644 --- a/soh/soh/Enhancements/randomizer/3drando/location_access/locacc_forest_temple.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/location_access/locacc_forest_temple.cpp @@ -421,7 +421,7 @@ void AreaTable_Init_ForestTemple() { { // Events EventAccess(&ForestTempleClear, { [] { - return ForestTempleClear || (CanSummonPhantomGanon && ((CanUse(KOKIRI_SWORD) || CanUse(MASTER_SWORD) || CanUse(BIGGORON_SWORD)) && + return ForestTempleClear || (HasBossSoul(PHANTOM_GANON_BOSS_SOUL) && ((CanUse(KOKIRI_SWORD) || CanUse(MASTER_SWORD) || CanUse(BIGGORON_SWORD)) && (CanUse(HOOKSHOT) || CanUse(BOW) || CanUse(SLINGSHOT)))); } }), }, diff --git a/soh/soh/Enhancements/randomizer/3drando/location_access/locacc_ganons_castle.cpp b/soh/soh/Enhancements/randomizer/3drando/location_access/locacc_ganons_castle.cpp index ebb8625ec..2a95e8f9e 100644 --- a/soh/soh/Enhancements/randomizer/3drando/location_access/locacc_ganons_castle.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/location_access/locacc_ganons_castle.cpp @@ -114,7 +114,7 @@ void AreaTable_Init_GanonsCastle() { //Locations LocationAccess(GANONS_TOWER_BOSS_KEY_CHEST, {[]{return true;}}), LocationAccess(GANONDORF_HINT, {[]{return BossKeyGanonsCastle;}}), - LocationAccess(GANON, {[]{return BossKeyGanonsCastle && CanUse(LIGHT_ARROWS);}}), + LocationAccess(GANON, {[]{return HasBossSoul(GANON_BOSS_SOUL) && BossKeyGanonsCastle && CanUse(LIGHT_ARROWS);}}), }, {}); /*--------------------------- diff --git a/soh/soh/Enhancements/randomizer/3drando/location_access/locacc_jabujabus_belly.cpp b/soh/soh/Enhancements/randomizer/3drando/location_access/locacc_jabujabus_belly.cpp index 0a14e9257..66b6b35d5 100644 --- a/soh/soh/Enhancements/randomizer/3drando/location_access/locacc_jabujabus_belly.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/location_access/locacc_jabujabus_belly.cpp @@ -235,7 +235,7 @@ void AreaTable_Init_JabuJabusBelly() { { // Events //todo: add pot kill trick EventAccess(&JabuJabusBellyClear, - { [] { return JabuJabusBellyClear || (CanSummonBarinade && (CanUse(BOOMERANG) && CanJumpslash)); } }), + { [] { return JabuJabusBellyClear || (HasBossSoul(BARINADE_BOSS_SOUL) && (CanUse(BOOMERANG) && CanJumpslash)); } }), }, { // Locations diff --git a/soh/soh/Enhancements/randomizer/3drando/location_access/locacc_shadow_temple.cpp b/soh/soh/Enhancements/randomizer/3drando/location_access/locacc_shadow_temple.cpp index 4b3786ec1..bd16b93a4 100644 --- a/soh/soh/Enhancements/randomizer/3drando/location_access/locacc_shadow_temple.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/location_access/locacc_shadow_temple.cpp @@ -194,7 +194,7 @@ void AreaTable_Init_ShadowTemple() { { // Events EventAccess(&ShadowTempleClear, { [] { - return ShadowTempleClear || (CanSummonBongoBongo && + return ShadowTempleClear || (HasBossSoul(BONGO_BONGO_BOSS_SOUL) && ((CanUse(LENS_OF_TRUTH) || LogicLensBongo) && (CanUse(KOKIRI_SWORD) || CanUse(MASTER_SWORD) || CanUse(BIGGORON_SWORD)) && (CanUse(HOOKSHOT) || CanUse(BOW) || CanUse(SLINGSHOT) || LogicShadowBongo))); diff --git a/soh/soh/Enhancements/randomizer/3drando/location_access/locacc_spirit_temple.cpp b/soh/soh/Enhancements/randomizer/3drando/location_access/locacc_spirit_temple.cpp index c44ece42d..3c70fdf0b 100644 --- a/soh/soh/Enhancements/randomizer/3drando/location_access/locacc_spirit_temple.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/location_access/locacc_spirit_temple.cpp @@ -259,7 +259,7 @@ void AreaTable_Init_SpiritTemple() { { // Events EventAccess(&SpiritTempleClear, { [] { - return SpiritTempleClear || (CanSummonTwinrova && (CanUse(MIRROR_SHIELD) && + return SpiritTempleClear || (HasBossSoul(TWINROVA_BOSS_SOUL) && (CanUse(MIRROR_SHIELD) && (CanUse(KOKIRI_SWORD) || CanUse(MASTER_SWORD) || CanUse(BIGGORON_SWORD)))); } }), }, diff --git a/soh/soh/Enhancements/randomizer/3drando/location_access/locacc_water_temple.cpp b/soh/soh/Enhancements/randomizer/3drando/location_access/locacc_water_temple.cpp index c8905b78e..3dad7cdf1 100644 --- a/soh/soh/Enhancements/randomizer/3drando/location_access/locacc_water_temple.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/location_access/locacc_water_temple.cpp @@ -318,14 +318,14 @@ void AreaTable_Init_WaterTemple() { { // Events EventAccess(&WaterTempleClear, { [] { - return WaterTempleClear || (CanSummonMorpha && + return WaterTempleClear || (HasBossSoul(MORPHA_BOSS_SOUL) && (CanUse(HOOKSHOT) && (CanUse(KOKIRI_SWORD) || CanUse(MASTER_SWORD) || CanUse(BIGGORON_SWORD)))); } }), }, { // Locations LocationAccess(WATER_TEMPLE_MORPHA_HEART, { [] { return WaterTempleClear; } }), - LocationAccess(MORPHA, { [] { return CanSummonMorpha && WaterTempleClear; } }), + LocationAccess(MORPHA, { [] { return WaterTempleClear; } }), }, { // Exits diff --git a/soh/soh/Enhancements/randomizer/3drando/logic.cpp b/soh/soh/Enhancements/randomizer/3drando/logic.cpp index fe79cae67..e163b6c69 100644 --- a/soh/soh/Enhancements/randomizer/3drando/logic.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/logic.cpp @@ -478,6 +478,9 @@ namespace Logic { if (ShuffleBossSouls.Is(BOSSSOULS_OFF)) { return true; } + if (ShuffleBossSouls.IsNot(BOSSSOULS_ON_PLUS_GANON) && itemName == GANON_BOSS_SOUL) { + return true; + } return (itemName == GOHMA_BOSS_SOUL && CanSummonGohma) || (itemName == KING_DODONGO_BOSS_SOUL && CanSummonKingDodongo) || (itemName == BARINADE_BOSS_SOUL && CanSummonBarinade) || @@ -651,15 +654,6 @@ namespace Logic { (LACSCondition == LACSCONDITION_DUNGEONS && DungeonCount + (Greg && GregInLogic ? 1 : 0) >= LACSDungeonCount.Value()) || (LACSCondition == LACSCONDITION_TOKENS && GoldSkulltulaTokens >= LACSTokenCount.Value()); CanCompleteTriforce = TriforcePieces >= TriforceHuntRequired.Value(); - CanSummonGohma = HasBossSoul(GOHMA_BOSS_SOUL); - CanSummonKingDodongo = HasBossSoul(KING_DODONGO_BOSS_SOUL); - CanSummonBarinade = HasBossSoul(BARINADE_BOSS_SOUL); - CanSummonPhantomGanon = HasBossSoul(PHANTOM_GANON_BOSS_SOUL); - CanSummonVolvagia = HasBossSoul(VOLVAGIA_BOSS_SOUL); - CanSummonMorpha = HasBossSoul(MORPHA_BOSS_SOUL); - CanSummonBongoBongo = HasBossSoul(BONGO_BONGO_BOSS_SOUL); - CanSummonTwinrova = HasBossSoul(TWINROVA_BOSS_SOUL); - CanSummonGanon = HasBossSoul(GANON_BOSS_SOUL); } diff --git a/soh/soh/Enhancements/randomizer/3drando/logic.hpp b/soh/soh/Enhancements/randomizer/3drando/logic.hpp index a58338899..37b56858a 100644 --- a/soh/soh/Enhancements/randomizer/3drando/logic.hpp +++ b/soh/soh/Enhancements/randomizer/3drando/logic.hpp @@ -377,6 +377,7 @@ void UpdateHelpers(); bool CanPlay(bool song); bool CanUse(uint32_t itemName); bool HasProjectile(HasProjectileAge age); +bool HasBossSoul(uint32_t itemName); bool SmallKeys(Key dungeon, uint8_t requiredAmount); bool SmallKeys(Key dungeon, uint8_t requiredAmountGlitchless, uint8_t requiredAmountGlitched); bool CanDoGlitch(GlitchType glitch);