]> git.pond.sub.org Git - empserver/blob - tests/load-tend/01-load-1
tests/load-tend: New; exercises load and tend commands
[empserver] / tests / load-tend / 01-load-1
1 ||| General load / unload rules
2 |
3 | only harbor and city with at least 2% efficiency can work
4 | odd: even non-canal ships work in c
5 | only own and friendly ships / lands in own sectors can load
6 |   planes / lands loaded onto friendly ships / lands are given away,
7 |   just like commodities
8 | only own ships / lands in own and friendly sectors can unload
9 |   planes / lands unloaded in friendly sectors are given away,
10 |   just like commodities
11 | only own and allied lands in own sectors can load
12 | only own land in own and allied sectors can unload
13 |
14 | sector matrix: (2% h, 0% h, 2% c, 0% c, 100% +)
15 |              * (own, allied, friendly, neutral, unowned
16 | only 2% h and 2% c can work
17 |
18 | ships (own unless stated otherwise)
19 | ls#0/.../24 (fleet a) spread over the sector matrix
20 | fb#25/.../34 (fleet a) spread over the sector matrix's cities
21 | cs#80 is in occupied harbor
22 | cs#81/82 are in old-owned harbor
23 | cs#85 is allied, and the ally is the harbor's old owner
24 | cs#86 is allied and in old-owned harbor
25 | cs#87 is in allied occupied harbor, old owner matches ship owner
26 | ls#90/92/93/94 (fleet b) are owned by #0/2/3/4 and in own harbor
27 | ls#95 (fleet b) is at sea
28 | cal#100/mb#101/cs#105 plane carriers, cap. plane, miss, full
29 | cs#105 full of planes
30 | frg#110/sb#111/cs#112/sbc#113 land carriers, sub x supply
31 | cs#115 full of lands
32 |
33 | lands:
34 | linf#0/.../24 (army A) next to fleet a
35 | linf#25/.../29 (army A) next to fleet a in 2% h, owned by sector owner
36 | linf#30/.../34 (army C) next to army a
37 | linf#35/.../39 (army C) next to army a, owned by sector owner
38 | tra#50/.../54 (army a) spread over sector matrix 2% h
39 | sup#80 is in occupied harbor
40 | sup#81/82 are in old-owned harbor
41 | tra#90/92/93/94 (army b) are owned by #0/2/3/4 in own harbor
42 | rad#100/105 plane carriers, empty and full
43 | tra#110/115 land carriers, empty and full
44 | rad#120/.../133 riding cs#115 and tra#115
45 | linf#140/.../143 next to land carriers, light
46 | hat#150/.../152 next to land carriers, neither light nor heavy
47 | tra#160 next to land carriers, heavy
48 | spy#170/.../174 next to land carriers, spy
49 | linf#180/.../204 (army B) riding fleet a
50 | linf#210/212/213/214 next to fleet b
51 | linf#222/223/224/225 (army B) riding fleet b
52 | linf#230/.../234 (army D) riding army a
53 | linf#240/242/243/244 next to army b
54 | linf#252/253/254 riding army b
55 |
56 | planes:
57 | sam#0/.../24 (wing A) next to fleet a
58 | sam#25/.../29 (wing A) next to fleet a in 2% h, owned by sector owner
59 | sam#30/.../34 (wing C) next to army a
60 | sam#35/.../39 (wing C) next to army a, owned by sector owner
61 | sam#40/.../56 (wing E) next to plane carriers, x-light
62 | sam#57/58 riding ship#105, land#105
63 | sam#59 next to plane carriers, hardened
64 | nc#60/.../89 (wing K) next to plane carriers, helo
65 | mi#90/.../109 (wing M) next to plane carriers, light missile
66 | f2#110/.../139 (wing F) next to plane carriers, light fixed-wing
67 | zep#140 next to plane carriers, non-light fixed-wing
68 | sam#150/.../174 (wing B) riding fleet a
69 | sam#180/182/183/184 next to fleet b
70 | sam#192/193/194/195 (wing B) riding fleet b
71 | sam#200/.../204 (wing D) riding army a
72 | sam#210/.../210 next to army b
73 | sam#222/223/224 (wing D) riding army b
74 | sam#230/231 riding and next to rad#121
75 | sam#232/233 riding and next to rad#122
76 |
77 ||| load / unload commodities
78 |
79 || general sanity
80 | invalid commodity
81 load x
82 lload x
83 unload x
84 lunload x
85 | odd: "Can't load" even for unload
86 | invalid ship
87 load f -1
88 unload f -1
89 | invalid land
90 lload f -1
91 lunload f -1
92 | invalid amount
93 | impossible, as crap is mapped to zero
94 |
95 || no ships / lands match
96 load f n
97 unload f n
98 lload f n
99 lunload f n
100 |
101 || ships loading commodities with load
102 | list of own and foreign ships: #0/15/25/92/93 work
103 load f 0/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/90/92/93/94/95 0
104 load f 0/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/90/92/93/94/95 1
105 | group: #0/15/25 work
106 load f a 1
107 load f b 1
108 | area: #0/15/25 work
109 realm 1 0:9,0:5
110 load f #1 1
111 load f 0:9,0:5 1
112 | BUG: 0:9,0:5 loads friendly #92/93, unlike the other areas
113 load f -1:9,0:5 1
114 | load to desired level rather than an amount
115 | list of own and foreign ships: #0/15/25/92/93 work
116 load f 0/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/90/92/93/94/95 -6
117 | group: #0/15/25 work
118 load f a -7
119 load f b -7
120 | own and occupied civilians, own and oldown's ship: #81/85 work
121 load c 80/81/85/86/87 1
122 |
123 || ships loading commodities with unload
124 | only own ships in own sectors can work (even though we actually load)
125 | list of own and foreign ships: #0/15/25 work
126 unload f 0/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/90/92/93/94/95 -8
127 | group: #0/15/25 work
128 unload f a -9
129 unload f b -9
130 | own and occupied civilians, own and oldown's ship: #81 works
131 unload c 80/81/85/86/87 -12
132 |
133 || lands loading commodities with lload
134 | list of own and foreign lands: #50/92 work
135 lload f 50/51/52/53/54/90/92/93/94 0
136 lload f 50/51/52/53/54/90/92/93/94 1
137 | group: #50 works
138 lload f a 1
139 lload f b 1
140 | while on a ship or land
141 | BUG: land #185/190/200 can load even though their carrier can't
142 | list: #180/195/230/222/252 work
143 lload f 180/181/182/183/184/185/186/187/188/189/190/191/192/193/194/195/196/197/198/199/200/201/202/203/204/230/231/232/233/234/222/223/224/225/252/253/254 0
144 lload f 180/181/182/183/184/185/186/187/188/189/190/191/192/193/194/195/196/197/198/199/200/201/202/203/204/230/231/232/233/234/222/223/224/225/252/253/254 1
145 | group: #180/195/230 work
146 lload f B 1
147 lload f D 1
148 | area: none of army b works
149 lload f #1 1 ?army=b
150 lload f 0:9,0:5 1 ?army=b
151 | BUG: 0:9,0:5 loads allied #92, unlike the other areas
152 lload f -0:9,0:5 1 ?army=b
153 |
154 | load to desired level rather than an amount
155 | list of own and foreign lands: #50/92 work
156 lload f 50/51/52/53/54/90/92/93/94 -6
157 | group: #50 works
158 lload f a -7
159 lload f b -7
160 | while on a ship or land
161 | BUG: land #185/190/200 can load even though their carrier can't
162 | list: #180/195/230/222/252 work
163 lload f 180/181/182/183/184/185/186/187/188/189/190/191/192/193/194/195/196/197/198/199/200/201/202/203/204/230/231/232/233/234/222/223/224/225/252/253/254 -6
164 | group: #180/195/230 work
165 lload f B -7
166 lload f D -7
167 | own and occupied civilians, own and oldown's land
168 | TODO need a land unit that can carry c to test this
169 |
170 || lands loading commodities with lunload
171 | only own lands in own sectors can work (even though we actually load)
172 | list of own and foreign lands: #50 works
173 lunload f 50/51/52/53/54/90/92/93/94 -8
174 | group: #50 works
175 lunload f a -9
176 lunload f b -9
177 | while on a ship or land
178 | BUG: land #185/190/200 can load even though their carrier can't
179 | list: #180/195/230 work
180 lunload f 180/181/182/183/184/185/186/187/188/189/190/191/192/193/194/195/196/197/198/199/200/201/202/203/204/230/231/232/233/234/222/223/224/225/252/253/254 -8
181 | group: #180/195/230 work
182 lunload f B -9
183 lunload f D -9
184 | own and occupied civilians, own and oldown's land
185 | TODO need a land unit that can carry c to test this
186 |
187 || ships unloading commodities with load
188 | only own ships in own sectors can work (even though we actually unload)
189 | list of own and foreign ships: #0/15/25 work
190 load m 0/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/90/92/93/94/95 -5
191 | group: #0/15/25 work
192 load m a -4
193 load m b -4
194 | own and occupied civilians, own and oldown's ship: #81 works
195 load c 80/81/85/86/87 -1
196 |
197 || ships unloading commodities with unload
198 | list of own and foreign ships: #0/1/2/15/16/17/25/26/27 work
199 unload m 0/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/90/92/93/94/95 -3
200 | group: #0/1/2/15/16/17/25/26/27 work
201 unload m a -2
202 unload m b -2
203 | unload to desired level rather than an amount
204 | list of own and foreign ships: #0/1/2/15/16/17/25/26/27 work
205 unload m 0/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/90/92/93/94/95 0
206 unload m 0/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/90/92/93/94/95 1
207 | group: #0/1/2/15/16/17/25/26/27 work
208 unload m a 1
209 unload m b 1
210 | own and occupied civilians, own and oldown's ship: #81 works
211 unload c 80/81/85/86/87 1
212 |
213 || lands unloading commodities with lload
214 | list of own and foreign lands: #50 works
215 lload m 50/51/52/53/54/90/92/93/94 -5
216 | group: #50 works
217 lload m a -4
218 lload m b -4
219 | while on a ship or land
220 | BUG: land #185/190/200 can load even though their carrier can't
221 | list: #180/195/230 work
222 lload m 180/181/182/183/184/185/186/187/188/189/190/191/192/193/194/195/196/197/198/199/200/201/202/203/204/230/231/232/233/234/222/223/224/225/252/253/254 -5
223 | group: #180/195/230 work
224 lload m B -4
225 lload m D -4
226 | own and occupied civilians, own and oldown's land
227 | TODO need a land unit that can carry c to test this
228 |
229 || lands unloading commodities with lunload
230 | list of own and foreign lands: #50/51 work
231 lunload m 50/51/52/53/54/90/92/93/94 -3
232 | group: #50/51 work
233 lunload m a -2
234 lunload m b -2
235 | while on a ship or land
236 | BUG: land #185/186/190/191/200/201 can load even though their carrier can't
237 | list: #180/181/195/196/230/231 work
238 lunload m 180/181/182/183/184/185/186/187/188/189/190/191/192/193/194/195/196/197/198/199/200/201/202/203/204/230/231/232/233/234/222/223/224/225/252/253/254 -3
239 | group: #180/181/195/196/230/231 work
240 lunload m B -2
241 lunload m D -2
242 |
243 | unload amount rather than to desired level
244 | list of own and foreign lands: #50/51 work
245 lunload m 50/51/52/53/54/90/92/93/94 0
246 lunload m 50/51/52/53/54/90/92/93/94 1
247 | group: #50/51 work
248 lunload m a 1
249 lunload m b 1
250 | while on a ship or land
251 | BUG: land #185/186/190/191/200/201 can load even though their carrier can't
252 | list: #180/181/195/196/230/231 work
253 lunload m 180/181/182/183/184/185/186/187/188/189/190/191/192/193/194/195/196/197/198/199/200/201/202/203/204/230/231/232/233/234/222/223/224/225/252/253/254 0
254 lunload m 180/181/182/183/184/185/186/187/188/189/190/191/192/193/194/195/196/197/198/199/200/201/202/203/204/230/231/232/233/234/222/223/224/225/252/253/254 1
255 | group: #180/181/195/196/230/231 work
256 lunload m B 1
257 lunload m D 1
258 | own and occupied civilians, own and oldown's land
259 | TODO need a land unit that can carry c to test this
260 |
261 || load / unload something the ship/land can't hold
262 load i 80 1
263 unload i 80 1
264 lload c 81 1
265 lunload c 81 1
266 |
267 || load more than sector has
268 | with load
269 load s 80 10
270 load s 80 10
271 load s 81 -10
272 load s 81 -10
273 | with unload
274 unload s 82 -10
275 unload s 82 -10
276 | with lload
277 lload g 80 10
278 lload g 80 10
279 lload g 81 -10
280 lload g 81 -10
281 | with lunload
282 lunload g 82 -10
283 lunload g 82 -10
284 |
285 || unload more than ship/land has
286 | with unload
287 unload s 80 10
288 unload s 80 10
289 | with lunload
290 lunload g 80 10
291 lunload g 80 10
292 |
293 || load more than ship/land can hold
294 | with load
295 load m 80 100
296 load m 80 100
297 load m 81 -100
298 load m 81 -100
299 | with unload
300 unload m 82 -100
301 unload m 82 -100
302 | with lload
303 lload b 80 20
304 lload b 80 20
305 lload b 81 -20
306 lload b 81 -20
307 | with lunload
308 lunload b 82 -20
309 lunload b 82 -20
310 |
311 || unload more than sector can hold
312 | with load
313 load l 80 -1
314 load l 80 -1
315 | with unload
316 unload l 81 -1
317 unload l 81 -1
318 unload l 82 100
319 unload l 82 100
320 | with lload
321 lload i 80 -1
322 lload i 80 -1
323 | with lunload
324 lunload i 81 -1
325 lunload i 81 -1
326 lunload i 82 100
327 lunload i 82 100
328 |
329 || interactive
330 load
331 x
332 load
333 f
334 -1
335 load
336 f
337 80/81
338 x
339 1
340 lunload
341 h
342 80/81/82
343 x
344 0
345 1
346 |
347 ||| load / unload planes
348 |
349 || general sanity
350 | invalid ship
351 load plane -1
352 unload plane -1
353 | invalid plane
354 lload plane -1
355 lunload plane -1
356 | invalid plane to load / unload
357 load plane 100 -1
358 unload plane 100 -1
359 lload plane 100 -1
360 lunload plane 100 -1
361 |
362 || no ships / lands match
363 load plane n
364 unload plane n
365 lload plane n
366 lunload plane n
367 |
368 || ships loading planes
369 | ships #0/15/92/93 work
370 load plane a A
371 load plane 90 180
372 load plane 92 182
373 load plane 93 183
374 load plane 94 184
375 |
376 || ships unloading planes
377 | ships #0/1/2/15/16/17 work
378 unload plane a B
379 unload plane b B
380 |
381 || ships that can't load
382 | not capable
383 load plane 25
384 unload plane 25
385 | no room
386 load plane 105
387 |
388 || planes that can't be loaded
389 | no planes match
390 load plane 100 n
391 | not capable: non-light fixed-wing
392 load plane 100 140
393 | already loaded
394 load plane 100 57/58
395 | hardened missile
396 load plane 101 59
397 |
398 || ships' plane load limits
399 | can't carry helo
400 load plane 101 60
401 | can't carry x-light
402 | TODO need a ship that can't carry xlight, but can carry helo
403 | (must be helo because x-light can use missile and fixed-wing slots)
404 | can't carry light missiles
405 load plane 80 90
406 | can't carry light planes
407 load plane 101 110
408 | no room for light plane (loads first 20)
409 load plane 100 F
410 | no room for helo (loads first 20)
411 load plane 100 K
412 | no room for x-light (loads first 4)
413 load plane 100 E
414 | no room for light missile (loads first 10)
415 load plane 101 M
416 | helo can use fixed-wing slot
417 unload plane 100 110
418 load plane 100 80/81
419 | x-light can use missile slot
420 unload plane 101 90
421 load plane 101 44/45
422 | plane carrier can load missile instead of fixed-wing plane
423 unload plane 100 111
424 load plane 100 100/101
425 |
426 || lands loading planes
427 | land #50/92 work
428 lload plane a C
429 lload plane 90 210
430 lload plane 92 212
431 lload plane 93 213
432 lload plane 94 214
433 | while on a ship or land
434 lload plane 121/123 231/233
435 |
436 || land unloading planes
437 | lands #50/51 work
438 lunload plane a D
439 lunload plane b D
440 | while on a ship or land
441 lunload plane 120/122 230/232
442 |
443 || lands that can't load
444 | not capable
445 lload plane 0
446 lunload plane 0
447 | no room
448 lload plane 105
449 |
450 || planes that can't be loaded
451 | no planes match
452 lload plane 100 n
453 | not capable: non-xlight
454 lload plane 100 99
455 | already loaded
456 lload plane 100 57/58
457 | hardened missile
458 lload plane 100 59
459 |
460 || lands' plane load limits
461 | can't carry x-light implies can't carry any, covered above
462 | no room for x-light plane (loads first one)
463 lload plane 100 E
464 |
465 || interactive
466 load
467 plane
468 !
469 load
470 plane
471 80/81
472 *
473 *
474 unload
475 plane
476 80
477 *
478 lunload
479 plane
480 100/105
481 x
482 *
483 lload
484 plane
485 105
486 *
487 |
488 ||| load / unload lands
489 |
490 || general sanity
491 | invalid ship
492 load land -1
493 unload land -1
494 | invalid land
495 lload land -1
496 lunload land -1
497 | invalid land to load / unload
498 load land 110 -1
499 unload land 110 -1
500 lload land 110 -1
501 lunload land 110 -1
502 |
503 || no ships / lands match
504 load land n
505 unload land n
506 lload land n
507 lunload land n
508 |
509 || ships loading lands
510 | ships #0/15/92/93 work
511 load land a A
512 load land 90 210
513 load land 92 212
514 load land 93 213
515 load land 94 214
516 |
517 || ships unloading lands
518 | ships #0/1/2/15/16/17 work
519 unload land a B
520 unload land b B
521 |
522 || ships that can't load
523 | not capable
524 load land 25
525 unload land 25
526 *
527 | odd: prompts for lands, unlike unload plane
528 | no room
529 load land 115
530 |
531 || lands that can't be loaded
532 | no lands match
533 load land 110 n
534 | not capable: heavy
535 load land 110 160
536 | already loaded
537 load land 110 120/122
538 | carrying units
539 | TODO need a non-heavy land that can carry lands to test this
540 | carrying civilians, onto foreign ship
541 | TODO need a land unit that can carry c to test this
542 |
543 || lands that can't be unloaded
544 | carrying foreign civilians
545 | TODO need a land unit that can carry c to test this
546 |
547 || ships' land load limits
548 | can't carry non-light
549 load land 110/113 150
550 | can't carry light (only spies)
551 load land 111/113 140
552 | no room for non-light (loads first 2)
553 load land 112 150/151/152
554 | no room for light (loads first 2)
555 load land 110 140/141/142
556 | no room for spy (loads first 2 on 1st ship, 3rd on 2nd ship)
557 load land 111/113 170/171/172
558 | The "already on ship" messages for units loaded on first ship aren't nice
559 | light can use non-light slot
560 unload land 112 150
561 load land 112 142/143
562 | spy can use light and non-light slot
563 unload land 110/112 140/142
564 load land 110/112 173/174
565 |
566 || lands loading lands
567 | land #50/92 works
568 lload land a C
569 lload land 90 240
570 lload land 92 242
571 lload land 93 243
572 lload land 94 244
573 |
574 || lands unloading lands
575 | lands #50/51 work
576 lunload land a D
577 lunload land b D
578 |
579 || lands that can't load
580 | not capable
581 lload land 0
582 lunload land 0
583 *
584 | odd: prompts for lands, unlike unload plane
585 | while on a ship or land
586 | TODO need a non-heavy land that can carry lands to test this
587 | no room
588 lload land 115
589 |
590 || lands that can't be loaded
591 | no lands match
592 lload land 110 n
593 | not capable: carrying units, heavy
594 lload land 110 115/160
595 | already loaded
596 lload land 110 120/122
597 | carrying units
598 | TODO need a non-heavy land that can carry lands to test this
599 | can't load self
600 lload land 110 110
601 | carrying civilians, onto foreign land
602 | TODO need a land unit that can carry c to test this
603 |
604 || lands that can't be unloaded
605 | carrying foreign civilians
606 | TODO need a land unit that can carry c to test this
607 |
608 || lands' land load limits
609 | no room (loads first one)
610 lunload land 115 130
611 lload land 115 143/130
612 |
613 || interactive
614 lload
615 land
616 !
617 lunload
618 land
619 115
620 131/132
621 lload
622 land
623 50/110/115
624 132/131
625 132/131
626 x