verb agreement
add and use new APIs, Tobjnam, otense and vtense, is_plural to determine tense/form of verbs and a few pronouns as well
This commit is contained in:
+5
-2
@@ -1309,13 +1309,16 @@ E char *FDECL(xname, (struct obj *));
|
|||||||
E char *FDECL(mshot_xname, (struct obj *));
|
E char *FDECL(mshot_xname, (struct obj *));
|
||||||
E char *FDECL(doname, (struct obj *));
|
E char *FDECL(doname, (struct obj *));
|
||||||
E boolean FDECL(not_fully_identified, (struct obj *));
|
E boolean FDECL(not_fully_identified, (struct obj *));
|
||||||
E const char *FDECL(corpse_xname, (struct obj *,BOOLEAN_P));
|
E char *FDECL(corpse_xname, (struct obj *,BOOLEAN_P));
|
||||||
E const char *FDECL(singular, (struct obj *,char *(*)(OBJ_P)));
|
E const char *FDECL(singular, (struct obj *,char *(*)(OBJ_P)));
|
||||||
E char *FDECL(an, (const char *));
|
E char *FDECL(an, (const char *));
|
||||||
E char *FDECL(An, (const char *));
|
E char *FDECL(An, (const char *));
|
||||||
E char *FDECL(The, (const char *));
|
E char *FDECL(The, (const char *));
|
||||||
E char *FDECL(the, (const char *));
|
E char *FDECL(the, (const char *));
|
||||||
E char *FDECL(aobjnam, (struct obj *,const char *));
|
E char *FDECL(aobjnam, (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 *));
|
||||||
E char *FDECL(Doname2, (struct obj *));
|
E char *FDECL(Doname2, (struct obj *));
|
||||||
E char *FDECL(yname, (struct obj *));
|
E char *FDECL(yname, (struct obj *));
|
||||||
E char *FDECL(Yname2, (struct obj *));
|
E char *FDECL(Yname2, (struct obj *));
|
||||||
@@ -1927,7 +1930,7 @@ E coord *FDECL(gettrack, (int,int));
|
|||||||
|
|
||||||
E boolean FDECL(burnarmor,(struct monst *));
|
E boolean FDECL(burnarmor,(struct monst *));
|
||||||
E boolean FDECL(rust_dmg, (struct obj *,const char *,int,BOOLEAN_P,struct monst *));
|
E boolean FDECL(rust_dmg, (struct obj *,const char *,int,BOOLEAN_P,struct monst *));
|
||||||
E void FDECL(grease_protect, (struct obj *,const char *,BOOLEAN_P,struct monst *));
|
E void FDECL(grease_protect, (struct obj *,const char *,struct monst *));
|
||||||
E struct trap *FDECL(maketrap, (int,int,int));
|
E struct trap *FDECL(maketrap, (int,int,int));
|
||||||
E void FDECL(fall_through, (BOOLEAN_P));
|
E void FDECL(fall_through, (BOOLEAN_P));
|
||||||
E struct monst *FDECL(animate_statue, (struct obj *,XCHAR_P,XCHAR_P,int,int *));
|
E struct monst *FDECL(animate_statue, (struct obj *,XCHAR_P,XCHAR_P,int,int *));
|
||||||
|
|||||||
@@ -222,6 +222,10 @@ struct obj {
|
|||||||
(obj)->otyp == FLINT || \
|
(obj)->otyp == FLINT || \
|
||||||
(obj)->otyp == TOUCHSTONE)
|
(obj)->otyp == TOUCHSTONE)
|
||||||
|
|
||||||
|
/* helpers, simple enough to be macros */
|
||||||
|
#define is_plural(o) ((o)->quan > 1 || \
|
||||||
|
(o)->oartifact == ART_EYES_OF_THE_OVERWORLD)
|
||||||
|
|
||||||
/* Flags for get_obj_location(). */
|
/* Flags for get_obj_location(). */
|
||||||
#define CONTAINED_TOO 0x1
|
#define CONTAINED_TOO 0x1
|
||||||
#define BURIED_TOO 0x2
|
#define BURIED_TOO 0x2
|
||||||
|
|||||||
+54
-59
@@ -773,7 +773,7 @@ register struct obj *obj;
|
|||||||
u.ux, u.uy, NO_MINVENT)) != 0) {
|
u.ux, u.uy, NO_MINVENT)) != 0) {
|
||||||
You("summon %s!", a_monnam(mtmp));
|
You("summon %s!", a_monnam(mtmp));
|
||||||
if (!obj_resists(obj, 93, 100)) {
|
if (!obj_resists(obj, 93, 100)) {
|
||||||
pline("%s has shattered!", The(xname(obj)));
|
pline("%s shattered!", Tobjnam(obj, "have"));
|
||||||
useup(obj);
|
useup(obj);
|
||||||
} else switch (rn2(3)) {
|
} else switch (rn2(3)) {
|
||||||
default:
|
default:
|
||||||
@@ -809,8 +809,8 @@ register struct obj *obj;
|
|||||||
wakem = TRUE;
|
wakem = TRUE;
|
||||||
|
|
||||||
} else if (invoking) {
|
} else if (invoking) {
|
||||||
pline("%s issues an unsettling shrill sound...",
|
pline("%s an unsettling shrill sound...",
|
||||||
The(xname(obj)));
|
Tobjnam(obj, "issue"));
|
||||||
#ifdef AMIGA
|
#ifdef AMIGA
|
||||||
amii_speaker( obj, "aefeaefeaefeaefeaefe", AMII_LOUDER_VOLUME );
|
amii_speaker( obj, "aefeaefeaefeaefeaefe", AMII_LOUDER_VOLUME );
|
||||||
#endif
|
#endif
|
||||||
@@ -858,50 +858,47 @@ STATIC_OVL void
|
|||||||
use_candelabrum(obj)
|
use_candelabrum(obj)
|
||||||
register struct obj *obj;
|
register struct obj *obj;
|
||||||
{
|
{
|
||||||
|
char *s = obj->spe != 1 ? "candles" : "candle";
|
||||||
|
|
||||||
if(Underwater) {
|
if(Underwater) {
|
||||||
You("cannot make fire under water.");
|
You("cannot make fire under water.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(obj->lamplit) {
|
if(obj->lamplit) {
|
||||||
You("snuff the candle%s.", obj->spe > 1 ? "s" : "");
|
You("snuff the %s.", s);
|
||||||
end_burn(obj, TRUE);
|
end_burn(obj, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(obj->spe <= 0) {
|
if(obj->spe <= 0) {
|
||||||
pline("This %s has no candles.", xname(obj));
|
pline("This %s has no %s.", xname(obj), s);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(u.uswallow || obj->cursed) {
|
if(u.uswallow || obj->cursed) {
|
||||||
if (!Blind)
|
if (!Blind)
|
||||||
pline_The("candle%s flicker%s for a moment, then die%s.",
|
pline_The("%s %s for a moment, then %s.",
|
||||||
obj->spe > 1 ? "s" : "",
|
s, vtense(s, "flicker"), vtense(s, "die"));
|
||||||
obj->spe > 1 ? "" : "s",
|
|
||||||
obj->spe > 1 ? "" : "s");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(obj->spe < 7) {
|
if(obj->spe < 7) {
|
||||||
There("%s only %d candle%s in %s.",
|
There("%s only %d %s in %s.",
|
||||||
obj->spe == 1 ? "is" : "are",
|
vtense(s, "are"), obj->spe, s, the(xname(obj)));
|
||||||
obj->spe,
|
|
||||||
obj->spe > 1 ? "s" : "",
|
|
||||||
the(xname(obj)));
|
|
||||||
if (!Blind)
|
if (!Blind)
|
||||||
pline("%s lit. %s shines dimly.",
|
pline("%s lit. %s dimly.",
|
||||||
obj->spe == 1 ? "It is" : "They are", The(xname(obj)));
|
obj->spe == 1 ? "It is" : "They are",
|
||||||
|
Tobjnam(obj, "shine"));
|
||||||
} else {
|
} else {
|
||||||
pline("%s's candles burn%s", The(xname(obj)),
|
pline("%s's %s burn%s", The(xname(obj)), s,
|
||||||
(Blind ? "." : " brightly!"));
|
(Blind ? "." : " brightly!"));
|
||||||
}
|
}
|
||||||
if (!invocation_pos(u.ux, u.uy)) {
|
if (!invocation_pos(u.ux, u.uy)) {
|
||||||
pline_The("candle%s being rapidly consumed!",
|
pline_The("%s %s being rapidly consumed!", s, vtense(s, "are"));
|
||||||
(obj->spe > 1 ? "s are" : " is"));
|
|
||||||
obj->age /= 2;
|
obj->age /= 2;
|
||||||
} else {
|
} else {
|
||||||
if(obj->spe == 7) {
|
if(obj->spe == 7) {
|
||||||
if (Blind)
|
if (Blind)
|
||||||
pline("%s radiates a strange warmth!", The(xname(obj)));
|
pline("%s a strange warmth!", Tobjnam(obj, "radiate"));
|
||||||
else
|
else
|
||||||
pline("%s glows with a strange light!", The(xname(obj)));
|
pline("%s with a strange light!", Tobjnam(obj, "glow"));
|
||||||
}
|
}
|
||||||
obj->known = 1;
|
obj->known = 1;
|
||||||
}
|
}
|
||||||
@@ -913,6 +910,7 @@ use_candle(obj)
|
|||||||
register struct obj *obj;
|
register struct obj *obj;
|
||||||
{
|
{
|
||||||
register struct obj *otmp;
|
register struct obj *otmp;
|
||||||
|
char *s = obj->quan != 1 ? "candles" : "candle";
|
||||||
char qbuf[QBUFSZ];
|
char qbuf[QBUFSZ];
|
||||||
|
|
||||||
if(u.uswallow) {
|
if(u.uswallow) {
|
||||||
@@ -940,16 +938,14 @@ register struct obj *obj;
|
|||||||
} else {
|
} else {
|
||||||
if ((long)otmp->spe + obj->quan > 7L)
|
if ((long)otmp->spe + obj->quan > 7L)
|
||||||
obj = splitobj(obj, 7L - (long)otmp->spe);
|
obj = splitobj(obj, 7L - (long)otmp->spe);
|
||||||
You("attach %ld%s candle%s to %s.",
|
You("attach %ld%s %s to %s.",
|
||||||
obj->quan, !otmp->spe ? "" : " more",
|
obj->quan, !otmp->spe ? "" : " more",
|
||||||
plur(obj->quan), the(xname(otmp)));
|
s, the(xname(otmp)));
|
||||||
if (!otmp->spe || otmp->age > obj->age)
|
if (!otmp->spe || otmp->age > obj->age)
|
||||||
otmp->age = obj->age;
|
otmp->age = obj->age;
|
||||||
otmp->spe += (int)obj->quan;
|
otmp->spe += (int)obj->quan;
|
||||||
if (otmp->lamplit && !obj->lamplit)
|
if (otmp->lamplit && !obj->lamplit)
|
||||||
pline_The("new candle%s magically ignite%s!",
|
pline_The("new %s magically %s!", s, vtense(s, "ignite"));
|
||||||
plur(obj->quan),
|
|
||||||
(obj->quan > 1L) ? "" : "s");
|
|
||||||
else if (!otmp->lamplit && obj->lamplit)
|
else if (!otmp->lamplit && obj->lamplit)
|
||||||
pline("%s out.", (obj->quan > 1L) ? "They go" : "It goes");
|
pline("%s out.", (obj->quan > 1L) ? "They go" : "It goes");
|
||||||
if (obj->unpaid)
|
if (obj->unpaid)
|
||||||
@@ -958,8 +954,8 @@ register struct obj *obj;
|
|||||||
(obj->quan > 1L) ? "them" : "it",
|
(obj->quan > 1L) ? "them" : "it",
|
||||||
(obj->quan > 1L) ? "them" : "it");
|
(obj->quan > 1L) ? "them" : "it");
|
||||||
if (obj->quan < 7L && otmp->spe == 7)
|
if (obj->quan < 7L && otmp->spe == 7)
|
||||||
pline("%s now has seven%s candles attached.",
|
pline("%s now has seven%s %s attached.",
|
||||||
The(xname(otmp)), otmp->lamplit ? " lit" : "");
|
The(xname(otmp)), otmp->lamplit ? " lit" : "", s);
|
||||||
/* candelabrum's light range might increase */
|
/* candelabrum's light range might increase */
|
||||||
if (otmp->lamplit) obj_merge_light_sources(otmp, otmp);
|
if (otmp->lamplit) obj_merge_light_sources(otmp, otmp);
|
||||||
/* candles are no longer a separate light source */
|
/* candles are no longer a separate light source */
|
||||||
@@ -1007,7 +1003,7 @@ struct obj *obj;
|
|||||||
obj->otyp == BRASS_LANTERN || obj->otyp == POT_OIL) {
|
obj->otyp == BRASS_LANTERN || obj->otyp == POT_OIL) {
|
||||||
(void) get_obj_location(obj, &x, &y, 0);
|
(void) get_obj_location(obj, &x, &y, 0);
|
||||||
if (obj->where == OBJ_MINVENT ? cansee(x,y) : !Blind)
|
if (obj->where == OBJ_MINVENT ? cansee(x,y) : !Blind)
|
||||||
pline("%s goes out!", Yname2(obj));
|
pline("%s %s out!", Yname2(obj), otense(obj, "go"));
|
||||||
end_burn(obj, TRUE);
|
end_burn(obj, TRUE);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@@ -1035,7 +1031,7 @@ struct obj *obj;
|
|||||||
if (!get_obj_location(obj, &x, &y, 0))
|
if (!get_obj_location(obj, &x, &y, 0))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (obj->where == OBJ_MINVENT ? cansee(x,y) : !Blind)
|
if (obj->where == OBJ_MINVENT ? cansee(x,y) : !Blind)
|
||||||
pline("%s catches light!", Yname2(obj));
|
pline("%s %s light!", Yname2(obj), otense(obj, "catch"));
|
||||||
begin_burn(obj, TRUE);
|
begin_burn(obj, TRUE);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@@ -1070,20 +1066,17 @@ struct obj *obj;
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (obj->cursed && !rn2(2)) {
|
if (obj->cursed && !rn2(2)) {
|
||||||
pline("%s flicker%s for a moment, then die%s.",
|
pline("%s for a moment, then %s.",
|
||||||
The(xname(obj)),
|
Tobjnam(obj, "flicker"), otense(obj, "die"));
|
||||||
obj->quan > 1L ? "" : "s",
|
|
||||||
obj->quan > 1L ? "" : "s");
|
|
||||||
} else {
|
} else {
|
||||||
if(obj->otyp == OIL_LAMP || obj->otyp == MAGIC_LAMP ||
|
if(obj->otyp == OIL_LAMP || obj->otyp == MAGIC_LAMP ||
|
||||||
obj->otyp == BRASS_LANTERN) {
|
obj->otyp == BRASS_LANTERN) {
|
||||||
check_unpaid(obj);
|
check_unpaid(obj);
|
||||||
pline("%s lamp is now on.", Shk_Your(buf, obj));
|
pline("%s lamp is now on.", Shk_Your(buf, obj));
|
||||||
} else { /* candle(s) */
|
} else { /* candle(s) */
|
||||||
pline("%s flame%s burn%s%s",
|
pline("%s flame%s %s%s",
|
||||||
s_suffix(Yname2(obj)),
|
s_suffix(Yname2(obj)),
|
||||||
plur(obj->quan),
|
plur(obj->quan), otense(obj, "burn"),
|
||||||
obj->quan > 1L ? "" : "s",
|
|
||||||
Blind ? "." : " brightly!");
|
Blind ? "." : " brightly!");
|
||||||
if (obj->unpaid && costly_spot(u.ux, u.uy) &&
|
if (obj->unpaid && costly_spot(u.ux, u.uy) &&
|
||||||
obj->age == 20L * (long)objects[obj->otyp].oc_cost) {
|
obj->age == 20L * (long)objects[obj->otyp].oc_cost) {
|
||||||
@@ -1725,7 +1718,7 @@ struct obj *obj;
|
|||||||
|
|
||||||
if (Glib) {
|
if (Glib) {
|
||||||
dropx(obj);
|
dropx(obj);
|
||||||
pline("%s slips from your %s.", The(xname(obj)),
|
pline("%s from your %s.", Tobjnam(obj, "slip"),
|
||||||
makeplural(body_part(FINGER)));
|
makeplural(body_part(FINGER)));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1735,7 +1728,7 @@ struct obj *obj;
|
|||||||
check_unpaid(obj);
|
check_unpaid(obj);
|
||||||
obj->spe--;
|
obj->spe--;
|
||||||
dropx(obj);
|
dropx(obj);
|
||||||
pline("%s slips from your %s.", The(xname(obj)),
|
pline("%s from your %s.", Tobjnam(obj, "slip"),
|
||||||
makeplural(body_part(FINGER)));
|
makeplural(body_part(FINGER)));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1772,8 +1765,10 @@ struct obj *obj;
|
|||||||
makeplural(body_part(FINGER)));
|
makeplural(body_part(FINGER)));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
pline("%s %s empty.", The(xname(obj)),
|
if (obj->known)
|
||||||
obj->known ? "is" : "seems to be");
|
pline("%s empty.", Tobjnam(obj, "are"));
|
||||||
|
else
|
||||||
|
pline("%s to be empty.", Tobjnam(obj, "seem"));
|
||||||
}
|
}
|
||||||
update_inventory();
|
update_inventory();
|
||||||
}
|
}
|
||||||
@@ -1837,27 +1832,27 @@ struct obj *otmp;
|
|||||||
if (material == LIQUID || material == WAX ||
|
if (material == LIQUID || material == WAX ||
|
||||||
material == CLOTH || material == WOOD) {
|
material == CLOTH || material == WOOD) {
|
||||||
switch(material) {
|
switch(material) {
|
||||||
case LIQUID:
|
case LIQUID:
|
||||||
if (!obj->known)
|
if (!obj->known)
|
||||||
You("must think this is a wetstone, do you?");
|
You("must think this is a wetstone, do you?");
|
||||||
else
|
else
|
||||||
pline("%s is a little wetter now.", The(xname(otmp)));
|
pline("%s a little wetter now.", Tobjnam(otmp, "are"));
|
||||||
break;
|
break;
|
||||||
case WAX:
|
case WAX:
|
||||||
color = "waxy";
|
color = "waxy";
|
||||||
goto see_streaks; /* okay even if not touchstone */
|
goto see_streaks; /* okay even if not touchstone */
|
||||||
break;
|
break;
|
||||||
case CLOTH:
|
case CLOTH:
|
||||||
pline_The("stone looks a little more polished now.");
|
pline_The("stone looks a little more polished now.");
|
||||||
break;
|
break;
|
||||||
case WOOD:
|
case WOOD:
|
||||||
color = "wooden";
|
color = "wooden";
|
||||||
goto see_streaks; /* okay even if not touchstone */
|
goto see_streaks; /* okay even if not touchstone */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (otmp->otyp != TOUCHSTONE) {
|
if (otmp->otyp != TOUCHSTONE) {
|
||||||
pline(ambiguous);
|
pline(ambiguous);
|
||||||
return;
|
return;
|
||||||
|
|||||||
+4
-4
@@ -513,7 +513,7 @@ touch_artifact(obj,mon)
|
|||||||
|
|
||||||
/* can pick it up unless you're totally non-synch'd with the artifact */
|
/* can pick it up unless you're totally non-synch'd with the artifact */
|
||||||
if (badclass && badalign && self_willed) {
|
if (badclass && badalign && self_willed) {
|
||||||
if (yours) pline("%s evades your grasp!", The(xname(obj)));
|
if (yours) pline("%s your grasp!", Tobjnam(obj, "evade"));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -750,7 +750,7 @@ int dieroll; /* needed for Magicbane and vorpal blades */
|
|||||||
if (attacks(AD_ELEC, otmp)) {
|
if (attacks(AD_ELEC, otmp)) {
|
||||||
if (realizes_damage) {
|
if (realizes_damage) {
|
||||||
if(youattack && otmp != uwep)
|
if(youattack && otmp != uwep)
|
||||||
pline("%s hits %s!", The(xname(otmp)), hittee);
|
pline("%s %s!", Tobjnam(otmp, "hit"), hittee);
|
||||||
pline("Lightning strikes %s!", hittee);
|
pline("Lightning strikes %s!", hittee);
|
||||||
if (!rn2(5)) (void) destroy_mitem(mdef, RING_CLASS, AD_ELEC);
|
if (!rn2(5)) (void) destroy_mitem(mdef, RING_CLASS, AD_ELEC);
|
||||||
if (!rn2(5)) (void) destroy_mitem(mdef, WAND_CLASS, AD_ELEC);
|
if (!rn2(5)) (void) destroy_mitem(mdef, WAND_CLASS, AD_ELEC);
|
||||||
@@ -760,7 +760,7 @@ int dieroll; /* needed for Magicbane and vorpal blades */
|
|||||||
if (attacks(AD_MAGM, otmp)) {
|
if (attacks(AD_MAGM, otmp)) {
|
||||||
if (realizes_damage) {
|
if (realizes_damage) {
|
||||||
if(youattack && otmp != uwep)
|
if(youattack && otmp != uwep)
|
||||||
pline("%s hits %s!", The(xname(otmp)), hittee);
|
pline("%s %s!", Tobjnam(otmp, "hit"), hittee);
|
||||||
pline("A hail of magic missiles strikes %s!", hittee);
|
pline("A hail of magic missiles strikes %s!", hittee);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@@ -1327,7 +1327,7 @@ void arti_speak(obj)
|
|||||||
line = getrumor(bcsign(obj), buf, TRUE);
|
line = getrumor(bcsign(obj), buf, TRUE);
|
||||||
if (!*line)
|
if (!*line)
|
||||||
line = "NetHack rumors file closed for renovation.";
|
line = "NetHack rumors file closed for renovation.";
|
||||||
pline("%s whispers:", The(xname(obj)));
|
pline("%s:", Tobjnam(obj, "whisper"));
|
||||||
verbalize("%s", line);
|
verbalize("%s", line);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-29
@@ -336,39 +336,14 @@ struct entity *etmp;
|
|||||||
const char *verb;
|
const char *verb;
|
||||||
{
|
{
|
||||||
static char wholebuf[80];
|
static char wholebuf[80];
|
||||||
char verbbuf[30];
|
|
||||||
|
|
||||||
Strcpy(wholebuf, is_u(etmp) ? "You" : Monnam(etmp->emon));
|
Strcpy(wholebuf, is_u(etmp) ? "You" : Monnam(etmp->emon));
|
||||||
if (!*verb)
|
if (!*verb) return(wholebuf);
|
||||||
return(wholebuf);
|
|
||||||
Strcat(wholebuf, " ");
|
Strcat(wholebuf, " ");
|
||||||
verbbuf[0] = '\0';
|
|
||||||
if (is_u(etmp))
|
if (is_u(etmp))
|
||||||
Strcpy(verbbuf, verb);
|
Strcat(wholebuf, verb);
|
||||||
else {
|
else
|
||||||
if (!strcmp(verb, "are"))
|
Strcat(wholebuf, vtense((char *)0, verb));
|
||||||
Strcpy(verbbuf, "is");
|
|
||||||
if (!strcmp(verb, "have"))
|
|
||||||
Strcpy(verbbuf, "has");
|
|
||||||
if (!verbbuf[0]) {
|
|
||||||
Strcpy(verbbuf, verb);
|
|
||||||
switch (verbbuf[strlen(verbbuf) - 1]) {
|
|
||||||
case 'y':
|
|
||||||
verbbuf[strlen(verbbuf) - 1] = '\0';
|
|
||||||
Strcat(verbbuf, "ies");
|
|
||||||
break;
|
|
||||||
case 'h':
|
|
||||||
case 'o':
|
|
||||||
case 's':
|
|
||||||
Strcat(verbbuf, "es");
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
Strcat(verbbuf, "s");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Strcat(wholebuf, verbbuf);
|
|
||||||
return(wholebuf);
|
return(wholebuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+8
-9
@@ -751,33 +751,32 @@ struct obj *obj;
|
|||||||
{
|
{
|
||||||
char ch;
|
char ch;
|
||||||
int oops;
|
int oops;
|
||||||
const char *bname = xname(obj);
|
|
||||||
|
|
||||||
if (Blind) {
|
if (Blind) {
|
||||||
pline("Too bad you can't see %s", the(bname));
|
pline("Too bad you can't see %s", the(xname(obj)));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
oops = (rnd(20) > ACURR(A_INT) || obj->cursed);
|
oops = (rnd(20) > ACURR(A_INT) || obj->cursed);
|
||||||
if (oops && (obj->spe > 0)) {
|
if (oops && (obj->spe > 0)) {
|
||||||
switch (rnd(obj->oartifact ? 4 : 5)) {
|
switch (rnd(obj->oartifact ? 4 : 5)) {
|
||||||
case 1 : pline("%s is too much to comprehend!", The(bname));
|
case 1 : pline("%s too much to comprehend!", Tobjnam(obj, "are"));
|
||||||
break;
|
break;
|
||||||
case 2 : pline("%s confuses you!", The(bname));
|
case 2 : pline("%s you!", Tobjnam(obj, "confuse"));
|
||||||
make_confused(HConfusion + rnd(100),FALSE);
|
make_confused(HConfusion + rnd(100),FALSE);
|
||||||
break;
|
break;
|
||||||
case 3 : if (!resists_blnd(&youmonst)) {
|
case 3 : if (!resists_blnd(&youmonst)) {
|
||||||
pline("%s damages your vision!", The(bname));
|
pline("%s your vision!", Tobjnam(obj, "damage"));
|
||||||
make_blinded(Blinded + rnd(100),FALSE);
|
make_blinded(Blinded + rnd(100),FALSE);
|
||||||
if (!Blind) Your(vision_clears);
|
if (!Blind) Your(vision_clears);
|
||||||
} else {
|
} else {
|
||||||
pline("%s assaults your vision.", The(bname));
|
pline("%s your vision.", Tobjnam(obj, "assault"));
|
||||||
You("are unaffected!");
|
You("are unaffected!");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 4 : pline("%s zaps your mind!", The(bname));
|
case 4 : pline("%s your mind!", Tobjnam(obj, "zap"));
|
||||||
make_hallucinated(HHallucination + rnd(100),FALSE,0L);
|
make_hallucinated(HHallucination + rnd(100),FALSE,0L);
|
||||||
break;
|
break;
|
||||||
case 5 : pline("%s explodes!", The(bname));
|
case 5 : pline("%s!", Tobjnam(obj, "explode"));
|
||||||
useup(obj);
|
useup(obj);
|
||||||
losehp(rnd(30), "exploding crystal ball", KILLED_BY_AN);
|
losehp(rnd(30), "exploding crystal ball", KILLED_BY_AN);
|
||||||
break;
|
break;
|
||||||
@@ -820,7 +819,7 @@ struct obj *obj;
|
|||||||
if (flags.verbose) pline(Never_mind);
|
if (flags.verbose) pline(Never_mind);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
You("peer into %s...", the(bname));
|
You("peer into %s...", the(xname(obj)));
|
||||||
nomul(-rnd(10));
|
nomul(-rnd(10));
|
||||||
nomovemsg = "";
|
nomovemsg = "";
|
||||||
if (obj->spe <= 0)
|
if (obj->spe <= 0)
|
||||||
|
|||||||
@@ -220,29 +220,34 @@ dig()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(Fumbling && !rn2(3)) {
|
if(Fumbling && !rn2(3)) {
|
||||||
switch(rn2(3)) {
|
switch(rn2(3)) {
|
||||||
case 0: if(!welded(uwep)) {
|
case 0:
|
||||||
You("fumble and drop your %s.", xname(uwep));
|
if(!welded(uwep)) {
|
||||||
dropx(uwep);
|
You("fumble and drop your %s.", xname(uwep));
|
||||||
} else {
|
dropx(uwep);
|
||||||
|
} else {
|
||||||
#ifdef STEED
|
#ifdef STEED
|
||||||
if (u.usteed)
|
if (u.usteed)
|
||||||
Your("%s bounces and hits %s!",
|
Your("%s %s and %s %s!",
|
||||||
xname(uwep), mon_nam(u.usteed));
|
xname(uwep),
|
||||||
else
|
otense(uwep, "bounce"), otense(uwep, "hit"),
|
||||||
|
mon_nam(u.usteed));
|
||||||
|
else
|
||||||
#endif
|
#endif
|
||||||
pline("Ouch! Your %s bounces and hits you!",
|
pline("Ouch! Your %s %s and %s you!",
|
||||||
xname(uwep));
|
xname(uwep),
|
||||||
set_wounded_legs(RIGHT_SIDE, 5 + rnd(5));
|
otense(uwep, "bounce"), otense(uwep, "hit"));
|
||||||
}
|
set_wounded_legs(RIGHT_SIDE, 5 + rnd(5));
|
||||||
break;
|
|
||||||
case 1: pline("Bang! You hit with the broad side of %s!",
|
|
||||||
the(xname(uwep)));
|
|
||||||
break;
|
|
||||||
default: Your("swing misses its mark.");
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
return(0);
|
break;
|
||||||
|
case 1:
|
||||||
|
pline("Bang! You hit with the broad side of %s!",
|
||||||
|
the(xname(uwep)));
|
||||||
|
break;
|
||||||
|
default: Your("swing misses its mark.");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
digging.effort += 10 + rn2(5) + abon() +
|
digging.effort += 10 + rn2(5) + abon() +
|
||||||
@@ -863,8 +868,8 @@ struct obj *obj;
|
|||||||
seetrap(trap);
|
seetrap(trap);
|
||||||
There("is a spider web there!");
|
There("is a spider web there!");
|
||||||
}
|
}
|
||||||
Your("%s becomes entangled in the web.",
|
Your("%s entangled in the web.",
|
||||||
aobjnam(obj, (char *)0));
|
aobjnam(obj, "become"));
|
||||||
/* you ought to be able to let go; tough luck */
|
/* you ought to be able to let go; tough luck */
|
||||||
/* (maybe `move_into_trap()' would be better) */
|
/* (maybe `move_into_trap()' would be better) */
|
||||||
nomul(-d(2,2));
|
nomul(-d(2,2));
|
||||||
@@ -1343,10 +1348,12 @@ long timeout; /* unused */
|
|||||||
x = obj->ox;
|
x = obj->ox;
|
||||||
y = obj->oy;
|
y = obj->oy;
|
||||||
} else if (in_invent) {
|
} else if (in_invent) {
|
||||||
if (flags.verbose)
|
if (flags.verbose) {
|
||||||
Your("%s%s rot%s away%c",
|
char *cname = corpse_xname(obj, FALSE);
|
||||||
obj == uwep ? "wielded " : "", corpse_xname(obj, FALSE),
|
Your("%s%s %s away%c",
|
||||||
obj->quan == 1L ? "s" : "", obj == uwep ? '!' : '.');
|
obj == uwep ? "wielded " : nul, cname,
|
||||||
|
vtense(cname, "rot"), obj == uwep ? '!' : '.');
|
||||||
|
}
|
||||||
if (obj == uwep) {
|
if (obj == uwep) {
|
||||||
uwepgone(); /* now bare handed */
|
uwepgone(); /* now bare handed */
|
||||||
stop_occupation();
|
stop_occupation();
|
||||||
|
|||||||
@@ -166,7 +166,8 @@ const char *verb;
|
|||||||
if (((mtmp = m_at(x, y)) && mtmp->mtrapped) ||
|
if (((mtmp = m_at(x, y)) && mtmp->mtrapped) ||
|
||||||
(u.utrap && u.ux == x && u.uy == y)) {
|
(u.utrap && u.ux == x && u.uy == y)) {
|
||||||
if (*verb)
|
if (*verb)
|
||||||
pline_The("boulder %ss into the pit%s.", verb,
|
pline_The("boulder %s into the pit%s.",
|
||||||
|
vtense((const char *)0, verb),
|
||||||
(mtmp) ? "" : " with you");
|
(mtmp) ? "" : " with you");
|
||||||
if (mtmp) {
|
if (mtmp) {
|
||||||
if (!passes_walls(mtmp->data) &&
|
if (!passes_walls(mtmp->data) &&
|
||||||
@@ -228,14 +229,13 @@ doaltarobj(obj) /* obj is an object dropped on an altar */
|
|||||||
u.uconduct.gnostic++;
|
u.uconduct.gnostic++;
|
||||||
|
|
||||||
if (obj->blessed || obj->cursed) {
|
if (obj->blessed || obj->cursed) {
|
||||||
There("is %s flash as %s hit%s the altar.",
|
There("is %s flash as %s %s the altar.",
|
||||||
an(hcolor(obj->blessed ? amber : Black)),
|
an(hcolor(obj->blessed ? amber : Black)),
|
||||||
doname(obj),
|
doname(obj), otense(obj, "hit"));
|
||||||
(obj->quan == 1L) ? "s" : "");
|
|
||||||
if (!Hallucination) obj->bknown = 1;
|
if (!Hallucination) obj->bknown = 1;
|
||||||
} else {
|
} else {
|
||||||
pline("%s land%s on the altar.", Doname2(obj),
|
pline("%s %s on the altar.", Doname2(obj),
|
||||||
(obj->quan == 1L) ? "s" : "");
|
otense(obj, "land"));
|
||||||
obj->bknown = 1;
|
obj->bknown = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -314,8 +314,8 @@ giveback:
|
|||||||
if (otmp != uball && otmp != uchain &&
|
if (otmp != uball && otmp != uchain &&
|
||||||
!obj_resists(otmp, 1, 99)) {
|
!obj_resists(otmp, 1, 99)) {
|
||||||
if (!Blind) {
|
if (!Blind) {
|
||||||
pline("Suddenly, %s vanishes from the sink!",
|
pline("Suddenly, %s %s from the sink!",
|
||||||
doname(otmp));
|
doname(otmp), otense(otmp, "vanish"));
|
||||||
ideed = TRUE;
|
ideed = TRUE;
|
||||||
}
|
}
|
||||||
delobj(otmp);
|
delobj(otmp);
|
||||||
|
|||||||
+1
-1
@@ -296,7 +296,7 @@ register struct obj *obj;
|
|||||||
short objtyp;
|
short objtyp;
|
||||||
|
|
||||||
Sprintf(qbuf, "What do you want to name %s %s?",
|
Sprintf(qbuf, "What do you want to name %s %s?",
|
||||||
(obj->quan > 1L) ? "these" : "this", xname(obj));
|
is_plural(obj) ? "these" : "this", xname(obj));
|
||||||
getlin(qbuf, buf);
|
getlin(qbuf, buf);
|
||||||
if(!*buf || *buf == '\033') return;
|
if(!*buf || *buf == '\033') return;
|
||||||
/* strip leading and trailing spaces; unnames item if all spaces */
|
/* strip leading and trailing spaces; unnames item if all spaces */
|
||||||
|
|||||||
Reference in New Issue
Block a user