@Override
 public void executeEvent(final MagicGame game, final MagicEvent event) {
   final MagicPlayer player = event.getPlayer();
   final MagicCardList hand = new MagicCardList(player.getHand());
   for (final MagicCard card : hand) {
     game.doAction(new DiscardCardAction(player, card));
   }
 }
示例#2
0
 @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 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 void executeEvent(final MagicGame game, final MagicEvent event) {
   game.doAction(new SacrificeAction(event.getPermanent()));
 }
示例#5
0
 @Override
 public void executeEvent(final MagicGame game, final MagicEvent event) {
   game.doAction(new ChangeTurnPTAction(event.getRefPermanent(), 1, 1));
 }
 @Override
 public void executeEvent(final MagicGame game, final MagicEvent event) {
   game.doAction(
       ChangeCountersAction.Enters(event.getPermanent(), MagicCounterType.PlusOne, amount));
 }