From 36fa356bd088fd6fd962b0d5fd85611e8f66f141 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sat, 9 Jan 2021 10:21:00 -0500 Subject: [PATCH] [KHM] Implemented Koma's Faithful --- Mage.Sets/src/mage/cards/k/KomasFaithful.java | 45 +++++++++++++++++++ Mage.Sets/src/mage/sets/Kaldheim.java | 1 + .../common/MillCardsEachPlayerEffect.java | 2 + 3 files changed, 48 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/k/KomasFaithful.java diff --git a/Mage.Sets/src/mage/cards/k/KomasFaithful.java b/Mage.Sets/src/mage/cards/k/KomasFaithful.java new file mode 100644 index 0000000000..34586a15e3 --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KomasFaithful.java @@ -0,0 +1,45 @@ +package mage.cards.k; + +import mage.MageInt; +import mage.abilities.common.DiesSourceTriggeredAbility; +import mage.abilities.effects.common.MillCardsEachPlayerEffect; +import mage.abilities.keyword.LifelinkAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.TargetController; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class KomasFaithful extends CardImpl { + + public KomasFaithful(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); + + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.CLERIC); + this.power = new MageInt(3); + this.toughness = new MageInt(1); + + // Lifelink + this.addAbility(LifelinkAbility.getInstance()); + + // When Koma's Faithful dies, each player mills three cards. + this.addAbility(new DiesSourceTriggeredAbility( + new MillCardsEachPlayerEffect(3, TargetController.EACH_PLAYER) + )); + } + + private KomasFaithful(final KomasFaithful card) { + super(card); + } + + @Override + public KomasFaithful copy() { + return new KomasFaithful(this); + } +} diff --git a/Mage.Sets/src/mage/sets/Kaldheim.java b/Mage.Sets/src/mage/sets/Kaldheim.java index a8eea66950..e7e00a7c89 100644 --- a/Mage.Sets/src/mage/sets/Kaldheim.java +++ b/Mage.Sets/src/mage/sets/Kaldheim.java @@ -79,6 +79,7 @@ public final class Kaldheim extends ExpansionSet { cards.add(new SetCardInfo("Inga Rune-Eyes", 64, Rarity.UNCOMMON, mage.cards.i.IngaRuneEyes.class)); cards.add(new SetCardInfo("Invasion of the Giants", 215, Rarity.UNCOMMON, mage.cards.i.InvasionOfTheGiants.class)); cards.add(new SetCardInfo("Kaya the Inexorable", 218, Rarity.MYTHIC, mage.cards.k.KayaTheInexorable.class)); + cards.add(new SetCardInfo("Koma's Faithful", 102, Rarity.COMMON, mage.cards.k.KomasFaithful.class)); cards.add(new SetCardInfo("Magda, Brazen Outlaw", 142, Rarity.RARE, mage.cards.m.MagdaBrazenOutlaw.class)); cards.add(new SetCardInfo("Masked Vandal", 184, Rarity.COMMON, mage.cards.m.MaskedVandal.class)); cards.add(new SetCardInfo("Pyre of Heroes", 241, Rarity.RARE, mage.cards.p.PyreOfHeroes.class)); diff --git a/Mage/src/main/java/mage/abilities/effects/common/MillCardsEachPlayerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/MillCardsEachPlayerEffect.java index d41f2680ae..3b979bdecb 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/MillCardsEachPlayerEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/MillCardsEachPlayerEffect.java @@ -53,6 +53,7 @@ public class MillCardsEachPlayerEffect extends OneShotEffect { } break; case ANY: + case EACH_PLAYER: for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) { putCardsToGravecard(playerId, source, game); } @@ -86,6 +87,7 @@ public class MillCardsEachPlayerEffect extends OneShotEffect { sb.append("each opponent "); break; case ANY: + case EACH_PLAYER: sb.append("each player "); break; case NOT_YOU: