1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Merge pull request #4623 from Laserlicht/invincible_bonus

INVINCIBLE bonus
This commit is contained in:
Ivan Savenko
2024-09-20 11:50:29 +03:00
committed by GitHub
11 changed files with 51 additions and 4 deletions

View File

@@ -425,6 +425,10 @@ int64_t CSpell::adjustRawDamage(const spells::Caster * caster, const battle::Uni
ret *= 100 + bearer->valOfBonuses(BonusType::MORE_DAMAGE_FROM_SPELL, BonusSubtypeID(id));
ret /= 100;
}
//invincible
if(bearer->hasBonusOfType(BonusType::INVINCIBLE))
ret = 0;
}
ret = caster->getSpellBonus(this, ret, affectedCreature);
return ret;