refactor Legendary Rule

This commit is contained in:
Anthony Calosa
2017-02-01 09:49:36 +08:00
parent c0afb3b95e
commit 7b0fdcd721
6 changed files with 72 additions and 70 deletions

View File

@@ -828,6 +828,22 @@ int MTGCardInstance::getCurrentToughness()
return toughness;
}
int MTGCardInstance::countDuplicateCardNames()
{
int count = 0;
if(observer)
{
int nb_cards = controller()->game->battlefield->nb_cards;
for(int x = 0; x < nb_cards; x++)
{
if(controller()->game->battlefield->cards[x]->name == this->name)
count+=1;
}
}
return count;
}
//check stack
bool MTGCardInstance::StackIsEmptyandSorcerySpeed()
{