fixes entry and tweaks for PR #871 - revive corpse
Pull requet from entrez: give better feedback than "it" when hero observes a corpse reviving into a monster that can't be seen. Tweak reviving from a container which was coded as if the container was optional. That can lead to confusion when someone reads the code so make the situation more explicit. Fixes #871
This commit is contained in:
@@ -1023,6 +1023,7 @@ cannot kick while squeezed on top of a boulder
|
|||||||
room stocking would put multiple items on the same spot
|
room stocking would put multiple items on the same spot
|
||||||
splitting a stack of named, shop-owned objects while perm_invent is enabled
|
splitting a stack of named, shop-owned objects while perm_invent is enabled
|
||||||
produced impossible "unpaid_cost: object wasn't on any bill."
|
produced impossible "unpaid_cost: object wasn't on any bill."
|
||||||
|
more consistent feedback if a reviving corpse becomes an unseen monster
|
||||||
|
|
||||||
|
|
||||||
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
|
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
|
||||||
|
|||||||
@@ -1937,7 +1937,8 @@ revive_corpse(struct obj *corpse)
|
|||||||
chewed ? "bite-covered" : (const char *) 0,
|
chewed ? "bite-covered" : (const char *) 0,
|
||||||
CXN_SINGULAR));
|
CXN_SINGULAR));
|
||||||
mcarry = (where == OBJ_MINVENT) ? corpse->ocarry : 0;
|
mcarry = (where == OBJ_MINVENT) ? corpse->ocarry : 0;
|
||||||
get_obj_location(corpse, &corpsex, &corpsey, CONTAINED_TOO | BURIED_TOO);
|
(void) get_obj_location(corpse, &corpsex, &corpsey,
|
||||||
|
CONTAINED_TOO | BURIED_TOO);
|
||||||
|
|
||||||
if (where == OBJ_CONTAINED) {
|
if (where == OBJ_CONTAINED) {
|
||||||
struct monst *mtmp2;
|
struct monst *mtmp2;
|
||||||
@@ -1974,7 +1975,8 @@ revive_corpse(struct obj *corpse)
|
|||||||
if (canseemon(mtmp)) {
|
if (canseemon(mtmp)) {
|
||||||
pline("%s rises from the dead%s!",
|
pline("%s rises from the dead%s!",
|
||||||
chewed ? Adjmonnam(mtmp, "bite-covered")
|
chewed ? Adjmonnam(mtmp, "bite-covered")
|
||||||
: Monnam(mtmp), effect);
|
: Monnam(mtmp),
|
||||||
|
effect);
|
||||||
} else {
|
} else {
|
||||||
pline("%s disappears%s!", The(cname), effect);
|
pline("%s disappears%s!", The(cname), effect);
|
||||||
}
|
}
|
||||||
@@ -2000,15 +2002,15 @@ revive_corpse(struct obj *corpse)
|
|||||||
doesn't have knowledge to make here. */
|
doesn't have knowledge to make here. */
|
||||||
const char *mnam = canspotmon(mtmp) ? Amonnam(mtmp) : Something;
|
const char *mnam = canspotmon(mtmp) ? Amonnam(mtmp) : Something;
|
||||||
|
|
||||||
|
if (!container) {
|
||||||
if (container_where == OBJ_MINVENT && mcarry && canseemon(mcarry)
|
impossible("reviving corpse from non-existent container");
|
||||||
&& container) {
|
} else if (mcarry && canseemon(mcarry)) {
|
||||||
pline("%s writhes out of %s!", mnam, yname(container));
|
pline("%s writhes out of %s!", mnam, yname(container));
|
||||||
} else if (container_where == OBJ_INVENT && container) {
|
} else if (container_where == OBJ_INVENT) {
|
||||||
Strcpy(sackname, an(xname(container)));
|
Strcpy(sackname, an(xname(container)));
|
||||||
pline("%s %s out of %s in your pack!", mnam,
|
pline("%s %s out of %s in your pack!", mnam,
|
||||||
locomotion(mtmp->data, "writhes"), sackname);
|
locomotion(mtmp->data, "writhes"), sackname);
|
||||||
} else if (container_where == OBJ_FLOOR && container
|
} else if (container_where == OBJ_FLOOR
|
||||||
&& cansee(corpsex, corpsey)) {
|
&& cansee(corpsex, corpsey)) {
|
||||||
Strcpy(sackname, an(xname(container)));
|
Strcpy(sackname, an(xname(container)));
|
||||||
pline("%s escapes from %s!", mnam, sackname);
|
pline("%s escapes from %s!", mnam, sackname);
|
||||||
|
|||||||
Reference in New Issue
Block a user