public TidehollowScullerAbility0(GameState state) { super( state, "When Tidehollow Sculler enters the battlefield, target opponent reveals his or her hand and you choose a nonland card from it. Exile that card."); this.addPattern(whenThisEntersTheBattlefield()); SetGenerator target = targetedBy(this.addTarget(OpponentsOf.instance(You.instance()), "target opponent")); SetGenerator inTargetsHand = InZone.instance(HandOf.instance(target)); EventFactory reveal = new EventFactory(EventType.REVEAL, "Target opponent reveals his or her hand"); reveal.parameters.put(EventType.Parameter.CAUSE, This.instance()); reveal.parameters.put(EventType.Parameter.OBJECT, inTargetsHand); this.addEffect(reveal); EventFactory exile = new EventFactory( EventType.EXILE_CHOICE, "and you choose a nonland card from it. Exile that card."); exile.parameters.put(EventType.Parameter.CAUSE, This.instance()); exile.parameters.put( EventType.Parameter.OBJECT, RelativeComplement.instance(inTargetsHand, HasType.instance(Type.LAND))); exile.parameters.put(EventType.Parameter.PLAYER, You.instance()); exile.setLink(this); this.addEffect(exile); this.getLinkManager().addLinkClass(TidehollowScullerAbility1.class); }
public TheLordTakethAway(GameState state) { super(state, "When Journey to Nowhere enters the battlefield, exile target creature."); this.addPattern(whenThisEntersTheBattlefield()); Target target = this.addTarget(CreaturePermanents.instance(), "target creature"); EventFactory exile = exile(targetedBy(target), "Exile target creature."); exile.setLink(this); this.addEffect(exile); this.getLinkManager().addLinkClass(TheLordGivethBack.class); }