DS3: Accessibility error fix (#1983)

This commit is contained in:
Bryce Wilson 2023-07-21 09:59:17 -07:00 committed by GitHub
parent e8bf471dcd
commit 3c1950dd40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 4 deletions

View File

@ -16,6 +16,7 @@ class DS3LocationCategory(IntEnum):
MISC = 8 MISC = 8
HEALTH = 9 HEALTH = 9
PROGRESSIVE_ITEM = 10 PROGRESSIVE_ITEM = 10
EVENT = 11
class DS3LocationData(NamedTuple): class DS3LocationData(NamedTuple):

View File

@ -100,7 +100,7 @@ class DarkSouls3World(World):
progressive_location_table += location_tables["Progressive Items DLC"] progressive_location_table += location_tables["Progressive Items DLC"]
# Create Vanilla Regions # Create Vanilla Regions
regions = {} regions: Dict[str, Region] = {}
regions["Menu"] = self.create_region("Menu", progressive_location_table) 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 [ regions.update({region_name: self.create_region(region_name, location_tables[region_name]) for region_name in [
"Firelink Shrine", "Firelink Shrine",
@ -124,6 +124,11 @@ class DarkSouls3World(World):
"Kiln of the First Flame", "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 # Create DLC Regions
if self.multiworld.enable_dlc[self.player]: if self.multiworld.enable_dlc[self.player]:
regions.update({region_name: self.create_region(region_name, location_tables[region_name]) for region_name in [ regions.update({region_name: self.create_region(region_name, location_tables[region_name]) for region_name in [
@ -354,7 +359,7 @@ class DarkSouls3World(World):
set_rule(self.multiworld.get_entrance("Go To Irithyll of the Boreal Valley", self.player), set_rule(self.multiworld.get_entrance("Go To Irithyll of the Boreal Valley", self.player),
lambda state: state.has("Small Doll", self.player)) lambda state: state.has("Small Doll", self.player))
set_rule(self.multiworld.get_entrance("Go To Archdragon Peak", 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), set_rule(self.multiworld.get_entrance("Go To Grand Archives", self.player),
lambda state: state.has("Grand Archives Key", 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), set_rule(self.multiworld.get_entrance("Go To Kiln of the First Flame", self.player),
@ -372,14 +377,14 @@ class DarkSouls3World(World):
set_rule(self.multiworld.get_entrance("Go To Ringed City", self.player), set_rule(self.multiworld.get_entrance("Go To Ringed City", self.player),
lambda state: state.has("Small Envoy Banner", 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 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: 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), add_rule(self.multiworld.get_entrance("Go To Painted World of Ariandel 2", self.player),
lambda state: state.has("Contraption Key", self.player)) lambda state: state.has("Contraption Key", self.player))
if self.multiworld.late_dlc[self.player] == Toggle.option_true: 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)) lambda state: state.has("Small Doll", self.player))
# Define the access rules to some specific locations # Define the access rules to some specific locations