1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

* further fixes for sieges

* support for ballistics
This commit is contained in:
mateuszb
2009-09-06 09:13:16 +00:00
parent 05b0d82769
commit c5832fb9e8
3 changed files with 44 additions and 26 deletions

View File

@@ -420,6 +420,21 @@ void CGameHandler::startBattle(const CArmedInstance *army1, const CArmedInstance
continue;
}
if(next->creature->idNumber == 145 && (!curOwner || curOwner->getSecSkillLevel(10) == 0)) //catapult, hero has no ballistics
{
BattleAction attack;
static const int wallHexes[] = {50, 183, 182, 130, 62, 29, 12, 95};
attack.destinationTile = wallHexes[ rand()%ARRAY_COUNT(wallHexes) ];
attack.actionType = 9;
attack.additionalInfo = 0;
attack.side = !next->attackerOwned;
attack.stackNumber = next->ID;
makeBattleAction(attack);
continue;
}
askInterfaceForMove:
//ask interface and wait for answer
if(!battleResult.get())