updated cards E-I

This commit is contained in:
Evan Kranzler 2019-12-28 00:04:42 -05:00
parent 8b9e297f9e
commit f0e0493b18
8 changed files with 82 additions and 89 deletions

View file

@ -3,7 +3,6 @@ package mage.cards.e;
import mage.abilities.Ability;
import mage.abilities.LoyaltyAbility;
import mage.abilities.common.PlaneswalkerEntersWithLoyaltyCountersAbility;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DevotionCount;
import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
@ -13,7 +12,10 @@ import mage.abilities.hint.ValueHint;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.counters.CounterType;
import mage.filter.FilterCard;
import mage.filter.StaticFilters;
@ -33,8 +35,6 @@ public final class ElspethUndauntedHero extends CardImpl {
filter.add(new NamePredicate("Sunlit Hoplite"));
}
private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.W);
public ElspethUndauntedHero(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{2}{W}{W}{W}");
@ -56,9 +56,9 @@ public final class ElspethUndauntedHero extends CardImpl {
StaticFilters.FILTER_PERMANENT_CREATURES
).setText("Until end of turn, creatures you control gain flying"), -8);
ability.addEffect(new BoostControlledEffect(
xValue, xValue, Duration.EndOfTurn
DevotionCount.W, DevotionCount.W, Duration.EndOfTurn
).setText("and get +X/+X, where X is your devotion to white"));
ability.addHint(new ValueHint("Devotion to white", xValue));
ability.addHint(new ValueHint("Devotion to white", DevotionCount.W));
this.addAbility(ability);
}

View file

@ -6,7 +6,6 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.Condition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DevotionCount;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
@ -27,8 +26,6 @@ import java.util.UUID;
*/
public final class EpharaGodOfThePolis extends CardImpl {
private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.W, ColoredManaSymbol.U);
public EpharaGodOfThePolis(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{2}{W}{U}");
this.addSuperType(SuperType.LEGENDARY);
@ -41,19 +38,21 @@ public final class EpharaGodOfThePolis extends CardImpl {
this.addAbility(IndestructibleAbility.getInstance());
// As long as your devotion to white and blue is less than seven, Ephara isn't a creature.
Effect effect = new LoseCreatureTypeSourceEffect(xValue, 7);
effect.setText("As long as your devotion to white and blue is less than seven, Ephara isn't a creature");
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect).addHint(new ValueHint("Devotion to white and blue", xValue)));
Effect effect = new LoseCreatureTypeSourceEffect(DevotionCount.WU, 7);
effect.setText("As long as your devotion to white and blue is less than seven, {this} isn't a creature");
this.addAbility(new SimpleStaticAbility(effect).addHint(new ValueHint("Devotion to white and blue", DevotionCount.WU)));
// At the beginning of each upkeep, if you had another creature enter the battlefield under your control last turn, draw a card.
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), TargetController.ANY, false, false),
HadAnotherCreatureEnterTheBattlefieldCondition.instance,
"At the beginning of each upkeep, if you had another creature enter the battlefield under your control last turn, draw a card."),
new PermanentsEnteredBattlefieldWatcher());
new BeginningOfUpkeepTriggeredAbility(
Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1),
TargetController.ANY, false, false
), EpharaGodOfThePolisCondition.instance, "At the beginning of each upkeep, " +
"if you had another creature enter the battlefield under your control last turn, draw a card."
), new PermanentsEnteredBattlefieldWatcher());
}
public EpharaGodOfThePolis(final EpharaGodOfThePolis card) {
private EpharaGodOfThePolis(final EpharaGodOfThePolis card) {
super(card);
}
@ -63,11 +62,10 @@ public final class EpharaGodOfThePolis extends CardImpl {
}
}
enum HadAnotherCreatureEnterTheBattlefieldCondition implements Condition {
enum EpharaGodOfThePolisCondition implements Condition {
instance;
@Override
public boolean apply(Game game, Ability source) {
Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId());

View file

@ -6,7 +6,6 @@ import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.common.PayLifeCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DevotionCount;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
@ -25,8 +24,6 @@ import java.util.UUID;
*/
public final class ErebosGodOfTheDead extends CardImpl {
private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.B);
public ErebosGodOfTheDead(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{3}{B}");
addSuperType(SuperType.LEGENDARY);
@ -39,27 +36,25 @@ public final class ErebosGodOfTheDead extends CardImpl {
this.addAbility(IndestructibleAbility.getInstance());
// As long as your devotion to black is less than five, Erebos isn't a creature.
Effect effect = new LoseCreatureTypeSourceEffect(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>");
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect).addHint(new ValueHint("Devotion to black", xValue)));
Effect effect = new LoseCreatureTypeSourceEffect(DevotionCount.B, 5);
effect.setText("As long as your devotion to black is less than five, {this} isn't a creature.");
this.addAbility(new SimpleStaticAbility(effect).addHint(new ValueHint("Devotion to black", DevotionCount.B)));
// Your opponents can't gain life.
this.addAbility(new SimpleStaticAbility(
Zone.BATTLEFIELD,
new CantGainLifeAllEffect(
Duration.WhileOnBattlefield,
TargetController.OPPONENT
)
new CantGainLifeAllEffect(Duration.WhileOnBattlefield, TargetController.OPPONENT)
));
// {1}{B}, Pay 2 life: Draw a card.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new ManaCostsImpl("{1}{B}"));
Ability ability = new SimpleActivatedAbility(
new DrawCardSourceControllerEffect(1), new ManaCostsImpl("{1}{B}")
);
ability.addCost(new PayLifeCost(2));
this.addAbility(ability);
}
public ErebosGodOfTheDead(final ErebosGodOfTheDead card) {
private ErebosGodOfTheDead(final ErebosGodOfTheDead card) {
super(card);
}

View file

@ -2,14 +2,12 @@ package mage.cards.e;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DevotionCount;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.hint.ValueHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.ColoredManaSymbol;
import mage.constants.SubType;
import mage.game.permanent.token.SoldierToken;
@ -20,8 +18,6 @@ import java.util.UUID;
*/
public final class EvangelOfHeliod extends CardImpl {
private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.W);
public EvangelOfHeliod(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}{W}");
this.subtype.add(SubType.HUMAN);
@ -31,8 +27,8 @@ public final class EvangelOfHeliod extends CardImpl {
this.toughness = new MageInt(3);
// When Evangel of Heliod enters the battlefield, create a number of 1/1 white Soldier creature tokens equal to your devotion to white.
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new SoldierToken(), xValue))
.addHint(new ValueHint("Devotion to white", xValue)));
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new SoldierToken(), DevotionCount.W))
.addHint(new ValueHint("Devotion to white", DevotionCount.W)));
}
public EvangelOfHeliod(final EvangelOfHeliod card) {

View file

@ -2,14 +2,16 @@ package mage.cards.f;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DevotionCount;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DamagePlayersEffect;
import mage.abilities.hint.ValueHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.TargetController;
import java.util.UUID;
@ -18,8 +20,6 @@ import java.util.UUID;
*/
public final class FanaticOfMogis extends CardImpl {
private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.R);
public FanaticOfMogis(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}");
this.subtype.add(SubType.MINOTAUR);
@ -29,12 +29,12 @@ public final class FanaticOfMogis extends CardImpl {
this.toughness = new MageInt(2);
// When Fanatic of Mogis enters the battlefield, it deals damage to each opponent equal to your devotion to red.
Effect effect = new DamagePlayersEffect(Outcome.Damage, xValue, TargetController.OPPONENT);
Effect effect = new DamagePlayersEffect(Outcome.Damage, DevotionCount.R, TargetController.OPPONENT);
effect.setText("it deals damage to each opponent equal to your devotion to red. (Each {R} in the mana costs of permanents you control counts towards your devotion to red.)");
this.addAbility(new EntersBattlefieldTriggeredAbility(effect, false).addHint(new ValueHint("Devotion to red", xValue)));
this.addAbility(new EntersBattlefieldTriggeredAbility(effect, false).addHint(new ValueHint("Devotion to red", DevotionCount.R)));
}
public FanaticOfMogis(final FanaticOfMogis card) {
private FanaticOfMogis(final FanaticOfMogis card) {
super(card);
}

View file

@ -3,19 +3,18 @@ package mage.cards.g;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DevotionCount;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.hint.ValueHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.ColoredManaSymbol;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.game.Game;
import mage.players.Player;
import java.util.Objects;
import java.util.UUID;
/**
@ -31,13 +30,11 @@ public final class GrayMerchantOfAsphodel extends CardImpl {
this.toughness = new MageInt(4);
// When Gray Merchant of Asphodel enters the battlefield, each opponent loses X life, where X is your devotion to black. You gain life equal to the life lost this way.
this.addAbility(new EntersBattlefieldTriggeredAbility(
new GrayMerchantOfAsphodelEffect(),
false)
.addHint(new ValueHint("Devotion to black", GrayMerchantOfAsphodelEffect.xValue)));
this.addAbility(new EntersBattlefieldTriggeredAbility(new GrayMerchantOfAsphodelEffect(), false)
.addHint(new ValueHint("Devotion to black", DevotionCount.B)));
}
public GrayMerchantOfAsphodel(final GrayMerchantOfAsphodel card) {
private GrayMerchantOfAsphodel(final GrayMerchantOfAsphodel card) {
super(card);
}
@ -49,9 +46,7 @@ public final class GrayMerchantOfAsphodel extends CardImpl {
class GrayMerchantOfAsphodelEffect extends OneShotEffect {
static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.B);
public GrayMerchantOfAsphodelEffect() {
GrayMerchantOfAsphodelEffect() {
super(Outcome.GainLife);
this.staticText = "each opponent loses X life, where X is your devotion to black. "
+ "You gain life equal to the life lost this way. "
@ -59,7 +54,7 @@ class GrayMerchantOfAsphodelEffect extends OneShotEffect {
+ "counts towards your devotion to black.)</i>";
}
public GrayMerchantOfAsphodelEffect(final GrayMerchantOfAsphodelEffect effect) {
private GrayMerchantOfAsphodelEffect(final GrayMerchantOfAsphodelEffect effect) {
super(effect);
}
@ -71,20 +66,20 @@ class GrayMerchantOfAsphodelEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
int totalLifeLost = 0;
int lifeLost = xValue.calculate(game, source, this);
if (lifeLost > 0) {
for (UUID playerId : game.getOpponents(source.getControllerId())) {
Player opponent = game.getPlayer(playerId);
if (opponent != null) {
totalLifeLost += opponent.loseLife(lifeLost, game, false);
}
}
}
controller.gainLife(totalLifeLost, game, source);
if (controller == null) {
return false;
}
int lifeLost = DevotionCount.B.calculate(game, source, this);
if (lifeLost == 0) {
return true;
}
return false;
int totalLifeLost = game
.getOpponents(source.getControllerId())
.stream()
.map(game::getPlayer)
.filter(Objects::nonNull)
.mapToInt(opponent -> opponent.loseLife(lifeLost, game, false))
.sum();
return controller.gainLife(totalLifeLost, game, source) > 0;
}
}

View file

@ -4,7 +4,6 @@ import mage.MageInt;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DevotionCount;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.CreateTokenEffect;
@ -15,7 +14,10 @@ import mage.abilities.keyword.IndestructibleAbility;
import mage.abilities.keyword.VigilanceAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.filter.StaticFilters;
import mage.game.permanent.token.HeliodGodOfTheSunToken;
@ -26,8 +28,6 @@ import java.util.UUID;
*/
public final class HeliodGodOfTheSun extends CardImpl {
private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.W);
public HeliodGodOfTheSun(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{3}{W}");
addSuperType(SuperType.LEGENDARY);
@ -40,15 +40,20 @@ public final class HeliodGodOfTheSun extends CardImpl {
this.addAbility(IndestructibleAbility.getInstance());
// As long as your devotion to white is less than five, Heliod isn't a creature.<i>(Each {W} in the mana costs of permanents you control counts towards your devotion to white.)</i>
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>");
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect).addHint(new ValueHint("Devotion to white", xValue)));
Effect effect = new LoseCreatureTypeSourceEffect(DevotionCount.W, 5);
effect.setText("As long as your devotion to white is less than five, {this} isn't a creature.");
this.addAbility(new SimpleStaticAbility(effect).addHint(new ValueHint("Devotion to white", DevotionCount.W)));
// 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(new GainAbilityControlledEffect(
VigilanceAbility.getInstance(), Duration.WhileOnBattlefield,
StaticFilters.FILTER_PERMANENT_CREATURE, true
)));
// {2}{W}{W}: Create a 2/1 white Cleric enchantment creature token.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new HeliodGodOfTheSunToken()), new ManaCostsImpl("{2}{W}{W}")));
this.addAbility(new SimpleActivatedAbility(
new CreateTokenEffect(new HeliodGodOfTheSunToken()), new ManaCostsImpl("{2}{W}{W}")
));
}

