about summary refs log tree commit diff stats
path: root/Archipelago
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2024-02-04 13:22:18 -0500
committerStar Rauchenberger <fefferburbia@gmail.com>2024-02-04 13:22:18 -0500
commit8175ffdc895392764613a8bb6c738c49926d5773 (patch)
treecf5f82f0ee1b470af453900c6c9f8454b46b3be3 /Archipelago
parentf1fdf947e95761136b8abafe630fb1ba61ae3129 (diff)
downloadlingo-archipelago-8175ffdc895392764613a8bb6c738c49926d5773.tar.gz
lingo-archipelago-8175ffdc895392764613a8bb6c738c49926d5773.tar.bz2
lingo-archipelago-8175ffdc895392764613a8bb6c738c49926d5773.zip
Atbash Trap now stacks
Diffstat (limited to 'Archipelago')
-rw-r--r--Archipelago/effects.gd22
-rw-r--r--Archipelago/panel.gd2
2 files changed, 14 insertions, 10 deletions
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
4var effect_running = false 4var effect_running = false
5var slowness_remaining = 0 5var slowness_remaining = 0
6var iceland_remaining = 0 6var iceland_remaining = 0
7var atbash_activated = false 7var atbash_remaining = 0
8var queued_iceland = 0 8var queued_iceland = 0
9var skip_available = false 9var skip_available = false
10var puzzle_focused = false 10var puzzle_focused = false
@@ -93,21 +93,23 @@ func trigger_iceland_trap():
93 93
94 94
95func trigger_atbash_trap(): 95func trigger_atbash_trap():
96 if not atbash_activated: 96 var newly_atbash = (atbash_remaining == 0)
97 atbash_activated = true 97 atbash_remaining += 1
98 98
99 if newly_atbash:
99 var apclient = global.get_node("Archipelago") 100 var apclient = global.get_node("Archipelago")
100 apclient.evaluateSolvability() 101 apclient.evaluateSolvability()
101 102
102 text_dirty = true 103 text_dirty = true
103 104
104 105
105func deactivate_atbash_trap(): 106func deactivate_atbash_trap():
106 if atbash_activated: 107 if atbash_remaining > 0:
107 atbash_activated = false 108 atbash_remaining -= 1
108 109
109 var apclient = global.get_node("Archipelago") 110 if atbash_remaining == 0:
110 apclient.evaluateSolvability() 111 var apclient = global.get_node("Archipelago")
112 apclient.evaluateSolvability()
111 113
112 text_dirty = true 114 text_dirty = true
113 115
@@ -209,8 +211,10 @@ func _process(_delta):
209 text_dirty = false 211 text_dirty = false
210 212
211 var text = "" 213 var text = ""
212 if atbash_activated: 214 if atbash_remaining == 1:
213 text += "Atbash Trap lasts until you solve a puzzle" 215 text += "Atbash Trap lasts until you solve a puzzle"
216 if atbash_remaining > 1:
217 text += ("Atbash Trap lasts until you solve %d puzzles" % atbash_remaining)
214 if slowness_remaining > 0: 218 if slowness_remaining > 0:
215 if not text.empty(): 219 if not text.empty():
216 text += "\n" 220 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():
46 solvable = false 46 solvable = false
47 47
48 if solvable: 48 if solvable:
49 if effects.atbash_activated: 49 if effects.atbash_remaining > 0:
50 self.get_parent().get_node("Viewport/GUI/Panel/Label").text = atbash_text 50 self.get_parent().get_node("Viewport/GUI/Panel/Label").text = atbash_text
51 else: 51 else:
52 self.get_parent().get_node("Viewport/GUI/Panel/Label").text = orig_text 52 self.get_parent().get_node("Viewport/GUI/Panel/Label").text = orig_text