remove some missed nonlocal world references
that would refer to a different world after copying it It is static data though, so it hasn't created an actual bug (yet)
This commit is contained in:
parent
3d93f659e3
commit
91c0650b42
|
@ -25,9 +25,9 @@ class MultiWorld():
|
||||||
er_seeds: Dict[int, str]
|
er_seeds: Dict[int, str]
|
||||||
|
|
||||||
def __init__(self, players: int):
|
def __init__(self, players: int):
|
||||||
|
# TODO: move per-player settings into new classes per game-type instead of clumping it all together here
|
||||||
|
|
||||||
self.random = random.Random() # world-local random state is saved in case of future use a
|
self.random = random.Random() # world-local random state is saved for multiple generations running concurrently
|
||||||
# persistently running program with multiple worlds rolling concurrently
|
|
||||||
self.players = players
|
self.players = players
|
||||||
self.teams = 1
|
self.teams = 1
|
||||||
self.algorithm = 'balanced'
|
self.algorithm = 'balanced'
|
||||||
|
|
|
@ -85,7 +85,7 @@ def set_rules(world, player):
|
||||||
|
|
||||||
set_trock_key_rules(world, player)
|
set_trock_key_rules(world, player)
|
||||||
|
|
||||||
set_rule(ganons_tower, lambda state: state.has_crystals(world.crystals_needed_for_gt[player], player))
|
set_rule(ganons_tower, lambda state: state.has_crystals(state.world.crystals_needed_for_gt[player], player))
|
||||||
if world.mode[player] != 'inverted' and world.logic[player] in ['owglitches', 'nologic']:
|
if world.mode[player] != 'inverted' and world.logic[player] in ['owglitches', 'nologic']:
|
||||||
add_rule(world.get_entrance('Ganons Tower', player), lambda state: state.world.get_entrance('Ganons Tower Ascent', player).can_reach(state), 'or')
|
add_rule(world.get_entrance('Ganons Tower', player), lambda state: state.world.get_entrance('Ganons Tower Ascent', player).can_reach(state), 'or')
|
||||||
|
|
||||||
|
@ -389,11 +389,11 @@ def global_rules(world, player):
|
||||||
ganon = world.get_location('Ganon', player)
|
ganon = world.get_location('Ganon', player)
|
||||||
set_rule(ganon, lambda state: GanonDefeatRule(state, player))
|
set_rule(ganon, lambda state: GanonDefeatRule(state, player))
|
||||||
if world.goal[player] in ['ganontriforcehunt', 'localganontriforcehunt']:
|
if world.goal[player] in ['ganontriforcehunt', 'localganontriforcehunt']:
|
||||||
add_rule(ganon, lambda state: state.has_triforce_pieces(world.treasure_hunt_count[player], player))
|
add_rule(ganon, lambda state: state.has_triforce_pieces(state.world.treasure_hunt_count[player], player))
|
||||||
elif world.goal[player] == 'ganonpedestal':
|
elif world.goal[player] == 'ganonpedestal':
|
||||||
add_rule(world.get_location('Ganon', player), lambda state: state.can_reach('Master Sword Pedestal', 'Location', player))
|
add_rule(world.get_location('Ganon', player), lambda state: state.can_reach('Master Sword Pedestal', 'Location', player))
|
||||||
else:
|
else:
|
||||||
add_rule(ganon, lambda state: state.has_crystals(world.crystals_needed_for_ganon[player], player))
|
add_rule(ganon, lambda state: state.has_crystals(state.world.crystals_needed_for_ganon[player], player))
|
||||||
set_rule(world.get_entrance('Ganon Drop', player), lambda state: state.has_beam_sword(player)) # need to damage ganon to get tiles to drop
|
set_rule(world.get_entrance('Ganon Drop', player), lambda state: state.has_beam_sword(player)) # need to damage ganon to get tiles to drop
|
||||||
|
|
||||||
set_rule(world.get_location('Flute Activation Spot', player), lambda state: state.has('Flute', player))
|
set_rule(world.get_location('Flute Activation Spot', player), lambda state: state.has('Flute', player))
|
||||||
|
|
Loading…
Reference in New Issue