empserver/tests/fire/03-ship-1
Markus Armbruster 6d3106a582 tests/fire: Cover mission clearing
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
2015-03-02 08:20:51 +01:00

102 lines
1.6 KiB
Text

||| fire ship
| ship must have mil>0, glim>0, gun>0, shell>0, eff>=60
|
|| assets
ship * ?shell>0
carg * ?shell>0
|
|| ship not firing
| nonexistant ship
fire sh 666 6,0
| 100% cs
fire sh 9 6,0
| 59% bb
fire sh 1 6,0
| 60% bb, at itself
fire sh 2 2
| at sector that doesn't exist
fire sh 2 1,0
| at ship that doesn't exist
fire sh 2 666
| at valid target, but no mil
unload m 2 13
fire sh 2 6,0
load m 2 13
| likewise no guns
unload g 2 10
fire sh 2 6,0
load g 2 10
| likewise no shells
unload s 2 100
fire sh 2 6,0
load s 2 100
| show mission
miss s * ?mission#0 q
__cmd added 1 2 0
|
|| ship firing nowhere (shells consumed)
| 100% bb
| at sea out of range
fire sh 3 -12,0
| at ship out of range
fire sh 3 0
| at sub, server pretends out of range
fire sh 3 13
| likewise in port
fire sh 3 12
|
|| ship firing at bogus target
| 100% bb
| at sea
fire sh 3 6,0
| at sanctuary
fire sh 3 2,-2
|
|| ship firing at undefended target
| 100% bb with 1, 2, 3 guns
| at empty highway
unload g 4 -1
fire sh 4 0,2
load g 4 1
fire sh 4 0,2
load g 4 1
fire sh 4 0,2
load g 4 7
| likewise 1, 2 shell (take care to avoid automatic supply)
unload s 4 -1
load s 3 100
fire sh 4 0,2
tend s 3 2 4
__cmd added -2 -2 0
fire sh 4 0,2
tend s 3 93 4
__cmd added -1 -1 0
| likewise 1, 2, 3 mil
unload m 4 -1
fire sh 4 0,2
load m 4 1
fire sh 4 0,2
load m 4 1
fire sh 4 0,2
load m 4 10
| 60% bb
fire sh 2 0,2
| 100% bb
fire sh 3 0,2
| 100% dd
| at sub, two sunk
fire sh 5 13
fire sh 6 12
fire sh 5 11
fire sh 6 10
| at ship, fractional range, ~50% chance
navi 5 jh
fire sh 5 24
fire sh 5 24
fire sh 5 24
fire sh 5 24
fire sh 5 24
fire sh 5 24
|
|| show shell use
carg * ?shell>0