E char *FDECL(rndmonnam, (char *));
E const char *FDECL(hcolor, (const char *));
E const char *NDECL(rndcolor);
+E const char *FDECL(hliquid, (const char *));
E const char *NDECL(roguename);
E struct obj *FDECL(realloc_obj,
(struct obj *, int, genericptr_t, int, const char *));
deltrap(t_at(u.ux, u.uy));
break;
case TT_LAVA:
- You("pull yourself above the lava!");
+ You("pull yourself above the %s!", hliquid("lava"));
u.utrap = 0;
return 1;
case TT_BURIEDBALL:
deltrap(t_at(u.ux, u.uy));
break;
case TT_LAVA:
- pline(pullmsg, "lava");
+ pline(pullmsg, hliquid("lava"));
break;
case TT_BEARTRAP: {
register long side = rn2(3) ? LEFT_SIDE : RIGHT_SIDE;
E_phrase(etmp, "drink"), lava ? "lava" : "moat");
else
pline("%s into the %s.", E_phrase(etmp, "fall"),
- lava ? "lava" : "moat");
+ lava ? hliquid("lava") : "moat");
}
killer.format = NO_KILLER_PREFIX;
Strcpy(killer.name, "fell from a drawbridge");
if (lev1->typ == DRAWBRIDGE_UP) {
if (cansee(x2, y2))
pline_The("portcullis of the drawbridge falls into the %s!",
- lava ? "lava" : "moat");
+ lava ? hliquid("lava") : "moat");
else if (!Deaf)
You_hear("a loud *SPLASH*!");
} else {
if (cansee(x, y))
pline_The("drawbridge collapses into the %s!",
- lava ? "lava" : "moat");
+ lava ? hliquid("lava") : "moat");
else if (!Deaf)
You_hear("a loud *SPLASH*!");
}
return FALSE;
} else if (Is_waterlevel(&u.uz)) {
if (verbose)
- pline_The("water splashes and subsides.");
+ pline_The("%s splashes and subsides.", hliquid("water"));
return FALSE;
} else if ((IS_ROCK(levl[x][y].typ) && levl[x][y].typ != SDOOR
&& (levl[x][y].wall_info & W_NONDIGGABLE) != 0)
unearth_objs(x, y);
if (fillmsg)
- pline(fillmsg, typ == LAVAPOOL ? "lava" : "water");
+ pline(fillmsg, hliquid(typ == LAVAPOOL ? "lava" : "water"));
if (u_spot && !(Levitation || Flying)) {
if (typ == LAVAPOOL)
(void) lava_effects();
} else if (is_pool_or_lava(dig_x, dig_y)) {
pline_The("%s sloshes furiously for a moment, then subsides.",
- is_lava(dig_x, dig_y) ? "lava" : "water");
+ hliquid(is_lava(dig_x, dig_y) ? "lava" : "water"));
wake_nearby(); /* splashing */
} else if (lev->typ == DRAWBRIDGE_DOWN
You("find yourself on dry land again!");
} else if (lava && distu(rx, ry) <= 2) {
int dmg;
- You("are hit by molten lava%c", Fire_resistance ? '.' : '!');
+ You("are hit by molten %s%c",
+ hliquid("lava"), Fire_resistance ? '.' : '!');
burn_away_slime();
dmg = d((Fire_resistance ? 1 : 3), 6);
losehp(Maybe_Half_Phys(dmg), /* lava damage */
You_hear("loud noises coming from the drain.");
break;
case RIN_SUSTAIN_ABILITY: /* KMH */
- pline_The("water flow seems fixed.");
+ pline_The("%s flow seems fixed.", hliquid("water"));
break;
case RIN_GAIN_STRENGTH:
- pline_The("water flow seems %ser now.",
+ pline_The("%s flow seems %ser now.",
+ hliquid("water"),
(obj->spe < 0) ? "weak" : "strong");
break;
case RIN_GAIN_CONSTITUTION:
- pline_The("water flow seems %ser now.",
+ pline_The("%s flow seems %ser now.",
+ hliquid("water"),
(obj->spe < 0) ? "less" : "great");
break;
case RIN_INCREASE_ACCURACY: /* KMH */
- pline_The("water flow %s the drain.",
+ pline_The("%s flow %s the drain.",
+ hliquid("water"),
(obj->spe < 0) ? "misses" : "hits");
break;
case RIN_INCREASE_DAMAGE:
pline_The("sink seems to blend into the floor for a moment.");
break;
case RIN_FIRE_RESISTANCE:
- pline_The("hot water faucet flashes brightly for a moment.");
+ pline_The("hot %s faucet flashes brightly for a moment.",
+ hliquid("water"));
break;
case RIN_COLD_RESISTANCE:
- pline_The("cold water faucet flashes brightly for a moment.");
+ pline_The("cold %s faucet flashes brightly for a moment.",
+ hliquid("water"));
break;
case RIN_PROTECTION_FROM_SHAPE_CHAN:
pline_The("sink looks nothing like a fountain.");
: c_obj_colors[k];
}
+static NEARDATA const char *const hliquids[] = {
+ "yoghurt", "oobleck", "clotted blood", "diluted water", "purified water",
+ "instant coffee", "tea", "herbal infusion", "liquid rainbow",
+ "creamy foam", "mulled wine", "bouillon", "nectar", "grog", "flubber",
+ "ketchup", "slow light", "oil", "vinaigrette", "liquid crystal", "honey",
+ "caramel sauce", "ink", "aqueous humour", "milk substitute", "fruit juice",
+ "glowing lava",
+};
+
+const char *
+hliquid(liquidpref)
+const char *liquidpref;
+{
+ return (Hallucination || !liquidpref) ? hliquids[rn2(SIZE(hliquids))]
+ : liquidpref;
+}
+
/* Aliases for road-runner nemesis
*/
static const char *const coynames[] = {
setworn((struct obj *) 0, W_AMUL);
if (!breathless(youmonst.data) && !amphibious(youmonst.data)
&& !Swimming) {
- You("suddenly inhale an unhealthy amount of water!");
+ You("suddenly inhale an unhealthy amount of %s!",
+ hliquid("water"));
(void) drown();
}
return;
}
if (is_pool(x, y) ^ !!u.uinwater) {
/* objects normally can't be removed from water by kicking */
- You("splash some water around.");
+ You("splash some %s around.", hliquid("water"));
return 1;
}
u.utraptype == TT_WEB
? "web"
: u.utraptype == TT_LAVA
- ? "lava"
+ ? hliquid("lava")
: u.utraptype == TT_INFLOOR
? surface(u.ux, u.uy)
: u.utraptype == TT_BURIEDBALL ? "buried ball"
else if (IS_AIR(lev->typ) && Is_airlevel(&u.uz))
return "air";
else if (is_pool(x, y))
- return (Underwater && !Is_waterlevel(&u.uz)) ? "bottom" : "water";
+ return (Underwater && !Is_waterlevel(&u.uz))
+ ? "bottom" : hliquid("water");
else if (is_ice(x, y))
return "ice";
else if (is_lava(x, y))
- return "lava";
+ return hliquid("lava");
else if (lev->typ == DRAWBRIDGE_DOWN)
return "bridge";
else if (IS_ALTAR(levl[x][y].typ))
{
register struct monst *mtmp;
- pline("This water gives you bad breath!");
+ pline("This %s gives you bad breath!",
+ hliquid("water"));
for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
if (DEADMONSTER(mtmp))
continue;
dogushforth(TRUE);
break;
default:
- pline("This tepid water is tasteless.");
+ pline("This tepid %s is tasteless.",
+ hliquid("water"));
break;
}
}
&& !exist_artifact(LONG_SWORD, artiname(ART_EXCALIBUR))) {
if (u.ualign.type != A_LAWFUL) {
/* Ha! Trying to cheat her. */
- pline(
- "A freezing mist rises from the water and envelopes the sword.");
+ pline("A freezing mist rises from the %s and envelopes the sword.",
+ hliquid("water"));
pline_The("fountain disappears!");
curse(obj);
if (obj->spe > -6 && !rn2(3))
case 20: /* Uncurse the item */
if (obj->cursed) {
if (!Blind)
- pline_The("water glows for a moment.");
+ pline_The("%s glows for a moment.", hliquid("water"));
uncurse(obj);
} else {
pline("A feeling of loss comes over you.");
+ 1) * 2) + 5),
u.ux, u.uy);
if (!Blind)
- pline("Far below you, you see coins glistening in the water.");
+ pline("Far below you, you see coins glistening in the %s.",
+ hliquid("water"));
exercise(A_WIS, TRUE);
newsym(u.ux, u.uy);
break;
}
switch (rn2(20)) {
case 0:
- You("take a sip of very cold water.");
+ You("take a sip of very cold %s.", hliquid("water"));
break;
case 1:
- You("take a sip of very warm water.");
+ You("take a sip of very warm %s.", hliquid("water"));
break;
case 2:
- You("take a sip of scalding hot water.");
+ You("take a sip of scalding hot %s.", hliquid("water"));
if (Fire_resistance)
pline("It seems quite tasty.");
else
exercise(A_WIS, TRUE);
newsym(u.ux, u.uy);
} else
- pline("Some dirty water backs up in the drain.");
+ pline("Some dirty %s backs up in the drain.", hliquid("water"));
break;
case 6:
breaksink(u.ux, u.uy);
break;
case 7:
- pline_The("water moves as though of its own will!");
+ pline_The("%s moves as though of its own will!", hliquid("water"));
if ((mvitals[PM_WATER_ELEMENTAL].mvflags & G_GONE)
|| !makemon(&mons[PM_WATER_ELEMENTAL], u.ux, u.uy, NO_MM_FLAGS))
pline("But it quiets down.");
break;
case 8:
- pline("Yuk, this water tastes awful.");
+ pline("Yuk, this %s tastes awful.", hliquid("water"));
more_experienced(1, 0);
newexplevel();
break;
vomit();
break;
case 10:
- pline("This water contains toxic wastes!");
+ pline("This %s contains toxic wastes!", hliquid("water"));
if (!Unchanging) {
You("undergo a freakish metamorphosis!");
polyself(0);
break;
}
default:
- You("take a sip of %s water.",
- rn2(3) ? (rn2(2) ? "cold" : "warm") : "hot");
+ You("take a sip of %s %s.",
+ rn2(3) ? (rn2(2) ? "cold" : "warm") : "hot",
+ hliquid("water"));
}
}
if ((u.utrap & 0xff) == 0) {
u.utrap = 0;
if (u.usteed)
- You("lead %s to the edge of the lava.", steedname);
+ You("lead %s to the edge of the %s.", steedname,
+ hliquid("lava"));
else
- You("pull yourself to the edge of the lava.");
+ You("pull yourself to the edge of the %s.",
+ hliquid("lava"));
}
}
u.umoved = TRUE;
if (Is_waterlevel(&u.uz))
You("pop into an air bubble.");
else if (is_lava(u.ux, u.uy))
- You("leave the water..."); /* oops! */
+ You("leave the %s...", hliquid("water")); /* oops! */
else
You("are on solid %s again.",
is_ice(u.ux, u.uy) ? "ice" : "land");
} else if (Is_waterlevel(&u.uz)) {
still_inwater = TRUE;
} else if (Levitation) {
- You("pop out of the water like a cork!");
+ You("pop out of the %s like a cork!", hliquid("water"));
} else if (Flying) {
- You("fly out of the water.");
+ You("fly out of the %s.", hliquid("water"));
} else if (Wwalking) {
You("slowly rise above the surface.");
} else {
if (is_pool(u.ux, u.uy)) {
if (Wwalking || is_floater(youmonst.data) || is_clinger(youmonst.data)
|| (Flying && !Breathless)) {
- You("cannot dive into the water to pick things up.");
+ You("cannot dive into the %s to pick things up.",
+ hliquid("water"));
return 0;
} else if (!Underwater) {
You_cant("even see the bottom, let alone pick up %s.", something);
else if (IS_GRAVE(lev->typ))
You("don't need a gravestone. Yet.");
else if (IS_FOUNTAIN(lev->typ))
- You("could drink the water...");
+ You("could drink the %s...", hliquid("water"));
else if (IS_DOOR(lev->typ) && (lev->doormask & D_ISOPEN))
pline("It won't come off the hinges.");
else
pline("Doing that would probably melt %s.", yname(pick));
return PICKLOCK_LEARNED_SOMETHING;
} else if (is_pool(u.ux, u.uy) && !Underwater) {
- pline_The("water has no lock.");
+ pline_The("%s has no lock.", hliquid("water"));
return PICKLOCK_LEARNED_SOMETHING;
}
}
if (resists_acid(mdef)) {
if (vis)
- pline("%s is covered in acid, but it seems harmless.",
+ pline("%s is covered in %s, but it seems harmless.",
+ hliquid("acid"),
Monnam(mdef));
tmp = 0;
} else if (vis) {
- pline("%s is covered in acid!", Monnam(mdef));
+ pline("%s is covered in %s!", hliquid("acid"), Monnam(mdef));
pline("It burns %s!", mon_nam(mdef));
}
if (!rn2(30))
if (mhit && !rn2(2)) {
Strcpy(buf, Monnam(magr));
if (canseemon(magr))
- pline("%s is splashed by %s acid!", buf,
+ pline("%s is splashed by %s %s!", buf,
+ hliquid("acid"),
s_suffix(mon_nam(mdef)));
if (resists_acid(magr)) {
if (canseemon(magr))
hitmsg(mtmp, mattk);
if (!mtmp->mcan && !rn2(3))
if (Acid_resistance) {
- pline("You're covered in acid, but it seems harmless.");
+ pline("You're covered in %s, but it seems harmless.",
+ hliquid("acid"));
dmg = 0;
} else {
- pline("You're covered in acid! It burns!");
+ pline("You're covered in %s! It burns!", hliquid("acid"));
exercise(A_STR, FALSE);
}
else
switch (olduasmon->mattk[i].adtyp) {
case AD_ACID:
if (!rn2(2)) {
- pline("%s is splashed by your acid!", Monnam(mtmp));
+ pline("%s is splashed by your %s!", Monnam(mtmp), hliquid("acid"));
if (resists_acid(mtmp)) {
pline("%s is not affected.", Monnam(mtmp));
tmp = 0;
ltyp = db_under_typ(lev->drawbridgemask);
if (ltyp == LAVAPOOL)
- return "lava";
+ return hliquid("lava");
else if (ltyp == ICE)
return "ice";
else if (ltyp == POOL)
else if (ltyp == MOAT && !Is_medusa_level(&u.uz))
return "moat";
- return "water";
+ return hliquid("water");
}
STATIC_OVL void
if (u.ustuck && u.uswallow && u.ustuck == mtmp) {
/* This can happen after a purple worm plucks you off a
flying steed while you are over water. */
- pline("%s sinks as water rushes in and flushes you out.",
+ pline("%s sinks as %s rushes in and flushes you out.",
+ hliquid("water"),
Monnam(mtmp));
}
mondead(mtmp);
damage = 0;
} else {
if (vis)
- pline_The("acid burns %s!", mon_nam(mtmp));
+ pline_The("%s burns %s!", hliquid("acid"), mon_nam(mtmp));
else if (verbose && !target)
pline("It is burned!");
}
/* at present, can't loot in water even when Underwater;
can tip underwater, but not when over--or stuck in--lava */
You("cannot %s things that are deep in the %s.", verb,
- is_lava(x, y) ? "lava" : "water");
+ hliquid(is_lava(x, y) ? "lava" : "water"));
return FALSE;
} else if (nolimbs(youmonst.data)) {
pline("Without limbs, you cannot %s anything.", verb);
} else if (likes_lava(youmonst.data) && u.utrap
&& u.utraptype == TT_LAVA) {
u.utrap = 0;
- pline_The("lava now feels soothing.");
+ pline_The("%s now feels soothing.", hliquid("lava"));
}
if (amorphous(youmonst.data) || is_whirly(youmonst.data)
|| unsolid(youmonst.data)) {
if (IS_FOUNTAIN(levl[u.ux][u.uy].typ))
The("fountain is not deep enough to hide in.");
else
- There("is no water to hide in here.");
+ There("is no %s to hide in here.", hliquid("water"));
u.uundetected = 0;
return 0;
}
break;
case POT_WATER:
if (!otmp->blessed && !otmp->cursed) {
- pline("This tastes like water.");
+ pline("This tastes like %s.", hliquid("water"));
u.uhunger += rnd(10);
newuhs(FALSE);
break;
if (is_undead(youmonst.data) || is_demon(youmonst.data)
|| u.ualign.type == A_CHAOTIC) {
if (otmp->blessed) {
- pline("This burns like acid!");
+ pline("This burns like %s!", hliquid("acid"));
exercise(A_CON, FALSE);
if (u.ulycn >= LOW_PM) {
Your("affinity to %s disappears!",
/* make_confused(0L, TRUE); */
} else {
if (u.ualign.type == A_LAWFUL) {
- pline("This burns like acid!");
+ pline("This burns like %s!", hliquid("acid"));
losehp(Maybe_Half_Phys(d(2, 6)), "potion of unholy water",
KILLED_BY_AN);
} else
break;
}
if (Underwater) {
- pline_The("water around you vaporizes violently!");
+ pline_The("%s around you vaporizes violently!", hliquid("water"));
} else {
pline_The("scroll erupts in a tower of flame!");
iflags.last_msg = PLNMSG_TOWER_OF_FLAME; /* for explode() */
u.utrap += rn1(10, 5);
} else if (u.utraptype == TT_LAVA) {
/* Must have fire resistance or they'd be dead already */
- You("sit in the lava!");
+ You("sit in the %s!", hliquid("lava"));
if (Slimed)
burn_away_slime();
u.utrap += rnd(4);
You("sit down on the muddy bottom.");
} else if (is_pool(u.ux, u.uy)) {
in_water:
- You("sit in the water.");
+ You("sit in the %s.", hliquid("water"));
if (!rn2(10) && uarm)
(void) water_damage(uarm, "armor", TRUE);
if (!rn2(10) && uarmf && uarmf->otyp != WATER_WALKING_BOOTS)
You(sit_message, "ladder");
} else if (is_lava(u.ux, u.uy)) {
/* must be WWalking */
- You(sit_message, "lava");
+ You(sit_message, hliquid("lava"));
burn_away_slime();
if (likes_lava(youmonst.data)) {
- pline_The("lava feels warm.");
+ pline_The("%s feels warm.", hliquid("lava"));
return 1;
}
- pline_The("lava burns you!");
+ pline_The("%s burns you!", hliquid("lava"));
losehp(d((Fire_resistance ? 2 : 10), 10), /* lava damage */
"sitting on lava", KILLED_BY);
} else if (is_ice(u.ux, u.uy)) {
? "maw"
: "ooze")
: (u.uinwater
- ? "water"
+ ? hliquid("water")
: (rmtyp == CLOUD)
? "cloud"
: IS_TREE(rmtyp)
return (FALSE);
}
if (!force && Underwater && !is_swimmer(ptr)) {
- You_cant("ride that creature while under water.");
+ You_cant("ride that creature while under %s.",
+ hliquid("water"));
return (FALSE);
}
if (!can_saddle(mtmp) || !can_ride(mtmp)) {
adjalign(-1);
}
} else if (is_lava(u.ux, u.uy)) {
- pline("%s is pulled into the lava!", Monnam(mtmp));
+ pline("%s is pulled into the %s!", Monnam(mtmp),
+ hliquid("lava"));
if (!likes_lava(mdat)) {
killed(mtmp);
adjalign(-1);
}
if (!u.uinwater) {
- You("%s into the water%c", Is_waterlevel(&u.uz) ? "plunge" : "fall",
+ You("%s into the %s%c", Is_waterlevel(&u.uz) ? "plunge" : "fall",
+ hliquid("water"),
Amphibious || Swimming ? '.' : '!');
if (!Swimming && !Is_waterlevel(&u.uz))
You("sink like %s.", Hallucination ? "the Titanic" : "a rock");
/* time to do some strip-tease... */
boolean succ = Is_waterlevel(&u.uz) ? TRUE : emergency_disrobe(&lost);
- You("try to crawl out of the water.");
+ You("try to crawl out of the %s.", hliquid("water"));
if (lost)
You("dump some of your gear to lose weight...");
if (succ) {
if (!Fire_resistance) {
if (Wwalking) {
- pline_The("lava here burns you!");
+ pline_The("%s here burns you!", hliquid("lava"));
if (usurvive) {
losehp(dmg, lava_killer, KILLED_BY); /* lava damage */
goto burn_stuff;
}
} else
- You("fall into the lava!");
+ You("fall into the %s!", hliquid("lava"));
usurvive = Lifesaved || discover;
if (wizard)
hero needs to escape immediately */
u.utrap = rn1(4, 4) + ((boil_away ? 2 : rn1(4, 12)) << 8);
u.utraptype = TT_LAVA;
- You("sink into the lava%s!", !boil_away
- ? ", but it only burns slightly"
- : " and are about to be immolated");
+ You("sink into the %s%s!", hliquid("lava"),
+ !boil_away
+ ? ", but it only burns slightly"
+ : " and are about to be immolated");
if (u.uhp > 1)
losehp(!boil_away ? 1 : (u.uhp / 2), lava_killer,
KILLED_BY); /* lava damage */
if (Blind || !flags.verbose)
You("are splashed!");
else
- You("are splashed by %s acid!", s_suffix(mon_nam(mon)));
+ You("are splashed by %s %s!", s_suffix(mon_nam(mon)),
+ hliquid("acid"));
if (!Acid_resistance)
mdamageu(mon, tmp);
break;
case ZT_ACID:
if (Acid_resistance) {
- pline_The("acid doesn't hurt.");
+ pline_The("%s doesn't hurt.", hliquid("acid"));
dam = 0;
} else {
- pline_The("acid burns!");
+ pline_The("%s burns!", hliquid("acid"));
dam = d(nd, 6);
exercise(A_STR, FALSE);
}
if (lev->typ == WATER) {
/* For now, don't let WATER freeze. */
if (see_it)
- pline_The("water freezes for a moment.");
+ pline_The("%s freezes for a moment.", hliquid("water"));
else
You_hear("a soft crackling.");
rangemod -= 1000; /* stop */
bury_objs(x, y);
if (see_it) {
if (lava)
- Norep("The lava cools and solidifies.");
+ Norep("The %s cools and solidifies.", hliquid("lava"));
else if (moat)
Norep("The %s is bridged with ice!", buf);
else
- Norep("The water freezes.");
+ Norep("The %s freezes.", hliquid("water"));
newsym(x, y);
} else if (!lava)
You_hear("a crackling sound.");