diff --git a/projects/mtg/bin/Res/test/_tests.txt b/projects/mtg/bin/Res/test/_tests.txt index ddf47c7ed..1bd250953 100644 --- a/projects/mtg/bin/Res/test/_tests.txt +++ b/projects/mtg/bin/Res/test/_tests.txt @@ -5,8 +5,11 @@ generic/attacks_each_turn.txt generic/deathtouch.txt generic/doesnotuntap.txt generic/doesnotuntap2.txt +generic/double_strike.txt generic/fear.txt generic/fear_i147.txt +generic/first_and_double_strike1_i187.txt +generic/first_and_double_strike2_i187.txt generic/first_strike.txt generic/first_strike2.txt generic/first_strike3.txt diff --git a/projects/mtg/bin/Res/test/generic/double_strike.txt b/projects/mtg/bin/Res/test/generic/double_strike.txt new file mode 100644 index 000000000..61e9119c6 --- /dev/null +++ b/projects/mtg/bin/Res/test/generic/double_strike.txt @@ -0,0 +1,17 @@ +[INIT] +firstmain +[PLAYER1] +inplay:Hearthfire Hobgoblin +[PLAYER2] +[DO] +next +next +Hearthfire Hobgoblin +eot +[ASSERT] +untap +[PLAYER1] +inplay:Hearthfire Hobgoblin +[PLAYER2] +life:16 +[END] diff --git a/projects/mtg/bin/Res/test/bugs/first_and_double_strike1_i187.txt b/projects/mtg/bin/Res/test/generic/first_and_double_strike1_i187.txt similarity index 100% rename from projects/mtg/bin/Res/test/bugs/first_and_double_strike1_i187.txt rename to projects/mtg/bin/Res/test/generic/first_and_double_strike1_i187.txt diff --git a/projects/mtg/bin/Res/test/bugs/first_and_double_strike2_i187.txt b/projects/mtg/bin/Res/test/generic/first_and_double_strike2_i187.txt similarity index 100% rename from projects/mtg/bin/Res/test/bugs/first_and_double_strike2_i187.txt rename to projects/mtg/bin/Res/test/generic/first_and_double_strike2_i187.txt diff --git a/projects/mtg/src/GameStateDuel.cpp b/projects/mtg/src/GameStateDuel.cpp index 3c38d5feb..c7135c4fe 100644 --- a/projects/mtg/src/GameStateDuel.cpp +++ b/projects/mtg/src/GameStateDuel.cpp @@ -420,12 +420,14 @@ void GameStateDuel::Render() mFont->DrawString(buf,0,SCREEN_HEIGHT/2); nbFailed = testSuite->nbAIFailed; nbTests = testSuite->nbAITests; - if (!nbFailed){ - sprintf(buf, "AI Tests: All %i tests successful!", nbTests); - }else{ - sprintf(buf, "AI Tests: %i tests out of %i FAILED!", nbFailed, nbTests); + if (nbTests){ + if (!nbFailed){ + sprintf(buf, "AI Tests: All %i tests successful!", nbTests); + }else{ + sprintf(buf, "AI Tests: %i tests out of %i FAILED!", nbFailed, nbTests); + } + mFont->DrawString(buf,0,SCREEN_HEIGHT/2+20); } - mFont->DrawString(buf,0,SCREEN_HEIGHT/2+20); } #endif break; diff --git a/projects/mtg/src/MTGCardInstance.cpp b/projects/mtg/src/MTGCardInstance.cpp index a3d3a2039..dbe930e1a 100644 --- a/projects/mtg/src/MTGCardInstance.cpp +++ b/projects/mtg/src/MTGCardInstance.cpp @@ -680,7 +680,7 @@ int MTGCardInstance::stepPower(CombatStep step) case DAMAGE : case END_DAMAGE : default : - if (has(Constants::FIRSTSTRIKE)) return 0; else return MAX(0, power); + if (has(Constants::FIRSTSTRIKE) && !has(Constants::DOUBLESTRIKE)) return 0; else return MAX(0, power); } }