[DMU] Implemented Drag to the Bottom

This commit is contained in:
Daniel Bomar 2022-08-25 08:59:09 -05:00
parent 9b01769e9c
commit a977a7b114
No known key found for this signature in database
GPG key ID: C86C8658F4023918
2 changed files with 69 additions and 0 deletions

View file

@ -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";
}
}

View file

@ -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));