mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-20 05:13:39 -07:00
logic: remove commented glitched key logic
this code is obsolete with glitch logic being implemented as tricks
This commit is contained in:
parent
b3f5318c09
commit
167c167712
4 changed files with 7 additions and 2508 deletions
|
@ -617,7 +617,7 @@ void Region::ResetVariables() {
|
||||||
bool Region::MQSpiritShared(ConditionFn condition, bool IsBrokenWall, bool anyAge) {
|
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
|
// 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
|
// adult is here it's also Certain Access
|
||||||
if (logic->SmallKeys(RR_SPIRIT_TEMPLE, 7)) {
|
if (logic->SmallKeys(SCENE_SPIRIT_TEMPLE, 7)) {
|
||||||
if (anyAge) {
|
if (anyAge) {
|
||||||
return Here(condition);
|
return Here(condition);
|
||||||
}
|
}
|
||||||
|
@ -627,10 +627,9 @@ bool Region::MQSpiritShared(ConditionFn condition, bool IsBrokenWall, bool anyAg
|
||||||
} else if (Adult() && logic->IsAdult) {
|
} else if (Adult() && logic->IsAdult) {
|
||||||
return condition();
|
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
|
// 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
|
// for this check, as adult access is assumed based on keys
|
||||||
} else if (Child() && logic->IsChild && (!IsBrokenWall || logic->SmallKeys(RR_SPIRIT_TEMPLE, 6))) {
|
} else if (Child() && logic->IsChild && (!IsBrokenWall || logic->SmallKeys(SCENE_SPIRIT_TEMPLE, 6))) {
|
||||||
bool result = false;
|
|
||||||
// store current age variables
|
// store current age variables
|
||||||
bool pastAdult = logic->IsAdult;
|
bool pastAdult = logic->IsAdult;
|
||||||
bool pastChild = logic->IsChild;
|
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
|
// First check if the check is possible as child
|
||||||
logic->IsChild = true;
|
logic->IsChild = true;
|
||||||
logic->IsAdult = false;
|
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 so, check again as adult. both have to be true for result to be true
|
||||||
if (result) {
|
if (result) {
|
||||||
logic->IsChild = false;
|
logic->IsChild = false;
|
||||||
|
|
|
@ -1366,80 +1366,11 @@ bool Logic::CanTriggerLACS() {
|
||||||
(ctx->LACSCondition() == RO_LACS_TOKENS && GetGSCount() >= ctx->GetOption(RSK_LACS_TOKEN_COUNT).Get());
|
(ctx->LACSCondition() == RO_LACS_TOKENS && GetGSCount() >= ctx->GetOption(RSK_LACS_TOKEN_COUNT).Get());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Logic::SmallKeys(RandomizerRegion dungeon, uint8_t requiredAmount) {
|
bool Logic::SmallKeys(s16 scene, uint8_t requiredAmount) {
|
||||||
return SmallKeys(dungeon, requiredAmount, requiredAmount);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Logic::SmallKeys(RandomizerRegion dungeon, uint8_t requiredAmountGlitchless, uint8_t requiredAmountGlitched) {
|
|
||||||
if (HasItem(RG_SKELETON_KEY)) {
|
if (HasItem(RG_SKELETON_KEY)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
switch (dungeon) {
|
return GetSmallKeyCount(scene) >= requiredAmount;
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Logic::IsFireLoopLocked() {
|
bool Logic::IsFireLoopLocked() {
|
||||||
|
|
|
@ -18,14 +18,6 @@ enum class GlitchType {
|
||||||
EquipSwap,
|
EquipSwap,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class GlitchDifficulty {
|
|
||||||
NOVICE = 1,
|
|
||||||
INTERMEDIATE,
|
|
||||||
ADVANCED,
|
|
||||||
EXPERT,
|
|
||||||
HERO,
|
|
||||||
};
|
|
||||||
|
|
||||||
class Logic {
|
class Logic {
|
||||||
public:
|
public:
|
||||||
// Mask Quest
|
// Mask Quest
|
||||||
|
@ -189,8 +181,7 @@ class Logic {
|
||||||
bool HasItem(RandomizerGet itemName);
|
bool HasItem(RandomizerGet itemName);
|
||||||
bool HasBossSoul(RandomizerGet itemName);
|
bool HasBossSoul(RandomizerGet itemName);
|
||||||
bool CanOpenOverworldDoor(RandomizerGet itemName);
|
bool CanOpenOverworldDoor(RandomizerGet itemName);
|
||||||
bool SmallKeys(RandomizerRegion dungeon, uint8_t requiredAmount);
|
bool SmallKeys(s16 scene, uint8_t requiredAmount);
|
||||||
bool SmallKeys(RandomizerRegion dungeon, uint8_t requiredAmountGlitchless, uint8_t requiredAmountGlitched);
|
|
||||||
bool IsFireLoopLocked();
|
bool IsFireLoopLocked();
|
||||||
bool CanOpenUnderwaterChest();
|
bool CanOpenUnderwaterChest();
|
||||||
bool CanDoGlitch(GlitchType glitch);
|
bool CanDoGlitch(GlitchType glitch);
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue