use of mage.abilities.common.delayed.ReflexiveTriggeredAbility in project mage by magefree.
the class CalibratedBlastEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player == null) {
return false;
}
Cards cards = new CardsImpl();
for (Card card : player.getLibrary().getCards(game)) {
cards.add(card);
if (card.isLand(game)) {
continue;
}
ReflexiveTriggeredAbility ability = new ReflexiveTriggeredAbility(new DamageTargetEffect(card.getManaValue()), false, "When you reveal " + "a nonland card this way, {this} deals damage equal to that card's mana value to any target");
ability.addTarget(new TargetAnyTarget());
game.fireReflexiveTriggeredAbility(ability, source);
break;
}
player.revealCards(source, cards, game);
player.putCardsOnBottomOfLibrary(cards, game, source, false);
return true;
}
use of mage.abilities.common.delayed.ReflexiveTriggeredAbility in project mage by magefree.
the class DiregrafHordeEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
if (!new ZombieDecayedToken().putOntoBattlefield(2, game, source, source.getControllerId())) {
return false;
}
ReflexiveTriggeredAbility ability = new ReflexiveTriggeredAbility(new ExileTargetEffect(), false, "exile up to two target cards from graveyards");
ability.addTarget(new TargetCardInGraveyard(0, 2));
game.fireReflexiveTriggeredAbility(ability, source);
return true;
}
Aggregations