* Devotion abilities - added card hints about devotion value;

This commit is contained in:
Oleg Agafonov 2019-12-16 15:29:13 +04:00
parent 9e99b31b0c
commit 56bf550dab
36 changed files with 361 additions and 242 deletions

View file

@ -1,14 +1,14 @@
package mage.cards.a; package mage.cards.a;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.dynamicvalue.common.DevotionCount;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.SacrificeControllerEffect; import mage.abilities.effects.common.SacrificeControllerEffect;
import mage.abilities.hint.ValueHint;
import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -18,14 +18,16 @@ import mage.constants.SubType;
import mage.constants.TargetController; import mage.constants.TargetController;
import mage.filter.StaticFilters; import mage.filter.StaticFilters;
import mage.game.permanent.token.TokenImpl; import mage.game.permanent.token.TokenImpl;
import mage.game.permanent.token.Token;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class AbhorrentOverlord extends CardImpl { public final class AbhorrentOverlord extends CardImpl {
private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.B);
public AbhorrentOverlord(UUID ownerId, CardSetInfo setInfo) { public AbhorrentOverlord(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{B}{B}"); super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{B}{B}");
this.subtype.add(SubType.DEMON); this.subtype.add(SubType.DEMON);
@ -35,10 +37,12 @@ public final class AbhorrentOverlord extends CardImpl {
// Flying // Flying
this.addAbility(FlyingAbility.getInstance()); 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. // 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. <i>(Each {B} in the mana costs of permanents you control counts toward your devotion to black.)</i>"); effect.setText("create a number of 1/1 black Harpy creature tokens with flying equal to your devotion to black. <i>(Each {B} in the mana costs of permanents you control counts toward your devotion to black.)</i>");
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. // At the beginning of your upkeep, sacrifice a creature.
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new SacrificeControllerEffect(StaticFilters.FILTER_PERMANENT_CREATURE, 1, null), TargetController.YOU, false)); 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()); this.addAbility(FlyingAbility.getInstance());
} }
public AbhorrentOverlordHarpyToken(final AbhorrentOverlordHarpyToken token) { public AbhorrentOverlordHarpyToken(final AbhorrentOverlordHarpyToken token) {
super(token); super(token);
} }

View file

