B08017 - piece of cheese juice
Implement <Someone>'s request that fruit name "foo of bar" yield juice messages referring to "bar juice" instead of "foo of bar juice".
This commit is contained in:
@@ -209,6 +209,7 @@ enlightenment: don't misreport polymorphed lycanthrope as "in beast form"
|
|||||||
remove TIMED_DELAY from the features checked for version compatibility
|
remove TIMED_DELAY from the features checked for version compatibility
|
||||||
rolling boulder hitting monster stuck in pit should stop even when mon survives
|
rolling boulder hitting monster stuck in pit should stop even when mon survives
|
||||||
don't see chest trap gas colors while Blind
|
don't see chest trap gas colors while Blind
|
||||||
|
adjust fruit name in potion juice messages if it has the form "foo of bar"
|
||||||
|
|
||||||
|
|
||||||
Platform- and/or Interface-Specific Fixes
|
Platform- and/or Interface-Specific Fixes
|
||||||
|
|||||||
@@ -1320,6 +1320,7 @@ E char *FDECL(obj_typename, (int));
|
|||||||
E char *FDECL(simple_typename, (int));
|
E char *FDECL(simple_typename, (int));
|
||||||
E boolean FDECL(obj_is_pname, (struct obj *));
|
E boolean FDECL(obj_is_pname, (struct obj *));
|
||||||
E char *FDECL(distant_name, (struct obj *,char *(*)(OBJ_P)));
|
E char *FDECL(distant_name, (struct obj *,char *(*)(OBJ_P)));
|
||||||
|
E char *NDECL(fruitjuice);
|
||||||
E char *FDECL(xname, (struct obj *));
|
E char *FDECL(xname, (struct obj *));
|
||||||
E char *FDECL(mshot_xname, (struct obj *));
|
E char *FDECL(mshot_xname, (struct obj *));
|
||||||
E boolean FDECL(the_unique_obj, (struct obj *obj));
|
E boolean FDECL(the_unique_obj, (struct obj *obj));
|
||||||
|
|||||||
+18
-1
@@ -1,4 +1,4 @@
|
|||||||
/* SCCS Id: @(#)objnam.c 3.4 2002/08/06 */
|
/* SCCS Id: @(#)objnam.c 3.4 2002/08/18 */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -209,6 +209,23 @@ char *FDECL((*func), (OBJ_P));
|
|||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* convert player specified fruit name into corresponding fruit juice name
|
||||||
|
("slice of pizza" -> "pizza juice" rather than "slice of pizza juice") */
|
||||||
|
char *
|
||||||
|
fruitjuice()
|
||||||
|
{
|
||||||
|
char *buf = nextobuf();
|
||||||
|
const char *juice = strstri(pl_fruit, " of ");
|
||||||
|
|
||||||
|
if (juice)
|
||||||
|
juice += 4; /* skip past " of " */
|
||||||
|
else
|
||||||
|
juice = pl_fruit; /* use it as is */
|
||||||
|
|
||||||
|
Sprintf(buf, "%s juice", juice);
|
||||||
|
return buf;
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* OVLB */
|
#endif /* OVLB */
|
||||||
#ifdef OVL1
|
#ifdef OVL1
|
||||||
|
|
||||||
|
|||||||
+10
-9
@@ -1,4 +1,4 @@
|
|||||||
/* SCCS Id: @(#)potion.c 3.4 2002/07/11 */
|
/* SCCS Id: @(#)potion.c 3.4 2002/08/18 */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -543,10 +543,11 @@ peffects(otmp)
|
|||||||
if (otmp->cursed)
|
if (otmp->cursed)
|
||||||
pline("Yecch! This tastes %s.",
|
pline("Yecch! This tastes %s.",
|
||||||
Hallucination ? "overripe" : "rotten");
|
Hallucination ? "overripe" : "rotten");
|
||||||
else pline(Hallucination ?
|
else
|
||||||
"This tastes like 10%% real %s%s juice all-natural beverage." :
|
pline(Hallucination ?
|
||||||
"This tastes like %s%s juice.",
|
"This tastes like 10%% real %s%s all-natural beverage." :
|
||||||
otmp->odiluted ? "reconstituted " : "", pl_fruit);
|
"This tastes like %s%s.",
|
||||||
|
otmp->odiluted ? "reconstituted " : "", fruitjuice());
|
||||||
if (otmp->otyp == POT_FRUIT_JUICE) {
|
if (otmp->otyp == POT_FRUIT_JUICE) {
|
||||||
u.uhunger += (otmp->odiluted ? 5 : 10) * (2 + bcsign(otmp));
|
u.uhunger += (otmp->odiluted ? 5 : 10) * (2 + bcsign(otmp));
|
||||||
newuhs(FALSE);
|
newuhs(FALSE);
|
||||||
@@ -636,8 +637,8 @@ peffects(otmp)
|
|||||||
case POT_SICKNESS:
|
case POT_SICKNESS:
|
||||||
pline("Yecch! This stuff tastes like poison.");
|
pline("Yecch! This stuff tastes like poison.");
|
||||||
if (otmp->blessed) {
|
if (otmp->blessed) {
|
||||||
pline("(But in fact it was mildly stale %s juice.)",
|
pline("(But in fact it was mildly stale %s.)",
|
||||||
pl_fruit);
|
fruitjuice());
|
||||||
if (!Role_if(PM_HEALER)) {
|
if (!Role_if(PM_HEALER)) {
|
||||||
if (otmp->corpsenm)
|
if (otmp->corpsenm)
|
||||||
losehp(1,
|
losehp(1,
|
||||||
@@ -649,8 +650,8 @@ peffects(otmp)
|
|||||||
} else {
|
} else {
|
||||||
if(Poison_resistance)
|
if(Poison_resistance)
|
||||||
pline(
|
pline(
|
||||||
"(But in fact it was biologically contaminated %s juice.)",
|
"(But in fact it was biologically contaminated %s.)",
|
||||||
pl_fruit);
|
fruitjuice());
|
||||||
if (Role_if(PM_HEALER))
|
if (Role_if(PM_HEALER))
|
||||||
pline("Fortunately, you have been immunized.");
|
pline("Fortunately, you have been immunized.");
|
||||||
else {
|
else {
|
||||||
|
|||||||
Reference in New Issue
Block a user