@Override public MagicEvent executeTrigger( final MagicGame game, final MagicPermanent permanent, final MagicPermanent creature) { return (permanent.isFriend(creature) && permanent.getController().getNrOfAttackers() == 1) ? new MagicEvent(permanent, creature, this, "RN gets +1/+1 until end of turn.") : MagicEvent.NONE; }
@Override public void executeEvent(final MagicGame game, final MagicEvent event) { final MagicPermanent permanent = event.getPermanent(); final Collection<MagicPermanent> targets = MagicTargetFilterFactory.ATTACKING_CREATURE.filter(event); for (final MagicPermanent creature : targets) { if (creature != permanent && creature.isAttacking()) { game.doAction(new ChangeTurnPTAction(creature, 1, 0)); } } }
@Override public MagicEvent executeTrigger( final MagicGame game, final MagicPermanent permanent, final MagicPayedCost payedCost) { return (permanent.getOpponent().hasState(MagicPlayerState.WasDealtDamage)) ? new MagicEvent( permanent, this, amount > 1 ? "SN enters the battlefield with " + amount + " +1/+1 counters on it." : "SN enters the battlefield with a +1/+1 counter on it.") : MagicEvent.NONE; }
@Override public MagicEvent executeTrigger( final MagicGame game, final MagicPermanent permanent, final MagicPlayer upkeepPlayer) { game.doAction(new ChangeCountersAction(permanent, MagicCounterType.Age, 1)); final int amount = permanent.getCounters(MagicCounterType.Age); final StringBuilder totalCost = new StringBuilder(); for (int i = 0; i < amount; i++) { totalCost.append(manaCost.toString()); } return new MagicEvent( permanent, new MagicMayChoice(new MagicPayManaCostChoice(MagicManaCost.create(totalCost.toString()))), this, "PN may$ " + genDescription(amount) + " If he or she doesn't, sacrifice SN."); }
@Override public boolean accept(final MagicPermanent permanent, final MagicPlayer upkeepPlayer) { return permanent.isController(upkeepPlayer); }
@Override protected int getTargetScore( final MagicGame game, final MagicPlayer player, final MagicPermanent permanent) { return permanent.getToughness(); }