From 789b7473d0c1b27f07b90c524421ec1cb1ec4698 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Wed, 15 Sep 2021 08:36:56 -0400 Subject: [PATCH] [MIC] Implemented Drown in Dreams --- Mage.Sets/src/mage/cards/d/DrownInDreams.java | 51 +++++++++++++++++++ .../src/mage/sets/MidnightHuntCommander.java | 1 + 2 files changed, 52 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/d/DrownInDreams.java diff --git a/Mage.Sets/src/mage/cards/d/DrownInDreams.java b/Mage.Sets/src/mage/cards/d/DrownInDreams.java new file mode 100644 index 0000000000..3d716d0eba --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DrownInDreams.java @@ -0,0 +1,51 @@ +package mage.cards.d; + +import mage.abilities.Mode; +import mage.abilities.condition.common.ControlACommanderCondition; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.MultipliedValue; +import mage.abilities.dynamicvalue.common.ManacostVariableValue; +import mage.abilities.effects.common.DrawCardTargetEffect; +import mage.abilities.effects.common.MillCardsTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.target.TargetPlayer; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class DrownInDreams extends CardImpl { + + private static final DynamicValue xValue = new MultipliedValue(ManacostVariableValue.REGULAR, 2); + + public DrownInDreams(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{X}{2}{U}"); + + // Choose one. If you control a commander as you cast this spell, you may choose both. + this.getSpellAbility().getModes().setChooseText( + "Choose one. If you control a commander as you cast this spell, you may choose both." + ); + this.getSpellAbility().getModes().setMoreCondition(ControlACommanderCondition.instance); + + // • Target player draws X cards. + this.getSpellAbility().addEffect(new DrawCardTargetEffect(ManacostVariableValue.REGULAR)); + this.getSpellAbility().addTarget(new TargetPlayer()); + + // • Target player mills twice X cards. + Mode mode = new Mode(new MillCardsTargetEffect(xValue).setText("target player mills twice X cards")); + mode.addTarget(new TargetPlayer()); + this.getSpellAbility().addMode(mode); + } + + private DrownInDreams(final DrownInDreams card) { + super(card); + } + + @Override + public DrownInDreams copy() { + return new DrownInDreams(this); + } +} diff --git a/Mage.Sets/src/mage/sets/MidnightHuntCommander.java b/Mage.Sets/src/mage/sets/MidnightHuntCommander.java index 62c769e91f..730397a72f 100644 --- a/Mage.Sets/src/mage/sets/MidnightHuntCommander.java +++ b/Mage.Sets/src/mage/sets/MidnightHuntCommander.java @@ -56,6 +56,7 @@ public final class MidnightHuntCommander extends ExpansionSet { cards.add(new SetCardInfo("Distant Melody", 98, Rarity.COMMON, mage.cards.d.DistantMelody.class)); cards.add(new SetCardInfo("Dread Summons", 113, Rarity.RARE, mage.cards.d.DreadSummons.class)); cards.add(new SetCardInfo("Dreadhorde Invasion", 114, Rarity.RARE, mage.cards.d.DreadhordeInvasion.class)); + cards.add(new SetCardInfo("Drown in Dreams", 13, Rarity.RARE, mage.cards.d.DrownInDreams.class)); cards.add(new SetCardInfo("Eater of Hope", 115, Rarity.RARE, mage.cards.e.EaterOfHope.class)); cards.add(new SetCardInfo("Elite Scaleguard", 85, Rarity.UNCOMMON, mage.cards.e.EliteScaleguard.class)); cards.add(new SetCardInfo("Eloise, Nephalia Sleuth", 3, Rarity.MYTHIC, mage.cards.e.EloiseNephaliaSleuth.class));