[TLA] Implement Redirect Lightning

This commit is contained in:
theelk801 2025-08-12 17:56:50 -04:00
parent 5478dcc34e
commit 66b96cc232
2 changed files with 51 additions and 0 deletions

View file

@ -0,0 +1,49 @@
package mage.cards.r;
import mage.abilities.costs.OrCost;
import mage.abilities.costs.common.PayLifeCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.ChooseNewTargetsTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.FilterStackObject;
import mage.filter.predicate.other.NumberOfTargetsPredicate;
import mage.target.TargetStackObject;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class RedirectLightning extends CardImpl {
private static final FilterStackObject filter = new FilterStackObject("spell or ability with a single target");
static {
filter.add(new NumberOfTargetsPredicate(1));
}
public RedirectLightning(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R}");
this.subtype.add(SubType.LESSON);
// As an additional cost to cast this spell, pay 5 life or pay {2}.
this.getSpellAbility().addCost(new OrCost("pay 5 life or pay {2}", new PayLifeCost(5), new GenericManaCost(2)));
// Change the target of target spell or ability with a single target.
this.getSpellAbility().addEffect(new ChooseNewTargetsTargetEffect(true, true));
this.getSpellAbility().addTarget(new TargetStackObject(filter));
}
private RedirectLightning(final RedirectLightning card) {
super(card);
}
@Override
public RedirectLightning copy() {
return new RedirectLightning(this);
}
}

View file

@ -31,6 +31,8 @@ public final class AvatarTheLastAirbender extends ExpansionSet {
cards.add(new SetCardInfo("Katara, the Fearless", 361, Rarity.RARE, mage.cards.k.KataraTheFearless.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Mountain", 290, Rarity.LAND, mage.cards.basiclands.Mountain.class, FULL_ART_BFZ_VARIOUS));
cards.add(new SetCardInfo("Plains", 287, Rarity.LAND, mage.cards.basiclands.Plains.class, FULL_ART_BFZ_VARIOUS));
cards.add(new SetCardInfo("Redirect Lightning", 151, Rarity.RARE, mage.cards.r.RedirectLightning.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Redirect Lightning", 343, Rarity.RARE, mage.cards.r.RedirectLightning.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Sokka's Haiku", 71, Rarity.UNCOMMON, mage.cards.s.SokkasHaiku.class));
cards.add(new SetCardInfo("Sokka, Bold Boomeranger", 240, Rarity.RARE, mage.cards.s.SokkaBoldBoomeranger.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Sokka, Bold Boomeranger", 383, Rarity.RARE, mage.cards.s.SokkaBoldBoomeranger.class, NON_FULL_USE_VARIOUS));