def Draw = new MagicPermanentActivation( new MagicActivationHints(MagicTiming.Draw), "Draw" ) { @Override public MagicEvent[] getCostEvent(final MagicPermanent source) { return [ new MagicTapEvent(source), new MagicPayLifeEvent(source,1), ]; } @Override public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) { return new MagicEvent( source, this, "PN draws a card" ); } @Override public void executeEvent(final MagicGame game,final MagicEvent event) { game.doAction(new MagicDrawAction(event.getPlayer())); } } [ new MagicStatic(MagicLayer.Ability) { @Override public void modAbilityFlags(final MagicPermanent source, final MagicPermanent permanent, final Set flags) { permanent.addAbility(Draw); } @Override public boolean accept(final MagicGame game,final MagicPermanent source,final MagicPermanent target) { return MagicStatic.acceptLinked(game, source, target); } } ]