diff --git a/Mage.Sets/src/mage/cards/k/KothFireOfResistance.java b/Mage.Sets/src/mage/cards/k/KothFireOfResistance.java new file mode 100644 index 0000000000..86f1905cee --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KothFireOfResistance.java @@ -0,0 +1,64 @@ +package mage.cards.k; + +import mage.abilities.Ability; +import mage.abilities.LoyaltyAbility; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.GetEmblemEffect; +import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.filter.FilterCard; +import mage.filter.common.FilterControlledPermanent; +import mage.game.command.emblems.KothFireOfResistanceEmblem; +import mage.target.common.TargetCardInLibrary; +import mage.target.common.TargetCreaturePermanent; + +import java.util.UUID; + +/** + * @author PurpleCrowbar + */ +public final class KothFireOfResistance extends CardImpl { + + private static final FilterCard filter = new FilterCard("basic Mountain card"); + private static final FilterControlledPermanent filter2 = new FilterControlledPermanent("Mountains you control"); + + static { + filter.add(SuperType.BASIC.getPredicate()); + filter.add(SubType.MOUNTAIN.getPredicate()); + filter2.add(SubType.MOUNTAIN.getPredicate()); + } + + public KothFireOfResistance(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{2}{R}{R}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.KOTH); + this.setStartingLoyalty(4); + + // +2: Search your library for a basic Mountain card, reveal it, put it into your hand, then shuffle. + this.addAbility(new LoyaltyAbility(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filter), true), 2)); + + // −3: Koth, Fire of Resistance deals damage to target creature equal to the number of Mountains you control. + Ability ability = new LoyaltyAbility(new DamageTargetEffect(new PermanentsOnBattlefieldCount(filter2)) + .setText("{this} deals damage to target creature equal to the number of Mountains you control"), -3); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + + // −7: You get an emblem with "Whenever a Mountain enters the battlefield under your control, this emblem deals 4 damage to any target." + this.addAbility(new LoyaltyAbility(new GetEmblemEffect(new KothFireOfResistanceEmblem()), -7)); + } + + private KothFireOfResistance(final KothFireOfResistance card) { + super(card); + } + + @Override + public KothFireOfResistance copy() { + return new KothFireOfResistance(this); + } +} diff --git a/Mage.Sets/src/mage/sets/PhyrexiaAllWillBeOne.java b/Mage.Sets/src/mage/sets/PhyrexiaAllWillBeOne.java index 03017f2648..e18adc772d 100644 --- a/Mage.Sets/src/mage/sets/PhyrexiaAllWillBeOne.java +++ b/Mage.Sets/src/mage/sets/PhyrexiaAllWillBeOne.java @@ -26,6 +26,8 @@ public final class PhyrexiaAllWillBeOne extends ExpansionSet { cards.add(new SetCardInfo("Dragonwing Glider", 126, Rarity.RARE, mage.cards.d.DragonwingGlider.class)); cards.add(new SetCardInfo("Forest", 276, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Island", 273, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Koth, Fire of Resistance", 138, Rarity.RARE, mage.cards.k.KothFireOfResistance.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Koth, Fire of Resistance", 446, Rarity.RARE, mage.cards.k.KothFireOfResistance.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Mountain", 275, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Phyrexian Arena", 104, Rarity.RARE, mage.cards.p.PhyrexianArena.class)); cards.add(new SetCardInfo("Phyrexian Obliterator", 105, Rarity.MYTHIC, mage.cards.p.PhyrexianObliterator.class)); diff --git a/Mage/src/main/java/mage/game/command/emblems/KothFireOfResistanceEmblem.java b/Mage/src/main/java/mage/game/command/emblems/KothFireOfResistanceEmblem.java new file mode 100644 index 0000000000..9429938e5a --- /dev/null +++ b/Mage/src/main/java/mage/game/command/emblems/KothFireOfResistanceEmblem.java @@ -0,0 +1,34 @@ +package mage.game.command.emblems; + +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.game.command.Emblem; +import mage.target.common.TargetAnyTarget; + +/** + * @author PurpleCrowbar + */ +public final class KothFireOfResistanceEmblem extends Emblem { + + private static final FilterPermanent filterMountain = new FilterPermanent("a Mountain"); + + static { + filterMountain.add(SubType.MOUNTAIN.getPredicate()); + } + + // −7: You get an emblem with "Whenever a Mountain enters the battlefield under your control, this emblem deals 4 damage to any target." + public KothFireOfResistanceEmblem() { + this.setName("Emblem Koth"); + this.setExpansionSetCodeForImage("ONE"); + + Ability ability = new EntersBattlefieldControlledTriggeredAbility( + Zone.COMMAND, new DamageTargetEffect(4).setText("this emblem deals 4 damage to any target"), + filterMountain, false); + ability.addTarget(new TargetAnyTarget()); + getAbilities().add(ability); + } +}