From e5a7c7d90a7eaf68c00e97e996c961dcac557ce5 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Thu, 13 Sep 2018 21:11:45 -0400 Subject: [PATCH] Implemented Knight of Autumn --- .../src/mage/cards/k/KnightOfAutumn.java | 64 +++++++++++++++++++ Mage.Sets/src/mage/sets/GuildsOfRavnica.java | 1 + 2 files changed, 65 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/k/KnightOfAutumn.java diff --git a/Mage.Sets/src/mage/cards/k/KnightOfAutumn.java b/Mage.Sets/src/mage/cards/k/KnightOfAutumn.java new file mode 100644 index 0000000000..9e17026748 --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KnightOfAutumn.java @@ -0,0 +1,64 @@ +package mage.cards.k; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.Mode; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.counters.CounterType; +import mage.filter.StaticFilters; +import mage.target.TargetPermanent; + +/** + * + * @author TheElk801 + */ +public final class KnightOfAutumn extends CardImpl { + + public KnightOfAutumn(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{W}"); + + this.subtype.add(SubType.DRYAD); + this.subtype.add(SubType.KNIGHT); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // When Knight of Autumn enters the battlefield, choose one — + // • Put two +1/+1 counters on Knight of Autumn. + Ability ability = new EntersBattlefieldTriggeredAbility( + new AddCountersSourceEffect( + CounterType.P1P1.createInstance(2) + ), false + ); + + // • Destroy target artifact or enchantment. + Mode mode = new Mode(); + mode.getEffects().add(new DestroyTargetEffect()); + mode.getTargets().add(new TargetPermanent( + StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT + )); + ability.addMode(mode); + + // • You gain 4 life. + mode = new Mode(); + mode.getEffects().add(new GainLifeEffect(4)); + ability.addMode(mode); + this.addAbility(ability); + } + + public KnightOfAutumn(final KnightOfAutumn card) { + super(card); + } + + @Override + public KnightOfAutumn copy() { + return new KnightOfAutumn(this); + } +} diff --git a/Mage.Sets/src/mage/sets/GuildsOfRavnica.java b/Mage.Sets/src/mage/sets/GuildsOfRavnica.java index 925df443ed..3b0abd48b5 100644 --- a/Mage.Sets/src/mage/sets/GuildsOfRavnica.java +++ b/Mage.Sets/src/mage/sets/GuildsOfRavnica.java @@ -86,6 +86,7 @@ public final class GuildsOfRavnica extends ExpansionSet { cards.add(new SetCardInfo("Izzet Guildgate", 251, Rarity.COMMON, mage.cards.i.IzzetGuildgate.class)); cards.add(new SetCardInfo("Izzet Guildgate", 252, Rarity.COMMON, mage.cards.i.IzzetGuildgate.class)); cards.add(new SetCardInfo("Izzet Locket", 238, Rarity.COMMON, mage.cards.i.IzzetLocket.class)); + cards.add(new SetCardInfo("Knight of Autumn", 183, Rarity.RARE, mage.cards.k.KnightOfAutumn.class)); cards.add(new SetCardInfo("Lava Coil", 108, Rarity.UNCOMMON, mage.cards.l.LavaCoil.class)); cards.add(new SetCardInfo("Legion Guildmage", 187, Rarity.MYTHIC, mage.cards.l.LegionGuildmage.class)); cards.add(new SetCardInfo("Legion Warboss", 109, Rarity.RARE, mage.cards.l.LegionWarboss.class));