From cb1eadd6b7bbc384c86b8540c5a0e6225273b4fc Mon Sep 17 00:00:00 2001 From: Alex Smith Date: Sat, 9 Dec 2023 02:03:31 +0000 Subject: [PATCH] Don't pay the shopkeeper when displacing a pet in a shop The recent commit to interpret walking into a shopkeeper as a "pay" command was triggering in too many circumstances. Check to ensure that the monster that we're walking into is a known shopkeeper before activating the special case. --- src/uhitm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/uhitm.c b/src/uhitm.c index 85ba4ad13..acda2b151 100644 --- a/src/uhitm.c +++ b/src/uhitm.c @@ -479,7 +479,8 @@ do_attack(struct monst *mtmp) char buf[BUFSZ]; if (!gc.context.travel && !gc.context.run) - return ECMD_TIME | dopay(); + if (canspotmon(mtmp) && mtmp->isshk) + return ECMD_TIME | dopay(); if (mtmp->mtame) /* see 'additional considerations' above */ monflee(mtmp, rnd(6), FALSE, FALSE);