diff --git a/doc/fixes35.0 b/doc/fixes35.0 index ad9fbb5e2..85e60de78 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -158,6 +158,7 @@ if shopkeeper or priest gets teleported while inside his shop or temple, tame/peaceful grabber/engulfer will release hero after conflict ends make changes in hallucination be reflected by changes in mimickery feedback add Unaware pseudo-property to suppress various messages while unconscious +missile which kills engulfer will now be placed prior to hero's return to map Platform- and/or Interface-Specific Fixes diff --git a/src/dothrow.c b/src/dothrow.c index 0a527b491..6ec093f98 100644 --- a/src/dothrow.c +++ b/src/dothrow.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)dothrow.c 3.5 2006/06/21 */ +/* SCCS Id: @(#)dothrow.c 3.5 2006/09/25 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1032,10 +1032,12 @@ boolean twoweap; /* used to restore twoweapon mode if wielded weapon returns */ !index(in_rooms(mon->mx, mon->my, SHOPBASE), *u.ushops))) hot_pursuit(mon); - if (obj_gone) return; + if (obj_gone) thrownobj = 0; } - if (u.uswallow) { + if (!thrownobj) { + ; /* missile has already been handled */ + } else if (u.uswallow) { /* ball is not picked up by monster */ if (obj != uball) (void) mpickobj(u.ustuck,obj); } else { diff --git a/src/mon.c b/src/mon.c index 5806898c6..0642fcc67 100644 --- a/src/mon.c +++ b/src/mon.c @@ -11,6 +11,8 @@ #include "mfndpos.h" #include +extern struct obj *thrownobj; /* dothrow.c */ + STATIC_DCL boolean FDECL(restrap,(struct monst *)); STATIC_DCL long FDECL(mm_aggression, (struct monst *,struct monst *)); #ifdef BARGETHROUGH @@ -1914,6 +1916,17 @@ int dest; /* your pet knows who just killed it...watch out */ if (mtmp->mtame && !mtmp->isminion) EDOG(mtmp)->killed_by_u = 1; + if (wasinside && thrownobj && thrownobj != uball) { + /* thrown object has killed hero's engulfer; add it to mon's + inventory now so that it will be placed with mon's other + stuff prior to lookhere/autopickup when hero is expelled + below (as a side-effect, this missile has immunity from + being consumed [for this shot/throw only]) */ + mpickobj(mtmp, thrownobj); + /* let throwing code know that missile has been disposed of */ + thrownobj = 0; + } + /* dispose of monster and make cadaver */ if(stoned) monstone(mtmp); else mondead(mtmp); diff --git a/src/uhitm.c b/src/uhitm.c index 9ac52aa2a..f88327c08 100644 --- a/src/uhitm.c +++ b/src/uhitm.c @@ -1074,6 +1074,8 @@ int thrown; pline(fmt, whom); } + /* [note: thrown obj might go away during killed/xkilled call] */ + if (needpoismsg) pline_The("poison doesn't seem to affect %s.", mon_nam(mon)); if (poiskilled) {