-fix issue 187 (Double Strike + First Strike)
This commit is contained in:
wagic.the.homebrew@gmail.com
2009-11-15 10:23:37 +00:00
parent f6a75a0e43
commit d85b1d66de
6 changed files with 28 additions and 6 deletions
+3
View File
@@ -5,8 +5,11 @@ generic/attacks_each_turn.txt
generic/deathtouch.txt generic/deathtouch.txt
generic/doesnotuntap.txt generic/doesnotuntap.txt
generic/doesnotuntap2.txt generic/doesnotuntap2.txt
generic/double_strike.txt
generic/fear.txt generic/fear.txt
generic/fear_i147.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_strike.txt
generic/first_strike2.txt generic/first_strike2.txt
generic/first_strike3.txt generic/first_strike3.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]
+7 -5
View File
@@ -420,12 +420,14 @@ void GameStateDuel::Render()
mFont->DrawString(buf,0,SCREEN_HEIGHT/2); mFont->DrawString(buf,0,SCREEN_HEIGHT/2);
nbFailed = testSuite->nbAIFailed; nbFailed = testSuite->nbAIFailed;
nbTests = testSuite->nbAITests; nbTests = testSuite->nbAITests;
if (!nbFailed){ if (nbTests){
sprintf(buf, "AI Tests: All %i tests successful!", nbTests); if (!nbFailed){
}else{ sprintf(buf, "AI Tests: All %i tests successful!", nbTests);
sprintf(buf, "AI Tests: %i tests out of %i FAILED!", nbFailed, 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 #endif
break; break;
+1 -1
View File
@@ -680,7 +680,7 @@ int MTGCardInstance::stepPower(CombatStep step)
case DAMAGE : case DAMAGE :
case END_DAMAGE : case END_DAMAGE :
default : 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);
} }
} }