purple worms affected by corpses
Forwarded from the newsgroup as noting that dropping a chameleon corpse into a purple worm did not cause polymorph nor will the digestion attack. Added code to dropy and mdamagem to include special corpse effects like those in dog_eat and meatobj.
This commit is contained in:
@@ -235,6 +235,8 @@ if you have converted, the quest leader banishes you instead of asking you
|
|||||||
don't state that "you narrowly avoid losing all chance" message if you try
|
don't state that "you narrowly avoid losing all chance" message if you try
|
||||||
to put on a helm of opposite alignment in the quest after converting
|
to put on a helm of opposite alignment in the quest after converting
|
||||||
fix enlightenment feedback for bonus or penalty on damage and chance to hit
|
fix enlightenment feedback for bonus or penalty on damage and chance to hit
|
||||||
|
effects of purple worms consuming special monsters is now more consistent
|
||||||
|
across eating, digesting and dropped corpses while engulfed
|
||||||
|
|
||||||
|
|
||||||
Platform- and/or Interface-Specific Fixes
|
Platform- and/or Interface-Specific Fixes
|
||||||
|
|||||||
@@ -517,15 +517,39 @@ register struct obj *obj;
|
|||||||
if (!u.uswallow && flooreffects(obj,u.ux,u.uy,"drop")) return;
|
if (!u.uswallow && flooreffects(obj,u.ux,u.uy,"drop")) return;
|
||||||
/* uswallow check done by GAN 01/29/87 */
|
/* uswallow check done by GAN 01/29/87 */
|
||||||
if(u.uswallow) {
|
if(u.uswallow) {
|
||||||
boolean could_petrify;
|
boolean could_petrify = FALSE;
|
||||||
|
boolean could_poly = FALSE;
|
||||||
|
boolean could_slime = FALSE;
|
||||||
|
boolean could_grow = FALSE;
|
||||||
|
boolean could_heal = FALSE;
|
||||||
|
|
||||||
if (obj != uball) { /* mon doesn't pick up ball */
|
if (obj != uball) { /* mon doesn't pick up ball */
|
||||||
could_petrify = obj->otyp == CORPSE &&
|
if (obj->otyp == CORPSE) {
|
||||||
touch_petrifies(&mons[obj->corpsenm]);
|
could_petrify = touch_petrifies(&mons[obj->corpsenm]);
|
||||||
|
could_poly = polyfodder(obj);
|
||||||
|
could_slime = (obj->corpsenm == PM_GREEN_SLIME);
|
||||||
|
could_grow = (obj->corpsenm == PM_WRAITH);
|
||||||
|
could_heal = (obj->corpsenm == PM_NURSE);
|
||||||
|
}
|
||||||
(void) mpickobj(u.ustuck,obj);
|
(void) mpickobj(u.ustuck,obj);
|
||||||
if (could_petrify && is_animal(u.ustuck->data)) {
|
if (is_animal(u.ustuck->data)) {
|
||||||
minstapetrify(u.ustuck, TRUE);
|
if (could_poly || could_slime) {
|
||||||
/* Don't leave a cockatrice corpse available in a statue */
|
(void) newcham(u.ustuck,
|
||||||
if (!u.uswallow) delobj(obj);
|
could_poly ? (struct permonst *)0 :
|
||||||
|
&mons[PM_GREEN_SLIME],
|
||||||
|
FALSE, could_slime);
|
||||||
|
delobj(obj); /* corpse is digested */
|
||||||
|
} else if (could_petrify) {
|
||||||
|
minstapetrify(u.ustuck, TRUE);
|
||||||
|
/* Don't leave a cockatrice corpse in a statue */
|
||||||
|
if (!u.uswallow) delobj(obj);
|
||||||
|
} else if (could_grow) {
|
||||||
|
(void) grow_up(u.ustuck, (struct monst *)0);
|
||||||
|
delobj(obj); /* corpse is digested */
|
||||||
|
} else if (could_heal) {
|
||||||
|
u.ustuck->mhp = u.ustuck->mhpmax;
|
||||||
|
delobj(obj); /* corpse is digested */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
+17
@@ -1095,6 +1095,23 @@ label2: if (mdef->mhp > 0) return 0;
|
|||||||
}
|
}
|
||||||
monkilled(mdef, "", (int)mattk->adtyp);
|
monkilled(mdef, "", (int)mattk->adtyp);
|
||||||
if (mdef->mhp > 0) return 0; /* mdef lifesaved */
|
if (mdef->mhp > 0) return 0; /* mdef lifesaved */
|
||||||
|
|
||||||
|
if (mattk->adtyp == AD_DGST) {
|
||||||
|
/* various checks similar to dog_eat and meatobj.
|
||||||
|
* after monkilled() to provide better message ordering */
|
||||||
|
if (mdef->cham != CHAM_ORDINARY) {
|
||||||
|
(void) newcham(magr, (struct permonst *)0, FALSE, TRUE);
|
||||||
|
} else if (mdef->data == &mons[PM_GREEN_SLIME]) {
|
||||||
|
(void) newcham(magr, &mons[PM_GREEN_SLIME], FALSE, TRUE);
|
||||||
|
} else if (mdef->data == &mons[PM_WRAITH]) {
|
||||||
|
(void) grow_up(magr, (struct monst *)0);
|
||||||
|
/* don't grow up twice */
|
||||||
|
return (MM_DEF_DIED | (magr->mhp > 0 ? 0 : MM_AGR_DIED));
|
||||||
|
} else if (mdef->data == &mons[PM_NURSE]) {
|
||||||
|
magr->mhp = magr->mhpmax;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return (MM_DEF_DIED | (grow_up(magr,mdef) ? 0 : MM_AGR_DIED));
|
return (MM_DEF_DIED | (grow_up(magr,mdef) ? 0 : MM_AGR_DIED));
|
||||||
}
|
}
|
||||||
return(MM_HIT);
|
return(MM_HIT);
|
||||||
|
|||||||
Reference in New Issue
Block a user