use of mage.game.permanent.token.DragonTokenGold in project mage by magefree.
the class SwordOfDungeonsAndDragonsEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
int count = 1;
int amount = controller.rollDice(outcome, source, game, 20);
while (amount == 20) {
count += 1;
amount = controller.rollDice(outcome, source, game, 20);
}
return new CreateTokenEffect(new DragonTokenGold(), count).apply(game, source);
}
return false;
}
Aggregations