1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Fix regressions from battlehex PR (mostly related to towers)

This commit is contained in:
Ivan Savenko
2025-01-12 11:07:50 +00:00
parent 14320fb100
commit 5bfc837a8f
4 changed files with 38 additions and 20 deletions

View File

@@ -1353,14 +1353,9 @@ AttackableTiles CBattleInfoCallback::getPotentiallyAttackableHexes(
if(attacker->hasBonusOfType(BonusType::WIDE_BREATH))
{
BattleHexArray hexes = destinationTile.getNeighbouringTiles();
for(int i = 0; i < hexes.size(); i++)
{
if(hexes.at(i) == attackOriginHex)
{
hexes.erase(i);
i = 0;
}
}
if (hexes.contains(attackOriginHex))
hexes.erase(attackOriginHex);
for(BattleHex tile : hexes)
{
//friendly stacks can also be damaged by Dragon Breath