@Override public CantActivateAbilitiesAttachedEffect copy() { return new CantActivateAbilitiesAttachedEffect(this); }
public DetainmentSpell(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{W}"); this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // Enchanted creature's activated abilities can't be activated. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantActivateAbilitiesAttachedEffect())); // {1}{W}: Attach Detainment Spell to target creature. ability = new SimpleActivatedAbility(new AttachEffect(Outcome.BoostCreature, "Attach {this} to target creature"), new ManaCostsImpl("{1}{W}")); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); }
public Encrust(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}{U}"); this.subtype.add(SubType.AURA); // Enchant artifact or creature TargetPermanent auraTarget = new TargetPermanent(filter); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // Enchanted permanent doesn't untap during its controller's untap step and its activated abilities can't be activated. ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepEnchantedEffect("permanent")); Effect effect = new CantActivateAbilitiesAttachedEffect(); effect.setText("and its activated abilities can't be activated"); ability.addEffect(effect); this.addAbility(ability); }
public VipersKiss(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B}"); this.subtype.add(SubType.AURA); // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.UnboostCreature)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // Enchanted creature gets -1/-1 and its activated abilities can't be activated. ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(-1,-1, Duration.WhileOnBattlefield)); Effect effect = new CantActivateAbilitiesAttachedEffect(); effect.setText("and its activated abilities can't be activated"); ability.addEffect(effect); this.addAbility(ability); }