From 519dffdb7371c8f7769124713de8861de59881dd Mon Sep 17 00:00:00 2001 From: t3hf1gm3nt <59876300+t3hf1gm3nt@users.noreply.github.com> Date: Sun, 3 Mar 2024 11:59:31 -0500 Subject: [PATCH] TLOZ: Fix Logic for Gleeok guarded locations (#2734) Turns out you can't kill Gleeok with bombs or a candle as I happened to find out in a community async. While I'll be fine, a rare combination of settings could put all 4 possible weapons (the three levels of sword and the Magical Rod) to kill Gleeoks behind killing Gleeoks. This fix should prevent that from happening. Note: Even though there are technically 5 weapons that can kill Gleeok in the pool because at the moment we have an extra copy of the base Sword, I want to future-proof this incase we make changes to the item pool later. Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com> --- worlds/tloz/Locations.py | 4 ++++ worlds/tloz/Rules.py | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/worlds/tloz/Locations.py b/worlds/tloz/Locations.py index 3e46c438..5b30357c 100644 --- a/worlds/tloz/Locations.py +++ b/worlds/tloz/Locations.py @@ -105,6 +105,10 @@ food_locations = [ "Level 7 Bomb Drop (Dodongos)", "Level 7 Rupee Drop (Goriyas North)" ] +gleeok_locations = [ + "Level 4 Boss", "Level 4 Triforce", "Level 8 Boss", "Level 8 Triforce" +] + floor_location_game_offsets_early = { "Level 1 Item (Bow)": 0x7F, "Level 1 Item (Boomerang)": 0x44, diff --git a/worlds/tloz/Rules.py b/worlds/tloz/Rules.py index b94002f2..f8b21bff 100644 --- a/worlds/tloz/Rules.py +++ b/worlds/tloz/Rules.py @@ -1,7 +1,7 @@ from typing import TYPE_CHECKING from worlds.generic.Rules import add_rule -from .Locations import food_locations, shop_locations +from .Locations import food_locations, shop_locations, gleeok_locations from .ItemPool import dangerous_weapon_locations from .Options import StartingPosition @@ -80,6 +80,10 @@ def set_rules(tloz_world: "TLoZWorld"): add_rule(world.get_location(location, player), lambda state: state.has("Food", player)) + for location in gleeok_locations: + add_rule(world.get_location(location, player), + lambda state: state.has_group("swords", player) or state.has("Magical Rod", player)) + add_rule(world.get_location("Level 8 Item (Magical Key)", player), lambda state: state.has("Bow", player) and state.has_group("arrows", player)) if options.ExpandedPool: