Implemented Rowan's Battleguard

This commit is contained in:
Evan Kranzler 2019-09-09 18:38:15 -04:00
parent fbafdb0998
commit 7b692b1f23
2 changed files with 57 additions and 0 deletions

View file

@ -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);
}
}

View file

@ -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));