From 32343f21ff53ab5837bee2f4a20671b4d08f8ffe Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sat, 7 Nov 2020 16:05:52 -0500 Subject: [PATCH] [CMR] Implemented Alharu, Solemn Ritualist --- .../mage/cards/a/AlharuSolemnRitualist.java | 76 +++++++++++++++++++ Mage.Sets/src/mage/sets/CommanderLegends.java | 1 + 2 files changed, 77 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/a/AlharuSolemnRitualist.java diff --git a/Mage.Sets/src/mage/cards/a/AlharuSolemnRitualist.java b/Mage.Sets/src/mage/cards/a/AlharuSolemnRitualist.java new file mode 100644 index 00000000000..c133edea696 --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AlharuSolemnRitualist.java @@ -0,0 +1,76 @@ +package mage.cards.a; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DiesCreatureTriggeredAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.abilities.keyword.PartnerAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.counters.CounterType; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.filter.predicate.permanent.TokenPredicate; +import mage.game.permanent.token.SpiritWhiteToken; +import mage.target.TargetPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class AlharuSolemnRitualist extends CardImpl { + + private static final FilterPermanent filter = new FilterCreaturePermanent("other creatures"); + private static final FilterPermanent filter2 = new FilterControlledCreaturePermanent( + "a nontoken creature you control with a +1/+1 counter on it" + ); + + static { + filter.add(AnotherPredicate.instance); + filter2.add(Predicates.not(TokenPredicate.instance)); + filter2.add(CounterType.P1P1.getPredicate()); + } + + public AlharuSolemnRitualist(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.MONK); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // When Alharu, Solemn Ritualist enters the battlefield, put a +1/+1 counter on each of up to two other target creatures. + Ability ability = new EntersBattlefieldTriggeredAbility( + new AddCountersTargetEffect(CounterType.P1P1.createInstance()) + ); + ability.addTarget(new TargetPermanent(0, 2, filter, false)); + this.addAbility(ability); + + // Whenever a nontoken creature you control with a +1/+1 counter on it dies, create a 1/1 white Spirit creature token with flying. + this.addAbility(new DiesCreatureTriggeredAbility( + new CreateTokenEffect(new SpiritWhiteToken()), false, filter2 + )); + + // Partner + this.addAbility(PartnerAbility.getInstance()); + } + + private AlharuSolemnRitualist(final AlharuSolemnRitualist card) { + super(card); + } + + @Override + public AlharuSolemnRitualist copy() { + return new AlharuSolemnRitualist(this); + } +} diff --git a/Mage.Sets/src/mage/sets/CommanderLegends.java b/Mage.Sets/src/mage/sets/CommanderLegends.java index 2785af3e6bc..b08131e0f43 100644 --- a/Mage.Sets/src/mage/sets/CommanderLegends.java +++ b/Mage.Sets/src/mage/sets/CommanderLegends.java @@ -35,6 +35,7 @@ public final class CommanderLegends extends ExpansionSet { cards.add(new SetCardInfo("Akroma's Will", 3, Rarity.RARE, mage.cards.a.AkromasWill.class)); cards.add(new SetCardInfo("Akroma, Vision of Ixidor", 2, Rarity.MYTHIC, mage.cards.a.AkromaVisionOfIxidor.class)); cards.add(new SetCardInfo("Alena, Kessig Trapper", 160, Rarity.UNCOMMON, mage.cards.a.AlenaKessigTrapper.class)); + cards.add(new SetCardInfo("Alharu, Solemn Ritualist", 4, Rarity.UNCOMMON, mage.cards.a.AlharuSolemnRitualist.class)); cards.add(new SetCardInfo("Amareth, the Lustrous", 266, Rarity.RARE, mage.cards.a.AmarethTheLustrous.class)); cards.add(new SetCardInfo("Ambush Viper", 213, Rarity.COMMON, mage.cards.a.AmbushViper.class)); cards.add(new SetCardInfo("Amorphous Axe", 295, Rarity.COMMON, mage.cards.a.AmorphousAxe.class));