From dd47790c318edb9befdcff0e58de9a310f4298dd Mon Sep 17 00:00:00 2001 From: Brooty Johnson <83629348+Br00ty@users.noreply.github.com> Date: Sat, 25 Nov 2023 09:38:18 -0500 Subject: [PATCH] DS3: Added 'Early Banner' Setting (#2199) Co-authored-by: Zach Parks --- worlds/dark_souls_3/Options.py | 11 +++++++++++ worlds/dark_souls_3/__init__.py | 6 +++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/worlds/dark_souls_3/Options.py b/worlds/dark_souls_3/Options.py index d613e473..df0bb953 100644 --- a/worlds/dark_souls_3/Options.py +++ b/worlds/dark_souls_3/Options.py @@ -171,6 +171,16 @@ class MaxLevelsIn10WeaponPoolOption(Range): default = 10 +class EarlySmallLothricBanner(Choice): + """This option makes it so the user can choose to force the Small Lothric Banner into an early sphere in their world or + into an early sphere across all worlds.""" + display_name = "Early Small Lothric Banner" + option_off = 0 + option_early_global = 1 + option_early_local = 2 + default = option_off + + class LateBasinOfVowsOption(Toggle): """This option makes it so the Basin of Vows is still randomized, but guarantees you that you wont have to venture into Lothric Castle to find your Small Lothric Banner to get out of High Wall of Lothric. So you may find Basin of Vows early, @@ -215,6 +225,7 @@ dark_souls_options: typing.Dict[str, Option] = { "max_levels_in_5": MaxLevelsIn5WeaponPoolOption, "min_levels_in_10": MinLevelsIn10WeaponPoolOption, "max_levels_in_10": MaxLevelsIn10WeaponPoolOption, + "early_banner": EarlySmallLothricBanner, "late_basin_of_vows": LateBasinOfVowsOption, "late_dlc": LateDLCOption, "no_spell_requirements": NoSpellRequirementsOption, diff --git a/worlds/dark_souls_3/__init__.py b/worlds/dark_souls_3/__init__.py index b9879f70..7ee6c2a6 100644 --- a/worlds/dark_souls_3/__init__.py +++ b/worlds/dark_souls_3/__init__.py @@ -9,7 +9,7 @@ from worlds.generic.Rules import set_rule, add_rule, add_item_rule from .Items import DarkSouls3Item, DS3ItemCategory, item_dictionary, key_item_names, item_descriptions from .Locations import DarkSouls3Location, DS3LocationCategory, location_tables, location_dictionary -from .Options import RandomizeWeaponLevelOption, PoolTypeOption, dark_souls_options +from .Options import RandomizeWeaponLevelOption, PoolTypeOption, EarlySmallLothricBanner, dark_souls_options class DarkSouls3Web(WebWorld): @@ -86,6 +86,10 @@ class DarkSouls3World(World): self.enabled_location_categories.add(DS3LocationCategory.NPC) if self.multiworld.enable_key_locations[self.player] == Toggle.option_true: self.enabled_location_categories.add(DS3LocationCategory.KEY) + if self.multiworld.early_banner[self.player] == EarlySmallLothricBanner.option_early_global: + self.multiworld.early_items[self.player]['Small Lothric Banner'] = 1 + elif self.multiworld.early_banner[self.player] == EarlySmallLothricBanner.option_early_local: + self.multiworld.local_early_items[self.player]['Small Lothric Banner'] = 1 if self.multiworld.enable_boss_locations[self.player] == Toggle.option_true: self.enabled_location_categories.add(DS3LocationCategory.BOSS) if self.multiworld.enable_misc_locations[self.player] == Toggle.option_true: