From b412b9dd9ab6baef4d1b4f08fb1af5b788d1cf2d Mon Sep 17 00:00:00 2001 From: theelk801 Date: Tue, 11 Nov 2025 12:15:55 -0500 Subject: [PATCH] [TLE] Implement Overwhelming Victory --- .../src/mage/cards/o/OverwhelmingVictory.java | 79 +++++++++++++++++++ .../sets/AvatarTheLastAirbenderEternal.java | 2 + 2 files changed, 81 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/o/OverwhelmingVictory.java diff --git a/Mage.Sets/src/mage/cards/o/OverwhelmingVictory.java b/Mage.Sets/src/mage/cards/o/OverwhelmingVictory.java new file mode 100644 index 00000000000..7b939370502 --- /dev/null +++ b/Mage.Sets/src/mage/cards/o/OverwhelmingVictory.java @@ -0,0 +1,79 @@ +package mage.cards.o; + +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.filter.StaticFilters; +import mage.game.Game; +import mage.target.common.TargetCreaturePermanent; + +import java.util.Optional; +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class OverwhelmingVictory extends CardImpl { + + public OverwhelmingVictory(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{4}{R}"); + + this.subtype.add(SubType.LESSON); + + // Overwhelming Victory deals 5 damage to target creature. Each creature you control gains trample and gets +X/+0 until end of turn, where X is the amount of excess damage dealt this way. + this.getSpellAbility().addEffect(new OverwhelmingVictoryEffect()); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + private OverwhelmingVictory(final OverwhelmingVictory card) { + super(card); + } + + @Override + public OverwhelmingVictory copy() { + return new OverwhelmingVictory(this); + } +} + +class OverwhelmingVictoryEffect extends OneShotEffect { + + OverwhelmingVictoryEffect() { + super(Outcome.Benefit); + staticText = "{this} deals 5 damage to target creature. Each creature you control gains trample " + + "and gets +X/+0 until end of turn, where X is the amount of excess damage dealt this way"; + } + + private OverwhelmingVictoryEffect(final OverwhelmingVictoryEffect effect) { + super(effect); + } + + @Override + public OverwhelmingVictoryEffect copy() { + return new OverwhelmingVictoryEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + int excess = Optional + .ofNullable(getTargetPointer().getFirst(game, source)) + .map(game::getPermanent) + .map(permanent -> permanent.damageWithExcess(5, source, game)) + .orElse(0); + game.addEffect(new GainAbilityAllEffect( + TrampleAbility.getInstance(), Duration.EndOfTurn, + StaticFilters.FILTER_CONTROLLED_CREATURE + ), source); + if (excess > 0) { + game.addEffect(new BoostControlledEffect(excess, 0, Duration.EndOfTurn), source); + } + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/AvatarTheLastAirbenderEternal.java b/Mage.Sets/src/mage/sets/AvatarTheLastAirbenderEternal.java index 58117e13696..e0eeaceacbd 100644 --- a/Mage.Sets/src/mage/sets/AvatarTheLastAirbenderEternal.java +++ b/Mage.Sets/src/mage/sets/AvatarTheLastAirbenderEternal.java @@ -181,6 +181,8 @@ public final class AvatarTheLastAirbenderEternal extends ExpansionSet { cards.add(new SetCardInfo("Mystical Tutor", 308, Rarity.RARE, mage.cards.m.MysticalTutor.class)); cards.add(new SetCardInfo("Noxious Gearhulk", 25, Rarity.MYTHIC, mage.cards.n.NoxiousGearhulk.class)); cards.add(new SetCardInfo("Obscuring Haze", 313, Rarity.RARE, mage.cards.o.ObscuringHaze.class)); + cards.add(new SetCardInfo("Overwhelming Victory", 123, Rarity.RARE, mage.cards.o.OverwhelmingVictory.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Overwhelming Victory", 196, Rarity.RARE, mage.cards.o.OverwhelmingVictory.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Path to Redemption", 271, Rarity.COMMON, mage.cards.p.PathToRedemption.class)); cards.add(new SetCardInfo("Plains", 297, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Plains", 298, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS));