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-17 20:03:02 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2023-06-17 20:03:02 -0400
commit3695cb4b951bde7488d0084bcb61d67d7ea9374f (patch)
treef44d8ca25447bb1234ceefdf5a2980be2cbf6c87 /Archipelago/effects.gd
parente2936fdd05a7178772a47f5e7923a75c1b04a357 (diff)
downloadlingo-archipelago-3695cb4b951bde7488d0084bcb61d67d7ea9374f.tar.gz
lingo-archipelago-3695cb4b951bde7488d0084bcb61d67d7ea9374f.tar.bz2
lingo-archipelago-3695cb4b951bde7488d0084bcb61d67d7ea9374f.zip
Atbash lasts until you solve a puzzle
Diffstat (limited to 'Archipelago/effects.gd')
-rw-r--r--Archipelago/effects.gd33
1 files changed, 16 insertions, 17 deletions
diff --git a/Archipelago/effects.gd b/Archipelago/effects.gd index 04c79b6..80eaa9c 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_remaining = 0 7var atbash_activated = false
8var queued_iceland = 0 8var queued_iceland = 0
9 9
10var orig_env 10var orig_env
@@ -72,33 +72,39 @@ func trigger_iceland_trap():
72 72
73 73
74func trigger_atbash_trap(): 74func trigger_atbash_trap():
75 if atbash_remaining == 0: 75 if not atbash_activated:
76 atbash_remaining += 60 76 atbash_activated = true
77 77
78 var apclient = global.get_node("Archipelago") 78 var apclient = global.get_node("Archipelago")
79 apclient.evaluateSolvability() 79 apclient.evaluateSolvability()
80 else:
81 atbash_remaining += 60
82 80
83 if not effect_running: 81 if not effect_running:
84 _process_effects() 82 _process_effects()
85 83
86 84
85func deactivate_atbash_trap():
86 if atbash_activated:
87 atbash_activated = false
88
89 var apclient = global.get_node("Archipelago")
90 apclient.evaluateSolvability()
91
92
87func _process_effects(): 93func _process_effects():
88 effect_running = true 94 effect_running = true
89 95
90 while slowness_remaining > 0 or iceland_remaining > 0 or atbash_remaining > 0: 96 while slowness_remaining > 0 or iceland_remaining > 0 or atbash_activated:
91 var text = "" 97 var text = ""
98 if atbash_activated:
99 text += "Atbash Trap lasts until you solve a puzzle"
92 if slowness_remaining > 0: 100 if slowness_remaining > 0:
101 if not text.empty():
102 text += "\n"
93 text += "Slowness: %d seconds" % slowness_remaining 103 text += "Slowness: %d seconds" % slowness_remaining
94 if iceland_remaining > 0: 104 if iceland_remaining > 0:
95 if not text.empty(): 105 if not text.empty():
96 text += "\n" 106 text += "\n"
97 text += "Iceland: %d seconds" % iceland_remaining 107 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
102 self.get_node("label").text = text 108 self.get_node("label").text = text
103 109
104 yield(get_tree().create_timer(1.0), "timeout") 110 yield(get_tree().create_timer(1.0), "timeout")
@@ -119,12 +125,5 @@ func _process_effects():
119 orig_env 125 orig_env
120 ) 126 )
121 127
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
129 self.get_node("label").text = "" 128 self.get_node("label").text = ""
130 effect_running = false 129 effect_running = false