@Override public AsTurnedFaceUpEffect copy() { return new AsTurnedFaceUpEffect(this); }
public VesuvanShapeshifter(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{U}"); this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(0); this.toughness = new MageInt(0); // As Vesuvan Shapeshifter turned face up, may choose another creature. If you do, until Vesuvan Shapeshifter is turned face down, it becomes a copy of that creature Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new AsTurnedFaceUpEffect(new VesuvanShapeshifterEffect(), false)); ability.setWorksFaceDown(true); this.addAbility(ability); // As Vesuvan Shapeshifter etbs, you may choose another creature. If you do, until Vesuvan Shapeshifter is turned face down, it becomes a copy of that creature Effect effect = new CopyPermanentEffect(StaticFilters.FILTER_PERMANENT_CREATURE, new VesuvanShapeShifterFaceUpApplier()); effect.setText("as a copy of any creature on the battlefield until {this} is turned faced down"); ability = new EntersBattlefieldAbility(effect, true); ability.setWorksFaceDown(false); this.addAbility(ability); // and has "At the beginning of your upkeep, you may turn this creature face down". effect = new VesuvanShapeshifterFaceDownEffect(); ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, effect, TargetController.YOU, true); this.addAbility(ability); // Morph {1}{U} this.addAbility(new MorphAbility(this, new ManaCostsImpl("{1}{U}"))); }
public HoodedHydra(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{X}{G}{G}"); this.subtype.add(SubType.SNAKE); this.subtype.add(SubType.HYDRA); this.power = new MageInt(0); this.toughness = new MageInt(0); // Hooded Hydra enters the battlefield with X +1/+1 counters on it. this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.P1P1.createInstance()))); // When Hooded Hydra dies, create a 1/1 green Snake creature token for each +1/+1 counter on it. this.addAbility(new DiesTriggeredAbility(new CreateTokenEffect(new SnakeToken("KTK"), new CountersSourceCount(CounterType.P1P1)), false)); // Morph {3}{G}{G} this.addAbility(new MorphAbility(this, new ManaCostsImpl("{3}{G}{G}"))); // As Hooded Hydra is turned face up, put five +1/+1 counters on it. Effect effect = new AddCountersSourceEffect(CounterType.P1P1.createInstance(5)); effect.setText("put five +1/+1 counters on it"); // TODO: Does not work because the ability is still removed from permanent while the effect checks if the ability still exists. Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new AsTurnedFaceUpEffect(effect, false)); ability.setWorksFaceDown(true); this.addAbility(ability); }