Skip to content

Commit

Permalink
Merge branch 'osrs-entrance-fix' of https://github.com/digiholic/Arch…
Browse files Browse the repository at this point in the history
…ipelago into osrs-entrance-fix
  • Loading branch information
digiholic committed Nov 19, 2024
2 parents 0ccf224 + e4bb4b4 commit 9220560
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions worlds/osrs/Rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,14 +211,14 @@ def get_skill_rule(skill, level, player, options) -> CollectionRule:
def generate_special_rules_for(entrance, region_row, outbound_region_name, player, options):
if outbound_region_name == RegionNames.Cooks_Guild:
add_rule(entrance, get_cooking_skill_rule(32, player, options))
if outbound_region_name == RegionNames.Crafting_Guild:
elif outbound_region_name == RegionNames.Crafting_Guild:
add_rule(entrance, get_crafting_skill_rule(40, player, options))
if outbound_region_name == RegionNames.Corsair_Cove:
elif outbound_region_name == RegionNames.Corsair_Cove:
# Need to be able to start Corsair Curse in addition to having the item
add_rule(entrance, lambda state: state.can_reach(RegionNames.Falador_Farm, "Region", player))
if outbound_region_name == "Camdozaal*":
elif outbound_region_name == "Camdozaal*":
add_rule(entrance, lambda state: state.has(ItemNames.QP_Below_Ice_Mountain, player))
if region_row.name == "Dwarven Mountain Pass" and outbound_region_name == "Anvil*":
elif region_row.name == "Dwarven Mountain Pass" and outbound_region_name == "Anvil*":
add_rule(entrance, lambda state: state.has(ItemNames.QP_Dorics_Quest, player))

# Special logic for canoes
Expand Down
2 changes: 1 addition & 1 deletion worlds/osrs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def create_regions(self) -> None:
entrance.connect(self.region_name_to_data[parsed_outbound])

item_name = self.region_rows_by_name[parsed_outbound].itemReq
entrance.access_rule = lambda state, item_name=item_name.replace("*",""): state.has(item_name.replace("*",""), self.player)
entrance.access_rule = lambda state, item_name=item_name.replace("*",""): state.has(item_name, self.player)
generate_special_rules_for(entrance, region_row, outbound_region_name, self.player, self.options)

for resource_region in region_row.resources:
Expand Down

0 comments on commit 9220560

Please sign in to comment.