From 7d1e2d738e17aada6ad5717ba054afe7a9a412e2 Mon Sep 17 00:00:00 2001 From: obligaron Date: Sun, 3 Apr 2022 10:27:08 +0200 Subject: [PATCH] Ensure Reflect + Thorn don't kill a monster twice (#4318) --- Source/monster.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/monster.cpp b/Source/monster.cpp index 0baa1b79a..27729c5a3 100644 --- a/Source/monster.cpp +++ b/Source/monster.cpp @@ -1414,7 +1414,8 @@ void MonsterAttackPlayer(int i, int pnum, int hit, int minDam, int maxDam) CheckReflect(i, pnum, dam); ApplyPlrDamage(pnum, 0, 0, dam); } - if ((player._pIFlags & ISPL_THORNS) != 0) { + // Reflect can also kill a monster, so make sure the monster is still alive + if ((player._pIFlags & ISPL_THORNS) != 0 && monster._mmode != MonsterMode::Death) { int mdam = (GenerateRnd(3) + 1) << 6; monster._mhitpoints -= mdam; if (monster._mhitpoints >> 6 <= 0)