From 669c48dd0405523b374fe6f1b4323cfed2c76394 Mon Sep 17 00:00:00 2001 From: cohrs Date: Sun, 11 May 2003 05:08:58 +0000 Subject: [PATCH] polearms and infravision Allow hero to apply a polearm against a monster seen only by infravision. Reported to the mailing list. --- doc/fixes34.2 | 1 + src/apply.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/fixes34.2 b/doc/fixes34.2 index f0792286b..b64a11192 100644 --- a/doc/fixes34.2 +++ b/doc/fixes34.2 @@ -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 diff --git a/src/apply.c b/src/apply.c index dd3de53ec..6a7c4f3ff 100644 --- a/src/apply.c +++ b/src/apply.c @@ -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); } -- 2.40.0