attack/damage by trapper and lurker above
Change trappers and lurkers above to remove digestion damage. They fold themselves around rather than swallow the victim. There were are lot of places that assumed that an engulfer which is an animal would swallow and digest the victim. In hindsight, it might have been simpler to take the M1_ANIMAL flag off of trappers and lurkers above. This adds a new digests() predicate for creatures with AT_ENGL+AD_DGST (purple worm) and also enfolds() for AT_ENGL+AD_WRAP (both 't'-class critters). There are several minor fixes mixed in with this. I didn't record them as I went along but the two I remember are 1) if poly'd into a holder and holding on to a monster, the '<' and '>' commands refursed to work; release the held creature first and then treat those commands as normal; 2) throwing a non-weapon while engulfed by an ochre jelly reported "the <item> vanishes into the ochre jelly's /currents/". This needs a lot more testing. I found and fixed multiple minor details before my own testing burned out.
This commit is contained in:
@@ -1036,7 +1036,7 @@ status_enlightenment(int mode, int final)
|
||||
}
|
||||
if (u.uswallow) { /* implies u.ustuck is non-Null */
|
||||
Snprintf(buf, sizeof buf, "%s by %s",
|
||||
is_animal(u.ustuck->data) ? "swallowed" : "engulfed",
|
||||
digests(u.ustuck->data) ? "swallowed" : "engulfed",
|
||||
heldmon);
|
||||
if (dmgtype(u.ustuck->data, AD_DGST)) {
|
||||
/* if final, death via digestion can be deduced by u.uswallow
|
||||
@@ -3023,13 +3023,26 @@ mstatusline(struct monst *mtmp)
|
||||
: ", [? speed]");
|
||||
if (mtmp->minvis)
|
||||
Strcat(info, ", invisible");
|
||||
if (mtmp == u.ustuck)
|
||||
Strcat(info, sticks(g.youmonst.data) ? ", held by you"
|
||||
: !u.uswallow ? ", holding you"
|
||||
: attacktype_fordmg(u.ustuck->data, AT_ENGL, AD_DGST)
|
||||
? ", digesting you"
|
||||
: is_animal(u.ustuck->data) ? ", swallowing you"
|
||||
: ", engulfing you");
|
||||
if (mtmp == u.ustuck) {
|
||||
struct permonst *pm = u.ustuck->data;
|
||||
|
||||
/* being swallowed/engulfed takes priority over sticks(youmonst);
|
||||
this used to have that backwards and checked sticks() first */
|
||||
Strcat(info, u.uswallow ? (digests(pm)
|
||||
? ", digesting you"
|
||||
/* note: the "swallowing you" case won't
|
||||
happen because all animal engulfers
|
||||
either digest their victims (purple
|
||||
worm) or enfold them (trappers and
|
||||
lurkers above) */
|
||||
: (is_animal(pm) && !enfolds(pm))
|
||||
? ", swallowing you"
|
||||
: ", engulfing you")
|
||||
/* !u.uswallow; if both youmonst and ustuck are holders,
|
||||
youmonst wins */
|
||||
: (!sticks(g.youmonst.data) ? ", holding you"
|
||||
: ", held by you"));
|
||||
}
|
||||
if (mtmp == u.usteed) {
|
||||
Strcat(info, ", carrying you");
|
||||
if (Wounded_legs) {
|
||||
|
||||
Reference in New Issue
Block a user