1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-23 00:28:08 +02:00

- Improved exploration algorithm. AI will avoid dead-end barriers and thus explore much faster.

- Fixed crash when there are no heroes available to recruit in the map. TODO: make AI handle it
- Fixed crash when Chain Lightning has not enough targets
- Fixed crash at Hill Fort (?)
- AI will buy Spellbook for its heroes
- AI will try to use Cartographer and Observatory when exploring
- AI will not visit Prison when heroes are at max
- Experiment: AI will try to capture Mines and Dwellings when there are no enemies around (part of CONQUER goal)
This commit is contained in:
DjWarmonger
2012-10-01 18:25:43 +00:00
parent 42cbbc8682
commit 1cf99f7be1
4 changed files with 90 additions and 11 deletions

View File

@ -1940,6 +1940,8 @@ std::set<const CStack*> CBattleInfoCallback::getAffectedCreatures(const CSpell *
{
possibleHexes.erase (hex); //can't hit same place twice
}
if (!possibleHexes.size()) //not enough targets
break;
lightningHex = BattleHex::getClosestTile (attackerOwner, destinationTile, possibleHexes);
}
}