Erwan
- Fix issue 42
This commit is contained in:
@@ -25,6 +25,7 @@ generic/rampage2.txt
|
|||||||
generic/regenerate.txt
|
generic/regenerate.txt
|
||||||
generic/sacrifice.txt
|
generic/sacrifice.txt
|
||||||
generic/summoning_sickness.txt
|
generic/summoning_sickness.txt
|
||||||
|
generic/tokens.txt
|
||||||
generic/wither.txt
|
generic/wither.txt
|
||||||
########################
|
########################
|
||||||
#Specific Cards
|
#Specific Cards
|
||||||
|
|||||||
@@ -0,0 +1,39 @@
|
|||||||
|
#Bug:Segfault in GuiPlay.cpp
|
||||||
|
[INIT]
|
||||||
|
SECONDMAIN
|
||||||
|
[PLAYER1]
|
||||||
|
inplay:1138
|
||||||
|
manapool:{5}
|
||||||
|
[PLAYER2]
|
||||||
|
inplay:hypnotic specter
|
||||||
|
[DO]
|
||||||
|
1138
|
||||||
|
eot
|
||||||
|
eot
|
||||||
|
next
|
||||||
|
#upkeep
|
||||||
|
next
|
||||||
|
#draw
|
||||||
|
next
|
||||||
|
#main
|
||||||
|
next
|
||||||
|
#combat begins
|
||||||
|
next
|
||||||
|
#attackers
|
||||||
|
-1138
|
||||||
|
next
|
||||||
|
#blockers
|
||||||
|
hypnotic specter
|
||||||
|
next
|
||||||
|
#damage
|
||||||
|
next
|
||||||
|
#end combat
|
||||||
|
eot
|
||||||
|
next
|
||||||
|
[ASSERT]
|
||||||
|
UPKEEP
|
||||||
|
[PLAYER1]
|
||||||
|
inplay:the hive
|
||||||
|
[PLAYER2]
|
||||||
|
inplay:hypnotic specter
|
||||||
|
[END]
|
||||||
@@ -104,7 +104,14 @@ void GameObserver::nextGamePhase(){
|
|||||||
if (currentGamePhase == Constants::MTG_PHASE_BEFORE_BEGIN){
|
if (currentGamePhase == Constants::MTG_PHASE_BEFORE_BEGIN){
|
||||||
cleanupPhase();
|
cleanupPhase();
|
||||||
currentPlayer->canPutLandsIntoPlay = 1;
|
currentPlayer->canPutLandsIntoPlay = 1;
|
||||||
|
mLayers->actionLayer()->cleanGarbage(); //clean abilities history for this turn;
|
||||||
|
mLayers->stackLayer()->garbageCollect(); //clean stack history for this turn;
|
||||||
mLayers->actionLayer()->Update(0);
|
mLayers->actionLayer()->Update(0);
|
||||||
|
for (int i=0; i < 2; i++){
|
||||||
|
delete (players[i]->game->garbage);
|
||||||
|
players[i]->game->garbage = NEW MTGGameZone();
|
||||||
|
players[i]->game->garbage->setOwner(players[i]);
|
||||||
|
}
|
||||||
combatStep = BLOCKERS;
|
combatStep = BLOCKERS;
|
||||||
return nextGamePhase();
|
return nextGamePhase();
|
||||||
}
|
}
|
||||||
@@ -117,14 +124,7 @@ void GameObserver::nextGamePhase(){
|
|||||||
//Auto Hand cleaning, in case the player didn't do it himself
|
//Auto Hand cleaning, in case the player didn't do it himself
|
||||||
while(currentPlayer->game->hand->nb_cards > 7)
|
while(currentPlayer->game->hand->nb_cards > 7)
|
||||||
currentPlayer->game->putInGraveyard(currentPlayer->game->hand->cards[0]);
|
currentPlayer->game->putInGraveyard(currentPlayer->game->hand->cards[0]);
|
||||||
mLayers->actionLayer()->cleanGarbage(); //clean abilities history for this turn;
|
|
||||||
mLayers->stackLayer()->garbageCollect(); //clean stack history for this turn;
|
|
||||||
mLayers->actionLayer()->Update(0);
|
mLayers->actionLayer()->Update(0);
|
||||||
for (int i=0; i < 2; i++){
|
|
||||||
delete (players[i]->game->garbage);
|
|
||||||
players[i]->game->garbage = NEW MTGGameZone();
|
|
||||||
players[i]->game->garbage->setOwner(players[i]);
|
|
||||||
}
|
|
||||||
return nextGamePhase();
|
return nextGamePhase();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -454,7 +454,10 @@ int TestSuite::phaseStrToInt(string s){
|
|||||||
if (s.compare("secondmain") == 0)return Constants::MTG_PHASE_SECONDMAIN;
|
if (s.compare("secondmain") == 0)return Constants::MTG_PHASE_SECONDMAIN;
|
||||||
if (s.compare("endofturn") == 0)return Constants::MTG_PHASE_ENDOFTURN;
|
if (s.compare("endofturn") == 0)return Constants::MTG_PHASE_ENDOFTURN;
|
||||||
if (s.compare("cleanup") == 0)return Constants::MTG_PHASE_CLEANUP;
|
if (s.compare("cleanup") == 0)return Constants::MTG_PHASE_CLEANUP;
|
||||||
return -1;
|
OutputDebugString("TESTSUITEAI: Unknown Phase name:");
|
||||||
|
OutputDebugString(s.c_str());
|
||||||
|
OutputDebugString("\n");
|
||||||
|
return Constants::MTG_PHASE_FIRSTMAIN;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestSuiteActions::cleanup(){
|
void TestSuiteActions::cleanup(){
|
||||||
|
|||||||
Reference in New Issue
Block a user