From eb906b1b8f5dcdcbfe0c1c518f572695be953f55 Mon Sep 17 00:00:00 2001 From: cohrs Date: Fri, 15 Nov 2002 07:32:52 +0000 Subject: [PATCH] shopkeeper falling thru a hole left unpaid objects unpaid Reported to the list. Player breaks a wand of digging causing the shopkeeper to fall. This didn't clear unpaid items. For now, this can only occur due to player action, so added a call to make_angry_shk to handle this situation. --- doc/fixes34.1 | 1 + src/dig.c | 1 + src/shk.c | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/fixes34.1 b/doc/fixes34.1 index 1574b4a27..52da83b55 100644 --- a/doc/fixes34.1 +++ b/doc/fixes34.1 @@ -305,6 +305,7 @@ all objects carried by a monster who's hit by a polymorph zap are protected from that zap, not just worn armor which falls off due to shape change sparkle option for display effects was ignored on explosions level teleport while on a sleeping steed caused panic and possible crash +breaking wand of digging causing a shopkeeper to fall left unpaid items unpaid Platform- and/or Interface-Specific Fixes diff --git a/src/dig.c b/src/dig.c index 6f92a7181..90dab741e 100644 --- a/src/dig.c +++ b/src/dig.c @@ -632,6 +632,7 @@ int ttyp; } else { get_level(&tolevel, depth(&u.uz) + 1); } + if (mtmp->isshk) make_angry_shk(mtmp, 0, 0); migrate_to_level(mtmp, ledger_no(&tolevel), MIGR_RANDOM, (coord *)0); } diff --git a/src/shk.c b/src/shk.c index a99408a39..7974e75ed 100644 --- a/src/shk.c +++ b/src/shk.c @@ -1000,7 +1000,7 @@ register struct monst *shkp; ESHK(shkp)->following = 1; } -/* used when the shkp is teleported out of his shop, +/* used when the shkp is teleported or falls (ox == 0) out of his shop, * or when the player is not on a costly_spot and he * damages something inside the shop. these conditions * must be checked by the calling function. @@ -1027,7 +1027,7 @@ register xchar ox,oy; which makes this message look pretty silly, so temporarily restore her original location during the call to Monnam. */ sx = shkp->mx, sy = shkp->my; - if (cansee(ox, oy) && !cansee(sx, sy)) + if (isok(ox, oy) && cansee(ox, oy) && !cansee(sx, sy)) shkp->mx = ox, shkp->my = oy; pline("%s %s!", Monnam(shkp), !ANGRY(shkp) ? "gets angry" : "is furious");