1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00
This commit is contained in:
AlexVinS
2021-02-15 15:03:32 +03:00
parent ecaa9f5d0b
commit a59e12ca5f
6 changed files with 15 additions and 12 deletions

View File

@@ -18,7 +18,7 @@
#include "../../lib/spells/CSpellHandler.h"
#include "../../lib/spells/ISpellMechanics.h"
#include "../../lib/CStack.h" // TODO: remove
// Eventually only IBattleInfoCallback and battle::Unit should be used,
// Eventually only IBattleInfoCallback and battle::Unit should be used,
// CUnitState should be private and CStack should be removed completely
#define LOGL(text) print(text)
@@ -43,14 +43,14 @@ SpellTypes spellType(const CSpell * spell)
std::vector<BattleHex> CBattleAI::getBrokenWallMoatHexes() const
{
std::vector<BattleHex> result;
for(int wallPart = EWallPart::BOTTOM_WALL; wallPart < EWallPart::UPPER_WALL; wallPart++)
{
auto state = cb->battleGetWallState(wallPart);
if(state != EWallState::DESTROYED)
continue;
auto wallHex = cb->wallPartToBattleHex((EWallPart::EWallPart)wallPart);
auto moatHex = wallHex.cloneInDirection(BattleHex::LEFT);
@@ -311,7 +311,7 @@ BattleAction CBattleAI::useCatapult(const CStack * stack)
if(cb->battleGetGateState() == EGateState::CLOSED)
{
targetHex = cb->wallPartToBattleHex(EWallPart::GATE);
}
}
else
{
EWallPart::EWallPart wallParts[] = {