From 95d04bbd516271b6d5591d1bb7f9724b87560cce Mon Sep 17 00:00:00 2001 From: Susucre <34709007+Susucre@users.noreply.github.com> Date: Tue, 2 Apr 2024 14:30:34 +0200 Subject: [PATCH] [OTJ] Implement Take the Fall --- Mage.Sets/src/mage/cards/t/TakeTheFall.java | 61 +++++++++++++++++++ .../mage/sets/OutlawsOfThunderJunction.java | 1 + 2 files changed, 62 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/t/TakeTheFall.java diff --git a/Mage.Sets/src/mage/cards/t/TakeTheFall.java b/Mage.Sets/src/mage/cards/t/TakeTheFall.java new file mode 100644 index 00000000000..b6a259d69fa --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TakeTheFall.java @@ -0,0 +1,61 @@ +package mage.cards.t; + +import mage.abilities.condition.Condition; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +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.Duration; +import mage.filter.FilterPermanent; +import mage.filter.predicate.mageobject.OutlawPredicate; +import mage.target.common.TargetCreaturePermanent; + +import java.util.UUID; + +/** + * @author Susucr + */ +public final class TakeTheFall extends CardImpl { + + private static final FilterPermanent filter = new FilterPermanent("an outlaw"); + + static { + filter.add(OutlawPredicate.instance); + } + + private static final Condition condition = new PermanentsOnTheBattlefieldCondition(filter, true); + private static final Hint hint = new ConditionHint(condition, "you control an outlaw"); + + public TakeTheFall(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{U}"); + + // Target creature gets -1/-0 until end of turn. It gets -4/-0 until end of turn instead if you control an outlaw. + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + this.getSpellAbility().addEffect(new ConditionalContinuousEffect( + new BoostTargetEffect(-4, 0, Duration.EndOfTurn), + new BoostTargetEffect(-1, 0, Duration.EndOfTurn), + condition, + "Target creature gets -1/-0 until end of turn. It gets -4/-0 until end of turn instead if you control an outlaw.")); + this.getSpellAbility().addHint(hint); + + // Draw a card. + this.getSpellAbility().addEffect( + new DrawCardSourceControllerEffect(1) + .concatBy("
") + ); + } + + private TakeTheFall(final TakeTheFall card) { + super(card); + } + + @Override + public TakeTheFall copy() { + return new TakeTheFall(this); + } +} diff --git a/Mage.Sets/src/mage/sets/OutlawsOfThunderJunction.java b/Mage.Sets/src/mage/sets/OutlawsOfThunderJunction.java index 7c076306968..54acd7448d3 100644 --- a/Mage.Sets/src/mage/sets/OutlawsOfThunderJunction.java +++ b/Mage.Sets/src/mage/sets/OutlawsOfThunderJunction.java @@ -247,6 +247,7 @@ public final class OutlawsOfThunderJunction extends ExpansionSet { cards.add(new SetCardInfo("Swamp", 274, Rarity.LAND, mage.cards.basiclands.Swamp.class, FULL_ART_BFZ_VARIOUS)); cards.add(new SetCardInfo("Take Up the Shield", 34, Rarity.COMMON, mage.cards.t.TakeUpTheShield.class)); cards.add(new SetCardInfo("Take for a Ride", 148, Rarity.UNCOMMON, mage.cards.t.TakeForARide.class)); + cards.add(new SetCardInfo("Take the Fall", 73, Rarity.COMMON, mage.cards.t.TakeTheFall.class)); cards.add(new SetCardInfo("Terror of the Peaks", 149, Rarity.MYTHIC, mage.cards.t.TerrorOfThePeaks.class)); cards.add(new SetCardInfo("The Key to the Vault", 54, Rarity.RARE, mage.cards.t.TheKeyToTheVault.class)); cards.add(new SetCardInfo("This Town Ain't Big Enough", 74, Rarity.UNCOMMON, mage.cards.t.ThisTownAintBigEnough.class));