Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TUNIC: Add Shield to Ladder Storage logic #4146

Merged
merged 5 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading