From 618e39e6245ddc5fe470a436ffe29a4df8278d29 Mon Sep 17 00:00:00 2001 From: Fly Sniper Date: Thu, 5 Sep 2024 11:52:29 -0400 Subject: [PATCH] Wargroove 2: 1.1 working with the new PR changes. --- worlds/wargroove2/Levels.py | 10 +++++----- worlds/wargroove2/__init__.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/worlds/wargroove2/Levels.py b/worlds/wargroove2/Levels.py index 596d5ac484b6..f0ad6acbb375 100644 --- a/worlds/wargroove2/Levels.py +++ b/worlds/wargroove2/Levels.py @@ -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 diff --git a/worlds/wargroove2/__init__.py b/worlds/wargroove2/__init__.py index 18d615885305..5bd8911713d6 100644 --- a/worlds/wargroove2/__init__.py +++ b/worlds/wargroove2/__init__.py @@ -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)