]> git.pond.sub.org Git - empserver/commitdiff
(MINE_LDAMAGE): Change to match damage suffered in lnd_hit_mine().
authorMarkus Armbruster <armbru@pond.sub.org>
Mon, 27 Mar 2006 21:47:50 +0000 (21:47 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Mon, 27 Mar 2006 21:47:50 +0000 (21:47 +0000)
This increases damage suffered in retreat.  Fix info Damage.
(shp_hit_mine): Use MINE_DAMAGE().
(lnd_hit_mine): Use MINE_LDAMAGE().

include/damage.h
info/Damage.t
src/lib/subs/lndsub.c
src/lib/subs/shpsub.c

index 8a529d2a3933dc571fe9f5b1eec681404e7cfa40..88ff8f999cfed1d6310f1f16a95f54ec78e03974 100644 (file)
@@ -40,7 +40,7 @@
 #define DMINE_HITCHANCE(x) ((double) ( (x) / ((x)+20.0) ) )
 #define DMINE_LHITCHANCE(x) ((double) ( (x) / ((x)+35.0) ) )
 #define MINE_DAMAGE() (22 + random()%21)
-#define MINE_LDAMAGE() (10 + random()%11)
+#define MINE_LDAMAGE() (11 + random()%20)
 #define DTORP_HITCHANCE(range, vis) ((double)(0.9/((range)+1)+(((vis)<6)?(5-(vis))*0.03:0)))
 #define TORP_DAMAGE() (torpedo_damage + (random() % torpedo_damage) + \
                       (random() % torpedo_damage))
index ff1337749a02e30a6f1d797a2ea74ec7ef71cafd..ca2cc8f18e052d4acf38ea954352bec84b2296fc 100644 (file)
@@ -32,11 +32,11 @@ Whether you get a blam, Blam, or a BLAM depends on the accuracy of the
 plane and the difficulty of the target (see info bomb).
 
 Land mines
-Land mines damage commodities by random(20) and land units by 10 + random(10).
+Land mines damage commodities by random(20) and land units by 10 + random(20).
 If the land unit is an engineer, then the damags is cut in half.
 
 Sea mines
-Sea mines damage ships 22 + random(20).  If the ship can sweep, then
+Sea mines damage ships 21 + random(21).  If the ship can sweep, then
 the damage is cut in half.
 
 Nuclear Detonation
index a1432fdbafd56d81304ddde98b30ada58f72baa9..b6a493906743910e10f7c7c4084fc315a02ab5c1 100644 (file)
@@ -1019,7 +1019,7 @@ lnd_hit_mine(struct lndstr *lp, struct lchrstr *lcp)
 
     nreport(lp->lnd_own, N_LHIT_MINE, 0, 1);
 
-    m = roll(20) + 10;
+    m = MINE_LDAMAGE();
     if (lcp->l_flags & L_ENGINEER)
        m /= 2.0;
 
index 331a64509e736d15631b9c830d14659fddea2c31..10fa565840656703dfb21f0fda4cd4ebafde7033 100644 (file)
@@ -775,7 +775,7 @@ shp_hit_mine(struct shpstr *sp, struct mchrstr *mcp)
 
     nreport(sp->shp_own, N_HIT_MINE, 0, 1);
 
-    m = 22.0 + (double)(random() % 21);
+    m = MINE_DAMAGE();
     if (mcp->m_flags & M_SWEEP)
        m /= 2.0;