obj->spe = 0;
if (obj->otyp == OIL_LAMP || obj->otyp == BRASS_LANTERN)
obj->age = 0;
- Your("%s vibrates briefly.",xname(obj));
+ Your("%s %s briefly.",xname(obj), otense(obj, "vibrate"));
} else pline(nothing_happens);
}
}
register struct obj *otmp;
{
Your("%s %s briefly.", xname(otmp),
- Blind ? "vibrates" : "glows");
+ otense(otmp, Blind ? "vibrate" : "glow"));
}
static void
register struct obj *otmp;
register const char *color;
{
- Your("%s %s%s for a moment.",
+ Your("%s %s%s%s for a moment.",
xname(otmp),
- Blind ? "vibrates" : "glows ",
- Blind ? (const char *)"" : hcolor(color));
+ otense(otmp, Blind ? "vibrate" : "glow"),
+ Blind ? "" : " ",
+ Blind ? nul : hcolor(color));
}
/* Is the object chargeable? For purposes of inventory display; it is */
/* destruction depends on current state, not adjustment */
if (obj->spe > rn2(7) || obj->spe <= -5) {
- Your("%s pulsates momentarily, then explodes!",
- xname(obj));
+ Your("%s %s momentarily, then %s!",
+ xname(obj), otense(obj,"pulsate"), otense(obj,"explode"));
if (is_on) Ring_gone(obj);
s = rnd(3 * abs(obj->spe)); /* amount of damage */
useup(obj);
stripspe(obj);
if (obj->lamplit) {
if (!Blind)
- pline("%s goes out!", The(xname(obj)));
+ pline("%s out!", Tobjnam(obj, "go"));
end_burn(obj, TRUE);
}
} else if (is_blessed) {
otmp->oerodeproof = !(sobj->cursed);
if(Blind) {
otmp->rknown = FALSE;
- Your("%s feels warm for a moment.",
- xname(otmp));
+ Your("%s %s warm for a moment.",
+ xname(otmp), otense(otmp, "feel"));
} else {
otmp->rknown = TRUE;
- Your("%s is covered by a %s %s %s!",
- xname(otmp),
+ Your("%s %s covered by a %s %s %s!",
+ xname(otmp), otense(otmp, "are"),
sobj->cursed ? "mottled" : "shimmering",
hcolor(sobj->cursed ? Black : golden),
sobj->cursed ? "glow" :
(is_shield(otmp) ? "layer" : "shield"));
}
- if (otmp->oerodeproof && (otmp->oeroded || otmp->oeroded2)) {
+ if (otmp->oerodeproof &&
+ (otmp->oeroded || otmp->oeroded2)) {
otmp->oeroded = otmp->oeroded2 = 0;
Your("%s %s as good as new!",
- xname(otmp), Blind ? "feels" : "looks");
+ xname(otmp),
+ otense(otmp, Blind ? "feel" : "look"));
}
break;
}
special_armor = is_elven_armor(otmp) ||
- (Role_if(PM_WIZARD) && otmp->otyp == CORNUTHAUM);
+ (Role_if(PM_WIZARD) && otmp->otyp == CORNUTHAUM);
if (sobj->cursed)
same_color =
(otmp->otyp == BLACK_DRAGON_SCALE_MAIL ||
/* KMH -- catch underflow */
s = sobj->cursed ? -otmp->spe : otmp->spe;
if (s > (special_armor ? 5 : 3) && rn2(s)) {
- Your("%s violently %s%s%s for a while, then evaporates.",
- xname(otmp),
- Blind ? "vibrates" : "glows",
- (!Blind && !same_color) ? " " : nul,
- (Blind || same_color) ? nul : hcolor(sobj->cursed ? Black : silver));
+ Your("%s violently %s%s%s for a while, then %s.",
+ xname(otmp),
+ otense(otmp, Blind ? "vibrate" : "glow"),
+ (!Blind && !same_color) ? " " : nul,
+ (Blind || same_color) ? nul :
+ hcolor(sobj->cursed ? Black : silver),
+ otense(otmp, "evaporate"));
if(is_cloak(otmp)) (void) Cloak_off();
if(is_boots(otmp)) (void) Boots_off();
if(is_helmet(otmp)) (void) Helmet_off();
Your("%s %s%s%s%s for a %s.",
xname(otmp),
s == 0 ? "violently " : nul,
- Blind ? "vibrates" : "glows",
+ otense(otmp, Blind ? "vibrate" : "glow"),
(!Blind && !same_color) ? " " : nul,
(Blind || same_color) ? nul : hcolor(sobj->cursed ? Black : silver),
(s*s>1) ? "while" : "moment");
if ((otmp->spe > (special_armor ? 5 : 3)) &&
(special_armor || !rn2(7)))
- Your("%s suddenly vibrates %s.",
- xname(otmp),
+ Your("%s suddenly %s %s.",
+ xname(otmp), otense(otmp, "vibrate"),
Blind ? "again" : "unexpectedly");
break;
}
} else
known = TRUE;
} else { /* armor and scroll both cursed */
- Your("%s vibrates.", xname(otmp));
+ Your("%s %s.", xname(otmp), otense(otmp, "vibrate"));
if (otmp->spe >= -6) otmp->spe--;
make_stunned(HStun + rn1(10, 10), TRUE);
}
if(otmp->oartifact && spec_ability(otmp, SPFX_INTEL) &&
rn2(10) < 8) {
- pline("%s resists!", The(xname(otmp)));
+ pline("%s!", Tobjnam(otmp, "resist"));
continue;
}
else
growl_verb = growl_sound(mtmp);
if (growl_verb) {
- pline("%s %s!", Monnam(mtmp), makeplural(growl_verb));
+ pline("%s %s!", Monnam(mtmp), vtense((char *)0, growl_verb));
if(flags.run) nomul(0);
wake_nearto(mtmp->mx, mtmp->my, mtmp->data->mlevel * 18);
}
break;
}
if (yelp_verb) {
- pline("%s %ss!", Monnam(mtmp), yelp_verb);
+ pline("%s %s!", Monnam(mtmp), vtense((char *)0, yelp_verb));
if(flags.run) nomul(0);
wake_nearto(mtmp->mx, mtmp->my, mtmp->data->mlevel * 12);
}
break;
}
if (whimper_verb) {
- pline("%s %ss.", Monnam(mtmp), whimper_verb);
+ pline("%s %s.", Monnam(mtmp), vtense((char *)0, whimper_verb));
if(flags.run) nomul(0);
wake_nearto(mtmp->mx, mtmp->my, mtmp->data->mlevel * 6);
}
Your("gloves seem unaffected.");
} else if (uarmg->oeroded2 < MAX_ERODE) {
if (uarmg->greased) {
- grease_protect(uarmg, "gloves", TRUE, &youmonst);
+ grease_protect(uarmg, "gloves", &youmonst);
} else {
Your("gloves corrode%s!",
uarmg->oeroded2+1 == MAX_ERODE ?
attacktype(mtmp->data, AT_ENGL)) {
/* this is probably a burning object that you dropped or threw */
if (u.uswallow && mtmp == u.ustuck && !Blind)
- pline("%s go%s out.", The(xname(otmp)),
- otmp->quan == 1L ? "es" : "");
+ pline("%s out.", Tobjnam(otmp, "go"));
snuff_otmp = TRUE;
}
/* Must do carrying effects on object prior to add_to_minv() */
static NEARDATA const char *action[] = { "smoulder", "rust", "rot", "corrode" };
static NEARDATA const char *msg[] = { "burnt", "rusted", "rotten", "corroded" };
boolean vulnerable = FALSE;
- boolean plural;
boolean grprot = FALSE;
boolean is_primary = TRUE;
boolean vismon = (victim != &youmonst) && canseemon(victim);
if (!print && (!vulnerable || otmp->oerodeproof || erosion == MAX_ERODE))
return FALSE;
- plural = (is_gloves(otmp) || is_boots(otmp)) &&
- !strstri(ostr, "pair of "); /* "pair of *s" is singular */
-
if (!vulnerable) {
if (flags.verbose) {
if (victim == &youmonst)
- Your("%s %s not affected.", ostr, plural ? "are" : "is");
+ Your("%s %s not affected.", ostr, vtense(ostr, "are"));
else if (vismon)
pline("%s's %s %s not affected.", Monnam(victim), ostr,
- plural ? "are" : "is");
+ vtense(ostr, "are"));
}
} else if (erosion < MAX_ERODE) {
if (grprot && otmp->greased) {
- grease_protect(otmp,ostr,plural,victim);
+ grease_protect(otmp,ostr,victim);
} else if (otmp->oerodeproof || (otmp->blessed && !rnl(4))) {
if (flags.verbose) {
if (victim == &youmonst)
pline("Somehow, your %s %s not affected.",
- ostr, plural ? "are" : "is");
+ ostr, vtense(ostr, "are"));
else if (vismon)
pline("Somehow, %s's %s %s not affected.",
- mon_nam(victim), ostr, plural ? "are" : "is");
+ mon_nam(victim), ostr, vtense(ostr, "are"));
}
} else {
if (victim == &youmonst)
- Your("%s %s%s%s!", ostr, action[type],
- plural ? "" : "s",
- erosion+1 == MAX_ERODE ? " completely" :
- erosion ? " further" : "");
+ Your("%s %s%s!", ostr,
+ vtense(ostr, action[type]),
+ erosion+1 == MAX_ERODE ? " completely" :
+ erosion ? " further" : "");
else if (vismon)
- pline("%s's %s %s%s%s!", Monnam(victim), ostr, action[type],
- plural ? "" : "s",
+ pline("%s's %s %s%s!", Monnam(victim), ostr,
+ vtense(ostr, action[type]),
erosion+1 == MAX_ERODE ? " completely" :
- erosion ? " further" : "");
+ erosion ? " further" : "");
if (is_primary)
otmp->oeroded++;
else
} else {
if (flags.verbose) {
if (victim == &youmonst)
- Your("%s %s%s completely %s.", ostr,
- Blind ? "feel" : "look",
- plural ? "" : "s", msg[type]);
+ Your("%s %s completely %s.", ostr,
+ vtense(ostr, Blind ? "feel" : "look"),
+ msg[type]);
else if (vismon)
- pline("%s's %s look%s completely %s.",
- Monnam(victim), ostr,
- plural ? "" : "s", msg[type]);
+ pline("%s's %s %s completely %s.",
+ Monnam(victim), ostr,
+ vtense(ostr, "look"), msg[type]);
}
}
return(TRUE);
}
void
-grease_protect(otmp,ostr,plu,victim)
+grease_protect(otmp,ostr,victim)
register struct obj *otmp;
register const char *ostr;
-register boolean plu;
struct monst *victim;
{
static const char txt[] = "protected by the layer of grease!";
if (ostr) {
if (victim == &youmonst)
- Your("%s %s %s",ostr,plu ? "are" : "is", txt);
+ Your("%s %s %s", ostr, vtense(ostr, "are"), txt);
else if (vismon)
pline("%s's %s %s %s", Monnam(victim),
- ostr, plu ? "are" : "is", txt);
+ ostr, vtense(ostr, "are"), txt);
} else {
if (victim == &youmonst)
Your("%s %s",aobjnam(otmp,"are"), txt);
} else if (is_flammable(obj) && obj->oeroded < MAX_ERODE &&
!(obj->oerodeproof || (obj->blessed && !rnl(4)))) {
if (in_sight) {
- pline("%s burn%s%s.", Yname2(obj), obj->quan > 1 ? "": "s",
+ pline("%s %s%s.", Yname2(obj), otense(obj, "burn"),
obj->oeroded+1 == MAX_ERODE ? " completely" :
obj->oeroded ? " further" : "");
}
insider = (*u.ushops && inside_shop(u.ux, u.uy) &&
*in_rooms(ox, oy, SHOPBASE) == *u.ushops);
- pline("%s explodes!", The(xname(obj)));
+ pline("%s!", Tobjnam(obj, "explode"));
Sprintf(buf, "exploding %s", xname(obj));
if(costly)
setmnotwielded(mon,monwep);
MON_NOWEP(mon);
mon->weapon_check = NEED_WEAPON;
- pline("%s %s shatter%s from the force of your blow!",
+ pline("%s %s %s from the force of your blow!",
s_suffix(Monnam(mon)), xname(monwep),
- (monwep->quan) == 1L ? "s" : "");
+ otense(monwep, "shatter"));
m_useup(mon, monwep);
/* If someone just shattered MY weapon, I'd flee! */
if (rn2(4)) {
}
if (obj && !rn2(nopoison)) {
obj->opoisoned = FALSE;
- Your("%s%s no longer poisoned.", xname(obj),
- (obj->quan == 1L) ? " is" : "s are"); /**FIXME**/
+ Your("%s %s no longer poisoned.", xname(obj),
+ otense(obj, "are"));
}
if (resists_poison(mon))
needpoismsg = TRUE;
if (bimanual(mw_tmp)) mon_hand = makeplural(mon_hand);
Sprintf(welded_buf, "%s welded to %s %s",
- (mw_tmp->quan == 1L) ? "is" : "are",
+ otense(mw_tmp, "are"),
mhis(mon), mon_hand);
if (obj->otyp == PICK_AXE) {
if (obj->cursed && obj->otyp != CORPSE) {
pline("%s %s to %s %s!",
The(xname(obj)),
- (obj->quan == 1L) ? "welds itself"
- : "weld themselves",
+ is_plural(obj) ? "welds itself" : "weld themselves",
s_suffix(mon_nam(mon)), mbodypart(mon,HAND));
obj->bknown = 1;
}
if (artifact_light(obj) && !obj->lamplit) {
begin_burn(obj, FALSE);
if (canseemon(mon))
- pline("%s glows brilliantly in %s %s!",
- The(xname(obj)),
+ pline("%s brilliantly in %s %s!",
+ Tobjnam(obj, "glow"),
s_suffix(mon_nam(mon)), mbodypart(mon,HAND));
}
obj->owornmask = W_WEP;
if (artifact_light(obj) && obj->lamplit) {
end_burn(obj, FALSE);
if (canseemon(mon))
- pline("%s in %s %s stops glowing.", The(xname(obj)),
- s_suffix(mon_nam(mon)), mbodypart(mon,HAND));
+ pline("%s in %s %s %s glowing.", The(xname(obj)),
+ s_suffix(mon_nam(mon)), mbodypart(mon,HAND),
+ otense(obj, "stop"));
}
obj->owornmask &= ~W_WEP;
}
setworn(obj, W_WEP);
if (uwep == obj && artifact_light(olduwep) && olduwep->lamplit) {
end_burn(olduwep, FALSE);
- if (!Blind) pline("%s stops glowing.", The(xname(olduwep)));
+ if (!Blind) pline("%s glowing.", Tobjnam(olduwep, "stop"));
}
/* Note: Explicitly wielding a pick-axe will not give a "bashing"
* message. Wielding one via 'a'pplying it will.
if (artifact_light(wep) && !wep->lamplit) {
begin_burn(wep, FALSE);
if (!Blind)
- pline("%s begins to glow brilliantly!", The(xname(wep)));
+ pline("%s to glow brilliantly!", Tobjnam(wep, "begin"));
}
#if 0
} else if (newquiver == uwep) {
/* Prevent accidentally readying the main weapon */
pline("%s already being used as a weapon!",
- (uwep->quan == 1L) ? "That is" : "They are");
+ !is_plural(uwep) ? "That is" : "They are");
return(0);
} else if (newquiver->owornmask & (W_ARMOR | W_RING | W_AMUL | W_TOOL
#ifdef STEED
else if (NOT_WEAPON(uwep) || NOT_WEAPON(uswapwep)) {
otmp = NOT_WEAPON(uwep) ? uwep : uswapwep;
pline("%s %s.", Yname2(otmp),
- (otmp->quan) > 1L ? "aren't weapons" : "isn't a weapon");
+ is_plural(otmp) ? "aren't weapons" : "isn't a weapon");
} else if (bimanual(uwep) || bimanual(uswapwep)) {
otmp = bimanual(uwep) ? uwep : uswapwep;
pline("%s isn't one-handed.", Yname2(otmp));
} else if (uarms)
You_cant("use two weapons while wearing a shield.");
else if (uswapwep->oartifact)
- pline("%s resists being held second to another weapon!",
- Yname2(uswapwep));
+ pline("%s %s being held second to another weapon!",
+ Yname2(uswapwep), otense(uswapwep, "resist"));
else if (!uarmg && !Stone_resistance && (uswapwep->otyp == CORPSE &&
touch_petrifies(&mons[uswapwep->corpsenm]))) {
char kbuf[BUFSZ];
if (uwep) {
if (artifact_light(uwep) && uwep->lamplit) {
end_burn(uwep, FALSE);
- if (!Blind) pline("%s stops glowing.", The(xname(uwep)));
+ if (!Blind) pline("%s glowing.", Tobjnam(uwep, "stop"));
}
setworn((struct obj *)0, W_WEP);
unweapon = TRUE;
erosion = acid_dmg ? target->oeroded2 : target->oeroded;
if (target->greased) {
- grease_protect(target,(char *)0,FALSE,victim);
+ grease_protect(target,(char *)0,victim);
} else if (target->oclass == SCROLL_CLASS) {
if(fade_scrolls && target->otyp != SCR_BLANK_PAPER
#ifdef MAIL
if(((uwep->spe > 5 && amount >= 0) || (uwep->spe < -5 && amount < 0))
&& rn2(3)) {
if (!Blind)
- Your("%s %s for a while and then evaporate%s.",
+ Your("%s %s for a while and then %s.",
aobjnam(uwep, "violently glow"), color,
- uwep->quan == 1L ? "s" : "");
+ otense(uwep, "evaporate"));
else
Your("%s.", aobjnam(uwep, "evaporate"));
savewornmask = obj->owornmask;
Your("%s %s welded to your %s!",
- xname(obj), (obj->quan == 1L) ? "is" : "are",
+ xname(obj), otense(obj, "are"),
bimanual(obj) ? (const char *)makeplural(body_part(HAND))
: body_part(HAND));
obj->owornmask = savewornmask;
if(ttmp->ttyp == MAGIC_PORTAL) {
int du = distu(ttmp->tx, ttmp->ty);
if (du <= 9)
- pline("%s feels hot!", The(xname(amu)));
+ pline("%s hot!", Tobjnam(amu, "feel"));
else if (du <= 64)
- pline("%s feels very warm.", The(xname(amu)));
+ pline("%s very warm.", Tobjnam(amu, "feel"));
else if (du <= 144)
- pline("%s feels warm.", The(xname(amu)));
+ pline("%s warm.", Tobjnam(amu, "feel"));
/* else, the amulet feels normal */
break;
}
return 0;
} else if (Glib) {
dropx(pen);
- pline("%s slips from your %s.", The(xname(pen)),
- makeplural(body_part(FINGER)));
+ pline("%s from your %s.",
+ Tobjnam(pen, "slip"), makeplural(body_part(FINGER)));
return 1;
}
return 0;
else {
#ifdef DEBUG
- pline("%s pulsates for a moment.", The(xname(obj)));
+ pline("%s for a moment.", Tobjnam(obj, "pulsate"));
#endif
obj->bypass = 0;
}
obj->dknown = 1;
if (Has_contents(obj)) {
if (!obj->cobj)
- pline("%s is empty.", The(xname(obj)));
+ pline("%s empty.", Tobjnam(obj, "are"));
else {
struct obj *o;
/* view contents (not recursively) */
current_wand = 0;
}
if (obj && obj->spe < 0) {
- pline("%s turns to dust.", The(xname(obj)));
+ pline("%s to dust.", Tobjnam(obj, "turn"));
useup(obj);
}
update_inventory(); /* maybe used a charge */
register struct monst *mtmp;
register const char *force; /* usually either "." or "!" */
{
- int pl = strcmp(str, makesingular(str));
-
if((!cansee(bhitpos.x,bhitpos.y) && !canspotmon(mtmp))
|| !flags.verbose)
- pline("%s %s it.", The(str), pl ? "hit" : "hits");
- else pline("%s %s %s%s", The(str), pl ? "hit" : "hits",
+ pline("%s %s it.", The(str), vtense(str, "hit"));
+ else pline("%s %s %s%s", The(str), vtense(str, "hit"),
mon_nam(mtmp), force);
}
register const char *str;
register struct monst *mtmp;
{
- int pl = strcmp(str, makesingular(str));
-
- pline("%s %s %s.", The(str), pl ? "miss" : "misses",
+ pline("%s %s %s.", The(str), vtense(str, "miss"),
((cansee(bhitpos.x,bhitpos.y) || canspotmon(mtmp))
&& flags.verbose) ?
mon_nam(mtmp) : "it");