espy the garish apparel of the approaching tourist or the countenance of a
disfavored patron. They favor the gentle of manner and the fair of face.
The boor may expect unprofitable transactions.
------ SINKS
+-----
The cliche of the kitchen sink swallowing any unfortunate rings that contact
its pernicious surface reflecteth greater truth than many homilies, yet
even so, few have developed the skill to identify enchanted rings by the
/* display features */
#define LOADSYMSETS /* loadable symbol sets; only default symbols w/o this */
/* dungeon features */
-#define SINKS /* Kitchen sinks - Janet Walz */
/* dungeon levels */
#define WALLIFIED_MAZE /* Fancy mazes - Jean-Christophe Collet */
#define REINCARNATION /* Special Rogue-like levels */
E void FDECL(dryup, (XCHAR_P,XCHAR_P, BOOLEAN_P));
E void NDECL(drinkfountain);
E void FDECL(dipfountain, (struct obj *));
-#ifdef SINKS
E void FDECL(breaksink, (int,int));
E void NDECL(drinksink);
-#endif
/* ### hack.c ### */
if (level.flags.nfountains) Sprintf(eos(dsc), " %c:%d",
defsyms[S_fountain].sym,
(int)level.flags.nfountains);
-#ifdef SINKS
if (level.flags.nsinks) Sprintf(eos(dsc), " %c:%d",
defsyms[S_sink].sym,
(int)level.flags.nsinks);
-#endif
if (level.flags.has_vault) Strcat(dsc, " vault");
if (level.flags.has_shop) Strcat(dsc, " shop");
if (level.flags.has_temple) Strcat(dsc, " temple");
SET_FOUNTAIN_WARNED(x,y); /* force dryup */
dryup(x, y, madeby_u);
return;
-#ifdef SINKS
} else if (IS_SINK(lev->typ)) {
breaksink(x, y);
return;
-#endif
} else if (lev->typ == DRAWBRIDGE_DOWN ||
(is_drawbridge_wall(x, y) >= 0)) {
int bx = x, by = y;
} else if (is_pool(cc->x,cc->y)) {
} else if (IS_GRAVE(ltyp)) {
#endif
-#ifdef SINKS
} else if (IS_SINK(ltyp)) {
Strcpy(msg, "A tangled mass of plumbing remains below the sink.");
return FALSE;
-#endif
} else if ((cc->x == xupladder && cc->y == yupladder) || /* "ladder up" */
(cc->x == xdnladder && cc->y == ydnladder)) { /* "ladder down" */
Strcpy(msg, "The ladder is unaffected.");
#include "hack.h"
#include "lev.h"
-#ifdef SINKS
STATIC_DCL void FDECL(trycall, (struct obj *));
STATIC_DCL void FDECL(dosinkring, (struct obj *));
-#endif /* SINKS */
STATIC_PTR int FDECL(drop, (struct obj *));
STATIC_PTR int NDECL(wipeoff);
}
}
-#ifdef SINKS
STATIC_OVL
void
trycall(obj)
} else
useup(obj);
}
-#endif
/* some common tests when trying to drop or throw items */
boolean
mbodypart(u.ustuck, STOMACH));
}
} else {
-#ifdef SINKS
if((obj->oclass == RING_CLASS || obj->otyp == MEAT_RING) &&
IS_SINK(levl[u.ux][u.uy].typ)) {
dosinkring(obj);
return(1);
}
-#endif
if (!can_reach_floor(TRUE)) {
/* we might be levitating due to #invoke Heart of Ahriman;
if so, levitation would end during call to freeinv()
{PM_HOUSECAT, 0, PM_DOG, M_AP_MONSTER},
{PM_LARGE_CAT, 0, PM_LARGE_DOG, M_AP_MONSTER},
{PM_HOUSECAT, 0, PM_GIANT_RAT, M_AP_MONSTER},
-#ifdef SINKS
{0, S_DOG, SINK, M_AP_FURNITURE}, /* sorry, no fire hydrants in NetHack */
-#endif
{0, 0, TRIPE_RATION, M_AP_OBJECT}, /* leave this at end */
};
else if (IS_THRONE(maploc->typ)) what = "a throne";
else if (IS_FOUNTAIN(maploc->typ)) what = "a fountain";
else if (IS_GRAVE(maploc->typ)) what = "a headstone";
-#ifdef SINKS
else if (IS_SINK(maploc->typ)) what = "a sink";
-#endif
else if (IS_ALTAR(maploc->typ)) what = "an altar";
else if (IS_DRAWBRIDGE(maploc->typ)) what = "a drawbridge";
else if (maploc->typ == STAIRS) what = "the stairs";
}
goto ouch;
}
-#ifdef SINKS
if(IS_SINK(maploc->typ)) {
int gend = poly_gender();
short washerndx = (gend == 1 || (gend == 2 && rn2(2))) ?
}
goto ouch;
}
-#endif
if (maploc->typ == STAIRS || maploc->typ == LADDER ||
IS_STWALL(maploc->typ)) {
if(!IS_STWALL(maploc->typ) && maploc->ladder == LA_DOWN)
{'_', "altar", C(CLR_GRAY)}, /* altar */
{'|', "grave", C(CLR_GRAY)}, /* grave */
{'\\', "opulent throne",C(HI_GOLD)}, /* throne */
-#ifdef SINKS
{'#', "sink", C(CLR_GRAY)}, /* sink */
-#else
- {'#', "", C(CLR_GRAY)}, /* sink */
-#endif
/*30*/ {'{', "fountain", C(CLR_BLUE)}, /* fountain */
{'}', "water", C(CLR_BLUE)}, /* pool */
{'.', "ice", C(CLR_CYAN)}, /* ice */
dryup(u.ux, u.uy, TRUE);
}
-#ifdef SINKS
void
breaksink(x,y)
int x, y;
rn2(3) ? (rn2(2) ? "cold" : "warm") : "hot");
}
}
-#endif /* SINKS */
/*fountain.c*/
STATIC_DCL void NDECL(maybe_wail);
STATIC_DCL int NDECL(moverock);
STATIC_DCL int FDECL(still_chewing,(XCHAR_P,XCHAR_P));
-#ifdef SINKS
STATIC_DCL void NDECL(dosinkfall);
-#endif
STATIC_DCL boolean FDECL(findtravelpath, (BOOLEAN_P));
STATIC_DCL boolean FDECL(trapmove, (int,int,struct trap *));
STATIC_DCL void NDECL(switch_terrain);
newsym(ox, oy);
}
-#ifdef SINKS
static NEARDATA const char fell_on_sink[] = "fell onto a sink";
STATIC_OVL void
through float_down(), but make sure BFlying is up to date */
float_vs_flight();
}
-#endif
boolean
may_dig(x,y)
if (pooleffects(TRUE)) goto spotdone;
check_special_room(FALSE);
-#ifdef SINKS
if(IS_SINK(levl[u.ux][u.uy].typ) && Levitation)
dosinkfall();
-#endif
if (!in_steed_dismounting) { /* if dismounting, we'll check again later */
boolean pit;
cmap = S_ice; /* "ice" */
else if (is_pool(x,y))
dfeature = "pool of water";
-#ifdef SINKS
else if (IS_SINK(ltyp))
cmap = S_sink; /* "sink" */
-#endif
else if (IS_ALTAR(ltyp)) {
Sprintf(altbuf, "%saltar to %s (%s)",
((lev->altarmask & AM_SHRINE) &&
STATIC_DCL void FDECL(mkfount,(int,struct mkroom *));
-#ifdef SINKS
STATIC_DCL void FDECL(mksink,(struct mkroom *));
-#endif
STATIC_DCL void FDECL(mkaltar,(struct mkroom *));
STATIC_DCL void FDECL(mkgrave,(struct mkroom *));
STATIC_DCL void NDECL(makevtele);
if(Is_rogue_level(&u.uz)) goto skip_nonrogue;
#endif
if(!rn2(10)) mkfount(0,croom);
-#ifdef SINKS
if(!rn2(60)) mksink(croom);
-#endif
if(!rn2(60)) mkaltar(croom);
x = 80 - (depth(&u.uz) * 2);
if (x < 2) x = 2;
level.flags.nfountains++;
}
-#ifdef SINKS
STATIC_OVL void
mksink(croom)
register struct mkroom *croom;
level.flags.nsinks++;
}
-#endif /* SINKS */
-
STATIC_OVL void
mkaltar(croom)
/* missile might hit iron bars */
|| (levl[bhitpos.x+dx][bhitpos.y+dy].typ == IRONBARS &&
hits_bars(&singleobj, bhitpos.x, bhitpos.y, !rn2(5), 0))
-#ifdef SINKS
/* Thrown objects "sink" */
- || IS_SINK(levl[bhitpos.x][bhitpos.y].typ)
-#endif
- ) {
+ || IS_SINK(levl[bhitpos.x][bhitpos.y].typ)) {
if (singleobj) /* hits_bars might have destroyed it */
(void) drop_throw(singleobj, 0, bhitpos.x, bhitpos.y);
break;
if (cansee(x,y))
pline_The("fountain falls into a chasm.");
goto do_pit;
-#ifdef SINKS
case SINK :
if (cansee(x,y))
pline_The("kitchen sink falls into a chasm.");
goto do_pit;
-#endif
case ALTAR :
if (Is_astralevel(&u.uz) || Is_sanctum(&u.uz)) break;
newsym(x, y);
return(&zeroobj);
}
-# ifdef SINKS
if (!BSTRCMPI(bp, p-4, "sink")) {
lev->typ = SINK;
level.flags.nsinks++;
newsym(x, y);
return &zeroobj;
}
-# endif
/* ("water" matches "potion of water" rather than terrain) */
if (!BSTRCMPI(bp, p-4, "pool") || !BSTRCMPI(bp, p-4, "moat")) {
lev->typ = !BSTRCMPI(bp, p-4, "pool") ? POOL : MOAT;
return 1;
}
}
-#ifdef SINKS
/* Or a kitchen sink? */
if (IS_SINK(levl[u.ux][u.uy].typ) &&
/* not as low as floor level but similar restrictions apply */
return 1;
}
}
-#endif
/* Or are you surrounded by water? */
if (Underwater && !u.uswallow) {
(void) rust_dmg(uarm, "armor", 1, TRUE, &youmonst);
if (!rn2(10) && uarmf && uarmf->otyp != WATER_WALKING_BOOTS)
(void) rust_dmg(uarm, "armor", 1, TRUE, &youmonst);
-#ifdef SINKS
} else if(IS_SINK(typ)) {
You(sit_message, defsyms[S_sink].explanation);
Your("%s gets wet.", humanoid(youmonst.data) ? "rump" : "underside");
-#endif
} else if(IS_ALTAR(typ)) {
You(sit_message, defsyms[S_altar].explanation);
altar_wrath(u.ux, u.uy);
};
You_hear1(fountain_msg[rn2(3)+hallu]);
}
-#ifdef SINK
if (level.flags.nsinks && !rn2(300)) {
static const char * const sink_msg[3] = {
"a slow drip.",
};
You_hear1(sink_msg[rn2(2)+hallu]);
}
-#endif
if (level.flags.has_court && !rn2(200)) {
static const char * const throne_msg[4] = {
"the tones of courtly conversation.",
(is_pool(bhitpos.x, bhitpos.y) ||
is_lava(bhitpos.x, bhitpos.y)))
break;
-#ifdef SINKS
if(IS_SINK(typ) && weapon != FLASHED_LIGHT)
break; /* physical objects fall onto sink */
-#endif
}
/* limit range of ball so hero won't make an invalid move */
if (weapon == THROWN_WEAPON && range > 0 &&
}
tmp_at(bhitpos.x, bhitpos.y);
delay_output();
-#ifdef SINKS
if(IS_SINK(levl[bhitpos.x][bhitpos.y].typ))
break; /* boomerang falls on sink */
-#endif
/* ct==0, initial position, we want next delta to be same;
ct==5, opposite position, repeat delta undoes first one */
if (ct % 5 != 0) i += (counterclockwise ? -1 : 1);
case '{' : return(FOUNTAIN);
case '\\' : return(THRONE);
case 'K' :
-#ifdef SINKS
return(SINK);
-#else
- yywarning("Sinks are not allowed in this version! Ignoring...");
- return(ROOM);
-#endif
case '}' : return(MOAT);
case 'P' : return(POOL);
case 'L' : return(LAVAPOOL);
/* levels and/or topology (0..4) */
#ifdef REINCARNATION
| (1L << 1)
-#endif
-#ifdef SINKS
- | (1L << 2)
#endif
/* monsters (5..9) */
#ifdef MAIL
#ifdef SHELL
"shell command",
#endif
-#ifdef SINKS
- "sinks",
-#endif
#ifdef SUSPEND
"suspend command",
#endif
if (*line == '#') return TRUE; /* ignore comment lines */
if (sscanf(line, "----- %s", tag) == 1) {
skip = FALSE;
-#ifndef SINKS
- if (!strcmp(tag, "SINKS")) skip = TRUE;
-#endif
} else if (skip && !strncmp(line, "-----", 5))
skip = FALSE;
return skip;
-/* NetHack 3.5 tilemap.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
+/* NetHack 3.5 tilemap.c $NHDT-Date: 1425082379 2015/02/28 00:12:59 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.12 $ */
/* NetHack 3.5 tilemap.c $Date: 2009/05/06 10:59:02 $ $Revision: 1.7 $ */
/* SCCS Id: @(#)tilemap.c 3.5 2000/06/04 */
/* NetHack may be freely redistributed. See license for details. */
tilenum = 0; /* set-relative number */
for (i = 0; i < (MAXPCHARS - MAXEXPCHARS); i++) {
if (set == OTH_GLYPH && tilenum == entry) {
- if (*defsyms[i].explanation)
+ if (*defsyms[i].explanation) {
return defsyms[i].explanation;
- else {
- /* if SINKS are turned off, this
- * string won't be there (and can't be there
- * to prevent symbol-identification and
- * special-level mimic appearances from
- * thinking the items exist)
- */
- switch (i) {
- case S_sink:
- Sprintf(buf, "sink");
- break;
- default:
- Sprintf(buf, "cmap %d", tilenum);
- break;
- }
+ } else {
+ Sprintf(buf, "cmap %d", tilenum);
return buf;
}
}