use get_adjacent_loc() rather than getdir() directly for some things where
you want to ensure valid adjacent coordinates are returned
minor experience calculation tweaks
+level telporting out of the dungeon while carrying unpaid shop goods would
+ trigger "not on any bill" warnings during final inventory disclosure
Platform- and/or Interface-Specific Fixes
E void FDECL(hot_pursuit, (struct monst *));
E void FDECL(make_angry_shk, (struct monst *,XCHAR_P,XCHAR_P));
E int NDECL(dopay);
-E boolean FDECL(paybill, (BOOLEAN_P));
+E boolean FDECL(paybill, (int));
E void NDECL(finish_paybill);
E struct obj *FDECL(find_oid, (unsigned));
E long FDECL(contained_cost, (struct obj *,struct monst *,long,BOOLEAN_P, BOOLEAN_P));
-/* SCCS Id: @(#)end.c 3.4 2002/10/04 */
+/* SCCS Id: @(#)end.c 3.4 2002/11/20 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
if (how != PANICKED) {
/* these affect score and/or bones, but avoid them during panic */
- taken = paybill(how != QUIT);
+ taken = paybill((how == ESCAPED) ? -1 : (how != QUIT));
paygd();
clearpriests();
} else taken = FALSE; /* lint; assert( !bones_ok ); */
-/* SCCS Id: @(#)shk.c 3.4 2002/09/28 */
+/* SCCS Id: @(#)shk.c 3.4 2002/11/20 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
STATIC_DCL void FDECL(shk_names_obj,
(struct monst *,struct obj *,const char *,long,const char *));
STATIC_DCL struct obj *FDECL(bp_to_obj, (struct bill_x *));
-STATIC_DCL boolean FDECL(inherits, (struct monst *, int, BOOLEAN_P));
+STATIC_DCL boolean FDECL(inherits, (struct monst *,int,int));
STATIC_DCL void FDECL(set_repo_loc, (struct eshk *));
STATIC_DCL boolean NDECL(angry_shk_exists);
STATIC_DCL void FDECL(rile_shk, (struct monst *));
register boolean taken = FALSE;
register int numsk = 0;
+ /* if we escaped from the dungeon, shopkeepers can't reach us */
+ if (croaked < 0) return FALSE;
+
/* this is where inventory will end up if any shk takes it */
repo_location.x = repo_location.y = 0;
inherits(shkp, numsk, croaked)
struct monst *shkp;
int numsk;
-boolean croaked;
+int croaked;
{
long loss = 0L;
#ifdef GOLDOBJ
-/* SCCS Id: @(#)teleport.c 3.4 2002/05/31 */
+/* SCCS Id: @(#)teleport.c 3.4 2002/11/20 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
killer = 0; /* still alive, so far... */
if (newlev < 0) {
+ if (*u.ushops0) {
+ /* take unpaid inventory items off of shop bills */
+ in_mklev = TRUE; /* suppress map update */
+ u_left_shop(u.ushops0, TRUE);
+ /* you're now effectively out of the shop */
+ *u.ushops0 = *u.ushops = '\0';
+ in_mklev = FALSE;
+ }
if (newlev <= -10) {
You("arrive in heaven.");
verbalize("Thou art early, but we'll admit thee.");
pline("Unfortunately, you don't know how to fly.");
You("plummet a few thousand feet to your death.");
Sprintf(buf,
- "teleported out of the dungeon and fell to %s death",
- uhis());
+ "teleported out of the dungeon and fell to %s death",
+ uhis());
killer = buf;
killer_format = NO_KILLER_PREFIX;
}