use of mage.game.permanent.token.HourOfNeedSphinxToken in project mage by magefree.
the class HourOfNeedExileEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
for (UUID creatureId : getTargetPointer().getTargets(game, source)) {
Permanent creature = game.getPermanent(creatureId);
if (creature != null) {
controller.moveCardToExileWithInfo(creature, null, null, source, game, Zone.BATTLEFIELD, true);
Token token = new HourOfNeedSphinxToken();
token.putOntoBattlefield(1, game, source, creature.getControllerId());
}
}
return true;
}
return false;
}
Aggregations