use of mage.abilities.effects.common.ExileCardEnteringGraveyardReplacementEffect in project mage by magefree.
the class SinsOfThePastEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Card card = game.getCard(this.getTargetPointer().getFirst(game, source));
if (card != null) {
ContinuousEffect effect = new PlayFromNotOwnHandZoneTargetEffect(Zone.GRAVEYARD, TargetController.YOU, Duration.EndOfTurn, true);
effect.setTargetPointer(new FixedTarget(card, game));
game.addEffect(effect, source);
effect = new ExileCardEnteringGraveyardReplacementEffect(card.getId());
game.addEffect(effect, source);
return true;
}
return false;
}
use of mage.abilities.effects.common.ExileCardEnteringGraveyardReplacementEffect in project mage by magefree.
the class EfreetFlamepainterEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
UUID targetId = source.getFirstTarget();
if (targetId != null) {
Card card = game.getCard(targetId);
if (card != null && controller.chooseUse(outcome, "Cast " + card.getName() + " without paying its mana cost?", source, game)) {
game.addEffect(new ExileCardEnteringGraveyardReplacementEffect(card.getId()), source);
game.getState().setValue("PlayFromNotOwnHandZone" + card.getId(), Boolean.TRUE);
controller.cast(controller.chooseAbilityForCast(card, game, true), game, true, new ApprovingObject(source, game));
game.getState().setValue("PlayFromNotOwnHandZone" + card.getId(), null);
}
}
return true;
}
Aggregations