forked from External/mage
[OTJ] Implement Bovine Intervention
This commit is contained in:
parent
566a950e20
commit
e465eab1bc
3 changed files with 78 additions and 0 deletions
46
Mage.Sets/src/mage/cards/b/BovineIntervention.java
Normal file
46
Mage.Sets/src/mage/cards/b/BovineIntervention.java
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
package mage.cards.b;
|
||||
|
||||
import mage.abilities.effects.common.CreateTokenControllerTargetPermanentEffect;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.game.permanent.token.Ox22Token;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public final class BovineIntervention extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("artifact or creature");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
CardType.ARTIFACT.getPredicate(),
|
||||
CardType.CREATURE.getPredicate())
|
||||
);
|
||||
}
|
||||
|
||||
public BovineIntervention(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{W}");
|
||||
|
||||
// Destroy target artifact or creature. Its controller creates a 2/2 white Ox creature token.
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
this.getSpellAbility().addEffect(new CreateTokenControllerTargetPermanentEffect(new Ox22Token()));
|
||||
}
|
||||
|
||||
private BovineIntervention(final BovineIntervention card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BovineIntervention copy() {
|
||||
return new BovineIntervention(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -31,6 +31,7 @@ public final class OutlawsOfThunderJunction extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Armored Armadillo", 3, Rarity.COMMON, mage.cards.a.ArmoredArmadillo.class));
|
||||
cards.add(new SetCardInfo("Blooming Marsh", 266, Rarity.RARE, mage.cards.b.BloomingMarsh.class));
|
||||
cards.add(new SetCardInfo("Botanical Sanctum", 267, Rarity.RARE, mage.cards.b.BotanicalSanctum.class));
|
||||
cards.add(new SetCardInfo("Bovine Intervention", 6, Rarity.UNCOMMON, mage.cards.b.BovineIntervention.class));
|
||||
cards.add(new SetCardInfo("Bristling Backwoods", 253, Rarity.COMMON, mage.cards.b.BristlingBackwoods.class));
|
||||
cards.add(new SetCardInfo("Colossal Rattlewurm", 159, Rarity.RARE, mage.cards.c.ColossalRattlewurm.class));
|
||||
cards.add(new SetCardInfo("Concealed Courtyard", 268, Rarity.RARE, mage.cards.c.ConcealedCourtyard.class));
|
||||
|
|
|
|||
31
Mage/src/main/java/mage/game/permanent/token/Ox22Token.java
Normal file
31
Mage/src/main/java/mage/game/permanent/token/Ox22Token.java
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
package mage.game.permanent.token;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public final class Ox22Token extends TokenImpl {
|
||||
|
||||
public Ox22Token() {
|
||||
super("Ox Token", "2/2 white Ox creature token");
|
||||
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setWhite(true);
|
||||
subtype.add(SubType.OX);
|
||||
power = new MageInt(2);
|
||||
toughness = new MageInt(2);
|
||||
|
||||
}
|
||||
|
||||
private Ox22Token(final Ox22Token token) {
|
||||
super(token);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Ox22Token copy() {
|
||||
return new Ox22Token(this);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue