Skip to content

Commit

Permalink
Wargroove 2: 1.1 working with the new PR changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
FlySniper committed Sep 5, 2024
1 parent 1e46141 commit 618e39e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions worlds/wargroove2/Levels.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ def define_access_rules(self, world: "Wargroove2World", player: int, additional_
loc_id = location_table.get(location_name, 0)
extras = 1
if loc_id is not None and location_name.endswith("Victory"):
extras = world.worlds[player].options.victory_locations.value
extras = world.options.victory_locations.value
elif loc_id is not None:
extras = world.worlds[player].options.objective_locations.value
extras = world.options.objective_locations.value
for i in range(1, extras):
set_rule(world.get_location(location_name + f" Extra {i}", player), lambda state, rule=rule:
state.can_reach_region(self.region_name, player) and rule(state)() and additional_rule(state))
set_rule(world.get_location(location_name + f" Extra {i}"), lambda state, rule=rule:
state.can_reach_region(self.region_name, player) and rule(state, player)() and additional_rule(state))
region = world.get_region(self.region_name)
set_region_exit_rules(region, world, player, self.victory_locations, operator='and')
set_region_exit_rules(region, world, self.victory_locations, operator='and')

def define_region(self, name: str, multiworld: MultiWorld, player: int, exits=None) -> Region:
self.region_name = name
Expand Down
2 changes: 1 addition & 1 deletion worlds/wargroove2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def create_items(self) -> None:

# Matching number of unfilled locations with filler items
total_locations = 0
total_locations += self.get_total_locations_in_level(self.first_level)
total_locations += self.get_total_locations_in_level(first_level)

for level in self.level_list[0:LEVEL_COUNT]:
total_locations += self.get_total_locations_in_level(level)
Expand Down

0 comments on commit 618e39e

Please sign in to comment.