@Override public BecomesCreatureTargetEffect copy() { return new BecomesCreatureTargetEffect(this); }
@Override public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { Permanent sourcePermanent = game.getPermanent(source.getSourceId()); if (sourcePermanent == null) { this.discard(); return false; } return super.apply(layer, sublayer, source, game); }
@Override public boolean apply(Game game, Ability source) { for (Effect sourceEffect : source.getEffects()) { if (sourceEffect instanceof SearchLibraryPutInPlayEffect) { Cards foundCards = new CardsImpl(((SearchLibraryPutInPlayEffect) sourceEffect).getTargets()); if (!foundCards.isEmpty()) { FixedTargets fixedTargets = new FixedTargets(foundCards, game); UntapTargetEffect untapEffect = new UntapTargetEffect(); untapEffect.setTargetPointer(fixedTargets); untapEffect.apply(game, source); BecomesCreatureTargetEffect becomesCreatureEffect = new BecomesCreatureTargetEffect(new HuntingWildsToken(), false, true, Duration.Custom); becomesCreatureEffect.setTargetPointer(fixedTargets); game.addEffect(becomesCreatureEffect, source); } return true; } } return false; } }
public SpikeTiller(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); this.subtype.add(SubType.SPIKE); this.power = new MageInt(0); this.toughness = new MageInt(0); // Spike Tiller enters the battlefield with three +1/+1 counters on it. this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(3)), "with three +1/+1 counters on it")); // {2}, Remove a +1/+1 counter from Spike Tiller: Put a +1/+1 counter on target creature. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.P1P1.createInstance()), new GenericManaCost(2)); ability.addCost(new RemoveCountersSourceCost(CounterType.P1P1.createInstance())); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); // {2}, Remove a +1/+1 counter from Spike Tiller: Target land becomes a 2/2 creature that's still a land. Put a +1/+1 counter on it. Ability ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureTargetEffect(new CreatureToken(2, 2), false, true, Duration.EndOfGame).setText("Target land becomes a 2/2 creature that's still a land. "), new GenericManaCost(2)); ability2.addCost(new RemoveCountersSourceCost(CounterType.P1P1.createInstance())); ability2.addEffect(new AddCountersTargetEffect(CounterType.P1P1.createInstance()).setText("Put a +1/+1 counter on it.")); ability2.addTarget(new TargetLandPermanent()); this.addAbility(ability2); }
this.discard();
public Soilshaper(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(1); // Whenever you cast a Spirit or Arcane spell, target land becomes a 3/3 creature until end of turn. It's still a land. Ability ability = new SpellCastControllerTriggeredAbility(new BecomesCreatureTargetEffect(new CreatureToken(3, 3), false, true, Duration.EndOfTurn), StaticFilters.SPIRIT_OR_ARCANE_CARD, false); ability.addTarget(new TargetLandPermanent()); this.addAbility(ability); }
@Override public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) { Permanent sourcePermanent = game.getPermanent(source.getSourceId()); if (sourcePermanent == null) { this.discard(); return false; } return super.apply(layer, sublayer, source, game); }
public MishrasGroundbreaker(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); // {tap}, Sacrifice Mishra's Groundbreaker: Target land becomes a 3/3 artifact creature that's still a land. (This effect lasts indefinitely.) Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureTargetEffect(new MishrasGroundbreakerToken(), false, true, Duration.Custom), new TapSourceCost()); ability.addCost(new SacrificeSourceCost()); ability.addTarget(new TargetLandPermanent()); this.addAbility(ability); }
public Omnibian(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}{U}"); this.subtype.add(SubType.FROG); this.power = new MageInt(3); this.toughness = new MageInt(3); // {T}: Target creature becomes a 3/3 Frog until end of turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureTargetEffect( new CreatureToken(3, 3, "3/3 Frog", SubType.FROG), false, false, Duration.EndOfTurn), new TapSourceCost()); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); }
@Override public boolean apply(Game game, Ability source) { int xValue = new PermanentsOnBattlefieldCount(filter).calculate(game, source, this); ContinuousEffect effect = new BecomesCreatureTargetEffect(new ElvishBranchbenderToken(xValue), false, false, Duration.EndOfTurn); // fix effect.setTargetPointer(targetPointer); game.addEffect(effect, source); return false; } }
@Override public boolean apply(Game game, Ability source) { int amount = new PermanentsOnBattlefieldCount(filterAllies).calculate(game, source, this); ContinuousEffect effect = new BecomesCreatureTargetEffect(new VastwoodAnimistElementalToken(amount), false, true, Duration.EndOfTurn); effect.setTargetPointer(targetPointer); game.addEffect(effect, source); return false; } }
public BalduvianConjurer(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); this.subtype.add(SubType.HUMAN, SubType.WIZARD); this.power = new MageInt(0); this.toughness = new MageInt(2); // {tap}: Target snow land becomes a 2/2 creature until end of turn. It's still a land. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureTargetEffect(new CreatureToken(2, 2), false, true, Duration.EndOfTurn), new TapSourceCost()); ability.addTarget(new TargetPermanent(filter)); this.addAbility(ability); }
public Hydroform(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{G}{U}"); // Target land becomes a 3/3 Elemental creature with flying until end of turn. It's still a land. this.getSpellAbility().addEffect(new BecomesCreatureTargetEffect(new HydroformToken(), false, true, Duration.EndOfTurn)); this.getSpellAbility().addTarget(new TargetLandPermanent()); }
public AnthousaSetessanHero(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); this.addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); this.toughness = new MageInt(5); // <i>Heroic</i> — Whenever you cast a spell that targets Anthousa, Setessan Hero, up to three target lands you control each become 2/2 Warrior creatures until end of turn. They're still lands. Ability ability = new HeroicAbility(new BecomesCreatureTargetEffect(new CreatureToken(2, 2, "2/2 Warrior creature", SubType.WARRIOR),false,true, Duration.EndOfTurn)); ability.addTarget(new TargetControlledPermanent(0,3,new FilterControlledLandPermanent("lands"), false)); this.addAbility(ability); }
public AnimateLand(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{G}"); // Until end of turn, target land becomes a 3/3 creature that's still a land. this.getSpellAbility().addEffect(new BecomesCreatureTargetEffect(new CreatureToken(3, 3), false, true, Duration.EndOfTurn)); this.getSpellAbility().addTarget(new TargetLandPermanent()); }
public BalduvianFrostwaker(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); this.toughness = new MageInt(1); // {U}, {T}: Target snow land becomes a 2/2 blue Elemental creature with flying. It's still a land. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureTargetEffect(new BalduvianFrostwakerToken(), false, true, Duration.Custom), new ManaCostsImpl("{U}")); ability.addCost(new TapSourceCost()); ability.addTarget(new TargetPermanent(filter)); this.addAbility(ability); }
public TurnToFrog(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}"); // Until end of turn, target creature loses all abilities and becomes a blue Frog with base power and toughness 1/1. Effect effect = new BecomesCreatureTargetEffect(new FrogToken(), true, false, Duration.EndOfTurn); effect.setText("Until end of turn, target creature loses all abilities and becomes a blue Frog with base power and toughness 1/1"); this.getSpellAbility().addEffect(effect); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); }
public DanceOfTheSkywise(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}"); // Until end of turn, target creature you control becomes a blue Dragon Illusion with base power and toughness 4/4, loses all abilities, and gains flying. Effect effect = new BecomesCreatureTargetEffect(new DragonIllusionToken(), true, false, Duration.EndOfTurn); effect.setText("Until end of turn, target creature you control becomes a blue Dragon Illusion with base power and toughness 4/4, loses all abilities, and gains flying."); this.getSpellAbility().addEffect(effect); this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); }
public GiftOfTusks(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{U}"); // Until end of turn, target creature loses all abilities and becomes a green Elephant with base power and toughness 3/3. Effect effect = new BecomesCreatureTargetEffect(new ElephantToken(), true, false, Duration.EndOfTurn); effect.setText("Until end of turn, target creature loses all abilities and becomes a green Elephant with base power and toughness 3/3"); this.getSpellAbility().addEffect(effect); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); }
ContinuousEffect continuousEffect = new BecomesCreatureTargetEffect(new AwakenElementalToken(), false, true, Duration.Custom); continuousEffect.setTargetPointer(fixedTarget); game.addEffect(continuousEffect, source);