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>
This commit is contained in:
t3hf1gm3nt 2024-03-03 11:59:31 -05:00 committed by GitHub
parent d124df72e4
commit 519dffdb73
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 1 deletions

View File

@ -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,

View File

@ -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: