> OK, it's "grape juice" now, but it's still "bunch of grapes farm".
E char *FDECL(simple_typename, (int));
E boolean FDECL(obj_is_pname, (struct obj *));
E char *FDECL(distant_name, (struct obj *,char *(*)(OBJ_P)));
-E char *NDECL(fruitjuice);
+E char *FDECL(fruitname, (BOOLEAN_P));
E char *FDECL(xname, (struct obj *));
E char *FDECL(mshot_xname, (struct obj *));
E boolean FDECL(the_unique_obj, (struct obj *obj));
-/* SCCS Id: @(#)do.c 3.4 2002/08/11 */
+/* SCCS Id: @(#)do.c 3.4 2002/09/08 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
pline_The("sink quivers upward for a moment.");
break;
case RIN_POISON_RESISTANCE:
- You("smell rotten %s.", makeplural(pl_fruit));
+ You("smell rotten %s.", makeplural(fruitname(FALSE)));
break;
case RIN_AGGRAVATE_MONSTER:
pline("Several flies buzz angrily around the sink.");
-/* SCCS Id: @(#)fountain.c 3.4 2002/07/10 */
+/* SCCS Id: @(#)fountain.c 3.4 2002/09/08 */
/* Copyright Scott R. Turner, srt@ucla, 10/27/86 */
/* NetHack may be freely redistributed. See license for details. */
pline_The("water is contaminated!");
if (Poison_resistance) {
- pline("Perhaps it is runoff from the nearby %s farm.", pl_fruit);
+ pline(
+ "Perhaps it is runoff from the nearby %s farm.",
+ fruitname(FALSE));
losehp(rnd(4),"unrefrigerated sip of juice",
KILLED_BY_AN);
break;
-/* SCCS Id: @(#)objnam.c 3.4 2002/08/18 */
+/* SCCS Id: @(#)objnam.c 3.4 2002/09/08 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
/* convert player specified fruit name into corresponding fruit juice name
("slice of pizza" -> "pizza juice" rather than "slice of pizza juice") */
char *
-fruitjuice()
+fruitname(juice)
+boolean juice; /* whether or not to append " juice" to the name */
{
char *buf = nextobuf();
- const char *juice = strstri(pl_fruit, " of ");
+ const char *fruit_nam = strstri(pl_fruit, " of ");
- if (juice)
- juice += 4; /* skip past " of " */
+ if (fruit_nam)
+ fruit_nam += 4; /* skip past " of " */
else
- juice = pl_fruit; /* use it as is */
+ fruit_nam = pl_fruit; /* use it as is */
- Sprintf(buf, "%s juice", makesingular(juice));
+ Sprintf(buf, "%s%s", makesingular(fruit_nam), juice ? " juice" : "");
return buf;
}
-/* SCCS Id: @(#)potion.c 3.4 2002/08/18 */
+/* SCCS Id: @(#)potion.c 3.4 2002/09/08 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
pline(Hallucination ?
"This tastes like 10%% real %s%s all-natural beverage." :
"This tastes like %s%s.",
- otmp->odiluted ? "reconstituted " : "", fruitjuice());
+ otmp->odiluted ? "reconstituted " : "",
+ fruitname(TRUE));
if (otmp->otyp == POT_FRUIT_JUICE) {
u.uhunger += (otmp->odiluted ? 5 : 10) * (2 + bcsign(otmp));
newuhs(FALSE);
pline("Yecch! This stuff tastes like poison.");
if (otmp->blessed) {
pline("(But in fact it was mildly stale %s.)",
- fruitjuice());
+ fruitname(TRUE));
if (!Role_if(PM_HEALER)) {
if (otmp->corpsenm)
losehp(1,
if(Poison_resistance)
pline(
"(But in fact it was biologically contaminated %s.)",
- fruitjuice());
+ fruitname(TRUE));
if (Role_if(PM_HEALER))
pline("Fortunately, you have been immunized.");
else {