- 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:
@@ -559,6 +559,7 @@ AARemoveAllCounter * AARemoveAllCounter::clone() const
|
||||
AAProliferate::AAProliferate(GameObserver* observer, int id, MTGCardInstance * source, Targetable * target,ManaCost * cost) :
|
||||
ActivatedAbility(observer, id, source, cost, 0)
|
||||
{
|
||||
this->GetId();
|
||||
}
|
||||
|
||||
int AAProliferate::resolve()
|
||||
@@ -3669,7 +3670,7 @@ void ABlink::Update(float dt)
|
||||
|
||||
MTGGameZone * inplay = spell->source->owner->game->inPlay;
|
||||
spell->source->target = NULL;
|
||||
for(int i = WRand(true)%inplay->nb_cards;;i = WRand(true)%inplay->nb_cards)
|
||||
for(int i = game->getRandomGenerator()->random()%inplay->nb_cards;;i = game->getRandomGenerator()->random()%inplay->nb_cards)
|
||||
{
|
||||
if(tc->canTarget(inplay->cards[i]) && spell->source->target == NULL)
|
||||
{
|
||||
@@ -3768,7 +3769,7 @@ void ABlink::resolveBlink()
|
||||
|
||||
MTGGameZone * inplay = spell->source->owner->game->inPlay;
|
||||
spell->source->target = NULL;
|
||||
for(int i = WRand(true)%inplay->nb_cards;;i = WRand(true)%inplay->nb_cards)
|
||||
for(int i = game->getRandomGenerator()->random()%inplay->nb_cards;;i = game->getRandomGenerator()->random()%inplay->nb_cards)
|
||||
{
|
||||
if(tc->canTarget(inplay->cards[i]) && spell->source->target == NULL)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user