diff --git a/Mage.Sets/src/mage/cards/g/GideonsCompany.java b/Mage.Sets/src/mage/cards/g/GideonsCompany.java new file mode 100644 index 00000000000..f5e3a03f7dc --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GideonsCompany.java @@ -0,0 +1,57 @@ +package mage.cards.g; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.GainLifeControllerTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.counters.CounterType; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterPlaneswalkerPermanent; +import mage.target.TargetPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class GideonsCompany extends CardImpl { + + private static final FilterPermanent filter = new FilterPlaneswalkerPermanent(SubType.GIDEON); + + public GideonsCompany(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.SOLDIER); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Whenever you gain life, put two +1/+1 counters on Gideon's Company. + this.addAbility(new GainLifeControllerTriggeredAbility( + new AddCountersSourceEffect(CounterType.P1P1.createInstance(2)), false + )); + + // {3}{W}: Put a loyalty counter on target Gideon planeswalker. + Ability ability = new SimpleActivatedAbility( + new AddCountersTargetEffect(CounterType.LOYALTY.createInstance()), new ManaCostsImpl("{3}{W}") + ); + ability.addTarget(new TargetPermanent(filter)); + this.addAbility(ability); + } + + private GideonsCompany(final GideonsCompany card) { + super(card); + } + + @Override + public GideonsCompany copy() { + return new GideonsCompany(this); + } +} diff --git a/Mage.Sets/src/mage/sets/WarOfTheSpark.java b/Mage.Sets/src/mage/sets/WarOfTheSpark.java index 575584d13a6..32608b098c7 100644 --- a/Mage.Sets/src/mage/sets/WarOfTheSpark.java +++ b/Mage.Sets/src/mage/sets/WarOfTheSpark.java @@ -76,6 +76,7 @@ public final class WarOfTheSpark extends ExpansionSet { cards.add(new SetCardInfo("Forest", 262, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Forest", 264, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Giant Growth", 162, Rarity.COMMON, mage.cards.g.GiantGrowth.class)); + cards.add(new SetCardInfo("Gideon's Company", 268, Rarity.UNCOMMON, mage.cards.g.GideonsCompany.class)); cards.add(new SetCardInfo("Gideon's Triumph", 15, Rarity.UNCOMMON, mage.cards.g.GideonsTriumph.class)); cards.add(new SetCardInfo("Gleaming Overseer", 198, Rarity.UNCOMMON, mage.cards.g.GleamingOverseer.class)); cards.add(new SetCardInfo("Goblin Assailant", 128, Rarity.COMMON, mage.cards.g.GoblinAssailant.class)); diff --git a/Mage/src/main/java/mage/filter/common/FilterPlaneswalkerPermanent.java b/Mage/src/main/java/mage/filter/common/FilterPlaneswalkerPermanent.java index 0fef222e965..8149b208bf9 100644 --- a/Mage/src/main/java/mage/filter/common/FilterPlaneswalkerPermanent.java +++ b/Mage/src/main/java/mage/filter/common/FilterPlaneswalkerPermanent.java @@ -3,11 +3,12 @@ package mage.filter.common; import mage.constants.CardType; +import mage.constants.SubType; import mage.filter.FilterPermanent; import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.predicate.mageobject.SubtypePredicate; /** - * * @author BetaSteward_at_googlemail.com */ public class FilterPlaneswalkerPermanent extends FilterPermanent { @@ -16,6 +17,11 @@ public class FilterPlaneswalkerPermanent extends FilterPermanent { this("planeswalker"); } + public FilterPlaneswalkerPermanent(SubType subType) { + this(subType.getDescription() + " planeswalker"); + this.add(new SubtypePredicate(subType)); + } + public FilterPlaneswalkerPermanent(String name) { super(name); this.add(new CardTypePredicate(CardType.PLANESWALKER));