aboutsummaryrefslogtreecommitdiff
path: root/programs/wl.rob
diff options
context:
space:
mode:
Diffstat (limited to 'programs/wl.rob')
-rw-r--r--programs/wl.rob100
1 files changed, 100 insertions, 0 deletions
diff --git a/programs/wl.rob b/programs/wl.rob
new file mode 100644
index 0000000..c1b47f0
--- /dev/null
+++ b/programs/wl.rob
@@ -0,0 +1,100 @@
+Published Name WL
+Published Author Tom Smeding
+Published Language RC300
+Published OptionSet RC3 Standards
+
+Define &code_lostbattle { 100 }
+Define &code_wonbattle { 200 }
+Define &code_killahead { 300 }
+Define &code_justdie { 666 }
+
+Bank WallBuild
+ comp #active, &code_justdie
+ jump @WB.startbuild
+ die
+@WB.startbuild
+ scan #1
+ comp #1, 0
+ jump @WB.notempty
+ create 2, 1, 0
+ scan #1
+ comp #1, 2
+ jump @WB.enemyfound
+ comp #active, 1
+ jump @WB.cancelbuild
+ trans 1, 1
+ set %active, 1
+ jump @WB.wait
+
+@WB.cancelbuild
+ set %active, &code_justdie
+@WB.justdie
+ die
+
+@WB.wait
+ comp #active, &code_lostbattle
+ jump @WB.wait.1
+ jump @WB.lostbattle
+@WB.wait.1
+ comp #active, &code_wonbattle
+ jump @WB.wait.2
+ jump @WB.wonbattle
+@WB.wait.2
+ comp #active, &code_killahead
+ jump @WB.wait
+ jump @WB.killahead
+
+@WB.notempty
+ comp #1, 1
+ jump @WB.walldone
+@WB.enemyfound
+ set %active, 0
+ comp #active, 1
+ jump @WB.wonbattle.pre.signalloss
+ set %active, &code_wonbattle
+ jump @WB.lostbattle
+
+@WB.lostbattle
+ turn 1
+ turn 1
+ scan #1
+ comp #1, 2
+ jump @WB.disabled
+ set %active, &code_lostbattle
+ die
+
+@WB.wonbattle.pre.signalloss
+ set %active, &code_lostbattle
+@WB.wonbattle
+ scan #1
+ comp #1, 2
+ jump @WB.wonbattle.1
+ set %active, &code_killahead
+@WB.wonbattle.1
+ turn 1
+ turn 1
+ scan #1
+ comp #1, 2
+ jump @WB.leader
+ set %active, &code_wonbattle
+ die
+
+@WB.killahead
+ scan #1
+ comp #1, 2
+ die
+ set %active, &code_killahead
+ die
+
+@WB.walldone
+ turn 1
+ jump @WB.walldone
+
+@WB.disabled
+ set #active, 0
+
+@WB.leader
+ turn 0
+ turn 0
+ turn 1
+ jump @WB.leader