View file

@ -2,7 +2,6 @@ package mage.cards.i;
import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.DevotionCount;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.PreventAllDamageToAllEffect;
@ -14,6 +13,7 @@ import mage.abilities.keyword.MenaceAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.AttackingPredicate;
@ -26,16 +26,16 @@ import java.util.UUID;
*/
public final class IroasGodOfVictory extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Creatures you control");
private static final FilterControlledCreaturePermanent filterAttacking = new FilterControlledCreaturePermanent("attacking creatures you control");
private static final FilterPermanent filter
= new FilterCreaturePermanent("Creatures you control");
private static final FilterPermanent filterAttacking
= new FilterControlledCreaturePermanent("attacking creatures you control");
static {
filter.add(new ControllerPredicate(TargetController.YOU));
filterAttacking.add(AttackingPredicate.instance);
}
private static final DynamicValue xValue = new DevotionCount(ColoredManaSymbol.R, ColoredManaSymbol.W);
public IroasGodOfVictory(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{2}{R}{W}");
addSuperType(SuperType.LEGENDARY);
@ -48,18 +48,22 @@ public final class IroasGodOfVictory extends CardImpl {
this.addAbility(IndestructibleAbility.getInstance());
// As long as your devotion to red and white is less than seven, Iroas isn't a creature.
Effect effect = new LoseCreatureTypeSourceEffect(xValue, 7);
effect.setText("As long as your devotion to red and white is less than seven, Iroas isn't a creature");
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect).addHint(new ValueHint("Devotion to red and white", xValue)));
Effect effect = new LoseCreatureTypeSourceEffect(DevotionCount.RW, 7);
effect.setText("As long as your devotion to red and white is less than seven, {this} isn't a creature");
this.addAbility(new SimpleStaticAbility(effect).addHint(new ValueHint("Devotion to red and white", DevotionCount.RW)));
// 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(
new GainAbilityAllEffect(new MenaceAbility(), Duration.WhileOnBattlefield, filter)
));
// Prevent all damage that would be dealt to attacking creatures you control.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PreventAllDamageToAllEffect(Duration.WhileOnBattlefield, filterAttacking)));
this.addAbility(new SimpleStaticAbility(
new PreventAllDamageToAllEffect(Duration.WhileOnBattlefield, filterAttacking)
));
}
public IroasGodOfVictory(final IroasGodOfVictory card) {
private IroasGodOfVictory(final IroasGodOfVictory card) {
super(card);
}