From 8175ffdc895392764613a8bb6c738c49926d5773 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sun, 4 Feb 2024 13:22:18 -0500 Subject: Atbash Trap now stacks --- Archipelago/effects.gd | 22 +++++++++++++--------- Archipelago/panel.gd | 2 +- 2 files changed, 14 insertions(+), 10 deletions(-) (limited to 'Archipelago') diff --git a/Archipelago/effects.gd b/Archipelago/effects.gd index 7d9df35..e6d2dcd 100644 --- a/Archipelago/effects.gd +++ b/Archipelago/effects.gd @@ -4,7 +4,7 @@ var activated = false var effect_running = false var slowness_remaining = 0 var iceland_remaining = 0 -var atbash_activated = false +var atbash_remaining = 0 var queued_iceland = 0 var skip_available = false var puzzle_focused = false @@ -93,21 +93,23 @@ func trigger_iceland_trap(): func trigger_atbash_trap(): - if not atbash_activated: - atbash_activated = true + var newly_atbash = (atbash_remaining == 0) + atbash_remaining += 1 + if newly_atbash: var apclient = global.get_node("Archipelago") apclient.evaluateSolvability() - text_dirty = true + text_dirty = true func deactivate_atbash_trap(): - if atbash_activated: - atbash_activated = false + if atbash_remaining > 0: + atbash_remaining -= 1 - var apclient = global.get_node("Archipelago") - apclient.evaluateSolvability() + if atbash_remaining == 0: + var apclient = global.get_node("Archipelago") + apclient.evaluateSolvability() text_dirty = true @@ -209,8 +211,10 @@ func _process(_delta): text_dirty = false var text = "" - if atbash_activated: + if atbash_remaining == 1: text += "Atbash Trap lasts until you solve a puzzle" + if atbash_remaining > 1: + text += ("Atbash Trap lasts until you solve %d puzzles" % atbash_remaining) if slowness_remaining > 0: if not text.empty(): text += "\n" diff --git a/Archipelago/panel.gd b/Archipelago/panel.gd index da5b572..aec18e8 100644 --- a/Archipelago/panel.gd +++ b/Archipelago/panel.gd @@ -46,7 +46,7 @@ func evaluate_solvability(): solvable = false if solvable: - if effects.atbash_activated: + if effects.atbash_remaining > 0: self.get_parent().get_node("Viewport/GUI/Panel/Label").text = atbash_text else: self.get_parent().get_node("Viewport/GUI/Panel/Label").text = orig_text -- cgit 1.4.1