1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00
This commit is contained in:
DjWarmonger 2013-02-18 07:12:19 +00:00
parent 111312636a
commit 2e385375b7

View File

@ -4023,12 +4023,6 @@ void CGameHandler::handleSpellCasting( SpellID spellID, int spellLvl, BattleHex
sc.resisted = gs->curB->calculateResistedStacks(spell, caster, secHero, attackedCres, casterColor, mode, usedSpellPower, spellLvl);
//calculating dmg to display
BOOST_FOREACH (auto cre, attackedCres)
{
if(vstd::contains(sc.resisted, cre->ID)) //this creature resisted the spell
continue;
sc.dmgToDisplay += gs->curB->calculateSpellDmg(spell, caster, cre, spellLvl, usedSpellPower);
}
if (spellID == SpellID::DEATH_STARE || spellID == SpellID::ACID_BREATH_DAMAGE)
{
sc.dmgToDisplay = usedSpellPower;
@ -4070,10 +4064,10 @@ void CGameHandler::handleSpellCasting( SpellID spellID, int spellLvl, BattleHex
if (spellDamage)
bsa.damageAmount = spellDamage >> chainLightningModifier;
else
{
bsa.damageAmount = gs->curB->calculateSpellDmg(spell, caster, *it, spellLvl, usedSpellPower) >> chainLightningModifier;
sc.dmgToDisplay += bsa.damageAmount;
}
sc.dmgToDisplay += bsa.damageAmount;
bsa.stackAttacked = (*it)->ID;
if (mode == ECastingMode::ENCHANTER_CASTING) //multiple damage spells cast
bsa.attackerID = stack->ID;