@Override public BecomesTargetAttachedTriggeredAbility copy() { return new BecomesTargetAttachedTriggeredAbility(this); }
public IllusionaryArmor(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{U}"); this.subtype.add(SubType.AURA); // Enchant Creature TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); this.addAbility(new EnchantAbility(auraTarget.getTargetName())); // Enchanted creature gets +4/+4. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(4, 4, Duration.WhileOnBattlefield))); // When enchanted creature becomes the target of a spell or ability, sacrifice Illusionary Armor. this.addAbility(new BecomesTargetAttachedTriggeredAbility(new SacrificeSourceEffect())); }
public IceCage(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // Enchanted creature can't attack or block, and its activated abilities can't be activated. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantBlockAttackActivateAttachedEffect())); // When enchanted creature becomes the target of a spell or ability, destroy Ice Cage. this.addAbility(new BecomesTargetAttachedTriggeredAbility(new DestroySourceEffect())); }
public SleepingPotion(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // When Sleeping Potion enters the battlefield, tap enchanted creature. this.addAbility(new EntersBattlefieldTriggeredAbility(new TapEnchantedEffect())); // Enchanted creature doesn't untap during its controller's untap step. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepEnchantedEffect())); // When enchanted creature becomes the target of a spell or ability, sacrifice Sleeping Potion. this.addAbility(new BecomesTargetAttachedTriggeredAbility(new SacrificeSourceEffect())); }