@Override public AddCardTypeSourceEffect copy() { return new AddCardTypeSourceEffect(this); }
public CrewAbility(int value) { super(Zone.BATTLEFIELD, new AddCardTypeSourceEffect(Duration.EndOfTurn, CardType.ARTIFACT), new CrewCost(value)); this.addEffect(new AddCardTypeSourceEffect(Duration.EndOfTurn, CardType.ARTIFACT, CardType.CREATURE)); this.value = value; }
public FleetwheelCruiser(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); this.subtype.add(SubType.VEHICLE); this.power = new MageInt(5); this.toughness = new MageInt(3); // Trample this.addAbility(TrampleAbility.getInstance()); // Haste this.addAbility(HasteAbility.getInstance()); // When Fleetwheel Cruiser enters the battlefield, it becomes an artifact creature until the end of turn. this.addAbility(new EntersBattlefieldTriggeredAbility( new AddCardTypeSourceEffect(Duration.EndOfTurn, CardType.ARTIFACT, CardType.CREATURE))); // Crew 2 this.addAbility(new CrewAbility(2)); }
@Override public boolean apply(Game game, Ability source) { Permanent sourcePermanent = game.getPermanent(source.getSourceId()); Permanent copyFromPermanent = game.getPermanent(getTargetPointer().getFirst(game, source)); if (sourcePermanent != null && copyFromPermanent != null) { game.copyPermanent(Duration.EndOfTurn, copyFromPermanent, sourcePermanent.getId(), source, new EmptyApplyToPermanent()); game.addEffect(new AddCardTypeSourceEffect(Duration.EndOfTurn, CardType.ARTIFACT), source); return true; } return false; } }
public HeartOfKiran(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.VEHICLE); this.power = new MageInt(4); this.toughness = new MageInt(4); // Flying this.addAbility(FlyingAbility.getInstance()); // Vigilance this.addAbility(VigilanceAbility.getInstance()); // Crew 3 this.addAbility(new CrewAbility(3)); // You may remove a loyalty counter from a planeswalker you control rather than pay Heart of Kiran's crew cost. Cost cost = new HeartOfKiranAlternateCrewCost(CounterType.LOYALTY, 1); Effect effect = new AddCardTypeSourceEffect(Duration.EndOfTurn, CardType.CREATURE); effect.setText("You may remove a loyalty counter from a planeswalker you control rather than pay {this}'s crew cost"); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, cost)); }