From d255f25130940ae5f0de279d5c18da17073f2db5 Mon Sep 17 00:00:00 2001 From: "omegablast2002@yahoo.com" Date: Sun, 27 Feb 2011 14:42:54 +0000 Subject: [PATCH] fixed a reported issue where sometimes a card was ignored...originally i was incrementing up and resetting the value...found that it is far easier to increment down, as i remains the same even when cards become shifted from exile to play card.map...incrementing down guarantees that the positions of the remaining cards to check are going to be the same even if a few have been "unsuspended"... --- projects/mtg/src/MTGRules.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/projects/mtg/src/MTGRules.cpp b/projects/mtg/src/MTGRules.cpp index d8d87e259..63c33edc7 100644 --- a/projects/mtg/src/MTGRules.cpp +++ b/projects/mtg/src/MTGRules.cpp @@ -546,8 +546,8 @@ int MTGSuspendRule::receiveEvent(WEvent *e) { Player * p = game->currentPlayer; MTGGameZone * z = p->game->exile; - int originalAmount = z->nb_cards; - for (int i = 0; i < z->nb_cards; i++) + int originalAmount = z->nb_cards-1; + for (int i = originalAmount; i > -1; i--) { MTGCardInstance * card = z->cards[i]; @@ -559,11 +559,6 @@ int MTGSuspendRule::receiveEvent(WEvent *e) Spell * spell = game->mLayers->stackLayer()->addSpell(copy, game->targetChooser, NULL,1, 0); game->targetChooser = NULL; } - if(z->nb_cards != originalAmount) - { - i = 0; - originalAmount = z->nb_cards; - } } return 1; }