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 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'Archipelago/effects.gd') 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" -- cgit 1.4.1