use of mage.game.permanent.token.DragonToken2 in project mage by magefree.
the class SarkhanTheMadDragonDamageEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Permanent permanent = game.getPermanent(source.getTargets().getFirstTarget());
if (permanent != null) {
permanent.sacrifice(source, game);
Player player = game.getPlayer(permanent.getControllerId());
if (player != null) {
Token dragonToken = new DragonToken2();
dragonToken.putOntoBattlefield(1, game, source, player.getId());
}
}
return false;
}
use of mage.game.permanent.token.DragonToken2 in project mage by magefree.
the class DeathByDragonsEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
if (!playerId.equals(this.getTargetPointer().getFirst(game, source))) {
Token token = new DragonToken2();
token.putOntoBattlefield(1, game, source, playerId);
}
}
return true;
}
return false;
}
Aggregations