aboutsummaryrefslogtreecommitdiff
path: root/programs/wl.rob
blob: c1b47f0c89110102251171815005722c509aba04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
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