Skip to content

Commit

Permalink
TUNIC: Add Shield to Ladder Storage logic (#4146)
Browse files Browse the repository at this point in the history
  • Loading branch information
ScipioWright authored Dec 9, 2024
1 parent a948697 commit 5b4d7c7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions worlds/tunic/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,11 @@ def remove_filler(amount: int) -> None:
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
Expand Down
2 changes: 1 addition & 1 deletion worlds/tunic/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 2 additions & 1 deletion worlds/tunic/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
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"
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 5b4d7c7

Please sign in to comment.