about summary refs log tree commit diff stats
path: root/Archipelago/effects.gd
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2023-06-16 19:05:58 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2023-06-16 19:05:58 -0400
commite2936fdd05a7178772a47f5e7923a75c1b04a357 (patch)
tree5ea9455dd62634144784787ff5a76f14f3302112 /Archipelago/effects.gd
parent38b8f3dbb70472e99e90c5b1c5095c2c4f206880 (diff)
downloadlingo-archipelago-e2936fdd05a7178772a47f5e7923a75c1b04a357.tar.gz
lingo-archipelago-e2936fdd05a7178772a47f5e7923a75c1b04a357.tar.bz2
lingo-archipelago-e2936fdd05a7178772a47f5e7923a75c1b04a357.zip
Atbash trap
Diffstat (limited to 'Archipelago/effects.gd')
-rw-r--r--Archipelago/effects.gd27
1 files changed, 26 insertions, 1 deletions
diff --git a/Archipelago/effects.gd b/Archipelago/effects.gd index a11ab42..04c79b6 100644 --- a/Archipelago/effects.gd +++ b/Archipelago/effects.gd
@@ -4,6 +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_remaining = 0
7var queued_iceland = 0 8var queued_iceland = 0
8 9
9var orig_env 10var orig_env
@@ -70,10 +71,23 @@ func trigger_iceland_trap():
70 _process_effects() 71 _process_effects()
71 72
72 73
74func trigger_atbash_trap():
75 if atbash_remaining == 0:
76 atbash_remaining += 60
77
78 var apclient = global.get_node("Archipelago")
79 apclient.evaluateSolvability()
80 else:
81 atbash_remaining += 60
82
83 if not effect_running:
84 _process_effects()
85
86
73func _process_effects(): 87func _process_effects():
74 effect_running = true 88 effect_running = true
75 89
76 while slowness_remaining > 0 or iceland_remaining > 0: 90 while slowness_remaining > 0 or iceland_remaining > 0 or atbash_remaining > 0:
77 var text = "" 91 var text = ""
78 if slowness_remaining > 0: 92 if slowness_remaining > 0:
79 text += "Slowness: %d seconds" % slowness_remaining 93 text += "Slowness: %d seconds" % slowness_remaining
@@ -81,6 +95,10 @@ func _process_effects():
81 if not text.empty(): 95 if not text.empty():
82 text += "\n" 96 text += "\n"
83 text += "Iceland: %d seconds" % iceland_remaining 97 text += "Iceland: %d seconds" % iceland_remaining
98 if atbash_remaining > 0:
99 if not text.empty():
100 text += "\n"
101 text += "Atbash: %d seconds" % atbash_remaining
84 self.get_node("label").text = text 102 self.get_node("label").text = text
85 103
86 yield(get_tree().create_timer(1.0), "timeout") 104 yield(get_tree().create_timer(1.0), "timeout")
@@ -101,5 +119,12 @@ func _process_effects():
101 orig_env 119 orig_env
102 ) 120 )
103 121
122 if atbash_remaining > 0:
123 atbash_remaining -= 1
124
125 if atbash_remaining == 0:
126 var apclient = global.get_node("Archipelago")
127 apclient.evaluateSolvability()
128
104 self.get_node("label").text = "" 129 self.get_node("label").text = ""
105 effect_running = false 130 effect_running = false