From afe3516a3239c6e9c063b1dfa065083a0a5a225c Mon Sep 17 00:00:00 2001 From: theelk801 Date: Thu, 18 Jul 2024 15:00:33 -0400 Subject: [PATCH] [BLB] Implement Blooming Blast --- Mage.Sets/src/mage/cards/b/BloomingBlast.java | 44 +++++++++++++++++++ Mage.Sets/src/mage/sets/Bloomburrow.java | 1 + .../main/java/mage/constants/GiftType.java | 5 +++ 3 files changed, 50 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/b/BloomingBlast.java diff --git a/Mage.Sets/src/mage/cards/b/BloomingBlast.java b/Mage.Sets/src/mage/cards/b/BloomingBlast.java new file mode 100644 index 00000000000..b9713626601 --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BloomingBlast.java @@ -0,0 +1,44 @@ +package mage.cards.b; + +import mage.abilities.condition.common.GiftWasPromisedCondition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.DamageTargetControllerEffect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.keyword.GiftAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.GiftType; +import mage.target.common.TargetCreaturePermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class BloomingBlast extends CardImpl { + + public BloomingBlast(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}"); + + // Gift a Treasure + this.addAbility(new GiftAbility(this, GiftType.TREASURE)); + + // Blooming Blast deals 2 damage to target creature. If the gift was promised, Blooming Blast also deals 3 damage to that creature's controller. + this.getSpellAbility().addEffect(new DamageTargetEffect(2)); + this.getSpellAbility().addEffect(new ConditionalOneShotEffect( + new DamageTargetControllerEffect(3), GiftWasPromisedCondition.TRUE, + "if the gift was promised, {this} also deals 3 damage to that creature's controller" + )); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + } + + private BloomingBlast(final BloomingBlast card) { + super(card); + } + + @Override + public BloomingBlast copy() { + return new BloomingBlast(this); + } +} diff --git a/Mage.Sets/src/mage/sets/Bloomburrow.java b/Mage.Sets/src/mage/sets/Bloomburrow.java index f9e19c0eac4..f146fa95339 100644 --- a/Mage.Sets/src/mage/sets/Bloomburrow.java +++ b/Mage.Sets/src/mage/sets/Bloomburrow.java @@ -31,6 +31,7 @@ public final class Bloomburrow extends ExpansionSet { cards.add(new SetCardInfo("Barkform Harvester", 243, Rarity.COMMON, mage.cards.b.BarkformHarvester.class)); cards.add(new SetCardInfo("Baylen, the Haymaker", 205, Rarity.RARE, mage.cards.b.BaylenTheHaymaker.class)); cards.add(new SetCardInfo("Bellowing Crier", 42, Rarity.COMMON, mage.cards.b.BellowingCrier.class)); + cards.add(new SetCardInfo("Blooming Blast", 126, Rarity.UNCOMMON, mage.cards.b.BloomingBlast.class)); cards.add(new SetCardInfo("Blossoming Sands", 396, Rarity.COMMON, mage.cards.b.BlossomingSands.class)); cards.add(new SetCardInfo("Bonecache Overseer", 85, Rarity.UNCOMMON, mage.cards.b.BonecacheOverseer.class)); cards.add(new SetCardInfo("Brambleguard Captain", 127, Rarity.UNCOMMON, mage.cards.b.BrambleguardCaptain.class)); diff --git a/Mage/src/main/java/mage/constants/GiftType.java b/Mage/src/main/java/mage/constants/GiftType.java index 4363422f106..0b4454290d6 100644 --- a/Mage/src/main/java/mage/constants/GiftType.java +++ b/Mage/src/main/java/mage/constants/GiftType.java @@ -4,6 +4,7 @@ import mage.abilities.Ability; import mage.game.Game; import mage.game.permanent.token.FishNoAbilityToken; import mage.game.permanent.token.FoodToken; +import mage.game.permanent.token.TreasureToken; import mage.players.Player; /** @@ -18,6 +19,10 @@ public enum GiftType { "a Food", "create a Food token", (p, g, s) -> new FoodToken().putOntoBattlefield(1, g, s, p.getId()) ), + TREASURE( + "a Treasure", "create a Treasure token", + (p, g, s) -> new TreasureToken().putOntoBattlefield(1, g, s, p.getId()) + ), TAPPED_FISH( "a tapped Fish", "create a tapped 1/1 blue Fish creature token", (p, g, s) -> new FishNoAbilityToken().putOntoBattlefield(1, g, s, p.getId(), true, false)