From f47aea4fbac8002a0961c6cca6af5c40f7b7c4cc Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Thu, 30 Sep 2021 08:32:27 -0400 Subject: [PATCH] [MIC] Implemented Kurbis, Harvest Celebrant --- .../mage/cards/k/KurbisHarvestCelebrant.java | 70 +++++++++++++++++++ .../src/mage/sets/MidnightHuntCommander.java | 1 + 2 files changed, 71 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/k/KurbisHarvestCelebrant.java diff --git a/Mage.Sets/src/mage/cards/k/KurbisHarvestCelebrant.java b/Mage.Sets/src/mage/cards/k/KurbisHarvestCelebrant.java new file mode 100644 index 0000000000..e52cdc8e95 --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KurbisHarvestCelebrant.java @@ -0,0 +1,70 @@ +package mage.cards.k; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.dynamicvalue.common.ManaSpentToCastCount; +import mage.abilities.effects.common.PreventDamageToTargetEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +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.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.AnotherPredicate; +import mage.target.TargetPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class KurbisHarvestCelebrant extends CardImpl { + + private static final FilterPermanent filter + = new FilterCreaturePermanent("another creature with a +1/+1 counter on it"); + + static { + filter.add(AnotherPredicate.instance); + filter.add(CounterType.P1P1.getPredicate()); + } + + public KurbisHarvestCelebrant(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{X}{G}{G}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.TREEFOLK); + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + // Kurbis, Harvest Celebrant enters the battlefield with a number of +1/+1 counters on it equal to the amount of mana spent to cast it. + this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect( + CounterType.P1P1.createInstance(), ManaSpentToCastCount.instance, true + ), "with a number of +1/+1 counters on it equal to the amount of mana spent to cast it")); + + // Remove a +1/+1 counter from Kurbis: Prevent all damage that would be dealt this turn to another target creature with a +1/+1 counter on it. + Ability ability = new SimpleActivatedAbility( + new PreventDamageToTargetEffect(Duration.EndOfTurn) + .setText("prevent all damage that would be dealt this turn " + + "to another target creature with a +1/+1 counter on it"), + new RemoveCountersSourceCost(CounterType.P1P1.createInstance()) + ); + ability.addTarget(new TargetPermanent(filter)); + this.addAbility(ability); + } + + private KurbisHarvestCelebrant(final KurbisHarvestCelebrant card) { + super(card); + } + + @Override + public KurbisHarvestCelebrant copy() { + return new KurbisHarvestCelebrant(this); + } +} diff --git a/Mage.Sets/src/mage/sets/MidnightHuntCommander.java b/Mage.Sets/src/mage/sets/MidnightHuntCommander.java index 089e071c93..031cb9042b 100644 --- a/Mage.Sets/src/mage/sets/MidnightHuntCommander.java +++ b/Mage.Sets/src/mage/sets/MidnightHuntCommander.java @@ -97,6 +97,7 @@ public final class MidnightHuntCommander extends ExpansionSet { cards.add(new SetCardInfo("Kessig Cagebreakers", 142, Rarity.RARE, mage.cards.k.KessigCagebreakers.class)); cards.add(new SetCardInfo("Knight of the White Orchid", 88, Rarity.RARE, mage.cards.k.KnightOfTheWhiteOrchid.class)); cards.add(new SetCardInfo("Krosan Verge", 175, Rarity.UNCOMMON, mage.cards.k.KrosanVerge.class)); + cards.add(new SetCardInfo("Kurbis, Harvest Celebrant", 27, Rarity.RARE, mage.cards.k.KurbisHarvestCelebrant.class)); cards.add(new SetCardInfo("Kyler, Sigardian Emissary", 4, Rarity.MYTHIC, mage.cards.k.KylerSigardianEmissary.class)); cards.add(new SetCardInfo("Leinore, Autumn Sovereign", 1, Rarity.MYTHIC, mage.cards.l.LeinoreAutumnSovereign.class)); cards.add(new SetCardInfo("Lifecrafter's Bestiary", 160, Rarity.RARE, mage.cards.l.LifecraftersBestiary.class));