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.
This commit is contained in:
cohrs
2002-11-15 07:32:52 +00:00
parent d2476b5151
commit eb906b1b8f
3 changed files with 4 additions and 2 deletions

View File

@@ -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);
}

View File

@@ -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");