From 56bf550dabdcd741436be485b16cba1f66311fd5 Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Mon, 16 Dec 2019 15:29:13 +0400 Subject: [PATCH] * Devotion abilities - added card hints about devotion value; --- .../src/mage/cards/a/AbhorrentOverlord.java | 17 ++++++---- .../src/mage/cards/a/AcolytesReward.java | 14 +++++---- Mage.Sets/src/mage/cards/a/AspectOfHydra.java | 15 ++++----- .../src/mage/cards/a/AthreosGodOfPassage.java | 14 ++++++--- .../mage/cards/d/DaxosBlessedByTheSun.java | 4 ++- .../src/mage/cards/d/DiscipleOfPhenax.java | 8 +++-- .../mage/cards/e/ElspethUndauntedHero.java | 2 ++ .../src/mage/cards/e/EpharaGodOfThePolis.java | 21 +++++++------ .../src/mage/cards/e/ErebosGodOfTheDead.java | 13 +++++--- .../src/mage/cards/e/EvangelOfHeliod.java | 16 ++++++---- .../src/mage/cards/f/FanaticOfMogis.java | 21 ++++++------- .../mage/cards/g/GrayMerchantOfAsphodel.java | 20 +++++++----- .../src/mage/cards/h/HeliodGodOfTheSun.java | 13 +++++--- .../src/mage/cards/i/IroasGodOfVictory.java | 26 +++++++++------- .../mage/cards/k/KarametraGodOfHarvests.java | 15 ++++++--- .../src/mage/cards/k/KarametrasAcolyte.java | 18 ++++++----- .../src/mage/cards/k/KeranosGodOfStorms.java | 29 +++++++++-------- .../src/mage/cards/k/KlothyssDesign.java | 2 ++ .../mage/cards/k/KruphixGodOfHorizons.java | 13 +++++--- .../src/mage/cards/m/MarshmistTitan.java | 31 ++++++++----------- Mage.Sets/src/mage/cards/m/MasterOfWaves.java | 19 +++++++----- .../src/mage/cards/m/MogisGodOfSlaughter.java | 19 +++++++----- .../src/mage/cards/m/MogissMarauder.java | 9 ++++-- .../src/mage/cards/n/NykthosShrineToNyx.java | 31 +++++++++++++------ .../src/mage/cards/n/NyleaGodOfTheHunt.java | 16 +++++++--- .../src/mage/cards/n/NyleasDisciple.java | 17 +++++----- .../mage/cards/p/PharikaGodOfAffliction.java | 15 ++++++--- .../mage/cards/p/PhenaxGodOfDeception.java | 19 +++++++----- .../mage/cards/p/PurphorosGodOfTheForge.java | 20 +++++++----- .../src/mage/cards/r/ReverentHunter.java | 20 +++++++----- Mage.Sets/src/mage/cards/s/Sanguimancy.java | 19 ++++++------ Mage.Sets/src/mage/cards/s/Skyreaping.java | 14 ++++++--- .../src/mage/cards/t/ThassaGodOfTheSea.java | 18 ++++++----- Mage.Sets/src/mage/cards/t/ThassasRebuff.java | 15 +++++---- .../src/mage/cards/t/ThunderousMight.java | 21 ++++++------- .../src/mage/cards/x/XenagosGodOfRevels.java | 19 +++++++----- 36 files changed, 361 insertions(+), 242 deletions(-) diff --git a/Mage.Sets/src/mage/cards/a/AbhorrentOverlord.java b/Mage.Sets/src/mage/cards/a/AbhorrentOverlord.java index e39aece80d..a4aaefa10a 100644 --- a/Mage.Sets/src/mage/cards/a/AbhorrentOverlord.java +++ b/Mage.Sets/src/mage/cards/a/AbhorrentOverlord.java @@ -1,14 +1,14 @@ - package mage.cards.a; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.effects.Effect; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.SacrificeControllerEffect; +import mage.abilities.hint.ValueHint; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -18,14 +18,16 @@ import mage.constants.SubType; import mage.constants.TargetController; import mage.filter.StaticFilters; import mage.game.permanent.token.TokenImpl; -import mage.game.permanent.token.Token; + +import java.util.UUID; /** - * * @author LevelX2 */ public final class AbhorrentOverlord extends CardImpl { + private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.B); + public AbhorrentOverlord(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{B}{B}"); this.subtype.add(SubType.DEMON); @@ -35,10 +37,12 @@ public final class AbhorrentOverlord extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); + // When Abhorrent Overlord enters the battlefield, create a number of 1/1 black Harpy creature tokens with flying equal to your devotion to black. - Effect effect = new CreateTokenEffect(new AbhorrentOverlordHarpyToken(), new DevotionCount(ColoredManaSymbol.B)); + Effect effect = new CreateTokenEffect(new AbhorrentOverlordHarpyToken(), xValue); effect.setText("create a number of 1/1 black Harpy creature tokens with flying equal to your devotion to black. (Each {B} in the mana costs of permanents you control counts toward your devotion to black.)"); - this.addAbility(new EntersBattlefieldTriggeredAbility(effect)); + this.addAbility(new EntersBattlefieldTriggeredAbility(effect).addHint(new ValueHint("Devotion to black", xValue))); + // At the beginning of your upkeep, sacrifice a creature. this.addAbility(new BeginningOfUpkeepTriggeredAbility(new SacrificeControllerEffect(StaticFilters.FILTER_PERMANENT_CREATURE, 1, null), TargetController.YOU, false)); } @@ -65,6 +69,7 @@ class AbhorrentOverlordHarpyToken extends TokenImpl { this.addAbility(FlyingAbility.getInstance()); } + public AbhorrentOverlordHarpyToken(final AbhorrentOverlordHarpyToken token) { super(token); } diff --git a/Mage.Sets/src/mage/cards/a/AcolytesReward.java b/Mage.Sets/src/mage/cards/a/AcolytesReward.java index 7f48be367e..8bbb118fee 100644 --- a/Mage.Sets/src/mage/cards/a/AcolytesReward.java +++ b/Mage.Sets/src/mage/cards/a/AcolytesReward.java @@ -1,10 +1,10 @@ - package mage.cards.a; -import java.util.UUID; import mage.abilities.Ability; +import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.effects.PreventionEffectImpl; +import mage.abilities.hint.ValueHint; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -17,20 +17,21 @@ import mage.players.Player; import mage.target.common.TargetAnyTarget; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class AcolytesReward extends CardImpl { public AcolytesReward(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{W}"); - + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{W}"); // Prevent the next X damage that would be dealt to target creature this turn, where X is your devotion to white. If damage is prevented this way, Acolyte's Reward deals that much damage to any target. this.getSpellAbility().addEffect(new AcolytesRewardEffect()); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addHint(new ValueHint("Devotion to white", AcolytesRewardEffect.xValue)); } public AcolytesReward(final AcolytesReward card) { @@ -46,6 +47,7 @@ public final class AcolytesReward extends CardImpl { class AcolytesRewardEffect extends PreventionEffectImpl { protected int amount = 0; + static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.W); public AcolytesRewardEffect() { super(Duration.EndOfTurn); @@ -65,7 +67,7 @@ class AcolytesRewardEffect extends PreventionEffectImpl { @Override public void init(Ability source, Game game) { super.init(source, game); - amount = new DevotionCount(ColoredManaSymbol.W).calculate(game, source, this); + amount = xValue.calculate(game, source, this); } @Override diff --git a/Mage.Sets/src/mage/cards/a/AspectOfHydra.java b/Mage.Sets/src/mage/cards/a/AspectOfHydra.java index a940843666..0a664fa53f 100644 --- a/Mage.Sets/src/mage/cards/a/AspectOfHydra.java +++ b/Mage.Sets/src/mage/cards/a/AspectOfHydra.java @@ -1,11 +1,10 @@ - package mage.cards.a; -import java.util.UUID; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.effects.Effect; import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.abilities.hint.ValueHint; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -13,22 +12,24 @@ import mage.constants.ColoredManaSymbol; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class AspectOfHydra extends CardImpl { - public AspectOfHydra(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{G}"); + private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.G); + public AspectOfHydra(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{G}"); // Target creature gets +X/+X until end of turn, where X is your devotion to green. - DynamicValue greenDevotion = new DevotionCount(ColoredManaSymbol.G); - Effect effect = new BoostTargetEffect(greenDevotion, greenDevotion, Duration.EndOfTurn, true); + Effect effect = new BoostTargetEffect(xValue, xValue, Duration.EndOfTurn, true); effect.setText("Target creature gets +X/+X until end of turn, where X is your devotion to green"); this.getSpellAbility().addEffect(effect); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + this.getSpellAbility().addHint(new ValueHint("Devotion to green", xValue)); } public AspectOfHydra(final AspectOfHydra card) { diff --git a/Mage.Sets/src/mage/cards/a/AthreosGodOfPassage.java b/Mage.Sets/src/mage/cards/a/AthreosGodOfPassage.java index 8bdca274c7..8fcfb2e3ea 100644 --- a/Mage.Sets/src/mage/cards/a/AthreosGodOfPassage.java +++ b/Mage.Sets/src/mage/cards/a/AthreosGodOfPassage.java @@ -1,17 +1,17 @@ - package mage.cards.a; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.Cost; import mage.abilities.costs.common.PayLifeCost; +import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect; +import mage.abilities.hint.ValueHint; import mage.abilities.keyword.IndestructibleAbility; import mage.cards.Card; import mage.cards.CardImpl; @@ -27,13 +27,15 @@ import mage.game.events.ZoneChangeEvent; import mage.players.Player; import mage.target.common.TargetOpponent; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class AthreosGodOfPassage extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another creature you own"); + private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.W, ColoredManaSymbol.B); static { filter.add(AnotherPredicate.instance); @@ -50,10 +52,12 @@ public final class AthreosGodOfPassage extends CardImpl { // Indestructible this.addAbility(IndestructibleAbility.getInstance()); + // As long as your devotion to white and black is less than seven, Athreos isn't a creature. - Effect effect = new LoseCreatureTypeSourceEffect(new DevotionCount(ColoredManaSymbol.W, ColoredManaSymbol.B), 7); + Effect effect = new LoseCreatureTypeSourceEffect(xValue, 7); effect.setText("As long as your devotion to white and black is less than seven, Athreos isn't a creature"); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect).addHint(new ValueHint("Devotion to white and black", xValue))); + // Whenever another creature you own dies, return it to your hand unless target opponent pays 3 life. Ability ability = new AthreosDiesCreatureTriggeredAbility(new AthreosGodOfPassageReturnEffect(), false, filter); ability.addTarget(new TargetOpponent()); diff --git a/Mage.Sets/src/mage/cards/d/DaxosBlessedByTheSun.java b/Mage.Sets/src/mage/cards/d/DaxosBlessedByTheSun.java index 9335f9e349..db01c36b4d 100644 --- a/Mage.Sets/src/mage/cards/d/DaxosBlessedByTheSun.java +++ b/Mage.Sets/src/mage/cards/d/DaxosBlessedByTheSun.java @@ -7,6 +7,7 @@ import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.effects.common.continuous.SetToughnessSourceEffect; +import mage.abilities.hint.ValueHint; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; @@ -35,7 +36,8 @@ public final class DaxosBlessedByTheSun extends CardImpl { // Daxos's toughness is equal to your devotion to white. this.addAbility(new SimpleStaticAbility( Zone.ALL, new SetToughnessSourceEffect(xValue, Duration.EndOfGame - ).setText("{this}'s toughness is equal to your devotion to white"))); + ).setText("{this}'s toughness is equal to your devotion to white")) + .addHint(new ValueHint("Devotion to white", xValue))); // Whenever another creature you control enters the battlefield or dies, you gain 1 life. this.addAbility(new DaxosBlessedByTheSunAbility()); diff --git a/Mage.Sets/src/mage/cards/d/DiscipleOfPhenax.java b/Mage.Sets/src/mage/cards/d/DiscipleOfPhenax.java index 01244aeea4..b57bd9b46f 100644 --- a/Mage.Sets/src/mage/cards/d/DiscipleOfPhenax.java +++ b/Mage.Sets/src/mage/cards/d/DiscipleOfPhenax.java @@ -1,11 +1,12 @@ - package mage.cards.d; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.effects.OneShotEffect; +import mage.abilities.hint.ValueHint; import mage.cards.*; import mage.constants.*; import mage.filter.FilterCard; @@ -35,6 +36,7 @@ public final class DiscipleOfPhenax extends CardImpl { // from their hand equal to your devotion to black. You choose one of them. That player discards that card. Ability ability = new EntersBattlefieldTriggeredAbility(new DiscipleOfPhenaxEffect(), false); ability.addTarget(new TargetPlayer()); + ability.addHint(new ValueHint("Devotion to black", DiscipleOfPhenaxEffect.xValue)); this.addAbility(ability); } @@ -51,6 +53,8 @@ public final class DiscipleOfPhenax extends CardImpl { class DiscipleOfPhenaxEffect extends OneShotEffect { + static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.B); + public DiscipleOfPhenaxEffect() { super(Outcome.Discard); staticText = "target player reveals a number of cards from their hand equal to your devotion to black. You choose one of them. That player discards that card"; @@ -67,7 +71,7 @@ class DiscipleOfPhenaxEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - int devotion = new DevotionCount(ColoredManaSymbol.B).calculate(game, source, this); + int devotion = xValue.calculate(game, source, this); Player targetPlayer = game.getPlayer(targetPointer.getFirst(game, source)); if (devotion > 0 && targetPlayer != null) { Cards revealedCards = new CardsImpl(); diff --git a/Mage.Sets/src/mage/cards/e/ElspethUndauntedHero.java b/Mage.Sets/src/mage/cards/e/ElspethUndauntedHero.java index 9c9082906e..56c59b9b83 100644 --- a/Mage.Sets/src/mage/cards/e/ElspethUndauntedHero.java +++ b/Mage.Sets/src/mage/cards/e/ElspethUndauntedHero.java @@ -9,6 +9,7 @@ import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.abilities.effects.common.search.SearchLibraryGraveyardPutOntoBattlefieldEffect; +import mage.abilities.hint.ValueHint; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -57,6 +58,7 @@ public final class ElspethUndauntedHero extends CardImpl { ability.addEffect(new BoostControlledEffect( xValue, xValue, Duration.EndOfTurn ).setText("and get +X/+X, where X is your devotion to white")); + ability.addHint(new ValueHint("Devotion to white", xValue)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/e/EpharaGodOfThePolis.java b/Mage.Sets/src/mage/cards/e/EpharaGodOfThePolis.java index c3ae62a97a..9bfa8d8b1b 100644 --- a/Mage.Sets/src/mage/cards/e/EpharaGodOfThePolis.java +++ b/Mage.Sets/src/mage/cards/e/EpharaGodOfThePolis.java @@ -1,17 +1,17 @@ - package mage.cards.e; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.Condition; import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; +import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.effects.Effect; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect; +import mage.abilities.hint.ValueHint; import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -20,12 +20,15 @@ import mage.game.Game; import mage.game.permanent.Permanent; import mage.watchers.common.PermanentsEnteredBattlefieldWatcher; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class EpharaGodOfThePolis extends CardImpl { + private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.W, ColoredManaSymbol.U); + public EpharaGodOfThePolis(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{2}{W}{U}"); this.addSuperType(SuperType.LEGENDARY); @@ -38,17 +41,16 @@ public final class EpharaGodOfThePolis extends CardImpl { this.addAbility(IndestructibleAbility.getInstance()); // As long as your devotion to white and blue is less than seven, Ephara isn't a creature. - Effect effect = new LoseCreatureTypeSourceEffect(new DevotionCount(ColoredManaSymbol.W, ColoredManaSymbol.U), 7); + Effect effect = new LoseCreatureTypeSourceEffect(xValue, 7); effect.setText("As long as your devotion to white and blue is less than seven, Ephara isn't a creature"); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect).addHint(new ValueHint("Devotion to white and blue", xValue))); // At the beginning of each upkeep, if you had another creature enter the battlefield under your control last turn, draw a card. this.addAbility(new ConditionalInterveningIfTriggeredAbility( - new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), TargetController.ANY, false, false), - HadAnotherCreatureEnterTheBattlefieldCondition.instance, - "At the beginning of each upkeep, if you had another creature enter the battlefield under your control last turn, draw a card."), + new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), TargetController.ANY, false, false), + HadAnotherCreatureEnterTheBattlefieldCondition.instance, + "At the beginning of each upkeep, if you had another creature enter the battlefield under your control last turn, draw a card."), new PermanentsEnteredBattlefieldWatcher()); - } public EpharaGodOfThePolis(final EpharaGodOfThePolis card) { @@ -66,7 +68,6 @@ enum HadAnotherCreatureEnterTheBattlefieldCondition implements Condition { instance; - @Override public boolean apply(Game game, Ability source) { Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); diff --git a/Mage.Sets/src/mage/cards/e/ErebosGodOfTheDead.java b/Mage.Sets/src/mage/cards/e/ErebosGodOfTheDead.java index 3d8470a02b..70ea3e5500 100644 --- a/Mage.Sets/src/mage/cards/e/ErebosGodOfTheDead.java +++ b/Mage.Sets/src/mage/cards/e/ErebosGodOfTheDead.java @@ -1,29 +1,32 @@ - package mage.cards.e; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.common.PayLifeCost; import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.effects.Effect; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.continuous.CantGainLifeAllEffect; import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect; +import mage.abilities.hint.ValueHint; import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class ErebosGodOfTheDead extends CardImpl { + private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.B); + public ErebosGodOfTheDead(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{3}{B}"); addSuperType(SuperType.LEGENDARY); @@ -36,9 +39,9 @@ public final class ErebosGodOfTheDead extends CardImpl { this.addAbility(IndestructibleAbility.getInstance()); // As long as your devotion to black is less than five, Erebos isn't a creature. - Effect effect = new LoseCreatureTypeSourceEffect(new DevotionCount(ColoredManaSymbol.B), 5); + Effect effect = new LoseCreatureTypeSourceEffect(xValue, 5); effect.setText("As long as your devotion to black is less than five, Erebos isn't a creature.(Each {B} in the mana costs of permanents you control counts towards your devotion to black.)"); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect).addHint(new ValueHint("Devotion to black", xValue))); // Your opponents can't gain life. this.addAbility(new SimpleStaticAbility( diff --git a/Mage.Sets/src/mage/cards/e/EvangelOfHeliod.java b/Mage.Sets/src/mage/cards/e/EvangelOfHeliod.java index 19237faccc..c875465a19 100644 --- a/Mage.Sets/src/mage/cards/e/EvangelOfHeliod.java +++ b/Mage.Sets/src/mage/cards/e/EvangelOfHeliod.java @@ -1,26 +1,29 @@ - package mage.cards.e; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.hint.ValueHint; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.SubType; import mage.constants.ColoredManaSymbol; +import mage.constants.SubType; import mage.game.permanent.token.SoldierToken; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class EvangelOfHeliod extends CardImpl { + private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.W); + public EvangelOfHeliod(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}{W}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.CLERIC); @@ -28,7 +31,8 @@ public final class EvangelOfHeliod extends CardImpl { this.toughness = new MageInt(3); // When Evangel of Heliod enters the battlefield, create a number of 1/1 white Soldier creature tokens equal to your devotion to white. - this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new SoldierToken(), new DevotionCount(ColoredManaSymbol.W)))); + this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new SoldierToken(), xValue)) + .addHint(new ValueHint("Devotion to white", xValue))); } public EvangelOfHeliod(final EvangelOfHeliod card) { diff --git a/Mage.Sets/src/mage/cards/f/FanaticOfMogis.java b/Mage.Sets/src/mage/cards/f/FanaticOfMogis.java index 580421ec3c..f6943e99f1 100644 --- a/Mage.Sets/src/mage/cards/f/FanaticOfMogis.java +++ b/Mage.Sets/src/mage/cards/f/FanaticOfMogis.java @@ -1,28 +1,27 @@ - package mage.cards.f; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.effects.Effect; import mage.abilities.effects.common.DamagePlayersEffect; +import mage.abilities.hint.ValueHint; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.SubType; -import mage.constants.ColoredManaSymbol; -import mage.constants.Outcome; -import mage.constants.TargetController; +import mage.constants.*; + +import java.util.UUID; /** - * * @author LevelX2 */ public final class FanaticOfMogis extends CardImpl { + private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.R); + public FanaticOfMogis(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); this.subtype.add(SubType.MINOTAUR); this.subtype.add(SubType.SHAMAN); @@ -30,9 +29,9 @@ public final class FanaticOfMogis extends CardImpl { this.toughness = new MageInt(2); // When Fanatic of Mogis enters the battlefield, it deals damage to each opponent equal to your devotion to red. - Effect effect = new DamagePlayersEffect(Outcome.Damage, new DevotionCount(ColoredManaSymbol.R), TargetController.OPPONENT); + Effect effect = new DamagePlayersEffect(Outcome.Damage, xValue, TargetController.OPPONENT); effect.setText("it deals damage to each opponent equal to your devotion to red. (Each {R} in the mana costs of permanents you control counts towards your devotion to red.)"); - this.addAbility(new EntersBattlefieldTriggeredAbility(effect, false)); + this.addAbility(new EntersBattlefieldTriggeredAbility(effect, false).addHint(new ValueHint("Devotion to red", xValue))); } public FanaticOfMogis(final FanaticOfMogis card) { diff --git a/Mage.Sets/src/mage/cards/g/GrayMerchantOfAsphodel.java b/Mage.Sets/src/mage/cards/g/GrayMerchantOfAsphodel.java index eac3532fb0..d0495b92f9 100644 --- a/Mage.Sets/src/mage/cards/g/GrayMerchantOfAsphodel.java +++ b/Mage.Sets/src/mage/cards/g/GrayMerchantOfAsphodel.java @@ -1,29 +1,30 @@ - package mage.cards.g; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.effects.OneShotEffect; +import mage.abilities.hint.ValueHint; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.SubType; import mage.constants.ColoredManaSymbol; import mage.constants.Outcome; +import mage.constants.SubType; import mage.game.Game; import mage.players.Player; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class GrayMerchantOfAsphodel extends CardImpl { public GrayMerchantOfAsphodel(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}"); this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); @@ -31,8 +32,9 @@ public final class GrayMerchantOfAsphodel extends CardImpl { // When Gray Merchant of Asphodel enters the battlefield, each opponent loses X life, where X is your devotion to black. You gain life equal to the life lost this way. this.addAbility(new EntersBattlefieldTriggeredAbility( - new GrayMerchantOfAsphodelEffect(), - false)); + new GrayMerchantOfAsphodelEffect(), + false) + .addHint(new ValueHint("Devotion to black", GrayMerchantOfAsphodelEffect.xValue))); } public GrayMerchantOfAsphodel(final GrayMerchantOfAsphodel card) { @@ -47,6 +49,8 @@ public final class GrayMerchantOfAsphodel extends CardImpl { class GrayMerchantOfAsphodelEffect extends OneShotEffect { + static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.B); + public GrayMerchantOfAsphodelEffect() { super(Outcome.GainLife); this.staticText = "each opponent loses X life, where X is your devotion to black. " @@ -69,7 +73,7 @@ class GrayMerchantOfAsphodelEffect extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { int totalLifeLost = 0; - int lifeLost = new DevotionCount(ColoredManaSymbol.B).calculate(game, source, this); + int lifeLost = xValue.calculate(game, source, this); if (lifeLost > 0) { for (UUID playerId : game.getOpponents(source.getControllerId())) { Player opponent = game.getPlayer(playerId); diff --git a/Mage.Sets/src/mage/cards/h/HeliodGodOfTheSun.java b/Mage.Sets/src/mage/cards/h/HeliodGodOfTheSun.java index 2765e74497..3f583f76f4 100644 --- a/Mage.Sets/src/mage/cards/h/HeliodGodOfTheSun.java +++ b/Mage.Sets/src/mage/cards/h/HeliodGodOfTheSun.java @@ -1,16 +1,16 @@ - package mage.cards.h; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.effects.Effect; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect; +import mage.abilities.hint.ValueHint; import mage.abilities.keyword.IndestructibleAbility; import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; @@ -19,12 +19,15 @@ import mage.constants.*; import mage.filter.StaticFilters; import mage.game.permanent.token.HeliodGodOfTheSunToken; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class HeliodGodOfTheSun extends CardImpl { + private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.W); + public HeliodGodOfTheSun(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{3}{W}"); addSuperType(SuperType.LEGENDARY); @@ -37,9 +40,9 @@ public final class HeliodGodOfTheSun extends CardImpl { this.addAbility(IndestructibleAbility.getInstance()); // As long as your devotion to white is less than five, Heliod isn't a creature.(Each {W} in the mana costs of permanents you control counts towards your devotion to white.) - Effect effect = new LoseCreatureTypeSourceEffect(new DevotionCount(ColoredManaSymbol.W), 5); + Effect effect = new LoseCreatureTypeSourceEffect(xValue, 5); effect.setText("As long as your devotion to white is less than five, Heliod isn't a creature.(Each {W} in the mana costs of permanents you control counts towards your devotion to white.)"); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect).addHint(new ValueHint("Devotion to white", xValue))); // Other creatures you control have vigilance. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(VigilanceAbility.getInstance(), Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE, true))); diff --git a/Mage.Sets/src/mage/cards/i/IroasGodOfVictory.java b/Mage.Sets/src/mage/cards/i/IroasGodOfVictory.java index b964156ea1..daade1b215 100644 --- a/Mage.Sets/src/mage/cards/i/IroasGodOfVictory.java +++ b/Mage.Sets/src/mage/cards/i/IroasGodOfVictory.java @@ -1,14 +1,14 @@ - package mage.cards.i; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.effects.Effect; import mage.abilities.effects.common.PreventAllDamageToAllEffect; import mage.abilities.effects.common.continuous.GainAbilityAllEffect; import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect; +import mage.abilities.hint.ValueHint; import mage.abilities.keyword.IndestructibleAbility; import mage.abilities.keyword.MenaceAbility; import mage.cards.CardImpl; @@ -19,21 +19,25 @@ import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.AttackingPredicate; import mage.filter.predicate.permanent.ControllerPredicate; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class IroasGodOfVictory extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Creatures you control"); private static final FilterControlledCreatureInPlay filterAttacking = new FilterControlledCreatureInPlay("attacking creatures you control"); + static { filter.add(new ControllerPredicate(TargetController.YOU)); filterAttacking.getCreatureFilter().add(AttackingPredicate.instance); } - + + private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.R, ColoredManaSymbol.W); + public IroasGodOfVictory(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{2}{R}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{2}{R}{W}"); addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.GOD); @@ -42,18 +46,18 @@ public final class IroasGodOfVictory extends CardImpl { // Indestructible this.addAbility(IndestructibleAbility.getInstance()); - + // As long as your devotion to red and white is less than seven, Iroas isn't a creature. - Effect effect = new LoseCreatureTypeSourceEffect(new DevotionCount(ColoredManaSymbol.R, ColoredManaSymbol.W), 7); + Effect effect = new LoseCreatureTypeSourceEffect(xValue, 7); effect.setText("As long as your devotion to red and white is less than seven, Iroas isn't a creature"); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); - + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect).addHint(new ValueHint("Devotion to red and white", xValue))); + // Creatures you control have menace. (They can't be blocked except by two or more creatures.) this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(new MenaceAbility(), Duration.WhileOnBattlefield, filter))); - + // Prevent all damage that would be dealt to attacking creatures you control. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PreventAllDamageToAllEffect(Duration.WhileOnBattlefield, filterAttacking))); - + } public IroasGodOfVictory(final IroasGodOfVictory card) { diff --git a/Mage.Sets/src/mage/cards/k/KarametraGodOfHarvests.java b/Mage.Sets/src/mage/cards/k/KarametraGodOfHarvests.java index 6ccd4c9f3b..76bef99881 100644 --- a/Mage.Sets/src/mage/cards/k/KarametraGodOfHarvests.java +++ b/Mage.Sets/src/mage/cards/k/KarametraGodOfHarvests.java @@ -1,14 +1,14 @@ - package mage.cards.k; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.effects.Effect; import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect; import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; +import mage.abilities.hint.ValueHint; import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -19,8 +19,9 @@ import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class KarametraGodOfHarvests extends CardImpl { @@ -33,6 +34,8 @@ public final class KarametraGodOfHarvests extends CardImpl { new SubtypePredicate(SubType.PLAINS))); } + private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.G, ColoredManaSymbol.W); + public KarametraGodOfHarvests(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{3}{G}{W}"); addSuperType(SuperType.LEGENDARY); @@ -43,10 +46,12 @@ public final class KarametraGodOfHarvests extends CardImpl { // Indestructible this.addAbility(IndestructibleAbility.getInstance()); + // As long as your devotion to green and white is less than seven, Karametra isn't a creature. - Effect effect = new LoseCreatureTypeSourceEffect(new DevotionCount(ColoredManaSymbol.G, ColoredManaSymbol.W), 7); + Effect effect = new LoseCreatureTypeSourceEffect(xValue, 7); effect.setText("As long as your devotion to green and white is less than seven, Karametra isn't a creature"); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect).addHint(new ValueHint("Devotion to green and white", xValue))); + // Whenever you cast a creature spell, you may search your library for a Forest or Plains card, put it onto the battlefield tapped, then shuffle your library. this.addAbility(new SpellCastControllerTriggeredAbility( new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(filter), true), StaticFilters.FILTER_SPELL_A_CREATURE, true)); diff --git a/Mage.Sets/src/mage/cards/k/KarametrasAcolyte.java b/Mage.Sets/src/mage/cards/k/KarametrasAcolyte.java index b3c204437a..9f53fc8cf0 100644 --- a/Mage.Sets/src/mage/cards/k/KarametrasAcolyte.java +++ b/Mage.Sets/src/mage/cards/k/KarametrasAcolyte.java @@ -1,25 +1,28 @@ - package mage.cards.k; -import java.util.UUID; import mage.MageInt; import mage.Mana; +import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.DevotionCount; +import mage.abilities.hint.ValueHint; import mage.abilities.mana.DynamicManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.SubType; import mage.constants.ColoredManaSymbol; +import mage.constants.SubType; + +import java.util.UUID; /** - * * @author LevelX2 */ public final class KarametrasAcolyte extends CardImpl { + private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.G); + public KarametrasAcolyte(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.DRUID); @@ -27,8 +30,9 @@ public final class KarametrasAcolyte extends CardImpl { this.toughness = new MageInt(4); // {T}: Add an amount of {G} equal to your devotion to green. - this.addAbility(new DynamicManaAbility(Mana.GreenMana(1), new DevotionCount(ColoredManaSymbol.G), - "Add an amount of {G} equal to your devotion to green. (Each {G} in the mana costs of permanents you control counts towards your devotion to green.)")); + this.addAbility(new DynamicManaAbility(Mana.GreenMana(1), xValue, + "Add an amount of {G} equal to your devotion to green. (Each {G} in the mana costs of permanents you control counts towards your devotion to green.)") + .addHint(new ValueHint("Devotion to green", xValue))); } public KarametrasAcolyte(final KarametrasAcolyte card) { diff --git a/Mage.Sets/src/mage/cards/k/KeranosGodOfStorms.java b/Mage.Sets/src/mage/cards/k/KeranosGodOfStorms.java index fbcec941d2..c78258feea 100644 --- a/Mage.Sets/src/mage/cards/k/KeranosGodOfStorms.java +++ b/Mage.Sets/src/mage/cards/k/KeranosGodOfStorms.java @@ -1,26 +1,22 @@ - package mage.cards.k; -import java.util.UUID; import mage.MageInt; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.effects.Effect; import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.InfoEffect; import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect; +import mage.abilities.hint.ValueHint; import mage.abilities.keyword.IndestructibleAbility; import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.cards.CardsImpl; -import mage.constants.CardType; -import mage.constants.SubType; -import mage.constants.ColoredManaSymbol; -import mage.constants.SuperType; -import mage.constants.Zone; +import mage.constants.*; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.events.GameEvent.EventType; @@ -29,15 +25,17 @@ import mage.players.Player; import mage.target.common.TargetAnyTarget; import mage.watchers.common.CardsAmountDrawnThisTurnWatcher; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class KeranosGodOfStorms extends CardImpl { - + private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.U, ColoredManaSymbol.R); + public KeranosGodOfStorms(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{3}{U}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{3}{U}{R}"); addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.GOD); @@ -46,17 +44,18 @@ public final class KeranosGodOfStorms extends CardImpl { // Indestructible this.addAbility(IndestructibleAbility.getInstance()); + // As long as your devotion to blue and red is less than seven, Keranos isn't a creature. - Effect effect = new LoseCreatureTypeSourceEffect(new DevotionCount(ColoredManaSymbol.U, ColoredManaSymbol.R), 7); + Effect effect = new LoseCreatureTypeSourceEffect(xValue, 7); effect.setText("As long as your devotion to blue and red is less than seven, Keranos isn't a creature"); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); - + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect).addHint(new ValueHint("Devotion to blue and red", xValue))); + // Reveal the first card you draw on each of your turns. // Whenever you reveal a land card this way, draw a card. // Whenever you reveal a nonland card this way, Keranos deals 3 damage to any target. this.addAbility(new KeranosGodOfStormsTriggeredAbility(), new CardsAmountDrawnThisTurnWatcher()); - - + + } public KeranosGodOfStorms(final KeranosGodOfStorms card) { diff --git a/Mage.Sets/src/mage/cards/k/KlothyssDesign.java b/Mage.Sets/src/mage/cards/k/KlothyssDesign.java index 5f0bdd7cdd..147d684560 100644 --- a/Mage.Sets/src/mage/cards/k/KlothyssDesign.java +++ b/Mage.Sets/src/mage/cards/k/KlothyssDesign.java @@ -3,6 +3,7 @@ package mage.cards.k; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.abilities.hint.ValueHint; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -28,6 +29,7 @@ public final class KlothyssDesign extends CardImpl { StaticFilters.FILTER_PERMANENT_CREATURES, false, true )); + this.getSpellAbility().addHint(new ValueHint("Devotion to green", xValue)); } private KlothyssDesign(final KlothyssDesign card) { diff --git a/Mage.Sets/src/mage/cards/k/KruphixGodOfHorizons.java b/Mage.Sets/src/mage/cards/k/KruphixGodOfHorizons.java index 0bdd3250f7..b0effcf4c8 100644 --- a/Mage.Sets/src/mage/cards/k/KruphixGodOfHorizons.java +++ b/Mage.Sets/src/mage/cards/k/KruphixGodOfHorizons.java @@ -1,15 +1,15 @@ - package mage.cards.k; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.effects.Effect; import mage.abilities.effects.ReplacementEffectImpl; import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect; import mage.abilities.effects.common.continuous.MaximumHandSizeControllerEffect; +import mage.abilities.hint.ValueHint; import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -17,12 +17,15 @@ import mage.constants.*; import mage.game.Game; import mage.game.events.GameEvent; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class KruphixGodOfHorizons extends CardImpl { + private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.G, ColoredManaSymbol.U); + public KruphixGodOfHorizons(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{3}{G}{U}"); addSuperType(SuperType.LEGENDARY); @@ -34,9 +37,9 @@ public final class KruphixGodOfHorizons extends CardImpl { // Indestructible this.addAbility(IndestructibleAbility.getInstance()); // As long as your devotion to green and blue is less than seven, Kruhpix isn't a creature. - Effect effect = new LoseCreatureTypeSourceEffect(new DevotionCount(ColoredManaSymbol.G, ColoredManaSymbol.U), 7); + Effect effect = new LoseCreatureTypeSourceEffect(xValue, 7); effect.setText("As long as your devotion to green and blue is less than seven, Kruhpix isn't a creature"); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect).addHint(new ValueHint("Devotion to green and blue", xValue))); // You have no maximum hand size. effect = new MaximumHandSizeControllerEffect(Integer.MAX_VALUE, Duration.WhileOnBattlefield, MaximumHandSizeControllerEffect.HandSizeModification.SET); diff --git a/Mage.Sets/src/mage/cards/m/MarshmistTitan.java b/Mage.Sets/src/mage/cards/m/MarshmistTitan.java index e932459f67..a4cfca2c7d 100644 --- a/Mage.Sets/src/mage/cards/m/MarshmistTitan.java +++ b/Mage.Sets/src/mage/cards/m/MarshmistTitan.java @@ -1,40 +1,36 @@ - package mage.cards.m; -import java.util.UUID; import mage.MageInt; import mage.Mana; import mage.abilities.Ability; import mage.abilities.SpellAbility; import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.effects.common.cost.CostModificationEffectImpl; +import mage.abilities.hint.ValueHint; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.SubType; -import mage.constants.ColoredManaSymbol; -import mage.constants.CostModificationType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.Zone; +import mage.constants.*; import mage.game.Game; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class MarshmistTitan extends CardImpl { public MarshmistTitan(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}{B}"); this.subtype.add(SubType.GIANT); this.power = new MageInt(4); this.toughness = new MageInt(5); // Marshmist Titan costs {X} less to cast, where X is your devotion to black. - this.addAbility(new SimpleStaticAbility(Zone.STACK, new MarshmistTitanCostReductionEffect())); + this.addAbility(new SimpleStaticAbility(Zone.STACK, new MarshmistTitanCostReductionEffect()) + .addHint(new ValueHint("Devotion to black", MarshmistTitanCostReductionEffect.xValue))); } public MarshmistTitan(final MarshmistTitan card) { @@ -49,6 +45,8 @@ public final class MarshmistTitan extends CardImpl { class MarshmistTitanCostReductionEffect extends CostModificationEffectImpl { + static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.B); + public MarshmistTitanCostReductionEffect() { super(Duration.Custom, Outcome.Benefit, CostModificationType.REDUCE_COST); staticText = "{this} costs {X} less to cast, where X is your devotion to black (Each {B} in the mana costs of permanents you control counts toward your devotion to black.) "; @@ -60,10 +58,10 @@ class MarshmistTitanCostReductionEffect extends CostModificationEffectImpl { @Override public boolean apply(Game game, Ability source, Ability abilityToModify) { - SpellAbility spellAbility = (SpellAbility)abilityToModify; + SpellAbility spellAbility = (SpellAbility) abilityToModify; Mana mana = spellAbility.getManaCostsToPay().getMana(); if (mana.getGeneric() > 0) { - int count = new DevotionCount(ColoredManaSymbol.B).calculate(game, source, this); + int count = xValue.calculate(game, source, this); int newCount = mana.getGeneric() - count; if (newCount < 0) { newCount = 0; @@ -77,10 +75,7 @@ class MarshmistTitanCostReductionEffect extends CostModificationEffectImpl { @Override public boolean applies(Ability abilityToModify, Ability source, Game game) { - if (abilityToModify.getSourceId().equals(source.getSourceId()) && (abilityToModify instanceof SpellAbility)) { - return true; - } - return false; + return abilityToModify.getSourceId().equals(source.getSourceId()) && (abilityToModify instanceof SpellAbility); } @Override diff --git a/Mage.Sets/src/mage/cards/m/MasterOfWaves.java b/Mage.Sets/src/mage/cards/m/MasterOfWaves.java index ba24cada0a..a563aafd4e 100644 --- a/Mage.Sets/src/mage/cards/m/MasterOfWaves.java +++ b/Mage.Sets/src/mage/cards/m/MasterOfWaves.java @@ -1,15 +1,15 @@ - package mage.cards.m; -import java.util.UUID; import mage.MageInt; import mage.ObjectColor; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.effects.Effect; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.abilities.hint.ValueHint; import mage.abilities.keyword.ProtectionAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -18,19 +18,23 @@ import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.SubtypePredicate; import mage.game.permanent.token.MasterOfWavesElementalToken; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class MasterOfWaves extends CardImpl { private static final FilterCreaturePermanent filterBoost = new FilterCreaturePermanent("Elemental creatures"); + static { filterBoost.add(new SubtypePredicate(SubType.ELEMENTAL)); } + private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.U); + public MasterOfWaves(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); this.subtype.add(SubType.MERFOLK); this.subtype.add(SubType.WIZARD); @@ -39,14 +43,15 @@ public final class MasterOfWaves extends CardImpl { // Protection from red this.addAbility(ProtectionAbility.from(ObjectColor.RED)); + // Elemental creatures you control get +1/+1. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filterBoost, false))); + // When Master of Waves enters the battlefield, create a number of 1/0 blue Elemental creature tokens equal to your devotion to blue. // (Each {U} in the mana costs of permanents you control counts toward your devotion to blue.) - Effect effect = new CreateTokenEffect(new MasterOfWavesElementalToken(), new DevotionCount(ColoredManaSymbol.U)); + Effect effect = new CreateTokenEffect(new MasterOfWavesElementalToken(), xValue); effect.setText("create a number of 1/0 blue Elemental creature tokens equal to your devotion to blue. (Each {U} in the mana costs of permanents you control counts toward your devotion to blue.)"); - this.addAbility(new EntersBattlefieldTriggeredAbility(effect)); - + this.addAbility(new EntersBattlefieldTriggeredAbility(effect).addHint(new ValueHint("Devotion to blue", xValue))); } public MasterOfWaves(final MasterOfWaves card) { diff --git a/Mage.Sets/src/mage/cards/m/MogisGodOfSlaughter.java b/Mage.Sets/src/mage/cards/m/MogisGodOfSlaughter.java index c23f902a29..4b366f6990 100644 --- a/Mage.Sets/src/mage/cards/m/MogisGodOfSlaughter.java +++ b/Mage.Sets/src/mage/cards/m/MogisGodOfSlaughter.java @@ -1,8 +1,5 @@ - package mage.cards.m; -import java.util.Locale; -import java.util.UUID; import mage.MageInt; import mage.MageObject; import mage.abilities.Ability; @@ -11,27 +8,34 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.Cost; import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect; +import mage.abilities.hint.ValueHint; import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; -import static mage.filter.StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT; import mage.game.Game; import mage.players.Player; import mage.target.common.TargetControlledCreaturePermanent; import mage.util.CardUtil; +import java.util.Locale; +import java.util.UUID; + +import static mage.filter.StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT; + /** - * * @author LevelX2 */ public final class MogisGodOfSlaughter extends CardImpl { + private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.B, ColoredManaSymbol.R); + public MogisGodOfSlaughter(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{2}{B}{R}"); addSuperType(SuperType.LEGENDARY); @@ -42,10 +46,11 @@ public final class MogisGodOfSlaughter extends CardImpl { // Indestructible this.addAbility(IndestructibleAbility.getInstance()); + // As long as your devotion to black and red is less than seven, Mogis isn't a creature. - Effect effect = new LoseCreatureTypeSourceEffect(new DevotionCount(ColoredManaSymbol.B, ColoredManaSymbol.R), 7); + Effect effect = new LoseCreatureTypeSourceEffect(xValue, 7); effect.setText("As long as your devotion to black and red is less than seven, Mogis isn't a creature"); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect).addHint(new ValueHint("Devotion to black and red", xValue))); // At the beginning of each opponent's upkeep, Mogis deals 2 damage to that player unless they sacrifice a creature. effect = new DoUnlessTargetPaysCost(new DamageTargetEffect(2, true, "that player"), diff --git a/Mage.Sets/src/mage/cards/m/MogissMarauder.java b/Mage.Sets/src/mage/cards/m/MogissMarauder.java index d797c3fd00..cc839ac2fb 100644 --- a/Mage.Sets/src/mage/cards/m/MogissMarauder.java +++ b/Mage.Sets/src/mage/cards/m/MogissMarauder.java @@ -1,11 +1,12 @@ - package mage.cards.m; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.hint.ValueHint; import mage.abilities.keyword.HasteAbility; import mage.abilities.keyword.IntimidateAbility; import mage.cards.CardImpl; @@ -40,6 +41,7 @@ public final class MogissMarauder extends CardImpl { ability.addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn, "and haste until end of turn, where X is your devotion to black")); ability.setTargetAdjuster(MogissMarauderAdjuster.instance); + ability.addHint(new ValueHint("Devotion to black", MogissMarauderAdjuster.xValue)); this.addAbility(ability); } @@ -54,12 +56,15 @@ public final class MogissMarauder extends CardImpl { } enum MogissMarauderAdjuster implements TargetAdjuster { + instance; + static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.B); + @Override public void adjustTargets(Ability ability, Game game) { ability.getTargets().clear(); - int numbTargets = new DevotionCount(ColoredManaSymbol.B).calculate(game, ability, null); + int numbTargets = xValue.calculate(game, ability, null); if (numbTargets > 0) { ability.addTarget(new TargetCreaturePermanent(0, numbTargets)); } diff --git a/Mage.Sets/src/mage/cards/n/NykthosShrineToNyx.java b/Mage.Sets/src/mage/cards/n/NykthosShrineToNyx.java index 6b08d87641..87497bb64f 100644 --- a/Mage.Sets/src/mage/cards/n/NykthosShrineToNyx.java +++ b/Mage.Sets/src/mage/cards/n/NykthosShrineToNyx.java @@ -1,14 +1,13 @@ package mage.cards.n; -import java.util.ArrayList; -import java.util.List; -import java.util.UUID; import mage.Mana; import mage.abilities.Ability; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.effects.common.ManaEffect; +import mage.abilities.hint.ValueHint; import mage.abilities.mana.ActivatedManaAbilityImpl; import mage.abilities.mana.ColorlessManaAbility; import mage.cards.CardImpl; @@ -21,8 +20,11 @@ import mage.constants.Zone; import mage.game.Game; import mage.players.Player; +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class NykthosShrineToNyx extends CardImpl { @@ -35,6 +37,11 @@ public final class NykthosShrineToNyx extends CardImpl { this.addAbility(new ColorlessManaAbility()); // {2}, {T}: Choose a color. Add an amount of mana of that color equal to your devotion to that color. Ability ability = new NykthosShrineToNyxManaAbility(); + ability.addHint(new ValueHint("Devotion to red", NykthosDynamicManaEffect.xValueR)); + ability.addHint(new ValueHint("Devotion to blue", NykthosDynamicManaEffect.xValueU)); + ability.addHint(new ValueHint("Devotion to white", NykthosDynamicManaEffect.xValueW)); + ability.addHint(new ValueHint("Devotion to black", NykthosDynamicManaEffect.xValueB)); + ability.addHint(new ValueHint("Devotion to green", NykthosDynamicManaEffect.xValueG)); this.addAbility(ability); } @@ -76,6 +83,12 @@ class NykthosShrineToNyxManaAbility extends ActivatedManaAbilityImpl { class NykthosDynamicManaEffect extends ManaEffect { + static final DynamicValue xValueR = new DevotionCount(ColoredManaSymbol.R); + static final DynamicValue xValueU = new DevotionCount(ColoredManaSymbol.U); + static final DynamicValue xValueW = new DevotionCount(ColoredManaSymbol.W); + static final DynamicValue xValueB = new DevotionCount(ColoredManaSymbol.B); + static final DynamicValue xValueG = new DevotionCount(ColoredManaSymbol.G); + public NykthosDynamicManaEffect() { super(); this.staticText = "Choose a color. Add an amount of mana of that color equal to your devotion to that color. (Your devotion to a color is the number of mana symbols of that color in the mana costs of permanents you control.)"; @@ -132,19 +145,19 @@ class NykthosDynamicManaEffect extends ManaEffect { if (color != null && !color.isEmpty()) { switch (color) { case "Red": - mana.setRed(new DevotionCount(ColoredManaSymbol.R).calculate(game, source, this)); + mana.setRed(xValueR.calculate(game, source, this)); break; case "Blue": - mana.setBlue(new DevotionCount(ColoredManaSymbol.U).calculate(game, source, this)); + mana.setBlue(xValueU.calculate(game, source, this)); break; case "White": - mana.setWhite(new DevotionCount(ColoredManaSymbol.W).calculate(game, source, this)); + mana.setWhite(xValueW.calculate(game, source, this)); break; case "Black": - mana.setBlack(new DevotionCount(ColoredManaSymbol.B).calculate(game, source, this)); + mana.setBlack(xValueB.calculate(game, source, this)); break; case "Green": - mana.setGreen(new DevotionCount(ColoredManaSymbol.G).calculate(game, source, this)); + mana.setGreen(xValueG.calculate(game, source, this)); break; } } diff --git a/Mage.Sets/src/mage/cards/n/NyleaGodOfTheHunt.java b/Mage.Sets/src/mage/cards/n/NyleaGodOfTheHunt.java index 5e0a93d2cd..0f4f9b80d8 100644 --- a/Mage.Sets/src/mage/cards/n/NyleaGodOfTheHunt.java +++ b/Mage.Sets/src/mage/cards/n/NyleaGodOfTheHunt.java @@ -1,17 +1,17 @@ - package mage.cards.n; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.effects.Effect; import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect; +import mage.abilities.hint.ValueHint; import mage.abilities.keyword.IndestructibleAbility; import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; @@ -20,12 +20,15 @@ import mage.constants.*; import mage.filter.StaticFilters; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class NyleaGodOfTheHunt extends CardImpl { + private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.G); + public NyleaGodOfTheHunt(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{3}{G}"); addSuperType(SuperType.LEGENDARY); @@ -36,12 +39,15 @@ public final class NyleaGodOfTheHunt extends CardImpl { // Indestructible this.addAbility(IndestructibleAbility.getInstance()); + // As long as your devotion to white is less than five, Nylea isn't a creature.(Each {G} in the mana costs of permanents you control counts towards your devotion to green.) - Effect effect = new LoseCreatureTypeSourceEffect(new DevotionCount(ColoredManaSymbol.G), 5); + Effect effect = new LoseCreatureTypeSourceEffect(xValue, 5); effect.setText("As long as your devotion to green is less than five, Nylea isn't a creature.(Each {G} in the mana costs of permanents you control counts towards your devotion to green.)"); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect).addHint(new ValueHint("Devotion to green", xValue))); + // Other creatures you control have trample. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE, true))); + // {3}{G}: Target creature gets +2/+2 until end of turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(2, 2, Duration.EndOfTurn), new ManaCostsImpl("{3}{G}")); ability.addTarget(new TargetCreaturePermanent()); diff --git a/Mage.Sets/src/mage/cards/n/NyleasDisciple.java b/Mage.Sets/src/mage/cards/n/NyleasDisciple.java index 755147a3f8..771edf605d 100644 --- a/Mage.Sets/src/mage/cards/n/NyleasDisciple.java +++ b/Mage.Sets/src/mage/cards/n/NyleasDisciple.java @@ -1,26 +1,29 @@ - package mage.cards.n; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.effects.Effect; import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.hint.ValueHint; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.SubType; import mage.constants.ColoredManaSymbol; +import mage.constants.SubType; + +import java.util.UUID; /** - * * @author LevelX2 */ public final class NyleasDisciple extends CardImpl { + private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.G); + public NyleasDisciple(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); this.subtype.add(SubType.CENTAUR); this.subtype.add(SubType.ARCHER); @@ -28,9 +31,9 @@ public final class NyleasDisciple extends CardImpl { this.toughness = new MageInt(3); // When Nylea's Disciple enters the battlefield, you gain life equal to your devotion to green. - Effect effect = new GainLifeEffect(new DevotionCount(ColoredManaSymbol.G)); + Effect effect = new GainLifeEffect(xValue); effect.setText("you gain life equal to your devotion to green"); - this.addAbility(new EntersBattlefieldTriggeredAbility(effect)); + this.addAbility(new EntersBattlefieldTriggeredAbility(effect).addHint(new ValueHint("Devotion to green", xValue))); } public NyleasDisciple(final NyleasDisciple card) { diff --git a/Mage.Sets/src/mage/cards/p/PharikaGodOfAffliction.java b/Mage.Sets/src/mage/cards/p/PharikaGodOfAffliction.java index cc4d1a0697..5ae9c6c9f1 100644 --- a/Mage.Sets/src/mage/cards/p/PharikaGodOfAffliction.java +++ b/Mage.Sets/src/mage/cards/p/PharikaGodOfAffliction.java @@ -1,16 +1,16 @@ - package mage.cards.p; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect; +import mage.abilities.hint.ValueHint; import mage.abilities.keyword.IndestructibleAbility; import mage.cards.Card; import mage.cards.CardImpl; @@ -23,12 +23,15 @@ import mage.players.Player; import mage.target.Target; import mage.target.common.TargetCardInGraveyard; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class PharikaGodOfAffliction extends CardImpl { + private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.B, ColoredManaSymbol.G); + public PharikaGodOfAffliction(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{1}{B}{G}"); addSuperType(SuperType.LEGENDARY); @@ -39,10 +42,12 @@ public final class PharikaGodOfAffliction extends CardImpl { // Indestructible this.addAbility(IndestructibleAbility.getInstance()); + // As long as your devotion to black and green is less than seven, Pharika isn't a creature. - Effect effect = new LoseCreatureTypeSourceEffect(new DevotionCount(ColoredManaSymbol.B, ColoredManaSymbol.G), 7); + Effect effect = new LoseCreatureTypeSourceEffect(xValue, 7); effect.setText("As long as your devotion to black and green is less than seven, Pharika isn't a creature"); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect).addHint(new ValueHint("Devotion to black and green", xValue))); + // {B}{G}: Exile target creature card from a graveyard. It's owner creates a 1/1 black and green Snake enchantment creature token with deathtouch. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PharikaExileEffect(), new ManaCostsImpl("{B}{G}")); Target target = new TargetCardInGraveyard(new FilterCreatureCard("a creature card from a graveyard")); diff --git a/Mage.Sets/src/mage/cards/p/PhenaxGodOfDeception.java b/Mage.Sets/src/mage/cards/p/PhenaxGodOfDeception.java index 56a5663f6f..2cbc41301c 100644 --- a/Mage.Sets/src/mage/cards/p/PhenaxGodOfDeception.java +++ b/Mage.Sets/src/mage/cards/p/PhenaxGodOfDeception.java @@ -1,18 +1,18 @@ - package mage.cards.p; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.dynamicvalue.common.SourcePermanentToughnessValue; import mage.abilities.effects.Effect; import mage.abilities.effects.common.PutTopCardOfLibraryIntoGraveTargetEffect; import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect; +import mage.abilities.hint.ValueHint; import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -20,14 +20,17 @@ import mage.constants.*; import mage.filter.StaticFilters; import mage.target.TargetPlayer; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class PhenaxGodOfDeception extends CardImpl { + private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.U, ColoredManaSymbol.B); + public PhenaxGodOfDeception(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{3}{U}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{3}{U}{B}"); addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.GOD); @@ -36,16 +39,18 @@ public final class PhenaxGodOfDeception extends CardImpl { // Indestructible this.addAbility(IndestructibleAbility.getInstance()); + // As long as your devotion to blue and black is less than seven, Phenax isn't a creature. - Effect effect = new LoseCreatureTypeSourceEffect(new DevotionCount(ColoredManaSymbol.U, ColoredManaSymbol.B), 7); + Effect effect = new LoseCreatureTypeSourceEffect(xValue, 7); effect.setText("As long as your devotion to blue and black is less than seven, Phenax isn't a creature"); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect).addHint(new ValueHint("Devotion to blue and black", xValue))); + // Creatures you control have "{T}: Target player puts the top X cards of their library into their graveyard, where X is this creature's toughness." effect = new PutTopCardOfLibraryIntoGraveTargetEffect(SourcePermanentToughnessValue.getInstance()); effect.setText("Target player puts the top X cards of their library into their graveyard, where X is this creature's toughness"); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapSourceCost()); ability.addTarget(new TargetPlayer()); - effect = new GainAbilityControlledEffect(ability, Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURES,false); + effect = new GainAbilityControlledEffect(ability, Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURES, false); effect.setText("Creatures you control have \"{T}: Target player puts the top X cards of their library into their graveyard, where X is this creature's toughness.\""); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); } diff --git a/Mage.Sets/src/mage/cards/p/PurphorosGodOfTheForge.java b/Mage.Sets/src/mage/cards/p/PurphorosGodOfTheForge.java index 31c7ecc867..079d06e698 100644 --- a/Mage.Sets/src/mage/cards/p/PurphorosGodOfTheForge.java +++ b/Mage.Sets/src/mage/cards/p/PurphorosGodOfTheForge.java @@ -1,17 +1,17 @@ - package mage.cards.p; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.effects.Effect; import mage.abilities.effects.common.DamagePlayersEffect; import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect; +import mage.abilities.hint.ValueHint; import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -19,19 +19,23 @@ import mage.constants.*; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.AnotherPredicate; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class PurphorosGodOfTheForge extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another creature"); + static { filter.add(AnotherPredicate.instance); } + private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.R); + public PurphorosGodOfTheForge(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{3}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{3}{R}"); addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.GOD); @@ -41,15 +45,17 @@ public final class PurphorosGodOfTheForge extends CardImpl { // Indestructible this.addAbility(IndestructibleAbility.getInstance()); + // As long as your devotion to red is less than five, Purphoros isn't a creature. - Effect effect = new LoseCreatureTypeSourceEffect(new DevotionCount(ColoredManaSymbol.R), 5); + Effect effect = new LoseCreatureTypeSourceEffect(xValue, 5); effect.setText("As long as your devotion to red is less than five, Purphoros isn't a creature.(Each {R} in the mana costs of permanents you control counts towards your devotion to red.)"); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect).addHint(new ValueHint("Devotion to red", xValue))); // Whenever another creature enters the battlefield under your control, Purphoros deals 2 damage to each opponent. this.addAbility(new EntersBattlefieldControlledTriggeredAbility(new DamagePlayersEffect(2, TargetController.OPPONENT), filter)); + // {2}{R}: Creatures you control get +1/+0 until end of turn. - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1,0, Duration.EndOfTurn), new ManaCostsImpl("{2}{R}"))); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{2}{R}"))); } public PurphorosGodOfTheForge(final PurphorosGodOfTheForge card) { diff --git a/Mage.Sets/src/mage/cards/r/ReverentHunter.java b/Mage.Sets/src/mage/cards/r/ReverentHunter.java index 8791c276c5..762a655df1 100644 --- a/Mage.Sets/src/mage/cards/r/ReverentHunter.java +++ b/Mage.Sets/src/mage/cards/r/ReverentHunter.java @@ -1,26 +1,29 @@ - package mage.cards.r; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.hint.ValueHint; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.SubType; import mage.constants.ColoredManaSymbol; +import mage.constants.SubType; import mage.counters.CounterType; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class ReverentHunter extends CardImpl { + private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.G); + public ReverentHunter(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.ARCHER); @@ -28,8 +31,11 @@ public final class ReverentHunter extends CardImpl { this.toughness = new MageInt(1); // When Reverent Hunter enters the battlefield, put a number of +1/+1 counters on it equal to your devotion to green. - this.addAbility(new EntersBattlefieldTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(0), new DevotionCount(ColoredManaSymbol.G), true))); - + this.addAbility( + new EntersBattlefieldTriggeredAbility( + new AddCountersSourceEffect(CounterType.P1P1.createInstance(0), xValue, true) + ).addHint(new ValueHint("Devotion to green", xValue)) + ); } public ReverentHunter(final ReverentHunter card) { diff --git a/Mage.Sets/src/mage/cards/s/Sanguimancy.java b/Mage.Sets/src/mage/cards/s/Sanguimancy.java index 5fd5fc725b..fbedf63970 100644 --- a/Mage.Sets/src/mage/cards/s/Sanguimancy.java +++ b/Mage.Sets/src/mage/cards/s/Sanguimancy.java @@ -1,35 +1,36 @@ - package mage.cards.s; -import java.util.UUID; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.effects.Effect; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.LoseLifeSourceControllerEffect; +import mage.abilities.hint.ValueHint; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.ColoredManaSymbol; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class Sanguimancy extends CardImpl { - public Sanguimancy(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{B}"); + private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.B); + public Sanguimancy(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{B}"); // You draw X cards and you lose X life, where X is your devotion to black. - DynamicValue blackDevotion = new DevotionCount(ColoredManaSymbol.B); - Effect effect = new DrawCardSourceControllerEffect(blackDevotion); + Effect effect = new DrawCardSourceControllerEffect(xValue); effect.setText("You draw X cards"); this.getSpellAbility().addEffect(effect); - effect = new LoseLifeSourceControllerEffect(blackDevotion); - effect.setText("and you lose X life, where X is your devotion to black"); + effect = new LoseLifeSourceControllerEffect(xValue); + effect.setText("and you lose X life, where X is your devotion to black"); this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addHint(new ValueHint("Devotion to black", xValue)); } public Sanguimancy(final Sanguimancy card) { diff --git a/Mage.Sets/src/mage/cards/s/Skyreaping.java b/Mage.Sets/src/mage/cards/s/Skyreaping.java index 4efbed09ad..39144af3a0 100644 --- a/Mage.Sets/src/mage/cards/s/Skyreaping.java +++ b/Mage.Sets/src/mage/cards/s/Skyreaping.java @@ -1,10 +1,10 @@ - package mage.cards.s; -import java.util.UUID; +import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.effects.Effect; import mage.abilities.effects.common.DamageAllEffect; +import mage.abilities.hint.ValueHint; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -13,8 +13,9 @@ import mage.constants.ColoredManaSymbol; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.AbilityPredicate; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class Skyreaping extends CardImpl { @@ -25,14 +26,17 @@ public final class Skyreaping extends CardImpl { filter.add(new AbilityPredicate(FlyingAbility.class)); } + private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.G); + public Skyreaping(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{G}"); // Skyreaping deals damage to each creature with flying equal to your devotion to green. - Effect effect = new DamageAllEffect(new DevotionCount(ColoredManaSymbol.G), filter); + Effect effect = new DamageAllEffect(xValue, filter); effect.setText("{this} deals damage to each creature with flying equal to your devotion to green (Each {G} in the mana costs of permanents you control counts toward your devotion to green.)"); this.getSpellAbility().addEffect(effect); + this.getSpellAbility().addHint(new ValueHint("Devotion to green", xValue)); } public Skyreaping(final Skyreaping card) { diff --git a/Mage.Sets/src/mage/cards/t/ThassaGodOfTheSea.java b/Mage.Sets/src/mage/cards/t/ThassaGodOfTheSea.java index 04643c1604..9eeaf73123 100644 --- a/Mage.Sets/src/mage/cards/t/ThassaGodOfTheSea.java +++ b/Mage.Sets/src/mage/cards/t/ThassaGodOfTheSea.java @@ -1,34 +1,36 @@ - - package mage.cards.t; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.effects.Effect; import mage.abilities.effects.common.combat.CantBeBlockedTargetEffect; import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect; import mage.abilities.effects.keyword.ScryEffect; +import mage.abilities.hint.ValueHint; import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; import mage.target.common.TargetControlledCreaturePermanent; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class ThassaGodOfTheSea extends CardImpl { + private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.U); + public ThassaGodOfTheSea(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{2}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{2}{U}"); addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.GOD); @@ -39,14 +41,14 @@ public final class ThassaGodOfTheSea extends CardImpl { this.addAbility(IndestructibleAbility.getInstance()); // As long as your devotion to white is less than five, Thassa isn't a creature.(Each {U} in the mana costs of permanents you control counts towards your devotion to white.) - Effect effect = new LoseCreatureTypeSourceEffect(new DevotionCount(ColoredManaSymbol.U), 5); + Effect effect = new LoseCreatureTypeSourceEffect(xValue, 5); effect.setText("As long as your devotion to blue is less than five, Thassa isn't a creature.(Each {U} in the mana costs of permanents you control counts towards your devotion to blue.)"); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect).addHint(new ValueHint("Devotion to blue", xValue))); // At the beginning of your upkeep, scry 1. this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new ScryEffect(1), TargetController.YOU, false)); - // 1{U}: Target creature you control can't be blocked this turn. + // {1}{U}: Target creature you control can't be blocked this turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CantBeBlockedTargetEffect(Duration.EndOfTurn), new ManaCostsImpl("{1}{U}")); ability.addTarget(new TargetControlledCreaturePermanent()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/t/ThassasRebuff.java b/Mage.Sets/src/mage/cards/t/ThassasRebuff.java index 6e4b146c6c..61384c97cb 100644 --- a/Mage.Sets/src/mage/cards/t/ThassasRebuff.java +++ b/Mage.Sets/src/mage/cards/t/ThassasRebuff.java @@ -1,28 +1,31 @@ - package mage.cards.t; -import java.util.UUID; +import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.effects.common.CounterUnlessPaysEffect; +import mage.abilities.hint.ValueHint; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.ColoredManaSymbol; import mage.target.TargetSpell; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class ThassasRebuff extends CardImpl { - public ThassasRebuff(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}"); + private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.U); + public ThassasRebuff(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}"); // Counter target spell unless its controller pays {X}, where X is your devotion to blue. - this.getSpellAbility().addEffect(new CounterUnlessPaysEffect(new DevotionCount(ColoredManaSymbol.U))); + this.getSpellAbility().addEffect(new CounterUnlessPaysEffect(xValue)); this.getSpellAbility().addTarget(new TargetSpell()); + this.getSpellAbility().addHint(new ValueHint("Devotion to blue", xValue)); } public ThassasRebuff(final ThassasRebuff card) { diff --git a/Mage.Sets/src/mage/cards/t/ThunderousMight.java b/Mage.Sets/src/mage/cards/t/ThunderousMight.java index 08bfbd15b5..dd716ea8e0 100644 --- a/Mage.Sets/src/mage/cards/t/ThunderousMight.java +++ b/Mage.Sets/src/mage/cards/t/ThunderousMight.java @@ -1,31 +1,29 @@ - package mage.cards.t; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.AttacksAttachedTriggeredAbility; +import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.dynamicvalue.common.StaticValue; import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.abilities.hint.ValueHint; import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.AttachmentType; -import mage.constants.CardType; -import mage.constants.SubType; -import mage.constants.ColoredManaSymbol; -import mage.constants.Duration; -import mage.constants.Outcome; +import mage.constants.*; import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class ThunderousMight extends CardImpl { + private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.R); + public ThunderousMight(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}"); this.subtype.add(SubType.AURA); @@ -38,10 +36,11 @@ public final class ThunderousMight extends CardImpl { this.addAbility(ability); // Whenever enchanted creature attacks, it gets +X/+0 until end of turn, where X is your devotion to red. - BoostEnchantedEffect effect = new BoostEnchantedEffect(new DevotionCount(ColoredManaSymbol.R), new StaticValue(0), Duration.EndOfTurn); + BoostEnchantedEffect effect = new BoostEnchantedEffect(xValue, new StaticValue(0), Duration.EndOfTurn); effect.setText("it gets +X/+0 until end of turn, where X is your devotion to red"); effect.setLockedIn(true); - this.addAbility(new AttacksAttachedTriggeredAbility(effect, AttachmentType.AURA, false)); + this.addAbility(new AttacksAttachedTriggeredAbility(effect, AttachmentType.AURA, false) + .addHint(new ValueHint("Devotion to red", xValue))); } public ThunderousMight(final ThunderousMight card) { diff --git a/Mage.Sets/src/mage/cards/x/XenagosGodOfRevels.java b/Mage.Sets/src/mage/cards/x/XenagosGodOfRevels.java index 3eada0b3a3..9c264b6648 100644 --- a/Mage.Sets/src/mage/cards/x/XenagosGodOfRevels.java +++ b/Mage.Sets/src/mage/cards/x/XenagosGodOfRevels.java @@ -1,11 +1,10 @@ - package mage.cards.x; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.BeginningOfCombatTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.effects.ContinuousEffect; import mage.abilities.effects.Effect; @@ -13,6 +12,7 @@ import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect; +import mage.abilities.hint.ValueHint; import mage.abilities.keyword.HasteAbility; import mage.abilities.keyword.IndestructibleAbility; import mage.cards.CardImpl; @@ -24,19 +24,23 @@ import mage.game.Game; import mage.game.permanent.Permanent; import mage.target.common.TargetControlledCreaturePermanent; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class XenagosGodOfRevels extends CardImpl { private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another target creature you control"); + static { filter.add(AnotherPredicate.instance); } + private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.R, ColoredManaSymbol.G); + public XenagosGodOfRevels(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{3}{R}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{3}{R}{G}"); addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.GOD); @@ -45,17 +49,18 @@ public final class XenagosGodOfRevels extends CardImpl { // Indestructible this.addAbility(IndestructibleAbility.getInstance()); + // As long as your devotion to red and green is less than seven, Xenagos isn't a creature. - Effect effect = new LoseCreatureTypeSourceEffect(new DevotionCount(ColoredManaSymbol.R, ColoredManaSymbol.G), 7); + Effect effect = new LoseCreatureTypeSourceEffect(xValue, 7); effect.setText("As long as your devotion to red and green is less than seven, Xenagos isn't a creature"); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect).addHint(new ValueHint("Devotion to red and green", xValue))); // At the beginning of combat on your turn, another target creature you control gains haste and gets +X/+X until end of turn, where X is that creature's power. effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn); effect.setText("another target creature you control gains haste"); Ability ability = new BeginningOfCombatTriggeredAbility(Zone.BATTLEFIELD, effect, TargetController.YOU, false, false); ability.addEffect(new XenagosGodOfRevelsEffect()); - ability.addTarget(new TargetControlledCreaturePermanent(1,1,filter, false)); + ability.addTarget(new TargetControlledCreaturePermanent(1, 1, filter, false)); this.addAbility(ability); }