.s1
Land units present in a sector help to fight them, fighting without
any multiplier, either offensive or defensive and without any
-fortification bonus. Any units with the
-\*Qsecurity\*U ability will also kill some che before anything else is
+fortification bonus, except units units with the
+\*Qsecurity\*U ability fight with a multiplier of four. They
+will also kill some che before anything else is
done (commando raids).
.SA "Populace, Occupation, Updates"
* Known contributors to this file:
* Dave Pare, 1986
* Steve McClure, 1997-2000
- * Markus Armbruster, 2004-2012
+ * Markus Armbruster, 2004-2016
*/
#include <config.h>
int ratio;
int che;
int mil;
+ int security_bonus;
int cc, mc;
double odds;
int civ;
actor = sp->sct_oldown;
che = sp->sct_che;
mil = sp->sct_item[I_MILIT];
+ security_bonus = 0;
snxtitem_xy(&ni, EF_LAND, sp->sct_x, sp->sct_y);
if (lchr[(int)lp->lnd_type].l_flags & L_SECURITY) {
int che_kill, r;
- mil += lp->lnd_item[I_MILIT];
+ security_bonus += lp->lnd_item[I_MILIT] * 3;
r = (lp->lnd_item[I_MILIT] * lp->lnd_effic) / 500;
che_kill = r < 1 ? 0 : roll(r);
if (che_kill > che)
goto domove;
}
- ratio = mil / che;
- odds = (double)che / (mil + che);
+ ratio = (mil + security_bonus) / che;
+ odds = (double)che / (mil + security_bonus + che);
odds /= hap_fact(tnat, getnatp(sp->sct_oldown));
if (mil == 0) {
wu(0, sp->sct_own, "Revolutionary subversion reported in %s!\n",
*/
if (chance(ratio * 0.10)) {
n = (mil / 5) + 1;
- odds = (double)che / (n + che);
+ odds = (double)che / (n + security_bonus / 5 + che);
odds /= hap_fact(tnat, getnatp(sp->sct_oldown));
while (che > 0 && n > 0) {
if (chance(odds)) {
if (lp->lnd_ship >= 0)
continue;
nunits++;
- if (lchr[(int)lp->lnd_type].l_flags & L_SECURITY)
- nunits++;
}
if (nunits == 0)
if (cantake >= each) {
deq = ((double)each / lp->lnd_item[I_MILIT]) * 100.0;
- mc -= 2 * each;
+ mc -= each;
} else if (cantake > 0) {
deq = ((double)cantake / lp->lnd_item[I_MILIT]) * 100.0;
- mc -= 2 * cantake;
+ mc -= cantake;
} else
deq = 0;
if (!(lchr[(int)lp->lnd_type].l_flags & L_SECURITY))
continue;
- mc -= (lp->lnd_effic / 100.0) * lp->lnd_item[I_MILIT] * 2.0;
+ mc -= (lp->lnd_effic / 100.0) * lp->lnd_item[I_MILIT];
lnd_dies_fighting_che(lp);
if (mc <= 0)
return;
| BUG: empty inf#21 dies fighting guerrillas
| -12,-8 sec#25 raids, #27 doesn't, che win, kill sec#25/27/inf#26,
| BUG: spy#24 dies fighting guerrillas
-| BUG: body count off, claims 110m, actually 70m
| BUG: "Sector -12,-8 has been retaken!" instead of takeover
| -10,-8 che win, don't take over
| -8,-8 che lose
3 14 -8 4 9 120 0 112 0 0 0 0 0 14 -8 9 0 34 1 4 0 0 0 0 0 3 130 0 0 0 0 0 0 0 97 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0
5 -16 -8 4 0 120 0 0 0 0 0 0 0 -16 -8 0 0 100 1 4 0 0 0 0 0 5 124 5 0 0 0 0 0 0 96 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0
5 -14 -8 29 100 120 0 0 0 0 0 0 0 -14 -8 0 0 100 1 29 0 0 0 0 0 5 124 5 0 0 0 0 20 100 97 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0
-4 -12 -8 4 37 120 0 35 0 0 0 0 0 -12 -8 38 0 100 1 4 0 0 0 0 0 0 123 5 0 0 0 0 0 0 97 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0
+4 -12 -8 4 37 120 0 35 0 0 0 0 0 -12 -8 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0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0
-4 -13 -7 4 39 120 0 0 0 0 0 0 0 -13 -7 39 0 100 0 4 0 0 0 0 0 4 130 0 0 0 0 0 0 0 97 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 133 4 0 0 0 0 0
+4 -13 -7 4 39 120 0 0 0 0 0 0 0 -13 -7 39 0 100 0 4 0 0 0 0 0 4 130 0 0 0 0 0 0 0 97 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 116 4 0 0 0 0 0
4 -11 -7 4 41 120 0 0 0 0 0 0 0 -11 -7 42 0 100 0 4 0 0 0 0 0 4 130 20 0 0 0 0 0 0 96 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0
4 -9 -7 4 39 120 0 0 0 0 0 0 0 -9 -7 39 0 100 0 4 0 0 0 0 0 4 130 0 0 0 0 0 0 0 97 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0
4 -7 -7 4 39 120 0 0 0 0 0 0 0 -7 -7 39 0 100 0 4 0 0 0 0 0 4 130 0 0 0 0 0 0 0 96 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0
Play#0 output Play#0 1 sec security #27 dies fighting guerrillas in -12,-8
Play#0 output Play#0 1 Sector -12,-8 has been retaken!
Play#0 output Play#0 1 Guerrilla warfare in -12,-8
- Play#0 output Play#0 1 body count: troops: 110, rebels: 71
+ Play#0 output Play#0 1 body count: troops: 70, rebels: 88
Play#0 output Play#0 1 Guerrilla warfare in -10,-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 own sect eff prd mob uf uf old civ mil uw food work avail fall coa
Play#0 output Play#0 1 5 -16,-8 - 0% 120 .. .. 124 5 0 96 100% 0 0 1
Play#0 output Play#0 1 5 -14,-8 b 100% 120 .. .. 124 5 0 97 100% 0 0 1
- Play#0 output Play#0 1 4 -12,-8 - 37% 120 .. .. 0 123 5 0 97 100% 38 0 1
+ Play#0 output Play#0 1 4 -12,-8 - 37% 120 .. .. 0 123 5 0 96 100% 38 0 1
Play#0 output Play#0 1 4 -10,-8 - 39% 120 .. .. 130 0 0 97 100% 39 0 1
Play#0 output Play#0 1 4 -8,-8 - 39% 120 .. .. 2 130 0 0 97 100% 39 0 1
Play#0 output Play#0 1 4 -6,-8 - 39% 120 .. .. 2 130 0 0 97 100% 39 0 1
Play#0 output Play#0 1 4 -4,-8 - 39% 0 0 0 0 0 0
Play#0 output Play#0 1 4 -2,-8 - 39% 0 0 0 0 0 0
Play#0 output Play#0 1 4 -15,-7 - 41% 0 0 0 0 0 0
- Play#0 output Play#0 1 4 -13,-7 - 39% 0 4 133 0 0 0
+ Play#0 output Play#0 1 4 -13,-7 - 39% 0 4 116 0 0 0
Play#0 output Play#0 1 4 -11,-7 - 41% 0 0 0 0 0 0
Play#0 output Play#0 1 4 -9,-7 - 39% 0 0 0 0 0 0
Play#0 output Play#0 1 4 -7,-7 - 39% 0 0 0 0 0 0