From dc6b1dc7d5ae2889e3ae66ee378b38bfddcceeb9 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Fri, 14 Sep 2018 13:36:22 -0400 Subject: [PATCH] Implemented Garrison Sergeant --- .../src/mage/cards/g/GarrisonSergeant.java | 61 +++++++++++++++++++ Mage.Sets/src/mage/sets/GuildsOfRavnica.java | 1 + 2 files changed, 62 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/g/GarrisonSergeant.java diff --git a/Mage.Sets/src/mage/cards/g/GarrisonSergeant.java b/Mage.Sets/src/mage/cards/g/GarrisonSergeant.java new file mode 100644 index 0000000000..5a2c7738f1 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GarrisonSergeant.java @@ -0,0 +1,61 @@ +package mage.cards.g; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.DoubleStrikeAbility; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.SubtypePredicate; + +/** + * + * @author TheElk801 + */ +public final class GarrisonSergeant extends CardImpl { + + private static final FilterPermanent filter = new FilterControlledPermanent(); + + static { + filter.add(new SubtypePredicate(SubType.GATE)); + } + + public GarrisonSergeant(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{W}"); + + this.subtype.add(SubType.VIASHINO); + this.subtype.add(SubType.SOLDIER); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Garrison Sergeant has double strike as long as you control a Gate. + this.addAbility(new SimpleStaticAbility( + Zone.BATTLEFIELD, + new ConditionalContinuousEffect( + new GainAbilitySourceEffect( + DoubleStrikeAbility.getInstance(), + Duration.WhileOnBattlefield + ), new PermanentsOnTheBattlefieldCondition(filter), + "{this} has double strike as long as you control a Gate." + ) + )); + } + + public GarrisonSergeant(final GarrisonSergeant card) { + super(card); + } + + @Override + public GarrisonSergeant copy() { + return new GarrisonSergeant(this); + } +} diff --git a/Mage.Sets/src/mage/sets/GuildsOfRavnica.java b/Mage.Sets/src/mage/sets/GuildsOfRavnica.java index 134d5cd36f..b55b5e2e04 100644 --- a/Mage.Sets/src/mage/sets/GuildsOfRavnica.java +++ b/Mage.Sets/src/mage/sets/GuildsOfRavnica.java @@ -65,6 +65,7 @@ public final class GuildsOfRavnica extends ExpansionSet { cards.add(new SetCardInfo("Firemind's Research", 171, Rarity.RARE, mage.cards.f.FiremindsResearch.class)); cards.add(new SetCardInfo("Forest", 264, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Fresh-Faced Recruit", 216, Rarity.COMMON, mage.cards.f.FreshFacedRecruit.class)); + cards.add(new SetCardInfo("Garrison Sergeant", 172, Rarity.COMMON, mage.cards.g.GarrisonSergeant.class)); cards.add(new SetCardInfo("Gateway Plaza", 247, Rarity.COMMON, mage.cards.g.GatewayPlaza.class)); cards.add(new SetCardInfo("Glowspore Shaman", 173, Rarity.UNCOMMON, mage.cards.g.GlowsporeShaman.class)); cards.add(new SetCardInfo("Goblin Banneret", 102, Rarity.UNCOMMON, mage.cards.g.GoblinBanneret.class));