[Rando] Adds Greg options to the Bridge and LACS reward options (#2663)

* Some reason not working

* Fixes and formatting

Moved the LACS Stones to be before the Medallions in all instances to line up with the Bridge requirements and because it just makes sense

* Removed unnecessary space

* Missed one
This commit is contained in:
Patrick12115
2023-05-30 14:25:59 -04:00
committed by GitHub
parent 507387f618
commit f544aba647
12 changed files with 400 additions and 81 deletions

View File

@@ -122,6 +122,7 @@ namespace Logic {
//Greg
bool Greg = false;
bool GregInLogic = false;
//Progressive Items
uint8_t ProgressiveBulletBag = 0;
@@ -292,8 +293,8 @@ namespace Logic {
bool CanUseMagicArrow = false;
//Bridge and LACS Requirements
uint8_t MedallionCount = 0;
uint8_t StoneCount = 0;
uint8_t MedallionCount = 0;
uint8_t DungeonCount = 0;
bool HasAllStones = false;
bool HasAllMedallions = false;
@@ -778,21 +779,22 @@ namespace Logic {
DungeonCount = (DekuTreeClear ? 1:0) + (DodongosCavernClear ? 1:0) + (JabuJabusBellyClear ? 1:0) + (ForestTempleClear ? 1:0) + (FireTempleClear ? 1:0) + (WaterTempleClear ? 1:0) + (SpiritTempleClear ? 1:0) + (ShadowTempleClear ? 1:0);
HasAllStones = StoneCount == 3;
HasAllMedallions = MedallionCount == 6;
GregInLogic = BridgeRewardOptions.Is(BRIDGE_OPTION_GREG) || LACSRewardOptions.Is(LACS_OPTION_GREG);
CanBuildRainbowBridge = Bridge.Is(RAINBOWBRIDGE_OPEN) ||
(Bridge.Is(RAINBOWBRIDGE_VANILLA) && ShadowMedallion && SpiritMedallion && LightArrows) ||
(Bridge.Is(RAINBOWBRIDGE_STONES) && StoneCount >= BridgeStoneCount.Value<uint8_t>()) ||
(Bridge.Is(RAINBOWBRIDGE_MEDALLIONS) && MedallionCount >= BridgeMedallionCount.Value<uint8_t>()) ||
(Bridge.Is(RAINBOWBRIDGE_REWARDS) && StoneCount + MedallionCount >= BridgeRewardCount.Value<uint8_t>()) ||
(Bridge.Is(RAINBOWBRIDGE_DUNGEONS) && DungeonCount >= BridgeDungeonCount.Value<uint8_t>()) ||
(Bridge.Is(RAINBOWBRIDGE_STONES) && StoneCount + (Greg && GregInLogic ? 1 : 0) >= BridgeStoneCount.Value<uint8_t>()) ||
(Bridge.Is(RAINBOWBRIDGE_MEDALLIONS) && MedallionCount + (Greg && GregInLogic ? 1 : 0) >= BridgeMedallionCount.Value<uint8_t>()) ||
(Bridge.Is(RAINBOWBRIDGE_REWARDS) && StoneCount + MedallionCount + (Greg && GregInLogic ? 1 : 0) >= BridgeRewardCount.Value<uint8_t>()) ||
(Bridge.Is(RAINBOWBRIDGE_DUNGEONS) && DungeonCount + (Greg && GregInLogic ? 1 : 0) >= BridgeDungeonCount.Value<uint8_t>()) ||
(Bridge.Is(RAINBOWBRIDGE_TOKENS) && GoldSkulltulaTokens >= BridgeTokenCount.Value<uint8_t>()) ||
(Bridge.Is(RAINBOWBRIDGE_GREG) && Greg);
CanTriggerLACS = (LACSCondition == LACSCONDITION_VANILLA && ShadowMedallion && SpiritMedallion) ||
(LACSCondition == LACSCONDITION_STONES && StoneCount >= LACSStoneCount.Value<uint8_t>()) ||
(LACSCondition == LACSCONDITION_MEDALLIONS && MedallionCount >= LACSMedallionCount.Value<uint8_t>()) ||
(LACSCondition == LACSCONDITION_REWARDS && StoneCount + MedallionCount >= LACSRewardCount.Value<uint8_t>()) ||
(LACSCondition == LACSCONDITION_DUNGEONS && DungeonCount >= LACSDungeonCount.Value<uint8_t>()) ||
(LACSCondition == LACSCONDITION_STONES && StoneCount + (Greg && GregInLogic ? 1 : 0) >= LACSStoneCount.Value<uint8_t>()) ||
(LACSCondition == LACSCONDITION_MEDALLIONS && MedallionCount + (Greg && GregInLogic ? 1 : 0) >= LACSMedallionCount.Value<uint8_t>()) ||
(LACSCondition == LACSCONDITION_REWARDS && StoneCount + MedallionCount + (Greg && GregInLogic ? 1 : 0) >= LACSRewardCount.Value<uint8_t>()) ||
(LACSCondition == LACSCONDITION_DUNGEONS && DungeonCount + (Greg && GregInLogic ? 1 : 0) >= LACSDungeonCount.Value<uint8_t>()) ||
(LACSCondition == LACSCONDITION_TOKENS && GoldSkulltulaTokens >= LACSTokenCount.Value<uint8_t>());
}