From 02b1ce2d9a9e95fd87dcd1982cc0a76fcc193d59 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 23 Sep 2018 14:06:18 -0400 Subject: [PATCH] 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 --- doc/fixes36.2 | 1 + src/mhitm.c | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/doc/fixes36.2 b/doc/fixes36.2 index c02837500..97e7698d0 100644 --- a/doc/fixes36.2 +++ b/doc/fixes36.2 @@ -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 diff --git a/src/mhitm.c b/src/mhitm.c index 95413843c..87ee54e21 100644 --- a/src/mhitm.c +++ b/src/mhitm.c @@ -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");