logic: remove commented glitched key logic

this code is obsolete with glitch logic being implemented as tricks
This commit is contained in:
Demur Rumed 2025-07-05 16:28:10 +00:00
commit 167c167712
4 changed files with 7 additions and 2508 deletions

View file

@ -617,7 +617,7 @@ void Region::ResetVariables() {
bool Region::MQSpiritShared(ConditionFn condition, bool IsBrokenWall, bool anyAge) {
// if we have Certain Access as child, we can check anyAge and if true, resolve a condition with Here as if
// adult is here it's also Certain Access
if (logic->SmallKeys(RR_SPIRIT_TEMPLE, 7)) {
if (logic->SmallKeys(SCENE_SPIRIT_TEMPLE, 7)) {
if (anyAge) {
return Here(condition);
}
@ -627,10 +627,9 @@ bool Region::MQSpiritShared(ConditionFn condition, bool IsBrokenWall, bool anyAg
} else if (Adult() && logic->IsAdult) {
return condition();
// if we do not have Certain Access, we need to check the overlap by seeing if we are both here as child and
// meet the adult universe's access condition We only need to do it as child, as only child access matters
// meet the adult universe's access condition. We only need to do it as child, as only child access matters
// for this check, as adult access is assumed based on keys
} else if (Child() && logic->IsChild && (!IsBrokenWall || logic->SmallKeys(RR_SPIRIT_TEMPLE, 6))) {
bool result = false;
} else if (Child() && logic->IsChild && (!IsBrokenWall || logic->SmallKeys(SCENE_SPIRIT_TEMPLE, 6))) {
// store current age variables
bool pastAdult = logic->IsAdult;
bool pastChild = logic->IsChild;
@ -638,7 +637,7 @@ bool Region::MQSpiritShared(ConditionFn condition, bool IsBrokenWall, bool anyAg
// First check if the check is possible as child
logic->IsChild = true;
logic->IsAdult = false;
result = condition();
bool result = condition();
// If so, check again as adult. both have to be true for result to be true
if (result) {
logic->IsChild = false;

View file

@ -1366,80 +1366,11 @@ bool Logic::CanTriggerLACS() {
(ctx->LACSCondition() == RO_LACS_TOKENS && GetGSCount() >= ctx->GetOption(RSK_LACS_TOKEN_COUNT).Get());
}
bool Logic::SmallKeys(RandomizerRegion dungeon, uint8_t requiredAmount) {
return SmallKeys(dungeon, requiredAmount, requiredAmount);
}
bool Logic::SmallKeys(RandomizerRegion dungeon, uint8_t requiredAmountGlitchless, uint8_t requiredAmountGlitched) {
bool Logic::SmallKeys(s16 scene, uint8_t requiredAmount) {
if (HasItem(RG_SKELETON_KEY)) {
return true;
}
switch (dungeon) {
case RR_FOREST_TEMPLE:
/*if (IsGlitched && (GetDifficultyValueFromString(GlitchHookshotJump_Boots) >=
static_cast<uint8_t>(GlitchDifficulty::INTERMEDIATE) || GetDifficultyValueFromString(GlitchHoverBoost) >=
static_cast<uint8_t>(GlitchDifficulty::NOVICE) || (GetDifficultyValueFromString(GlitchHover) >=
static_cast<uint8_t>(GlitchDifficulty::NOVICE) && GetDifficultyValueFromString(GlitchISG) >=
static_cast<uint8_t>(GlitchDifficulty::INTERMEDIATE)))) { return ForestTempleKeys >= requiredAmountGlitched;
}*/
return GetSmallKeyCount(SCENE_FOREST_TEMPLE) >= requiredAmountGlitchless;
case RR_FIRE_TEMPLE:
/*if (IsGlitched && (GetDifficultyValueFromString(GlitchLedgeClip) >=
static_cast<uint8_t>(GlitchDifficulty::INTERMEDIATE) || GetDifficultyValueFromString(GlitchHover) >=
static_cast<uint8_t>(GlitchDifficulty::INTERMEDIATE))) { return FireTempleKeys >= requiredAmountGlitched;
}*/
// If the Fire Temple loop lock is removed, Small key Count is set to 1 before starting
return GetSmallKeyCount(SCENE_FIRE_TEMPLE) >= requiredAmountGlitchless;
case RR_WATER_TEMPLE:
/*if (IsGlitched && (false)) {
return WaterTempleKeys >= requiredAmountGlitched;
}*/
return GetSmallKeyCount(SCENE_WATER_TEMPLE) >= requiredAmountGlitchless;
case RR_SPIRIT_TEMPLE:
/*if (IsGlitched && (false)) {
return SpiritTempleKeys >= requiredAmountGlitched;
}*/
return GetSmallKeyCount(SCENE_SPIRIT_TEMPLE) >= requiredAmountGlitchless;
case RR_SHADOW_TEMPLE:
/*if (IsGlitched && (GetDifficultyValueFromString(GlitchHookshotClip) >=
static_cast<uint8_t>(GlitchDifficulty::NOVICE))) { return ShadowTempleKeys >= requiredAmountGlitched;
}*/
return GetSmallKeyCount(SCENE_SHADOW_TEMPLE) >= requiredAmountGlitchless;
case RR_BOTTOM_OF_THE_WELL:
/*if (IsGlitched && (false)) {
return BottomOfTheWellKeys >= requiredAmountGlitched;
}*/
return GetSmallKeyCount(SCENE_BOTTOM_OF_THE_WELL) >= requiredAmountGlitchless;
case RR_GERUDO_TRAINING_GROUND:
/*if (IsGlitched && (false)) {
return GerudoTrainingGroundsKeys >= requiredAmountGlitched;
}*/
return GetSmallKeyCount(SCENE_GERUDO_TRAINING_GROUND) >= requiredAmountGlitchless;
case RR_GANONS_CASTLE:
/*if (IsGlitched && (false)) {
return GanonsCastleKeys >= requiredAmountGlitched;
}*/
return GetSmallKeyCount(SCENE_INSIDE_GANONS_CASTLE) >= requiredAmountGlitchless;
case RR_MARKET_TREASURE_CHEST_GAME:
/*if (IsGlitched && (false)) {
return TreasureGameKeys >= requiredAmountGlitched;
}*/
return GetSmallKeyCount(SCENE_TREASURE_BOX_SHOP) >= requiredAmountGlitchless;
case RR_GF_OUTSKIRTS:
return GetSmallKeyCount(SCENE_THIEVES_HIDEOUT) >= requiredAmountGlitchless;
default:
return false;
}
return GetSmallKeyCount(scene) >= requiredAmount;
}
bool Logic::IsFireLoopLocked() {

View file

@ -18,14 +18,6 @@ enum class GlitchType {
EquipSwap,
};
enum class GlitchDifficulty {
NOVICE = 1,
INTERMEDIATE,
ADVANCED,
EXPERT,
HERO,
};
class Logic {
public:
// Mask Quest
@ -189,8 +181,7 @@ class Logic {
bool HasItem(RandomizerGet itemName);
bool HasBossSoul(RandomizerGet itemName);
bool CanOpenOverworldDoor(RandomizerGet itemName);
bool SmallKeys(RandomizerRegion dungeon, uint8_t requiredAmount);
bool SmallKeys(RandomizerRegion dungeon, uint8_t requiredAmountGlitchless, uint8_t requiredAmountGlitched);
bool SmallKeys(s16 scene, uint8_t requiredAmount);
bool IsFireLoopLocked();
bool CanOpenUnderwaterChest();
bool CanDoGlitch(GlitchType glitch);

File diff suppressed because it is too large Load diff