Fix issue 563 (double strike VS regenerate)

-- also made "blocked" variable a private.
This commit is contained in:
wagic.the.homebrew
2011-10-10 12:29:52 +00:00
parent 9b2654997e
commit f0964d9af8
8 changed files with 14 additions and 10 deletions
+4 -1
View File
@@ -791,7 +791,10 @@ int MTGCardInstance::getDefenserRank(MTGCardInstance * blocker)
int MTGCardInstance::removeBlocker(MTGCardInstance * blocker)
{
blockers.remove(blocker);
if (!blockers.size())
// Blockers can be removed "manually" (by the blocking player) at the Blockers step,
// Or "automatically" in the damage phase, when they die and regenerate (see http://code.google.com/p/wagic/issues/detail?id=563 )
// In the second case, we still want the card to be marked as "blocked" this turn
if (!blockers.size() && observer->currentGamePhase == Constants::MTG_PHASE_COMBATBLOCKERS)
{
blocked = false;
}