1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-21 21:17:49 +02:00

Remove suspicios code in display damage calculation

This commit is contained in:
AlexVinS 2015-09-16 09:03:36 +03:00
parent 16f0714474
commit 0929e009db
2 changed files with 4 additions and 5 deletions

View File

@ -21,11 +21,11 @@ public:
RESURRECT,
TRUE_RESURRECT
};
HealingSpellMechanics(CSpell * s): DefaultSpellMechanics(s){};
protected:
void applyBattleEffects(const SpellCastEnvironment * env, BattleSpellCastParameters & parameters, SpellCastContext & ctx) const override;
virtual EHealLevel getHealLevel(int effectLevel) const = 0;
};

View File

@ -524,11 +524,10 @@ void DefaultSpellMechanics::applyBattleEffects(const SpellCastEnvironment * env,
{
int unitSpellPower = parameters.casterStack->valOfBonuses(Bonus::SPECIFIC_SPELL_POWER, owner->id.toEnum());
if(unitSpellPower)
ctx.sc.dmgToDisplay = spellDamage = parameters.casterStack->count * unitSpellPower; //TODO: handle immunities
spellDamage = parameters.casterStack->count * unitSpellPower; //TODO: handle immunities
else //Faerie Dragon
{
parameters.usedSpellPower = parameters.casterStack->valOfBonuses(Bonus::CREATURE_SPELL_POWER) * parameters.casterStack->count / 100;
ctx.sc.dmgToDisplay = 0;
parameters.usedSpellPower = parameters.casterStack->valOfBonuses(Bonus::CREATURE_SPELL_POWER) * parameters.casterStack->count / 100;
}
}
int chainLightningModifier = 0;