Skip to content

Commit

Permalink
TLOZ: Fix Logic for Gleeok guarded locations (ArchipelagoMW#2734)
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
2 people authored and EmilyV99 committed Apr 15, 2024
1 parent 2bcaf5c commit 590ba75
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions worlds/tloz/Locations.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@
"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,
Expand Down
6 changes: 5 additions & 1 deletion worlds/tloz/Rules.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 590ba75

Please sign in to comment.