1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Work in progress on BattleAI. Related changes:

* battle AIs receive ptr to CBattleCallback (not sure why it was CPlayerBattleCallback, likely mistake)
* reworked some battle callback methods to be more generic and able to handle some hypothetic scenarios
* for testing purposes in duel mode the first AI will be taken fro mconfig and the second will remain stupid ai
* minor changes
This commit is contained in:
Michał W. Urbańczyk
2012-09-20 16:55:21 +00:00
parent 871f680ccc
commit 62e63d45b1
25 changed files with 793 additions and 257 deletions

View File

@@ -1214,7 +1214,7 @@ void CArtifactInstance::deserializationFix()
int CArtifactInstance::getGivenSpellID() const
{
const Bonus * b = getBonus(Selector::type(Bonus::SPELL));
const Bonus * b = getBonusLocalFirst(Selector::type(Bonus::SPELL));
if(!b)
{
tlog3 << "Warning: " << nodeName() << " doesn't bear any spell!\n";