E char *FDECL(The, (const char *));
E char *FDECL(the, (const char *));
E char *FDECL(aobjnam, (struct obj *,const char *));
+E char *FDECL(yobjnam, (struct obj *,const char *));
+E char *FDECL(Yobjnam2, (struct obj *,const char *));
E char *FDECL(Tobjnam, (struct obj *,const char *));
E char *FDECL(otense, (struct obj *,const char *));
E char *FDECL(vtense, (const char *,const char *));
(void) get_obj_location(otmp, &x, &y, 0);
if (otmp->where == OBJ_MINVENT ? cansee(x,y) : !Blind)
- pline("%s %scandle%s flame%s extinguished.",
+ pline("%s%scandle%s flame%s extinguished.",
Shk_Your(buf, otmp),
(candle ? "" : "candelabrum's "),
(many ? "s'" : "'s"), (many ? "s are" : " is"));
if(obj->lamplit) {
if(obj->otyp == OIL_LAMP || obj->otyp == MAGIC_LAMP ||
obj->otyp == BRASS_LANTERN)
- pline("%s lamp is now off.", Shk_Your(buf, obj));
+ pline("%slamp is now off.", Shk_Your(buf, obj));
else
You("snuff out %s.", yname(obj));
end_burn(obj, TRUE);
if(obj->otyp == OIL_LAMP || obj->otyp == MAGIC_LAMP ||
obj->otyp == BRASS_LANTERN) {
check_unpaid(obj);
- pline("%s lamp is now on.", Shk_Your(buf, obj));
+ pline("%slamp is now on.", Shk_Your(buf, obj));
} else { /* candle(s) */
pline("%s flame%s %s%s",
s_suffix(Yname2(obj)),
return;
}
- You("light %s potion.%s", shk_your(buf, obj),
+ You("light %spotion.%s", shk_your(buf, obj),
Blind ? "" : " It gives off a dim light.");
if (obj->unpaid && costly_spot(u.ux, u.uy)) {
/* Normally, we shouldn't both partially and fully charge
static NEARDATA const char lubricables[] = { ALL_CLASSES, ALLOW_NONE, 0 };
static NEARDATA const char need_to_remove_outer_armor[] =
- "need to remove your %s to grease your %s.";
+ "need to remove %s to grease %s.";
STATIC_OVL void
use_grease(obj)
otmp = getobj(lubricables, "grease");
if (!otmp) return;
if ((otmp->owornmask & WORN_ARMOR) && uarmc) {
- Strcpy(buf, xname(uarmc));
- You(need_to_remove_outer_armor, buf, xname(otmp));
+ Strcpy(buf, yname(uarmc));
+ You(need_to_remove_outer_armor, buf, yname(otmp));
return;
}
#ifdef TOURIST
if ((otmp->owornmask & WORN_SHIRT) && (uarmc || uarm)) {
- Strcpy(buf, uarmc ? xname(uarmc) : "");
- if (uarmc && uarm) Strcat(buf, " and ");
- Strcat(buf, uarm ? xname(uarm) : "");
- You(need_to_remove_outer_armor, buf, xname(otmp));
+ Strcpy(buf, uarmc ? yname(uarmc) : "");
+ if (uarmc && uarm)
+ Strcat(strcat(buf, " and "), xname(uarm));
+ else Strcat(buf, uarm ? yname(uarm) : "");
+ You(need_to_remove_outer_armor, buf, yname(otmp));
return;
}
#endif
ttyp = (otmp->otyp == LAND_MINE) ? LANDMINE : BEAR_TRAP;
if (otmp == trapinfo.tobj &&
u.ux == trapinfo.tx && u.uy == trapinfo.ty) {
- You("resume setting %s %s.",
+ You("resume setting %s%s.",
shk_your(buf, otmp),
defsyms[trap_to_defsym(what_trap(ttyp))].explanation);
set_occupation(set_trap, occutext, 0);
}
}
#endif
- You("begin setting %s %s.",
+ You("begin setting %s%s.",
shk_your(buf, otmp),
defsyms[trap_to_defsym(what_trap(ttyp))].explanation);
set_occupation(set_trap, occutext, 0);
} else
mon_hand = 0; /* lint suppression */
- You("wrap your bullwhip around %s %s.",
- s_suffix(mon_nam(mtmp)), onambuf);
+ You("wrap your bullwhip around %s.", yname(otmp));
if (gotit && otmp->cursed) {
pline("%s welded to %s %s%c",
(otmp->quan == 1L) ? "It is" : "They are",
switch (rn2(proficient + 1)) {
case 2:
/* to floor near you */
- You("yank %s %s to the %s!", s_suffix(mon_nam(mtmp)),
- onambuf, surface(u.ux, u.uy));
+ You("yank %s to the %s!",
+ yname(otmp), surface(u.ux, u.uy));
place_object(otmp, u.ux, u.uy);
stackobj(otmp);
break;
}
#endif /* 0 */
/* right into your inventory */
- You("snatch %s %s!", s_suffix(mon_nam(mtmp)), onambuf);
+ You("snatch %s!", yname(otmp));
if (otmp->otyp == CORPSE &&
touch_petrifies(&mons[otmp->corpsenm]) &&
!uarmg && !Stone_resistance &&
/* sometimes the blessing will be worn off */
if (!rn2(49)) {
if (!Blind) {
- char buf[BUFSZ];
-
- pline("%s %s %s.", Shk_Your(buf, obj),
- aobjnam(obj, "glow"), hcolor("brown"));
+ pline("%s %s.",
+ Yobjnam2(obj, "glow"), hcolor("brown"));
obj->bknown = 1;
}
unbless(obj);
pline("Fortunately, you are wearing a hard helmet.");
dmg = 3;
} else if (flags.verbose)
- Your("%s does not protect you.", xname(uarmh));
+ pline("%s does not protect you.", Yname2(uarmh));
}
losehp(dmg, "crunched in the head by an iron ball",
NO_KILLER_PREFIX);
nextobj = otmp->nobj;
if ((otmp != uball) && (rnd(capacity) <= (int)otmp->owt)) {
if (canletgo(otmp, "")) {
- Your("%s you down the stairs.",
- aobjnam(otmp, "follow"));
+ pline("%s you down the stairs.",
+ Yobjnam2(otmp, "follow"));
dropx(otmp);
}
}
switch(rn2(3)) {
case 0:
if(!welded(uwep)) {
- You("fumble and drop your %s.", xname(uwep));
+ You("fumble and drop %s.", yname(uwep));
dropx(uwep);
} else {
#ifdef STEED
if (u.usteed)
- Your("%s %s and %s %s!",
- xname(uwep),
- otense(uwep, "bounce"), otense(uwep, "hit"),
- mon_nam(u.usteed));
+ pline("%s and %s %s!",
+ Yobjnam2(uwep, "bounce"), otense(uwep, "hit"),
+ mon_nam(u.usteed));
else
#endif
- pline("Ouch! Your %s %s and %s you!",
- xname(uwep),
- otense(uwep, "bounce"), otense(uwep, "hit"));
+ pline("Ouch! %s and %s you!",
+ Yobjnam2(uwep, "bounce"), otense(uwep, "hit"));
set_wounded_legs(RIGHT_SIDE, 5 + rnd(5));
}
break;
seetrap(trap);
There("is a spider web there!");
}
- Your("%s entangled in the web.",
- aobjnam(obj, "become"));
+ pline("%s entangled in the web.",
+ Yobjnam2(obj, "become"));
/* you ought to be able to let go; tough luck */
/* (maybe `move_into_trap()' would be better) */
nomul(-d(2,2));
if (vibrate) losehp(2, "axing a hard object", KILLED_BY);
}
else
- You("swing your %s through thin air.",
- aobjnam(obj, (char *)0));
+ You("swing %s through thin air.",
+ yobjnam(obj, (char *)0));
} else {
static const char * const d_action[6] = {
"swinging",
}
} else if (Is_airlevel(&u.uz) || Is_waterlevel(&u.uz)) {
/* it must be air -- water checked above */
- You("swing your %s through thin air.", aobjnam(obj, (char *)0));
+ You("swing %s through thin air.", yobjnam(obj, (char *)0));
} else if (!can_reach_floor()) {
You_cant("reach the %s.", surface(u.ux,u.uy));
} else if (is_pool(u.ux, u.uy) || is_lava(u.ux, u.uy)) {
You("cannot stay under%s long enough.",
is_pool(u.ux, u.uy) ? "water" : " the lava");
} else if (!ispick) {
- Your("%s merely scratches the %s.",
- aobjnam(obj, (char *)0), surface(u.ux,u.uy));
+ pline("%s merely scratches the %s.",
+ Yobjnam2(obj, (char *)0), surface(u.ux,u.uy));
u_wipe_engr(3);
} else {
if (digging.pos.x != u.ux || digging.pos.y != u.uy ||
obj->in_use = TRUE; /* block free identification via interrupt */
switch(obj->otyp) { /* effects that can be noticed without eyes */
case RIN_SEARCHING:
- You("thought your %s got lost in the sink, but there it is!",
- xname(obj));
+ You("thought %s got lost in the sink, but there it is!",
+ yname(obj));
goto giveback;
case RIN_SLOW_DIGESTION:
pline_The("ring is regurgitated!");
case OBJ_CONTAINED:
if (container_where == OBJ_MINVENT && cansee(mtmp->mx, mtmp->my) &&
mcarry && canseemon(mcarry) && container) {
- char sackname[BUFSZ];
- Sprintf(sackname, "%s %s", s_suffix(mon_nam(mcarry)),
- xname(container));
- pline("%s writhes out of %s!", Amonnam(mtmp), sackname);
+ pline("%s writhes out of %s!",
+ Amonnam(mtmp), yname(container));
} else if (container_where == OBJ_INVENT && container) {
char sackname[BUFSZ];
Strcpy(sackname, an(xname(container)));
pline("Fortunately, you are wearing a hard helmet.");
} else if (flags.verbose &&
!(obj->otyp == CORPSE && touch_petrifies(&mons[obj->corpsenm])))
- Your("%s does not protect you.", xname(uarmh));
+ pline("%s does not protect you.", Yname2(uarmh));
} else if (obj->otyp == CORPSE && touch_petrifies(&mons[obj->corpsenm])) {
if (!Stone_resistance &&
!(poly_when_stoned(youmonst.data) && polymon(PM_STONE_GOLEM))) {
default:
goto no_opener;
}
- pline("Using your %s you try to open the tin.",
- aobjnam(uwep, (char *)0));
+ pline("Using %s you try to open the tin.",
+ yobjnam(uwep, (char *)0));
} else {
no_opener:
pline("It is not so easy to open this tin.");
xchar type = DUST; /* Type of engraving made */
char buf[BUFSZ]; /* Buffer for final/poly engraving text */
char ebuf[BUFSZ]; /* Buffer for initial engraving text */
+ char fbuf[BUFSZ]; /* Buffer for "your fingers" */
char qbuf[QBUFSZ]; /* Buffer for query text */
char post_engr_text[BUFSZ]; /* Text displayed after engraving prompt */
const char *everb; /* Present tense of engraving type */
otmp = getobj(styluses, "write with");
if(!otmp) return(0); /* otmp == zeroobj if fingers */
- if (otmp == &zeroobj) writer = makeplural(body_part(FINGER));
- else writer = xname(otmp);
+ if (otmp == &zeroobj) {
+ Strcat(strcpy(fbuf, "your "), makeplural(body_part(FINGER)));
+ writer = fbuf;
+ } else writer = yname(otmp);
/* There's no reason you should be able to write with a wand
* while both your hands are tied up.
}
if (jello) {
- You("tickle %s with your %s.", mon_nam(u.ustuck), writer);
+ You("tickle %s with %s.", mon_nam(u.ustuck), writer);
Your("message dissolves...");
return(0);
}
return(0);
}
if (IS_ALTAR(levl[u.ux][u.uy].typ)) {
- You("make a motion towards the altar with your %s.", writer);
+ You("make a motion towards the altar with %s.", writer);
altar_wrath(u.ux, u.uy);
return(0);
}
case FOOD_CLASS:
case SCROLL_CLASS:
case SPBOOK_CLASS:
- Your("%s would get %s.", xname(otmp),
+ pline("%s would get %s.", Yname2(otmp),
is_ice(u.ux,u.uy) ? "all frosty" : "too dirty");
ptext = FALSE;
break;
if ((int)otmp->spe > -3)
type = ENGRAVE;
else
- Your("%s too dull for engraving.", aobjnam(otmp,"are"));
+ pline("%s too dull for engraving.",
+ Yobjnam2(otmp, "are"));
}
break;
if (!Blind)
You("wipe out the message here.");
else
- Your("%s %s %s.", xname(otmp),
- otense(otmp, "get"),
- is_ice(u.ux,u.uy) ?
- "frosty" : "dusty");
+ pline("%s %s.", Yobjnam2(otmp, "get"),
+ is_ice(u.ux,u.uy) ?
+ "frosty" : "dusty");
dengr = TRUE;
} else
- Your("%s can't wipe out this engraving.",
- xname(otmp));
+ pline("%s can't wipe out this engraving.",
+ Yname2(otmp));
else
- Your("%s %s %s.", xname(otmp), otense(otmp, "get"),
+ pline("%s %s.", Yobjnam2(otmp, "get"),
is_ice(u.ux,u.uy) ? "frosty" : "dusty");
break;
default:
* However, you could now engrave "Elb", then
* "ere", then "th".
*/
- Your("%s dull.", aobjnam(otmp, "get"));
+ pline("%s dull.", Yobjnam2(otmp, "get"));
if (otmp->unpaid) {
struct monst *shkp = shop_keeper(*u.ushops);
if (shkp) {
Levitation ? "here" : "there");
return 0;
} else if (is_lava(u.ux, u.uy)) {
- pline("Doing that would probably melt your %s.",
- xname(pick));
+ pline("Doing that would probably melt %s.", yname(pick));
return 0;
} else if (is_pool(u.ux, u.uy) && !Underwater) {
pline_The("water has no lock.");
#ifdef TOURIST
else if (picktyp == CREDIT_CARD && !otmp->olocked) {
/* credit cards are only good for unlocking */
- You_cant("do that with %s.", doname(pick));
+ You_cant("do that with %s.",
+ an(simple_typename(picktyp)));
return 0;
}
#endif
if(c == 'n') continue;
if(picktyp)
- You("force your %s into a crack and pry.", xname(uwep));
+ You("force %s into a crack and pry.", yname(uwep));
else
- You("start bashing it with your %s.", xname(uwep));
+ You("start bashing it with %s.", yname(uwep));
xlock.box = otmp;
xlock.chance = objects[uwep->otyp].oc_wldam * 2;
xlock.picktyp = picktyp;
if (obj->greased && !rn2(2)) obj->greased = 0;
} else {
if (cansee(mdef->mx, mdef->my)) {
- pline("%s %s%s!", s_suffix(Monnam(magr)),
- aobjnam(obj, (is_acid ? "corrode" : "rust")),
+ pline("%s%s!",
+ Yobjnam2(obj, (is_acid ? "corrode" : "rust")),
(is_acid ? obj->oeroded2 : obj->oeroded)
? " further" : "");
}
struct obj *obj = some_armor(&youmonst);
if (drain_item(obj)) {
- Your("%s less effective.", aobjnam(obj, "seem"));
+ pline("%s less effective.", Yobjnam2(obj, "seem"));
}
}
break;
if (obj->greased && !rn2(2)) obj->greased = 0;
} else {
if (vis)
- pline("%s %s%s!",
- s_suffix(Monnam(mon)),
- aobjnam(obj, (is_acid ? "corrode" : "rust")),
+ pline("%s%s!",
+ Yobjnam2(obj, (is_acid ? "corrode" : "rust")),
(is_acid ? obj->oeroded2 : obj->oeroded)
? " further" : "");
if (is_acid) obj->oeroded2++;
xname(ring), simple_typename(ring->otyp), "ring"));
makeknown(RIN_ADORNMENT);
if (yn(qbuf) == 'n') continue;
- } else pline("%s decides she'd like your %s, and takes it.",
- Blind ? "She" : Monnam(mon), xname(ring));
+ } else pline("%s decides she'd like %s, and takes it.",
+ Blind ? "She" : Monnam(mon), yname(ring));
makeknown(RIN_ADORNMENT);
if (ring==uleft || ring==uright) Ring_gone(ring);
if (ring==uwep) setuwep((struct obj *)0);
freeinv(ring);
(void) mpickobj(mon,ring);
} else {
- char buf[BUFSZ];
-
if (uleft && uright && uleft->otyp == RIN_ADORNMENT
&& uright->otyp==RIN_ADORNMENT)
break;
makeknown(RIN_ADORNMENT);
if (yn(qbuf) == 'n') continue;
} else {
- pline("%s decides you'd look prettier wearing your %s,",
- Blind ? "He" : Monnam(mon), xname(ring));
+ pline("%s decides you'd look prettier wearing %s,",
+ Blind ? "He" : Monnam(mon), yname(ring));
pline("and puts it on your finger.");
}
makeknown(RIN_ADORNMENT);
Blind ? "He" : Monnam(mon), the(xname(ring)), body_part(HAND));
setworn(ring, LEFT_RING);
} else if (uright && uright->otyp != RIN_ADORNMENT) {
- Strcpy(buf, xname(uright));
- pline("%s replaces your %s with your %s.",
- Blind ? "He" : Monnam(mon), buf, xname(ring));
+ pline("%s replaces %s with %s.",
+ Blind ? "He" : Monnam(mon), yname(uright), yname(ring));
Ring_gone(uright);
setworn(ring, RIGHT_RING);
} else if (uleft && uleft->otyp != RIN_ADORNMENT) {
- Strcpy(buf, xname(uleft));
- pline("%s replaces your %s with your %s.",
- Blind ? "He" : Monnam(mon), buf, xname(ring));
+ pline("%s replaces %s with %s.",
+ Blind ? "He" : Monnam(mon), yname(uleft), yname(ring));
Ring_gone(uleft);
setworn(ring, LEFT_RING);
} else impossible("ring replacement");
if (warnlevel == 100) {
if(!Blind && uwep &&
(warnlevel > lastwarnlev || moves > lastwarntime + warnDelay)) {
- Your("%s %s!", aobjnam(uwep, "glow"),
- hcolor(NH_LIGHT_BLUE));
+ pline("%s %s!", Yobjnam2(uwep, "glow"), hcolor(NH_LIGHT_BLUE));
lastwarnlev = warnlevel;
lastwarntime = moves;
}
pline("Fortunately, you are wearing a hard helmet.");
if (dmg > 2) dmg = 2;
} else if (flags.verbose) {
- Your("%s does not protect you.",
- xname(uarmh));
+ pline("%s does not protect you.",
+ Yname2(uarmh));
}
}
} else
return(bp);
}
+/* combine yname and aobjnam eg "your count cxname(otmp)" */
+char *
+yobjnam(obj,verb)
+struct obj *obj;
+const char *verb;
+{
+ char *s = aobjnam(obj, verb);
+
+ /* leave off "your" for most of your artifacts, but prepend
+ * "your" for unique objects and "foo of bar" quest artifacts */
+ if (!carried(obj) || !obj_is_pname(obj) ||
+ obj->oartifact >= ART_ORB_OF_DETECTION) {
+ char *outbuf = shk_your(nextobuf(), obj);
+ int space_left = BUFSZ - 1 - strlen(outbuf);
+
+ s = strncat(outbuf, s, space_left);
+ }
+
+ return s;
+}
+
+/* combine Yname2 and aobjnam eg "Your count cxname(otmp)" */
+char *
+Yobjnam2(obj,verb)
+struct obj *obj;
+const char *verb;
+{
+ register char *s = yobjnam(obj,verb);
+
+ *s = highc(*s);
+ return(s);
+}
+
/* like aobjnam, but prepend "The", not count, and use xname */
char *
Tobjnam(otmp, verb)
return(s);
}
-/* returns "your xname(obj)" or "Foobar's xname(obj)" or "the xname(obj)" */
+/* returns "[your ]xname(obj)" or "Foobar's xname(obj)" or "the xname(obj)" */
char *
yname(obj)
struct obj *obj;
{
- char *outbuf = nextobuf();
- char *s = shk_your(outbuf, obj); /* assert( s == outbuf ); */
- int space_left = BUFSZ - strlen(s) - sizeof " ";
+ char *s = cxname(obj);
+
+ /* leave off "your" for most of your artifacts, but prepend
+ * "your" for unique objects and "foo of bar" quest artifacts */
+ if (!carried(obj) || !obj_is_pname(obj) ||
+ obj->oartifact >= ART_ORB_OF_DETECTION) {
+ char *outbuf = shk_your(nextobuf(), obj);
+ int space_left = BUFSZ - 1 - strlen(outbuf);
- return strncat(strcat(s, " "), cxname(obj), space_left);
+ s = strncat(outbuf, s, space_left);
+ }
+
+ return s;
}
/* capitalized variant of yname() */
{
char *outbuf = nextobuf();
char *s = shk_your(outbuf, obj); /* assert( s == outbuf ); */
- int space_left = BUFSZ - strlen(s) - sizeof " ";
+ int space_left = BUFSZ - 1 - strlen(s);
- return strncat(strcat(s, " "), simple_typename(obj->otyp), space_left);
+ return strncat(s, simple_typename(obj->otyp), space_left);
}
/* capitalized variant of ysimple_name() */
observe_quantum_cat(box);
if (!Has_contents(box)) /* evidently a live cat came out */
/* container type of "large box" is inferred */
- pline("%s box is now empty.", Shk_Your(yourbuf, box));
+ pline("%sbox is now empty.", Shk_Your(yourbuf, box));
else /* holds cat corpse or other random stuff */
empty_it = TRUE;
} else if (!Has_contents(box)) {
if (has_horns(youmonst.data)) {
if ((otmp = uarmh) != 0) {
if (is_flimsy(otmp) && !donning(otmp)) {
- char hornbuf[BUFSZ], yourbuf[BUFSZ];
+ char hornbuf[BUFSZ];
/* Future possiblities: This could damage/destroy helmet */
Sprintf(hornbuf, "horn%s", plur(num_horns(youmonst.data)));
- Your("%s %s through %s %s.", hornbuf, vtense(hornbuf, "pierce"),
- shk_your(yourbuf, otmp), xname(otmp));
+ Your("%s %s through %s.",
+ hornbuf, vtense(hornbuf, "pierce"), yname(otmp));
} else {
if (donning(otmp)) cancel_don();
Your("helmet falls to the %s!", surface(u.ux, u.uy));
case SPE_INVISIBILITY:
/* spell cannot penetrate mummy wrapping */
if (BInvis && uarmc->otyp == MUMMY_WRAPPING) {
- You_feel("rather itchy under your %s.", xname(uarmc));
+ You_feel("rather itchy under %s.", yname(uarmc));
break;
}
/* FALLTHRU */
register struct obj *obj;
/* returns TRUE if something happened (potion should be used up) */
{
- char Your_buf[BUFSZ];
-
if (snuff_lit(obj)) return(TRUE);
if (obj->greased) {
grease_protect(obj,(char *)0,&youmonst);
return(FALSE);
}
- (void) Shk_Your(Your_buf, obj);
+
/* (Rusting shop goods ought to be charged for.) */
switch (obj->oclass) {
case WEAPON_CLASS:
if (!obj->oerodeproof && is_rustprone(obj) &&
(obj->oeroded < MAX_ERODE) && !rn2(2)) {
- pline("%s %s some%s.",
- Your_buf, aobjnam(obj, "rust"),
+ pline("%s some%s.",
+ Yobjnam2(obj, "rust"),
obj->oeroded ? " more" : "what");
obj->oeroded++;
update_inventory();
update_inventory();
return (TRUE);
}
- pline("%s %s%s.", Your_buf, aobjnam(obj,"dilute"),
+ pline("%s%s.", Yobjnam2(obj,"dilute"),
obj->odiluted ? " further" : "");
if(obj->unpaid && costly_spot(u.ux, u.uy)) {
You("dilute it, you pay for it.");
return TRUE;
}
}
- pline("%s %s wet.", Your_buf, aobjnam(obj,"get"));
+ pline("%s wet.", Yobjnam2(obj, "get"));
return FALSE;
}
uchar here;
char allowall[2];
short mixture;
- char qbuf[QBUFSZ], Your_buf[BUFSZ];
+ char qbuf[QBUFSZ];
allowall[0] = ALL_CLASSES; allowall[1] = '\0';
if(!(obj = getobj(allowall, "dip")))
potion->in_use = TRUE; /* assume it will be used up */
if(potion->otyp == POT_WATER) {
boolean useeit = !Blind;
- if (useeit) (void) Shk_Your(Your_buf, obj);
if (potion->blessed) {
if (obj->cursed) {
if (useeit)
- pline("%s %s %s.",
- Your_buf,
- aobjnam(obj, "softly glow"),
+ pline("%s %s.",
+ Yobjnam2(obj, "softly glow"),
hcolor(NH_AMBER));
uncurse(obj);
obj->bknown=1;
} else if(!obj->blessed) {
if (useeit) {
tmp = hcolor(NH_LIGHT_BLUE);
- pline("%s %s with a%s %s aura.",
- Your_buf,
- aobjnam(obj, "softly glow"),
+ pline("%s with a%s %s aura.",
+ Yobjnam2(obj, "softly glow"),
index(vowels, *tmp) ? "n" : "", tmp);
}
bless(obj);
} else if (potion->cursed) {
if (obj->blessed) {
if (useeit)
- pline("%s %s %s.",
- Your_buf,
- aobjnam(obj, "glow"),
+ pline("%s %s.",
+ Yobjnam2(obj, "glow"),
hcolor((const char *)"brown"));
unbless(obj);
obj->bknown=1;
} else if(!obj->cursed) {
if (useeit) {
tmp = hcolor(NH_BLACK);
- pline("%s %s with a%s %s aura.",
- Your_buf,
- aobjnam(obj, "glow"),
+ pline("%s with a%s %s aura.",
+ Yobjnam2(obj, "glow"),
index(vowels, *tmp) ? "n" : "", tmp);
}
curse(obj);
reason[0] = '\0';
if (mtmp) Sprintf(reason, " from %s heat",
- (mtmp == &youmonst) ? (const char *)"your" :
+ (mtmp == &youmonst) ? the_your[1] :
(const char *)s_suffix(mon_nam(mtmp)));
if (mon == &youmonst) {
int i;
struct obj *otmp = 0;
const char *what = (const char *)0;
- static NEARDATA const char leftglow[] = "left ring softly glows",
- rightglow[] = "right ring softly glows";
+ static NEARDATA const char leftglow[] = "Your left ring softly glows",
+ rightglow[] = "Your right ring softly glows";
switch (trouble) {
case TROUBLE_STONED:
}
uncurse(otmp);
if (!Blind) {
- Your("%s %s.", what ? what :
- (const char *)aobjnam(otmp, "softly glow"),
- hcolor(NH_AMBER));
+ pline("%s %s.", what ? what :
+ (const char *)Yobjnam2(otmp, "softly glow"),
+ hcolor(NH_AMBER));
otmp->bknown = TRUE;
}
update_inventory();
otmp = which_armor(u.usteed, W_SADDLE);
uncurse(otmp);
if (!Blind) {
- pline("%s %s %s.",
- s_suffix(upstart(y_monnam(u.usteed))),
- aobjnam(otmp, "softly glow"),
+ pline("%s %s.", Yobjnam2(otmp, "softly glow"),
hcolor(NH_AMBER));
otmp->bknown = TRUE;
}
uncurse(uwep);
uwep->bknown = TRUE;
if (!Blind)
- Your("%s %s%s.", aobjnam(uwep, "softly glow"),
- hcolor(NH_AMBER), repair_buf);
- else You_feel("the power of %s over your %s.",
- u_gname(), xname(uwep));
+ pline("%s %s%s.", Yobjnam2(uwep, "softly glow"),
+ hcolor(NH_AMBER), repair_buf);
+ else You_feel("the power of %s over %s.",
+ u_gname(), yname(uwep));
*repair_buf = '\0';
} else if (!uwep->blessed) {
bless(uwep);
uwep->bknown = TRUE;
if (!Blind)
- Your("%s with %s aura%s.",
- aobjnam(uwep, "softly glow"),
- an(hcolor(NH_LIGHT_BLUE)), repair_buf);
- else You_feel("the blessing of %s over your %s.",
- u_gname(), xname(uwep));
+ pline("%s with %s aura%s.",
+ Yobjnam2(uwep, "softly glow"),
+ an(hcolor(NH_LIGHT_BLUE)), repair_buf);
+ else You_feel("the blessing of %s over %s.",
+ u_gname(), yname(uwep));
*repair_buf = '\0';
}
/* only give this message if we didn't just bless
or uncurse (which has already given a message) */
if (*repair_buf)
- Your("%s as good as new!",
- aobjnam(uwep, Blind ? "feel" : "look"));
+ pline("%s as good as new!",
+ Yobjnam2(uwep, Blind ? "feel" : "look"));
}
update_inventory();
}
if (otmp->cursed) {
uncurse(otmp);
if (!Blind) {
- Your("%s %s.", aobjnam(otmp, "softly glow"),
- hcolor(NH_AMBER));
+ pline("%s %s.", Yobjnam2(otmp, "softly glow"),
+ hcolor(NH_AMBER));
otmp->bknown = TRUE;
++any;
}
}
return(1);
}
+
STATIC_OVL void
stripspe(obj)
register struct obj *obj;
{
if (obj->blessed) pline(nothing_happens);
else {
- if (obj->spe > 0) {
- obj->spe = 0;
- if (obj->otyp == OIL_LAMP || obj->otyp == BRASS_LANTERN)
- obj->age = 0;
- Your("%s %s briefly.",xname(obj), otense(obj, "vibrate"));
- } else pline(nothing_happens);
+ if (obj->spe > 0) {
+ obj->spe = 0;
+ if (obj->otyp == OIL_LAMP || obj->otyp == BRASS_LANTERN)
+ obj->age = 0;
+ pline("%s briefly.", Yobjnam2(obj, "vibrate"));
+ } else pline(nothing_happens);
}
}
+
STATIC_OVL void
p_glow1(otmp)
register struct obj *otmp;
{
- Your("%s %s briefly.", xname(otmp),
- otense(otmp, Blind ? "vibrate" : "glow"));
+ pline("%s briefly.", Yobjnam2(otmp, Blind ? "vibrate" : "glow"));
}
+
STATIC_OVL void
p_glow2(otmp,color)
register struct obj *otmp;
register const char *color;
{
- Your("%s %s%s%s for a moment.",
- xname(otmp),
- otense(otmp, Blind ? "vibrate" : "glow"),
+ pline("%s%s%s for a moment.",
+ Yobjnam2(otmp, Blind ? "vibrate" : "glow"),
Blind ? "" : " ",
Blind ? nul : hcolor(color));
}
/* destruction depends on current state, not adjustment */
if (obj->spe > rn2(7) || obj->spe <= -5) {
- Your("%s %s momentarily, then %s!",
- xname(obj), otense(obj,"pulsate"), otense(obj,"explode"));
+ pline("%s momentarily, then %s!",
+ Yobjnam2(obj, "pulsate"), otense(obj,"explode"));
if (is_on) Ring_gone(obj);
s = rnd(3 * abs(obj->spe)); /* amount of damage */
useup(obj);
} else {
long mask = is_on ? (obj == uleft ? LEFT_RING :
RIGHT_RING) : 0L;
- Your("%s spins %sclockwise for a moment.",
- xname(obj), s < 0 ? "counter" : "");
+ pline("%s spins %sclockwise for a moment.",
+ Yname2(obj), s < 0 ? "counter" : "");
/* cause attributes and/or properties to be updated */
if (is_on) Ring_off(obj);
obj->spe += s; /* update the ring while it's off */
otmp->oerodeproof = !(sobj->cursed);
if(Blind) {
otmp->rknown = FALSE;
- Your("%s %s warm for a moment.",
- xname(otmp), otense(otmp, "feel"));
+ pline("%s warm for a moment.",
+ Yobjnam2(otmp, "feel"));
} else {
otmp->rknown = TRUE;
- Your("%s %s covered by a %s %s %s!",
- xname(otmp), otense(otmp, "are"),
+ pline("%s covered by a %s %s %s!",
+ Yobjnam2(otmp, "are"),
sobj->cursed ? "mottled" : "shimmering",
hcolor(sobj->cursed ? NH_BLACK : NH_GOLDEN),
sobj->cursed ? "glow" :
if (otmp->oerodeproof &&
(otmp->oeroded || otmp->oeroded2)) {
otmp->oeroded = otmp->oeroded2 = 0;
- Your("%s %s as good as new!",
- xname(otmp),
- otense(otmp, Blind ? "feel" : "look"));
+ pline("%s as good as new!",
+ Yobjnam2(otmp, Blind ? "feel" : "look"));
}
break;
}
/* 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 %s.",
- xname(otmp),
+ pline("%s violently %s%s%s for a while, then %s.",
+ Yname2(otmp),
otense(otmp, Blind ? "vibrate" : "glow"),
(!Blind && !same_color) ? " " : nul,
(Blind || same_color) ? nul :
if (s >= 0 && otmp->otyp >= GRAY_DRAGON_SCALES &&
otmp->otyp <= YELLOW_DRAGON_SCALES) {
/* dragon scales get turned into dragon scale mail */
- Your("%s merges and hardens!", xname(otmp));
+ pline("%s merges and hardens!", Yname2(otmp));
setworn((struct obj *)0, W_ARM);
/* assumes same order */
otmp->otyp = GRAY_DRAGON_SCALE_MAIL +
setworn(otmp, W_ARM);
break;
}
- Your("%s %s%s%s%s for a %s.",
- xname(otmp),
+ pline("%s %s%s%s%s for a %s.",
+ Yname2(otmp),
s == 0 ? "violently " : nul,
otense(otmp, Blind ? "vibrate" : "glow"),
(!Blind && !same_color) ? " " : nul,
if ((otmp->spe > (special_armor ? 5 : 3)) &&
(special_armor || !rn2(7)))
- Your("%s suddenly %s %s.",
- xname(otmp), otense(otmp, "vibrate"),
+ pline("%s %s.",
+ Yobjnam2(otmp, "suddenly vibrate"),
Blind ? "again" : "unexpectedly");
break;
}
} else
known = TRUE;
} else { /* armor and scroll both cursed */
- Your("%s %s.", xname(otmp), otense(otmp, "vibrate"));
+ pline("%s.", Yobjnam2(otmp, "vibrate"));
if (otmp->spe >= -6) otmp->spe--;
make_stunned(HStun + rn1(10, 10), TRUE);
}
Your("weapon feels warm for a moment.");
} else {
uwep->rknown = TRUE;
- Your("%s covered by a %s %s %s!",
- aobjnam(uwep, "are"),
+ pline("%s covered by a %s %s %s!",
+ Yobjnam2(uwep, "are"),
sobj->cursed ? "mottled" : "shimmering",
hcolor(sobj->cursed ? NH_PURPLE : NH_GOLDEN),
sobj->cursed ? "glow" : "shield");
}
if (uwep->oerodeproof && (uwep->oeroded || uwep->oeroded2)) {
uwep->oeroded = uwep->oeroded2 = 0;
- Your("%s as good as new!",
- aobjnam(uwep, Blind ? "feel" : "look"));
+ pline("%s as good as new!",
+ Yobjnam2(uwep, Blind ? "feel" : "look"));
}
} else return !chwepon(sobj,
sobj->cursed ? -1 :
pline("Fortunately, you are wearing a hard helmet.");
if (dmg > 2) dmg = 2;
} else if (flags.verbose) {
- Your("%s does not protect you.",
- xname(uarmh));
+ pline("%s does not protect you.",
+ Yname2(uarmh));
}
}
} else
register struct obj *obj;
{
obj->in_use = TRUE; /* in case losehp() is fatal */
- Your("%s vibrates violently, and explodes!",xname(obj));
+ pline("%s vibrates violently, and explodes!", Yname2(obj));
nhbell();
losehp(rnd(2*(u.uhpmax+1)/3), "exploding wand", KILLED_BY_AN);
useup(obj);
return(FALSE);
}
+/* "your " or "Foobar's " (note the trailing space) */
char *
shk_your(buf, obj)
char *buf;
struct obj *obj;
{
if (!shk_owns(buf, obj) && !mon_owns(buf, obj))
- Strcpy(buf, carried(obj) ? "your" : "the");
- return buf;
+ Strcpy(buf, the_your[carried(obj) ? 1 : 0]);
+ return strcat(buf, " ");
}
char *
(obj->unpaid ||
(obj->where==OBJ_FLOOR && !obj->no_charge && costly_spot(x,y)))) {
shkp = shop_keeper(inside_shop(x, y));
- return strcpy(buf, shkp ? s_suffix(shkname(shkp)) : "the");
+ return strcpy(buf, shkp ? s_suffix(shkname(shkp)) : the_your[0]);
}
return (char *)0;
}
struct obj *obj;
{
if (obj->where == OBJ_MINVENT)
- return strcpy(buf, s_suffix(mon_nam(obj->ocarry)));
+ return strcpy(buf, s_suffix(y_monnam(obj->ocarry)));
return (char *)0;
}
else
curse(otmp);
if (!Blind) {
- pline("%s %s %s.",
- s_suffix(upstart(y_monnam(u.usteed))),
- aobjnam(otmp, "glow"),
+ pline("%s %s.",
+ Yobjnam2(otmp, "glow"),
hcolor(otmp->cursed ? NH_BLACK : (const char *)"brown"));
otmp->bknown = TRUE;
}
if (ostuck || !can_carry(mtmp, otmp)) {
static const char * const how[] = { "steal","snatch","grab","take" };
cant_take:
- pline("%s tries to %s your %s but gives up.",
+ pline("%s tries to %s %s%s but gives up.",
Monnam(mtmp), how[rn2(SIZE(how))],
+ (otmp->owornmask & W_ARMOR) ? "your " : "",
(otmp->owornmask & W_ARMOR) ? equipname(otmp) :
- cxname(otmp));
+ yname(otmp));
/* the fewer items you have, the less likely the thief
is going to stick around to try again (0) instead of
running away (1) */
/* only interested in INVENT, FLOOR, and MINVENT */
if (get_obj_location(obj, &x, &y, 0)) {
canseeit = !Blind && cansee(x, y);
- /* set up `whose[]' to be "Your" or "Fred's" or "The goblin's" */
+ /* set `whose[]' to be "Your " or "Fred's " or "The goblin's " */
(void) Shk_Your(whose, obj);
} else {
canseeit = FALSE;
switch (obj->where) {
case OBJ_INVENT:
case OBJ_MINVENT:
- pline("%s potion of oil has burnt away.",
+ pline("%spotion of oil has burnt away.",
whose);
break;
case OBJ_FLOOR:
switch (obj->where) {
case OBJ_INVENT:
case OBJ_MINVENT:
- pline("%s %s seems about to go out.",
- whose, xname(obj));
+ pline("%s seems about to go out.",
+ Yname2(obj));
break;
case OBJ_FLOOR:
You("see %s about to go out.",
case OBJ_INVENT:
case OBJ_MINVENT:
if (obj->otyp == BRASS_LANTERN)
- pline("%s lantern has run out of power.",
+ pline("%slantern has run out of power.",
whose);
else
- pline("%s %s has gone out.",
- whose, xname(obj));
+ pline("%s has gone out.", Yname2(obj));
break;
case OBJ_FLOOR:
if (obj->otyp == BRASS_LANTERN)
switch (obj->where) {
case OBJ_INVENT:
case OBJ_MINVENT:
- pline("%s %scandle%s getting short.",
+ pline("%s%scandle%s getting short.",
whose,
menorah ? "candelabrum's " : "",
many ? "s are" : " is");
case OBJ_INVENT:
case OBJ_MINVENT:
pline(
- "%s %scandle%s flame%s flicker%s low!",
+ "%s%scandle%s flame%s flicker%s low!",
whose,
menorah ? "candelabrum's " : "",
many ? "s'" : "'s",
switch (obj->where) {
case OBJ_INVENT:
case OBJ_MINVENT:
- pline("%s candelabrum's flame%s.",
- whose,
- many ? "s die" : " dies");
+ pline("%scandelabrum's flame%s.",
+ whose, many ? "s die" : " dies");
break;
case OBJ_FLOOR:
You("see a candelabrum's flame%s die.",
switch (obj->where) {
case OBJ_INVENT:
case OBJ_MINVENT:
- pline("%s %s %s consumed!",
- whose,
- xname(obj),
+ pline("%s %s consumed!",
+ Yname2(obj),
many ? "are" : "is");
break;
case OBJ_FLOOR:
else if (vismon)
pline("%s's %s %s %s", Monnam(victim),
ostr, vtense(ostr, "are"), txt);
- } else {
- if (victim == &youmonst)
- Your("%s %s",aobjnam(otmp,"are"), txt);
- else if (vismon)
- pline("%s's %s %s", Monnam(victim), aobjnam(otmp,"are"), txt);
+ } else if ((victim == &youmonst) || vismon) {
+ pline("%s %s", Yobjnam2(otmp, "are"), txt);
}
if (!rn2(2)) {
otmp->greased = 0;
pline("Fortunately, you are wearing a hard helmet.");
dmg = 2;
} else if (flags.verbose) {
- Your("%s does not protect you.", xname(uarmh));
+ pline("%s does not protect you.", Yname2(uarmh));
}
}
if(is_organic(obj) && !obj->oerodeproof) {
if(obj->owornmask) {
if (usurvive)
- Your("%s into flame!", aobjnam(obj, "burst"));
+ pline("%s into flame!", Yobjnam2(obj, "burst"));
if(obj == uarm) (void) Armor_gone();
else if(obj == uarmc) (void) Cloak_off();
if(uarmf && !uarmf->oerodeproof && is_organic(uarmf)) {
/* save uarmf value because Boots_off() sets uarmf to null */
obj = uarmf;
- Your("%s bursts into flame!", xname(obj));
+ pline("%s into flame!", Yobjnam2(obj, "burst"));
(void) Boots_off();
useup(obj);
}
unweapon = FALSE;
if(flags.verbose) {
if(uwep)
- You("begin bashing monsters with your %s.",
- aobjnam(uwep, (char *)0));
+ You("begin bashing monsters with %s.",
+ yobjnam(uwep, (char *)0));
else if (!cantwield(youmonst.data))
You("begin %sing monsters with your %s %s.",
Role_if(PM_MONK) ? "strik" : "bash",
rnl(4) == 4-1) {
boolean more_than_1 = (obj->quan > 1L);
- pline("As you hit %s, %s%s %s breaks into splinters.",
+ pline("As you hit %s, %s%s breaks into splinters.",
mon_nam(mon), more_than_1 ? "one of " : "",
- shk_your(yourbuf, obj), xname(obj));
+ yname(obj));
if (!more_than_1) uwepgone(); /* set unweapon */
useup(obj);
if (!more_than_1) obj = (struct obj *) 0;
setmnotwielded(mon,monwep);
MON_NOWEP(mon);
mon->weapon_check = NEED_WEAPON;
- pline("%s %s %s from the force of your blow!",
- s_suffix(Monnam(mon)), xname(monwep),
- otense(monwep, "shatter"));
+ pline("%s from the force of your blow!",
+ Yobjnam2(monwep, "shatter"));
m_useup(mon, monwep);
/* If someone just shattered MY weapon, I'd flee! */
if (rn2(4)) {
break;
case MIRROR:
if (breaktest(obj)) {
- You("break %s mirror. That's bad luck!",
+ You("break %smirror. That's bad luck!",
shk_your(yourbuf, obj));
change_luck(-2);
useup(obj);
break;
#ifdef TOURIST
case EXPENSIVE_CAMERA:
- You("succeed in destroying %s camera. Congratulations!",
+ You("succeed in destroying %scamera. Congratulations!",
shk_your(yourbuf, obj));
useup(obj);
return(TRUE);
}
if (obj && !rn2(nopoison)) {
obj->opoisoned = FALSE;
- Your("%s %s no longer poisoned.", xname(obj),
- otense(obj, "are"));
+ pline("%s no longer poisoned.", Yobjnam2(obj, "are"));
}
if (resists_poison(mon))
needpoismsg = TRUE;
You("joust %s%s",
mon_nam(mon), canseemon(mon) ? exclam(tmp) : ".");
if (jousting < 0) {
- Your("%s shatters on impact!", xname(obj));
+ pline("%s shatters on impact!", Yname2(obj));
/* (must be either primary or secondary weapon to get here) */
u.twoweap = FALSE; /* untwoweapon() is too verbose here */
if (obj == uwep) uwepgone(); /* set unweapon */
if (!mon->mcan) {
if (drain_item(obj) && carried(obj) &&
(obj->known || obj->oclass == ARMOR_CLASS)) {
- Your("%s less effective.", aobjnam(obj, "seem"));
+ pline("%s less effective.", Yobjnam2(obj, "seem"));
}
break;
}
} else {
pline("%s tries to wield %s.", Monnam(mon),
doname(obj));
- pline("%s %s %s!",
- s_suffix(Monnam(mon)),
- xname(mw_tmp), welded_buf);
+ pline("%s %s!", yname(mw_tmp), welded_buf);
}
mw_tmp->bknown = 1;
}
strstri(what, "s of ") != 0);
if (obj->owornmask & (W_ARMOR|W_RING|W_AMUL|W_TOOL)) {
- char yourbuf[BUFSZ];
-
- You_cant("%s %s %s while wearing %s.",
- verb, shk_your(yourbuf, obj), what,
- more_than_1 ? "them" : "it");
+ You_cant("%s %s while wearing %s.",
+ verb, yname(obj), more_than_1 ? "them" : "it");
return FALSE;
}
if (welded(uwep)) {
} else if (uarms)
You_cant("use two weapons while wearing a shield.");
else if (uswapwep->oartifact)
- pline("%s %s being held second to another weapon!",
- Yname2(uswapwep), otense(uswapwep, "resist"));
+ pline("%s being held second to another weapon!",
+ Yobjnam2(uswapwep, "resist"));
else if (!uarmg && !Stone_resistance && (uswapwep->otyp == CORPSE &&
touch_petrifies(&mons[uswapwep->corpsenm]))) {
char kbuf[BUFSZ];
/* Avoid trashing makeplural's static buffer */
Strcpy(str, makeplural(body_part(HAND)));
- Your("%s from your %s!", aobjnam(obj, "slip"), str);
+ pline("%s from your %s!", Yobjnam2(obj, "slip"), str);
dropx(obj);
}
)
{
if (!Blind) {
- if (victim == &youmonst)
- Your("%s.", aobjnam(target, "fade"));
- else if (vismon)
- pline("%s's %s.", Monnam(victim),
- aobjnam(target, "fade"));
- else if (visobj)
- pline_The("%s.", aobjnam(target, "fade"));
+ if ((victim == &youmonst) || vismon || visobj)
+ pline("%s.", Yobjnam2(target, "fade"));
}
target->otyp = SCR_BLANK_PAPER;
target->spe = 0;
} else if (target->oerodeproof ||
(acid_dmg ? !is_corrodeable(target) : !is_rustprone(target))) {
if (flags.verbose || !(target->oerodeproof && target->rknown)) {
- if (victim == &youmonst)
- Your("%s not affected.", aobjnam(target, "are"));
- else if (vismon)
- pline("%s's %s not affected.", Monnam(victim),
- aobjnam(target, "are"));
+ if ((victim == &youmonst) || vismon)
+ pline("%s not affected.", Yobjnam2(target, "are"));
/* no message if not carried */
}
if (target->oerodeproof) target->rknown = TRUE;
} else if (erosion < MAX_ERODE) {
- if (victim == &youmonst)
- Your("%s%s!", aobjnam(target, acid_dmg ? "corrode" : "rust"),
- erosion+1 == MAX_ERODE ? " completely" :
- erosion ? " further" : "");
- else if (vismon)
- pline("%s's %s%s!", Monnam(victim),
- aobjnam(target, acid_dmg ? "corrode" : "rust"),
- erosion+1 == MAX_ERODE ? " completely" :
- erosion ? " further" : "");
- else if (visobj)
- pline_The("%s%s!",
- aobjnam(target, acid_dmg ? "corrode" : "rust"),
+ if ((victim == &youmonst) || vismon || visobj)
+ pline("%s%s!", Yobjnam2(target, acid_dmg ? "corrode" : "rust"),
erosion+1 == MAX_ERODE ? " completely" :
erosion ? " further" : "");
if (acid_dmg)
} else {
if (flags.verbose) {
if (victim == &youmonst)
- Your("%s completely %s.",
- aobjnam(target, Blind ? "feel" : "look"),
- acid_dmg ? "corroded" : "rusty");
- else if (vismon)
- pline("%s's %s completely %s.", Monnam(victim),
- aobjnam(target, "look"),
+ pline("%s completely %s.",
+ Yobjnam2(target, Blind ? "feel" : "look"),
acid_dmg ? "corroded" : "rusty");
- else if (visobj)
- pline_The("%s completely %s.",
- aobjnam(target, "look"),
+ else if (vismon || visobj)
+ pline("%s completely %s.",
+ Yobjnam2(target, "look"),
acid_dmg ? "corroded" : "rusty");
}
}
if (amount < 0 && uwep->oartifact && restrict_name(uwep, ONAME(uwep))) {
if (!Blind)
- Your("%s %s.", aobjnam(uwep, "faintly glow"), color);
+ pline("%s %s.", Yobjnam2(uwep, "faintly glow"), color);
return(1);
}
/* there is a (soft) upper and lower limit to uwep->spe */
if(((uwep->spe > 5 && amount >= 0) || (uwep->spe < -5 && amount < 0))
&& rn2(3)) {
if (!Blind)
- Your("%s %s for a while and then %s.",
- aobjnam(uwep, "violently glow"), color,
+ pline("%s %s for a while and then %s.",
+ Yobjnam2(uwep, "violently glow"), color,
otense(uwep, "evaporate"));
else
- Your("%s.", aobjnam(uwep, "evaporate"));
+ pline("%s.", Yobjnam2(uwep, "evaporate"));
useupall(uwep); /* let all of them disappear */
return(1);
}
if (!Blind) {
xtime = (amount*amount == 1) ? "moment" : "while";
- Your("%s %s for a %s.",
- aobjnam(uwep, amount == 0 ? "violently glow" : "glow"),
- color, xtime);
+ pline("%s %s for a %s.",
+ Yobjnam2(uwep, amount == 0 ? "violently glow" : "glow"),
+ color, xtime);
if (otyp != STRANGE_OBJECT && uwep->known &&
(amount > 0 || (amount < 0 && otmp->bknown)))
makeknown(otyp);
/* elven weapons vibrate warningly when enchanted beyond a limit */
if ((uwep->spe > 5)
&& (is_elven_weapon(uwep) || uwep->oartifact || !rn2(7)))
- Your("%s unexpectedly.",
- aobjnam(uwep, "suddenly vibrate"));
+ pline("%s unexpectedly.", Yobjnam2(uwep, "suddenly vibrate"));
return(1);
}
long savewornmask;
savewornmask = obj->owornmask;
- Your("%s %s welded to your %s!",
- xname(obj), otense(obj, "are"),
+ pline("%s welded to your %s!",
+ Yobjnam2(obj, "are"),
bimanual(obj) ? (const char *)makeplural(body_part(HAND))
: body_part(HAND));
obj->owornmask = savewornmask;
if (BInvis && uarmc->otyp == MUMMY_WRAPPING) {
/* A mummy wrapping absorbs it and protects you */
- You_feel("rather itchy under your %s.", xname(uarmc));
+ You_feel("rather itchy under %s.", yname(uarmc));
break;
}
if (ordinary || !rn2(10)) { /* permanent */
if(!rn2(3)) cnt++;
if(!cnt) continue;
- if (vis) pline("%s %s %s!",
- s_suffix(Monnam(mtmp)), xname(obj),
+ if (vis) pline("%s %s!", yname(obj),
(cnt > 1L) ? destroy_strings[dindx*3 + 1]
: destroy_strings[dindx*3]);
for(i = 0; i < cnt; i++) m_useup(mtmp, obj);