Fix "no monster to remove" when tame nymph attacked
A tame nymph attacked another monster, stole an item and teleported away, but dog_move() wasn't passed the information that the nymph was done, and tried to move the nymph from the old location. Same with a tame leprechaun.
This commit is contained in:
@@ -568,7 +568,7 @@ mattackm(
|
||||
if (res[i] & M_ATTK_AGR_DIED)
|
||||
return res[i];
|
||||
/* return if aggressor can no longer attack */
|
||||
if (helpless(magr))
|
||||
if ((res[i] & M_ATTK_AGR_DONE) || helpless(magr))
|
||||
return res[i];
|
||||
/* eg. defender was knocked into a level teleport trap */
|
||||
if (mon_offmap(mdef))
|
||||
|
||||
@@ -2727,6 +2727,7 @@ mhitm_ad_sgld(
|
||||
if (!tele_restrict(magr)) {
|
||||
boolean couldspot = canspotmon(magr);
|
||||
|
||||
mhm->hitflags = M_ATTK_AGR_DONE;
|
||||
(void) rloc(magr, RLOC_NOMSG);
|
||||
/* TODO: use RLOC_MSG instead? */
|
||||
if (gv.vis && couldspot && !canspotmon(magr))
|
||||
@@ -4567,6 +4568,7 @@ mhitm_ad_sedu(
|
||||
if (pa->mlet == S_NYMPH && !tele_restrict(magr)) {
|
||||
boolean couldspot = canspotmon(magr);
|
||||
|
||||
mhm->hitflags = M_ATTK_AGR_DONE;
|
||||
(void) rloc(magr, RLOC_NOMSG);
|
||||
/* TODO: use RLOC_MSG instead? */
|
||||
if (gv.vis && couldspot && !canspotmon(magr))
|
||||
|
||||
Reference in New Issue
Block a user