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

- catapult attacks should be identical to H3

- catapult may miss and attack another part of wall instead (this is how it works in H3)
- minor fixes
This commit is contained in:
Ivan Savenko
2013-08-06 11:20:28 +00:00
parent 6057226665
commit c81a31c74a
15 changed files with 245 additions and 121 deletions

View File

@ -379,9 +379,20 @@ BattleInfo * BattleInfo::setupBattle( int3 tile, ETerrainType terrain, BFieldTyp
//setting up siege obstacles
if (town && town->hasFort())
{
for (int b = 0; b < ARRAY_COUNT (curB->si.wallState); ++b)
for (int b = 0; b < curB->si.wallState.size(); ++b)
{
curB->si.wallState[b] = 1;
curB->si.wallState[b] = EWallState::INTACT;
}
if (!town->hasBuilt(BuildingID::CITADEL))
{
curB->si.wallState[EWallParts::KEEP] = EWallState::NONE;
}
if (!town->hasBuilt(BuildingID::CASTLE))
{
curB->si.wallState[EWallParts::UPPER_TOWER] = EWallState::NONE;
curB->si.wallState[EWallParts::BOTTOM_TOWER] = EWallState::NONE;
}
}