From 2fd0065e7eeaf1b10af2bd293a361b4edf2129cb Mon Sep 17 00:00:00 2001 From: theelk801 Date: Fri, 14 Nov 2025 15:07:44 -0500 Subject: [PATCH] [TLA] Implement Price of Freedom --- .../src/mage/cards/p/PriceOfFreedom.java | 54 +++++++++++++++++++ .../src/mage/sets/AvatarTheLastAirbender.java | 1 + 2 files changed, 55 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/p/PriceOfFreedom.java diff --git a/Mage.Sets/src/mage/cards/p/PriceOfFreedom.java b/Mage.Sets/src/mage/cards/p/PriceOfFreedom.java new file mode 100644 index 00000000000..a1fcab1bed4 --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PriceOfFreedom.java @@ -0,0 +1,54 @@ +package mage.cards.p; + +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.search.SearchLibraryPutInPlayTargetControllerEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.filter.FilterPermanent; +import mage.filter.predicate.Predicates; +import mage.target.TargetPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class PriceOfFreedom extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("artifact or land an opponent controls"); + + static { + filter.add(Predicates.or( + CardType.ARTIFACT.getPredicate(), + CardType.LAND.getPredicate() + )); + filter.add(TargetController.OPPONENT.getOwnerPredicate()); + } + + public PriceOfFreedom(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{R}"); + + this.subtype.add(SubType.LESSON); + + // Destroy target artifact or land an opponent controls. Its controller may search their library for a basic land card, put it onto the battlefield tapped, then shuffle. + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + this.getSpellAbility().addTarget(new TargetPermanent(filter)); + this.getSpellAbility().addEffect(new SearchLibraryPutInPlayTargetControllerEffect(true)); + + // Draw a card. + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1).concatBy("
")); + } + + private PriceOfFreedom(final PriceOfFreedom card) { + super(card); + } + + @Override + public PriceOfFreedom copy() { + return new PriceOfFreedom(this); + } +} diff --git a/Mage.Sets/src/mage/sets/AvatarTheLastAirbender.java b/Mage.Sets/src/mage/sets/AvatarTheLastAirbender.java index 59db5af2be7..835b6cd76cc 100644 --- a/Mage.Sets/src/mage/sets/AvatarTheLastAirbender.java +++ b/Mage.Sets/src/mage/sets/AvatarTheLastAirbender.java @@ -270,6 +270,7 @@ public final class AvatarTheLastAirbender extends ExpansionSet { cards.add(new SetCardInfo("Planetarium of Wan Shi Tong", 385, Rarity.MYTHIC, mage.cards.p.PlanetariumOfWanShiTong.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Platypus-Bear", 236, Rarity.COMMON, mage.cards.p.PlatypusBear.class)); cards.add(new SetCardInfo("Pretending Poxbearers", 237, Rarity.COMMON, mage.cards.p.PretendingPoxbearers.class)); + cards.add(new SetCardInfo("Price of Freedom", 149, Rarity.UNCOMMON, mage.cards.p.PriceOfFreedom.class)); cards.add(new SetCardInfo("Professor Zei, Anthropologist", 238, Rarity.UNCOMMON, mage.cards.p.ProfessorZeiAnthropologist.class)); cards.add(new SetCardInfo("Rabaroo Troop", 32, Rarity.COMMON, mage.cards.r.RabarooTroop.class)); cards.add(new SetCardInfo("Ran and Shaw", 150, Rarity.RARE, mage.cards.r.RanAndShaw.class, NON_FULL_USE_VARIOUS));