1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-26 03:52:01 +02:00

add Fire Shield damage to the battle log

This commit is contained in:
Andrey Filipenkov 2022-09-21 10:42:42 +03:00
parent b95841dabb
commit 87a88da3a9

View File

@ -1159,8 +1159,6 @@ void CGameHandler::makeAttack(const CStack * attacker, const CStack * defender,
blm.lines.push_back(std::move(text));
}
sendAndApply(&blm);
if(!fireShield.empty())
{
//todo: this should be "virtual" spell instead, we only need fire spell school bonus here
@ -1199,8 +1197,19 @@ void CGameHandler::makeAttack(const CStack * attacker, const CStack * defender,
StacksInjured pack;
pack.stacks.push_back(bsa);
sendAndApply(&pack);
sendGenericKilledLog(attacker, bsa.killedAmount, false);
// TODO: this is already implemented in Damage::describeEffect()
{
MetaString text;
text.addTxt(MetaString::GENERAL_TXT, 376);
text.addReplacement(MetaString::SPELL_NAME, SpellID::FIRE_SHIELD);
text.addReplacement(totalDamage);
blm.lines.push_back(std::move(text));
}
addGenericKilledLog(blm, attacker, bsa.killedAmount, false);
}
sendAndApply(&blm);
handleAfterAttackCasting(ranged, attacker, defender);
}