1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-03 00:46:55 +02:00

Fixed total spell immunity granted by 2212.

Improvements for Life Drain.
This commit is contained in:
DjWarmonger
2011-06-25 15:05:01 +00:00
parent 212bc13ad6
commit 9ca5d9048a
7 changed files with 16 additions and 8 deletions

View File

@ -1346,7 +1346,7 @@ CStackBasicDescriptor CGHeroInstance::calculateNecromancy (const BattleResult &b
{
// Get lost enemy hit points convertible to units.
CCreature * c = VLC->creh->creatures[it->first];
if (!(c->hasBonusOfType(Bonus::UNDEAD) || c->hasBonusOfType(Bonus::NON_LIVING)))
if (c->isLiving())
{
const ui32 raisedHP = c->valOfBonuses(Bonus::STACK_HEALTH) * it->second * necromancySkill;
raisedUnits += std::min<ui32>(raisedHP / raisedUnitHP, it->second * necromancySkill); //limit to % of HP and % of original stack count