]> granicus.if.org Git - nethack/commitdiff
polearms and infravision
authorcohrs <cohrs>
Sun, 11 May 2003 05:08:58 +0000 (05:08 +0000)
committercohrs <cohrs>
Sun, 11 May 2003 05:08:58 +0000 (05:08 +0000)
Allow hero to apply a polearm against a monster seen only by infravision.
Reported to the mailing list.

doc/fixes34.2
src/apply.c

index f0792286b032ce3f003749cdf5af5cc29ed26a34..b64a11192dc46fc13557c0f50f5c1fe298ee792f 100644 (file)
@@ -58,6 +58,7 @@ attaching long named candle to long named candelabrum caused buffer overflow
 when polymorhed, only hand/weapon attack on disenchanter should result in
        damage to weapon, gloves, etc.
 killer should say "the" when choking on unique monster's corpse
+allow applying polearm on monster you can see via infravision
 
 
 Platform- and/or Interface-Specific Fixes
index dd3de53ec8355f63d354fd5bd52cace33588ac3a..6a7c4f3ff4b00a67854456cbd7984fc1d4c05908 100644 (file)
@@ -2362,7 +2362,9 @@ use_pole (obj)
        } else if (distu(cc.x, cc.y) < min_range) {
            pline("Too close!");
            return (res);
-       } else if (!cansee(cc.x, cc.y)) {
+       } else if (!cansee(cc.x, cc.y) &&
+                  ((mtmp = m_at(cc.x, cc.y)) == (struct monst *)0 ||
+                   !canseemon(mtmp))) {
            You(cant_see_spot);
            return (res);
        }