forked from External/mage
50 lines
1.6 KiB
Java
50 lines
1.6 KiB
Java
|
|
package mage.cards.s;
|
|
|
|
import java.util.UUID;
|
|
import mage.abilities.Ability;
|
|
import mage.abilities.common.BecomesTappedAttachedTriggeredAbility;
|
|
import mage.abilities.effects.common.AttachEffect;
|
|
import mage.abilities.effects.common.counter.AddCountersAttachedEffect;
|
|
import mage.abilities.keyword.EnchantAbility;
|
|
import mage.cards.CardImpl;
|
|
import mage.cards.CardSetInfo;
|
|
import mage.constants.CardType;
|
|
import mage.constants.SubType;
|
|
import mage.constants.Outcome;
|
|
import mage.counters.BoostCounter;
|
|
import mage.target.TargetPermanent;
|
|
import mage.target.common.TargetCreaturePermanent;
|
|
|
|
/**
|
|
*
|
|
* @author Galatolol
|
|
*/
|
|
public final class SpiritShackle extends CardImpl {
|
|
|
|
public SpiritShackle(UUID ownerId, CardSetInfo setInfo) {
|
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{B}{B}");
|
|
|
|
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);
|
|
|
|
// Whenever enchanted creature becomes tapped, put a -0/-2 counter on it.
|
|
this.addAbility(new BecomesTappedAttachedTriggeredAbility(new AddCountersAttachedEffect(new BoostCounter(0, -2), "it"), "enchanted creature"));
|
|
|
|
}
|
|
|
|
public SpiritShackle(final SpiritShackle card) {
|
|
super(card);
|
|
}
|
|
|
|
@Override
|
|
public SpiritShackle copy() {
|
|
return new SpiritShackle(this);
|
|
}
|
|
}
|