mirror of
https://github.com/correl/mage.git
synced 2025-01-12 03:00:13 +00:00
[BRO] Implement Defabricate
This commit is contained in:
parent
91faa1a4de
commit
250ffd1b6f
2 changed files with 53 additions and 0 deletions
52
Mage.Sets/src/mage/cards/d/Defabricate.java
Normal file
52
Mage.Sets/src/mage/cards/d/Defabricate.java
Normal file
|
@ -0,0 +1,52 @@
|
|||
package mage.cards.d;
|
||||
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.effects.common.CounterTargetEffect;
|
||||
import mage.abilities.effects.common.CounterTargetWithReplacementEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.PutCards;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.target.TargetSpell;
|
||||
import mage.target.common.TargetActivatedOrTriggeredAbility;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class Defabricate extends CardImpl {
|
||||
|
||||
private static final FilterSpell filter = new FilterSpell("artifact or enchantment spell");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
CardType.ARTIFACT.getPredicate(),
|
||||
CardType.ENCHANTMENT.getPredicate()
|
||||
));
|
||||
}
|
||||
|
||||
public Defabricate(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}");
|
||||
|
||||
// Choose one --
|
||||
// * Counter target artifact or enchantment spell. If a spell is countered this way, exile it instead of putting it into its owner's graveyard.
|
||||
this.getSpellAbility().addEffect(new CounterTargetWithReplacementEffect(PutCards.EXILED));
|
||||
this.getSpellAbility().addTarget(new TargetSpell(filter));
|
||||
|
||||
// * Counter target activated or triggered ability.
|
||||
this.getSpellAbility().addMode(new Mode(new CounterTargetEffect())
|
||||
.addTarget(new TargetActivatedOrTriggeredAbility()));
|
||||
}
|
||||
|
||||
private Defabricate(final Defabricate card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Defabricate copy() {
|
||||
return new Defabricate(this);
|
||||
}
|
||||
}
|
|
@ -48,6 +48,7 @@ public final class TheBrothersWar extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Clay Revenant", 118, Rarity.COMMON, mage.cards.c.ClayRevenant.class));
|
||||
cards.add(new SetCardInfo("Combat Thresher", 35, Rarity.UNCOMMON, mage.cards.c.CombatThresher.class));
|
||||
cards.add(new SetCardInfo("Corrupt", 88, Rarity.UNCOMMON, mage.cards.c.Corrupt.class));
|
||||
cards.add(new SetCardInfo("Defabricate", 45, Rarity.UNCOMMON, mage.cards.d.Defabricate.class));
|
||||
cards.add(new SetCardInfo("Depth Charge Colossus", 78, Rarity.COMMON, mage.cards.d.DepthChargeColossus.class));
|
||||
cards.add(new SetCardInfo("Diabolic Intent", 89, Rarity.RARE, mage.cards.d.DiabolicIntent.class));
|
||||
cards.add(new SetCardInfo("Disciples of Gix", 90, Rarity.UNCOMMON, mage.cards.d.DisciplesOfGix.class));
|
||||
|
|
Loading…
Reference in a new issue