Cleaned up soul helpers; added check for ganon soul

This commit is contained in:
Ralphie Morell 2023-10-18 20:58:09 -04:00
parent 582771ab48
commit 51e965cf7e
12 changed files with 15 additions and 19 deletions

View File

@ -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)) {

View File

@ -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)));
}}),

View File

@ -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*/

View File

@ -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

View File

@ -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))));
} }),
},

View File

@ -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);}}),
}, {});
/*---------------------------

View File

@ -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

View File

@ -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)));

View File

@ -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))));
} }),
},

View File

@ -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

View File

@ -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<uint8_t>()) ||
(LACSCondition == LACSCONDITION_TOKENS && GoldSkulltulaTokens >= LACSTokenCount.Value<uint8_t>());
CanCompleteTriforce = TriforcePieces >= TriforceHuntRequired.Value<uint8_t>();
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);
}

View File

@ -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);