Selaa lähdekoodia

When hero has ballistics and no target pass turn

David Zéni 10 vuotta sitten
vanhempi
sitoutus
f84e5cf8b3
1 muutettua tiedostoa jossa 10 lisäystä ja 0 poistoa
  1. 10 0
      server/CGameHandler.cpp

+ 10 - 0
server/CGameHandler.cpp

@@ -5436,6 +5436,16 @@ void CGameHandler::runBattle()
 				continue;
 			}
 
+			if( next->getCreature()->idNumber == CreatureID::CATAPULT
+				&& curOwner && curOwner->getSecSkillLevel(SecondarySkill::BALLISTICS) > 0)
+			{
+				if(curB.getAttackableBattleHexes().empty())
+				{
+					makeStackDoNothing(next);
+					continue;
+				}
+			}
+
 			if(next->getCreature()->idNumber == CreatureID::FIRST_AID_TENT)
 			{
 				TStacks possibleStacks = battleGetStacksIf([&](const CStack * s){