diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2024-02-04 13:22:18 -0500 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2024-02-04 13:22:18 -0500 |
commit | 8175ffdc895392764613a8bb6c738c49926d5773 (patch) | |
tree | cf5f82f0ee1b470af453900c6c9f8454b46b3be3 /Archipelago | |
parent | f1fdf947e95761136b8abafe630fb1ba61ae3129 (diff) | |
download | lingo-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.gd | 22 | ||||
-rw-r--r-- | Archipelago/panel.gd | 2 |
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 | |||
4 | var effect_running = false | 4 | var effect_running = false |
5 | var slowness_remaining = 0 | 5 | var slowness_remaining = 0 |
6 | var iceland_remaining = 0 | 6 | var iceland_remaining = 0 |
7 | var atbash_activated = false | 7 | var atbash_remaining = 0 |
8 | var queued_iceland = 0 | 8 | var queued_iceland = 0 |
9 | var skip_available = false | 9 | var skip_available = false |
10 | var puzzle_focused = false | 10 | var puzzle_focused = false |
@@ -93,21 +93,23 @@ func trigger_iceland_trap(): | |||
93 | 93 | ||
94 | 94 | ||
95 | func trigger_atbash_trap(): | 95 | func 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 | ||
105 | func deactivate_atbash_trap(): | 106 | func 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 |