1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00

[AI] Teach BattleAI how to use offensive location spells (like fireball)

* AI already can evaluate effect of smart and not smart offensive spells.
This commit is contained in:
AlexVinS 2016-03-01 09:07:51 +03:00
parent 3b2a45c8dc
commit 3de47d4df6

View File

@ -567,6 +567,14 @@ std::vector<BattleHex> CBattleAI::getTargetsToConsider(const CSpell * spell, con
}
}
break;
case CSpell::LOCATION:
{
for(int i = 0; i < GameConstants::BFIELD_SIZE; i++)
if(BattleHex(i).isAvailable())
ret.push_back(i);
}
break;
default:
break;
}