Skip to content

Commit

Permalink
Fix Twins and Clairvoya access rule
Browse files Browse the repository at this point in the history
  • Loading branch information
BootsinSoots committed Nov 18, 2024
1 parent eaa7712 commit 8109bee
Showing 1 changed file with 18 additions and 21 deletions.
39 changes: 18 additions & 21 deletions worlds/luigimansion/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,28 +360,26 @@ def _set_optional_locations(self):
for location, data in PORTRAIT_LOCATION_TABLE.items():
region = self.multiworld.get_region(data.region, self.player)
entry = LMLocation(self.player, location, region, data)
if entry.code == 624:
add_rule(entry, lambda state: state.has_group("Medal", self.player), "and")
elif entry.code == 627:
add_rule(entry,
lambda state: state.has_group("Mario Item", self.player, self.options.mario_items), "and")
if len(entry.access) != 0:
if entry.code == 624:
add_rule(entry, lambda state: state.has_group("Medal", self.player), "and")
elif entry.code == 627:
add_rule(entry,
lambda state: state.has_group("Mario Item", self.player, self.options.mario_items), "and")
else:
for item in entry.access: add_rule(entry, lambda state: state.has(item, self.player), "and")
for item in entry.access: add_rule(entry, lambda state: state.has(item, self.player), "and")
region.locations.append(entry)
if self.options.boosanity:
for location, data in BOO_LOCATION_TABLE.items():
region = self.multiworld.get_region(data.region, self.player)
entry = LMLocation(self.player, location, region, data)
add_rule(entry, lambda state: state.has("Boo Radar", self.player), "and")
if entry.code == 675:
add_rule(entry, lambda state: state.has_group("Medal", self.player), "and")
elif entry.code == 679:
add_rule(entry,
lambda state: state.has_group("Mario Item", self.player, self.options.mario_items), "and")
if len(entry.access) != 0:
if entry.code == 675:
add_rule(entry, lambda state: state.has_group("Medal", self.player), "and")
elif entry.code == 679:
add_rule(entry,
lambda state: state.has_group("Mario Item", self.player, self.options.mario_items), "and")
else:
for item in entry.access: add_rule(entry, lambda state: state.has(item, self.player), "and")
for item in entry.access: add_rule(entry, lambda state: state.has(item, self.player), "and")
region.locations.append(entry)
else:
for location, data in BOO_LOCATION_TABLE.items():
Expand All @@ -391,14 +389,13 @@ def _set_optional_locations(self):
entry.code = None
entry.place_locked_item(Item("Boo", ItemClassification.progression, None, self.player))
add_rule(entry, lambda state: state.has("Boo Radar", self.player), "and")
if entry.code == 675:
add_rule(entry, lambda state: state.has_group("Medal", self.player), "and")
elif entry.code == 679:
add_rule(entry,
lambda state: state.has_group("Mario Item", self.player, self.options.mario_items), "and")
if len(entry.access) != 0:
if entry.code == 675:
add_rule(entry, lambda state: state.has_group("Medal", self.player), "and")
elif entry.code == 679:
add_rule(entry,
lambda state: state.has_group("Mario Item", self.player, self.options.mario_items), "and")
else:
for item in entry.access: add_rule(entry, lambda state: state.has(item, self.player), "and")
for item in entry.access: add_rule(entry, lambda state: state.has(item, self.player), "and")
region.locations.append(entry)
if self.options.goal == 1:
rankcalc = 0
Expand Down

0 comments on commit 8109bee

Please sign in to comment.