Skip to content

Commit 519dffd

Browse files
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 <[email protected]>
1 parent d124df7 commit 519dffd

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

worlds/tloz/Locations.py

+4
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@
105105
"Level 7 Bomb Drop (Dodongos)", "Level 7 Rupee Drop (Goriyas North)"
106106
]
107107

108+
gleeok_locations = [
109+
"Level 4 Boss", "Level 4 Triforce", "Level 8 Boss", "Level 8 Triforce"
110+
]
111+
108112
floor_location_game_offsets_early = {
109113
"Level 1 Item (Bow)": 0x7F,
110114
"Level 1 Item (Boomerang)": 0x44,

worlds/tloz/Rules.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from typing import TYPE_CHECKING
22

33
from worlds.generic.Rules import add_rule
4-
from .Locations import food_locations, shop_locations
4+
from .Locations import food_locations, shop_locations, gleeok_locations
55
from .ItemPool import dangerous_weapon_locations
66
from .Options import StartingPosition
77

@@ -80,6 +80,10 @@ def set_rules(tloz_world: "TLoZWorld"):
8080
add_rule(world.get_location(location, player),
8181
lambda state: state.has("Food", player))
8282

83+
for location in gleeok_locations:
84+
add_rule(world.get_location(location, player),
85+
lambda state: state.has_group("swords", player) or state.has("Magical Rod", player))
86+
8387
add_rule(world.get_location("Level 8 Item (Magical Key)", player),
8488
lambda state: state.has("Bow", player) and state.has_group("arrows", player))
8589
if options.ExpandedPool:

0 commit comments

Comments
 (0)