From 57cea736b906f6f78e18685adbf1dce1301ecf8e Mon Sep 17 00:00:00 2001 From: Thomas Winwood Date: Sun, 14 Apr 2019 01:46:25 +0100 Subject: [PATCH] Implement Kjeldoran Pride --- .../src/mage/cards/k/KjeldoranPride.java | 64 +++++++++++++++++++ Mage.Sets/src/mage/sets/Alliances.java | 2 + 2 files changed, 66 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/k/KjeldoranPride.java diff --git a/Mage.Sets/src/mage/cards/k/KjeldoranPride.java b/Mage.Sets/src/mage/cards/k/KjeldoranPride.java new file mode 100644 index 00000000000..d946ed77e64 --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KjeldoranPride.java @@ -0,0 +1,64 @@ + +package mage.cards.k; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Outcome; +import mage.constants.Zone; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.AnotherEnchantedPredicate; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author Ketsuban + */ +public final class KjeldoranPride extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature other than enchanted creature"); + + static { + filter.add(new AnotherEnchantedPredicate()); + } + + public KjeldoranPride(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[] { CardType.ENCHANTMENT }, "{1}{W}"); + + this.subtype.add(SubType.AURA); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.Benefit)); + Ability enchantAbility = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(enchantAbility); + + // Enchanted creature gets +1/+2. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 2))); + + // 2U: Attach Kjeldoran Pride to target creature other than enchanted creature. + Ability ability = new SimpleActivatedAbility(new AttachEffect(Outcome.Benefit), new ManaCostsImpl<>("{2}{U}")); + ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); + } + + public KjeldoranPride(final KjeldoranPride card) { + super(card); + } + + @Override + public KjeldoranPride copy() { + return new KjeldoranPride(this); + } +} diff --git a/Mage.Sets/src/mage/sets/Alliances.java b/Mage.Sets/src/mage/sets/Alliances.java index 8d5089f9083..643b2b16ce1 100644 --- a/Mage.Sets/src/mage/sets/Alliances.java +++ b/Mage.Sets/src/mage/sets/Alliances.java @@ -108,6 +108,8 @@ public final class Alliances extends ExpansionSet { cards.add(new SetCardInfo("Keeper of Tresserhorn", 52, Rarity.RARE, mage.cards.k.KeeperOfTresserhorn.class)); cards.add(new SetCardInfo("Kjeldoran Escort", "7a", Rarity.COMMON, mage.cards.k.KjeldoranEscort.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Kjeldoran Escort", "7b", Rarity.COMMON, mage.cards.k.KjeldoranEscort.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Kjeldoran Pride", "9a", Rarity.COMMON, mage.cards.k.KjeldoranPride.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Kjeldoran Pride", "9b", Rarity.COMMON, mage.cards.k.KjeldoranPride.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Kjeldoran Home Guard", 8, Rarity.UNCOMMON, mage.cards.k.KjeldoranHomeGuard.class)); cards.add(new SetCardInfo("Kjeldoran Outpost", 139, Rarity.RARE, mage.cards.k.KjeldoranOutpost.class)); cards.add(new SetCardInfo("Krovikan Horror", 53, Rarity.RARE, mage.cards.k.KrovikanHorror.class));