- 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:
@@ -390,7 +390,7 @@ void MTGPlayerCards::discardRandom(MTGGameZone * from, MTGCardInstance * source)
|
||||
{
|
||||
if (!from->nb_cards)
|
||||
return;
|
||||
int r = WRand(true) % (from->nb_cards);
|
||||
int r = owner->getObserver()->getRandomGenerator()->random() % (from->nb_cards);
|
||||
WEvent * e = NEW WEventCardDiscard(from->cards[r]);
|
||||
GameObserver * game = owner->getObserver();
|
||||
game->receiveEvent(e);
|
||||
@@ -681,7 +681,7 @@ void MTGGameZone::cleanupPhase()
|
||||
|
||||
void MTGGameZone::shuffle()
|
||||
{
|
||||
std::random_shuffle(cards.begin(), cards.end(), MRand );
|
||||
owner->getObserver()->getRandomGenerator()->random_shuffle(cards.begin(), cards.end());
|
||||
}
|
||||
|
||||
void MTGGameZone::addCard(MTGCardInstance * card)
|
||||
|
||||
Reference in New Issue
Block a user