@Override public TapAttachedCost copy() { return new TapAttachedCost(this); } }
public VeteransVoice(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{R}"); this.subtype.add(SubType.AURA); // Enchant creature you control TargetPermanent auraTarget = new TargetControlledCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // Tap enchanted creature: Target creature other than the creature tapped this way gets +2/+1 until end of turn. Activate this ability only if enchanted creature is untapped. FilterPermanent filterTarget = new FilterCreaturePermanent("creature other than the creature tapped this way"); filterTarget.add(Predicates.not(new AttachmentByUUIDPredicate(this.getId()))); Ability ability2 = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(2, 1, Duration.EndOfTurn), new TapAttachedCost(), new AttachedToMatchesFilterCondition(filterUntapped)); ability2.addTarget(new TargetPermanent(filterTarget)); this.addAbility(ability2); }
public NaturesChosen(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{G}"); this.subtype.add(SubType.AURA); // Enchant creature you control TargetPermanent auraTarget = new TargetControlledCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // {0}: Untap enchanted creature. Activate this ability only during your turn and only once each turn. this.addAbility(new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new UntapEnchantedEffect(), new GenericManaCost(0), 1, MyTurnCondition.instance)); // Tap enchanted creature: Untap target artifact, creature, or land. Activate this ability only if enchanted creature is white and is untapped and only once each turn. Effect effect = new UntapTargetEffect(); effect.setText("Untap target artifact, creature, or land"); LimitedTimesPerTurnActivatedAbility ability2 = new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, effect, new TapAttachedCost(), 1, new AttachedToMatchesFilterCondition(filterWhiteUntappedCreature)); ability2.addTarget(new TargetPermanent(filterPermanent)); this.addAbility(ability2); }
public KrovikanPlague(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}"); this.subtype.add(SubType.AURA); // Enchant non-Wall creature you control TargetPermanent auraTarget = new TargetControlledCreaturePermanent(filterNonWall); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // When Krovikan Plague enters the battlefield, draw a card at the beginning of the next turn's upkeep. this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateDelayedTriggeredAbilityEffect( new AtTheBeginOfNextUpkeepDelayedTriggeredAbility(new DrawCardSourceControllerEffect(1), Duration.OneUse)), false)); // Tap enchanted creature: Tap enchanted creature: Krovikan Plague deals 1 damage to any target. Put a -0/-1 counter on enchanted creature. Activate this ability only if enchanted creature is untapped. Ability ability2 = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapAttachedCost(), new AttachedToMatchesFilterCondition(filter)); ability2.addEffect(new AddCountersAttachedEffect(new BoostCounter(0, -1),"enchanted creature")); ability2.addTarget(new TargetAnyTarget()); this.addAbility(ability2); }
public Earthlore(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{G}"); this.subtype.add(SubType.AURA); // Enchant land you control TargetPermanent auraTarget = new TargetControlledPermanent(filterLand); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // Tap enchanted land: Target blocking creature gets +1/+2 until end of turn. Activate this ability only if enchanted land is untapped. Cost cost = new TapAttachedCost(); cost.setText("Tap enchanted land"); Ability ability2 = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(1, 2, Duration.EndOfTurn), cost, new AttachedToMatchesFilterCondition(filterUntapped)); ability2.addTarget(new TargetCreaturePermanent(new FilterBlockingCreature("blocking creature"))); this.addAbility(ability2); }
public TourachsGate(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}{B}"); this.subtype.add(SubType.AURA); // Enchant land you control TargetPermanent auraTarget = new TargetControlledPermanent(filterLand); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // Sacrifice a Thrull: Put three time counters on Tourach's Gate. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.TIME.createInstance(3)), new SacrificeTargetCost(new TargetControlledCreaturePermanent(1,1, filterThrull, true)))); // At the beginning of your upkeep, remove a time counter from Tourach's Gate. If there are no time counters on Tourach's Gate, sacrifice it. this.addAbility(new BeginningOfUpkeepTriggeredAbility(new TourachsGateUpkeepEffect(), TargetController.YOU, false)); // Tap enchanted land: Attacking creatures you control get +2/-1 until end of turn. Activate this ability only if enchanted land is untapped. Cost cost = new TapAttachedCost(); cost.setText("Tap enchanted land"); this.addAbility(new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new BoostAllEffect(2, -1, Duration.EndOfTurn, filterAttackingCreatures, false), cost, new AttachedToMatchesFilterCondition(filterUntapped))); }