Skip to content

Commit

Permalink
Monster Arrow resistance bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wkdgmr committed Oct 6, 2023
1 parent b00ae04 commit 924bcba
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions Source/monster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4781,18 +4781,16 @@ bool Monster::isImmune(Missile &missile, MissileID missileType, DamageType missi

bool Monster::isResistant(MissileID missileType, DamageType missileElement) const
{
if (missileType == MissileID::Arrow) {
if (((resistance & IMMUNE_FIRE) != 0 && missileElement == DamageType::Fire)
|| ((resistance & IMMUNE_LIGHTNING) != 0 && missileElement == DamageType::Lightning)
|| ((resistance & RESIST_FIRE) != 0 && missileElement == DamageType::Fire)
|| ((resistance & RESIST_LIGHTNING) != 0 && missileElement == DamageType::Lightning)
|| ((resistance & RESIST_MAGIC) != 0 && missileElement == DamageType::Magic)
|| ((resistance & RESIST_MAGIC) != 0 && missileElement == DamageType::Acid)) {
return true;
}

return false;
if (((resistance & IMMUNE_FIRE) != 0 && missileElement == DamageType::Fire)
|| ((resistance & IMMUNE_LIGHTNING) != 0 && missileElement == DamageType::Lightning)
|| ((resistance & RESIST_FIRE) != 0 && missileElement == DamageType::Fire)
|| ((resistance & RESIST_LIGHTNING) != 0 && missileElement == DamageType::Lightning)
|| ((resistance & RESIST_MAGIC) != 0 && missileElement == DamageType::Magic)
|| ((resistance & RESIST_MAGIC) != 0 && missileElement == DamageType::Acid)) {
return true;
}

return false;
}

bool Monster::isPlayerMinion() const
Expand Down

0 comments on commit 924bcba

Please sign in to comment.