From 5b4d7c752670b9cdf79258792e8045d968a54e96 Mon Sep 17 00:00:00 2001 From: Scipio Wright Date: Sun, 8 Dec 2024 19:58:49 -0500 Subject: [PATCH] TUNIC: Add Shield to Ladder Storage logic (#4146) --- worlds/tunic/__init__.py | 5 +++++ worlds/tunic/options.py | 2 +- worlds/tunic/rules.py | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/worlds/tunic/__init__.py b/worlds/tunic/__init__.py index d1430aac..4c62b18b 100644 --- a/worlds/tunic/__init__.py +++ b/worlds/tunic/__init__.py @@ -286,6 +286,11 @@ class TunicWorld(World): tunic_items.append(self.create_item(page, ItemClassification.progression | ItemClassification.useful)) items_to_create[page] = 0 + # logically relevant if you have ladder storage enabled + if self.options.ladder_storage and not self.options.ladder_storage_without_items: + tunic_items.append(self.create_item("Shield", ItemClassification.progression)) + items_to_create["Shield"] = 0 + if self.options.maskless: tunic_items.append(self.create_item("Scavenger Mask", ItemClassification.useful)) items_to_create["Scavenger Mask"] = 0 diff --git a/worlds/tunic/options.py b/worlds/tunic/options.py index cdd37a88..f1d53362 100644 --- a/worlds/tunic/options.py +++ b/worlds/tunic/options.py @@ -216,7 +216,7 @@ class LadderStorage(Choice): class LadderStorageWithoutItems(Toggle): """ - If disabled, you logically require Stick, Sword, or Magic Orb to perform Ladder Storage. + If disabled, you logically require Stick, Sword, Magic Orb, or Shield to perform Ladder Storage. If enabled, you will be expected to perform Ladder Storage without progression items. This can be done with the plushie code, a Golden Coin, Prayer, and many other options. diff --git a/worlds/tunic/rules.py b/worlds/tunic/rules.py index aa69666d..58c987ac 100644 --- a/worlds/tunic/rules.py +++ b/worlds/tunic/rules.py @@ -18,6 +18,7 @@ coins = "Golden Coin" prayer = "Pages 24-25 (Prayer)" holy_cross = "Pages 42-43 (Holy Cross)" icebolt = "Pages 52-53 (Icebolt)" +shield = "Shield" key = "Key" house_key = "Old House Key" vault_key = "Fortress Vault Key" @@ -82,7 +83,7 @@ def can_ladder_storage(state: CollectionState, world: "TunicWorld") -> bool: return False if world.options.ladder_storage_without_items: return True - return has_stick(state, world.player) or state.has(grapple, world.player) + return has_stick(state, world.player) or state.has_any((grapple, shield), world.player) def has_mask(state: CollectionState, world: "TunicWorld") -> bool: