diff --git a/projects/mtg/bin/Res/test/_tests.txt b/projects/mtg/bin/Res/test/_tests.txt index d67539d50..4cf9f6fac 100644 --- a/projects/mtg/bin/Res/test/_tests.txt +++ b/projects/mtg/bin/Res/test/_tests.txt @@ -102,6 +102,7 @@ seismic_assault.txt siege_gang_commander.txt shivan_hellkite.txt shock.txt +sphinx_summoner.txt spark_elemental.txt spirit_link.txt stasis.txt @@ -122,4 +123,4 @@ zombify.txt #Momir Basic Tests ######################## momir/keldon_warlord.txt -momir/overcost.txt \ No newline at end of file +momir/overcost.txt diff --git a/projects/mtg/bin/Res/test/sphinx_summoner.txt b/projects/mtg/bin/Res/test/sphinx_summoner.txt new file mode 100644 index 000000000..9c21922c9 --- /dev/null +++ b/projects/mtg/bin/Res/test/sphinx_summoner.txt @@ -0,0 +1,22 @@ +#Bug: Sphinx summoner doesn't allow to search the library +# text=Flying When Sphinx Summoner comes into play, you may search your library for an artifact creature card, reveal it, and put it into your hand. If you do, shuffle your library. +[INIT] +FIRSTMAIN +[PLAYER1] +hand:Sphinx Summoner +library:swamp,plains,dragon engine,mountain +manapool:{3}{B}{U} +[PLAYER2] +[DO] +Sphinx Summoner +choice 0 +dragon engine +[ASSERT] +FIRSTMAIN +[PLAYER1] +library:*,*,* +hand:dragon engine +inplay:sphinx summoner +manapool:{0} +[PLAYER2] +[END] \ No newline at end of file diff --git a/projects/mtg/src/GameObserver.cpp b/projects/mtg/src/GameObserver.cpp index eb7c0cf81..ec37a16d6 100644 --- a/projects/mtg/src/GameObserver.cpp +++ b/projects/mtg/src/GameObserver.cpp @@ -302,14 +302,15 @@ void GameObserver::ButtonPressed (int controllerId, PlayGuiObject * _object){ forceShuffleLibraries(); } else { int pId = (-id - 4)/2; - if (targetChooser && targetChooser->targetsZone(players[pId]->game->library)){ + TargetChooser * _tc = this->getCurrentTargetChooser(); + if (_tc && _tc->targetsZone(players[pId]->game->library)){ zone->toggleDisplay(); forceShuffleLibrary[pId] = 1; } } } - if (id== -5 || id == -3){ //TODO libraries ??? + if (id== -5 || id == -3){ GuiGameZone * zone = (GuiGameZone *)_object; zone->toggleDisplay(); } diff --git a/projects/mtg/src/TestSuiteAI.cpp b/projects/mtg/src/TestSuiteAI.cpp index db4dcf385..73f250979 100644 --- a/projects/mtg/src/TestSuiteAI.cpp +++ b/projects/mtg/src/TestSuiteAI.cpp @@ -325,9 +325,10 @@ int TestSuite::assertGame(){ for (int j = 0; j < 4; j++){ MTGGameZone * zone = playerZones[j]; if (zone->nb_cards != endState.playerData[i].zones[j].nbitems){ - Log("==Card number not the same==
"); - error++; - return 0; + sprintf(result, "==Card number not the same in %i==
",j); + Log(result); + error++; + return 0; } for (int k = 0; k < endState.playerData[i].zones[j].nbitems; k++){ int cardid = endState.playerData[i].zones[j].cards[k];