use of mage.abilities.effects.common.PhaseOutTargetEffect in project mage by magefree.
the class SpectralAdversaryEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Integer timesPaid = (Integer) getValue("timesPaid");
if (timesPaid == null || timesPaid <= 0) {
return false;
}
ReflexiveTriggeredAbility ability = new ReflexiveTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(timesPaid)), false, staticText);
ability.addEffect(new PhaseOutTargetEffect());
ability.addTarget(new TargetPermanent(0, timesPaid, filter));
game.fireReflexiveTriggeredAbility(ability, source);
return true;
}
Aggregations