1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-17 00:07:41 +02:00

moat bypass when no targets to attack

This commit is contained in:
Andrii Danylchenko
2020-11-28 17:11:33 +02:00
parent 4e359cd2a3
commit 3614330b3d
7 changed files with 154 additions and 40 deletions

View File

@ -6117,7 +6117,8 @@ void CGameHandler::runBattle()
for(auto & elem : gs->curB->stacks)
{
if(elem->owner != next->owner
if(elem->getCreature()->idNumber != CreatureID::CATAPULT
&& elem->owner != next->owner
&& elem->isValidTarget()
&& gs->curB->battleCanShoot(next, elem->getPosition()))
{