]> git.pond.sub.org Git - empserver/blob - tests/load-tend/03-tend-1
tend: Suppress "not on ship" unless land unit is selected by UID
[empserver] / tests / load-tend / 03-tend-1
1 ||| General tend rules
2 |
3 | tender and target must be in the same sector
4 | only own ships can tend
5 | only own and friendly ships can be tended to
6 | a ship doesn't tend to itself
7 |
8 | ships (in 1,-1 unless stated otherwise)
9 | cs#150/.../153 (fleet t)
10 | cs#160/162/163/164 (fleet u) in 0,-2, owned by #0/2/3/4
11 | ls#165
12 | cs#166 in 0,-2
13 | frg#170/sb#171/cs#172/sbc#173 land tendees, sub x supply
14 | cs#175 land tendee
15 |
16 | lands:
17 | sup#300/linf#301/302/303/hat#304 (army t) riding fleet t
18 | linf#312/231/314 (army u) riding fleet u
19 | linf#315/316/317 riding ls#165
20 | spy#320/321/323 (army s) riding ls#165
21 | linf#330/331 riding cs#166
22 |
23 ||| tend commodities
24 |
25 || general sanity
26 | invalid commodity
27 tend x
28 | invalid tender
29 tend f -1
30 | no tenders match
31 tend f n
32 | foreign tender
33 tend f 160/162/163/164
34 | usability: does nothing silently
35 | invalid amount
36 | impossible, as crap is mapped to zero
37 | invalid target
38 tend f 150 1 -1
39 | no targets match
40 tend f 150 1 n
41 |
42 || tender/target pairs that can't
43 | targeting self:
44 tend f 150 1 150
45 | target not in same sector:
46 tend f 150 1 0
47 | usability: does nothing silently
48 |
49 || from own ships to own ships:
50 | #150/151 give 4m each
51 | #150/151 receive 1m each, #152/153/154 2m
52 tend m 150/151 1 t
53 | likewise, civilians: same result
54 tend c 150/151 1 t
55 | likewise, zero amount: fails
56 tend m 150/151 0 t
57 | likewise, negative amount:
58 | #150/151 receive 4m each
59 | #150/151 give 1m each, #152/153/154 2m
60 tend u 150/151 -1 t
61 || from own ships to foreign ships:
62 | list: #166 give 2f, #162/163 receive 1f each
63 tend f 166 1 160/162/163/164
64 | group: same
65 | odd: can use foreign fleet assignment
66 tend f 166 1 u
67 | area: same
68 realm 2 0,-2
69 tend f 166 1 #2
70 tend f 166 1 0,-2
71 tend f 166 1 -1:1,-2
72 | civilians don't work:
73 tend c 166 1 160/162/163/164
74 | negative amount doesn't work:
75 tend f 160/162/163/164 -1 166
76 || from foreign ships to own ships doesn't work:
77 tend f 166 -1 160/162/163/164
78 |
79 || tend something the tender can't hold
80 tend h 170/171 1 150
81 tend h 150 -1 170/171
82 |
83 || tend something the tender doesn't have
84 tend h 150/152 1 151
85 tend h 151 -1 150/152
86 | odd: first command fails, second doesn't
87 |
88 || tend something the target can't hold
89 tend u 150 1 170/171
90 tend u 170/171 -1 150
91 | odd: only the second command reports "cannot hold"
92 |
93 || tend more than the tender has
94 | #150 gives 7s, #152 gives 9s
95 | #150 receives 5s, #151 9s, #152 receives 2s
96 tend s 150/152 5 t
97 | #152/154 give 7s each, #150 receives 10s, #151 receive 4s
98 tend s t -5 153/154
99 |
100 || tend more then the target can hold
101 | #151 gives 5g, #152 gives 3g
102 | #150 receives 8g
103 tend g t 5 150
104 | #150 gives 8g to #153
105 tend g 153 -40 t
106 |
107 || interactive
108 tend
109 x
110 tend
111 f
112 -1
113 tend
114 f
115 150
116 x
117 tend
118 f
119 150/151
120 1
121 153
122 -1
123 154
124 |
125 ||| tend lands
126 |
127 || general sanity
128 | invalid tender
129 tend land -1
130 | foreign tender
131 tend land 160/162/163/164
132 | usability: does nothing silently
133 | invalid land
134 tend land 150 -1
135 | invalid target
136 tend land 151 301 -1
137 |
138 || tender/target pairs that can't
139 | no ships match
140 tend land n
141 tend land 151 301 n
142 | targeting self:
143 tend land 151 301 151
144 | target not friendly
145 tend land 166 330 164
146 | target not in same sector
147 tend land 151 301 0
148 | usability: does nothing silently
149 |
150 || lands that can't be tended
151 | no lands match
152 tend land 150 n 151
153 | not capable: lacks assault (#300)
154 tend land 150 * 151
155 | not on tender
156 tend land 150 301 150
157 | carrying civilians, to foreign ship
158 | TODO need a land unit that can carry c to test this
159 |
160 || target's load limits
161 | can't carry non-light
162 | TODO need a non-light assault land unit to test this
163 | can't carry light (only spies)
164 tend land 151 301 171/173
165 | no room for non-light
166 | TODO need a non-light assault land unit to test this
167 | no room for light (transfers first 2)
168 tend land t 301/302/303 170
169 | usability: useless "not on this ship" complaints
170 | no room for spy (transfers first 2)
171 tend land 165 320/321/322 171
172 tend land 165/171 s 173
173 | spy can use light and non-light slot
174 tend land 173 s 150/165
175 |
176 || to foreign ships
177 tend land 166 330 162
178 tend land 166 331 163
179 |
180 || interactive
181 tend
182 land
183 !
184 tend
185 land
186 -1
187 tend
188 land
189 165
190 -1
191 tend
192 land
193 165
194 322
195 -1
196 tend
197 land
198 165
199 322
200 172