[LTR] Implement Flame of Anor

This commit is contained in:
theelk801 2023-06-09 08:28:44 -04:00
parent 6b6ef79f3e
commit d688bcb54a
3 changed files with 63 additions and 2 deletions

View file

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

View file

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

View file

@ -208,9 +208,9 @@ public class Modes extends LinkedHashMap<UUID, Mode> {
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?!)