diff --git a/Mage.Sets/src/mage/cards/a/AjaniTheGreathearted.java b/Mage.Sets/src/mage/cards/a/AjaniTheGreathearted.java new file mode 100644 index 0000000000..a66a7fe935 --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AjaniTheGreathearted.java @@ -0,0 +1,71 @@ +package mage.cards.a; + +import mage.abilities.Ability; +import mage.abilities.LoyaltyAbility; +import mage.abilities.common.PlaneswalkerEntersWithLoyaltyCountersAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.effects.common.counter.AddCountersAllEffect; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.counters.CounterType; +import mage.filter.FilterPermanent; +import mage.filter.StaticFilters; +import mage.filter.common.FilterControlledPlaneswalkerPermanent; +import mage.filter.predicate.permanent.AnotherPredicate; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class AjaniTheGreathearted extends CardImpl { + + private static final FilterPermanent filter = new FilterControlledPlaneswalkerPermanent(); + + static { + filter.add(AnotherPredicate.instance); + } + + public AjaniTheGreathearted(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{2}{G}{W}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.AJANI); + this.addAbility(new PlaneswalkerEntersWithLoyaltyCountersAbility(0)); + + // Creatures you control have vigilance. + this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect( + VigilanceAbility.getInstance(), + Duration.WhileOnBattlefield, + StaticFilters.FILTER_CONTROLLED_CREATURES + ))); + + // +1: You gain 3 life. + this.addAbility(new LoyaltyAbility(new GainLifeEffect(3), 1)); + + // -2: Put a +1/+1 counter on each creature you control and a loyalty counter on each other planeswalker you control. + Ability ability = new LoyaltyAbility(new AddCountersAllEffect( + CounterType.P1P1.createInstance(), StaticFilters.FILTER_CONTROLLED_CREATURES + ), -2); + ability.addEffect(new AddCountersAllEffect( + CounterType.LOYALTY.createInstance(), filter + ).setText("and a loyalty counter on each other planeswalker you control")); + this.addAbility(ability); + } + + private AjaniTheGreathearted(final AjaniTheGreathearted card) { + super(card); + } + + @Override + public AjaniTheGreathearted copy() { + return new AjaniTheGreathearted(this); + } +} diff --git a/Mage.Sets/src/mage/sets/WarOfTheSpark.java b/Mage.Sets/src/mage/sets/WarOfTheSpark.java index 2b27a72ec6..88e0c36b15 100644 --- a/Mage.Sets/src/mage/sets/WarOfTheSpark.java +++ b/Mage.Sets/src/mage/sets/WarOfTheSpark.java @@ -24,6 +24,7 @@ public final class WarOfTheSpark extends ExpansionSet { this.maxCardNumberInBooster = 264; cards.add(new SetCardInfo("Ajani's Pridemate", 4, Rarity.UNCOMMON, mage.cards.a.AjanisPridemate.class)); + cards.add(new SetCardInfo("Ajani, the Greathearted", 184, Rarity.RARE, mage.cards.a.AjaniTheGreathearted.class)); cards.add(new SetCardInfo("Dreadhorde Invasion", 86, Rarity.RARE, mage.cards.d.DreadhordeInvasion.class)); cards.add(new SetCardInfo("Flux Channeler", 52, Rarity.UNCOMMON, mage.cards.f.FluxChanneler.class)); cards.add(new SetCardInfo("Forest", 262, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS));