From 4f77e8b15662e262bfc71bbde9eca386225a914d Mon Sep 17 00:00:00 2001 From: "nethack.rankin" Date: Sun, 28 Jan 2007 02:20:40 +0000 Subject: [PATCH] monster ranged attacks (trunk only) A fairly recent change had a mistake in it which allowed monsters to throw, shoot, and zap through walls and closed doors if there was at least one unobstructed spot between the attacker and the wall or door. --- src/mthrowu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mthrowu.c b/src/mthrowu.c index f258c9981..05babac91 100644 --- a/src/mthrowu.c +++ b/src/mthrowu.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)mthrowu.c 3.5 2006/12/14 */ +/* SCCS Id: @(#)mthrowu.c 3.5 2007/01/27 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -736,7 +736,7 @@ int boulderhandling; /* 0=block, 1=ignore, 2=conditionally block */ if (IS_ROCK(levl[bx][by].typ) || closed_door(bx, by)) return FALSE; if (sobj_at(BOULDER, bx, by)) ++boulderspots; - } while (bx != ax && by != ay); + } while (bx != ax || by != ay); /* reached target position without encountering obstacle */ if (boulderhandling == 1 || rn2(2 + boulderspots) < 2) return TRUE; }