use of mage.game.permanent.token.IzoniInsectToken in project mage by magefree.
the class GristTheHungerTideTokenEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player == null) {
return false;
}
Permanent permanent = source.getSourcePermanentIfItStillExists(game);
Token token = new IzoniInsectToken();
while (true) {
token.putOntoBattlefield(1, game, source, source.getControllerId());
if (player.millCards(1, source, game).count(filter, game) < 1) {
break;
}
if (permanent != null) {
permanent.addCounters(CounterType.LOYALTY.createInstance(), source.getControllerId(), source, game);
}
}
return true;
}
Aggregations