|
|
@@ -685,6 +685,9 @@ bool CBattleInfoCallback::battleCanAttack(const battle::Unit * stack, const batt
|
|
|
if (!stack || !target)
|
|
|
return false;
|
|
|
|
|
|
+ if(target->hasBonusOfType(BonusType::INVINCIBLE))
|
|
|
+ return false;
|
|
|
+
|
|
|
if(!battleMatchOwner(stack, target))
|
|
|
return false;
|
|
|
|
|
|
@@ -730,6 +733,9 @@ bool CBattleInfoCallback::battleCanShoot(const battle::Unit * attacker, BattleHe
|
|
|
if(!attacker || !defender)
|
|
|
return false;
|
|
|
|
|
|
+ if(defender->hasBonusOfType(BonusType::INVINCIBLE))
|
|
|
+ return false;
|
|
|
+
|
|
|
if(battleMatchOwner(attacker, defender) && defender->alive())
|
|
|
{
|
|
|
if(battleCanShoot(attacker))
|