diff --git a/src/TrackerCouncil.Smz3.Data/Logic/ILogic.cs b/src/TrackerCouncil.Smz3.Data/Logic/ILogic.cs index 116f1c067..68ff9ce48 100644 --- a/src/TrackerCouncil.Smz3.Data/Logic/ILogic.cs +++ b/src/TrackerCouncil.Smz3.Data/Logic/ILogic.cs @@ -67,4 +67,6 @@ public interface ILogic public bool CanWallJump(WallJumpDifficulty difficulty); public bool CheckAgahnim(Progression items, World world, bool requireRewards); + + public bool CanNavigateDarkWorld(Progression items); } diff --git a/src/TrackerCouncil.Smz3.Data/Logic/Logic.cs b/src/TrackerCouncil.Smz3.Data/Logic/Logic.cs index 11dc3b3d2..6e8b57114 100644 --- a/src/TrackerCouncil.Smz3.Data/Logic/Logic.cs +++ b/src/TrackerCouncil.Smz3.Data/Logic/Logic.cs @@ -16,6 +16,8 @@ public Logic(World world) public bool CanLiftLight(Progression items) => items.Glove; public bool CanLiftHeavy(Progression items) => items.Mitt; + public bool HasHeartCount(Progression items, int numberOfHearts) => items.HeartCount >= numberOfHearts; + public bool CanLightTorches(Progression items) { return items.FireRod || items.Lamp; @@ -107,9 +109,16 @@ public bool CanAccessNorfairLowerPortal(Progression items) return items.Flute && CanLiftHeavy(items); } + public bool CanNavigateDarkWorld(Progression items) + { + return items.MoonPearl && (!World.Config.LogicConfig.PreventLowResourceDarkWorld || + (HasHeartCount(items, 6) && + (items.Sword || items.Hammer || items.Bow || items.FireRod))); + } + public bool CanAccessMaridiaPortal(Progression items, bool requireRewards) { - return items.MoonPearl && items.Flippers && + return CanNavigateDarkWorld(items) && items.Flippers && items.Gravity && items.Morph && (CheckAgahnim(items, World, requireRewards) || items.Hammer && CanLiftLight(items) || CanLiftHeavy(items)); } diff --git a/src/TrackerCouncil.Smz3.Data/Logic/LogicConfig.cs b/src/TrackerCouncil.Smz3.Data/Logic/LogicConfig.cs index ae068d69e..2353738d1 100644 --- a/src/TrackerCouncil.Smz3.Data/Logic/LogicConfig.cs +++ b/src/TrackerCouncil.Smz3.Data/Logic/LogicConfig.cs @@ -76,6 +76,9 @@ public LogicConfig(bool enableAllCasOptions, bool enableAllTricks, WallJumpDiffi [DynamicFormFieldCheckBox(checkBoxText: "Include Quarter Magic", toolTipText: "Adds an additional progressive half magic to the item pool.", groupName: "CasMiddle")] public bool QuarterMagic { get; set; } + [DynamicFormFieldCheckBox(checkBoxText: "Prevent Low Resource Dark World", toolTipText: "You're expected to at least 6 hearts total and some weapon that can deal damage before going to the Dark World.", groupName: "CasMiddle")] + public bool PreventLowResourceDarkWorld { get; set; } + [YamlIgnore, Newtonsoft.Json.JsonIgnore] [DynamicFormFieldText(groupName: "TricksTop")] public string TricksDescription => "Logic settings that will make the game more difficult by requiring you to do techniques or maneuvers not typically required in the vanilla games."; diff --git a/src/TrackerCouncil.Smz3.Data/WorldData/Progression.cs b/src/TrackerCouncil.Smz3.Data/WorldData/Progression.cs index f8178cd0d..e792da811 100644 --- a/src/TrackerCouncil.Smz3.Data/WorldData/Progression.cs +++ b/src/TrackerCouncil.Smz3.Data/WorldData/Progression.cs @@ -132,6 +132,7 @@ public Progression(IEnumerable items, IEnumerable rewards, IEnumer public int CrystalCount => Rewards.Count(r => r is RewardType.CrystalBlue or RewardType.CrystalRed); public int Count => Items.Count; public bool IsReadOnly => false; + public int HeartCount => 3 + GetCount(ItemType.HeartContainer) + GetCount(ItemType.HeartContainerRefill) + GetCount(ItemType.HeartPiece) / 4; protected List Items { get; } protected List Rewards { get; } diff --git a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/DarkWorld/DarkWorldMire.cs b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/DarkWorld/DarkWorldMire.cs index 12571adc0..653ff982a 100644 --- a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/DarkWorld/DarkWorldMire.cs +++ b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/DarkWorld/DarkWorldMire.cs @@ -41,7 +41,7 @@ public MireShedRoom(Region region, IMetadataService? metadata, TrackerState? tra new Location(this, LocationId.MireShedLeft, 0x1EA73, LocationType.Regular, name: "Mire Shed - Left", vanillaItem: ItemType.HeartPiece, - access: items => items.MoonPearl, + access: items => World.Logic.CanNavigateDarkWorld(items), memoryAddress: 0x10D, memoryFlag: 0x4, metadata: metadata, @@ -49,7 +49,7 @@ public MireShedRoom(Region region, IMetadataService? metadata, TrackerState? tra new Location(this, LocationId.MireShedRight, 0x1EA76, LocationType.Regular, name: "Mire Shed - Right", vanillaItem: ItemType.TwentyRupees, - access: items => items.MoonPearl, + access: items => World.Logic.CanNavigateDarkWorld(items), memoryAddress: 0x10D, memoryFlag: 0x5, metadata: metadata, diff --git a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/DarkWorld/DarkWorldNorthEast.cs b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/DarkWorld/DarkWorldNorthEast.cs index 58f11b912..4dc57e2e6 100644 --- a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/DarkWorld/DarkWorldNorthEast.cs +++ b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/DarkWorld/DarkWorldNorthEast.cs @@ -15,7 +15,7 @@ public DarkWorldNorthEast(World world, Config config, IMetadataService? metadata Catfish = new Location(this, LocationId.Catfish, 0x1DE185, LocationType.Regular, name: "Catfish", vanillaItem: ItemType.Quake, - access: items => items.MoonPearl && Logic.CanLiftLight(items), + access: items => World.Logic.CanNavigateDarkWorld(items) && Logic.CanLiftLight(items), memoryAddress: 0x190, memoryFlag: 0x20, memoryType: LocationMemoryType.ZeldaMisc, @@ -52,7 +52,7 @@ public DarkWorldNorthEast(World world, Config config, IMetadataService? metadata public override bool CanEnter(Progression items, bool requireRewards) { return Logic.CheckAgahnim(items, World, requireRewards) || - (items.MoonPearl && ( + (World.Logic.CanNavigateDarkWorld(items) && ( (items.Hammer && Logic.CanLiftLight(items)) || (Logic.CanLiftHeavy(items) && items.Flippers) || (Logic.CanAccessDarkWorldPortal(items) && items.Flippers) @@ -94,7 +94,7 @@ public PyramidFairyChamber(Region region, IMetadataService? metadata, TrackerSta private bool CanAccessPyramidFairy(Progression items, bool requireRewards) => (items.BothRedCrystals || (!requireRewards && World.CanAquireAll(items, RewardType.CrystalRed))) && - items.MoonPearl && World.DarkWorldSouth.CanEnter(items, requireRewards) && + World.Logic.CanNavigateDarkWorld(items) && World.DarkWorldSouth.CanEnter(items, requireRewards) && (items.Hammer || (items.Mirror && Logic.CheckAgahnim(items, World, requireRewards))); } } diff --git a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/DarkWorld/DarkWorldNorthWest.cs b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/DarkWorld/DarkWorldNorthWest.cs index bf9c6c9f2..d600869ec 100644 --- a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/DarkWorld/DarkWorldNorthWest.cs +++ b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/DarkWorld/DarkWorldNorthWest.cs @@ -88,12 +88,12 @@ public DarkWorldNorthWest(World world, Config config, IMetadataService? metadata public override bool CanEnter(Progression items, bool requireRewards) { - return items.MoonPearl && ((( - Logic.CheckAgahnim(items, World, requireRewards) || - (Logic.CanAccessDarkWorldPortal(items) && items.Flippers) - ) && items.Hookshot && (items.Flippers || Logic.CanLiftLight(items) || items.Hammer)) || - (items.Hammer && Logic.CanLiftLight(items)) || - Logic.CanLiftHeavy(items) + return World.Logic.CanNavigateDarkWorld(items) && ((( + Logic.CheckAgahnim(items, World, requireRewards) || + (Logic.CanAccessDarkWorldPortal(items) && items.Flippers) + ) && items.Hookshot && (items.Flippers || Logic.CanLiftLight(items) || items.Hammer)) || + (items.Hammer && Logic.CanLiftLight(items)) || + Logic.CanLiftHeavy(items) ); } diff --git a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/DarkWorld/DarkWorldSouth.cs b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/DarkWorld/DarkWorldSouth.cs index d294b89d6..0d2c115d9 100644 --- a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/DarkWorld/DarkWorldSouth.cs +++ b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/DarkWorld/DarkWorldSouth.cs @@ -49,12 +49,12 @@ public DarkWorldSouth(World world, Config config, IMetadataService? metadata, Tr public override bool CanEnter(Progression items, bool requireRewards) { - return items.MoonPearl && ((( - Logic.CheckAgahnim(items, World, requireRewards) || - (Logic.CanAccessDarkWorldPortal(items) && items.Flippers) - ) && (items.Hammer || (items.Hookshot && (items.Flippers || Logic.CanLiftLight(items))))) || - (items.Hammer && Logic.CanLiftLight(items)) || - Logic.CanLiftHeavy(items) + return World.Logic.CanNavigateDarkWorld(items) && ((( + Logic.CheckAgahnim(items, World, requireRewards) || + (Logic.CanAccessDarkWorldPortal(items) && items.Flippers) + ) && (items.Hammer || (items.Hookshot && (items.Flippers || Logic.CanLiftLight(items))))) || + (items.Hammer && Logic.CanLiftLight(items)) || + Logic.CanLiftHeavy(items) ); } diff --git a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/DarkWorld/DeathMountain/DarkWorldDeathMountainEast.cs b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/DarkWorld/DeathMountain/DarkWorldDeathMountainEast.cs index 1049de5c7..522a03f29 100644 --- a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/DarkWorld/DeathMountain/DarkWorldDeathMountainEast.cs +++ b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/DarkWorld/DeathMountain/DarkWorldDeathMountainEast.cs @@ -44,7 +44,7 @@ public HookshotCaveRoom(Region region, IMetadataService? metadata, TrackerState? new Location(this, LocationId.HookshotCaveTopRight, 0x1EB51, LocationType.Regular, name: "Hookshot Cave - Top Right", vanillaItem: ItemType.FiftyRupees, - access: items => items.MoonPearl && items.Hookshot, + access: items => World.Logic.CanNavigateDarkWorld(items) && items.Hookshot, memoryAddress: 0x3C, memoryFlag: 0x4, metadata: metadata, @@ -52,7 +52,7 @@ public HookshotCaveRoom(Region region, IMetadataService? metadata, TrackerState? new Location(this, LocationId.HookshotCaveTopLeft, 0x1EB54, LocationType.Regular, name: "Hookshot Cave - Top Left", vanillaItem: ItemType.FiftyRupees, - access: items => items.MoonPearl && items.Hookshot, + access: items => World.Logic.CanNavigateDarkWorld(items) && items.Hookshot, memoryAddress: 0x3C, memoryFlag: 0x5, metadata: metadata, @@ -60,7 +60,7 @@ public HookshotCaveRoom(Region region, IMetadataService? metadata, TrackerState? new Location(this, LocationId.HookshotCaveBottomLeft, 0x1EB57, LocationType.Regular, name: "Hookshot Cave - Bottom Left", vanillaItem: ItemType.FiftyRupees, - access: items => items.MoonPearl && items.Hookshot, + access: items => World.Logic.CanNavigateDarkWorld(items) && items.Hookshot, memoryAddress: 0x3C, memoryFlag: 0x6, metadata: metadata, @@ -68,7 +68,7 @@ public HookshotCaveRoom(Region region, IMetadataService? metadata, TrackerState? new Location(this, LocationId.HookshotCaveBottomRight, 0x1EB5A, LocationType.Regular, name: "Hookshot Cave - Bottom Right", vanillaItem: ItemType.FiftyRupees, - access: items => items.MoonPearl && (items.Hookshot || items.Boots), + access: items => World.Logic.CanNavigateDarkWorld(items) && (items.Hookshot || items.Boots), memoryAddress: 0x3C, memoryFlag: 0x7, metadata: metadata, @@ -86,14 +86,14 @@ public SuperbunnyCaveRoom(Region region, IMetadataService? metadata, TrackerStat { new Location(this, LocationId.SuperbunnyCaveTop, 0x1EA7C, LocationType.Regular, name: "Superbunny Cave - Top", - access: items => items.MoonPearl, + access: items => World.Logic.CanNavigateDarkWorld(items), memoryAddress: 0xF8, memoryFlag: 0x4, metadata: metadata, trackerState: trackerState), new Location(this, LocationId.SuperbunnyCaveBottom, 0x1EA7F, LocationType.Regular, name: "Superbunny Cave - Bottom", - access: items => items.MoonPearl, + access: items => World.Logic.CanNavigateDarkWorld(items), memoryAddress: 0xF8, memoryFlag: 0x5, metadata: metadata, diff --git a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/DarkWorld/DeathMountain/DarkWorldDeathMountainWest.cs b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/DarkWorld/DeathMountain/DarkWorldDeathMountainWest.cs index 8d9b955c1..4e300e301 100644 --- a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/DarkWorld/DeathMountain/DarkWorldDeathMountainWest.cs +++ b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/DarkWorld/DeathMountain/DarkWorldDeathMountainWest.cs @@ -35,7 +35,7 @@ public SpikeCaveRoom(Region region, IMetadataService? metadata, TrackerState? tr { new Location(this, LocationId.SpikeCave, 0x1EA8B, LocationType.Regular, name: "Spike Cave", - access: items => items.MoonPearl && items.Hammer && Logic.CanLiftLight(items) && + access: items => World.Logic.CanNavigateDarkWorld(items) && items.Hammer && Logic.CanLiftLight(items) && ((Logic.CanExtendMagic(items, 2) && items.Cape) || items.Byrna) && World.LightWorldDeathMountainWest.CanEnter(items, true), memoryAddress: 0x117, diff --git a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/GanonsTower.cs b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/GanonsTower.cs index 4e444cb38..7926705be 100644 --- a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/GanonsTower.cs +++ b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/GanonsTower.cs @@ -170,7 +170,7 @@ public override bool CanEnter(Progression items, bool requireRewards) var haveEnoughCrystals = items.CrystalCount >= Config.GanonsTowerCrystalCount; var gtOpenBeforeGanon = Config.GanonsTowerCrystalCount < Config.GanonCrystalCount; var canBeatMetroid = World.CanDefeatBossCount(items, smBosses) >= Config.TourianBossCount; - return items.MoonPearl && canEnterDDMEast && haveEnoughCrystals && (gtOpenBeforeGanon || canBeatMetroid); + return World.Logic.CanNavigateDarkWorld(items) && canEnterDDMEast && haveEnoughCrystals && (gtOpenBeforeGanon || canBeatMetroid); } public override bool CanFill(Item item, Progression items) diff --git a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/IcePalace.cs b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/IcePalace.cs index a203b4dbb..d0eeb2299 100644 --- a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/IcePalace.cs +++ b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/IcePalace.cs @@ -146,7 +146,7 @@ public IcePalace(World world, Config config, IMetadataService? metadata, Tracker public override bool CanEnter(Progression items, bool requireRewards) { - return items.MoonPearl && items.Flippers && Logic.CanLiftHeavy(items) && Logic.CanMeltFreezors(items); + return World.Logic.CanNavigateDarkWorld(items) && items.Flippers && Logic.CanLiftHeavy(items) && Logic.CanMeltFreezors(items); } public bool CanBeatBoss(Progression items) => KholdstareReward.IsAvailable(items); diff --git a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/LightWorld/DeathMountain/LightWorldDeathMountainEast.cs b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/LightWorld/DeathMountain/LightWorldDeathMountainEast.cs index 345ae1e57..5a861d5c9 100644 --- a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/LightWorld/DeathMountain/LightWorldDeathMountainEast.cs +++ b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/LightWorld/DeathMountain/LightWorldDeathMountainEast.cs @@ -15,7 +15,7 @@ public LightWorldDeathMountainEast(World world, Config config, IMetadataService? FloatingIsland = new Location(this, LocationId.FloatingIsland, 0x308141, LocationType.Regular, name: "Floating Island", vanillaItem: ItemType.HeartPiece, - access: items => items.Mirror && items.MoonPearl && Logic.CanLiftHeavy(items), + access: items => items.Mirror && World.Logic.CanNavigateDarkWorld(items) && Logic.CanLiftHeavy(items), memoryAddress: 0x5, memoryFlag: 0x40, memoryType: LocationMemoryType.ZeldaMisc, diff --git a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/LightWorld/LightWorldNorthWest.cs b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/LightWorld/LightWorldNorthWest.cs index 2b0bd0359..4362e3c04 100644 --- a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/LightWorld/LightWorldNorthWest.cs +++ b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/LightWorld/LightWorldNorthWest.cs @@ -66,8 +66,8 @@ public LightWorldNorthWest(World world, Config config, IMetadataService? metadat GraveyardLedge = new Location(this, LocationId.GraveyardLedge, 0x308004, LocationType.Regular, name: "Graveyard Ledge", vanillaItem: ItemType.HeartPiece, - access: items => items.Mirror && items.MoonPearl && World.DarkWorldNorthWest.CanEnter(items, true), - relevanceRequirement: items => items.Mirror && items.MoonPearl && World.DarkWorldNorthWest.CanEnter(items, false), + access: items => items.Mirror && World.Logic.CanNavigateDarkWorld(items) && World.DarkWorldNorthWest.CanEnter(items, true), + relevanceRequirement: items => items.Mirror && World.Logic.CanNavigateDarkWorld(items) && World.DarkWorldNorthWest.CanEnter(items, false), memoryAddress: 0x11B, memoryFlag: 0x9, metadata: metadata, @@ -78,10 +78,10 @@ public LightWorldNorthWest(World world, Config config, IMetadataService? metadat vanillaItem: ItemType.Cape, access: items => items.Boots && ( Logic.CanLiftHeavy(items) || - (items.Mirror && items.MoonPearl && World.DarkWorldNorthWest.CanEnter(items, true))), + (items.Mirror && World.Logic.CanNavigateDarkWorld(items) && World.DarkWorldNorthWest.CanEnter(items, true))), relevanceRequirement: items => items.Boots && ( Logic.CanLiftHeavy(items) || - (items.Mirror && items.MoonPearl && World.DarkWorldNorthWest.CanEnter(items, false))), + (items.Mirror && World.Logic.CanNavigateDarkWorld(items) && World.DarkWorldNorthWest.CanEnter(items, false))), memoryAddress: 0x113, memoryFlag: 0x4, metadata: metadata, @@ -141,7 +141,7 @@ public LightWorldNorthWest(World world, Config config, IMetadataService? metadat vanillaItem: ItemType.HalfMagic, access: items => items.Powder && (items.Hammer - || (items.MoonPearl && items.Mirror && Logic.CanLiftHeavy(items))), + || (World.Logic.CanNavigateDarkWorld(items) && items.Mirror && Logic.CanLiftHeavy(items))), memoryAddress: 0x191, memoryFlag: 0x80, memoryType: LocationMemoryType.ZeldaMisc, diff --git a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/LightWorld/LightWorldSouth.cs b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/LightWorld/LightWorldSouth.cs index 5c0d836a3..a9ea0c42a 100644 --- a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/LightWorld/LightWorldSouth.cs +++ b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/LightWorld/LightWorldSouth.cs @@ -108,10 +108,10 @@ public LightWorldSouth(World world, Config config, IMetadataService? metadata, T LakeHyliaIsland = new Location(this, LocationId.LakeHyliaIsland, 0x308144, LocationType.Regular, name: "Lake Hylia Island", vanillaItem: ItemType.HeartPiece, - access: items => items.Flippers && items.MoonPearl && items.Mirror && ( + access: items => items.Flippers && World.Logic.CanNavigateDarkWorld(items) && items.Mirror && ( World.DarkWorldSouth.CanEnter(items, true) || World.DarkWorldNorthEast.CanEnter(items, true)), - relevanceRequirement: items => items.Flippers && items.MoonPearl && items.Mirror && ( + relevanceRequirement: items => items.Flippers && World.Logic.CanNavigateDarkWorld(items) && items.Mirror && ( World.DarkWorldSouth.CanEnter(items, false) || World.DarkWorldNorthEast.CanEnter(items, false)), memoryAddress: 0x35, diff --git a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/MiseryMire.cs b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/MiseryMire.cs index a7e29cc5a..117661b36 100644 --- a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/MiseryMire.cs +++ b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/MiseryMire.cs @@ -160,7 +160,7 @@ public MiseryMire(World world, Config config, IMetadataService? metadata, Tracke // Need "CanKillManyEnemies" if implementing swordless public override bool CanEnter(Progression items, bool requireRewards) { - return items.Contains(PrerequisiteState.RequiredItem) && items is { Sword: true, MoonPearl: true } && + return items.Contains(PrerequisiteState.RequiredItem) && items.Sword && World.Logic.CanNavigateDarkWorld(items) && (items.Boots || items.Hookshot) && World.DarkWorldMire.CanEnter(items, requireRewards); } diff --git a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/PalaceOfDarkness.cs b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/PalaceOfDarkness.cs index 429d25588..cd08f83a4 100644 --- a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/PalaceOfDarkness.cs +++ b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/PalaceOfDarkness.cs @@ -176,7 +176,7 @@ public PalaceOfDarkness(World world, Config config, IMetadataService? metadata, public override bool CanEnter(Progression items, bool requireRewards) { - return items.MoonPearl && World.DarkWorldNorthEast.CanEnter(items, requireRewards); + return World.Logic.CanNavigateDarkWorld(items) && World.DarkWorldNorthEast.CanEnter(items, requireRewards); } public bool CanBeatBoss(Progression items) => HelmasaurKingReward.IsAvailable(items); diff --git a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/SkullWoods.cs b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/SkullWoods.cs index 3386b97e6..201119875 100644 --- a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/SkullWoods.cs +++ b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/SkullWoods.cs @@ -140,7 +140,7 @@ public SkullWoods(World world, Config config, IMetadataService? metadata, Tracke public override bool CanEnter(Progression items, bool requireRewards) { - return items.MoonPearl && World.DarkWorldNorthWest.CanEnter(items, requireRewards); + return World.Logic.CanNavigateDarkWorld(items) && World.DarkWorldNorthWest.CanEnter(items, requireRewards); } public bool CanBeatBoss(Progression items) => MothulaReward.IsAvailable(items); diff --git a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/SwampPalace.cs b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/SwampPalace.cs index 9561b8936..1f1039180 100644 --- a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/SwampPalace.cs +++ b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/SwampPalace.cs @@ -146,7 +146,7 @@ public SwampPalace(World world, Config config, IMetadataService? metadata, Track public override bool CanEnter(Progression items, bool requireRewards) { - return items.MoonPearl && items.Mirror && items.Flippers && World.DarkWorldSouth.CanEnter(items, requireRewards); + return World.Logic.CanNavigateDarkWorld(items) && items.Mirror && items.Flippers && World.DarkWorldSouth.CanEnter(items, requireRewards); } public bool CanBeatBoss(Progression items) => ArrghusReward.IsAvailable(items); diff --git a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/ThievesTown.cs b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/ThievesTown.cs index 78e1eeef8..6f6a57d0a 100644 --- a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/ThievesTown.cs +++ b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/ThievesTown.cs @@ -138,7 +138,7 @@ public ThievesTown(World world, Config config, IMetadataService? metadata, Track public override bool CanEnter(Progression items, bool requireRewards) { - return items.MoonPearl && World.DarkWorldNorthWest.CanEnter(items, requireRewards); + return World.Logic.CanNavigateDarkWorld(items) && World.DarkWorldNorthWest.CanEnter(items, requireRewards); } public bool CanBeatBoss(Progression items) =>BlindReward.IsAvailable(items); diff --git a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/TurtleRock.cs b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/TurtleRock.cs index 0abed99a3..bdd64d017 100644 --- a/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/TurtleRock.cs +++ b/src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/TurtleRock.cs @@ -144,7 +144,7 @@ public TurtleRock(World world, Config config, IMetadataService? metadata, Tracke public override bool CanEnter(Progression items, bool requireRewards) { - return items.Contains(PrerequisiteState.RequiredItem) && items.Sword && items.MoonPearl && + return items.Contains(PrerequisiteState.RequiredItem) && items.Sword && World.Logic.CanNavigateDarkWorld(items) && Logic.CanLiftHeavy(items) && items.Hammer && items.Somaria && World.LightWorldDeathMountainEast.CanEnter(items, requireRewards); } diff --git a/src/TrackerCouncil.Smz3.Data/WorldData/WorldItemPools.cs b/src/TrackerCouncil.Smz3.Data/WorldData/WorldItemPools.cs index ebe5e6ec7..0f6f9e2d8 100644 --- a/src/TrackerCouncil.Smz3.Data/WorldData/WorldItemPools.cs +++ b/src/TrackerCouncil.Smz3.Data/WorldData/WorldItemPools.cs @@ -91,7 +91,7 @@ public static List CreateNicePool(World world) itemPool.Add(new Item(ItemType.HalfMagic, world)); } - itemPool.AddRange(Copies(10, () => new Item(ItemType.HeartContainer, world))); + itemPool.AddRange(Copies(7, () => new Item(ItemType.HeartContainer, world))); return itemPool; } @@ -265,6 +265,10 @@ public static List CreateProgressionPool(World world) new Item(ItemType.ReserveTank, world, isProgression: true), new Item(ItemType.ReserveTank, world, isProgression: true), + new Item(ItemType.HeartContainer, world, isProgression: true), + new Item(ItemType.HeartContainer, world, isProgression: true), + new Item(ItemType.HeartContainer, world, isProgression: true), + new Item(ItemType.ThreeHundredRupees, world, isProgression: true), new Item(ItemType.ThreeHundredRupees, world, isProgression: true), };