- Added poison counter check into the testsuite

- Decorelated the testsuite AI timer from the game timer to be able to have reproduceable results with AI tests.
- Created a random generator wrapper class
- Used two seperate instances of this random generator for AI and for the game
- Added methods to load randoms into AI from a testcase
- Fixed a probleme with undo and premade decks introduced in r4035
- Added basic test to test AI proliferate code
- Cleaned up goblin_artillery test
- Added AI tests into the testsuite test list
- Fixed looping bug into the multi target AI code
This commit is contained in:
Xawotihs
2011-10-30 14:31:27 +00:00
parent 53b9bc412f
commit 2f4dd4cd2a
19 changed files with 195 additions and 98 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ int AIMomirPlayer::momir()
int converted = potentialMana->getConvertedCost();
SAFE_DELETE(potentialMana);
int efficiency = 100;
int chance = 1 + (WRand() % 100);
int chance = 1 + (randomGenerator.random() % 100);
if (converted == 5 && myCreatures > opponentCreatures && game->hand->nb_cards < 4) efficiency = 5; //Strategy: skip 5 drop
if (converted == 7 && myCreatures > opponentCreatures && game->hand->nb_cards < 2) efficiency = 50; //Strategy: 7 drops have bad upkeep costs and the AI doesn't handle those right now...
if (converted > 8) converted = 8;