From a977a7b114969e20f3b4f503d36e12e8e8d135f4 Mon Sep 17 00:00:00 2001 From: Daniel Bomar Date: Thu, 25 Aug 2022 08:59:09 -0500 Subject: [PATCH] [DMU] Implemented Drag to the Bottom --- .../src/mage/cards/d/DragToTheBottom.java | 68 +++++++++++++++++++ Mage.Sets/src/mage/sets/DominariaUnited.java | 1 + 2 files changed, 69 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/d/DragToTheBottom.java diff --git a/Mage.Sets/src/mage/cards/d/DragToTheBottom.java b/Mage.Sets/src/mage/cards/d/DragToTheBottom.java new file mode 100644 index 0000000000..6dbd6dba0e --- /dev/null +++ b/Mage.Sets/src/mage/cards/d/DragToTheBottom.java @@ -0,0 +1,68 @@ +package mage.cards.d; + +import java.util.UUID; + +import mage.abilities.Ability; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.DomainValue; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.continuous.BoostAllEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.AbilityWord; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.game.Game; + +/** + * + * @author weirddan455 + */ +public final class DragToTheBottom extends CardImpl { + + public DragToTheBottom(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}{B}"); + + // Domain -- Each creature gets -X/-X until end of turn, where X is 1 plus the number of basic land types among lands you control. + this.getSpellAbility().addEffect(new BoostAllEffect( + DragToTheBottomValue.instance, + DragToTheBottomValue.instance, + Duration.EndOfTurn + )); + this.getSpellAbility().setAbilityWord(AbilityWord.DOMAIN); + } + + private DragToTheBottom(final DragToTheBottom card) { + super(card); + } + + @Override + public DragToTheBottom copy() { + return new DragToTheBottom(this); + } +} + +enum DragToTheBottomValue implements DynamicValue { + instance; + + @Override + public int calculate(Game game, Ability sourceAbility, Effect effect) { + int value = 1 + DomainValue.REGULAR.calculate(game, sourceAbility, effect); + return -value; + } + + @Override + public DynamicValue copy() { + return this; + } + + @Override + public String toString() { + return "-X"; + } + + @Override + public String getMessage() { + return "1 plus the number of basic land types among lands you control"; + } +} diff --git a/Mage.Sets/src/mage/sets/DominariaUnited.java b/Mage.Sets/src/mage/sets/DominariaUnited.java index 3f6ecf68b8..0f91449edf 100644 --- a/Mage.Sets/src/mage/sets/DominariaUnited.java +++ b/Mage.Sets/src/mage/sets/DominariaUnited.java @@ -57,6 +57,7 @@ public final class DominariaUnited extends ExpansionSet { cards.add(new SetCardInfo("Cosmic Epiphany", 283, Rarity.RARE, mage.cards.c.CosmicEpiphany.class)); cards.add(new SetCardInfo("Cult Conscript", 88, Rarity.UNCOMMON, mage.cards.c.CultConscript.class)); cards.add(new SetCardInfo("Cut Down", 89, Rarity.UNCOMMON, mage.cards.c.CutDown.class)); + cards.add(new SetCardInfo("Drag to the Bottom", 91, Rarity.RARE, mage.cards.d.DragToTheBottom.class)); cards.add(new SetCardInfo("Dragon Whelp", 120, Rarity.UNCOMMON, mage.cards.d.DragonWhelp.class)); cards.add(new SetCardInfo("Evolved Sleeper", 93, Rarity.RARE, mage.cards.e.EvolvedSleeper.class)); cards.add(new SetCardInfo("Fires of Victory", 123, Rarity.UNCOMMON, mage.cards.f.FiresOfVictory.class));