Construction materials required for building a ship, plane or land unit are rounded randomly. Crafty players exploit this to save materials: they put just enough materials there so that build succeeds when it rounds down. Then they simply keep trying until it succeeds. Planes and land units are built at 10%, so rounding happens when materials for 100% aren't multiples of ten. If they're below ten, you can even build without materials. In the stock game, this is the case for linf, and many plane types. Ships are built at 20%, so multiples of five aren't rounded. Ship building never rounds in the stock game. Prevent the abuse of random rounding by requiring the required fractional amount rounded up to be present. Don't change the actual charging of materials; that's still randomly rounded. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
38 lines
735 B
Text
38 lines
735 B
Text
|| planes
|
|
| invalid type
|
|
build p -1,1 @
|
|
| insufficient tech
|
|
build p -1,1 sf
|
|
| too many
|
|
build p -1,1 f2 21
|
|
n
|
|
| f2 needs 0.8l/0.2h/1m/4av/$40, tech 80
|
|
| asking for too high and too low tech
|
|
build p -1,1 f2 1 101
|
|
build p -1,1 f2 1 79
|
|
| not an airfield, no materials, inefficient
|
|
build p -1,1 f2
|
|
build p 3:5,1 f2
|
|
| insufficient materials: 1,1 short 1l/1h, 3,1 short 1m
|
|
move m -1,1 1 jh
|
|
move l -1,1 1 jjh
|
|
move h -1,1 1 jjh
|
|
build p 1:3,1 f2
|
|
| build until out of avail/money
|
|
| sectors can build 2 each, but out of money after 3 total
|
|
move m -1,1 3 jh
|
|
move l -1,1 4 jh
|
|
move h -1,1 4 jh
|
|
move m -1,1 4 jjh
|
|
move l -1,1 3 jjh
|
|
move h -1,1 3 jjh
|
|
build
|
|
p
|
|
1,1
|
|
f2
|
|
build p 1,1 f2
|
|
build p 1:3,1 f2 3 90
|
|
|| show results
|
|
plan *
|
|
cens * ?des=*
|
|
comm * ?des=*
|