Skip to content

Commit

Permalink
DS3: Fix health locations setting not enabling (ArchipelagoMW#2147)
Browse files Browse the repository at this point in the history
* DS3: Fix health locations setting not enabling

* DS3: Move health locations to their own table

* DS3: Bump data version
  • Loading branch information
Zunawe authored Sep 16, 2023
1 parent f9120c6 commit cff6c7c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
14 changes: 8 additions & 6 deletions worlds/dark_souls_3/Locations.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ def get_name_to_id() -> dict:
"Progressive Items 3",
"Progressive Items 4",
"Progressive Items DLC",
"Progressive Items Health",
]

output = {}
Expand Down Expand Up @@ -581,11 +582,7 @@ def get_name_to_id() -> dict:
[DS3LocationData(f"Titanite Shard #{i + 1}", "Titanite Shard", DS3LocationCategory.PROGRESSIVE_ITEM) for i in range(26)] +
[DS3LocationData(f"Large Titanite Shard #{i + 1}", "Large Titanite Shard", DS3LocationCategory.PROGRESSIVE_ITEM) for i in range(28)] +
[DS3LocationData(f"Titanite Slab #{i + 1}", "Titanite Slab", DS3LocationCategory.PROGRESSIVE_ITEM) for i in range(3)] +
[DS3LocationData(f"Twinkling Titanite #{i + 1}", "Twinkling Titanite", DS3LocationCategory.PROGRESSIVE_ITEM) for i in range(15)] +

# Healing
[DS3LocationData(f"Estus Shard #{i + 1}", "Estus Shard", DS3LocationCategory.HEALTH) for i in range(11)] +
[DS3LocationData(f"Undead Bone Shard #{i + 1}", "Undead Bone Shard", DS3LocationCategory.HEALTH) for i in range(10)],
[DS3LocationData(f"Twinkling Titanite #{i + 1}", "Twinkling Titanite", DS3LocationCategory.PROGRESSIVE_ITEM) for i in range(15)],

"Progressive Items 2": [] +
# Items
Expand Down Expand Up @@ -683,7 +680,12 @@ def get_name_to_id() -> dict:
[DS3LocationData(f"Dark Gem ${i + 1}", "Dark Gem", DS3LocationCategory.PROGRESSIVE_ITEM) for i in range(2)] +
[DS3LocationData(f"Blood Gem ${i + 1}", "Blood Gem", DS3LocationCategory.PROGRESSIVE_ITEM) for i in range(1)] +
[DS3LocationData(f"Blessed Gem ${i + 1}", "Blessed Gem", DS3LocationCategory.PROGRESSIVE_ITEM) for i in range(2)] +
[DS3LocationData(f"Hollow Gem ${i + 1}", "Hollow Gem", DS3LocationCategory.PROGRESSIVE_ITEM) for i in range(2)]
[DS3LocationData(f"Hollow Gem ${i + 1}", "Hollow Gem", DS3LocationCategory.PROGRESSIVE_ITEM) for i in range(2)],

"Progressive Items Health": [] +
# Healing
[DS3LocationData(f"Estus Shard #{i + 1}", "Estus Shard", DS3LocationCategory.HEALTH) for i in range(11)] +
[DS3LocationData(f"Undead Bone Shard #{i + 1}", "Undead Bone Shard", DS3LocationCategory.HEALTH) for i in range(10)],
}

location_dictionary: Dict[str, DS3LocationData] = {}
Expand Down
7 changes: 5 additions & 2 deletions worlds/dark_souls_3/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class DarkSouls3World(World):
option_definitions = dark_souls_options
topology_present: bool = True
web = DarkSouls3Web()
data_version = 7
data_version = 8
base_id = 100000
enabled_location_categories: Set[DS3LocationCategory]
required_client_version = (0, 4, 2)
Expand Down Expand Up @@ -89,7 +89,7 @@ def generate_early(self):

def create_regions(self):
progressive_location_table = []
if self.multiworld.enable_progressive_locations[self.player].value:
if self.multiworld.enable_progressive_locations[self.player]:
progressive_location_table = [] + \
location_tables["Progressive Items 1"] + \
location_tables["Progressive Items 2"] + \
Expand All @@ -99,6 +99,9 @@ def create_regions(self):
if self.multiworld.enable_dlc[self.player].value:
progressive_location_table += location_tables["Progressive Items DLC"]

if self.multiworld.enable_health_upgrade_locations[self.player]:
progressive_location_table += location_tables["Progressive Items Health"]

# Create Vanilla Regions
regions: Dict[str, Region] = {}
regions["Menu"] = self.create_region("Menu", progressive_location_table)
Expand Down

0 comments on commit cff6c7c

Please sign in to comment.