]> git.pond.sub.org Git - empserver/blobdiff - src/lib/subs/takeover.c
Replace "roll0(N) + M" by "roll(N) + M-1"
[empserver] / src / lib / subs / takeover.c
index 12dae13bc78615d82fb73e8ac9544cd30ea43af9..996b01314e1eb850886d5125155ec6c7939f870a 100644 (file)
@@ -100,7 +100,7 @@ takeover(struct sctstr *sp, natid newown)
            if (!(chance(LND_SPY_DETECT_CHANCE(lp->lnd_effic))))
                continue;
        }
-       n = lp->lnd_effic - (30 + roll0(100));
+       n = lp->lnd_effic - (29 + roll(100));
        if (n < 0)
            n = 0;
        lp->lnd_effic = n;
@@ -129,7 +129,7 @@ takeover(struct sctstr *sp, natid newown)
      * how spunky are these guys?
      * n: random number from -25:75 + (50 - loyalty)
      */
-    n = (50 - sp->sct_loyal) + (roll0(100) - 25);
+    n = (50 - sp->sct_loyal) + (roll(100) - 26);
     if (n > 0 && sp->sct_own == sp->sct_oldown) {
        che_count = (civ * n / 3000) + 5;
        if (che_count * 2 > civ)
@@ -186,7 +186,7 @@ takeover_plane(struct plnstr *pp, natid newown)
      * XXX If this was done right, planes could escape,
      * flying to a nearby friendly airport.
      */
-    n = pp->pln_effic - (30 + roll0(100));
+    n = pp->pln_effic - (29 + roll(100));
     if (n < 0)
        n = 0;
     pp->pln_effic = n;