From 7b692b1f23fa9acf4f9bb1e431e00b274778a3ee Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Mon, 9 Sep 2019 18:38:15 -0400 Subject: [PATCH] Implemented Rowan's Battleguard --- .../src/mage/cards/r/RowansBattleguard.java | 56 +++++++++++++++++++ Mage.Sets/src/mage/sets/ThroneOfEldraine.java | 1 + 2 files changed, 57 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/r/RowansBattleguard.java diff --git a/Mage.Sets/src/mage/cards/r/RowansBattleguard.java b/Mage.Sets/src/mage/cards/r/RowansBattleguard.java new file mode 100644 index 0000000000..5b2c730cf8 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RowansBattleguard.java @@ -0,0 +1,56 @@ +package mage.cards.r; + +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.Condition; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterControlledPlaneswalkerPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class RowansBattleguard extends CardImpl { + + private static final FilterPermanent filter + = new FilterControlledPlaneswalkerPermanent(SubType.ROWAN); + private static final Condition condition + = new PermanentsOnTheBattlefieldCondition(filter); + + public RowansBattleguard(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // First strike + this.addAbility(FirstStrikeAbility.getInstance()); + + // As long as you control a Rowan planeswalker, Rowan's Battleguard gets +3/+0. + this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect( + new BoostSourceEffect(3, 0, Duration.WhileOnBattlefield), condition, + "As long as you control a Rowan planeswalker, {this} gets +3/+0" + ))); + } + + private RowansBattleguard(final RowansBattleguard card) { + super(card); + } + + @Override + public RowansBattleguard copy() { + return new RowansBattleguard(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java index 2d2d131a7b..74a22d4f49 100644 --- a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java +++ b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java @@ -83,6 +83,7 @@ public final class ThroneOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Rankle, Master of Pranks", 101, Rarity.MYTHIC, mage.cards.r.RankleMasterOfPranks.class)); cards.add(new SetCardInfo("Return to Nature", 173, Rarity.COMMON, mage.cards.r.ReturnToNature.class)); cards.add(new SetCardInfo("Rosethorn Acolyte", 174, Rarity.COMMON, mage.cards.r.RosethornAcolyte.class)); + cards.add(new SetCardInfo("Rowan's Battleguard", 306, Rarity.UNCOMMON, mage.cards.r.RowansBattleguard.class)); cards.add(new SetCardInfo("Rowan's Stalwarts", 307, Rarity.RARE, mage.cards.r.RowansStalwarts.class)); cards.add(new SetCardInfo("Run Away Together", 62, Rarity.COMMON, mage.cards.r.RunAwayTogether.class)); cards.add(new SetCardInfo("Savvy Hunter", 200, Rarity.UNCOMMON, mage.cards.s.SavvyHunter.class));