more shopkeeper feedback (trunk only)

The earlier change involving "you sneaky cad!" got me wondering, so
I looked up cad in the dictionary:  "an ungentlemanly man".  I can see
that being extended to a male gnome, even to an orc, but not to a women.
This commit is contained in:
nethack.rankin
2006-11-07 05:19:48 +00:00
parent 0a7c5d6ad2
commit b5633d17c3
2 changed files with 34 additions and 3 deletions

View File

@@ -169,6 +169,7 @@ format various prompts to avoid "Query truncated" entries in paniclog
for inventory display, include cost info on hero-owned containers holding for inventory display, include cost info on hero-owned containers holding
shop goods shop goods
shops now claim ownership of items created by using an unpaid horn of plenty shops now claim ownership of items created by using an unpaid horn of plenty
shopkeepers shouldn't refer to non-male character as "cad"
Platform- and/or Interface-Specific Fixes Platform- and/or Interface-Specific Fixes

View File

@@ -71,6 +71,7 @@ STATIC_DCL void FDECL(bill_box_content, (struct obj *, BOOLEAN_P, BOOLEAN_P,
struct monst *)); struct monst *));
STATIC_DCL boolean FDECL(rob_shop, (struct monst *)); STATIC_DCL boolean FDECL(rob_shop, (struct monst *));
STATIC_DCL boolean FDECL(special_stock, (struct obj *, struct monst *, BOOLEAN_P)); STATIC_DCL boolean FDECL(special_stock, (struct obj *, struct monst *, BOOLEAN_P));
STATIC_DCL const char *FDECL(cad, (BOOLEAN_P));
/* /*
invariants: obj->unpaid iff onbill(obj) [unless bp->useup] invariants: obj->unpaid iff onbill(obj) [unless bp->useup]
@@ -618,7 +619,8 @@ struct obj *obj;
/* if you bring a sack of N picks into a shop to sell, /* if you bring a sack of N picks into a shop to sell,
don't repeat this N times when they're taken out */ don't repeat this N times when they're taken out */
if (moves != pickmovetime) if (moves != pickmovetime)
verbalize("You sneaky cad! Get out of here with that pick!"); verbalize("You sneaky %s! Get out of here with that pick!",
cad(FALSE));
pickmovetime = moves; pickmovetime = moves;
} }
} }
@@ -3672,7 +3674,7 @@ boolean cant_mollify;
if (Invis) Your("invisibility does not fool %s!", shkname(shkp)); if (Invis) Your("invisibility does not fool %s!", shkname(shkp));
Sprintf(qbuf,"%sYou did %ld %s worth of damage!%s Pay?", Sprintf(qbuf,"%sYou did %ld %s worth of damage!%s Pay?",
!animal ? "\"Cad! " : "", cost_of_damage, !animal ? cad(TRUE) : "", cost_of_damage,
currency(cost_of_damage), !animal ? "\"" : ""); currency(cost_of_damage), !animal ? "\"" : "");
if(yn(qbuf) != 'n') { if(yn(qbuf) != 'n') {
cost_of_damage = check_credit(cost_of_damage, shkp); cost_of_damage = check_credit(cost_of_damage, shkp);
@@ -3984,6 +3986,7 @@ boolean altusage;
{ {
struct monst *shkp; struct monst *shkp;
const char *fmt, *arg1, *arg2; const char *fmt, *arg1, *arg2;
char buf[BUFSZ];
long tmp; long tmp;
if (!otmp->unpaid || !*u.ushops || if (!otmp->unpaid || !*u.ushops ||
@@ -3997,7 +4000,8 @@ boolean altusage;
arg1 = arg2 = ""; arg1 = arg2 = "";
if (otmp->oclass == SPBOOK_CLASS) { if (otmp->oclass == SPBOOK_CLASS) {
fmt = "%sYou owe%s %ld %s."; fmt = "%sYou owe%s %ld %s.";
arg1 = rn2(2) ? "This is no free library, cad! " : ""; Sprintf(buf, "This is no free library, %s! ", cad(FALSE));
arg1 = rn2(2) ? buf : "";
arg2 = ESHK(shkp)->debit > 0L ? " an additional" : ""; arg2 = ESHK(shkp)->debit > 0L ? " an additional" : "";
} else if (otmp->otyp == POT_OIL) { } else if (otmp->otyp == POT_OIL) {
fmt = "%s%sThat will cost you %ld %s (Yendorian Fuel Tax)."; fmt = "%s%sThat will cost you %ld %s (Yendorian Fuel Tax).";
@@ -4181,6 +4185,32 @@ struct obj *obj;
return (char *)0; return (char *)0;
} }
STATIC_OVL const char *
cad(altusage)
boolean altusage; /* used as a verbalized exclamation: \"Cad! ...\" */
{
const char *res = 0;
switch (is_demon(youmonst.data) ? 3 : poly_gender()) {
case 0: res = "cad"; break;
case 1: res = "minx"; break;
case 2: res = "beast"; break;
case 3: res = "fiend"; break;
default: impossible("cad: unknown gender");
res = "thing"; break;
}
if (altusage) {
char *cadbuf = mon_nam(&youmonst); /* snag an output buffer */
/* alternate usage adds a leading double quote and trailing
exclamation point plus sentence separating spaces */
Sprintf(cadbuf, "\"%s! ", res);
cadbuf[1] = highc(cadbuf[1]);
res = cadbuf;
}
return res;
}
#ifdef __SASC #ifdef __SASC
void void
sasc_bug(struct obj *op, unsigned x){ sasc_bug(struct obj *op, unsigned x){