From 95687ad3e89df754b833500d63e08a63209c6fa7 Mon Sep 17 00:00:00 2001 From: ken Date: Sun, 11 Apr 2021 16:47:42 -0700 Subject: [PATCH 1/5] Zelda NMG difficulty, first pass --- Randomizer.SMZ3/Item.cs | 7 ++- Randomizer.SMZ3/Region.cs | 4 +- .../Regions/SuperMetroid/Brinstar/Kraid.cs | 2 +- .../Regions/SuperMetroid/Brinstar/Pink.cs | 6 +-- .../Regions/SuperMetroid/Brinstar/Red.cs | 4 +- .../Regions/SuperMetroid/Crateria/East.cs | 4 +- .../SuperMetroid/NorfairUpper/Crocomire.cs | 4 +- .../Regions/SuperMetroid/NorfairUpper/East.cs | 4 +- .../Regions/SuperMetroid/NorfairUpper/West.cs | 2 +- Randomizer.SMZ3/Regions/Zelda/CastleTower.cs | 7 ++- .../Zelda/DarkWorld/DeathMountain/East.cs | 20 +++++--- .../Regions/Zelda/DarkWorld/NorthWest.cs | 7 ++- Randomizer.SMZ3/Regions/Zelda/DesertPalace.cs | 2 +- .../Regions/Zelda/EasternPalace.cs | 13 +++-- Randomizer.SMZ3/Regions/Zelda/GanonsTower.cs | 6 +-- Randomizer.SMZ3/Regions/Zelda/HyruleCastle.cs | 25 ++++++---- Randomizer.SMZ3/Regions/Zelda/IcePalace.cs | 44 ++++++++++++----- .../Zelda/LightWorld/DeathMountain/West.cs | 12 +++-- .../Regions/Zelda/LightWorld/NorthEast.cs | 19 +++++--- .../Regions/Zelda/LightWorld/NorthWest.cs | 7 ++- .../Regions/Zelda/LightWorld/South.cs | 7 ++- .../Regions/Zelda/PalaceOfDarkness.cs | 47 ++++++++++++------- Randomizer.SMZ3/Regions/Zelda/TowerOfHera.cs | 7 ++- Randomizer.SMZ3/Regions/Zelda/TurtleRock.cs | 26 ++++++++-- 24 files changed, 195 insertions(+), 91 deletions(-) diff --git a/Randomizer.SMZ3/Item.cs b/Randomizer.SMZ3/Item.cs index e940f964..de995f0a 100644 --- a/Randomizer.SMZ3/Item.cs +++ b/Randomizer.SMZ3/Item.cs @@ -875,8 +875,11 @@ public static bool CanOpenRedDoors(this Progression items) { return items.Missile || items.Super; } - public static bool CanAccessNorfairUpperPortal(this Progression items) { - return items.Flute || items.CanLiftLight() && items.Lamp; + public static bool CanAccessNorfairUpperPortal(this Progression items, World world) { + return world.Config.Z3Logic switch { + Z3Logic.Normal => items.Flute || items.CanLiftLight() && items.Lamp, + _ => items.Flute || items.CanLiftLight() && (items.Lamp || items.Sword), + }; } public static bool CanAccessNorfairLowerPortal(this Progression items) { diff --git a/Randomizer.SMZ3/Region.cs b/Randomizer.SMZ3/Region.cs index eff7348e..ca40ebd1 100644 --- a/Randomizer.SMZ3/Region.cs +++ b/Randomizer.SMZ3/Region.cs @@ -36,8 +36,8 @@ public SMRegion(World world, Config config) : base(world, config) { } } abstract class Z3Region : Region { - public Z3Region(World world, Config config) - : base(world, config) { } + public Z3Logic Logic => Config.Z3Logic; + public Z3Region(World world, Config config) : base(world, config) { } } abstract class Region { diff --git a/Randomizer.SMZ3/Regions/SuperMetroid/Brinstar/Kraid.cs b/Randomizer.SMZ3/Regions/SuperMetroid/Brinstar/Kraid.cs index a11941cb..73c9cc25 100644 --- a/Randomizer.SMZ3/Regions/SuperMetroid/Brinstar/Kraid.cs +++ b/Randomizer.SMZ3/Regions/SuperMetroid/Brinstar/Kraid.cs @@ -22,7 +22,7 @@ public Kraid(World world, Config config) : base(world, config) { } public override bool CanEnter(Progression items) { - return (items.CanDestroyBombWalls() || items.SpeedBooster || items.CanAccessNorfairUpperPortal()) && + return (items.CanDestroyBombWalls() || items.SpeedBooster || items.CanAccessNorfairUpperPortal(World)) && items.Super && items.CanPassBombPassages(); } diff --git a/Randomizer.SMZ3/Regions/SuperMetroid/Brinstar/Pink.cs b/Randomizer.SMZ3/Regions/SuperMetroid/Brinstar/Pink.cs index 82203cc8..706fe03d 100644 --- a/Randomizer.SMZ3/Regions/SuperMetroid/Brinstar/Pink.cs +++ b/Randomizer.SMZ3/Regions/SuperMetroid/Brinstar/Pink.cs @@ -27,7 +27,7 @@ public Pink(World world, Config config) : base(world, config) { }), new Location(this, 25, 0x8F8676, LocationType.Visible, "Missile (green Brinstar pipe)", Logic switch { _ => new Requirement(items => items.Morph && - (items.PowerBomb || items.Super || items.CanAccessNorfairUpperPortal())) + (items.PowerBomb || items.Super || items.CanAccessNorfairUpperPortal(World))) }), new Location(this, 33, 0x8F87FA, LocationType.Visible, "Energy Tank, Waterway", Logic switch { _ => new Requirement(items => items.CanUsePowerBombs() && items.CanOpenRedDoors() && items.SpeedBooster && @@ -45,12 +45,12 @@ public override bool CanEnter(Progression items) { Normal => items.CanOpenRedDoors() && (items.CanDestroyBombWalls() || items.SpeedBooster) || items.CanUsePowerBombs() || - items.CanAccessNorfairUpperPortal() && items.Morph && items.Wave && + items.CanAccessNorfairUpperPortal(World) && items.Morph && items.Wave && (items.Ice || items.HiJump || items.SpaceJump), _ => items.CanOpenRedDoors() && (items.CanDestroyBombWalls() || items.SpeedBooster) || items.CanUsePowerBombs() || - items.CanAccessNorfairUpperPortal() && items.Morph && (items.CanOpenRedDoors() || items.Wave) && + items.CanAccessNorfairUpperPortal(World) && items.Morph && (items.CanOpenRedDoors() || items.Wave) && (items.Ice || items.HiJump || items.CanSpringBallJump() || items.CanFly()) }; } diff --git a/Randomizer.SMZ3/Regions/SuperMetroid/Brinstar/Red.cs b/Randomizer.SMZ3/Regions/SuperMetroid/Brinstar/Red.cs index 15b53809..23a6f384 100644 --- a/Randomizer.SMZ3/Regions/SuperMetroid/Brinstar/Red.cs +++ b/Randomizer.SMZ3/Regions/SuperMetroid/Brinstar/Red.cs @@ -37,10 +37,10 @@ public override bool CanEnter(Progression items) { return Logic switch { Normal => (items.CanDestroyBombWalls() || items.SpeedBooster) && items.Super && items.Morph || - items.CanAccessNorfairUpperPortal() && (items.Ice || items.HiJump || items.SpaceJump), + items.CanAccessNorfairUpperPortal(World) && (items.Ice || items.HiJump || items.SpaceJump), _ => (items.CanDestroyBombWalls() || items.SpeedBooster) && items.Super && items.Morph || - items.CanAccessNorfairUpperPortal() && (items.Ice || items.CanSpringBallJump() || items.HiJump || items.CanFly()) + items.CanAccessNorfairUpperPortal(World) && (items.Ice || items.CanSpringBallJump() || items.HiJump || items.CanFly()) }; } diff --git a/Randomizer.SMZ3/Regions/SuperMetroid/Crateria/East.cs b/Randomizer.SMZ3/Regions/SuperMetroid/Crateria/East.cs index 2ed0752f..d3b64c49 100644 --- a/Randomizer.SMZ3/Regions/SuperMetroid/Crateria/East.cs +++ b/Randomizer.SMZ3/Regions/SuperMetroid/Crateria/East.cs @@ -35,7 +35,7 @@ public override bool CanEnter(Progression items) { /* Ship -> Moat */ (Config.Keysanity ? items.CardCrateriaL2 : items.CanUsePowerBombs()) && items.Super || /* UN Portal -> Red Tower -> Moat */ - (Config.Keysanity ? items.CardCrateriaL2 : items.CanUsePowerBombs()) && items.CanAccessNorfairUpperPortal() && + (Config.Keysanity ? items.CardCrateriaL2 : items.CanUsePowerBombs()) && items.CanAccessNorfairUpperPortal(World) && (items.Ice || items.HiJump || items.SpaceJump) || /*Through Maridia From Portal*/ items.CanAccessMaridiaPortal(World) && items.Gravity && items.Super && ( @@ -50,7 +50,7 @@ public override bool CanEnter(Progression items) { /* Ship -> Moat */ (Config.Keysanity ? items.CardCrateriaL2 : items.CanUsePowerBombs()) && items.Super || /* UN Portal -> Red Tower -> Moat */ - (Config.Keysanity ? items.CardCrateriaL2 : items.CanUsePowerBombs()) && items.CanAccessNorfairUpperPortal() && + (Config.Keysanity ? items.CardCrateriaL2 : items.CanUsePowerBombs()) && items.CanAccessNorfairUpperPortal(World) && (items.Ice || items.HiJump || items.CanFly() || items.CanSpringBallJump()) || /*Through Maridia From Portal*/ items.CanAccessMaridiaPortal(World) && ( diff --git a/Randomizer.SMZ3/Regions/SuperMetroid/NorfairUpper/Crocomire.cs b/Randomizer.SMZ3/Regions/SuperMetroid/NorfairUpper/Crocomire.cs index 8a94c47f..674950d2 100644 --- a/Randomizer.SMZ3/Regions/SuperMetroid/NorfairUpper/Crocomire.cs +++ b/Randomizer.SMZ3/Regions/SuperMetroid/NorfairUpper/Crocomire.cs @@ -46,7 +46,7 @@ public override bool CanEnter(Progression items) { return Logic switch { Normal => ( (items.CanDestroyBombWalls() || items.SpeedBooster) && items.Super && items.Morph || - items.CanAccessNorfairUpperPortal() + items.CanAccessNorfairUpperPortal(World) ) && items.Varia && ( /* Ice Beam -> Croc Speedway */ @@ -64,7 +64,7 @@ public override bool CanEnter(Progression items) { ), _ => ( (items.CanDestroyBombWalls() || items.SpeedBooster) && items.Super && items.Morph || - items.CanAccessNorfairUpperPortal() + items.CanAccessNorfairUpperPortal(World) ) && ( /* Ice Beam -> Croc Speedway */ (Config.Keysanity ? items.CardNorfairL1 : items.Super) && items.CanUsePowerBombs() && diff --git a/Randomizer.SMZ3/Regions/SuperMetroid/NorfairUpper/East.cs b/Randomizer.SMZ3/Regions/SuperMetroid/NorfairUpper/East.cs index e9cf5367..030d6d84 100644 --- a/Randomizer.SMZ3/Regions/SuperMetroid/NorfairUpper/East.cs +++ b/Randomizer.SMZ3/Regions/SuperMetroid/NorfairUpper/East.cs @@ -83,7 +83,7 @@ public override bool CanEnter(Progression items) { return Logic switch { Normal => ( (items.CanDestroyBombWalls() || items.SpeedBooster) && items.Super && items.Morph || - items.CanAccessNorfairUpperPortal() + items.CanAccessNorfairUpperPortal(World) ) && items.Varia && items.Super && ( /* Cathedral */ items.CanOpenRedDoors() && (Config.Keysanity ? items.CardNorfairL2 : items.Super) && @@ -93,7 +93,7 @@ public override bool CanEnter(Progression items) { ), _ => ( (items.CanDestroyBombWalls() || items.SpeedBooster) && items.Super && items.Morph || - items.CanAccessNorfairUpperPortal() + items.CanAccessNorfairUpperPortal(World) ) && items.CanHellRun() && ( /* Cathedral */ diff --git a/Randomizer.SMZ3/Regions/SuperMetroid/NorfairUpper/West.cs b/Randomizer.SMZ3/Regions/SuperMetroid/NorfairUpper/West.cs index c3407746..9cec83eb 100644 --- a/Randomizer.SMZ3/Regions/SuperMetroid/NorfairUpper/West.cs +++ b/Randomizer.SMZ3/Regions/SuperMetroid/NorfairUpper/West.cs @@ -49,7 +49,7 @@ public West(World world, Config config) : base(world, config) { public override bool CanEnter(Progression items) { return (items.CanDestroyBombWalls() || items.SpeedBooster) && items.Super && items.Morph || - items.CanAccessNorfairUpperPortal(); + items.CanAccessNorfairUpperPortal(World); } } diff --git a/Randomizer.SMZ3/Regions/Zelda/CastleTower.cs b/Randomizer.SMZ3/Regions/Zelda/CastleTower.cs index 69211be7..b3467fdb 100644 --- a/Randomizer.SMZ3/Regions/Zelda/CastleTower.cs +++ b/Randomizer.SMZ3/Regions/Zelda/CastleTower.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using static Randomizer.SMZ3.Z3Logic; using static Randomizer.SMZ3.ItemType; namespace Randomizer.SMZ3.Regions.Zelda { @@ -14,8 +15,10 @@ public CastleTower(World world, Config config) : base(world, config) { Locations = new List { new Location(this, 256+101, 0x1EAB5, LocationType.Regular, "Castle Tower - Foyer"), - new Location(this, 256+102, 0x1EAB2, LocationType.Regular, "Castle Tower - Dark Maze", - items => items.Lamp && items.KeyCT >= 1), + new Location(this, 256+102, 0x1EAB2, LocationType.Regular, "Castle Tower - Dark Maze", Logic switch { + Normal => items => items.Lamp && items.KeyCT >= 1, + _ => new Requirement(items => (items.Lamp || items.Firerod) && items.KeyCT >= 1), + }) }; } diff --git a/Randomizer.SMZ3/Regions/Zelda/DarkWorld/DeathMountain/East.cs b/Randomizer.SMZ3/Regions/Zelda/DarkWorld/DeathMountain/East.cs index 8d34769d..eeeacd0a 100644 --- a/Randomizer.SMZ3/Regions/Zelda/DarkWorld/DeathMountain/East.cs +++ b/Randomizer.SMZ3/Regions/Zelda/DarkWorld/DeathMountain/East.cs @@ -1,4 +1,6 @@ using System.Collections.Generic; +using static Randomizer.SMZ3.Z3Logic; +using static Randomizer.SMZ3.ItemType; namespace Randomizer.SMZ3.Regions.Zelda.DarkWorld.DeathMountain { @@ -15,12 +17,18 @@ public East(World world, Config config) : base(world, config) { items => items.MoonPearl && items.Hookshot), new Location(this, 256+67, 0x1EB57, LocationType.Regular, "Hookshot Cave - Bottom Left", items => items.MoonPearl && items.Hookshot), - new Location(this, 256+68, 0x1EB5A, LocationType.Regular, "Hookshot Cave - Bottom Right", - items => items.MoonPearl && (items.Hookshot || items.Boots)), - new Location(this, 256+69, 0x1EA7C, LocationType.Regular, "Superbunny Cave - Top", - items => items.MoonPearl), - new Location(this, 256+70, 0x1EA7F, LocationType.Regular, "Superbunny Cave - Bottom", - items => items.MoonPearl), + new Location(this, 256+68, 0x1EB5A, LocationType.Regular, "Hookshot Cave - Bottom Right", Logic switch { + Normal => items => items.MoonPearl && items.Hookshot, + _ => new Requirement(items => items.MoonPearl && (items.Hookshot || items.Boots)), + }), + new Location(this, 256+69, 0x1EA7C, LocationType.Regular, "Superbunny Cave - Top", Logic switch { + Normal => items => items.MoonPearl, + _ => new Requirement(items => true), + }), + new Location(this, 256+70, 0x1EA7F, LocationType.Regular, "Superbunny Cave - Bottom", Logic switch { + Normal => items => items.MoonPearl, + _ => new Requirement(items => true), + }), }; } diff --git a/Randomizer.SMZ3/Regions/Zelda/DarkWorld/NorthWest.cs b/Randomizer.SMZ3/Regions/Zelda/DarkWorld/NorthWest.cs index 14021e90..fd206531 100644 --- a/Randomizer.SMZ3/Regions/Zelda/DarkWorld/NorthWest.cs +++ b/Randomizer.SMZ3/Regions/Zelda/DarkWorld/NorthWest.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using static Randomizer.SMZ3.Z3Logic; using static Randomizer.SMZ3.RewardType; namespace Randomizer.SMZ3.Regions.Zelda.DarkWorld { @@ -10,8 +11,10 @@ class NorthWest : Z3Region { public NorthWest(World world, Config config) : base(world, config) { Locations = new List { - new Location(this, 256+71, 0x308146, LocationType.Regular, "Bumper Cave", - items => items.CanLiftLight() && items.Cape), + new Location(this, 256+71, 0x308146, LocationType.Regular, "Bumper Cave", Logic switch { + Normal => items => items.CanLiftLight() && items.Hookshot && items.Cape, + _ => new Requirement(items => items.CanLiftLight() && items.Cape) + }), new Location(this, 256+72, 0x1EDA8, LocationType.Regular, "Chest Game"), new Location(this, 256+73, 0x1E9EF, LocationType.Regular, "C-Shaped House"), new Location(this, 256+74, 0x1E9EC, LocationType.Regular, "Brewery"), diff --git a/Randomizer.SMZ3/Regions/Zelda/DesertPalace.cs b/Randomizer.SMZ3/Regions/Zelda/DesertPalace.cs index 554b40ae..b6080693 100644 --- a/Randomizer.SMZ3/Regions/Zelda/DesertPalace.cs +++ b/Randomizer.SMZ3/Regions/Zelda/DesertPalace.cs @@ -26,7 +26,7 @@ public DesertPalace(World world, Config config) : base(world, config) { items => ( items.CanLiftLight() || items.CanAccessMiseryMirePortal(Config) && items.Mirror - ) && items.BigKeyDP && items.KeyDP && items.CanLightTorches() && CanBeatBoss(items)), + ) && items.BigKeyDP && items.CanLightTorches() && CanBeatBoss(items)), }; } diff --git a/Randomizer.SMZ3/Regions/Zelda/EasternPalace.cs b/Randomizer.SMZ3/Regions/Zelda/EasternPalace.cs index 64c3df85..8d0f3ad0 100644 --- a/Randomizer.SMZ3/Regions/Zelda/EasternPalace.cs +++ b/Randomizer.SMZ3/Regions/Zelda/EasternPalace.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using static Randomizer.SMZ3.Z3Logic; using static Randomizer.SMZ3.ItemType; namespace Randomizer.SMZ3.Regions.Zelda { @@ -18,10 +19,14 @@ public EasternPalace(World world, Config config) : base(world, config) { new Location(this, 256+105, 0x1E977, LocationType.Regular, "Eastern Palace - Compass Chest"), new Location(this, 256+106, 0x1E97D, LocationType.Regular, "Eastern Palace - Big Chest", items => items.BigKeyEP), - new Location(this, 256+107, 0x1E9B9, LocationType.Regular, "Eastern Palace - Big Key Chest", - items => items.Lamp), - new Location(this, 256+108, 0x308150, LocationType.Regular, "Eastern Palace - Armos Knights", - items => items.BigKeyEP && items.Bow && items.Lamp), + new Location(this, 256+107, 0x1E9B9, LocationType.Regular, "Eastern Palace - Big Key Chest", Logic switch { + Normal => items => items.Lamp, + _ => new Requirement(items => items.Lamp || items.Sword) + }), + new Location(this, 256+108, 0x308150, LocationType.Regular, "Eastern Palace - Armos Knights", Logic switch { + Normal => items => items.BigKeyEP && items.Bow && items.Lamp, + _ => new Requirement(items => items.BigKeyEP && items.Bow && (items.Lamp || items.Firerod)) + }), }; } diff --git a/Randomizer.SMZ3/Regions/Zelda/GanonsTower.cs b/Randomizer.SMZ3/Regions/Zelda/GanonsTower.cs index 7c9d19bf..6b4d0770 100644 --- a/Randomizer.SMZ3/Regions/Zelda/GanonsTower.cs +++ b/Randomizer.SMZ3/Regions/Zelda/GanonsTower.cs @@ -122,14 +122,14 @@ private bool RightSide(Progression items, IList locations) { } private bool BigKeyRoom(Progression items) { - return items.KeyGT >= 3 && CanBeatArmos(items) + return items.KeyGT >= 3 && CanBeatArmos(items) && (items.Hammer && items.Hookshot || items.Firerod && items.Somaria); } private bool TowerAscend(Progression items) { return items.BigKeyGT && items.KeyGT >= 3 && items.Bow && items.CanLightTorches(); - } - + } + private bool CanBeatArmos(Progression items) { return items.Sword || items.Hammer || items.Bow || items.CanExtendMagic(2) && (items.Somaria || items.Byrna) || diff --git a/Randomizer.SMZ3/Regions/Zelda/HyruleCastle.cs b/Randomizer.SMZ3/Regions/Zelda/HyruleCastle.cs index 7cbfd68e..39bc73a6 100644 --- a/Randomizer.SMZ3/Regions/Zelda/HyruleCastle.cs +++ b/Randomizer.SMZ3/Regions/Zelda/HyruleCastle.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using static Randomizer.SMZ3.Z3Logic; using static Randomizer.SMZ3.ItemType; namespace Randomizer.SMZ3.Regions.Zelda { @@ -13,14 +14,22 @@ public HyruleCastle(World world, Config config) : base(world, config) { var sphereOne = -10; Locations = new List { new Location(this, 256+91, 0x1EA79, LocationType.Regular, "Sanctuary").Weighted(sphereOne), - new Location(this, 256+92, 0x1EB5D, LocationType.Regular, "Sewers - Secret Room - Left", - items => items.CanLiftLight() || items.Lamp && items.KeyHC), - new Location(this, 256+93, 0x1EB60, LocationType.Regular, "Sewers - Secret Room - Middle", - items => items.CanLiftLight() || items.Lamp && items.KeyHC), - new Location(this, 256+94, 0x1EB63, LocationType.Regular, "Sewers - Secret Room - Right", - items => items.CanLiftLight() || items.Lamp && items.KeyHC), - new Location(this, 256+95, 0x1E96E, LocationType.Regular, "Sewers - Dark Cross", - items => items.Lamp), + new Location(this, 256+92, 0x1EB5D, LocationType.Regular, "Sewers - Secret Room - Left", Logic switch { + Normal => items => items.CanLiftLight() || items.Lamp && items.KeyHC, + _ => new Requirement(items => items.CanLiftLight() || ((items.Lamp || items.Firerod) && items.KeyHC)), + }), + new Location(this, 256+93, 0x1EB60, LocationType.Regular, "Sewers - Secret Room - Middle", Logic switch { + Normal => items => items.CanLiftLight() || items.Lamp && items.KeyHC, + _ => new Requirement(items => items.CanLiftLight() || ((items.Lamp || items.Firerod) && items.KeyHC)), + }), + new Location(this, 256+94, 0x1EB63, LocationType.Regular, "Sewers - Secret Room - Right", Logic switch { + Normal => items => items.CanLiftLight() || items.Lamp && items.KeyHC, + _ => new Requirement(items => items.CanLiftLight() || ((items.Lamp || items.Firerod) && items.KeyHC)), + }), + new Location(this, 256+95, 0x1E96E, LocationType.Regular, "Sewers - Dark Cross", Logic switch { + Normal => items => items.Lamp, + _ => new Requirement(items => items.Lamp || items.Firerod || items.Sword) + }), new Location(this, 256+96, 0x1EB0C, LocationType.Regular, "Hyrule Castle - Map Chest").Weighted(sphereOne), new Location(this, 256+97, 0x1E974, LocationType.Regular, "Hyrule Castle - Boomerang Chest", items => items.KeyHC).Weighted(sphereOne), diff --git a/Randomizer.SMZ3/Regions/Zelda/IcePalace.cs b/Randomizer.SMZ3/Regions/Zelda/IcePalace.cs index 68a906f4..4cf88649 100644 --- a/Randomizer.SMZ3/Regions/Zelda/IcePalace.cs +++ b/Randomizer.SMZ3/Regions/Zelda/IcePalace.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using System.Linq; +using static Randomizer.SMZ3.Z3Logic; using static Randomizer.SMZ3.ItemType; namespace Randomizer.SMZ3.Regions.Zelda { @@ -15,32 +16,48 @@ public IcePalace(World world, Config config) : base(world, config) { Locations = new List { new Location(this, 256+161, 0x1E9D4, LocationType.Regular, "Ice Palace - Compass Chest"), - new Location(this, 256+162, 0x1E9E0, LocationType.Regular, "Ice Palace - Spike Room", - items => items.Hookshot || items.KeyIP >= 1 && CanNotWasteKeysBeforeAccessible(items, new[] { + new Location(this, 256+162, 0x1E9E0, LocationType.Regular, "Ice Palace - Spike Room", Logic switch { + Normal => items => items.Hookshot || items.KeyIP >= 1 && CanNotWasteKeysBeforeAccessible(items, new[] { GetLocation("Ice Palace - Map Chest"), GetLocation("Ice Palace - Big Key Chest") - })), - new Location(this, 256+163, 0x1E9DD, LocationType.Regular, "Ice Palace - Map Chest", - items => items.Hammer && items.CanLiftLight() && ( + }), + _ => new Requirement(items => items.Somaria || (items.Hookshot || (items.KeyIP >= 1 && + CanNotWasteKeysBeforeAccessible(items, new[] { + GetLocation("Ice Palace - Map Chest"), + GetLocation("Ice Palace - Big Key Chest") + }) + ))), + }), + new Location(this, 256+163, 0x1E9DD, LocationType.Regular, "Ice Palace - Map Chest", Logic switch { + Normal => items => items.Hammer && ( items.Hookshot || items.KeyIP >= 1 && CanNotWasteKeysBeforeAccessible(items, new[] { GetLocation("Ice Palace - Spike Room"), GetLocation("Ice Palace - Big Key Chest") }) - )), - new Location(this, 256+164, 0x1E9A4, LocationType.Regular, "Ice Palace - Big Key Chest", - items => items.Hammer && items.CanLiftLight() && ( + ), + _ => new Requirement(items => items.Hammer && (items.Somaria || (items.Hookshot || items.KeyIP >= 1 && + CanNotWasteKeysBeforeAccessible(items, new[] { + GetLocation("Ice Palace - Spike Room"), + GetLocation("Ice Palace - Big Key Chest") + }) + )) + ), + }), + new Location(this, 256+164, 0x1E9A4, LocationType.Regular, "Ice Palace - Big Key Chest", Logic switch { + Normal => items => items.Hammer && ( items.Hookshot || items.KeyIP >= 1 && CanNotWasteKeysBeforeAccessible(items, new[] { GetLocation("Ice Palace - Spike Room"), GetLocation("Ice Palace - Map Chest") }) - )), + ), + _ => new Requirement(items => items.Somaria), + }), new Location(this, 256+165, 0x1E9E3, LocationType.Regular, "Ice Palace - Iced T Room"), new Location(this, 256+166, 0x1E995, LocationType.Regular, "Ice Palace - Freezor Chest"), new Location(this, 256+167, 0x1E9AA, LocationType.Regular, "Ice Palace - Big Chest", items => items.BigKeyIP), new Location(this, 256+168, 0x308157, LocationType.Regular, "Ice Palace - Kholdstare", - items => items.BigKeyIP && items.Hammer && items.CanLiftLight() && - items.KeyIP >= (items.Somaria ? 1 : 2)), + items => items.BigKeyIP && items.Hammer && items.KeyIP >= (items.Somaria ? 1 : 2)), }; } @@ -49,7 +66,10 @@ bool CanNotWasteKeysBeforeAccessible(Progression items, IList location } public override bool CanEnter(Progression items) { - return items.MoonPearl && items.Flippers && items.CanLiftHeavy() && items.CanMeltFreezors(); + return Logic switch { + Normal => (items.MoonPearl && items.Flippers && items.CanLiftHeavy() && items.CanMeltFreezors()), + _ => (items.MoonPearl && items.CanLiftHeavy() && items.CanMeltFreezors()), + }; } public bool CanComplete(Progression items) { diff --git a/Randomizer.SMZ3/Regions/Zelda/LightWorld/DeathMountain/West.cs b/Randomizer.SMZ3/Regions/Zelda/LightWorld/DeathMountain/West.cs index e85b00e3..23ac22c2 100644 --- a/Randomizer.SMZ3/Regions/Zelda/LightWorld/DeathMountain/West.cs +++ b/Randomizer.SMZ3/Regions/Zelda/LightWorld/DeathMountain/West.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using static Randomizer.SMZ3.Z3Logic; namespace Randomizer.SMZ3.Regions.Zelda.LightWorld.DeathMountain { @@ -14,13 +15,18 @@ public West(World world, Config config) : base(world, config) { new Location(this, 256+1, 0x308140, LocationType.Regular, "Spectacle Rock", items => items.Mirror), new Location(this, 256+2, 0x308002, LocationType.Regular, "Spectacle Rock Cave"), - new Location(this, 256+3, 0x1EE9FA, LocationType.Regular, "Old Man", - items => items.Lamp), + new Location(this, 256+3, 0x1EE9FA, LocationType.Regular, "Old Man", Logic switch { + Normal => items => items.Lamp, + _ => new Requirement(items => items.Lamp || items.Sword || items.Hookshot), + }), }; } public override bool CanEnter(Progression items) { - return items.Flute || items.CanLiftLight() && items.Lamp || items.CanAccessDeathMountainPortal(); + return Logic switch { + Normal => items.Flute || items.CanLiftLight() && items.Lamp || items.CanAccessDeathMountainPortal(), + _ => items.Flute || (items.CanLiftLight() && (items.Lamp || items.Sword || items.Hookshot)) || items.CanAccessDeathMountainPortal(), + }; } } diff --git a/Randomizer.SMZ3/Regions/Zelda/LightWorld/NorthEast.cs b/Randomizer.SMZ3/Regions/Zelda/LightWorld/NorthEast.cs index 90bb6ca4..9e8c7152 100644 --- a/Randomizer.SMZ3/Regions/Zelda/LightWorld/NorthEast.cs +++ b/Randomizer.SMZ3/Regions/Zelda/LightWorld/NorthEast.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using static Randomizer.SMZ3.Z3Logic; using static Randomizer.SMZ3.RewardType; namespace Randomizer.SMZ3.Regions.Zelda.LightWorld { @@ -11,14 +12,20 @@ class NorthEast : Z3Region { public NorthEast(World world, Config config) : base(world, config) { var sphereOne = -10; Locations = new List { - new Location(this, 256+36, 0x1DE1C3, LocationType.Regular, "King Zora", - items => items.CanLiftLight() || items.Flippers), + new Location(this, 256+36, 0x1DE1C3, LocationType.Regular, "King Zora", Logic switch { + Normal => items => items.CanLiftLight() || items.Flippers, + _ => new Requirement(items => true), + }), new Location(this, 256+37, 0x308149, LocationType.Regular, "Zora's Ledge", items => items.Flippers), - new Location(this, 256+254, 0x1E9B0, LocationType.Regular, "Waterfall Fairy - Left", - items => items.Flippers), - new Location(this, 256+39, 0x1E9D1, LocationType.Regular, "Waterfall Fairy - Right", - items => items.Flippers), + new Location(this, 256+254, 0x1E9B0, LocationType.Regular, "Waterfall Fairy - Left", Logic switch { + Normal => items => items.Flippers, + _ => new Requirement(items => items.Flippers || items.MoonPearl), + }), + new Location(this, 256+39, 0x1E9D1, LocationType.Regular, "Waterfall Fairy - Right", Logic switch { + Normal => items => items.Flippers, + _ => new Requirement(items => items.Flippers || items.MoonPearl), + }), new Location(this, 256+40, 0x308014, LocationType.Regular, "Potion Shop", items => items.Mushroom), new Location(this, 256+41, 0x1EA82, LocationType.Regular, "Sahasrahla's Hut - Left").Weighted(sphereOne), diff --git a/Randomizer.SMZ3/Regions/Zelda/LightWorld/NorthWest.cs b/Randomizer.SMZ3/Regions/Zelda/LightWorld/NorthWest.cs index c84cff70..1249e8f3 100644 --- a/Randomizer.SMZ3/Regions/Zelda/LightWorld/NorthWest.cs +++ b/Randomizer.SMZ3/Regions/Zelda/LightWorld/NorthWest.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using static Randomizer.SMZ3.Z3Logic; using static Randomizer.SMZ3.RewardType; namespace Randomizer.SMZ3.Regions.Zelda.LightWorld { @@ -40,8 +41,10 @@ public NorthWest(World world, Config config) : base(world, config) { new Location(this, 256+33, 0x6B9CF, LocationType.Regular, "Sick Kid", items => items.Bottle), new Location(this, 256+34, 0x1E9CE, LocationType.Regular, "Kakariko Tavern").Weighted(sphereOne), - new Location(this, 256+35, 0x308015, LocationType.Regular, "Magic Bat", - items => items.Powder && (items.Hammer || items.MoonPearl && items.Mirror && items.CanLiftHeavy())), + new Location(this, 256+35, 0x308015, LocationType.Regular, "Magic Bat", Logic switch { + Normal => items => items.Powder && (items.Hammer || items.MoonPearl && items.Mirror && items.CanLiftHeavy()), + _ => items => (items.Powder || items.Somaria && items.Mushroom) && (items.Hammer || items.MoonPearl && items.Mirror && items.CanLiftHeavy()), + }), }; } diff --git a/Randomizer.SMZ3/Regions/Zelda/LightWorld/South.cs b/Randomizer.SMZ3/Regions/Zelda/LightWorld/South.cs index 5a323f1f..0a38f027 100644 --- a/Randomizer.SMZ3/Regions/Zelda/LightWorld/South.cs +++ b/Randomizer.SMZ3/Regions/Zelda/LightWorld/South.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using static Randomizer.SMZ3.Z3Logic; namespace Randomizer.SMZ3.Regions.Zelda.LightWorld { @@ -39,8 +40,10 @@ public South(World world, Config config) : base(world, config) { items => items.Flippers && items.MoonPearl && items.Mirror && ( World.CanEnter("Dark World South", items) || World.CanEnter("Dark World North East", items))), - new Location(this, 256+62, 0x6BE7D, LocationType.Regular, "Hobo", - items => items.Flippers), + new Location(this, 256+62, 0x6BE7D, LocationType.Regular, "Hobo", Logic switch { + Normal => items => items.Flippers, + _ => new Requirement(items => true), + }), new Location(this, 256+63, 0x1EB4E, LocationType.Regular, "Ice Rod Cave").Weighted(sphereOne), }; diff --git a/Randomizer.SMZ3/Regions/Zelda/PalaceOfDarkness.cs b/Randomizer.SMZ3/Regions/Zelda/PalaceOfDarkness.cs index 88ca1050..8519bc65 100644 --- a/Randomizer.SMZ3/Regions/Zelda/PalaceOfDarkness.cs +++ b/Randomizer.SMZ3/Regions/Zelda/PalaceOfDarkness.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using static Randomizer.SMZ3.Z3Logic; using static Randomizer.SMZ3.ItemType; namespace Randomizer.SMZ3.Regions.Zelda { @@ -15,10 +16,12 @@ public PalaceOfDarkness(World world, Config config) : base(world, config) { Locations = new List { new Location(this, 256+121, 0x1EA5B, LocationType.Regular, "Palace of Darkness - Shooter Room"), - new Location(this, 256+122, 0x1EA37, LocationType.Regular, "Palace of Darkness - Big Key Chest", - items => items.KeyPD >= (GetLocation("Palace of Darkness - Big Key Chest").ItemIs(KeyPD, World) ? 1 : - (items.Hammer && items.Bow && items.Lamp) || config.Keysanity ? 6 : 5)) - .AlwaysAllow((item, items) => item.Is(KeyPD, World) && items.KeyPD >= 5), + new Location(this, 256+122, 0x1EA37, LocationType.Regular, "Palace of Darkness - Big Key Chest", Logic switch { + Normal => items => items.KeyPD >= (GetLocation("Palace of Darkness - Big Key Chest").ItemIs(KeyPD, World) ? 1 : + (items.Hammer && items.Bow && items.Lamp) || config.Keysanity ? 6 : 5), + _ => items => items.KeyPD >= (GetLocation("Palace of Darkness - Big Key Chest").ItemIs(KeyPD, World) ? 1 : + (items.Hammer && items.Bow && (items.Lamp || items.Firerod || items.Sword)) || config.Keysanity ? 6 : 5), + }).AlwaysAllow((item, items) => item.Is(KeyPD, World) && items.KeyPD >= 5), new Location(this, 256+123, 0x1EA49, LocationType.Regular, "Palace of Darkness - Stalfos Basement", items => items.KeyPD >= 1 || items.Bow && items.Hammer), new Location(this, 256+124, 0x1EA3D, LocationType.Regular, "Palace of Darkness - The Arena - Bridge", @@ -28,22 +31,32 @@ public PalaceOfDarkness(World world, Config config) : base(world, config) { new Location(this, 256+126, 0x1EA52, LocationType.Regular, "Palace of Darkness - Map Chest", items => items.Bow), new Location(this, 256+127, 0x1EA43, LocationType.Regular, "Palace of Darkness - Compass Chest", - items => items.KeyPD >= ((items.Hammer && items.Bow && items.Lamp) || config.Keysanity ? 4 : 3)), + items => items.KeyPD >= ((items.Hammer && items.Bow) || config.Keysanity ? 4 : 3)), new Location(this, 256+128, 0x1EA46, LocationType.Regular, "Palace of Darkness - Harmless Hellway", items => items.KeyPD >= (GetLocation("Palace of Darkness - Harmless Hellway").ItemIs(KeyPD, World) ? - (items.Hammer && items.Bow && items.Lamp) || config.Keysanity ? 4 : 3 : - (items.Hammer && items.Bow && items.Lamp) || config.Keysanity ? 6 : 5)) + (items.Hammer && items.Bow) || config.Keysanity ? 4 : 3 : + (items.Hammer && items.Bow) || config.Keysanity ? 6 : 5)) .AlwaysAllow((item, items) => item.Is(KeyPD, World) && items.KeyPD >= 5), - new Location(this, 256+129, 0x1EA4C, LocationType.Regular, "Palace of Darkness - Dark Basement - Left", - items => items.Lamp && items.KeyPD >= ((items.Hammer && items.Bow) || config.Keysanity ? 4 : 3)), - new Location(this, 256+130, 0x1EA4F, LocationType.Regular, "Palace of Darkness - Dark Basement - Right", - items => items.Lamp && items.KeyPD >= ((items.Hammer && items.Bow) || config.Keysanity ? 4 : 3)), - new Location(this, 256+131, 0x1EA55, LocationType.Regular, "Palace of Darkness - Dark Maze - Top", - items => items.Lamp && items.KeyPD >= ((items.Hammer && items.Bow) || config.Keysanity ? 6 : 5)), - new Location(this, 256+132, 0x1EA58, LocationType.Regular, "Palace of Darkness - Dark Maze - Bottom", - items => items.Lamp && items.KeyPD >= ((items.Hammer && items.Bow) || config.Keysanity ? 6 : 5)), - new Location(this, 256+133, 0x1EA40, LocationType.Regular, "Palace of Darkness - Big Chest", - items => items.BigKeyPD && items.Lamp && items.KeyPD >= ((items.Hammer && items.Bow) || config.Keysanity ? 6 : 5)), + new Location(this, 256+129, 0x1EA4C, LocationType.Regular, "Palace of Darkness - Dark Basement - Left", Logic switch { + Normal => items => items.Lamp && items.KeyPD >= ((items.Hammer && items.Bow) || config.Keysanity ? 4 : 3), + _ => new Requirement(items => (items.Lamp || items.Firerod || items.Sword) && items.KeyPD >= ((items.Hammer && items.Bow) || config.Keysanity ? 4 : 3)), + }), + new Location(this, 256+130, 0x1EA4F, LocationType.Regular, "Palace of Darkness - Dark Basement - Right", Logic switch { + Normal => items => items.Lamp && items.KeyPD >= ((items.Hammer && items.Bow) || config.Keysanity ? 4 : 3), + _ => new Requirement(items => (items.Lamp || items.Firerod || items.Sword) && items.KeyPD >= ((items.Hammer && items.Bow) || config.Keysanity ? 4 : 3)), + }), + new Location(this, 256+131, 0x1EA55, LocationType.Regular, "Palace of Darkness - Dark Maze - Top", Logic switch { + Normal => items => items.Lamp && items.KeyPD >= ((items.Hammer && items.Bow) || config.Keysanity ? 6 : 5), + _ => new Requirement(items => (items.Lamp || items.Firerod || items.Sword) && items.KeyPD >= ((items.Hammer && items.Bow) || config.Keysanity ? 4 : 3)), + }), + new Location(this, 256+132, 0x1EA58, LocationType.Regular, "Palace of Darkness - Dark Maze - Bottom", Logic switch { + Normal => items => items.Lamp && items.KeyPD >= ((items.Hammer && items.Bow) || config.Keysanity ? 6 : 5), + _ => new Requirement(items => (items.Lamp || items.Firerod || items.Sword) && items.KeyPD >= ((items.Hammer && items.Bow) || config.Keysanity ? 4 : 3)), + }), + new Location(this, 256+133, 0x1EA40, LocationType.Regular, "Palace of Darkness - Big Chest", Logic switch { + Normal => items => items.BigKeyPD && items.Lamp && items.KeyPD >= ((items.Hammer && items.Bow) || config.Keysanity ? 6 : 5), + _ => new Requirement(items => items.BigKeyPD && (items.Lamp || items.Firerod || items.Sword) && items.KeyPD >= ((items.Hammer && items.Bow) || config.Keysanity ? 6 : 5)), + }), new Location(this, 256+134, 0x308153, LocationType.Regular, "Palace of Darkness - Helmasaur King", items => items.Lamp && items.Hammer && items.Bow && items.BigKeyPD && items.KeyPD >= 6), }; diff --git a/Randomizer.SMZ3/Regions/Zelda/TowerOfHera.cs b/Randomizer.SMZ3/Regions/Zelda/TowerOfHera.cs index 373352f6..6772271e 100644 --- a/Randomizer.SMZ3/Regions/Zelda/TowerOfHera.cs +++ b/Randomizer.SMZ3/Regions/Zelda/TowerOfHera.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using static Randomizer.SMZ3.Z3Logic; using static Randomizer.SMZ3.ItemType; namespace Randomizer.SMZ3.Regions.Zelda { @@ -22,8 +23,10 @@ public TowerOfHera(World world, Config config) : base(world, config) { items => items.BigKeyTH), new Location(this, 256+119, 0x1E9F8, LocationType.Regular, "Tower of Hera - Big Chest", items => items.BigKeyTH), - new Location(this, 256+120, 0x308152, LocationType.Regular, "Tower of Hera - Moldorm", - items => items.BigKeyTH && CanBeatBoss(items)), + new Location(this, 256+120, 0x308152, LocationType.Regular, "Tower of Hera - Moldorm", Logic switch { + Normal => items => items.BigKeyTH && CanBeatBoss(items), + _ => new Requirement(items => (items.BigKeyTH || items.Hookshot) && CanBeatBoss(items)), + }), }; } diff --git a/Randomizer.SMZ3/Regions/Zelda/TurtleRock.cs b/Randomizer.SMZ3/Regions/Zelda/TurtleRock.cs index fafd9aa8..aebdb999 100644 --- a/Randomizer.SMZ3/Regions/Zelda/TurtleRock.cs +++ b/Randomizer.SMZ3/Regions/Zelda/TurtleRock.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using static Randomizer.SMZ3.Z3Logic; using static Randomizer.SMZ3.ItemType; namespace Randomizer.SMZ3.Regions.Zelda { @@ -31,10 +32,22 @@ public TurtleRock(World world, Config config) : base(world, config) { .Allow((item, items) => item.IsNot(BigKeyTR, World)), new Location(this, 256+183, 0x1EA34, LocationType.Regular, "Turtle Rock - Crystaroller Room", items => items.BigKeyTR && items.KeyTR >= 2), - new Location(this, 256+184, 0x1EA28, LocationType.Regular, "Turtle Rock - Eye Bridge - Top Right", LaserBridge), - new Location(this, 256+185, 0x1EA2B, LocationType.Regular, "Turtle Rock - Eye Bridge - Top Left", LaserBridge), - new Location(this, 256+186, 0x1EA2E, LocationType.Regular, "Turtle Rock - Eye Bridge - Bottom Right", LaserBridge), - new Location(this, 256+187, 0x1EA31, LocationType.Regular, "Turtle Rock - Eye Bridge - Bottom Left", LaserBridge), + new Location(this, 256+184, 0x1EA28, LocationType.Regular, "Turtle Rock - Eye Bridge - Top Right", Logic switch { + Normal => LaserBridge, + _ => NMGLaserBridge, + }), + new Location(this, 256+185, 0x1EA2B, LocationType.Regular, "Turtle Rock - Eye Bridge - Top Left", Logic switch { + Normal => LaserBridge, + _ => NMGLaserBridge, + }), + new Location(this, 256+186, 0x1EA2E, LocationType.Regular, "Turtle Rock - Eye Bridge - Bottom Right", Logic switch { + Normal => LaserBridge, + _ => NMGLaserBridge, + }), + new Location(this, 256+187, 0x1EA31, LocationType.Regular, "Turtle Rock - Eye Bridge - Bottom Left", Logic switch { + Normal => LaserBridge, + _ => NMGLaserBridge, + }), new Location(this, 256+188, 0x308159, LocationType.Regular, "Turtle Rock - Trinexx", items => items.BigKeyTR && items.KeyTR >= 4 && items.Lamp && CanBeatBoss(items)), }; @@ -44,6 +57,11 @@ bool LaserBridge(Progression items) { return items.BigKeyTR && items.KeyTR >= 3 && items.Lamp && (items.Cape || items.Byrna || items.CanBlockLasers); } + // celestial navigation + dodge lasers + bool NMGLaserBridge(Progression items) { + return items.BigKeyTR && items.KeyTR >= 3; + } + bool CanBeatBoss(Progression items) { return items.Firerod && items.Icerod; } From ca0ed9f7ecf2daf238b7cb59da41fb7ab6782ad0 Mon Sep 17 00:00:00 2001 From: ken Date: Sat, 24 Apr 2021 00:41:50 -0700 Subject: [PATCH 2/5] add comment; simplify normal slightly --- Randomizer.SMZ3/Item.cs | 2 ++ Randomizer.SMZ3/Regions/Zelda/GanonsTower.cs | 11 +++++++---- Randomizer.SMZ3/Regions/Zelda/MiseryMire.cs | 20 +++++++++++++------- 3 files changed, 22 insertions(+), 11 deletions(-) diff --git a/Randomizer.SMZ3/Item.cs b/Randomizer.SMZ3/Item.cs index de995f0a..025437f2 100644 --- a/Randomizer.SMZ3/Item.cs +++ b/Randomizer.SMZ3/Item.cs @@ -875,6 +875,8 @@ public static bool CanOpenRedDoors(this Progression items) { return items.Missile || items.Super; } + /* We can't import Z3Logic because we've already imported M3Logic and "Normal" conflicts + Have to use full scope here as a result */ public static bool CanAccessNorfairUpperPortal(this Progression items, World world) { return world.Config.Z3Logic switch { Z3Logic.Normal => items.Flute || items.CanLiftLight() && items.Lamp, diff --git a/Randomizer.SMZ3/Regions/Zelda/GanonsTower.cs b/Randomizer.SMZ3/Regions/Zelda/GanonsTower.cs index 6b4d0770..34b855a8 100644 --- a/Randomizer.SMZ3/Regions/Zelda/GanonsTower.cs +++ b/Randomizer.SMZ3/Regions/Zelda/GanonsTower.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using System.Linq; +using static Randomizer.SMZ3.Z3Logic; using static Randomizer.SMZ3.ItemType; using static Randomizer.SMZ3.RewardType; @@ -23,10 +24,12 @@ public GanonsTower(World world, Config config) : base(world, config) { items => items.Hammer && items.Hookshot), new Location(this, 256+193, 0x1EAC1, LocationType.Regular, "Ganon's Tower - DMs Room - Bottom Right", items => items.Hammer && items.Hookshot), - new Location(this, 256+194, 0x1EAD3, LocationType.Regular, "Ganon's Tower - Map Chest", - items => items.Hammer && (items.Hookshot || items.Boots) && items.KeyGT >= - (new[] { BigKeyGT, KeyGT }.Any(type => GetLocation("Ganon's Tower - Map Chest").ItemIs(type, World)) ? 3 : 4)) - .AlwaysAllow((item, items) => item.Is(KeyGT, World) && items.KeyGT >= 3), + new Location(this, 256+194, 0x1EAD3, LocationType.Regular, "Ganon's Tower - Map Chest", Logic switch { + Normal => items => items.Hammer && items.Hookshot && items.KeyGT >= + (new[] { BigKeyGT, KeyGT }.Any(type => GetLocation("Ganon's Tower - Map Chest").ItemIs(type, World)) ? 3 : 4), + _ => items => items.Hammer && (items.Hookshot || items.Boots) && items.KeyGT >= + (new[] { BigKeyGT, KeyGT }.Any(type => GetLocation("Ganon's Tower - Map Chest").ItemIs(type, World)) ? 3 : 4), + }).AlwaysAllow((item, items) => item.Is(KeyGT, World) && items.KeyGT >= 3), new Location(this, 256+195, 0x1EAD0, LocationType.Regular, "Ganon's Tower - Firesnake Room", items => items.Hammer && items.Hookshot && items.KeyGT >= (new[] { GetLocation("Ganon's Tower - Randomizer Room - Top Right"), diff --git a/Randomizer.SMZ3/Regions/Zelda/MiseryMire.cs b/Randomizer.SMZ3/Regions/Zelda/MiseryMire.cs index ab22f2c6..9961e923 100644 --- a/Randomizer.SMZ3/Regions/Zelda/MiseryMire.cs +++ b/Randomizer.SMZ3/Regions/Zelda/MiseryMire.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using static Randomizer.SMZ3.Z3Logic; using static Randomizer.SMZ3.ItemType; namespace Randomizer.SMZ3.Regions.Zelda { @@ -35,13 +36,18 @@ public MiseryMire(World world, Config config) : base(world, config) { // Need "CanKillManyEnemies" if implementing swordless public override bool CanEnter(Progression items) { - return Medallion switch { - Bombos => items.Bombos, - Ether => items.Ether, - _ => items.Quake - } && items.Sword && - items.MoonPearl && (items.Boots || items.Hookshot) && - World.CanEnter("Dark World Mire", items); + var medal = Medallion switch { + Bombos => items.Bombos, + Ether => items.Ether, + _ => items.Quake + }; + + return Logic switch { + Normal => medal && items.Sword && items.MoonPearl && items.Hookshot && + World.CanEnter("Dark World Mire", items), + _ => medal && items.Sword && items.MoonPearl && (items.Boots || items.Hookshot) && + World.CanEnter("Dark World Mire", items), + }; } public bool CanComplete(Progression items) { From f6923ec12a6ba6c19c80f65f13f0e6327ac6ae68 Mon Sep 17 00:00:00 2001 From: ken Date: Tue, 27 Apr 2021 17:40:43 -0700 Subject: [PATCH 3/5] missed a couple checks; added logic log --- Randomizer.SMZ3/Randomizer.cs | 2 +- Randomizer.SMZ3/Regions/Zelda/IcePalace.cs | 13 ++- Randomizer.SMZ3/Regions/Zelda/TowerOfHera.cs | 6 +- Randomizer.SMZ3/Regions/Zelda/TurtleRock.cs | 6 +- .../ClientApp/src/components/Patch.jsx | 4 +- .../ClientApp/src/components/Permalink.jsx | 7 ++ .../darkworld/DarkWorldDeathMountainEast.md | 5 +- .../DarkWorldDeathMountainEastNMG.md | 18 +++ .../logiclog/darkworld/DarkWorldNorthWest.md | 2 +- .../darkworld/DarkWorldNorthWestNMG.md | 27 +++++ .../ClientApp/src/logiclog/darkworld/index.js | 10 +- .../src/logiclog/dungeons/CastleTowerNMG.md | 15 +++ .../src/logiclog/dungeons/EasternPalaceNMG.md | 21 ++++ .../src/logiclog/dungeons/GanonsTower.md | 2 +- .../src/logiclog/dungeons/GanonsTowerNMG.md | 108 ++++++++++++++++++ .../src/logiclog/dungeons/HyruleCastleNMG.md | 35 ++++++ .../src/logiclog/dungeons/IcePalaceNMG.md | 41 +++++++ .../src/logiclog/dungeons/MiseryMire.md | 2 +- .../src/logiclog/dungeons/MiseryMireNMG.md | 29 +++++ .../src/logiclog/dungeons/PalaceOfDarkness.md | 6 +- .../logiclog/dungeons/PalaceOfDarknessNMG.md | 56 +++++++++ .../src/logiclog/dungeons/TowerOfHeraNMG.md | 36 ++++++ .../src/logiclog/dungeons/TurtleRockNMG.md | 43 +++++++ .../ClientApp/src/logiclog/dungeons/index.js | 45 +++++--- .../LightWorldDeathMountainWestNMG.md | 27 +++++ .../lightworld/LightWorldNorthEastNMG.md | 30 +++++ .../lightworld/LightWorldNorthWestNMG.md | 59 ++++++++++ .../logiclog/lightworld/LightWorldSouthNMG.md | 62 ++++++++++ .../src/logiclog/lightworld/index.js | 20 ++-- 29 files changed, 687 insertions(+), 50 deletions(-) create mode 100644 WebRandomizer/ClientApp/src/logiclog/darkworld/DarkWorldDeathMountainEastNMG.md create mode 100644 WebRandomizer/ClientApp/src/logiclog/darkworld/DarkWorldNorthWestNMG.md create mode 100644 WebRandomizer/ClientApp/src/logiclog/dungeons/CastleTowerNMG.md create mode 100644 WebRandomizer/ClientApp/src/logiclog/dungeons/EasternPalaceNMG.md create mode 100644 WebRandomizer/ClientApp/src/logiclog/dungeons/GanonsTowerNMG.md create mode 100644 WebRandomizer/ClientApp/src/logiclog/dungeons/HyruleCastleNMG.md create mode 100644 WebRandomizer/ClientApp/src/logiclog/dungeons/IcePalaceNMG.md create mode 100644 WebRandomizer/ClientApp/src/logiclog/dungeons/MiseryMireNMG.md create mode 100644 WebRandomizer/ClientApp/src/logiclog/dungeons/PalaceOfDarknessNMG.md create mode 100644 WebRandomizer/ClientApp/src/logiclog/dungeons/TowerOfHeraNMG.md create mode 100644 WebRandomizer/ClientApp/src/logiclog/dungeons/TurtleRockNMG.md create mode 100644 WebRandomizer/ClientApp/src/logiclog/lightworld/LightWorldDeathMountainWestNMG.md create mode 100644 WebRandomizer/ClientApp/src/logiclog/lightworld/LightWorldNorthEastNMG.md create mode 100644 WebRandomizer/ClientApp/src/logiclog/lightworld/LightWorldNorthWestNMG.md create mode 100644 WebRandomizer/ClientApp/src/logiclog/lightworld/LightWorldSouthNMG.md diff --git a/Randomizer.SMZ3/Randomizer.cs b/Randomizer.SMZ3/Randomizer.cs index 37fec527..38d16d24 100644 --- a/Randomizer.SMZ3/Randomizer.cs +++ b/Randomizer.SMZ3/Randomizer.cs @@ -22,9 +22,9 @@ public class Randomizer : IRandomizer { static readonly Regex continousSpace = new Regex(@" +"); public List Options => new List { + Config.GetRandomizerOption("A Link to the Past Logic"), Config.GetRandomizerOption("Super Metroid Logic"), Config.GetRandomizerOption("Goal"), - //Config.GetRandomizerOption("A Link to the Past Logic"), Config.GetRandomizerOption("First Sword"), Config.GetRandomizerOption("Morph Ball"), Config.GetRandomizerOption("Key shuffle"), diff --git a/Randomizer.SMZ3/Regions/Zelda/IcePalace.cs b/Randomizer.SMZ3/Regions/Zelda/IcePalace.cs index 4cf88649..0d2414f8 100644 --- a/Randomizer.SMZ3/Regions/Zelda/IcePalace.cs +++ b/Randomizer.SMZ3/Regions/Zelda/IcePalace.cs @@ -50,14 +50,21 @@ public IcePalace(World world, Config config) : base(world, config) { GetLocation("Ice Palace - Map Chest") }) ), - _ => new Requirement(items => items.Somaria), + _ => new Requirement(items => items.Somaria || (items.Hammer && ( + items.Hookshot || items.KeyIP >= 1 && CanNotWasteKeysBeforeAccessible(items, new[] { + GetLocation("Ice Palace - Spike Room"), + GetLocation("Ice Palace - Map Chest") + })) + )), }), new Location(this, 256+165, 0x1E9E3, LocationType.Regular, "Ice Palace - Iced T Room"), new Location(this, 256+166, 0x1E995, LocationType.Regular, "Ice Palace - Freezor Chest"), new Location(this, 256+167, 0x1E9AA, LocationType.Regular, "Ice Palace - Big Chest", items => items.BigKeyIP), - new Location(this, 256+168, 0x308157, LocationType.Regular, "Ice Palace - Kholdstare", - items => items.BigKeyIP && items.Hammer && items.KeyIP >= (items.Somaria ? 1 : 2)), + new Location(this, 256+168, 0x308157, LocationType.Regular, "Ice Palace - Kholdstare", Logic switch { + Normal => items => items.BigKeyIP && items.Hammer && items.KeyIP >= (items.Somaria ? 1 : 2), + _ => new Requirement(items => items.Hammer && items.Somaria || (items.BigKeyIP && items.KeyIP >= 2)) + }), }; } diff --git a/Randomizer.SMZ3/Regions/Zelda/TowerOfHera.cs b/Randomizer.SMZ3/Regions/Zelda/TowerOfHera.cs index 6772271e..8c1c8360 100644 --- a/Randomizer.SMZ3/Regions/Zelda/TowerOfHera.cs +++ b/Randomizer.SMZ3/Regions/Zelda/TowerOfHera.cs @@ -19,8 +19,10 @@ public TowerOfHera(World world, Config config) : base(world, config) { new Location(this, 256+117, 0x1E9E6, LocationType.Regular, "Tower of Hera - Big Key Chest", items => items.KeyTH && items.CanLightTorches()) .AlwaysAllow((item, items) => item.Is(KeyTH, World)), - new Location(this, 256+118, 0x1E9FB, LocationType.Regular, "Tower of Hera - Compass Chest", - items => items.BigKeyTH), + new Location(this, 256+118, 0x1E9FB, LocationType.Regular, "Tower of Hera - Compass Chest", Logic switch { + Normal => items => items.BigKeyTH, + _ => new Requirement(items => items.BigKeyTH || items.Hookshot), + }), new Location(this, 256+119, 0x1E9F8, LocationType.Regular, "Tower of Hera - Big Chest", items => items.BigKeyTH), new Location(this, 256+120, 0x308152, LocationType.Regular, "Tower of Hera - Moldorm", Logic switch { diff --git a/Randomizer.SMZ3/Regions/Zelda/TurtleRock.cs b/Randomizer.SMZ3/Regions/Zelda/TurtleRock.cs index aebdb999..afa10d7a 100644 --- a/Randomizer.SMZ3/Regions/Zelda/TurtleRock.cs +++ b/Randomizer.SMZ3/Regions/Zelda/TurtleRock.cs @@ -48,8 +48,10 @@ public TurtleRock(World world, Config config) : base(world, config) { Normal => LaserBridge, _ => NMGLaserBridge, }), - new Location(this, 256+188, 0x308159, LocationType.Regular, "Turtle Rock - Trinexx", - items => items.BigKeyTR && items.KeyTR >= 4 && items.Lamp && CanBeatBoss(items)), + new Location(this, 256+188, 0x308159, LocationType.Regular, "Turtle Rock - Trinexx", Logic switch { + Normal => items => items.BigKeyTR && items.KeyTR >= 4 && items.Lamp && CanBeatBoss(items), + _ => new Requirement(items => items.BigKeyTR && items.KeyTR >= 4 && CanBeatBoss(items)) + }), }; } diff --git a/WebRandomizer/ClientApp/src/components/Patch.jsx b/WebRandomizer/ClientApp/src/components/Patch.jsx index af53cc57..58c0c0a6 100644 --- a/WebRandomizer/ClientApp/src/components/Patch.jsx +++ b/WebRandomizer/ClientApp/src/components/Patch.jsx @@ -131,9 +131,9 @@ export default function Patch(props) { mode === 'multiworld' ? world.player : null ]); - function smz3Parts({ smlogic, swordlocation, morphlocation, keyshuffle }) { + function smz3Parts({ z3logic, smlogic, swordlocation, morphlocation, keyshuffle }) { return [ - `ZLn+SL${smlogic[0]}`, + `ZL{z3logic[0]}+SL${smlogic[0]}`, swordlocation && swordlocation !== 'randomized' ? `S${swordlocation[0]}` : null, morphlocation && morphlocation !== 'randomized' ? `M${morphlocation[0]}` : null, keyshuffle && keyshuffle !== 'none' ? `K${keyshuffle[0]}` : null diff --git a/WebRandomizer/ClientApp/src/components/Permalink.jsx b/WebRandomizer/ClientApp/src/components/Permalink.jsx index d387e8af..b7a7ee12 100644 --- a/WebRandomizer/ClientApp/src/components/Permalink.jsx +++ b/WebRandomizer/ClientApp/src/components/Permalink.jsx @@ -55,6 +55,13 @@ export default function Permalink(props) { )} {settings && game.id === 'smz3' && (<> + + Zelda Logic: {{ + normal: 'Normal', + nmg: 'NMG' + }[settings.z3logic] + } + Super Metroid Logic: {{ normal: 'Normal', diff --git a/WebRandomizer/ClientApp/src/logiclog/darkworld/DarkWorldDeathMountainEast.md b/WebRandomizer/ClientApp/src/logiclog/darkworld/DarkWorldDeathMountainEast.md index 21b88909..02f9accf 100644 --- a/WebRandomizer/ClientApp/src/logiclog/darkworld/DarkWorldDeathMountainEast.md +++ b/WebRandomizer/ClientApp/src/logiclog/darkworld/DarkWorldDeathMountainEast.md @@ -5,12 +5,9 @@ CanLiftHeavy *and* *can enter* **Light World Death Mountain East** **Hookshot Cave - Top Right** **Hookshot Cave - Top Left** **Hookshot Cave - Bottom Left** - -MoonPearl *and* Hookshot - **Hookshot Cave - Bottom Right** -MoonPearl *and either* Hookshot *or* Boots +MoonPearl *and* Hookshot **Superbunny Cave - Top** **Superbunny Cave - Bottom** diff --git a/WebRandomizer/ClientApp/src/logiclog/darkworld/DarkWorldDeathMountainEastNMG.md b/WebRandomizer/ClientApp/src/logiclog/darkworld/DarkWorldDeathMountainEastNMG.md new file mode 100644 index 00000000..7c32fb87 --- /dev/null +++ b/WebRandomizer/ClientApp/src/logiclog/darkworld/DarkWorldDeathMountainEastNMG.md @@ -0,0 +1,18 @@ +***can enter*** + +CanLiftHeavy *and* *can enter* **Light World Death Mountain East** + +**Hookshot Cave - Top Right** +**Hookshot Cave - Top Left** +**Hookshot Cave - Bottom Left** + +MoonPearl *and* Hookshot + +**Hookshot Cave - Bottom Right** + +MoonPearl *and either* Hookshot *or* Boots + +**Superbunny Cave - Top** +**Superbunny Cave - Bottom** + +*Always* diff --git a/WebRandomizer/ClientApp/src/logiclog/darkworld/DarkWorldNorthWest.md b/WebRandomizer/ClientApp/src/logiclog/darkworld/DarkWorldNorthWest.md index 663e7b0b..9f718f1d 100644 --- a/WebRandomizer/ClientApp/src/logiclog/darkworld/DarkWorldNorthWest.md +++ b/WebRandomizer/ClientApp/src/logiclog/darkworld/DarkWorldNorthWest.md @@ -9,7 +9,7 @@ **Bumper Cave** -CanLiftLight *and* Cape +CanLiftLight *and* Hookshot *and* Cape **Chest Game** **C-Shaped House** diff --git a/WebRandomizer/ClientApp/src/logiclog/darkworld/DarkWorldNorthWestNMG.md b/WebRandomizer/ClientApp/src/logiclog/darkworld/DarkWorldNorthWestNMG.md new file mode 100644 index 00000000..663e7b0b --- /dev/null +++ b/WebRandomizer/ClientApp/src/logiclog/darkworld/DarkWorldNorthWestNMG.md @@ -0,0 +1,27 @@ +***can enter*** + +- MoonPearl *and one of* + - *each of* + - Agahnim *or* CanAccessDarkWorldPortal *with* Flippers + - Hookshot *and either* Flippers *or* CanLiftLight *or* Hammer + - Hammer *and* CanLiftLight + - CanLiftHeavy + +**Bumper Cave** + +CanLiftLight *and* Cape + +**Chest Game** +**C-Shaped House** +**Brewery** + +*Available* + +**Hammer Pegs** + +CanLiftHeavy *and* Hammer + +**Blacksmith** +**Purple Chest** + +CanLiftHeavy diff --git a/WebRandomizer/ClientApp/src/logiclog/darkworld/index.js b/WebRandomizer/ClientApp/src/logiclog/darkworld/index.js index 8e380e0b..e378165f 100644 --- a/WebRandomizer/ClientApp/src/logiclog/darkworld/index.js +++ b/WebRandomizer/ClientApp/src/logiclog/darkworld/index.js @@ -1,15 +1,17 @@ import raw from "raw.macro"; const DarkWorldDeathMountainWest = raw('./DarkWorldDeathMountainWest.md'); -const DarkWorldDeathMountainEast = raw('./DarkWorldDeathMountainEast.md'); -const DarkWorldNorthWest = raw('./DarkWorldNorthWest.md'); +const DarkWorldDeathMountainEastNormal = raw('./DarkWorldDeathMountainEast.md'); +const DarkWorldDeathMountainEastNMG = raw('./DarkWorldDeathMountainEastNMG.md'); +const DarkWorldNorthWestNormal = raw('./DarkWorldNorthWest.md'); +const DarkWorldNorthWestNMG = raw('./DarkWorldNorthWestNMG.md'); const DarkWorldNorthEast = raw('./DarkWorldNorthEast.md'); const DarkWorldSouth = raw('./DarkWorldSouth.md'); const DarkWorldMire = raw('./DarkWorldMire.md'); export default [ { name: 'Death Mountain West', normal: DarkWorldDeathMountainWest }, - { name: 'Death Mountain East', normal: DarkWorldDeathMountainEast }, - { name: 'North West', normal: DarkWorldNorthWest }, + { name: 'Death Mountain East', normal: DarkWorldDeathMountainEastNormal, nmg: DarkWorldDeathMountainEastNMG }, + { name: 'North West', normal: DarkWorldNorthWestNormal, nmg: DarkWorldNorthWestNMG }, { name: 'North East', normal: DarkWorldNorthEast }, { name: 'South', normal: DarkWorldSouth }, { name: 'Mire', normal: DarkWorldMire } diff --git a/WebRandomizer/ClientApp/src/logiclog/dungeons/CastleTowerNMG.md b/WebRandomizer/ClientApp/src/logiclog/dungeons/CastleTowerNMG.md new file mode 100644 index 00000000..bd088086 --- /dev/null +++ b/WebRandomizer/ClientApp/src/logiclog/dungeons/CastleTowerNMG.md @@ -0,0 +1,15 @@ +***can enter*** + +CanKillManyEnemies *and either* Cape *or* MasterSword + +**Castle Tower - Foyer** + +*Available* + +**Castle Tower - Dark Maze** + +1 Castle Tower Key *and either* Lamp *or* FireRod + +**Agahnim** + +Lamp *and* 2 Castle Tower Keys *and* Sword diff --git a/WebRandomizer/ClientApp/src/logiclog/dungeons/EasternPalaceNMG.md b/WebRandomizer/ClientApp/src/logiclog/dungeons/EasternPalaceNMG.md new file mode 100644 index 00000000..eac01411 --- /dev/null +++ b/WebRandomizer/ClientApp/src/logiclog/dungeons/EasternPalaceNMG.md @@ -0,0 +1,21 @@ +***can enter*** + +*Always* + +**Eastern Palace - Cannonball Chest** +**Eastern Palace - Map Chest** +**Eastern Palace - Compass Chest** + +*Available* + +**Eastern Palace - Big Chest** + +BigKey + +**Eastern Palace - Big Key Chest** + +Lamp *or* Sword + +**Eastern Palace - Armos Knights** + +BigKey *and* Bow *and either* Lamp *or* Firerod diff --git a/WebRandomizer/ClientApp/src/logiclog/dungeons/GanonsTower.md b/WebRandomizer/ClientApp/src/logiclog/dungeons/GanonsTower.md index 8d287e69..79ac7636 100644 --- a/WebRandomizer/ClientApp/src/logiclog/dungeons/GanonsTower.md +++ b/WebRandomizer/ClientApp/src/logiclog/dungeons/GanonsTower.md @@ -20,7 +20,7 @@ Hammer *and* Hookshot Can always hold a Key *if having* 3 Keys - *each of* - - Hammer *and either* Hookshot *or* Boots + - Hammer *and* Hookshot - 3 Keys *if* **Ganon's Tower - Map Chest** *has* BigKey/Key, *otherwise* 4 Keys **Ganon's Tower - Firesnake Room** diff --git a/WebRandomizer/ClientApp/src/logiclog/dungeons/GanonsTowerNMG.md b/WebRandomizer/ClientApp/src/logiclog/dungeons/GanonsTowerNMG.md new file mode 100644 index 00000000..8d287e69 --- /dev/null +++ b/WebRandomizer/ClientApp/src/logiclog/dungeons/GanonsTowerNMG.md @@ -0,0 +1,108 @@ +*if multiworld* can only fill with non-progression items from own world + +***can enter*** + +MoonPearl *and* *can enter* **Dark World Death Mountain East** *and* 7 Crystals *and* GoldenFourBosses + +**Ganon's Tower - Bob's Torch** + +Boots + +**Ganon's Tower - DMs Room - Top Left** +**Ganon's Tower - DMs Room - Top Right** +**Ganon's Tower - DMs Room - Bottom Left** +**Ganon's Tower - DMs Room - Bottom Right** + +Hammer *and* Hookshot + +**Ganon's Tower - Map Chest** + +Can always hold a Key *if having* 3 Keys + +- *each of* + - Hammer *and either* Hookshot *or* Boots + - 3 Keys *if* **Ganon's Tower - Map Chest** *has* BigKey/Key, *otherwise* 4 Keys + +**Ganon's Tower - Firesnake Room** + +- *each of* + - Hammer *and* Hookshot + - *if one of* + - *any location in* **Ganon's Tower - Randomizer Room** *has* BigKey + - **Ganon's Tower - Firesnake Room** *has* Key + - *then* 2 Keys + - *otherwise* 3 Keys + +**Ganon's Tower - Randomizer Room - Top Left** +**Ganon's Tower - Randomizer Room - Top Right** +**Ganon's Tower - Randomizer Room - Bottom Left** +**Ganon's Tower - Randomizer Room - Bottom Right** + +- *each of* + - Hammer *and* Hookshot + - 3 Keys *if* *any of locations in* **Ganon's Tower - Randomizer Room** *other than self* *has* BigKey, *otherwise* 4 Keys + +**Ganon's Tower - Hope Room - Left** +**Ganon's Tower - Hope Room - Right** + +*Available* + +**Ganon's Tower - Tile Room** + +Somaria + +**Ganon's Tower - Compass Room - Top Left** +**Ganon's Tower - Compass Room - Top Right** +**Ganon's Tower - Compass Room - Bottom Left** +**Ganon's Tower - Compass Room - Bottom Right** + +- *each of* + - Somaria *and* Firerod + - 3 Keys *if* *any of locations in* **Ganon's Tower - Compass Room** *other than self* *has* BigKey, *otherwise* 4 Keys + +**Ganon's Tower - Bob's Chest** + +- *each of* + - 3 Keys + - *one of* + - Hammer *and* Hookshot + - Somaria *and* Firerod + +**Ganon's Tower - Big Chest** + +- *each of* + - BigKey *and 3 Keys + - *one of* + - Hammer *and* Hookshot + - Somaria *and* Firerod + +**Ganon's Tower - Big Key Chest** +**Ganon's Tower - Big Key Room - Left** +**Ganon's Tower - Big Key Room - Right** + +- 3 Keys *and* CanBeatArmos *and one of* + - Hammer *and* Hookshot + - Firerod *and* Somaria + +**Ganon's Tower - Mini Helmasaur Room - Left** +**Ganon's Tower - Mini Helmasaur Room - Right** +**Ganon's Tower - Pre-Moldorm Chest** + +BigKey *and* 3 Keys *and* Bow *and* CanLightTorches + +**Ganon's Tower - Moldorm Chest** + +BigKey *and* 4 Keys *and* Bow *and* CanLightTorches *and* CanBeatMoldorm *and* Hookshot + +**CanBeatArmos** + +- *one of* + - Sword + - Hammer + - Bow + - CanExtendMagic(2) *and either* Somaria *or* Byrna + - CanExtendMagic(4) *and either* Firerod *or* Icerod + +**CanBeatMoldorm** + +Sword *or* Hammer diff --git a/WebRandomizer/ClientApp/src/logiclog/dungeons/HyruleCastleNMG.md b/WebRandomizer/ClientApp/src/logiclog/dungeons/HyruleCastleNMG.md new file mode 100644 index 00000000..d7473933 --- /dev/null +++ b/WebRandomizer/ClientApp/src/logiclog/dungeons/HyruleCastleNMG.md @@ -0,0 +1,35 @@ +***can enter*** + +*Always* + +**Sanctuary** + +*Available* + +**Sewers - Secret Room - Left** +**Sewers - Secret Room - Middle** +**Sewers - Secret Room - Right** + +- *one of* + - CanLiftLight + - Hyrule Castle Key *and either* Lamp or Firerod + +**Sewers - Dark Cross** + +Lamp or Firerod or Sword + +**Hyrule Castle - Map Chest** + +*Available* + +**Hyrule Castle - Boomerang Chest** +**Hyrule Castle - Zelda's Cell** + +Hyrule Castle Key + +**Link's Uncle** +**Secret Passage** + +*if not keysanity* disallow Hyrule Castle Key/Map + +*Available* diff --git a/WebRandomizer/ClientApp/src/logiclog/dungeons/IcePalaceNMG.md b/WebRandomizer/ClientApp/src/logiclog/dungeons/IcePalaceNMG.md new file mode 100644 index 00000000..76d77111 --- /dev/null +++ b/WebRandomizer/ClientApp/src/logiclog/dungeons/IcePalaceNMG.md @@ -0,0 +1,41 @@ +***can enter*** + +MoonPearl *and* CanLiftHeavy *and* CanMeltFreezors + +**Ice Palace - Compass Chest** + +*Available* + +**Ice Palace - Spike Room** + +- *one of* + - Hookshot + - BigKey *and* 1 Key + - Somaria + +**Ice Palace - Map Chest** + +- Hammer *and one of* + - CanLiftLight *and* *can reach* **Ice Palace - Spike Room** + - Somaria + +**Ice Palace - Big Key Chest** + +- *one of* + - Hammer *and* *can reach* **Ice Palace - Spike Room** + - Somaria + +**Ice Palace - Iced T Room** +**Ice Palace - Freezor Chest** + +*Available* + +**Ice Palace - Big Chest** + +BigKey + +**Ice Palace - Kholdstare** + +- Hammer *and one of* + - BigKey *and* CanLiftLight *and also* 2 Keys + - Somaria diff --git a/WebRandomizer/ClientApp/src/logiclog/dungeons/MiseryMire.md b/WebRandomizer/ClientApp/src/logiclog/dungeons/MiseryMire.md index 9dbd689b..1d6c6ac5 100644 --- a/WebRandomizer/ClientApp/src/logiclog/dungeons/MiseryMire.md +++ b/WebRandomizer/ClientApp/src/logiclog/dungeons/MiseryMire.md @@ -1,6 +1,6 @@ ***can enter*** -Medallion access *and* Sword *and* MoonPearl *and either* Boots *or* Hookshot *and also* *can enter* **Dark World Mire** +Medallion access *and* Sword *and* MoonPearl *and* Hookshot *and also* *can enter* **Dark World Mire** **Misery Mire - Main Lobby** **Misery Mire - Map Chest** diff --git a/WebRandomizer/ClientApp/src/logiclog/dungeons/MiseryMireNMG.md b/WebRandomizer/ClientApp/src/logiclog/dungeons/MiseryMireNMG.md new file mode 100644 index 00000000..9dbd689b --- /dev/null +++ b/WebRandomizer/ClientApp/src/logiclog/dungeons/MiseryMireNMG.md @@ -0,0 +1,29 @@ +***can enter*** + +Medallion access *and* Sword *and* MoonPearl *and either* Boots *or* Hookshot *and also* *can enter* **Dark World Mire** + +**Misery Mire - Main Lobby** +**Misery Mire - Map Chest** + +BigKey *or* 1 Key + +**Misery Mire - Bridge Chest** +**Misery Mire - Spike Chest** + +*Available* + +**Misery Mire - Compass Chest** + +CanLightTorches *and* 2 Keys *if* **Misery Mire - Big Key Chest** *has* BigKey, *otherwise* 3 Keys + +**Misery Mire - Big Key Chest** + +CanLightTorches *and* 2 Keys *if* **Misery Mire - Compass Chest** *has* BigKey, *otherwise* 3 Keys + +**Misery Mire - Big Chest** + +BigKey + +**Misery Mire - Vitreous** + +BigKey *and* Lamp *and* Somaria diff --git a/WebRandomizer/ClientApp/src/logiclog/dungeons/PalaceOfDarkness.md b/WebRandomizer/ClientApp/src/logiclog/dungeons/PalaceOfDarkness.md index f7363d53..d4b9f520 100644 --- a/WebRandomizer/ClientApp/src/logiclog/dungeons/PalaceOfDarkness.md +++ b/WebRandomizer/ClientApp/src/logiclog/dungeons/PalaceOfDarkness.md @@ -27,15 +27,15 @@ Bow **Palace of Darkness - Compass Chest** -4 Key *if* Hammer *and* Bow *and* Lamp, *otherwise* 3 +4 Key *if* Hammer *and* Bow, *otherwise* 3 **Palace of Darkness - Harmless Hellway** Can always hold a Key *if having* 5 Keys - *if* "Palace of Darkness - Harmless Hellway" *has* Key - - *then* 4 Keys *if* Hammer *and* Bow *and* Lamp, *otherwise* 3 Keys - - *otherwise* 6 Keys *if* Hammer *and* Bow *and* Lamp, *otherwise* 5 Keys + - *then* 4 Keys *if* Hammer *and* Bow, *otherwise* 3 Keys + - *otherwise* 6 Keys *if* Hammer *and* Bow, *otherwise* 5 Keys **Palace of Darkness - Dark Basement - Left** **Palace of Darkness - Dark Basement - Right** diff --git a/WebRandomizer/ClientApp/src/logiclog/dungeons/PalaceOfDarknessNMG.md b/WebRandomizer/ClientApp/src/logiclog/dungeons/PalaceOfDarknessNMG.md new file mode 100644 index 00000000..823e06fc --- /dev/null +++ b/WebRandomizer/ClientApp/src/logiclog/dungeons/PalaceOfDarknessNMG.md @@ -0,0 +1,56 @@ +***can enter*** + +MoonPearl *and* *can enter* **Dark World North East** + +**Palace of Darkness - Shooter Room** + +*Available* + +**Palace of Darkness - Big Key Chest** + +Can always hold a Key *if having* 5 Keys + +- 1 Key *if* **Palace of Darkness - Big Key Chest** *has* Key, *otherwise* +- 6 Keys *if* Hammer *and* Bow *and one of* Lamp *or* Firerod *or* Sword, *otherwise* 5 Keys + +**Palace of Darkness - Stalfos Basement** +**Palace of Darkness - The Arena - Bridge** + +- *one of* + - 1 Key + - Bow *and* Hammer + +**Palace of Darkness - The Arena - Ledge** +**Palace of Darkness - Map Chest** + +Bow + +**Palace of Darkness - Compass Chest** + +4 Key *if* Hammer *and* Bow, *otherwise* 3 + +**Palace of Darkness - Harmless Hellway** + +Can always hold a Key *if having* 5 Keys + +- *if* "Palace of Darkness - Harmless Hellway" *has* Key + - *then* 4 Keys *if* Hammer *and* Bow, *otherwise* 3 Keys + - *otherwise* 6 Keys *if* Hammer *and* Bow, *otherwise* 5 Keys + +**Palace of Darkness - Dark Basement - Left** +**Palace of Darkness - Dark Basement - Right** + +Lamp *or* Firerod *or* Sword *and also* 4 Keys *if* Hammer *and* Bow, *otherwise* 3 Keys + +**Palace of Darkness - Dark Maze - Top** +**Palace of Darkness - Dark Maze - Bottom** + +Lamp *or* Firerod *or* Sword *and also* 6 Keys *if* Hammer *and* Bow, *otherwise* 5 Keys + +**Palace of Darkness - Big Chest** + +BigKey *and* Lamp *or* Firerod *or* Sword *and also* 6 Keys *if* Hammer *and* Bow, *otherwise* 5 Keys + +**Palace of Darkness - Helmasaur King** + +Lamp *and* Hammer *and* Bow *and* BigKey *and* 6 Keys diff --git a/WebRandomizer/ClientApp/src/logiclog/dungeons/TowerOfHeraNMG.md b/WebRandomizer/ClientApp/src/logiclog/dungeons/TowerOfHeraNMG.md new file mode 100644 index 00000000..77a941d0 --- /dev/null +++ b/WebRandomizer/ClientApp/src/logiclog/dungeons/TowerOfHeraNMG.md @@ -0,0 +1,36 @@ +***can enter*** + +- *each of* + - *one of* + - Mirror + - Hookshot *and* Hammer + - *can enter* **Light World Death Mountain West** + +**Tower of Hera - Basement Cage** +**Tower of Hera - Map Chest** + +*Available* + +**Tower of Hera - Big Key Chest** + +Can always hold the Key + +Key *and* CanLightTorches + +**Tower of Hera - Compass Chest** + +BigKey or Hookshot + +**Tower of Hera - Big Chest** + +BigKey + +**Tower of Hera - Moldorm** + +- CanBeatBoss *and one of* + - BigKey + - Hookshot + +**CanBeatBoss** + +Sword *or* Hammer diff --git a/WebRandomizer/ClientApp/src/logiclog/dungeons/TurtleRockNMG.md b/WebRandomizer/ClientApp/src/logiclog/dungeons/TurtleRockNMG.md new file mode 100644 index 00000000..8c7d70b5 --- /dev/null +++ b/WebRandomizer/ClientApp/src/logiclog/dungeons/TurtleRockNMG.md @@ -0,0 +1,43 @@ +***can enter*** + +Medallion access *and* Sword *and* MoonPearl *and* CanLiftHeavy *and* Hammer *and* Somaria *and* *can enter* **Light World Death Mountain East** + +**Turtle Rock - Compass Chest** + +*Available* + +**Turtle Rock - Roller Room - Left** +**Turtle Rock - Roller Room - Right** + +Firerod + +**Turtle Rock - Chain Chomps** + +1 Key + +**Turtle Rock - Big Key Chest** + +Can always hold a Key *if having* 3 Keys + +- 2 Keys *if keysanity* *or* **Turtle Rock - Big Key Chest** *has* BigKey, *otherwise* +- 3 Keys *if* **Turtle Rock - Big Key Chest** *has* Key, *otherwise* 4 Keys + +**Turtle Rock - Big Chest** +**Turtle Rock - Crystaroller Room** + +BigKey *and* 2 Keys + +**Turtle Rock - Eye Bridge - Top Right** +**Turtle Rock - Eye Bridge - Top Left** +**Turtle Rock - Eye Bridge - Bottom Right** +**Turtle Rock - Eye Bridge - Bottom Left** + +BigKey *and* 3 Keys + +**Turtle Rock - Trinexx** + +BigKey *and* 4 Keys *and* CanBeatBoss + +**CanBeatBoss** + +Firerod *and* Icerod diff --git a/WebRandomizer/ClientApp/src/logiclog/dungeons/index.js b/WebRandomizer/ClientApp/src/logiclog/dungeons/index.js index f74c0e2d..aea852a9 100644 --- a/WebRandomizer/ClientApp/src/logiclog/dungeons/index.js +++ b/WebRandomizer/ClientApp/src/logiclog/dungeons/index.js @@ -1,30 +1,39 @@ import raw from "raw.macro"; -const HyruleCastle = raw('./HyruleCastle.md'); -const EasternPalace = raw('./EasternPalace.md'); +const HyruleCastleNormal = raw('./HyruleCastle.md'); +const HyruleCastleNMG = raw('./HyruleCastleNMG.md'); +const EasternPalaceNormal = raw('./EasternPalace.md'); +const EasternPalaceNMG = raw('./EasternPalaceNMG.md'); const DesertPalace = raw('./DesertPalace.md'); -const TowerOfHera = raw('./TowerOfHera.md'); -const CastleTower = raw('./CastleTower.md'); -const PalaceOfDarkness = raw('./PalaceOfDarkness.md'); +const TowerOfHeraNormal = raw('./TowerOfHera.md'); +const TowerOfHeraNMG = raw('./TowerOfHeraNMG.md'); +const CastleTowerNormal = raw('./CastleTower.md'); +const CastleTowerNMG = raw('./CastleTowerNMG.md'); +const PalaceOfDarknessNormal = raw('./PalaceOfDarkness.md'); +const PalaceOfDarknessNMG = raw('./PalaceOfDarknessNMG.md'); const SwampPalace = raw('./SwampPalace.md'); const SkullWoods = raw('./SkullWoods.md'); const ThievesTown = raw('./ThievesTown.md'); -const IcePalace = raw('./IcePalace.md'); -const MiseryMire = raw('./MiseryMire.md'); -const TurtleRock = raw('./TurtleRock.md'); -const GanonsTower = raw('./GanonsTower.md'); +const IcePalaceNormal = raw('./IcePalace.md'); +const IcePalaceNMG = raw('./IcePalaceNMG.md'); +const MiseryMireNormal = raw('./MiseryMire.md'); +const MiseryMireNMG = raw('./MiseryMireNMG.md'); +const TurtleRockNormal = raw('./TurtleRock.md'); +const TurtleRockNMG = raw('./TurtleRockNMG.md'); +const GanonsTowerNormal = raw('./GanonsTower.md'); +const GanonsTowerNMG = raw('./GanonsTowerNMG.md'); export default [ - { name: 'Hyrule Castle', normal: HyruleCastle }, - { name: 'Eastern Palace', normal: EasternPalace }, + { name: 'Hyrule Castle', normal: HyruleCastleNormal, nmg: HyruleCastleNMG }, + { name: 'Eastern Palace', normal: EasternPalaceNormal, nmg: EasterPalaceNMG }, { name: 'Desert Palace', normal: DesertPalace }, - { name: 'Tower of Hera', normal: TowerOfHera }, - { name: 'Castle Tower', normal: CastleTower }, - { name: 'Palace of Darkness', normal: PalaceOfDarkness }, + { name: 'Tower of Hera', normal: TowerOfHeraNormal, nmg: TowerOfHeraNMG }, + { name: 'Castle Tower', normal: CastleTower, nmg: CastleTowerNMG }, + { name: 'Palace of Darkness', normal: PalaceOfDarknessNormal, nmg: PalaceaOfDarknessNMG }, { name: 'Swamp Palace', normal: SwampPalace }, { name: 'Skull Woods', normal: SkullWoods }, { name: "Thieves' Town", normal: ThievesTown }, - { name: 'Ice Palace', normal: IcePalace }, - { name: 'Misery Mire', normal: MiseryMire }, - { name: 'Turtle Rock', normal: TurtleRock }, - { name: "Ganon's Tower", normal: GanonsTower } + { name: 'Ice Palace', normal: IcePalaceNormal, nmg: IcePalaceNMG }, + { name: 'Misery Mire', normal: MiseryMireNormal, nmg: MiseryMireNMG }, + { name: 'Turtle Rock', normal: TurtleRockNormal, nmg: TurtleRockNMG }, + { name: "Ganon's Tower", normal: GanonsTowerNormal, nmg: GanonsTowerNMG } ]; diff --git a/WebRandomizer/ClientApp/src/logiclog/lightworld/LightWorldDeathMountainWestNMG.md b/WebRandomizer/ClientApp/src/logiclog/lightworld/LightWorldDeathMountainWestNMG.md new file mode 100644 index 00000000..8ad21680 --- /dev/null +++ b/WebRandomizer/ClientApp/src/logiclog/lightworld/LightWorldDeathMountainWestNMG.md @@ -0,0 +1,27 @@ +***can enter*** + +- *one of* + - Flute + - CanLiftLight *and one of* + - Lamp + - Hookshot + - Sword + - CanAccessDeathMountainPortal + +**Ether Tablet** + +- Book *and* MasterSword *and one of* + - Mirror + - Hammer *and* Hookshot + +**Spectacle Rock** + +Mirror + +**Spectacle Rock Cave** + +*Available* + +**Old Man** + +Lamp *or* Sword *or* Hookshot diff --git a/WebRandomizer/ClientApp/src/logiclog/lightworld/LightWorldNorthEastNMG.md b/WebRandomizer/ClientApp/src/logiclog/lightworld/LightWorldNorthEastNMG.md new file mode 100644 index 00000000..034cf8c1 --- /dev/null +++ b/WebRandomizer/ClientApp/src/logiclog/lightworld/LightWorldNorthEastNMG.md @@ -0,0 +1,30 @@ +***can enter*** + +*Always* + +**King Zora** + +*Available* + +**Zora's Ledge** + +Flippers + +**Waterfall Fairy - Left** +**Waterfall Fairy - Right** + +Flippers *or* MoonPearl + +**Potion Shop** + +Mushroom + +**Sahasrahla's Hut - Left** +**Sahasrahla's Hut - Middle** +**Sahasrahla's Hut - Right** + +*Available* + +**Sahasrahla** + +Green Pendant diff --git a/WebRandomizer/ClientApp/src/logiclog/lightworld/LightWorldNorthWestNMG.md b/WebRandomizer/ClientApp/src/logiclog/lightworld/LightWorldNorthWestNMG.md new file mode 100644 index 00000000..f7f14c9d --- /dev/null +++ b/WebRandomizer/ClientApp/src/logiclog/lightworld/LightWorldNorthWestNMG.md @@ -0,0 +1,59 @@ +***can enter*** + +*Always* + +**Master Sword Pedestal** + +Three Pendants + +**Mushroom** +**Lost Woods Hideout** + +*Available* + +**Lumberjack Tree** + +Agahnim *and* Boots + +**Pegasus Rocks** + +Boots + +**Graveyard Ledge** + +Mirror *and* MoonPearl *and* *can enter* **Dark World North West** + +**King's Tomb** + +- Boots *and one of* + - CanLiftHeavy + - Mirror *and* MoonPearl *and* *can enter* **Dark World North West** + +**Kakariko Well - Top** +**Kakariko Well - Left** +**Kakariko Well - Middle** +**Kakariko Well - Right** +**Kakariko Well - Bottom** +**Blind's Hideout - Top** +**Blind's Hideout - Far Left** +**Blind's Hideout - Left** +**Blind's Hideout - Right** +**Blind's Hideout - Far Right** +**Bottle Merchant** +**Chicken House** +**Kakariko Tavern** + +*Available* + +**Sick Kid** + +Bottle + +**Magic Bat** + +- *one of* + - Powder + - Somaria *and* Mushroom + - *and one of* + - Hammer + - MoonPearl *and* Mirror *and* CanLiftHeavy diff --git a/WebRandomizer/ClientApp/src/logiclog/lightworld/LightWorldSouthNMG.md b/WebRandomizer/ClientApp/src/logiclog/lightworld/LightWorldSouthNMG.md new file mode 100644 index 00000000..25ba6b3d --- /dev/null +++ b/WebRandomizer/ClientApp/src/logiclog/lightworld/LightWorldSouthNMG.md @@ -0,0 +1,62 @@ +***can enter*** + +*Always* + +**Maze Race** + +*Available* + +**Library** + +Boots + +**Flute Spot** + +Shovel + +**South of Grove** + +Mirror *and* *can enter* **Dark World South** + +**Link's House** +**Aginah's Cave** +**Mini Moldorm Cave - Far Left** +**Mini Moldorm Cave - Left** +**Mini Moldorm Cave - NPC** +**Mini Moldorm Cave - Right** +**Mini Moldorm Cave - Far Right** + +*Available* + +**Desert Ledge** + +*can enter* **Desert Palace** + +**Checkerboard Cave** + +- Mirror *and* CanLiftLight *and one of* + - Flute *and* CanLiftHeavy + - CanAccessMiseryMirePortal + +**Bombos Tablet** + +Book *and* MasterSword *and* Mirror *and* *can enter* **Dark World South** + +**Floodgate Chest** +**Sunken Treasure** + +*Available* + +**Lake Hylia Island** + +- Flippers *and* MoonPearl *and* Mirror *and one of* + - *can enter* **Dark World South** + - *can enter* **Dark World North East** + +**Hobo** + +*Available* + +**Ice Rod Cave** + +*Available* diff --git a/WebRandomizer/ClientApp/src/logiclog/lightworld/index.js b/WebRandomizer/ClientApp/src/logiclog/lightworld/index.js index de1f2570..d61d6edf 100644 --- a/WebRandomizer/ClientApp/src/logiclog/lightworld/index.js +++ b/WebRandomizer/ClientApp/src/logiclog/lightworld/index.js @@ -1,14 +1,18 @@ import raw from "raw.macro"; -const LightWorldDeathMountainWest = raw('./LightWorldDeathMountainWest.md'); +const LightWorldDeathMountainWestNormal = raw('./LightWorldDeathMountainWest.md'); +const LightWorldDeathMountainWestNMG = raw('./LightWorldDeathMountainWestNMG.md'); const LightWorldDeathMountainEast = raw('./LightWorldDeathMountainEast.md'); -const LightWorldNorthWest = raw('./LightWorldNorthWest.md'); -const LightWorldNorthEast = raw('./LightWorldNorthEast.md'); -const LightWorldSouth = raw('./LightWorldSouth.md'); +const LightWorldNorthWestNormal = raw('./LightWorldNorthWest.md'); +const LightWorldNorthWestNMG = raw('./LightWorldNorthWestNMG.md'); +const LightWorldNorthEastNormal = raw('./LightWorldNorthEast.md'); +const LightWorldNorthEastNMG = raw('./LightWorldNorthEastNMG.md'); +const LightWorldSouthNormal = raw('./LightWorldSouth.md'); +const LightWorldSouthNMG = raw('./LightWorldSouthNMG.md'); export default [ - { name: 'Death Mountain West', normal: LightWorldDeathMountainWest }, + { name: 'Death Mountain West', normal: LightWorldDeathMountainWestNormal, nmg: LightWorldDeathMountainWestNMG }, { name: 'Death Mountain East', normal: LightWorldDeathMountainEast }, - { name: 'North West', normal: LightWorldNorthWest }, - { name: 'North East', normal: LightWorldNorthEast }, - { name: 'South', normal: LightWorldSouth } + { name: 'North West', normal: LightWorldNorthWestNormal, nmg: LightWorldNorthWestNMG }, + { name: 'North East', normal: LightWorldNorthEastNormal, nmg: LightWorldNorthEastNMG }, + { name: 'South', normal: LightWorldSouthNormal, nmg: LightWorldSouthNMG } ]; From 20b3415ce7cfe8ff31eba27148569cca2d8bb31b Mon Sep 17 00:00:00 2001 From: ken Date: Tue, 27 Apr 2021 18:34:38 -0700 Subject: [PATCH 4/5] fix misspelled dungeon names; add NMG logic log level --- .../ClientApp/src/logiclog/LogicLog.jsx | 36 ++++++++++++++----- .../ClientApp/src/logiclog/dungeons/index.js | 6 ++-- 2 files changed, 31 insertions(+), 11 deletions(-) diff --git a/WebRandomizer/ClientApp/src/logiclog/LogicLog.jsx b/WebRandomizer/ClientApp/src/logiclog/LogicLog.jsx index 5462cd17..350ae94f 100644 --- a/WebRandomizer/ClientApp/src/logiclog/LogicLog.jsx +++ b/WebRandomizer/ClientApp/src/logiclog/LogicLog.jsx @@ -92,11 +92,12 @@ Green, and Pink Brinstar are weighted down slightly. export default function LogicLog() { const [showIntro, setShowIntro] = useState(false); const [SMLogic, setSMLogic] = useState('normal'); + const [Z3Logic, setZ3Logic] = useState('normal'); const [tabState, setTabState] = useState({}); const parts = active(tabState, content); const bars = initial(parts); - const { normal, hard } = last(parts); + const { normal, nmg, hard } = last(parts); const Icon = showIntro ? DashSquareFill : PlusSquareFill; @@ -112,7 +113,7 @@ export default function LogicLog() { ); - const logicButton = (logic, name) => ( + const SMlogicButton = (logic, name) => ( ); - - const toggle = ( + const SMtoggle = ( - {logicButton(SMLogic, 'normal')} - {logicButton(SMLogic, 'hard')} + {SMlogicButton(SMLogic, 'normal')} + {SMlogicButton(SMLogic, 'hard')} + + ); + + const Z3logicButton = (logic, name) => ( + + setZ3Logic(name)} + > + {capitalize(name)} + + + ); + const Z3toggle = ( + + {Z3logicButton(Z3Logic, 'normal')} + {Z3logicButton(Z3Logic, 'nmg')} ); @@ -151,7 +168,7 @@ export default function LogicLog() { )) } - + ); @@ -165,7 +182,10 @@ export default function LogicLog() { - {toggle} + {SMtoggle} + + + {Z3toggle} diff --git a/WebRandomizer/ClientApp/src/logiclog/dungeons/index.js b/WebRandomizer/ClientApp/src/logiclog/dungeons/index.js index aea852a9..8883730b 100644 --- a/WebRandomizer/ClientApp/src/logiclog/dungeons/index.js +++ b/WebRandomizer/ClientApp/src/logiclog/dungeons/index.js @@ -24,11 +24,11 @@ const GanonsTowerNMG = raw('./GanonsTowerNMG.md'); export default [ { name: 'Hyrule Castle', normal: HyruleCastleNormal, nmg: HyruleCastleNMG }, - { name: 'Eastern Palace', normal: EasternPalaceNormal, nmg: EasterPalaceNMG }, + { name: 'Eastern Palace', normal: EasternPalaceNormal, nmg: EasternPalaceNMG }, { name: 'Desert Palace', normal: DesertPalace }, { name: 'Tower of Hera', normal: TowerOfHeraNormal, nmg: TowerOfHeraNMG }, - { name: 'Castle Tower', normal: CastleTower, nmg: CastleTowerNMG }, - { name: 'Palace of Darkness', normal: PalaceOfDarknessNormal, nmg: PalaceaOfDarknessNMG }, + { name: 'Castle Tower', normal: CastleTowerNormal, nmg: CastleTowerNMG }, + { name: 'Palace of Darkness', normal: PalaceOfDarknessNormal, nmg: PalaceOfDarknessNMG }, { name: 'Swamp Palace', normal: SwampPalace }, { name: 'Skull Woods', normal: SkullWoods }, { name: "Thieves' Town", normal: ThievesTown }, From 366903d9e55daa1a8c2879a3bcdaddd7bc8c3389 Mon Sep 17 00:00:00 2001 From: ken Date: Tue, 27 Apr 2021 19:13:46 -0700 Subject: [PATCH 5/5] fix file download name --- Randomizer.SMZ3/Config.cs | 4 ++-- Randomizer.SMZ3/Patch.cs | 2 +- WebRandomizer/ClientApp/src/components/Patch.jsx | 3 ++- .../ClientApp/src/components/util/DownloadInfoTooltip.jsx | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Randomizer.SMZ3/Config.cs b/Randomizer.SMZ3/Config.cs index 0da5c95d..c1294a84 100644 --- a/Randomizer.SMZ3/Config.cs +++ b/Randomizer.SMZ3/Config.cs @@ -20,8 +20,8 @@ enum Z3Logic { Normal, [Description("No major glitches")] Nmg, - [Description("Overworld glitches")] - Owg, + // [Description("Overworld glitches")] + // Owg, } [DefaultValue(Normal)] diff --git a/Randomizer.SMZ3/Patch.cs b/Randomizer.SMZ3/Patch.cs index f8fbd05c..d4dc9a2d 100644 --- a/Randomizer.SMZ3/Patch.cs +++ b/Randomizer.SMZ3/Patch.cs @@ -609,7 +609,7 @@ void WriteCommonFlags() { void WriteGameTitle() { var z3Glitch = myWorld.Config.Z3Logic switch { Z3Logic.Nmg => "N", - Z3Logic.Owg => "O", + // Z3Logic.Owg => "O", _ => "C", }; var smGlitch = myWorld.Config.SMLogic switch { diff --git a/WebRandomizer/ClientApp/src/components/Patch.jsx b/WebRandomizer/ClientApp/src/components/Patch.jsx index 58c0c0a6..39d0d724 100644 --- a/WebRandomizer/ClientApp/src/components/Patch.jsx +++ b/WebRandomizer/ClientApp/src/components/Patch.jsx @@ -132,8 +132,9 @@ export default function Patch(props) { ]); function smz3Parts({ z3logic, smlogic, swordlocation, morphlocation, keyshuffle }) { + let z3l = z3logic == 'nmg' ? 'g' : 'n'; return [ - `ZL{z3logic[0]}+SL${smlogic[0]}`, + `ZL${z3l}+SL${smlogic[0]}`, swordlocation && swordlocation !== 'randomized' ? `S${swordlocation[0]}` : null, morphlocation && morphlocation !== 'randomized' ? `M${morphlocation[0]}` : null, keyshuffle && keyshuffle !== 'none' ? `K${keyshuffle[0]}` : null diff --git a/WebRandomizer/ClientApp/src/components/util/DownloadInfoTooltip.jsx b/WebRandomizer/ClientApp/src/components/util/DownloadInfoTooltip.jsx index e9623d97..3d5b67c9 100644 --- a/WebRandomizer/ClientApp/src/components/util/DownloadInfoTooltip.jsx +++ b/WebRandomizer/ClientApp/src/components/util/DownloadInfoTooltip.jsx @@ -11,7 +11,7 @@ Filename parts legend: * \`SMZ3\`: Super Metroid / Link to the Past Randomizer * \`V\`: Major.Minor version * \`ZL+SL\`: LttP and SM logic - * LttP: Normal, \`n\` + * LttP: Normal, \`n\`, or Nmg, \`g\` * SM: Normal, \`n\`, or Hard, \`h\` * \`S\`: Sword location * Randomized if missing