fix B11001 - fruit name quibbling

> OK, it's "grape juice" now, but it's still "bunch of grapes farm".
This commit is contained in:
nethack.rankin
2002-09-10 09:10:23 +00:00
parent ce71bfb593
commit a6e3791170
5 changed files with 20 additions and 16 deletions

View File

@@ -1326,7 +1326,7 @@ E char *FDECL(obj_typename, (int));
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));

View File

@@ -1,4 +1,4 @@
/* 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. */
@@ -260,7 +260,7 @@ giveback:
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.");

View File

@@ -1,4 +1,4 @@
/* 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. */
@@ -255,7 +255,9 @@ drinkfountain()
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;

View File

@@ -1,4 +1,4 @@
/* 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. */
@@ -212,17 +212,18 @@ char *FDECL((*func), (OBJ_P));
/* 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;
}

View File

@@ -1,4 +1,4 @@
/* 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. */
@@ -563,7 +563,8 @@ peffects(otmp)
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);
@@ -654,7 +655,7 @@ peffects(otmp)
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,
@@ -667,7 +668,7 @@ peffects(otmp)
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 {