Individual settings: goal

This commit is contained in:
Bonta-kun
2019-12-16 15:27:20 +01:00
parent 9ca755d5b2
commit c1788c070d
8 changed files with 36 additions and 37 deletions

View File

@@ -42,10 +42,10 @@ def set_rules(world, player):
else:
raise NotImplementedError('Not implemented yet')
if world.goal == 'dungeons':
if world.goal[player] == 'dungeons':
# require all dungeons to beat ganon
add_rule(world.get_location('Ganon', player), lambda state: state.can_reach('Master Sword Pedestal', 'Location', player) and state.has('Beat Agahnim 1', player) and state.has('Beat Agahnim 2', player) and state.has_crystals(7, player))
elif world.goal == 'ganon':
elif world.goal[player] == 'ganon':
# require aga2 to beat ganon
add_rule(world.get_location('Ganon', player), lambda state: state.has('Beat Agahnim 2', player))
@@ -106,7 +106,7 @@ def item_name(state, location, player):
return (location.item.name, location.item.player)
def global_rules(world, player):
if world.goal == 'triforcehunt':
if world.goal[player] == 'triforcehunt':
for location in world.get_locations():
if location.player != player:
forbid_item(location, 'Triforce Piece', player)