Skip to content

Commit

Permalink
Pokémon R/B: Fix incompatible option combination (ArchipelagoMW#2356)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alchav authored and FlySniper committed Nov 14, 2023
1 parent c5f4174 commit 42db675
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions worlds/pokemon_rb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,13 +463,17 @@ def number_of_zones(mon):
locs = {self.multiworld.get_location("Fossil - Choice A", self.player),
self.multiworld.get_location("Fossil - Choice B", self.player)}

for loc in locs:
if not self.multiworld.key_items_only[self.player]:
rule = None
if self.multiworld.fossil_check_item_types[self.player] == "key_items":
add_item_rule(loc, lambda i: i.advancement)
rule = lambda i: i.advancement
elif self.multiworld.fossil_check_item_types[self.player] == "unique_items":
add_item_rule(loc, lambda i: i.name in item_groups["Unique"])
rule = lambda i: i.name in item_groups["Unique"]
elif self.multiworld.fossil_check_item_types[self.player] == "no_key_items":
add_item_rule(loc, lambda i: not i.advancement)
rule = lambda i: not i.advancement
if rule:
for loc in locs:
add_item_rule(loc, rule)

for mon in ([" ".join(self.multiworld.get_location(
f"Oak's Lab - Starter {i}", self.player).item.name.split(" ")[1:]) for i in range(1, 4)]
Expand Down

0 comments on commit 42db675

Please sign in to comment.