diff --git a/doc/fixes36.2 b/doc/fixes36.2 index ec12a701f..7b791a6b7 100644 --- a/doc/fixes36.2 +++ b/doc/fixes36.2 @@ -422,6 +422,8 @@ Vlad wasn't set up as a vampshifter properly poly'd hero capable of spitting venom would leave intact venom object if it reached end of range at a 'soft' location such as water avoid impossible if monster cannot be relocated from teleport region +fix cloned monster trapped and hiding states +split monster could be placed on trap without triggering it Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository diff --git a/src/makemon.c b/src/makemon.c index 6b750f2f6..94ee223dd 100644 --- a/src/makemon.c +++ b/src/makemon.c @@ -842,6 +842,8 @@ xchar x, y; /* clone's preferred location or 0 (near mon) */ m2->mx = mm.x; m2->my = mm.y; + m2->mundetected = 0; + m2->mtrapped = 0; m2->mcloned = 1; m2->minvent = (struct obj *) 0; /* objects don't clone */ m2->mleashed = FALSE; diff --git a/src/mhitm.c b/src/mhitm.c index a2d0c6659..79f1e6739 100644 --- a/src/mhitm.c +++ b/src/mhitm.c @@ -419,7 +419,8 @@ register struct monst *magr, *mdef; || objects[otmp->otyp].oc_material == METAL)) && mdef->mhp > 1 && !mdef->mcan) { - if (clone_mon(mdef, 0, 0)) { + struct monst *mclone; + if ((mclone = clone_mon(mdef, 0, 0)) != 0) { if (vis && canspotmon(mdef)) { char buf[BUFSZ]; @@ -427,6 +428,7 @@ register struct monst *magr, *mdef; pline("%s divides as %s hits it!", buf, mon_nam(magr)); } + mintrap(mclone); } } } else diff --git a/src/mon.c b/src/mon.c index 2882a226c..7bb0d0f98 100644 --- a/src/mon.c +++ b/src/mon.c @@ -1687,6 +1687,7 @@ struct monst **monst_list; /* &migrating_mons or &mydogs or null */ } if (on_map) { + mon->mtrapped = 0; if (mon->wormno) remove_worm(mon); else diff --git a/src/uhitm.c b/src/uhitm.c index b354d5d7a..f478d0289 100644 --- a/src/uhitm.c +++ b/src/uhitm.c @@ -1227,7 +1227,8 @@ int dieroll; /* but not bashing with darts, arrows or ya */ && !(is_ammo(obj) || is_missile(obj))) && hand_to_hand) { - if (clone_mon(mon, 0, 0)) { + struct monst *mclone; + if ((mclone = clone_mon(mon, 0, 0)) != 0) { char withwhat[BUFSZ]; withwhat[0] = '\0'; @@ -1235,6 +1236,7 @@ int dieroll; Sprintf(withwhat, " with %s", yname(obj)); pline("%s divides as you hit it%s!", Monnam(mon), withwhat); hittxt = TRUE; + mintrap(mclone); } }