From e20c5f2da81cd875d7dc9d160b824a6327804bf3 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Wed, 18 Sep 2019 19:44:40 -0400 Subject: [PATCH] Implemented Rampart Smasher --- .../src/mage/cards/r/RampartSmasher.java | 52 +++++++++++++++++++ Mage.Sets/src/mage/sets/ThroneOfEldraine.java | 1 + 2 files changed, 53 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/r/RampartSmasher.java diff --git a/Mage.Sets/src/mage/cards/r/RampartSmasher.java b/Mage.Sets/src/mage/cards/r/RampartSmasher.java new file mode 100644 index 0000000000..381abf43da --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RampartSmasher.java @@ -0,0 +1,52 @@ +package mage.cards.r; + +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SubtypePredicate; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class RampartSmasher extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Knights or Walls"); + + static { + filter.add(Predicates.or( + new SubtypePredicate(SubType.KNIGHT), + new SubtypePredicate(SubType.WALL) + )); + } + + public RampartSmasher(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R/G}{R/G}{R/G}{R/G}"); + + this.subtype.add(SubType.GIANT); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + // Rampart Smasher can't be blocked by Knights or Walls. + this.addAbility(new SimpleStaticAbility( + new CantBeBlockedByCreaturesSourceEffect(filter, Duration.WhileOnBattlefield) + )); + } + + private RampartSmasher(final RampartSmasher card) { + super(card); + } + + @Override + public RampartSmasher copy() { + return new RampartSmasher(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java index 0db97bfc5b..f373d99868 100644 --- a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java +++ b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java @@ -165,6 +165,7 @@ public final class ThroneOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Questing Beast", 171, Rarity.MYTHIC, mage.cards.q.QuestingBeast.class)); cards.add(new SetCardInfo("Raging Redcap", 134, Rarity.COMMON, mage.cards.r.RagingRedcap.class)); cards.add(new SetCardInfo("Rally for the Throne", 25, Rarity.UNCOMMON, mage.cards.r.RallyForTheThrone.class)); + cards.add(new SetCardInfo("Rampart Smasher", 213, Rarity.UNCOMMON, mage.cards.r.RampartSmasher.class)); cards.add(new SetCardInfo("Rankle, Master of Pranks", 101, Rarity.MYTHIC, mage.cards.r.RankleMasterOfPranks.class)); cards.add(new SetCardInfo("Realm-Cloaked Giant", 26, Rarity.MYTHIC, mage.cards.r.RealmCloakedGiant.class)); cards.add(new SetCardInfo("Reave Soul", 103, Rarity.COMMON, mage.cards.r.ReaveSoul.class));