From d688bcb54a394232116c2e14a1fe3c957387791b Mon Sep 17 00:00:00 2001 From: theelk801 Date: Fri, 9 Jun 2023 08:28:44 -0400 Subject: [PATCH] [LTR] Implement Flame of Anor --- Mage.Sets/src/mage/cards/f/FlameOfAnor.java | 60 +++++++++++++++++++ .../TheLordOfTheRingsTalesOfMiddleEarth.java | 1 + Mage/src/main/java/mage/abilities/Modes.java | 4 +- 3 files changed, 63 insertions(+), 2 deletions(-) create mode 100644 Mage.Sets/src/mage/cards/f/FlameOfAnor.java diff --git a/Mage.Sets/src/mage/cards/f/FlameOfAnor.java b/Mage.Sets/src/mage/cards/f/FlameOfAnor.java new file mode 100644 index 00000000000..c285bf91067 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FlameOfAnor.java @@ -0,0 +1,60 @@ +package mage.cards.f; + +import mage.abilities.Mode; +import mage.abilities.condition.Condition; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.DrawCardTargetEffect; +import mage.abilities.hint.ConditionHint; +import mage.abilities.hint.Hint; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.common.FilterControlledPermanent; +import mage.target.TargetPlayer; +import mage.target.common.TargetArtifactPermanent; +import mage.target.common.TargetCreaturePermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class FlameOfAnor extends CardImpl { + + private static final Condition condition + = new PermanentsOnTheBattlefieldCondition(new FilterControlledPermanent(SubType.WIZARD)); + private static final Hint hint = new ConditionHint(condition, "You control a Wizard"); + + public FlameOfAnor(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}{R}"); + + // Choose one. If you control a Wizard as you cast this spell, you may choose two instead. + this.getSpellAbility().getModes().setMoreCondition(condition); + this.getSpellAbility().getModes().setChooseText( + "Choose one. If you control a Wizard as you cast this spell, you may choose two instead." + ); + this.getSpellAbility().addHint(hint); + + // * Target player draws two cards. + this.getSpellAbility().addEffect(new DrawCardTargetEffect(2)); + this.getSpellAbility().addTarget(new TargetPlayer()); + + // * Destroy target artifact. + this.getSpellAbility().addMode(new Mode(new DestroyTargetEffect()).addTarget(new TargetArtifactPermanent())); + + // * Flame of Anor deals 5 damage to target creature. + this.getSpellAbility().addMode(new Mode(new DamageTargetEffect(5)).addTarget(new TargetCreaturePermanent())); + } + + private FlameOfAnor(final FlameOfAnor card) { + super(card); + } + + @Override + public FlameOfAnor copy() { + return new FlameOfAnor(this); + } +} diff --git a/Mage.Sets/src/mage/sets/TheLordOfTheRingsTalesOfMiddleEarth.java b/Mage.Sets/src/mage/sets/TheLordOfTheRingsTalesOfMiddleEarth.java index f3458b6b40e..0aa58a6bdd6 100644 --- a/Mage.Sets/src/mage/sets/TheLordOfTheRingsTalesOfMiddleEarth.java +++ b/Mage.Sets/src/mage/sets/TheLordOfTheRingsTalesOfMiddleEarth.java @@ -50,6 +50,7 @@ public final class TheLordOfTheRingsTalesOfMiddleEarth extends ExpansionSet { cards.add(new SetCardInfo("Fangorn, Tree Shepherd", 166, Rarity.RARE, mage.cards.f.FangornTreeShepherd.class)); cards.add(new SetCardInfo("Fiery Inscription", 126, Rarity.UNCOMMON, mage.cards.f.FieryInscription.class)); cards.add(new SetCardInfo("Fire of Orthanc", 127, Rarity.COMMON, mage.cards.f.FireOfOrthanc.class)); + cards.add(new SetCardInfo("Flame of Anor", 203, Rarity.RARE, mage.cards.f.FlameOfAnor.class)); cards.add(new SetCardInfo("Flowering of the White Tree", 15, Rarity.RARE, mage.cards.f.FloweringOfTheWhiteTree.class)); cards.add(new SetCardInfo("Foray of Orcs", 128, Rarity.UNCOMMON, mage.cards.f.ForayOfOrcs.class)); cards.add(new SetCardInfo("Forest", 270, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); diff --git a/Mage/src/main/java/mage/abilities/Modes.java b/Mage/src/main/java/mage/abilities/Modes.java index 06486c574c9..cca51fe2143 100644 --- a/Mage/src/main/java/mage/abilities/Modes.java +++ b/Mage/src/main/java/mage/abilities/Modes.java @@ -208,9 +208,9 @@ public class Modes extends LinkedHashMap { return realMaxModes; } - // use case: make all modes chooseable + // use case: make two modes chooseable (all cards that use this currently go from one to two) if (moreCondition != null && moreCondition.apply(game, source)) { - realMaxModes = this.size(); + realMaxModes = 2; } // use case: limit max modes by opponents (wtf?!)