From 592ca0310c452d948af93ae8083a8da2ec7688d5 Mon Sep 17 00:00:00 2001 From: t3hf1gm3nt <59876300+t3hf1gm3nt@users.noreply.github.com> Date: Thu, 2 May 2024 17:29:07 -0400 Subject: [PATCH] [TLOZ]: Fix rings classification, so they are actually considered for logic We have a whole set of rules set up (Lines 31-38 of Rules.py) to make it so players are not expected to go into dungeons without a certain level of defense, which is n-1 heart containers for each level. We also had it set up that blue ring would reduce the number of containers expected by half, and red ring by a quarter...but currently both rings are classified as useful, meaning they aren't actually considered for logic. I was informed about this a while ago and thought I had already submitted a fix for it, but apparently I forgor. I'm rectifying that now, changing the classification for both rings to progression and also adding a comment to the loop that sets up this defense rule in Rules.py as I kept losing track of where it was. --- worlds/tloz/Items.py | 4 ++-- worlds/tloz/Rules.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/worlds/tloz/Items.py b/worlds/tloz/Items.py index d896d11d770b..b421b740012c 100644 --- a/worlds/tloz/Items.py +++ b/worlds/tloz/Items.py @@ -24,7 +24,7 @@ class ItemData(typing.NamedTuple): "Red Candle": ItemData(107, progression), "Book of Magic": ItemData(108, progression), "Magical Key": ItemData(109, useful), - "Red Ring": ItemData(110, useful), + "Red Ring": ItemData(110, progression), "Silver Arrow": ItemData(111, progression), "Sword": ItemData(112, progression), "White Sword": ItemData(113, progression), @@ -37,7 +37,7 @@ class ItemData(typing.NamedTuple): "Food": ItemData(120, progression), "Water of Life (Blue)": ItemData(121, useful), "Water of Life (Red)": ItemData(122, useful), - "Blue Ring": ItemData(123, useful), + "Blue Ring": ItemData(123, progression), "Triforce Fragment": ItemData(124, progression), "Power Bracelet": ItemData(125, useful), "Small Key": ItemData(126, filler), diff --git a/worlds/tloz/Rules.py b/worlds/tloz/Rules.py index ceb1041ba576..39c3b954f0d4 100644 --- a/worlds/tloz/Rules.py +++ b/worlds/tloz/Rules.py @@ -28,6 +28,7 @@ def set_rules(tloz_world: "TLoZWorld"): or location.name not in dangerous_weapon_locations: add_rule(world.get_location(location.name, player), lambda state: state.has_group("weapons", player)) + # This part of the loop sets up an expected amount of defense needed for each dungeon if i > 0: # Don't need an extra heart for Level 1 add_rule(world.get_location(location.name, player), lambda state, hearts=i: state.has("Heart Container", player, hearts) or