update/revolt: Destroy land units only when casualties demand it

take_casualties() first applies casualties without destroying land
units, and if any remain, applies them by destroying land units.  This
is wrong, because the remaining casualties may not suffice to actually
kill.  Has been that way since land units were added in Chainsaw 3.

Apply remaining casualties more carefully: destroy land units only
when efficiency falls below 10%.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
Markus Armbruster 2016-09-18 17:09:35 +02:00
parent 4fd1e889c8
commit 35ecc008ce
4 changed files with 42 additions and 26 deletions

View file

@ -597,7 +597,7 @@
Play#0 output Play#0 1 Thu Jan 1 00:00:00 1970
Play#0 output Play#0 1 COMMODITIES deliver-- distribute
Play#0 output Play#0 1 sect sgpidbolhr sgpidbolhr sh gun pet iron dust bar oil lcm hcm rad
Play#0 output Play#0 1 1 0,0 c .......... .......... 0 0 0 0 0 0 0 7 34 0
Play#0 output Play#0 1 1 0,0 c .......... .......... 0 0 0 0 0 0 0 7 33 0
Play#0 output Play#0 1 1 2,0 + .......... .......... 0 0 0 0 0 0 0 0 0 0
Play#0 output Play#0 1 1 4,0 + .......... .......... 0 0 0 0 0 0 0 0 0 0
Play#0 output Play#0 1 1 6,0 + .......... .......... 0 0 0 0 0 0 0 0 0 0
@ -902,7 +902,7 @@
Play#0 output Play#0 1 total pop was 6100, yielding 0.00 hap, 0.00 edu
Play#0 output Play#0 1 1.7834 technology (0.0000 + 1.7834), 1.7551 research (0.0000 + 1.7551) produced
Play#0 output Play#0 1 Army delta $0, Navy delta $0, Air force delta $-74
Play#0 output Play#0 1 money delta was $-6322 for this update
Play#0 output Play#0 1 money delta was $-6321 for this update
Play#0 output Play#0 6 0 640
Play#0 input nation 2
Play#0 command nation
@ -910,7 +910,7 @@
Play#0 output Play#0 1 (#2) 2 Nation Report Thu Jan 1 00:00:00 1970
Play#0 output Play#0 1 Nation status is ACTIVE Bureaucratic Time Units: 192
Play#0 output Play#0 1 10% eff capital at -2,0 has 130 civilians & 0 military
Play#0 output Play#0 1 The treasury has $-6222.00 Military reserves: 975
Play#0 output Play#0 1 The treasury has $-6221.00 Military reserves: 975
Play#0 output Play#0 1 Education.......... 15.24 Happiness....... 2.74
Play#0 output Play#0 1 Technology.........101.15 Research........ 1.74
Play#0 output Play#0 1 Technology factor : 50.19% Plague factor : 1.98%
@ -1372,9 +1372,8 @@
Play#0 output Play#0 1 body count: troops: 10, rebels: 5
Play#0 output Play#0 1 Guerrilla warfare in -8,-8
Play#0 output Play#0 1 body count: troops: 7, rebels: 22
Play#0 output Play#0 1 inf infantry #29 dies fighting guerrillas in -6,-8
Play#0 output Play#0 1 Guerrilla warfare in -6,-8
Play#0 output Play#0 1 body count: troops: 50, rebels: 52
Play#0 output Play#0 1 body count: troops: 26, rebels: 52
Play#0 output Play#0 1 Revolutionary subversion reported in -13,-7!
Play#0 output Play#0 1 PLAGUE deaths reported in -16,-6
Play#0 output Play#0 1 PLAGUE deaths reported in -14,-6
@ -1411,8 +1410,8 @@
Play#0 output Play#0 1 0 happiness, 0 education produced
Play#0 output Play#0 1 total pop was 24024, yielding 0.00 hap, 0.00 edu
Play#0 output Play#0 1 1.7834 technology (0.0000 + 1.7834), 1.7551 research (0.0000 + 1.7551) produced
Play#0 output Play#0 1 Army delta $-858, Navy delta $-300, Air force delta $0
Play#0 output Play#0 1 money delta was $-7453 for this update
Play#0 output Play#0 1 Army delta $-918, Navy delta $-300, Air force delta $0
Play#0 output Play#0 1 money delta was $-7513 for this update
Play#0 output Play#0 6 0 640
Play#0 input nation 4
Play#0 command nation
@ -1420,7 +1419,7 @@
Play#0 output Play#0 1 (#4) 4 Nation Report Thu Jan 1 00:00:00 1970
Play#0 output Play#0 1 Nation status is ACTIVE Bureaucratic Time Units: 640
Play#0 output Play#0 1 100% eff capital at -1,-1 has 130 civilians & 0 military
Play#0 output Play#0 1 The treasury has $17547.00 Military reserves: 0
Play#0 output Play#0 1 The treasury has $17487.00 Military reserves: 0
Play#0 output Play#0 1 Education.......... 3.05 Happiness....... 4.44
Play#0 output Play#0 1 Technology......... 31.58 Research........ 1.74
Play#0 output Play#0 1 Technology factor : 35.23% Plague factor : 1.29%
@ -1683,7 +1682,8 @@
Play#0 output Play#0 1 4 25 sec security -12,-8 60% 0 0 40 9 170 42% 0 0
Play#0 output Play#0 1 4 26 inf infantry -12,-8 80% 0 0 50 10 50 42% 0 0
Play#0 output Play#0 1 4 28 linf light infa -8,-8 76% 14 0 48 9 50 42% 0 0
Play#0 output Play#0 1 16 units
Play#0 output Play#0 1 4 29 inf infantry -6,-8 14% 24 0 47 8 50 42% 0 0
Play#0 output Play#0 1 17 units
Play#0 output Play#0 6 0 640
Play#0 input read 5
Play#0 command read
@ -1699,7 +1699,7 @@
Play#0 output Play#0 1 total pop was 190, yielding 0.00 hap, 0.00 edu
Play#0 output Play#0 1 1.7834 technology (0.0000 + 1.7834), 1.7551 research (0.0000 + 1.7551) produced
Play#0 output Play#0 1 Army delta $-60, Navy delta $0, Air force delta $0
Play#0 output Play#0 1 money delta was $1438 for this update
Play#0 output Play#0 1 money delta was $1437 for this update
Play#0 output Play#0 6 0 640
Play#0 input nation 5
Play#0 command nation
@ -1707,7 +1707,7 @@
Play#0 output Play#0 1 (#5) 5 Nation Report Thu Jan 1 00:00:00 1970
Play#0 output Play#0 1 Nation status is ACTIVE Bureaucratic Time Units: 99
Play#0 output Play#0 1 No capital (was at -16,-8).
Play#0 output Play#0 1 The treasury has $26438.00 Military reserves: 0
Play#0 output Play#0 1 The treasury has $26437.00 Military reserves: 0
Play#0 output Play#0 1 Education.......... 15.24 Happiness....... 4.44
Play#0 output Play#0 1 Technology.........101.15 Research........ 1.74
Play#0 output Play#0 1 Technology factor : 50.19% Plague factor : 1.98%
@ -1762,11 +1762,11 @@
Play#0 output Play#0 1 COMMODITIES deliver-- distribute
Play#0 output Play#0 1 sect sgpidbolhr sgpidbolhr sh gun pet iron dust bar oil lcm hcm rad
Play#0 output Play#0 1 6 0,8 c .......... .......... 0 0 0 0 0 0 0 400 400 0
Play#0 output Play#0 1 6 2,8 - .......... .......... 0 0 0 0 0 0 0 384 393 0
Play#0 output Play#0 1 6 2,8 - .......... .......... 0 0 0 0 0 0 0 384 394 0
Play#0 output Play#0 1 6 4,8 f .......... .......... 0 0 0 0 0 0 0 391 396 0
Play#0 output Play#0 1 6 6,8 * .......... .......... 0 0 0 0 0 0 0 386 396 0
Play#0 output Play#0 1 6 8,8 h .......... .......... 0 0 0 0 0 0 0 400 400 0
Play#0 output Play#0 1 6 10,8 ! .......... .......... 0 0 0 0 0 0 0 391 396 0
Play#0 output Play#0 1 6 10,8 ! .......... .......... 0 0 0 0 0 0 0 391 395 0
Play#0 output Play#0 1 6 12,8 * .......... .......... 0 0 0 0 0 0 0 393 398 0
Play#0 output Play#0 1 6 14,8 h .......... .......... 0 0 0 0 0 0 0 400 400 0
Play#0 output Play#0 1 8 sectors