From: Markus Armbruster Date: Wed, 26 Apr 2006 16:43:25 +0000 (+0000) Subject: (guerrilla): Security units' raid was broken in 4.0.0: the number of X-Git-Tag: v4.3.2~8 X-Git-Url: http://git.pond.sub.org/?p=empserver;a=commitdiff_plain;h=6de081a38496b28aefc92a5ed808dc785a58622d (guerrilla): Security units' raid was broken in 4.0.0: the number of che killed was 100 times too small, thus zero for all practical cases. 4.2.7 attempted to fix it, but left it broken for efficiency < 100. It also increased deadliness of 100% units by a factor of 2.5. Restore pre-4.0.0 behavior. --- diff --git a/src/lib/update/revolt.c b/src/lib/update/revolt.c index 3d19adea6..82dc21333 100644 --- a/src/lib/update/revolt.c +++ b/src/lib/update/revolt.c @@ -184,11 +184,10 @@ guerrilla(struct sctstr *sp) lcp = &lchr[(int)lp->lnd_type]; mil += lnd_getmil(lp); - r = (((float)(lp->lnd_effic / 100) * (float)(lnd_getmil(lp))) / - 2); - if (r < 2) - r = 2; - che_kill = (roll(r) - 1); + r = (lnd_getmil(lp) * lp->lnd_effic) / 500; + if (r < 1) + r = 1; + che_kill = roll(r); if (che_kill > che) che_kill = che; if (che_kill) {