@Override public AttachableToRestrictedAbility copy() { return new AttachableToRestrictedAbility(this); } }
public ONaginata(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}"); this.subtype.add(SubType.EQUIPMENT); Target target = new TargetControlledCreaturePermanent(1, 1, filter, false); // O-Naginata can be attached only to a creature with 3 or more power. this.addAbility(new AttachableToRestrictedAbility(target)); // Equipped creature gets +3/+0 and has trample. Effect effect = new BoostEquippedEffect(3, 0); effect.setText("Equipped creature gets +3/+0"); Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); effect = new GainAbilityAttachedEffect(TrampleAbility.getInstance(), AttachmentType.EQUIPMENT); effect.setText("and has trample"); ability.addEffect(effect); this.addAbility(ability); // Equip {2} this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2), target)); }
public GateSmasher(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); this.subtype.add(SubType.EQUIPMENT); Target target = new TargetControlledCreaturePermanent(1, 1, filter, false); // Gate Smasher can be attached only to a creature with toughness 4 or greater. this.addAbility(new AttachableToRestrictedAbility(target)); // Equipped creature gets +3/+0 and has trample. Effect effect = new BoostEquippedEffect(3, 0); effect.setText("Equipped creature gets +3/+0"); Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); effect = new GainAbilityAttachedEffect(TrampleAbility.getInstance(), AttachmentType.EQUIPMENT); effect.setText("and has trample"); ability.addEffect(effect); this.addAbility(ability); // Equip {3} this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(3), target)); }
public KondasBanner(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.EQUIPMENT); Target target = new TargetControlledCreaturePermanent(1, 1, legendaryFilter, false); // Konda's Banner can be attached only to a legendary creature. this.addAbility(new AttachableToRestrictedAbility(target)); // Creatures that share a color with equipped creature get +1/+1. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new KondasBannerColorBoostEffect())); // Creatures that share a creature type with equipped creature get +1/+1. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new KondasBannerTypeBoostEffect())); // Equip {2} this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2), target)); }