From 461b011fb7892b916943cc197b93b91cf447ae6c Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Mon, 29 Aug 2022 21:01:41 -0400 Subject: [PATCH] [DMU] Implemented Tribute to Urborg --- .../src/mage/cards/t/TributeToUrborg.java | 57 +++++++++++++++++++ Mage.Sets/src/mage/sets/DominariaUnited.java | 1 + 2 files changed, 58 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/t/TributeToUrborg.java diff --git a/Mage.Sets/src/mage/cards/t/TributeToUrborg.java b/Mage.Sets/src/mage/cards/t/TributeToUrborg.java new file mode 100644 index 0000000000..0bce221ec4 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TributeToUrborg.java @@ -0,0 +1,57 @@ +package mage.cards.t; + +import mage.abilities.condition.common.KickedCondition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.MultipliedValue; +import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount; +import mage.abilities.effects.common.AddContinuousEffectToGame; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.hint.Hint; +import mage.abilities.hint.ValueHint; +import mage.abilities.keyword.KickerAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.filter.StaticFilters; +import mage.target.common.TargetCreaturePermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class TributeToUrborg extends CardImpl { + + private static final DynamicValue count + = new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_INSTANT_OR_SORCERY_FROM_YOUR_GRAVEYARD); + private static final DynamicValue xValue = new MultipliedValue(count, -1); + private static final Hint hint = new ValueHint("Instant and sorcery cards in your graveyard", count); + + public TributeToUrborg(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{B}"); + + // Kicker {1}{U} + this.addAbility(new KickerAbility("{1}{U}")); + + // Target creature gets -2/-2 until end of turn. If this spell was kicked, that creature gets an additional -1/-1 until end of turn for each instant and sorcery card in your graveyard. + this.getSpellAbility().addEffect(new BoostTargetEffect(-2, -2)); + this.getSpellAbility().addEffect(new ConditionalOneShotEffect( + new AddContinuousEffectToGame(new BoostTargetEffect(xValue, xValue, Duration.EndOfTurn)), + KickedCondition.ONCE, "If this spell was kicked, that creature gets an additional " + + "-1/-1 until end of turn for each instant and sorcery card in your graveyard" + )); + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + this.getSpellAbility().addHint(hint); + } + + private TributeToUrborg(final TributeToUrborg card) { + super(card); + } + + @Override + public TributeToUrborg copy() { + return new TributeToUrborg(this); + } +} diff --git a/Mage.Sets/src/mage/sets/DominariaUnited.java b/Mage.Sets/src/mage/sets/DominariaUnited.java index 8c922f5d4f..034672f12a 100644 --- a/Mage.Sets/src/mage/sets/DominariaUnited.java +++ b/Mage.Sets/src/mage/sets/DominariaUnited.java @@ -225,6 +225,7 @@ public final class DominariaUnited extends ExpansionSet { cards.add(new SetCardInfo("Tolarian Terror", 72, Rarity.COMMON, mage.cards.t.TolarianTerror.class)); cards.add(new SetCardInfo("Tori D'Avenant, Fury Rider", 223, Rarity.UNCOMMON, mage.cards.t.ToriDAvenantFuryRider.class)); cards.add(new SetCardInfo("Toxic Abomination", 112, Rarity.COMMON, mage.cards.t.ToxicAbomination.class)); + cards.add(new SetCardInfo("Tribute to Urborg", 113, Rarity.COMMON, mage.cards.t.TributeToUrborg.class)); cards.add(new SetCardInfo("Tura Kennerud, Skyknight", 224, Rarity.UNCOMMON, mage.cards.t.TuraKennerudSkyknight.class)); cards.add(new SetCardInfo("Twinferno", 149, Rarity.UNCOMMON, mage.cards.t.Twinferno.class)); cards.add(new SetCardInfo("Urborg Lhurgoyf", 186, Rarity.RARE, mage.cards.u.UrborgLhurgoyf.class));