mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-29 23:07:48 +02:00
Improvement for multiple-hex effects.
TODO: Attacker must know exact attacked tile, not only the stack.
This commit is contained in:
@@ -551,6 +551,7 @@ void CGameHandler::prepareAttack(BattleAttack &bat, const CStack *att, const CSt
|
||||
|
||||
BattleStackAttacked bss = *bsa; // copy some parameters, such as attacker
|
||||
std::set<CStack*> attackedCreatures = gs->curB->getAttackedCreatures(VLC->spellh->spells[bonus->subtype], bonus->val, att->owner, def->position);
|
||||
//TODO: get exact attacked hex for defender
|
||||
|
||||
BOOST_FOREACH(CStack * stack, attackedCreatures)
|
||||
{
|
||||
@@ -3492,9 +3493,11 @@ void CGameHandler::handleSpellCasting( int spellID, int spellLvl, int destinatio
|
||||
continue;
|
||||
|
||||
BattleStackAttacked bsa;
|
||||
//TODO: display effect only upon primary target of area spell
|
||||
bsa.flags |= BattleStackAttacked::EFFECT;
|
||||
bsa.effect = spell->mainEffectAnim;
|
||||
if (destination > -1 && (*it)->coversPos(destination)) //display effect only upon primary target of area spell
|
||||
{
|
||||
bsa.flags |= BattleStackAttacked::EFFECT;
|
||||
bsa.effect = spell->mainEffectAnim;
|
||||
}
|
||||
bsa.damageAmount = gs->curB->calculateSpellDmg(spell, caster, *it, spellLvl, usedSpellPower);
|
||||
bsa.stackAttacked = (*it)->ID;
|
||||
bsa.attackerID = -1;
|
||||
|
||||
Reference in New Issue
Block a user