From 08522cab8f1dc8438a23123bb376fa699bfda023 Mon Sep 17 00:00:00 2001 From: theelk801 Date: Thu, 18 Jul 2024 10:05:01 -0400 Subject: [PATCH] [BLB] Implement Psychic Whorl --- Mage.Sets/src/mage/cards/p/PsychicWhorl.java | 48 ++++++++++++++++++++ Mage.Sets/src/mage/sets/Bloomburrow.java | 1 + 2 files changed, 49 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/p/PsychicWhorl.java diff --git a/Mage.Sets/src/mage/cards/p/PsychicWhorl.java b/Mage.Sets/src/mage/cards/p/PsychicWhorl.java new file mode 100644 index 00000000000..f35c9339f29 --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PsychicWhorl.java @@ -0,0 +1,48 @@ +package mage.cards.p; + +import mage.abilities.condition.Condition; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.discard.DiscardTargetEffect; +import mage.abilities.effects.keyword.SurveilEffect; +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.SubType; +import mage.filter.common.FilterControlledPermanent; +import mage.target.common.TargetOpponent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class PsychicWhorl extends CardImpl { + + private static final Condition condition = new PermanentsOnTheBattlefieldCondition(new FilterControlledPermanent(SubType.RAT)); + private static final Hint hint = new ConditionHint(condition, "You control a Rat"); + + public PsychicWhorl(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}"); + + // Target opponent discards two cards. Then if you control a Rat, surveil 2. + this.getSpellAbility().addEffect(new DiscardTargetEffect(2)); + this.getSpellAbility().addTarget(new TargetOpponent()); + this.getSpellAbility().addEffect(new ConditionalOneShotEffect( + new SurveilEffect(2), condition, + "then if you control a Rat, surveil 2" + )); + this.getSpellAbility().addHint(hint); + } + + private PsychicWhorl(final PsychicWhorl card) { + super(card); + } + + @Override + public PsychicWhorl copy() { + return new PsychicWhorl(this); + } +} diff --git a/Mage.Sets/src/mage/sets/Bloomburrow.java b/Mage.Sets/src/mage/sets/Bloomburrow.java index 802d8ba4872..a399ee8e1f8 100644 --- a/Mage.Sets/src/mage/sets/Bloomburrow.java +++ b/Mage.Sets/src/mage/sets/Bloomburrow.java @@ -136,6 +136,7 @@ public final class Bloomburrow extends ExpansionSet { cards.add(new SetCardInfo("Plumecreed Escort", 65, Rarity.UNCOMMON, mage.cards.p.PlumecreedEscort.class)); cards.add(new SetCardInfo("Plumecreed Mentor", 228, Rarity.UNCOMMON, mage.cards.p.PlumecreedMentor.class)); cards.add(new SetCardInfo("Pond Prophet", 229, Rarity.COMMON, mage.cards.p.PondProphet.class)); + cards.add(new SetCardInfo("Psychic Whorl", 105, Rarity.COMMON, mage.cards.p.PsychicWhorl.class)); cards.add(new SetCardInfo("Quaketusk Boar", 146, Rarity.UNCOMMON, mage.cards.q.QuaketuskBoar.class)); cards.add(new SetCardInfo("Rabbit Response", 26, Rarity.COMMON, mage.cards.r.RabbitResponse.class)); cards.add(new SetCardInfo("Rabid Bite", 394, Rarity.COMMON, mage.cards.r.RabidBite.class));