1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-26 22:57:00 +02:00
This commit is contained in:
AlexVinS 2014-11-27 17:08:19 +03:00
parent 75b93b070d
commit f1ab328a09
2 changed files with 1 additions and 13 deletions

View File

@ -882,7 +882,7 @@ void CPlayerInterface::battleStacksAttacked(const std::vector<BattleStackAttacke
{
const CStack *defender = cb->battleGetStackByID(elem.stackAttacked, false);
const CStack *attacker = cb->battleGetStackByID(elem.attackerID, false);
if(elem.isEffect() && elem.effect != 12) //and not armageddon
if(elem.isEffect())
{
if (defender && !elem.isSecondary())
battleInt->displayEffect(elem.effect, defender->position);
@ -897,11 +897,6 @@ void CPlayerInterface::battleStacksAttacked(const std::vector<BattleStackAttacke
arg.push_back(to_put);
}
if(bsa.begin()->isEffect() && bsa.begin()->effect == 12) //for armageddon - I hope this condition is enough
{
battleInt->displayEffect(bsa.begin()->effect, -1);
}
battleInt->stacksAreAttacked(arg);
}
void CPlayerInterface::battleAttack(const BattleAttack *ba)

View File

@ -546,13 +546,6 @@ void DefaultSpellMechanics::applyBattleEffects(const SpellCastEnvironment * env,
continue;
BattleStackAttacked bsa;
if((parameters.destination > -1 && (attackedCre)->coversPos(parameters.destination)) || (owner->getLevelInfo(parameters.spellLvl).range == "X" || parameters.mode == ECastingMode::ENCHANTER_CASTING))
//display effect only upon primary target of area spell
//FIXME: if no stack is attacked, there is no animation and interface freezes
{
bsa.flags |= BattleStackAttacked::EFFECT;
bsa.effect = owner->mainEffectAnim;
}
if(spellDamage)
bsa.damageAmount = spellDamage >> chainLightningModifier;
else