scum bug
Fix the reported bug about an inappropriate space in the message "For you, scum ; only N zorkmids for that foo." when an angry shopkeeper quotes a price for an item which has just been picked up. Also, suppress "only" in that case; just include it when the shk isn't angry. And the word "zorkmids" was actually missing, so I added it. I think the semi-colon should actually be a comma, but I've left that as is.
This commit is contained in:
@@ -133,6 +133,7 @@ protect hero from mind flayer's remote mental blast during successful prayer
|
|||||||
recognize if hero has already entered Gehennom by means other than usual route
|
recognize if hero has already entered Gehennom by means other than usual route
|
||||||
so that prompt can be skipped if Valley's stairs are subsequently used
|
so that prompt can be skipped if Valley's stairs are subsequently used
|
||||||
once you've passed the Valley, drawbridge tune is no longer a prayer reward
|
once you've passed the Valley, drawbridge tune is no longer a prayer reward
|
||||||
|
fix up grammar and punctuation in variants of shopkeeper's price message
|
||||||
|
|
||||||
|
|
||||||
Platform- and/or Interface-Specific Fixes
|
Platform- and/or Interface-Specific Fixes
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* SCCS Id: @(#)shk.c 3.5 2005/03/26 */
|
/* SCCS Id: @(#)shk.c 3.5 2005/07/06 */
|
||||||
/* 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. */
|
||||||
|
|
||||||
@@ -2245,28 +2245,35 @@ boolean ininv, dummy, silent;
|
|||||||
the(xname(obj)));
|
the(xname(obj)));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Strcpy(buf, "\"For you, ");
|
if (!ininv) {
|
||||||
if (ANGRY(shkp)) Strcat(buf, "scum ");
|
|
||||||
else {
|
|
||||||
static const char *honored[5] = {
|
|
||||||
"good", "honored", "most gracious", "esteemed",
|
|
||||||
"most renowned and sacred"
|
|
||||||
};
|
|
||||||
Strcat(buf, honored[rn2(4) + u.uevent.udemigod]);
|
|
||||||
if (!is_human(youmonst.data)) Strcat(buf, " creature");
|
|
||||||
else
|
|
||||||
Strcat(buf, (flags.female) ? " lady" : " sir");
|
|
||||||
}
|
|
||||||
if(ininv) {
|
|
||||||
long quan = obj->quan;
|
|
||||||
obj->quan = 1L; /* fool xname() into giving singular */
|
|
||||||
pline("%s; only %ld %s %s.\"", buf, ltmp,
|
|
||||||
(quan > 1L) ? "per" : "for this", xname(obj));
|
|
||||||
obj->quan = quan;
|
|
||||||
} else
|
|
||||||
pline("%s will cost you %ld %s%s.",
|
pline("%s will cost you %ld %s%s.",
|
||||||
The(xname(obj)), ltmp, currency(ltmp),
|
The(xname(obj)), ltmp, currency(ltmp),
|
||||||
(obj->quan > 1L) ? " each" : "");
|
(obj->quan > 1L) ? " each" : "");
|
||||||
|
} else {
|
||||||
|
/* (chooses among [0]..[3] normally; [1]..[4] after the
|
||||||
|
Wizard has been killed or invocation ritual performed) */
|
||||||
|
static const char * const honored[] = {
|
||||||
|
"good", "honored", "most gracious", "esteemed",
|
||||||
|
"most renowned and sacred"
|
||||||
|
};
|
||||||
|
long save_quan = obj->quan;
|
||||||
|
|
||||||
|
Strcpy(buf, "\"For you, ");
|
||||||
|
if (ANGRY(shkp)) {
|
||||||
|
Strcat(buf, "scum;");
|
||||||
|
} else {
|
||||||
|
int idx = rn2(SIZE(honored) - 1) + u.uevent.udemigod;
|
||||||
|
|
||||||
|
Strcat(buf, honored[idx]);
|
||||||
|
Strcat(buf, !is_human(youmonst.data) ? " creature" :
|
||||||
|
(flags.female) ? " lady" : " sir");
|
||||||
|
Strcat(buf, "; only");
|
||||||
|
}
|
||||||
|
obj->quan = 1L; /* fool xname() into giving singular */
|
||||||
|
pline("%s %ld %s %s %s.\"", buf, ltmp, currency(ltmp),
|
||||||
|
(save_quan > 1L) ? "per" : "for this", xname(obj));
|
||||||
|
obj->quan = save_quan;
|
||||||
|
}
|
||||||
} else if(!silent) {
|
} else if(!silent) {
|
||||||
if(ltmp) pline_The("list price of %s is %ld %s%s.",
|
if(ltmp) pline_The("list price of %s is %ld %s%s.",
|
||||||
the(xname(obj)), ltmp, currency(ltmp),
|
the(xname(obj)), ltmp, currency(ltmp),
|
||||||
|
|||||||
Reference in New Issue
Block a user