[ new MagicSpellCardEvent() { @Override public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) { return new MagicEvent( cardOnStack, this, "PN puts a 1/1 black Rat creature token onto the battlefield. " + "If the buyback cost was payed, return SN to its owner's hand as it resolves." ); } @Override public void executeEvent(final MagicGame game, final MagicEvent event) { game.doAction(new MagicPlayTokenAction( event.getPlayer(), TokenCardDefinitions.get("1/1 black Rat creature token") )); if (event.isBuyback()) { game.doAction(new MagicChangeCardDestinationAction(event.getCardOnStack(), MagicLocationType.OwnersHand)); } } } ]