@ -1,10 +1,10 @@
package mage.cards.a; package mage.cards.a;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.dynamicvalue.common.DevotionCount;
import mage.abilities.effects.PreventionEffectImpl; import mage.abilities.effects.PreventionEffectImpl;
import mage.abilities.hint.ValueHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
@ -17,20 +17,21 @@ import mage.players.Player;
import mage.target.common.TargetAnyTarget; import mage.target.common.TargetAnyTarget;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class AcolytesReward extends CardImpl { public final class AcolytesReward extends CardImpl {
public AcolytesReward(UUID ownerId, CardSetInfo setInfo) { 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. // 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().addEffect(new AcolytesRewardEffect());
this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addTarget(new TargetAnyTarget());
this.getSpellAbility().addHint(new ValueHint("Devotion to white", AcolytesRewardEffect.xValue));
} }
public AcolytesReward(final AcolytesReward card) { public AcolytesReward(final AcolytesReward card) {
@ -46,6 +47,7 @@ public final class AcolytesReward extends CardImpl {
class AcolytesRewardEffect extends PreventionEffectImpl { class AcolytesRewardEffect extends PreventionEffectImpl {
protected int amount = 0; protected int amount = 0;
static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.W);
public AcolytesRewardEffect() { public AcolytesRewardEffect() {
super(Duration.EndOfTurn); super(Duration.EndOfTurn);
@ -65,7 +67,7 @@ class AcolytesRewardEffect extends PreventionEffectImpl {
@Override @Override
public void init(Ability source, Game game) { public void init(Ability source, Game game) {
super.init(source, game); super.init(source, game);
amount = new DevotionCount(ColoredManaSymbol.W).calculate(game, source, this); amount = xValue.calculate(game, source, this);
} }
@Override @Override

View file

@ -1,11 +1,10 @@
package mage.cards.a; package mage.cards.a;
import java.util.UUID;
import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.dynamicvalue.common.DevotionCount;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.abilities.hint.ValueHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
@ -13,22 +12,24 @@ import mage.constants.ColoredManaSymbol;
import mage.constants.Duration; import mage.constants.Duration;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class AspectOfHydra extends CardImpl { public final class AspectOfHydra extends CardImpl {
public AspectOfHydra(UUID ownerId, CardSetInfo setInfo) { private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.G);
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{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. // 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(xValue, xValue, Duration.EndOfTurn, true);
Effect effect = new BoostTargetEffect(greenDevotion, greenDevotion, Duration.EndOfTurn, true);
effect.setText("Target creature gets +X/+X until end of turn, where X is your devotion to green"); effect.setText("Target creature gets +X/+X until end of turn, where X is your devotion to green");
this.getSpellAbility().addEffect(effect); this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addHint(new ValueHint("Devotion to green", xValue));
} }
public AspectOfHydra(final AspectOfHydra card) { public AspectOfHydra(final AspectOfHydra card) {

View file

@ -1,17 +1,17 @@
package mage.cards.a; package mage.cards.a;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.TriggeredAbilityImpl; import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.Cost; import mage.abilities.costs.Cost;
import mage.abilities.costs.common.PayLifeCost; import mage.abilities.costs.common.PayLifeCost;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.dynamicvalue.common.DevotionCount;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect; import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect;
import mage.abilities.hint.ValueHint;
import mage.abilities.keyword.IndestructibleAbility; import mage.abilities.keyword.IndestructibleAbility;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.CardImpl; import mage.cards.CardImpl;
@ -27,13 +27,15 @@ import mage.game.events.ZoneChangeEvent;
import mage.players.Player; import mage.players.Player;
import mage.target.common.TargetOpponent; import mage.target.common.TargetOpponent;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class AthreosGodOfPassage extends CardImpl { public final class AthreosGodOfPassage extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another creature you own"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another creature you own");
private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.W, ColoredManaSymbol.B);
static { static {
filter.add(AnotherPredicate.instance); filter.add(AnotherPredicate.instance);
@ -50,10 +52,12 @@ public final class AthreosGodOfPassage extends CardImpl {
// Indestructible // Indestructible
this.addAbility(IndestructibleAbility.getInstance()); this.addAbility(IndestructibleAbility.getInstance());
// As long as your devotion to white and black is less than seven, Athreos isn't a creature. // 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"); 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. // 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 ability = new AthreosDiesCreatureTriggeredAbility(new AthreosGodOfPassageReturnEffect(), false, filter);
ability.addTarget(new TargetOpponent()); ability.addTarget(new TargetOpponent());

View file

@ -7,6 +7,7 @@ import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.dynamicvalue.common.DevotionCount;
import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.effects.common.continuous.SetToughnessSourceEffect; import mage.abilities.effects.common.continuous.SetToughnessSourceEffect;
import mage.abilities.hint.ValueHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.*; import mage.constants.*;
@ -35,7 +36,8 @@ public final class DaxosBlessedByTheSun extends CardImpl {
// Daxos's toughness is equal to your devotion to white. // Daxos's toughness is equal to your devotion to white.
this.addAbility(new SimpleStaticAbility( this.addAbility(new SimpleStaticAbility(
Zone.ALL, new SetToughnessSourceEffect(xValue, Duration.EndOfGame 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. // Whenever another creature you control enters the battlefield or dies, you gain 1 life.
this.addAbility(new DaxosBlessedByTheSunAbility()); this.addAbility(new DaxosBlessedByTheSunAbility());

View file

@ -1,11 +1,12 @@
package mage.cards.d; package mage.cards.d;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.dynamicvalue.common.DevotionCount;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.abilities.hint.ValueHint;
import mage.cards.*; import mage.cards.*;
import mage.constants.*; import mage.constants.*;
import mage.filter.FilterCard; 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. // 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 ability = new EntersBattlefieldTriggeredAbility(new DiscipleOfPhenaxEffect(), false);
ability.addTarget(new TargetPlayer()); ability.addTarget(new TargetPlayer());
ability.addHint(new ValueHint("Devotion to black", DiscipleOfPhenaxEffect.xValue));
this.addAbility(ability); this.addAbility(ability);
} }
@ -51,6 +53,8 @@ public final class DiscipleOfPhenax extends CardImpl {
class DiscipleOfPhenaxEffect extends OneShotEffect { class DiscipleOfPhenaxEffect extends OneShotEffect {
static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.B);
public DiscipleOfPhenaxEffect() { public DiscipleOfPhenaxEffect() {
super(Outcome.Discard); 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"; 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 @Override
public boolean apply(Game game, Ability source) { 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)); Player targetPlayer = game.getPlayer(targetPointer.getFirst(game, source));
if (devotion > 0 && targetPlayer != null) { if (devotion > 0 && targetPlayer != null) {
Cards revealedCards = new CardsImpl(); Cards revealedCards = new CardsImpl();

View file

@ -9,6 +9,7 @@ import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.abilities.effects.common.counter.AddCountersTargetEffect;
import mage.abilities.effects.common.search.SearchLibraryGraveyardPutOntoBattlefieldEffect; import mage.abilities.effects.common.search.SearchLibraryGraveyardPutOntoBattlefieldEffect;
import mage.abilities.hint.ValueHint;
import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -57,6 +58,7 @@ public final class ElspethUndauntedHero extends CardImpl {
ability.addEffect(new BoostControlledEffect( ability.addEffect(new BoostControlledEffect(
xValue, xValue, Duration.EndOfTurn xValue, xValue, Duration.EndOfTurn
).setText("and get +X/+X, where X is your devotion to white")); ).setText("and get +X/+X, where X is your devotion to white"));
ability.addHint(new ValueHint("Devotion to white", xValue));
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -1,17 +1,17 @@
package mage.cards.e; package mage.cards.e;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.Condition; import mage.abilities.condition.Condition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.dynamicvalue.common.DevotionCount;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect; import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect;
import mage.abilities.hint.ValueHint;
import mage.abilities.keyword.IndestructibleAbility; import mage.abilities.keyword.IndestructibleAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -20,12 +20,15 @@ import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.watchers.common.PermanentsEnteredBattlefieldWatcher; import mage.watchers.common.PermanentsEnteredBattlefieldWatcher;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class EpharaGodOfThePolis extends CardImpl { public final class EpharaGodOfThePolis extends CardImpl {
private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.W, ColoredManaSymbol.U);
public EpharaGodOfThePolis(UUID ownerId, CardSetInfo setInfo) { public EpharaGodOfThePolis(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{2}{W}{U}"); super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{2}{W}{U}");
this.addSuperType(SuperType.LEGENDARY); this.addSuperType(SuperType.LEGENDARY);
@ -38,17 +41,16 @@ public final class EpharaGodOfThePolis extends CardImpl {
this.addAbility(IndestructibleAbility.getInstance()); this.addAbility(IndestructibleAbility.getInstance());
// As long as your devotion to white and blue is less than seven, Ephara isn't a creature. // 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"); 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. // 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( this.addAbility(new ConditionalInterveningIfTriggeredAbility(
new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), TargetController.ANY, false, false), new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), TargetController.ANY, false, false),
HadAnotherCreatureEnterTheBattlefieldCondition.instance, HadAnotherCreatureEnterTheBattlefieldCondition.instance,
"At the beginning of each upkeep, if you had another creature enter the battlefield under your control last turn, draw a card."), "At the beginning of each upkeep, if you had another creature enter the battlefield under your control last turn, draw a card."),
new PermanentsEnteredBattlefieldWatcher()); new PermanentsEnteredBattlefieldWatcher());
} }
public EpharaGodOfThePolis(final EpharaGodOfThePolis card) { public EpharaGodOfThePolis(final EpharaGodOfThePolis card) {
@ -66,7 +68,6 @@ enum HadAnotherCreatureEnterTheBattlefieldCondition implements Condition {
instance; instance;
@Override @Override
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId());

View file

@ -1,29 +1,32 @@
package mage.cards.e; package mage.cards.e;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.common.PayLifeCost; import mage.abilities.costs.common.PayLifeCost;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.dynamicvalue.common.DevotionCount;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.continuous.CantGainLifeAllEffect; import mage.abilities.effects.common.continuous.CantGainLifeAllEffect;
import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect; import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect;
import mage.abilities.hint.ValueHint;
import mage.abilities.keyword.IndestructibleAbility; import mage.abilities.keyword.IndestructibleAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.*; import mage.constants.*;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class ErebosGodOfTheDead extends CardImpl { public final class ErebosGodOfTheDead extends CardImpl {
private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.B);
public ErebosGodOfTheDead(UUID ownerId, CardSetInfo setInfo) { public ErebosGodOfTheDead(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{3}{B}"); super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{3}{B}");
addSuperType(SuperType.LEGENDARY); addSuperType(SuperType.LEGENDARY);
@ -36,9 +39,9 @@ public final class ErebosGodOfTheDead extends CardImpl {
this.addAbility(IndestructibleAbility.getInstance()); this.addAbility(IndestructibleAbility.getInstance());
// As long as your devotion to black is less than five, Erebos isn't a creature. // 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.<i>(Each {B} in the mana costs of permanents you control counts towards your devotion to black.)</i>"); effect.setText("As long as your devotion to black is less than five, Erebos isn't a creature.<i>(Each {B} in the mana costs of permanents you control counts towards your devotion to black.)</i>");
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. // Your opponents can't gain life.
this.addAbility(new SimpleStaticAbility( this.addAbility(new SimpleStaticAbility(

View file

@ -1,26 +1,29 @@
package mage.cards.e; package mage.cards.e;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.dynamicvalue.common.DevotionCount;
import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.hint.ValueHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.ColoredManaSymbol; import mage.constants.ColoredManaSymbol;
import mage.constants.SubType;
import mage.game.permanent.token.SoldierToken; import mage.game.permanent.token.SoldierToken;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class EvangelOfHeliod extends CardImpl { public final class EvangelOfHeliod extends CardImpl {
private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.W);
public EvangelOfHeliod(UUID ownerId, CardSetInfo setInfo) { 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.HUMAN);
this.subtype.add(SubType.CLERIC); this.subtype.add(SubType.CLERIC);
@ -28,7 +31,8 @@ public final class EvangelOfHeliod extends CardImpl {
this.toughness = new MageInt(3); 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. // 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) { public EvangelOfHeliod(final EvangelOfHeliod card) {

View file

@ -1,28 +1,27 @@
package mage.cards.f; package mage.cards.f;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.dynamicvalue.common.DevotionCount;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DamagePlayersEffect; import mage.abilities.effects.common.DamagePlayersEffect;
import mage.abilities.hint.ValueHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.*;
import mage.constants.SubType;
import mage.constants.ColoredManaSymbol; import java.util.UUID;
import mage.constants.Outcome;
import mage.constants.TargetController;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class FanaticOfMogis extends CardImpl { public final class FanaticOfMogis extends CardImpl {
private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.R);
public FanaticOfMogis(UUID ownerId, CardSetInfo setInfo) { 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.MINOTAUR);
this.subtype.add(SubType.SHAMAN); this.subtype.add(SubType.SHAMAN);
@ -30,9 +29,9 @@ public final class FanaticOfMogis extends CardImpl {
this.toughness = new MageInt(2); this.toughness = new MageInt(2);
// When Fanatic of Mogis enters the battlefield, it deals damage to each opponent equal to your devotion to red. // 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.)"); 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) { public FanaticOfMogis(final FanaticOfMogis card) {

View file

@ -1,29 +1,30 @@
package mage.cards.g; package mage.cards.g;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.dynamicvalue.common.DevotionCount;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.abilities.hint.ValueHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.ColoredManaSymbol; import mage.constants.ColoredManaSymbol;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.SubType;
import mage.game.Game; import mage.game.Game;
import mage.players.Player; import mage.players.Player;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class GrayMerchantOfAsphodel extends CardImpl { public final class GrayMerchantOfAsphodel extends CardImpl {
public GrayMerchantOfAsphodel(UUID ownerId, CardSetInfo setInfo) { 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.subtype.add(SubType.ZOMBIE);
this.power = new MageInt(2); this.power = new MageInt(2);
@ -32,7 +33,8 @@ 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. // 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( this.addAbility(new EntersBattlefieldTriggeredAbility(
new GrayMerchantOfAsphodelEffect(), new GrayMerchantOfAsphodelEffect(),
false)); false)
.addHint(new ValueHint("Devotion to black", GrayMerchantOfAsphodelEffect.xValue)));
} }
public GrayMerchantOfAsphodel(final GrayMerchantOfAsphodel card) { public GrayMerchantOfAsphodel(final GrayMerchantOfAsphodel card) {
@ -47,6 +49,8 @@ public final class GrayMerchantOfAsphodel extends CardImpl {
class GrayMerchantOfAsphodelEffect extends OneShotEffect { class GrayMerchantOfAsphodelEffect extends OneShotEffect {
static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.B);
public GrayMerchantOfAsphodelEffect() { public GrayMerchantOfAsphodelEffect() {
super(Outcome.GainLife); super(Outcome.GainLife);
this.staticText = "each opponent loses X life, where X is your devotion to black. " 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()); Player controller = game.getPlayer(source.getControllerId());
if (controller != null) { if (controller != null) {
int totalLifeLost = 0; int totalLifeLost = 0;
int lifeLost = new DevotionCount(ColoredManaSymbol.B).calculate(game, source, this); int lifeLost = xValue.calculate(game, source, this);
if (lifeLost > 0) { if (lifeLost > 0) {
for (UUID playerId : game.getOpponents(source.getControllerId())) { for (UUID playerId : game.getOpponents(source.getControllerId())) {
Player opponent = game.getPlayer(playerId); Player opponent = game.getPlayer(playerId);

View file

@ -1,16 +1,16 @@
package mage.cards.h; package mage.cards.h;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.dynamicvalue.common.DevotionCount;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect; import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect;
import mage.abilities.hint.ValueHint;
import mage.abilities.keyword.IndestructibleAbility; import mage.abilities.keyword.IndestructibleAbility;
import mage.abilities.keyword.VigilanceAbility; import mage.abilities.keyword.VigilanceAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
@ -19,12 +19,15 @@ import mage.constants.*;
import mage.filter.StaticFilters; import mage.filter.StaticFilters;
import mage.game.permanent.token.HeliodGodOfTheSunToken; import mage.game.permanent.token.HeliodGodOfTheSunToken;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class HeliodGodOfTheSun extends CardImpl { public final class HeliodGodOfTheSun extends CardImpl {
private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.W);
public HeliodGodOfTheSun(UUID ownerId, CardSetInfo setInfo) { public HeliodGodOfTheSun(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{3}{W}"); super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{3}{W}");
addSuperType(SuperType.LEGENDARY); addSuperType(SuperType.LEGENDARY);
@ -37,9 +40,9 @@ public final class HeliodGodOfTheSun extends CardImpl {
this.addAbility(IndestructibleAbility.getInstance()); this.addAbility(IndestructibleAbility.getInstance());
// As long as your devotion to white is less than five, Heliod isn't a creature.<i>(Each {W} in the mana costs of permanents you control counts towards your devotion to white.)</i> // As long as your devotion to white is less than five, Heliod isn't a creature.<i>(Each {W} in the mana costs of permanents you control counts towards your devotion to white.)</i>
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.<i>(Each {W} in the mana costs of permanents you control counts towards your devotion to white.)</i>"); effect.setText("As long as your devotion to white is less than five, Heliod isn't a creature.<i>(Each {W} in the mana costs of permanents you control counts towards your devotion to white.)</i>");
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. // Other creatures you control have vigilance.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(VigilanceAbility.getInstance(), Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE, true))); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(VigilanceAbility.getInstance(), Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE, true)));

View file

@ -1,14 +1,14 @@
package mage.cards.i; package mage.cards.i;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.dynamicvalue.common.DevotionCount;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.PreventAllDamageToAllEffect; import mage.abilities.effects.common.PreventAllDamageToAllEffect;
import mage.abilities.effects.common.continuous.GainAbilityAllEffect; import mage.abilities.effects.common.continuous.GainAbilityAllEffect;
import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect; import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect;
import mage.abilities.hint.ValueHint;
import mage.abilities.keyword.IndestructibleAbility; import mage.abilities.keyword.IndestructibleAbility;
import mage.abilities.keyword.MenaceAbility; import mage.abilities.keyword.MenaceAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
@ -19,21 +19,25 @@ import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.AttackingPredicate; import mage.filter.predicate.permanent.AttackingPredicate;
import mage.filter.predicate.permanent.ControllerPredicate; import mage.filter.predicate.permanent.ControllerPredicate;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class IroasGodOfVictory extends CardImpl { public final class IroasGodOfVictory extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Creatures you control"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Creatures you control");
private static final FilterControlledCreatureInPlay filterAttacking = new FilterControlledCreatureInPlay("attacking creatures you control"); private static final FilterControlledCreatureInPlay filterAttacking = new FilterControlledCreatureInPlay("attacking creatures you control");
static { static {
filter.add(new ControllerPredicate(TargetController.YOU)); filter.add(new ControllerPredicate(TargetController.YOU));
filterAttacking.getCreatureFilter().add(AttackingPredicate.instance); filterAttacking.getCreatureFilter().add(AttackingPredicate.instance);
} }
private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.R, ColoredManaSymbol.W);
public IroasGodOfVictory(UUID ownerId, CardSetInfo setInfo) { 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); addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.GOD); this.subtype.add(SubType.GOD);
@ -44,9 +48,9 @@ public final class IroasGodOfVictory extends CardImpl {
this.addAbility(IndestructibleAbility.getInstance()); this.addAbility(IndestructibleAbility.getInstance());
// As long as your devotion to red and white is less than seven, Iroas isn't a creature. // 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"); 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.) // 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))); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(new MenaceAbility(), Duration.WhileOnBattlefield, filter)));

View file

@ -1,14 +1,14 @@
package mage.cards.k; package mage.cards.k;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.common.SpellCastControllerTriggeredAbility; import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.dynamicvalue.common.DevotionCount;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect; import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect;
import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect;
import mage.abilities.hint.ValueHint;
import mage.abilities.keyword.IndestructibleAbility; import mage.abilities.keyword.IndestructibleAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -19,8 +19,9 @@ import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.common.TargetCardInLibrary; import mage.target.common.TargetCardInLibrary;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class KarametraGodOfHarvests extends CardImpl { public final class KarametraGodOfHarvests extends CardImpl {
@ -33,6 +34,8 @@ public final class KarametraGodOfHarvests extends CardImpl {
new SubtypePredicate(SubType.PLAINS))); new SubtypePredicate(SubType.PLAINS)));
} }
private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.G, ColoredManaSymbol.W);
public KarametraGodOfHarvests(UUID ownerId, CardSetInfo setInfo) { public KarametraGodOfHarvests(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{3}{G}{W}"); super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{3}{G}{W}");
addSuperType(SuperType.LEGENDARY); addSuperType(SuperType.LEGENDARY);
@ -43,10 +46,12 @@ public final class KarametraGodOfHarvests extends CardImpl {
// Indestructible // Indestructible
this.addAbility(IndestructibleAbility.getInstance()); this.addAbility(IndestructibleAbility.getInstance());
// As long as your devotion to green and white is less than seven, Karametra isn't a creature. // 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"); 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. // 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( this.addAbility(new SpellCastControllerTriggeredAbility(
new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(filter), true), StaticFilters.FILTER_SPELL_A_CREATURE, true)); new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(filter), true), StaticFilters.FILTER_SPELL_A_CREATURE, true));

View file

@ -1,25 +1,28 @@
package mage.cards.k; package mage.cards.k;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.Mana; import mage.Mana;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.dynamicvalue.common.DevotionCount;
import mage.abilities.hint.ValueHint;
import mage.abilities.mana.DynamicManaAbility; import mage.abilities.mana.DynamicManaAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.ColoredManaSymbol; import mage.constants.ColoredManaSymbol;
import mage.constants.SubType;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class KarametrasAcolyte extends CardImpl { public final class KarametrasAcolyte extends CardImpl {
private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.G);
public KarametrasAcolyte(UUID ownerId, CardSetInfo setInfo) { 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.HUMAN);
this.subtype.add(SubType.DRUID); this.subtype.add(SubType.DRUID);
@ -27,8 +30,9 @@ public final class KarametrasAcolyte extends CardImpl {
this.toughness = new MageInt(4); this.toughness = new MageInt(4);
// {T}: Add an amount of {G} equal to your devotion to green. // {T}: Add an amount of {G} equal to your devotion to green.
this.addAbility(new DynamicManaAbility(Mana.GreenMana(1), new DevotionCount(ColoredManaSymbol.G), 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.)")); "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) { public KarametrasAcolyte(final KarametrasAcolyte card) {

View file

@ -1,26 +1,22 @@
package mage.cards.k; package mage.cards.k;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.TriggeredAbilityImpl; import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.dynamicvalue.common.DevotionCount;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.InfoEffect; import mage.abilities.effects.common.InfoEffect;
import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect; import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect;
import mage.abilities.hint.ValueHint;
import mage.abilities.keyword.IndestructibleAbility; import mage.abilities.keyword.IndestructibleAbility;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.cards.CardsImpl; import mage.cards.CardsImpl;
import mage.constants.CardType; import mage.constants.*;
import mage.constants.SubType;
import mage.constants.ColoredManaSymbol;
import mage.constants.SuperType;
import mage.constants.Zone;
import mage.game.Game; import mage.game.Game;
import mage.game.events.GameEvent; import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType; import mage.game.events.GameEvent.EventType;
@ -29,15 +25,17 @@ import mage.players.Player;
import mage.target.common.TargetAnyTarget; import mage.target.common.TargetAnyTarget;
import mage.watchers.common.CardsAmountDrawnThisTurnWatcher; import mage.watchers.common.CardsAmountDrawnThisTurnWatcher;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class KeranosGodOfStorms extends CardImpl { public final class KeranosGodOfStorms extends CardImpl {
private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.U, ColoredManaSymbol.R);
public KeranosGodOfStorms(UUID ownerId, CardSetInfo setInfo) { 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); addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.GOD); this.subtype.add(SubType.GOD);
@ -46,10 +44,11 @@ public final class KeranosGodOfStorms extends CardImpl {
// Indestructible // Indestructible
this.addAbility(IndestructibleAbility.getInstance()); this.addAbility(IndestructibleAbility.getInstance());
// As long as your devotion to blue and red is less than seven, Keranos isn't a creature. // 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"); 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. // 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 land card this way, draw a card.

View file

@ -3,6 +3,7 @@ package mage.cards.k;
import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.dynamicvalue.common.DevotionCount;
import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.abilities.hint.ValueHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
@ -28,6 +29,7 @@ public final class KlothyssDesign extends CardImpl {
StaticFilters.FILTER_PERMANENT_CREATURES, StaticFilters.FILTER_PERMANENT_CREATURES,
false, true false, true
)); ));
this.getSpellAbility().addHint(new ValueHint("Devotion to green", xValue));
} }
private KlothyssDesign(final KlothyssDesign card) { private KlothyssDesign(final KlothyssDesign card) {

View file

@ -1,15 +1,15 @@
package mage.cards.k; package mage.cards.k;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.dynamicvalue.common.DevotionCount;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.ReplacementEffectImpl; import mage.abilities.effects.ReplacementEffectImpl;
import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect; import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect;
import mage.abilities.effects.common.continuous.MaximumHandSizeControllerEffect; import mage.abilities.effects.common.continuous.MaximumHandSizeControllerEffect;
import mage.abilities.hint.ValueHint;
import mage.abilities.keyword.IndestructibleAbility; import mage.abilities.keyword.IndestructibleAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -17,12 +17,15 @@ import mage.constants.*;
import mage.game.Game; import mage.game.Game;
import mage.game.events.GameEvent; import mage.game.events.GameEvent;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class KruphixGodOfHorizons extends CardImpl { public final class KruphixGodOfHorizons extends CardImpl {
private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.G, ColoredManaSymbol.U);
public KruphixGodOfHorizons(UUID ownerId, CardSetInfo setInfo) { public KruphixGodOfHorizons(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{3}{G}{U}"); super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{3}{G}{U}");
addSuperType(SuperType.LEGENDARY); addSuperType(SuperType.LEGENDARY);
@ -34,9 +37,9 @@ public final class KruphixGodOfHorizons extends CardImpl {
// Indestructible // Indestructible
this.addAbility(IndestructibleAbility.getInstance()); this.addAbility(IndestructibleAbility.getInstance());
// As long as your devotion to green and blue is less than seven, Kruhpix isn't a creature. // 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"); 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. // You have no maximum hand size.
effect = new MaximumHandSizeControllerEffect(Integer.MAX_VALUE, Duration.WhileOnBattlefield, MaximumHandSizeControllerEffect.HandSizeModification.SET); effect = new MaximumHandSizeControllerEffect(Integer.MAX_VALUE, Duration.WhileOnBattlefield, MaximumHandSizeControllerEffect.HandSizeModification.SET);

View file

@ -1,40 +1,36 @@
package mage.cards.m; package mage.cards.m;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.Mana; import mage.Mana;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.SpellAbility; import mage.abilities.SpellAbility;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.dynamicvalue.common.DevotionCount;
import mage.abilities.effects.common.cost.CostModificationEffectImpl; import mage.abilities.effects.common.cost.CostModificationEffectImpl;
import mage.abilities.hint.ValueHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.*;
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.game.Game; import mage.game.Game;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class MarshmistTitan extends CardImpl { public final class MarshmistTitan extends CardImpl {
public MarshmistTitan(UUID ownerId, CardSetInfo setInfo) { 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.subtype.add(SubType.GIANT);
this.power = new MageInt(4); this.power = new MageInt(4);
this.toughness = new MageInt(5); this.toughness = new MageInt(5);
// Marshmist Titan costs {X} less to cast, where X is your devotion to black. // 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) { public MarshmistTitan(final MarshmistTitan card) {
@ -49,6 +45,8 @@ public final class MarshmistTitan extends CardImpl {
class MarshmistTitanCostReductionEffect extends CostModificationEffectImpl { class MarshmistTitanCostReductionEffect extends CostModificationEffectImpl {
static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.B);
public MarshmistTitanCostReductionEffect() { public MarshmistTitanCostReductionEffect() {
super(Duration.Custom, Outcome.Benefit, CostModificationType.REDUCE_COST); super(Duration.Custom, Outcome.Benefit, CostModificationType.REDUCE_COST);
staticText = "{this} costs {X} less to cast, where X is your devotion to black <i>(Each {B} in the mana costs of permanents you control counts toward your devotion to black.)</i> "; staticText = "{this} costs {X} less to cast, where X is your devotion to black <i>(Each {B} in the mana costs of permanents you control counts toward your devotion to black.)</i> ";
@ -60,10 +58,10 @@ class MarshmistTitanCostReductionEffect extends CostModificationEffectImpl {
@Override @Override
public boolean apply(Game game, Ability source, Ability abilityToModify) { public boolean apply(Game game, Ability source, Ability abilityToModify) {
SpellAbility spellAbility = (SpellAbility)abilityToModify; SpellAbility spellAbility = (SpellAbility) abilityToModify;
Mana mana = spellAbility.getManaCostsToPay().getMana(); Mana mana = spellAbility.getManaCostsToPay().getMana();
if (mana.getGeneric() > 0) { 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; int newCount = mana.getGeneric() - count;
if (newCount < 0) { if (newCount < 0) {
newCount = 0; newCount = 0;
@ -77,10 +75,7 @@ class MarshmistTitanCostReductionEffect extends CostModificationEffectImpl {
@Override @Override
public boolean applies(Ability abilityToModify, Ability source, Game game) { public boolean applies(Ability abilityToModify, Ability source, Game game) {
if (abilityToModify.getSourceId().equals(source.getSourceId()) && (abilityToModify instanceof SpellAbility)) { return abilityToModify.getSourceId().equals(source.getSourceId()) && (abilityToModify instanceof SpellAbility);
return true;
}
return false;
} }
@Override @Override

View file

@ -1,15 +1,15 @@
package mage.cards.m; package mage.cards.m;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.ObjectColor; import mage.ObjectColor;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.dynamicvalue.common.DevotionCount;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.abilities.hint.ValueHint;
import mage.abilities.keyword.ProtectionAbility; import mage.abilities.keyword.ProtectionAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -18,19 +18,23 @@ import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.game.permanent.token.MasterOfWavesElementalToken; import mage.game.permanent.token.MasterOfWavesElementalToken;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class MasterOfWaves extends CardImpl { public final class MasterOfWaves extends CardImpl {
private static final FilterCreaturePermanent filterBoost = new FilterCreaturePermanent("Elemental creatures"); private static final FilterCreaturePermanent filterBoost = new FilterCreaturePermanent("Elemental creatures");
static { static {
filterBoost.add(new SubtypePredicate(SubType.ELEMENTAL)); filterBoost.add(new SubtypePredicate(SubType.ELEMENTAL));
} }
private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.U);
public MasterOfWaves(UUID ownerId, CardSetInfo setInfo) { 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.MERFOLK);
this.subtype.add(SubType.WIZARD); this.subtype.add(SubType.WIZARD);
@ -39,14 +43,15 @@ public final class MasterOfWaves extends CardImpl {
// Protection from red // Protection from red
this.addAbility(ProtectionAbility.from(ObjectColor.RED)); this.addAbility(ProtectionAbility.from(ObjectColor.RED));
// Elemental creatures you control get +1/+1. // Elemental creatures you control get +1/+1.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filterBoost, false))); 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. // When Master of Waves enters the battlefield, create a number of 1/0 blue Elemental creature tokens equal to your devotion to blue.
// <i>(Each {U} in the mana costs of permanents you control counts toward your devotion to blue.)</i> // <i>(Each {U} in the mana costs of permanents you control counts toward your devotion to blue.)</i>
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. <i>(Each {U} in the mana costs of permanents you control counts toward your devotion to blue.)</i>"); effect.setText("create a number of 1/0 blue Elemental creature tokens equal to your devotion to blue. <i>(Each {U} in the mana costs of permanents you control counts toward your devotion to blue.)</i>");
this.addAbility(new EntersBattlefieldTriggeredAbility(effect)); this.addAbility(new EntersBattlefieldTriggeredAbility(effect).addHint(new ValueHint("Devotion to blue", xValue)));
} }
public MasterOfWaves(final MasterOfWaves card) { public MasterOfWaves(final MasterOfWaves card) {

View file

@ -1,8 +1,5 @@
package mage.cards.m; package mage.cards.m;
import java.util.Locale;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.MageObject; import mage.MageObject;
import mage.abilities.Ability; import mage.abilities.Ability;
@ -11,27 +8,34 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.Cost; import mage.abilities.costs.Cost;
import mage.abilities.costs.common.SacrificeTargetCost; import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.dynamicvalue.common.DevotionCount;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect; import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect;
import mage.abilities.hint.ValueHint;
import mage.abilities.keyword.IndestructibleAbility; import mage.abilities.keyword.IndestructibleAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.*; import mage.constants.*;
import static mage.filter.StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT;
import mage.game.Game; import mage.game.Game;
import mage.players.Player; import mage.players.Player;
import mage.target.common.TargetControlledCreaturePermanent; import mage.target.common.TargetControlledCreaturePermanent;
import mage.util.CardUtil; import mage.util.CardUtil;
import java.util.Locale;
import java.util.UUID;
import static mage.filter.StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class MogisGodOfSlaughter extends CardImpl { public final class MogisGodOfSlaughter extends CardImpl {
private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.B, ColoredManaSymbol.R);
public MogisGodOfSlaughter(UUID ownerId, CardSetInfo setInfo) { public MogisGodOfSlaughter(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{2}{B}{R}"); super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{2}{B}{R}");
addSuperType(SuperType.LEGENDARY); addSuperType(SuperType.LEGENDARY);
@ -42,10 +46,11 @@ public final class MogisGodOfSlaughter extends CardImpl {
// Indestructible // Indestructible
this.addAbility(IndestructibleAbility.getInstance()); this.addAbility(IndestructibleAbility.getInstance());
// As long as your devotion to black and red is less than seven, Mogis isn't a creature. // 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"); 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. // 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"), effect = new DoUnlessTargetPaysCost(new DamageTargetEffect(2, true, "that player"),

View file

@ -1,11 +1,12 @@
package mage.cards.m; package mage.cards.m;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.dynamicvalue.common.DevotionCount;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
import mage.abilities.hint.ValueHint;
import mage.abilities.keyword.HasteAbility; import mage.abilities.keyword.HasteAbility;
import mage.abilities.keyword.IntimidateAbility; import mage.abilities.keyword.IntimidateAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
@ -40,6 +41,7 @@ public final class MogissMarauder extends CardImpl {
ability.addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn, ability.addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn,
"and haste until end of turn, where X is your devotion to black")); "and haste until end of turn, where X is your devotion to black"));
ability.setTargetAdjuster(MogissMarauderAdjuster.instance); ability.setTargetAdjuster(MogissMarauderAdjuster.instance);
ability.addHint(new ValueHint("Devotion to black", MogissMarauderAdjuster.xValue));
this.addAbility(ability); this.addAbility(ability);
} }
@ -54,12 +56,15 @@ public final class MogissMarauder extends CardImpl {
} }
enum MogissMarauderAdjuster implements TargetAdjuster { enum MogissMarauderAdjuster implements TargetAdjuster {
instance; instance;
static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.B);
@Override @Override
public void adjustTargets(Ability ability, Game game) { public void adjustTargets(Ability ability, Game game) {
ability.getTargets().clear(); ability.getTargets().clear();
int numbTargets = new DevotionCount(ColoredManaSymbol.B).calculate(game, ability, null); int numbTargets = xValue.calculate(game, ability, null);
if (numbTargets > 0) { if (numbTargets > 0) {
ability.addTarget(new TargetCreaturePermanent(0, numbTargets)); ability.addTarget(new TargetCreaturePermanent(0, numbTargets));
} }

View file

@ -1,14 +1,13 @@
package mage.cards.n; package mage.cards.n;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import mage.Mana; import mage.Mana;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.dynamicvalue.common.DevotionCount;
import mage.abilities.effects.common.ManaEffect; import mage.abilities.effects.common.ManaEffect;
import mage.abilities.hint.ValueHint;
import mage.abilities.mana.ActivatedManaAbilityImpl; import mage.abilities.mana.ActivatedManaAbilityImpl;
import mage.abilities.mana.ColorlessManaAbility; import mage.abilities.mana.ColorlessManaAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
@ -21,8 +20,11 @@ import mage.constants.Zone;
import mage.game.Game; import mage.game.Game;
import mage.players.Player; import mage.players.Player;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class NykthosShrineToNyx extends CardImpl { public final class NykthosShrineToNyx extends CardImpl {
@ -35,6 +37,11 @@ public final class NykthosShrineToNyx extends CardImpl {
this.addAbility(new ColorlessManaAbility()); this.addAbility(new ColorlessManaAbility());
// {2}, {T}: Choose a color. Add an amount of mana of that color equal to your devotion to that color. // {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 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); this.addAbility(ability);
} }
@ -76,6 +83,12 @@ class NykthosShrineToNyxManaAbility extends ActivatedManaAbilityImpl {
class NykthosDynamicManaEffect extends ManaEffect { 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() { public NykthosDynamicManaEffect() {
super(); super();
this.staticText = "Choose a color. Add an amount of mana of that color equal to your devotion to that color. <i>(Your devotion to a color is the number of mana symbols of that color in the mana costs of permanents you control.)</i>"; this.staticText = "Choose a color. Add an amount of mana of that color equal to your devotion to that color. <i>(Your devotion to a color is the number of mana symbols of that color in the mana costs of permanents you control.)</i>";
@ -132,19 +145,19 @@ class NykthosDynamicManaEffect extends ManaEffect {
if (color != null && !color.isEmpty()) { if (color != null && !color.isEmpty()) {
switch (color) { switch (color) {
case "Red": case "Red":
mana.setRed(new DevotionCount(ColoredManaSymbol.R).calculate(game, source, this)); mana.setRed(xValueR.calculate(game, source, this));
break; break;
case "Blue": case "Blue":
mana.setBlue(new DevotionCount(ColoredManaSymbol.U).calculate(game, source, this)); mana.setBlue(xValueU.calculate(game, source, this));
break; break;
case "White": case "White":
mana.setWhite(new DevotionCount(ColoredManaSymbol.W).calculate(game, source, this)); mana.setWhite(xValueW.calculate(game, source, this));
break; break;
case "Black": case "Black":
mana.setBlack(new DevotionCount(ColoredManaSymbol.B).calculate(game, source, this)); mana.setBlack(xValueB.calculate(game, source, this));
break; break;
case "Green": case "Green":
mana.setGreen(new DevotionCount(ColoredManaSymbol.G).calculate(game, source, this)); mana.setGreen(xValueG.calculate(game, source, this));
break; break;
} }
} }

View file

@ -1,17 +1,17 @@
package mage.cards.n; package mage.cards.n;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.dynamicvalue.common.DevotionCount;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect; import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect;
import mage.abilities.hint.ValueHint;
import mage.abilities.keyword.IndestructibleAbility; import mage.abilities.keyword.IndestructibleAbility;
import mage.abilities.keyword.TrampleAbility; import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
@ -20,12 +20,15 @@ import mage.constants.*;
import mage.filter.StaticFilters; import mage.filter.StaticFilters;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class NyleaGodOfTheHunt extends CardImpl { public final class NyleaGodOfTheHunt extends CardImpl {
private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.G);
public NyleaGodOfTheHunt(UUID ownerId, CardSetInfo setInfo) { public NyleaGodOfTheHunt(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{3}{G}"); super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{3}{G}");
addSuperType(SuperType.LEGENDARY); addSuperType(SuperType.LEGENDARY);
@ -36,12 +39,15 @@ public final class NyleaGodOfTheHunt extends CardImpl {
// Indestructible // Indestructible
this.addAbility(IndestructibleAbility.getInstance()); this.addAbility(IndestructibleAbility.getInstance());
// As long as your devotion to white is less than five, Nylea isn't a creature.<i>(Each {G} in the mana costs of permanents you control counts towards your devotion to green.)</i> // As long as your devotion to white is less than five, Nylea isn't a creature.<i>(Each {G} in the mana costs of permanents you control counts towards your devotion to green.)</i>
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.<i>(Each {G} in the mana costs of permanents you control counts towards your devotion to green.)</i>"); effect.setText("As long as your devotion to green is less than five, Nylea isn't a creature.<i>(Each {G} in the mana costs of permanents you control counts towards your devotion to green.)</i>");
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. // Other creatures you control have trample.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE, true))); 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. // {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 ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(2, 2, Duration.EndOfTurn), new ManaCostsImpl("{3}{G}"));
ability.addTarget(new TargetCreaturePermanent()); ability.addTarget(new TargetCreaturePermanent());

View file

@ -1,26 +1,29 @@
package mage.cards.n; package mage.cards.n;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.dynamicvalue.common.DevotionCount;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.GainLifeEffect; import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.hint.ValueHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.ColoredManaSymbol; import mage.constants.ColoredManaSymbol;
import mage.constants.SubType;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class NyleasDisciple extends CardImpl { public final class NyleasDisciple extends CardImpl {
private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.G);
public NyleasDisciple(UUID ownerId, CardSetInfo setInfo) { 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.CENTAUR);
this.subtype.add(SubType.ARCHER); this.subtype.add(SubType.ARCHER);
@ -28,9 +31,9 @@ public final class NyleasDisciple extends CardImpl {
this.toughness = new MageInt(3); this.toughness = new MageInt(3);
// When Nylea's Disciple enters the battlefield, you gain life equal to your devotion to green. // 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"); 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) { public NyleasDisciple(final NyleasDisciple card) {

View file

@ -1,16 +1,16 @@
package mage.cards.p; package mage.cards.p;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.dynamicvalue.common.DevotionCount;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect; import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect;
import mage.abilities.hint.ValueHint;
import mage.abilities.keyword.IndestructibleAbility; import mage.abilities.keyword.IndestructibleAbility;
import mage.cards.Card; import mage.cards.Card;
import mage.cards.CardImpl; import mage.cards.CardImpl;
@ -23,12 +23,15 @@ import mage.players.Player;
import mage.target.Target; import mage.target.Target;
import mage.target.common.TargetCardInGraveyard; import mage.target.common.TargetCardInGraveyard;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class PharikaGodOfAffliction extends CardImpl { public final class PharikaGodOfAffliction extends CardImpl {
private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.B, ColoredManaSymbol.G);
public PharikaGodOfAffliction(UUID ownerId, CardSetInfo setInfo) { public PharikaGodOfAffliction(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{1}{B}{G}"); super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{1}{B}{G}");
addSuperType(SuperType.LEGENDARY); addSuperType(SuperType.LEGENDARY);
@ -39,10 +42,12 @@ public final class PharikaGodOfAffliction extends CardImpl {
// Indestructible // Indestructible
this.addAbility(IndestructibleAbility.getInstance()); this.addAbility(IndestructibleAbility.getInstance());
// As long as your devotion to black and green is less than seven, Pharika isn't a creature. // 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"); 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. // {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}")); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PharikaExileEffect(), new ManaCostsImpl("{B}{G}"));
Target target = new TargetCardInGraveyard(new FilterCreatureCard("a creature card from a graveyard")); Target target = new TargetCardInGraveyard(new FilterCreatureCard("a creature card from a graveyard"));

View file

@ -1,18 +1,18 @@
package mage.cards.p; package mage.cards.p;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.dynamicvalue.common.DevotionCount;
import mage.abilities.dynamicvalue.common.SourcePermanentToughnessValue; import mage.abilities.dynamicvalue.common.SourcePermanentToughnessValue;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.PutTopCardOfLibraryIntoGraveTargetEffect; import mage.abilities.effects.common.PutTopCardOfLibraryIntoGraveTargetEffect;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect; import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect;
import mage.abilities.hint.ValueHint;
import mage.abilities.keyword.IndestructibleAbility; import mage.abilities.keyword.IndestructibleAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -20,14 +20,17 @@ import mage.constants.*;
import mage.filter.StaticFilters; import mage.filter.StaticFilters;
import mage.target.TargetPlayer; import mage.target.TargetPlayer;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class PhenaxGodOfDeception extends CardImpl { public final class PhenaxGodOfDeception extends CardImpl {
private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.U, ColoredManaSymbol.B);
public PhenaxGodOfDeception(UUID ownerId, CardSetInfo setInfo) { 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); addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.GOD); this.subtype.add(SubType.GOD);
@ -36,16 +39,18 @@ public final class PhenaxGodOfDeception extends CardImpl {
// Indestructible // Indestructible
this.addAbility(IndestructibleAbility.getInstance()); this.addAbility(IndestructibleAbility.getInstance());
// As long as your devotion to blue and black is less than seven, Phenax isn't a creature. // 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"); 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." // 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 = 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"); 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 ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new TapSourceCost());
ability.addTarget(new TargetPlayer()); 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.\""); 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)); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
} }

View file

@ -1,17 +1,17 @@
package mage.cards.p; package mage.cards.p;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.dynamicvalue.common.DevotionCount;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DamagePlayersEffect; import mage.abilities.effects.common.DamagePlayersEffect;
import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect; import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect;
import mage.abilities.hint.ValueHint;
import mage.abilities.keyword.IndestructibleAbility; import mage.abilities.keyword.IndestructibleAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -19,19 +19,23 @@ import mage.constants.*;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.AnotherPredicate; import mage.filter.predicate.permanent.AnotherPredicate;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class PurphorosGodOfTheForge extends CardImpl { public final class PurphorosGodOfTheForge extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another creature"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another creature");
static { static {
filter.add(AnotherPredicate.instance); filter.add(AnotherPredicate.instance);
} }
private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.R);
public PurphorosGodOfTheForge(UUID ownerId, CardSetInfo setInfo) { 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); addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.GOD); this.subtype.add(SubType.GOD);
@ -41,15 +45,17 @@ public final class PurphorosGodOfTheForge extends CardImpl {
// Indestructible // Indestructible
this.addAbility(IndestructibleAbility.getInstance()); this.addAbility(IndestructibleAbility.getInstance());
// As long as your devotion to red is less than five, Purphoros isn't a creature. // 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.<i>(Each {R} in the mana costs of permanents you control counts towards your devotion to red.)</i>"); effect.setText("As long as your devotion to red is less than five, Purphoros isn't a creature.<i>(Each {R} in the mana costs of permanents you control counts towards your devotion to red.)</i>");
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. // 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)); this.addAbility(new EntersBattlefieldControlledTriggeredAbility(new DamagePlayersEffect(2, TargetController.OPPONENT), filter));
// {2}{R}: Creatures you control get +1/+0 until end of turn. // {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) { public PurphorosGodOfTheForge(final PurphorosGodOfTheForge card) {

View file

@ -1,26 +1,29 @@
package mage.cards.r; package mage.cards.r;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.dynamicvalue.common.DevotionCount;
import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.hint.ValueHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.ColoredManaSymbol; import mage.constants.ColoredManaSymbol;
import mage.constants.SubType;
import mage.counters.CounterType; import mage.counters.CounterType;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class ReverentHunter extends CardImpl { public final class ReverentHunter extends CardImpl {
private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.G);
public ReverentHunter(UUID ownerId, CardSetInfo setInfo) { 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.HUMAN);
this.subtype.add(SubType.ARCHER); this.subtype.add(SubType.ARCHER);
@ -28,8 +31,11 @@ public final class ReverentHunter extends CardImpl {
this.toughness = new MageInt(1); 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. // 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) { public ReverentHunter(final ReverentHunter card) {

View file

@ -1,35 +1,36 @@
package mage.cards.s; package mage.cards.s;
import java.util.UUID;
import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.dynamicvalue.common.DevotionCount;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.LoseLifeSourceControllerEffect; import mage.abilities.effects.common.LoseLifeSourceControllerEffect;
import mage.abilities.hint.ValueHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.ColoredManaSymbol; import mage.constants.ColoredManaSymbol;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class Sanguimancy extends CardImpl { public final class Sanguimancy extends CardImpl {
public Sanguimancy(UUID ownerId, CardSetInfo setInfo) { private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.B);
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{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. // 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(xValue);
Effect effect = new DrawCardSourceControllerEffect(blackDevotion);
effect.setText("You draw X cards"); effect.setText("You draw X cards");
this.getSpellAbility().addEffect(effect); this.getSpellAbility().addEffect(effect);
effect = new LoseLifeSourceControllerEffect(blackDevotion); effect = new LoseLifeSourceControllerEffect(xValue);
effect.setText("and you lose X life, where X is your devotion to black"); effect.setText("and you lose X life, where X is your devotion to black");
this.getSpellAbility().addEffect(effect); this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addHint(new ValueHint("Devotion to black", xValue));
} }
public Sanguimancy(final Sanguimancy card) { public Sanguimancy(final Sanguimancy card) {

View file

@ -1,10 +1,10 @@
package mage.cards.s; package mage.cards.s;
import java.util.UUID; import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.dynamicvalue.common.DevotionCount;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DamageAllEffect; import mage.abilities.effects.common.DamageAllEffect;
import mage.abilities.hint.ValueHint;
import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
@ -13,8 +13,9 @@ import mage.constants.ColoredManaSymbol;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.AbilityPredicate; import mage.filter.predicate.mageobject.AbilityPredicate;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class Skyreaping extends CardImpl { public final class Skyreaping extends CardImpl {
@ -25,14 +26,17 @@ public final class Skyreaping extends CardImpl {
filter.add(new AbilityPredicate(FlyingAbility.class)); filter.add(new AbilityPredicate(FlyingAbility.class));
} }
private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.G);
public Skyreaping(UUID ownerId, CardSetInfo setInfo) { 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. // 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 <i>(Each {G} in the mana costs of permanents you control counts toward your devotion to green.)</i>"); effect.setText("{this} deals damage to each creature with flying equal to your devotion to green <i>(Each {G} in the mana costs of permanents you control counts toward your devotion to green.)</i>");
this.getSpellAbility().addEffect(effect); this.getSpellAbility().addEffect(effect);
this.getSpellAbility().addHint(new ValueHint("Devotion to green", xValue));
} }
public Skyreaping(final Skyreaping card) { public Skyreaping(final Skyreaping card) {

View file

@ -1,34 +1,36 @@
package mage.cards.t; package mage.cards.t;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.dynamicvalue.common.DevotionCount;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.common.combat.CantBeBlockedTargetEffect; import mage.abilities.effects.common.combat.CantBeBlockedTargetEffect;
import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect; import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect;
import mage.abilities.effects.keyword.ScryEffect; import mage.abilities.effects.keyword.ScryEffect;
import mage.abilities.hint.ValueHint;
import mage.abilities.keyword.IndestructibleAbility; import mage.abilities.keyword.IndestructibleAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.*; import mage.constants.*;
import mage.target.common.TargetControlledCreaturePermanent; import mage.target.common.TargetControlledCreaturePermanent;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class ThassaGodOfTheSea extends CardImpl { public final class ThassaGodOfTheSea extends CardImpl {
private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.U);
public ThassaGodOfTheSea(UUID ownerId, CardSetInfo setInfo) { 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); addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.GOD); this.subtype.add(SubType.GOD);
@ -39,14 +41,14 @@ public final class ThassaGodOfTheSea extends CardImpl {
this.addAbility(IndestructibleAbility.getInstance()); this.addAbility(IndestructibleAbility.getInstance());
// As long as your devotion to white is less than five, Thassa isn't a creature.<i>(Each {U} in the mana costs of permanents you control counts towards your devotion to white.)</i> // As long as your devotion to white is less than five, Thassa isn't a creature.<i>(Each {U} in the mana costs of permanents you control counts towards your devotion to white.)</i>
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.<i>(Each {U} in the mana costs of permanents you control counts towards your devotion to blue.)</i>"); effect.setText("As long as your devotion to blue is less than five, Thassa isn't a creature.<i>(Each {U} in the mana costs of permanents you control counts towards your devotion to blue.)</i>");
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. // At the beginning of your upkeep, scry 1.
this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new ScryEffect(1), TargetController.YOU, false)); 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 ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CantBeBlockedTargetEffect(Duration.EndOfTurn), new ManaCostsImpl("{1}{U}"));
ability.addTarget(new TargetControlledCreaturePermanent()); ability.addTarget(new TargetControlledCreaturePermanent());
this.addAbility(ability); this.addAbility(ability);

View file

@ -1,28 +1,31 @@
package mage.cards.t; package mage.cards.t;
import java.util.UUID; import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.dynamicvalue.common.DevotionCount;
import mage.abilities.effects.common.CounterUnlessPaysEffect; import mage.abilities.effects.common.CounterUnlessPaysEffect;
import mage.abilities.hint.ValueHint;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.ColoredManaSymbol; import mage.constants.ColoredManaSymbol;
import mage.target.TargetSpell; import mage.target.TargetSpell;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class ThassasRebuff extends CardImpl { public final class ThassasRebuff extends CardImpl {
public ThassasRebuff(UUID ownerId, CardSetInfo setInfo) { private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.U);
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{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. // 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().addTarget(new TargetSpell());
this.getSpellAbility().addHint(new ValueHint("Devotion to blue", xValue));
} }
public ThassasRebuff(final ThassasRebuff card) { public ThassasRebuff(final ThassasRebuff card) {

View file

@ -1,31 +1,29 @@
package mage.cards.t; package mage.cards.t;
import java.util.UUID;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.AttacksAttachedTriggeredAbility; import mage.abilities.common.AttacksAttachedTriggeredAbility;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.dynamicvalue.common.DevotionCount;
import mage.abilities.dynamicvalue.common.StaticValue; import mage.abilities.dynamicvalue.common.StaticValue;
import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.continuous.BoostEnchantedEffect; import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
import mage.abilities.hint.ValueHint;
import mage.abilities.keyword.EnchantAbility; import mage.abilities.keyword.EnchantAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.AttachmentType; import mage.constants.*;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.ColoredManaSymbol;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class ThunderousMight extends CardImpl { public final class ThunderousMight extends CardImpl {
private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.R);
public ThunderousMight(UUID ownerId, CardSetInfo setInfo) { public ThunderousMight(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}"); super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}");
this.subtype.add(SubType.AURA); this.subtype.add(SubType.AURA);
@ -38,10 +36,11 @@ public final class ThunderousMight extends CardImpl {
this.addAbility(ability); this.addAbility(ability);
// Whenever enchanted creature attacks, it gets +X/+0 until end of turn, where X is your devotion to red. // 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.setText("it gets +X/+0 until end of turn, where X is your devotion to red");
effect.setLockedIn(true); 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) { public ThunderousMight(final ThunderousMight card) {

View file

@ -1,11 +1,10 @@
package mage.cards.x; package mage.cards.x;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.common.BeginningOfCombatTriggeredAbility; import mage.abilities.common.BeginningOfCombatTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DevotionCount; import mage.abilities.dynamicvalue.common.DevotionCount;
import mage.abilities.effects.ContinuousEffect; import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.Effect; 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.BoostTargetEffect;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect; import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect;
import mage.abilities.hint.ValueHint;
import mage.abilities.keyword.HasteAbility; import mage.abilities.keyword.HasteAbility;
import mage.abilities.keyword.IndestructibleAbility; import mage.abilities.keyword.IndestructibleAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
@ -24,19 +24,23 @@ import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.target.common.TargetControlledCreaturePermanent; import mage.target.common.TargetControlledCreaturePermanent;
import java.util.UUID;
/** /**
*
* @author LevelX2 * @author LevelX2
*/ */
public final class XenagosGodOfRevels extends CardImpl { public final class XenagosGodOfRevels extends CardImpl {
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another target creature you control"); private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another target creature you control");
static { static {
filter.add(AnotherPredicate.instance); filter.add(AnotherPredicate.instance);
} }
private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.R, ColoredManaSymbol.G);
public XenagosGodOfRevels(UUID ownerId, CardSetInfo setInfo) { 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); addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.GOD); this.subtype.add(SubType.GOD);
@ -45,17 +49,18 @@ public final class XenagosGodOfRevels extends CardImpl {
// Indestructible // Indestructible
this.addAbility(IndestructibleAbility.getInstance()); this.addAbility(IndestructibleAbility.getInstance());
// As long as your devotion to red and green is less than seven, Xenagos isn't a creature. // 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"); 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. // 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 = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn);
effect.setText("another target creature you control gains haste"); effect.setText("another target creature you control gains haste");
Ability ability = new BeginningOfCombatTriggeredAbility(Zone.BATTLEFIELD, effect, TargetController.YOU, false, false); Ability ability = new BeginningOfCombatTriggeredAbility(Zone.BATTLEFIELD, effect, TargetController.YOU, false, false);
ability.addEffect(new XenagosGodOfRevelsEffect()); ability.addEffect(new XenagosGodOfRevelsEffect());
ability.addTarget(new TargetControlledCreaturePermanent(1,1,filter, false)); ability.addTarget(new TargetControlledCreaturePermanent(1, 1, filter, false));
this.addAbility(ability); this.addAbility(ability);
} }