From 7a8635825759df74543dae8c6b3555f5c17389be Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sat, 7 Sep 2019 09:05:51 -0400 Subject: [PATCH] Implemented Tournament Grounds --- .../src/mage/cards/t/TournamentGrounds.java | 51 +++++++++++++++++++ Mage.Sets/src/mage/sets/ThroneOfEldraine.java | 1 + 2 files changed, 52 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/t/TournamentGrounds.java diff --git a/Mage.Sets/src/mage/cards/t/TournamentGrounds.java b/Mage.Sets/src/mage/cards/t/TournamentGrounds.java new file mode 100644 index 0000000000..bc357fbe08 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TournamentGrounds.java @@ -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); + } +} diff --git a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java index 35fdbed4cc..bfbf479d26 100644 --- a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java +++ b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java @@ -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));