Erwan
- submit a fix for TestSuiteAI, I don't understand why it wasn't submitted with my other changes yesterday. This fixes a bug in the test suite (One storm test would fail without this) - minor refactor to AI code
This commit is contained in:
@@ -1337,13 +1337,15 @@ int AIPlayerBaka::computeActions()
|
|||||||
if (game->playRestrictions->canPutIntoZone(nextCardToPlay, game->stack) == PlayRestriction::CANT_PLAY)
|
if (game->playRestrictions->canPutIntoZone(nextCardToPlay, game->stack) == PlayRestriction::CANT_PLAY)
|
||||||
nextCardToPlay = NULL;
|
nextCardToPlay = NULL;
|
||||||
}
|
}
|
||||||
|
SAFE_DELETE (icurrentMana);
|
||||||
|
|
||||||
if (!nextCardToPlay)
|
if (!nextCardToPlay)
|
||||||
{
|
{
|
||||||
selectAbility();
|
selectAbility();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (icurrentMana != NULL)
|
|
||||||
delete (icurrentMana);
|
|
||||||
if (nextCardToPlay)
|
if (nextCardToPlay)
|
||||||
{
|
{
|
||||||
if (ipotential)
|
if (ipotential)
|
||||||
@@ -1389,13 +1391,8 @@ int AIPlayerBaka::computeActions()
|
|||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!nextCardToPlay)
|
SAFE_DELETE(currentMana);
|
||||||
{
|
|
||||||
selectAbility();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (currentMana != NULL)
|
|
||||||
delete (currentMana);
|
|
||||||
if (nextCardToPlay)
|
if (nextCardToPlay)
|
||||||
{
|
{
|
||||||
if (potential)
|
if (potential)
|
||||||
|
|||||||
@@ -423,6 +423,7 @@ void TestSuite::initGame()
|
|||||||
}
|
}
|
||||||
zone->cardsSeenThisTurn.clear(); //don't consider those cards as having moved in this area during this turn
|
zone->cardsSeenThisTurn.clear(); //don't consider those cards as having moved in this area during this turn
|
||||||
}
|
}
|
||||||
|
p->game->stack->cardsSeenThisTurn.clear(); //don't consider those cards as having moved in this area during this turn
|
||||||
}
|
}
|
||||||
DebugTrace("TESTUITE Init Game Done !");
|
DebugTrace("TESTUITE Init Game Done !");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user