From 19610b878d3549797c251296ac5c5a3c3ef6843c Mon Sep 17 00:00:00 2001 From: Scipio Wright Date: Thu, 4 Jul 2024 18:40:57 -0400 Subject: [PATCH] Add the shop sword logic stuff in --- worlds/tunic/er_rules.py | 10 ++++++++++ worlds/tunic/rules.py | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/worlds/tunic/er_rules.py b/worlds/tunic/er_rules.py index 5f76fd2a8c..17ca6b5ecd 100644 --- a/worlds/tunic/er_rules.py +++ b/worlds/tunic/er_rules.py @@ -1351,3 +1351,13 @@ def set_er_location_rules(world: "TunicWorld") -> None: lambda state: has_ability(prayer, state, world)) set_rule(multiworld.get_location("Library Fuse", player), lambda state: has_ability(prayer, state, world)) + + # Shop + set_rule(multiworld.get_location("Shop - Potion 1", player), + lambda state: has_sword(state, player)) + set_rule(multiworld.get_location("Shop - Potion 2", player), + lambda state: has_sword(state, player)) + set_rule(multiworld.get_location("Shop - Coin 1", player), + lambda state: has_sword(state, player)) + set_rule(multiworld.get_location("Shop - Coin 2", player), + lambda state: has_sword(state, player)) diff --git a/worlds/tunic/rules.py b/worlds/tunic/rules.py index 639aebdc3f..90fd376472 100644 --- a/worlds/tunic/rules.py +++ b/worlds/tunic/rules.py @@ -349,3 +349,13 @@ def set_location_rules(world: "TunicWorld") -> None: lambda state: state.has(laurels, player) and has_ability(prayer, state, world)) set_rule(multiworld.get_location("Hero's Grave - Feathers Relic", player), lambda state: state.has(laurels, player) and has_ability(prayer, state, world)) + + # Shop + set_rule(multiworld.get_location("Shop - Potion 1", player), + lambda state: has_sword(state, player)) + set_rule(multiworld.get_location("Shop - Potion 2", player), + lambda state: has_sword(state, player)) + set_rule(multiworld.get_location("Shop - Coin 1", player), + lambda state: has_sword(state, player)) + set_rule(multiworld.get_location("Shop - Coin 2", player), + lambda state: has_sword(state, player))