1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

Merge pull request #4530 from IvanSavenko/town_fortifications

Support for configurable town fortifications
This commit is contained in:
Ivan Savenko
2024-08-31 13:59:40 +03:00
committed by GitHub
33 changed files with 284 additions and 98 deletions

View File

@ -33,6 +33,7 @@
#include "CPlayerState.h"
#include "TerrainHandler.h"
#include "entities/building/CBuilding.h"
#include "entities/building/TownFortifications.h"
#include "mapObjects/CBank.h"
#include "mapObjects/CGCreature.h"
#include "mapObjects/CGMarket.h"
@ -2338,7 +2339,7 @@ void CatapultAttack::applyBattle(IBattleState * battleState)
if(!town)
return;
if(town->fortLevel() == CGTownInstance::NONE)
if(town->fortificationsLevel().wallsHealth == 0)
return;
for(const auto & part : attackedParts)