fix #H8534 - thrown pick-axe vs "scum!"

[I accidentally left this out of the earlier patch.]

Change in meaning of mnearto()'s return value wasn't progagated to
shkcatch(). Make it an int instead of boolean so that it can
communicate both 'moved successfully' and 'moved but had to move
another monster out of the way to do so'.
This commit is contained in:
PatR
2019-04-12 01:33:42 -07:00
parent 86e5022293
commit fa98c6fb72

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 shk.c $NHDT-Date: 1551738135 2019/03/04 22:22:15 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.157 $ */
/* NetHack 3.6 shk.c $NHDT-Date: 1555058014 2019/04/12 08:33:34 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.158 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2012. */
/* NetHack may be freely redistributed. See license for details. */
@@ -3397,7 +3397,7 @@ register xchar x, y;
&& dist2(shkp->mx, shkp->my, x, y) < 3
/* if it is the shk's pos, you hit and anger him */
&& (shkp->mx != x || shkp->my != y)) {
if (mnearto(shkp, x, y, TRUE) && !Deaf && !muteshk(shkp))
if (mnearto(shkp, x, y, TRUE) == 2 && !Deaf && !muteshk(shkp))
verbalize("Out of my way, scum!");
if (cansee(x, y)) {
pline("%s nimbly%s catches %s.", Shknam(shkp),