mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
Partial support for Clone spell.
This commit is contained in:
@@ -2729,6 +2729,13 @@ void CStack::prepareAttacked(BattleStackAttacked &bsa) const
|
||||
bsa.killedAmount = bsa.damageAmount / MaxHealth();
|
||||
unsigned damageFirst = bsa.damageAmount % MaxHealth();
|
||||
|
||||
if (bsa.damageAmount && vstd::contains(state, EBattleStackState::CLONED)) // block ability should not kill clone (0 damage)
|
||||
{
|
||||
bsa.killedAmount = count;
|
||||
bsa.flags |= BattleStackAttacked::KILLED;
|
||||
return; // no rebirth I believe
|
||||
}
|
||||
|
||||
if( firstHPleft <= damageFirst )
|
||||
{
|
||||
bsa.killedAmount++;
|
||||
|
||||
Reference in New Issue
Block a user