Browse Source

Ensure Reflect + Thorn don't kill a monster twice (#4318)

pull/4324/head
obligaron 4 years ago committed by GitHub
parent
commit
7d1e2d738e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      Source/monster.cpp

3
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)

Loading…
Cancel
Save