mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-14 02:33:51 +02:00
Fixed #917.
This commit is contained in:
parent
1415f8dbf5
commit
584b761d37
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user