Implemented Tournament Grounds

This commit is contained in:
Evan Kranzler 2019-09-07 09:05:51 -04:00
parent 8290710100
commit 7a86358257
2 changed files with 52 additions and 0 deletions

View file

@ -0,0 +1,51 @@
package mage.cards.t;
import mage.Mana;
import mage.abilities.mana.ColorlessManaAbility;
import mage.abilities.mana.ConditionalColoredManaAbility;
import mage.abilities.mana.conditional.ConditionalSpellManaBuilder;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.FilterSpell;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.SubtypePredicate;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class TournamentGrounds extends CardImpl {
private static final FilterSpell filter = new FilterSpell("a Knight or Equipment spell");
static {
filter.add(Predicates.or(
new SubtypePredicate(SubType.KNIGHT),
new SubtypePredicate(SubType.EQUIPMENT)
));
}
public TournamentGrounds(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
// {T}: Add {C}.
this.addAbility(new ColorlessManaAbility());
// {T}: Add {R}, {W}, or {B}. Spend this mana only to cast a Knight or Equipment spell.
this.addAbility(new ConditionalColoredManaAbility(Mana.RedMana(1), new ConditionalSpellManaBuilder(filter)));
this.addAbility(new ConditionalColoredManaAbility(Mana.WhiteMana(1), new ConditionalSpellManaBuilder(filter)));
this.addAbility(new ConditionalColoredManaAbility(Mana.BlackMana(1), new ConditionalSpellManaBuilder(filter)));
}
private TournamentGrounds(final TournamentGrounds card) {
super(card);
}
@Override
public TournamentGrounds copy() {
return new TournamentGrounds(this);
}
}

View file

@ -82,6 +82,7 @@ public final class ThroneOfEldraine extends ExpansionSet {
cards.add(new SetCardInfo("Thornwood Falls", 313, Rarity.COMMON, mage.cards.t.ThornwoodFalls.class));
cards.add(new SetCardInfo("Tome Raider", 68, Rarity.COMMON, mage.cards.t.TomeRaider.class));
cards.add(new SetCardInfo("Tome of Legends", 332, Rarity.RARE, mage.cards.t.TomeOfLegends.class));
cards.add(new SetCardInfo("Tournament Grounds", 248, Rarity.UNCOMMON, mage.cards.t.TournamentGrounds.class));
cards.add(new SetCardInfo("Wind-Scarred Crag", 308, Rarity.COMMON, mage.cards.w.WindScarredCrag.class));
cards.add(new SetCardInfo("Wintermoor Commander", 205, Rarity.UNCOMMON, mage.cards.w.WintermoorCommander.class));
cards.add(new SetCardInfo("Wishful Merfolk", 73, Rarity.COMMON, mage.cards.w.WishfulMerfolk.class));