From 545aed84b3807c1c705cdf79f6739d535006d7e0 Mon Sep 17 00:00:00 2001 From: theelk801 Date: Wed, 30 Oct 2024 09:47:14 -0400 Subject: [PATCH] [FDN] Implement Bulk Up --- Mage.Sets/src/mage/cards/b/BulkUp.java | 72 ++++++++++++++++++++++++ Mage.Sets/src/mage/sets/Foundations.java | 1 + 2 files changed, 73 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/b/BulkUp.java diff --git a/Mage.Sets/src/mage/cards/b/BulkUp.java b/Mage.Sets/src/mage/cards/b/BulkUp.java new file mode 100644 index 00000000000..2aac017c8b1 --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BulkUp.java @@ -0,0 +1,72 @@ +package mage.cards.b; + +import mage.abilities.Ability; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.keyword.FlashbackAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetCreaturePermanent; +import mage.target.targetpointer.FixedTarget; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class BulkUp extends CardImpl { + + public BulkUp(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}"); + + // Double target creature's power until end of turn. + this.getSpellAbility().addEffect(new BulkUpEffect()); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + + // Flashback {4}{R}{R} + this.addAbility(new FlashbackAbility(this, new ManaCostsImpl<>("{4}{R}{R}"))); + } + + private BulkUp(final BulkUp card) { + super(card); + } + + @Override + public BulkUp copy() { + return new BulkUp(this); + } +} + +class BulkUpEffect extends OneShotEffect { + + BulkUpEffect() { + super(Outcome.Benefit); + staticText = "double target creature's power until end of turn"; + } + + private BulkUpEffect(final BulkUpEffect effect) { + super(effect); + } + + @Override + public BulkUpEffect copy() { + return new BulkUpEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source)); + if (permanent == null || permanent.getPower().getValue() == 0) { + return false; + } + game.addEffect(new BoostTargetEffect( + permanent.getPower().getValue(), 0 + ).setTargetPointer(new FixedTarget(permanent, game)), source); + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/Foundations.java b/Mage.Sets/src/mage/sets/Foundations.java index 8611783e02d..e43fb5ac2f7 100644 --- a/Mage.Sets/src/mage/sets/Foundations.java +++ b/Mage.Sets/src/mage/sets/Foundations.java @@ -53,6 +53,7 @@ public final class Foundations extends ExpansionSet { cards.add(new SetCardInfo("Bolt Bend", 619, Rarity.UNCOMMON, mage.cards.b.BoltBend.class)); cards.add(new SetCardInfo("Boros Charm", 721, Rarity.UNCOMMON, mage.cards.b.BorosCharm.class)); cards.add(new SetCardInfo("Boros Guildgate", 684, Rarity.COMMON, mage.cards.b.BorosGuildgate.class)); + cards.add(new SetCardInfo("Bulk Up", 80, Rarity.UNCOMMON, mage.cards.b.BulkUp.class)); cards.add(new SetCardInfo("Burst Lightning", 192, Rarity.COMMON, mage.cards.b.BurstLightning.class)); cards.add(new SetCardInfo("Charming Prince", 568, Rarity.RARE, mage.cards.c.CharmingPrince.class)); cards.add(new SetCardInfo("Chart a Course", 586, Rarity.UNCOMMON, mage.cards.c.ChartACourse.class));