[KHM] Implemented Koma's Faithful

This commit is contained in:
Evan Kranzler 2021-01-09 10:21:00 -05:00
parent 604ccee06b
commit 36fa356bd0
3 changed files with 48 additions and 0 deletions

View file

@ -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);
}
}

View file

@ -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));

View file

@ -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: