}
if (mon) {
if (talk) {
- pline_The("voice of %s booms:", align_gname(alignment));
+ if (!Deaf)
+ pline_The("voice of %s booms:", align_gname(alignment));
+ else
+ You_feel("%s booming voice:",
+ s_suffix(align_gname(alignment)));
verbalize("Thou shalt pay for thine indiscretion!");
- if (!Blind)
+ if (canspotmon(mon))
pline("%s appears before you.", Amonnam(mon));
mon->mstrategy &= ~STRAT_APPEARMSG;
}
newsym(mtmp->mx, mtmp->my);
}
if (g.youmonst.data->mlet == S_DEMON) { /* Won't blackmail their own. */
- pline("%s says, \"Good hunting, %s.\"", Amonnam(mtmp),
- flags.female ? "Sister" : "Brother");
+ if (!Deaf)
+ pline("%s says, \"Good hunting, %s.\"", Amonnam(mtmp),
+ flags.female ? "Sister" : "Brother");
+ else if (canseemon(mtmp))
+ pline("%s says something.", Amonnam(mtmp));
if (!tele_restrict(mtmp))
(void) rloc(mtmp, TRUE);
return 1;
}
cash = money_cnt(g.invent);
- demand =
- (cash * (rnd(80) + 20 * Athome))
- / (100 * (1 + (sgn(u.ualign.type) == sgn(mtmp->data->maligntyp))));
+ demand = (cash * (rnd(80) + 20 * Athome))
+ / (100 * (1 + (sgn(u.ualign.type) == sgn(mtmp->data->maligntyp))));
if (!demand || g.multi < 0) { /* you have no gold or can't move */
mtmp->mpeaceful = 0;
/* make sure that the demand is unmeetable if the monster
has the Amulet, preventing monster from being satisfied
and removed from the game (along with said Amulet...) */
- if (mon_has_amulet(mtmp))
- demand = cash + (long) rn1(1000, 40);
-
- pline("%s demands %ld %s for safe passage.", Amonnam(mtmp), demand,
- currency(demand));
-
- if ((offer = bribe(mtmp)) >= demand) {
+ /* [actually the Amulet is safe; it would be dropped when
+ mongone() gets rid of the monster; force combat anyway;
+ also make it unmeetable if the player is Deaf, to simplify
+ handling that case as player-won't-pay] */
+ if (mon_has_amulet(mtmp) || Deaf)
+ /* 125: 5*25 in case hero has maximum possible charisma */
+ demand = cash + (long) rn1(1000, 125);
+
+ if (!Deaf)
+ pline("%s demands %ld %s for safe passage.",
+ Amonnam(mtmp), demand, currency(demand));
+ else if (canseemon(mtmp))
+ pline("%s seems to be demanding something.", Amonnam(mtmp));
+ offer = 0L;
+ if (!Deaf && ((offer = bribe(mtmp)) >= demand)) {
pline("%s vanishes, laughing about cowardly mortals.",
Amonnam(mtmp));
} else if (offer > 0L
Hear_again(); /* attempt to cure any deafness now (divine
message will be heard even if that fails) */
if (Conflict) {
- pline("A voice booms:");
+ if (!Deaf)
+ pline("A voice booms:");
+ else
+ You_feel("a booming voice:");
verbalize("Thy desire for conflict shall be fulfilled!");
/* send in some hostile angels instead */
lose_guardian_angel((struct monst *) 0);
} else if (u.ualign.record > 8) { /* fervent */
- pline("A voice whispers:");
+ if (!Deaf)
+ pline("A voice whispers:");
+ else
+ You_feel("a soft voice:");
verbalize("Thou hast been worthy of me!");
mm.x = u.ux;
mm.y = u.uy;
* probabilities are not very useful because they don't take
* the class generation probability into account. [If 10%
* of spellbooks were blank and 1% of scrolls were blank,
- * "blank" would have 10/11 chance to yield a blook even though
+ * "blank" would have 10/11 chance to yield a book even though
* scrolls are supposed to be much more common than books.]
*/
for (i = lo; i <= hi; ++i) {
for (i = 0; i < (int) (sizeof wrpsym); i++) {
register int j = strlen(wrp[i]);
+ /* check for "<class> [ of ] something" */
if (!strncmpi(d->bp, wrp[i], j)) {
d->oclass = wrpsym[i];
if (d->oclass != AMULET_CLASS) {
d->actualn = d->bp;
return 1; /*goto srch;*/
}
+ /* check for "something <class>" */
if (!BSTRCMPI(d->bp, d->p - j, wrp[i])) {
d->oclass = wrpsym[i];
- d->p -= j;
- *d->p = 0;
- if (d->p > d->bp && d->p[-1] == ' ')
- d->p[-1] = 0;
+ /* for "foo amulet", leave the class name so that
+ wishymatch() can do "of inversion" to try matching
+ "amulet of foo"; other classes don't include their
+ class name in their full object names (where
+ "potion of healing" is just "healing", for instance) */
+ if (d->oclass != AMULET_CLASS) {
+ d->p -= j;
+ *d->p = '\0';
+ if (d->p > d->bp && d->p[-1] == ' ')
+ d->p[-1] = '\0';
+ } else {
+ /* amulet without "of"; convoluted wording but better a
+ special case that's handled than one that's missing */
+ if (!strncmpi(d->bp, "versus poison ", 14)) {
+ d->typ = AMULET_VERSUS_POISON;
+ return 2; /*goto typfnd;*/
+ }
+ }
d->actualn = d->dn = d->bp;
return 1; /*goto srch;*/
}