tokenizer should work now for cloning ability

Populate(Put a token onto the battlefield that's a copy of a creature
token you control.)
This commit is contained in:
Anthony Calosa
2015-08-24 22:39:54 +08:00
parent ac29367ff8
commit 2998e95a3b
+14
View File
@@ -2489,6 +2489,19 @@ int AACloner::resolve()
Player * targetPlayer = who == 1 ? source->controller()->opponent() : source->controller();
int tokenize = 1;//tokenizer support for cloning
if (targetPlayer->game->battlefield->hasAbility(Constants::TOKENIZER))
{
int nbcards = targetPlayer->game->battlefield->nb_cards;
for (int j = 0; j < nbcards; j++)
{
if (targetPlayer->game->battlefield->cards[j]->has(Constants::TOKENIZER))
tokenize *= 2;
}
}
for (int i = 0; i < tokenize; ++i)
{
MTGCardInstance * myClone = NEW MTGCardInstance(clone, targetPlayer->game);
targetPlayer->game->temp->addCard(myClone);
@@ -2518,6 +2531,7 @@ int AACloner::resolve()
spell->source->addType(*it);
}
delete spell;
}
return 1;
}