]> git.pond.sub.org Git - empserver/commitdiff
(LND_AMM): Became weird in 4.2.3: ammo use depends on l_dam if l_ammo
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 8 Jul 2006 07:21:47 +0000 (07:21 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Sat, 8 Jul 2006 07:21:47 +0000 (07:21 +0000)
is non-zero; actual value of non-zero l_ammo was unimportant.  Side
effect: it substantially increased ammunition consumption at high
tech, because the change made the value increase with tech.  Back out
4.2.3's change, just use l_ammo.  This lets deities customize
ammunition consumption independent of damage.  Remove second
parameter.  Callers changed.

include/land.h
src/lib/subs/lndsub.c
src/lib/subs/show.c

index 93b9305990ab1c75ea11ed6051686f27718c193e..95b161042d43cf63a429220df793c01c40202b66 100644 (file)
@@ -160,7 +160,7 @@ struct lchrstr {
                               logx((t), 60.0))) : (b))
 #define LND_ACC(b, t) ((b * (1.0 - ((sqrt(t) / 100.0) * 1.1))) < 0     \
                       ? 0 : (b * (1.0 - ((sqrt(t) / 100.0) * 1.1))))
-#define LND_AMM(b, d, t) ((b) ? ((LND_DAM((d), (t)) / 2) + 1) : 0)
+#define LND_AMM(b, t) (b)
 #define LND_AAF(b, t) ((b * (1.0 + ((sqrt(t) / 100.0) * 3.0))) > 127   \
                       ? 127 : (b * (1.0 + ((sqrt(t) / 100.0) * 3.0))))
 #define LND_FC(b, t)  (b)
index 727ac8da7ec9f1a9c5a99cac1499d3b6f3b7a2ef..6eaabbd78618ec1ca2a04c803d1d91febd3bea9a 100644 (file)
@@ -1364,7 +1364,7 @@ lnd_set_tech(struct lndstr *lp, int tlev)
     lp->lnd_frg = (int)LND_FRG(lcp->l_frg, tech_diff);
     lp->lnd_acc = (int)LND_ACC(lcp->l_acc, tech_diff);
     lp->lnd_dam = (int)LND_DAM(lcp->l_dam, tech_diff);
-    lp->lnd_ammo = (int)LND_AMM(lcp->l_ammo, lcp->l_dam, tech_diff);
+    lp->lnd_ammo = (int)LND_AMM(lcp->l_ammo, tech_diff);
     lp->lnd_aaf = (int)LND_AAF(lcp->l_aaf, tech_diff);
     lp->lnd_fuelc = (int)LND_FC(lcp->l_fuelc, tech_diff);
     lp->lnd_fuelu = (int)LND_FU(lcp->l_fuelu, tech_diff);
index f79536d04976d25846a25e7cf0ad534e05ae2f11..09a76fd85bfa0fcc38b0d6bebab69c8eae8e5bd5 100644 (file)
@@ -482,7 +482,7 @@ show_land_stats(int tlev)
           (int)LND_FRG(lcp->l_frg, ourtlev),
           (int)LND_ACC(lcp->l_acc, ourtlev),
           (int)LND_DAM(lcp->l_dam, ourtlev),
-          (int)LND_AMM(lcp->l_ammo, lcp->l_dam, ourtlev),
+          (int)LND_AMM(lcp->l_ammo, ourtlev),
           (int)LND_AAF(lcp->l_aaf, ourtlev));
        pr("%2d %2d %2d %2d ",
           (int)LND_FC(lcp->l_fuelc, ourtlev),