Core: Remove ALTTP cruft from BaseClasses (#1451)

This commit is contained in:
zig-for
2023-03-03 23:23:52 -08:00
committed by GitHub
parent a4b61118cf
commit d74c4c4c94
9 changed files with 339 additions and 352 deletions

View File

@@ -10,6 +10,7 @@ from worlds.alttp.EntranceShuffle import connect_entrance
from Fill import FillError
from worlds.alttp.Items import ItemFactory, GetBeemizerItem
from worlds.alttp.Options import smallkey_shuffle, compass_shuffle, bigkey_shuffle, map_shuffle
from .StateHelpers import has_triforce_pieces, has_melee_weapon
# This file sets the item pools for various modes. Timed modes and triforce hunt are enforced first, and then extra items are specified per mode to fill in the remaining space.
# Some basic items that various modes require are placed here, including pendants and crystals. Medallion requirements for the two relevant entrances are also decided.
@@ -286,7 +287,7 @@ def generate_itempool(world):
region = world.get_region('Light World', player)
loc = ALttPLocation(player, "Murahdahla", parent=region)
loc.access_rule = lambda state: state.has_triforce_pieces(state.multiworld.treasure_hunt_count[player], player)
loc.access_rule = lambda state: has_triforce_pieces(state, player)
region.locations.append(loc)
world.clear_location_cache()
@@ -327,7 +328,7 @@ def generate_itempool(world):
for item in precollected_items:
world.push_precollected(ItemFactory(item, player))
if world.mode[player] == 'standard' and not world.state.has_melee_weapon(player):
if world.mode[player] == 'standard' and not has_melee_weapon(world.state, player):
if "Link's Uncle" not in placed_items:
found_sword = False
found_bow = False