From b88499df76fc712b51bef192b260ea5b260a7906 Mon Sep 17 00:00:00 2001 From: Marechal-l Date: Sat, 17 Sep 2022 20:00:45 +0200 Subject: [PATCH] ds3: setup progressive locations --- worlds/dark_souls_3/__init__.py | 7 ++++--- worlds/dark_souls_3/data/items_data.py | 2 ++ worlds/dark_souls_3/data/locations_data.py | 8 +++++++- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/worlds/dark_souls_3/__init__.py b/worlds/dark_souls_3/__init__.py index fc3f77dbc7..35314996c5 100644 --- a/worlds/dark_souls_3/__init__.py +++ b/worlds/dark_souls_3/__init__.py @@ -9,7 +9,7 @@ from .data.locations_data import location_dictionary_table, cemetery_of_ash_tabl undead_settlement_table, road_of_sacrifice_table, consumed_king_garden_table, cathedral_of_the_deep_table, \ farron_keep_table, catacombs_of_carthus_table, smouldering_lake_table, irithyll_of_the_boreal_valley_table, \ irithyll_dungeon_table, profaned_capital_table, anor_londo_table, lothric_castle_table, grand_archives_table, \ - untended_graves_table, archdragon_peak_table, firelink_shrine_bell_tower_table + untended_graves_table, archdragon_peak_table, firelink_shrine_bell_tower_table, progressive_locations from ..AutoWorld import World, WebWorld from BaseClasses import MultiWorld, Location, Region, Item, RegionType, Entrance, Tutorial, ItemClassification from ..generic.Rules import set_rule @@ -75,8 +75,7 @@ class DarkSouls3World(World): return DarkSouls3Item(name, item_classification, data, self.player) def create_regions(self): - menu_region = Region("Menu", RegionType.Generic, "Menu", self.player) - self.world.regions.append(menu_region) + menu_region = self.create_region("Menu", progressive_locations) # Create all Vanilla regions of Dark Souls III cemetery_of_ash_region = self.create_region("Cemetery Of Ash", cemetery_of_ash_table) @@ -162,6 +161,8 @@ class DarkSouls3World(World): if location_table: for name, address in location_table.items(): location = DarkSouls3Location(self.player, name, self.location_name_to_id[name], new_region) + if region_name == "Menu": + location.item_rule = staticmethod(lambda item: not item.advancement) new_region.locations.append(location) self.world.regions.append(new_region) return new_region diff --git a/worlds/dark_souls_3/data/items_data.py b/worlds/dark_souls_3/data/items_data.py index f155558c1f..982cb093b2 100644 --- a/worlds/dark_souls_3/data/items_data.py +++ b/worlds/dark_souls_3/data/items_data.py @@ -152,6 +152,8 @@ goods_table = { "Soul of Boreal Valley Vordt": 0x400002CF, "Soul of a Stray Demon": 0x400002E7, "Soul of a Demon": 0x400002E3, + **{"Titanite Shard #" + str(i): 0x400003E8 for i in range(1, 5)}, + **{"Soul of a Deserted Corpse #" + str(i): 0x40000191 for i in range(1, 5)} } armor_table = { diff --git a/worlds/dark_souls_3/data/locations_data.py b/worlds/dark_souls_3/data/locations_data.py index 94a3c4ea81..748f7ad1ca 100644 --- a/worlds/dark_souls_3/data/locations_data.py +++ b/worlds/dark_souls_3/data/locations_data.py @@ -440,7 +440,13 @@ archdragon_peak_table = { "AP: Havel's Greatshield": 0x013376F0, } +progressive_locations = { + **{"Titanite Shard #"+str(i): 0x400003E8 for i in range(1, 4)}, + **{"Firebomb #"+str(i): 0x40000124 for i in range(1, 4)}, + **{"Soul of a Deserted Corpse #" + str(i): 0x40000191 for i in range(1, 5)}, +} + location_dictionary_table = {**cemetery_of_ash_table, **fire_link_shrine_table, **firelink_shrine_bell_tower_table, **high_wall_of_lothric, **undead_settlement_table, **road_of_sacrifice_table, **cathedral_of_the_deep_table, **farron_keep_table, **catacombs_of_carthus_table, **smouldering_lake_table, **irithyll_of_the_boreal_valley_table, **irithyll_dungeon_table, **profaned_capital_table, **anor_londo_table, **lothric_castle_table, **consumed_king_garden_table, - **grand_archives_table, **untended_graves_table, **archdragon_peak_table} + **grand_archives_table, **untended_graves_table, **archdragon_peak_table, **progressive_locations}