-/* NetHack 3.6 shk.c $NHDT-Date: 1454485431 2016/02/03 07:43:51 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.122 $ */
+/* NetHack 3.6 shk.c $NHDT-Date: 1455402387 2016/02/13 22:26:27 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.123 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
obj->quan <= bp->bquan
*/
+static const char *angrytexts[] = {"quite upset", "ticked off", "furious"};
+
/*
* Transfer money from inventory to monster when paying
* shopkeepers, priests, oracle, succubus, and other demons.
* Player just stepped onto shop-boundary (known from above logic).
* Try to intimidate him into paying his bill
*/
- verbalize(NOTANGRY(shkp) ? "%s! Please pay before leaving."
+ if (!Deaf && !muteshk(shkp))
+ verbalize(NOTANGRY(shkp) ? "%s! Please pay before leaving."
: "%s! Don't you leave without paying!",
- plname);
+ plname);
+ else
+ pline("%s %s that you need to pay before leaving%s",
+ Shknam(shkp),
+ NOTANGRY(shkp) ? "points out" : "makes it clear",
+ NOTANGRY(shkp) ? "." : "!");
return;
}
if (Invis) {
pline("%s senses your presence.", shkname(shkp));
- verbalize("Invisible customers are not welcome!");
+ if (!Deaf && !muteshk(shkp))
+ verbalize("Invisible customers are not welcome!");
+ else
+ pline("%s stands firm as if he knows you are there.", Shknam(shkp));
return;
}
rt = rooms[*enterstring - ROOMOFFSET].rtype;
if (ANGRY(shkp)) {
- verbalize("So, %s, you dare return to %s %s?!", plname,
+ if (!Deaf && !muteshk(shkp))
+ verbalize("So, %s, you dare return to %s %s?!", plname,
s_suffix(shkname(shkp)), shtypes[rt - SHOPBASE].name);
+ else
+ pline("%s seems %s over your return to %s %s!",
+ Shknam(shkp),
+ angrytexts[rn2(SIZE(angrytexts))],
+ mhis(shkp),
+ shtypes[rt - SHOPBASE].name);
} else if (eshkp->robbed) {
- pline("%s mutters imprecations against shoplifters.", shkname(shkp));
+ if (!Deaf)
+ pline("%s mutters imprecations against shoplifters.", shkname(shkp));
+ else
+ pline("%s is combing through %s inventory list.",
+ Shknam(shkp),
+ mhis(shkp));
} else {
- verbalize("%s, %s! Welcome%s to %s %s!", Hello(shkp), plname,
- eshkp->visitct++ ? " again" : "", s_suffix(shkname(shkp)),
- shtypes[rt - SHOPBASE].name);
+ if (!Deaf && !muteshk(shkp))
+ verbalize("%s, %s! Welcome%s to %s %s!", Hello(shkp), plname,
+ eshkp->visitct++ ? " again" : "", s_suffix(shkname(shkp)),
+ shtypes[rt - SHOPBASE].name);
+ else
+ You("enter %s %s%s!",
+ s_suffix(shkname(shkp)),
+ shtypes[rt - SHOPBASE].name,
+ eshkp->visitct++ ? " again" : "");
}
/* can't do anything about blocking if teleported in */
if (!inside_shop(u.ux, u.uy)) {
if (!Blind)
makeknown(DWARVISH_MATTOCK);
}
- verbalize(NOTANGRY(shkp)
- ? "Will you please leave your %s%s outside?"
- : "Leave the %s%s outside.",
- tool, plur(cnt));
+ if (!Deaf && !muteshk(shkp))
+ verbalize(NOTANGRY(shkp)
+ ? "Will you please leave your %s%s outside?"
+ : "Leave the %s%s outside.",
+ tool, plur(cnt));
+ else
+ pline("%s %s to let you in with a %s%s.",
+ Shknam(shkp),
+ NOTANGRY(shkp) ? "is hesitant" : "refuses",
+ tool, plur(cnt));
should_block = TRUE;
} else if (u.usteed) {
- verbalize(NOTANGRY(shkp) ? "Will you please leave %s outside?"
+ if (!Deaf && !muteshk(shkp))
+ verbalize(NOTANGRY(shkp) ? "Will you please leave %s outside?"
: "Leave %s outside.",
y_monnam(u.usteed));
+ else
+ pline("%s %s to let you in while you're riding %s.",
+ Shknam(shkp),
+ NOTANGRY(shkp) ? "doesn't want" : "refuses",
+ y_monnam(u.usteed));
should_block = TRUE;
} else {
should_block =
if (obj->unpaid || !is_pick(obj))
return;
shkp = shop_keeper(*u.ushops);
- if (shkp && inhishop(shkp) && !muteshk(shkp)) {
+ if (shkp && inhishop(shkp)) {
static NEARDATA long pickmovetime = 0L;
/* if you bring a sack of N picks into a shop to sell,
don't repeat this N times when they're taken out */
- if (moves != pickmovetime)
- verbalize("You sneaky %s! Get out of here with that pick!",
+ if (moves != pickmovetime) {
+ if (!Deaf && !muteshk(shkp))
+ verbalize("You sneaky %s! Get out of here with that pick!",
cad(FALSE));
+ else
+ pline("%s %s your pick!",
+ Shknam(shkp),
+ haseyes(shkp->data) ? "glares at"
+ : "is dismayed because of");
+ }
pickmovetime = moves;
}
}
if (!itemize)
update_inventory(); /* Done in dopayobj() if itemize. */
}
- if (!ANGRY(shkp) && paid && !muteshk(shkp))
- verbalize("Thank you for shopping in %s %s!", s_suffix(shkname(shkp)),
+ if (!ANGRY(shkp) && paid) {
+ if (!Deaf && !muteshk(shkp))
+ verbalize("Thank you for shopping in %s %s!", s_suffix(shkname(shkp)),
shtypes[eshkp->shoptype - SHOPBASE].name);
+ else
+ pline("%s nods appreciatively at you for shopping in %s %s!",
+ Shknam(shkp),
+ mhis(shkp),
+ shtypes[eshkp->shoptype - SHOPBASE].name);
+ }
return 1;
}
buy = PAY_SKIP; /* don't want to buy */
} else if (quan < bp->bquan && !consumed) { /* partly used goods */
obj->quan = bp->bquan - save_quan; /* used up amount */
- verbalize("%s for the other %s before buying %s.",
+ if (!Deaf && !muteshk(shkp)) {
+ verbalize("%s for the other %s before buying %s.",
ANGRY(shkp) ? "Pay" : "Please pay",
simpleonames(obj), /* short name suffices */
save_quan > 1L ? "these" : "this one");
+ } else {
+ pline("%s %s%s your bill for the other %s first.",
+ Shknam(shkp),
+ ANGRY(shkp) ? "angrily " : "",
+ nolimbs(shkp->data) ? "motions to" : "points out",
+ simpleonames(obj));
+ }
buy = PAY_SKIP; /* shk won't sell */
}
}
&& obj->otyp == CANDELABRUM_OF_INVOCATION) {
if (!quietly) {
if (is_izchak(shkp, TRUE) && !u.uevent.invoked) {
- verbalize("No thanks, I'd hang onto that if I were you.");
- if (obj->spe < 7)
- verbalize(
- "You'll need %d%s candle%s to go along with it.",
- (7 - obj->spe), (obj->spe > 0) ? " more" : "",
- plur(7 - obj->spe));
- /* [what if hero is already carrying enough candles?
- should Izchak explain how to attach them instead?] */
+ if (Deaf || muteshk(shkp)) {
+ pline("%s seems %s that you want to sell that.",
+ Shknam(shkp),
+ (obj->spe < 7) ? "horrified" : "concerned");
+ } else {
+ verbalize("No thanks, I'd hang onto that if I were you.");
+ if (obj->spe < 7)
+ verbalize(
+ "You'll need %d%s candle%s to go along with it.",
+ (7 - obj->spe), (obj->spe > 0) ? " more" : "",
+ plur(7 - obj->spe));
+ /* [what if hero is already carrying enough candles?
+ should Izchak explain how to attach them instead?] */
+ }
} else {
- verbalize("I won't stock that. Take it out of here!");
+ if (!Deaf && !muteshk(shkp))
+ verbalize("I won't stock that. Take it out of here!");
+ else
+ pline("%s shakes %s %s in refusal.",
+ Shknam(shkp),
+ mhis(shkp),
+ mbodypart(shkp, HEAD));
}
}
return TRUE;
contentscount = 0;
}
- if (!muteshk(shkp) && !silent) {
+ if (!Deaf && !muteshk(shkp) && !silent) {
char buf[BUFSZ];
if (!ltmp) {
eshkp = ESHK(shkp);
if (ANGRY(shkp)) { /* they become shop-objects, no pay */
- if (!muteshk(shkp))
+ if (!Deaf && !muteshk(shkp))
verbalize("Thank you, scum!");
+ else
+ pline("%s smirks with satisfaction.", Shknam(shkp));
subfrombill(obj, shkp);
return;
}
offer += cgold;
if ((eshkp->robbed -= offer < 0L))
eshkp->robbed = 0L;
- if (offer && !muteshk(shkp))
+ if (offer && !Deaf && !muteshk(shkp))
verbalize(
"Thank you for your contribution to restock this recently plundered shop.");
subfrombill(obj, shkp);
&& dist2(shkp->mx, shkp->my, x, y) < 3
/* if it is the shk's pos, you hit and anger him */
&& (shkp->mx != x || shkp->my != y)) {
- if (mnearto(shkp, x, y, TRUE) && !muteshk(shkp))
+ if (mnearto(shkp, x, y, TRUE) && !Deaf && !muteshk(shkp))
verbalize("Out of my way, scum!");
if (cansee(x, y)) {
pline("%s nimbly%s catches %s.", Shknam(shkp),
*
* Take the easy way out and put ball&chain under hero.
*/
- if (!muteshk(shkp))
+ if (!Deaf && !muteshk(shkp))
verbalize("Get your junk out of my wall!");
unplacebc(); /* pick 'em up */
placebc(); /* put 'em down */
}
if (eshkp->following) {
if (strncmp(eshkp->customer, plname, PL_NSIZ)) {
- if (!muteshk(shkp))
+ if (!Deaf && !muteshk(shkp))
verbalize("%s, %s! I was looking for %s.", Hello(shkp),
plname, eshkp->customer);
eshkp->following = 0;
return 0;
}
if (moves > followmsg + 4) {
- if (!muteshk(shkp))
+ if (!Deaf && !muteshk(shkp))
verbalize("%s, %s! Didn't you forget to pay?",
Hello(shkp), plname);
+ else
+ pline("%s holds out %s upturned %s.",
+ Shknam(shkp),
+ mhis(shkp),
+ mbodypart(shkp, HAND));
followmsg = moves;
if (!rn2(9)) {
pline("%s doesn't like customers who don't pay.",
if (!fall) {
if (lang == 2) {
- if (u.utraptype == TT_PIT)
- verbalize(
- "Be careful, %s, or you might fall through the floor.",
- flags.female ? "madam" : "sir");
- else
- verbalize("%s, do not damage the floor here!",
- flags.female ? "Madam" : "Sir");
+ if (!Deaf && !muteshk(shkp)) {
+ if (u.utraptype == TT_PIT)
+ verbalize(
+ "Be careful, %s, or you might fall through the floor.",
+ flags.female ? "madam" : "sir");
+ else
+ verbalize("%s, do not damage the floor here!",
+ flags.female ? "Madam" : "Sir");
+ }
}
if (Role_if(PM_KNIGHT)) {
You_feel("like a common thief.");
* yanked the hapless critter out of the way.
*/
if (MON_AT(x, y)) {
- if (!Deaf && !animal) {
- You_hear("an angry voice:");
- verbalize("Out of my way, scum!");
+ if (!animal) {
+ if (!Deaf && !muteshk(shkp)) {
+ You_hear("an angry voice:");
+ verbalize("Out of my way, scum!");
+ }
wait_synch();
#if defined(UNIX) || defined(VMS)
#if defined(SYSV) || defined(ULTRIX) || defined(VMS)
if (animal && shkp->mcanmove && !shkp->msleeping)
yelp(shkp);
} else if (pursue || uinshp || !um_dist(x, y, 1)) {
- verbalize("How dare you %s my %s?", dmgstr,
+ if (!Deaf)
+ verbalize("How dare you %s my %s?", dmgstr,
dugwall ? "shop" : "door");
+ else
+ pline("%s is %s that you decided to %s %s %s!",
+ Shknam(shkp),
+ angrytexts[rn2(SIZE(angrytexts))],
+ dmgstr, mhis(shkp),
+ dugwall ? "shop" : "door");
} else {
- pline("%s shouts:", shkname(shkp));
- verbalize("Who dared %s my %s?", dmgstr,
- dugwall ? "shop" : "door");
+ if (!Deaf) {
+ pline("%s shouts:", shkname(shkp));
+ verbalize("Who dared %s my %s?", dmgstr,
+ dugwall ? "shop" : "door");
+ } else {
+ pline("%s is %s that someone decided to %s %s %s!",
+ Shknam(shkp),
+ angrytexts[rn2(SIZE(angrytexts))],
+ dmgstr,
+ mhis(shkp),
+ dugwall ? "shop" : "door");
+ }
}
hot_pursuit(shkp);
return;
home_shk(shkp, FALSE);
pacify_shk(shkp);
} else {
- if (!animal)
- verbalize("Oh, yes! You'll pay!");
- else
+ if (!animal) {
+ if (!Deaf && !muteshk(shkp))
+ verbalize("Oh, yes! You'll pay!");
+ else
+ pline("%s lunges %s %s toward your %s!",
+ Shknam(shkp),
+ mhis(shkp),
+ mbodypart(shkp, HAND),
+ body_part(NECK));
+ } else
growl(shkp);
hot_pursuit(shkp);
adjalign(-sgn(u.ualign.type));
eshk = ESHK(shkp);
if (ANGRY(shkp)) {
- pline("%s mentions how much %s dislikes %s customers.",
- shkname(shkp), mhe(shkp), eshk->robbed ? "non-paying" : "rude");
+ pline("%s %s how much %s dislikes %s customers.",
+ shkname(shkp),
+ (!Deaf && !muteshk(shkp)) ? "mentions" : "indicates",
+ mhe(shkp), eshk->robbed ? "non-paying" : "rude");
} else if (eshk->following) {
if (strncmp(eshk->customer, plname, PL_NSIZ)) {
- verbalize("%s %s! I was looking for %s.",
+ if (!Deaf && !muteshk(shkp))
+ verbalize("%s %s! I was looking for %s.",
Hello(shkp), plname, eshk->customer);
eshk->following = 0;
} else {
- verbalize("%s %s! Didn't you forget to pay?",
- Hello(shkp), plname);
+ if (!Deaf && !muteshk(shkp))
+ verbalize("%s %s! Didn't you forget to pay?",
+ Hello(shkp), plname);
+ else
+ pline("%s taps you on the %s.",
+ Shknam(shkp), body_part(ARM));
+
}
} else if (eshk->billct) {
register long total = addupbill(shkp) + eshk->debit;
- pline("%s says that your bill comes to %ld %s.",
- shkname(shkp), total, currency(total));
+ pline("%s %s that your bill comes to %ld %s.",
+ shkname(shkp),
+ (!Deaf && !muteshk(shkp)) ? "says" : "indicates",
+ total, currency(total));
} else if (eshk->debit) {
- pline("%s reminds you that you owe %s %ld %s.",
- shkname(shkp), mhim(shkp), eshk->debit, currency(eshk->debit));
+ pline("%s %s that you owe %s %ld %s.",
+ shkname(shkp),
+ (!Deaf && !muteshk(shkp)) ? "reminds you" : "indicates",
+ mhim(shkp), eshk->debit, currency(eshk->debit));
} else if (eshk->credit) {
pline("%s encourages you to use your %ld %s of credit.",
shkname(shkp), eshk->credit, currency(eshk->credit));
} else if (eshk->robbed) {
- pline("%s complains about a recent robbery.", shkname(shkp));
+ pline("%s %s about a recent robbery.",
+ Shknam(shkp),
+ (!Deaf && !muteshk(shkp)) ? "complains" : "indicates concern");
} else if ((shkmoney = money_cnt(shkp->minvent)) < 50) {
- pline("%s complains that business is bad.", shkname(shkp));
+ pline("%s %s that business is bad.",
+ shkname(shkp),
+ (!Deaf && !muteshk(shkp)) ? "complains" : "indicates");
} else if (shkmoney > 4000) {
- pline("%s says that business is good.", shkname(shkp));
+ pline("%s %s that business is good.",
+ shkname(shkp),
+ (!Deaf && !muteshk(shkp)) ? "says" : "indicates");
} else if (is_izchak(shkp, FALSE)) {
- pline(Izchak_speaks[rn2(SIZE(Izchak_speaks))], shkname(shkp));
+ if (!Deaf && !muteshk(shkp))
+ pline(Izchak_speaks[rn2(SIZE(Izchak_speaks))], shkname(shkp));
} else {
- pline("%s talks about the problem of shoplifters.", shkname(shkp));
+ if (!Deaf && !muteshk(shkp))
+ pline("%s talks about the problem of shoplifters.", shkname(shkp));
}
}
arg2 = "Ahem. ";
}
- if (!muteshk(shkp)) {
+ if (!Deaf && !muteshk(shkp)) {
verbalize(fmt, arg1, arg2, tmp, currency(tmp));
exercise(A_WIS, TRUE); /* you just got info */
}