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"...

This commit is contained in:
omegablast2002@yahoo.com
2011-02-27 14:42:54 +00:00
parent 1dddb54627
commit d255f25130
+2 -7
View File
@@ -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;
}