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