Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DS3: Accessibility error fix #1983

Merged
merged 2 commits into from
Jul 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions worlds/dark_souls_3/Locations.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class DS3LocationCategory(IntEnum):
MISC = 8
HEALTH = 9
PROGRESSIVE_ITEM = 10
EVENT = 11


class DS3LocationData(NamedTuple):
Expand Down
13 changes: 9 additions & 4 deletions worlds/dark_souls_3/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def create_regions(self):
progressive_location_table += location_tables["Progressive Items DLC"]

# Create Vanilla Regions
regions = {}
regions: Dict[str, Region] = {}
regions["Menu"] = self.create_region("Menu", progressive_location_table)
regions.update({region_name: self.create_region(region_name, location_tables[region_name]) for region_name in [
"Firelink Shrine",
Expand All @@ -124,6 +124,11 @@ def create_regions(self):
"Kiln of the First Flame",
]})

# Adds Path of the Dragon as an event item for Archdragon Peak access
potd_location = DarkSouls3Location(self.player, "CKG: Path of the Dragon", DS3LocationCategory.EVENT, "Path of the Dragon", None, regions["Consumed King's Garden"])
potd_location.place_locked_item(Item("Path of the Dragon", ItemClassification.progression, None, self.player))
regions["Consumed King's Garden"].locations.append(potd_location)

# Create DLC Regions
if self.multiworld.enable_dlc[self.player]:
regions.update({region_name: self.create_region(region_name, location_tables[region_name]) for region_name in [
Expand Down Expand Up @@ -354,7 +359,7 @@ def set_rules(self) -> None:
set_rule(self.multiworld.get_entrance("Go To Irithyll of the Boreal Valley", self.player),
lambda state: state.has("Small Doll", self.player))
set_rule(self.multiworld.get_entrance("Go To Archdragon Peak", self.player),
lambda state: state.can_reach("Go To Untended Graves", "Entrance", self.player))
lambda state: state.has("Path of the Dragon", self.player))
set_rule(self.multiworld.get_entrance("Go To Grand Archives", self.player),
lambda state: state.has("Grand Archives Key", self.player))
set_rule(self.multiworld.get_entrance("Go To Kiln of the First Flame", self.player),
Expand All @@ -372,14 +377,14 @@ def set_rules(self) -> None:
set_rule(self.multiworld.get_entrance("Go To Ringed City", self.player),
lambda state: state.has("Small Envoy Banner", self.player))

# If key items are randomized, must have contraption key to enter DLC
# If key items are randomized, must have contraption key to enter second half of Ashes DLC
# If key items are not randomized, Contraption Key is guaranteed to be accessible before it is needed
if self.multiworld.enable_key_locations[self.player] == Toggle.option_true:
add_rule(self.multiworld.get_entrance("Go To Painted World of Ariandel 2", self.player),
lambda state: state.has("Contraption Key", self.player))

if self.multiworld.late_dlc[self.player] == Toggle.option_true:
add_rule(self.multiworld.get_entrance("Go To Painted World of Ariandel 2", self.player),
add_rule(self.multiworld.get_entrance("Go To Painted World of Ariandel 1", self.player),
lambda state: state.has("Small Doll", self.player))

# Define the access rules to some specific locations
Expand Down