1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-14 02:33:51 +02:00
This commit is contained in:
Michał W. Urbańczyk 2012-04-02 11:38:59 +00:00
parent 1415f8dbf5
commit 584b761d37

View File

@ -140,14 +140,10 @@ CAttackAnimation::CAttackAnimation(CBattleInterface *_owner, const CStack *attac
{
assert(attackingStack && "attackingStack is NULL in CBattleAttack::CBattleAttack !\n");
if(!attackingStack->hasBonusOfType(Bonus::CATAPULT)) //catapult is allowed to attack not-creature
{
assert(attackedStack && "attackedStack is NULL in CBattleAttack::CBattleAttack !\n");
}
else //catapult can attack walls only
{
assert(owner->curInt->cb->battleGetWallUnderHex(_dest) >= 0);
}
bool isCatapultAttack = attackingStack->hasBonusOfType(Bonus::CATAPULT)
&& owner->curInt->cb->battleGetWallUnderHex(_dest);
assert(attackedStack || isCatapultAttack);
attackingStackPosBeforeReturn = attackingStack->position;
}