mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Fixed clone damage
This commit is contained in:
@@ -201,6 +201,7 @@ void CStack::prepareAttacked(BattleStackAttacked & bsa, vstd::RNG & rand, std::s
|
|||||||
{
|
{
|
||||||
auto initialCount = customState->getCount();
|
auto initialCount = customState->getCount();
|
||||||
|
|
||||||
|
// compute damage and update bsa.damageAmount
|
||||||
customState->damage(bsa.damageAmount);
|
customState->damage(bsa.damageAmount);
|
||||||
|
|
||||||
bsa.killedAmount = initialCount - customState->getCount();
|
bsa.killedAmount = initialCount - customState->getCount();
|
||||||
|
|||||||
@@ -823,7 +823,7 @@ void CUnitState::damage(int64_t & amount)
|
|||||||
// block ability should not kill clone (0 damage)
|
// block ability should not kill clone (0 damage)
|
||||||
if(amount > 0)
|
if(amount > 0)
|
||||||
{
|
{
|
||||||
amount = 1;//TODO: what should be actual damage against clone?
|
amount = 0;
|
||||||
health.reset();
|
health.reset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user