no leash-related message is given when leashed pet yellow light explodes

mondead() -> m_detach() -> m_unleash() suppresses
the m_unleash() slack message, so deliver it in
the caller explmm() in those circumstances.

(The issue of whether it should be possible to leash light
is side-stepped.)

bug H7406, 1548
This commit is contained in:
nhmall
2018-09-23 14:06:18 -04:00
parent 2813e42b22
commit 02b1ce2d9a
2 changed files with 8 additions and 0 deletions

View File

@@ -139,6 +139,7 @@ drum of earthquake was causing deafness but oddly enough only when used up
known bear trap was being forgotten about by a player polymorphed into a
flying monster if the player unsuccessfully tried to #untrap it and
moved onto the trap square as a result
no leash-related message is given when a leashed pet yellow light explodes
Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository

View File

@@ -781,10 +781,17 @@ struct attack *mattk;
/* Kill off aggressor if it didn't die. */
if (!(result & MM_AGR_DIED)) {
boolean was_leashed = (magr->mleashed);
mondead(magr);
if (!DEADMONSTER(magr))
return result; /* life saved */
result |= MM_AGR_DIED;
/* mondead() -> m_detach() -> m_unleash() always suppresses
the m_unleash() slack message, so deliver it here instead */
if (was_leashed)
Your("leash falls slack.");
}
if (magr->mtame) /* give this one even if it was visible */
You(brief_feeling, "melancholy");