mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 03:22:00 -08:00
updated cards to use built-in devotion hints
This commit is contained in:
parent
d9e0b75545
commit
e34a481b6c
38 changed files with 163 additions and 276 deletions
|
|
@ -7,7 +7,6 @@ import mage.abilities.dynamicvalue.common.DevotionCount;
|
|||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.SacrificeControllerEffect;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -37,7 +36,7 @@ public final class AbhorrentOverlord extends CardImpl {
|
|||
// 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(), DevotionCount.B);
|
||||
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).addHint(new ValueHint("Devotion to black", DevotionCount.B)));
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(effect).addHint(DevotionCount.B.getHint()));
|
||||
|
||||
// At the beginning of your upkeep, sacrifice a creature.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new SacrificeControllerEffect(StaticFilters.FILTER_PERMANENT_CREATURE, 1, null), TargetController.YOU, false));
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ package mage.cards.a;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.dynamicvalue.common.DevotionCount;
|
||||
import mage.abilities.effects.PreventionEffectImpl;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
|
@ -31,7 +30,7 @@ public final class AcolytesReward extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new AcolytesRewardEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
this.getSpellAbility().addTarget(new TargetAnyTarget());
|
||||
this.getSpellAbility().addHint(new ValueHint("Devotion to white", DevotionCount.W));
|
||||
this.getSpellAbility().addHint(DevotionCount.W.getHint());
|
||||
}
|
||||
|
||||
private AcolytesReward(final AcolytesReward card) {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ package mage.cards.a;
|
|||
import mage.abilities.dynamicvalue.common.DevotionCount;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
|
@ -25,10 +24,10 @@ public final class AspectOfHydra extends CardImpl {
|
|||
effect.setText("Target creature gets +X/+X until end of turn, where X is your devotion to green");
|
||||
this.getSpellAbility().addEffect(effect);
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
this.getSpellAbility().addHint(new ValueHint("Devotion to green", DevotionCount.G));
|
||||
this.getSpellAbility().addHint(DevotionCount.G.getHint());
|
||||
}
|
||||
|
||||
public AspectOfHydra(final AspectOfHydra card) {
|
||||
private AspectOfHydra(final AspectOfHydra card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ import mage.abilities.dynamicvalue.common.DevotionCount;
|
|||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -52,9 +51,8 @@ public final class AthreosGodOfPassage extends CardImpl {
|
|||
this.addAbility(IndestructibleAbility.getInstance());
|
||||
|
||||
// As long as your devotion to white and black is less than seven, Athreos isn't a creature.
|
||||
Effect effect = new LoseCreatureTypeSourceEffect(DevotionCount.WB, 7);
|
||||
effect.setText("As long as your devotion to white and black is less than seven, {this} isn't a creature");
|
||||
this.addAbility(new SimpleStaticAbility(effect).addHint(new ValueHint("Devotion to white and black", DevotionCount.WB)));
|
||||
this.addAbility(new SimpleStaticAbility(new LoseCreatureTypeSourceEffect(DevotionCount.WB, 7))
|
||||
.addHint(DevotionCount.WB.getHint()));
|
||||
|
||||
// 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);
|
||||
|
|
@ -63,7 +61,7 @@ public final class AthreosGodOfPassage extends CardImpl {
|
|||
|
||||
}
|
||||
|
||||
public AthreosGodOfPassage(final AthreosGodOfPassage card) {
|
||||
private AthreosGodOfPassage(final AthreosGodOfPassage card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
|
|
@ -75,12 +73,12 @@ public final class AthreosGodOfPassage extends CardImpl {
|
|||
|
||||
class AthreosGodOfPassageReturnEffect extends OneShotEffect {
|
||||
|
||||
public AthreosGodOfPassageReturnEffect() {
|
||||
AthreosGodOfPassageReturnEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "return it to your hand unless target opponent pays 3 life";
|
||||
}
|
||||
|
||||
public AthreosGodOfPassageReturnEffect(final AthreosGodOfPassageReturnEffect effect) {
|
||||
private AthreosGodOfPassageReturnEffect(final AthreosGodOfPassageReturnEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
|
|
@ -92,30 +90,29 @@ class AthreosGodOfPassageReturnEffect extends OneShotEffect {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
UUID creatureId = (UUID) this.getValue("creatureId");
|
||||
Card creature = game.getCard(creatureId);
|
||||
if (creature != null) {
|
||||
Player opponent = game.getPlayer(source.getFirstTarget());
|
||||
boolean paid = false;
|
||||
if (opponent != null) {
|
||||
Cost cost = new PayLifeCost(3);
|
||||
if (cost.canPay(source, source.getSourceId(), opponent.getId(), game)
|
||||
&& opponent.chooseUse(outcome, "Pay 3 life to prevent that " + creature.getLogName() + " returns to " + controller.getLogName() + "'s hand?", source, game)) {
|
||||
if (cost.pay(source, game, source.getSourceId(), opponent.getId(), false, null)) {
|
||||
paid = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (opponent == null || !paid) {
|
||||
if (game.getState().getZone(creature.getId()) == Zone.GRAVEYARD) {
|
||||
controller.moveCards(creature, Zone.HAND, source, game);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (controller == null) {
|
||||
return false;
|
||||
}
|
||||
UUID creatureId = (UUID) this.getValue("creatureId");
|
||||
Card creature = game.getCard(creatureId);
|
||||
if (creature == null) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
Player opponent = game.getPlayer(source.getFirstTarget());
|
||||
boolean paid = false;
|
||||
if (opponent != null) {
|
||||
Cost cost = new PayLifeCost(3);
|
||||
if (cost.canPay(source, source.getSourceId(), opponent.getId(), game)
|
||||
&& opponent.chooseUse(outcome, "Pay 3 life to prevent that " + creature.getLogName() + " returns to " + controller.getLogName() + "'s hand?", source, game)
|
||||
&& cost.pay(source, game, source.getSourceId(), opponent.getId(), false, null)) {
|
||||
paid = true;
|
||||
}
|
||||
}
|
||||
if ((opponent != null && paid) || game.getState().getZone(creature.getId()) != Zone.GRAVEYARD) {
|
||||
return true;
|
||||
}
|
||||
controller.moveCards(creature, Zone.HAND, source, game);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -123,12 +120,12 @@ class AthreosDiesCreatureTriggeredAbility extends TriggeredAbilityImpl {
|
|||
|
||||
protected FilterCreaturePermanent filter;
|
||||
|
||||
public AthreosDiesCreatureTriggeredAbility(Effect effect, boolean optional, FilterCreaturePermanent filter) {
|
||||
AthreosDiesCreatureTriggeredAbility(Effect effect, boolean optional, FilterCreaturePermanent filter) {
|
||||
super(Zone.BATTLEFIELD, effect, optional);
|
||||
this.filter = filter;
|
||||
}
|
||||
|
||||
public AthreosDiesCreatureTriggeredAbility(AthreosDiesCreatureTriggeredAbility ability) {
|
||||
private AthreosDiesCreatureTriggeredAbility(AthreosDiesCreatureTriggeredAbility ability) {
|
||||
super(ability);
|
||||
this.filter = ability.filter;
|
||||
}
|
||||
|
|
@ -146,15 +143,16 @@ class AthreosDiesCreatureTriggeredAbility extends TriggeredAbilityImpl {
|
|||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
|
||||
if (zEvent.isDiesEvent()) {
|
||||
if (zEvent.getTarget() != null && filter.match(zEvent.getTarget(), sourceId, controllerId, game)) {
|
||||
for (Effect effect : this.getEffects()) {
|
||||
effect.setValue("creatureId", event.getTargetId());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if (!zEvent.isDiesEvent()) {
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
if (zEvent.getTarget() == null || !filter.match(zEvent.getTarget(), sourceId, controllerId, game)) {
|
||||
return false;
|
||||
}
|
||||
for (Effect effect : this.getEffects()) {
|
||||
effect.setValue("creatureId", event.getTargetId());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -7,11 +7,9 @@ import mage.abilities.TriggeredAbilityImpl;
|
|||
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.common.DevotionCount;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -53,10 +51,8 @@ public final class AthreosShroudVeiled extends CardImpl {
|
|||
this.addAbility(IndestructibleAbility.getInstance());
|
||||
|
||||
// As long as your devotion to white and black is less than seven, Athreos isn't a creature.
|
||||
Effect effect = new LoseCreatureTypeSourceEffect(DevotionCount.WB, 7);
|
||||
effect.setText("As long as your devotion to white and black is less than seven, {this} isn't a creature");
|
||||
this.addAbility(new SimpleStaticAbility(effect)
|
||||
.addHint(new ValueHint("Devotion to white and black", DevotionCount.WB)));
|
||||
this.addAbility(new SimpleStaticAbility(new LoseCreatureTypeSourceEffect(DevotionCount.WB, 7))
|
||||
.addHint(DevotionCount.WB.getHint()));
|
||||
|
||||
// At the beginning of your end step, put a coin counter on another target creature.
|
||||
Ability ability = new BeginningOfEndStepTriggeredAbility(
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import mage.abilities.common.SimpleStaticAbility;
|
|||
import mage.abilities.dynamicvalue.common.DevotionCount;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.effects.common.continuous.SetToughnessSourceEffect;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
|
|
@ -32,9 +31,10 @@ public final class DaxosBlessedByTheSun extends CardImpl {
|
|||
|
||||
// Daxos's toughness is equal to your devotion to white.
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
Zone.ALL, new SetToughnessSourceEffect(DevotionCount.W, Duration.EndOfGame
|
||||
).setText("{this}'s toughness is equal to your devotion to white"))
|
||||
.addHint(new ValueHint("Devotion to white", DevotionCount.W)));
|
||||
Zone.ALL,
|
||||
new SetToughnessSourceEffect(DevotionCount.W, Duration.EndOfGame)
|
||||
.setText("{this}'s toughness is equal to your devotion to white")
|
||||
).addHint(DevotionCount.W.getHint()));
|
||||
|
||||
// Whenever another creature you control enters the battlefield or dies, you gain 1 life.
|
||||
this.addAbility(new DaxosBlessedByTheSunAbility());
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.DevotionCount;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.cards.*;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
|
|
@ -38,7 +37,7 @@ public final class DiscipleOfPhenax extends CardImpl {
|
|||
// from their hand equal to your devotion to black. You choose one of them. That player discards that card.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new DiscipleOfPhenaxEffect(), false);
|
||||
ability.addTarget(new TargetPlayer());
|
||||
ability.addHint(new ValueHint("Devotion to black", DevotionCount.B));
|
||||
ability.addHint(DevotionCount.B.getHint());
|
||||
this.addAbility(ability);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
|||
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
||||
import mage.abilities.effects.common.search.SearchLibraryGraveyardPutOntoBattlefieldEffect;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -58,7 +57,7 @@ public final class ElspethUndauntedHero extends CardImpl {
|
|||
ability.addEffect(new BoostControlledEffect(
|
||||
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", DevotionCount.W));
|
||||
ability.addHint(DevotionCount.W.getHint());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,10 +7,8 @@ import mage.abilities.common.SimpleStaticAbility;
|
|||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.DevotionCount;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -38,9 +36,8 @@ 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(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)));
|
||||
this.addAbility(new SimpleStaticAbility(new LoseCreatureTypeSourceEffect(DevotionCount.WU, 7))
|
||||
.addHint(DevotionCount.WU.getHint()));
|
||||
|
||||
// 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(
|
||||
|
|
|
|||
|
|
@ -7,11 +7,9 @@ import mage.abilities.common.SimpleStaticAbility;
|
|||
import mage.abilities.costs.common.PayLifeCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.common.DevotionCount;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.continuous.CantGainLifeAllEffect;
|
||||
import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -36,9 +34,8 @@ 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(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)));
|
||||
this.addAbility(new SimpleStaticAbility(new LoseCreatureTypeSourceEffect(DevotionCount.B, 5))
|
||||
.addHint(DevotionCount.B.getHint()));
|
||||
|
||||
// Your opponents can't gain life.
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import mage.MageInt;
|
|||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
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;
|
||||
|
|
@ -27,11 +26,12 @@ 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(), DevotionCount.W))
|
||||
.addHint(new ValueHint("Devotion to white", DevotionCount.W)));
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(
|
||||
new CreateTokenEffect(new SoldierToken(), DevotionCount.W)
|
||||
).addHint(DevotionCount.W.getHint()));
|
||||
}
|
||||
|
||||
public EvangelOfHeliod(final EvangelOfHeliod card) {
|
||||
private EvangelOfHeliod(final EvangelOfHeliod card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,7 @@ package mage.cards.f;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.DevotionCount;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DamagePlayersEffect;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
|
@ -29,9 +27,10 @@ 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, 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", DevotionCount.R)));
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(
|
||||
new DamagePlayersEffect(Outcome.Damage, DevotionCount.R, TargetController.OPPONENT)
|
||||
.setText("it deals damage to each opponent equal to your devotion to red."), false
|
||||
).addHint(DevotionCount.R.getHint()));
|
||||
}
|
||||
|
||||
private FanaticOfMogis(final FanaticOfMogis card) {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
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;
|
||||
|
|
@ -30,8 +29,9 @@ 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", DevotionCount.B)));
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(
|
||||
new GrayMerchantOfAsphodelEffect(), false
|
||||
).addHint(DevotionCount.B.getHint()));
|
||||
}
|
||||
|
||||
private GrayMerchantOfAsphodel(final GrayMerchantOfAsphodel card) {
|
||||
|
|
|
|||
|
|
@ -5,11 +5,9 @@ import mage.abilities.common.SimpleActivatedAbility;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.common.DevotionCount;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
||||
import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -40,9 +38,8 @@ 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(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)));
|
||||
this.addAbility(new SimpleStaticAbility(new LoseCreatureTypeSourceEffect(DevotionCount.W, 5))
|
||||
.addHint(DevotionCount.W.getHint()));
|
||||
|
||||
// Other creatures you control have vigilance.
|
||||
this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect(
|
||||
|
|
@ -57,7 +54,7 @@ public final class HeliodGodOfTheSun extends CardImpl {
|
|||
|
||||
}
|
||||
|
||||
public HeliodGodOfTheSun(final HeliodGodOfTheSun card) {
|
||||
private HeliodGodOfTheSun(final HeliodGodOfTheSun card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,11 +3,9 @@ package mage.cards.i;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.common.DevotionCount;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.PreventAllDamageToAllEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAllEffect;
|
||||
import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.abilities.keyword.MenaceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -48,9 +46,8 @@ 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(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)));
|
||||
this.addAbility(new SimpleStaticAbility(new LoseCreatureTypeSourceEffect(DevotionCount.RW, 7))
|
||||
.addHint(DevotionCount.RW.getHint()));
|
||||
|
||||
// Creatures you control have menace. (They can't be blocked except by two or more creatures.)
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
|
|
|
|||
|
|
@ -4,10 +4,8 @@ import mage.MageInt;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.DevotionCount;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect;
|
||||
import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -48,9 +46,8 @@ public final class KarametraGodOfHarvests extends CardImpl {
|
|||
this.addAbility(IndestructibleAbility.getInstance());
|
||||
|
||||
// As long as your devotion to green and white is less than seven, Karametra isn't a creature.
|
||||
Effect effect = new LoseCreatureTypeSourceEffect(DevotionCount.GW, 7);
|
||||
effect.setText("As long as your devotion to green and white is less than seven, {this} isn't a creature");
|
||||
this.addAbility(new SimpleStaticAbility(effect).addHint(new ValueHint("Devotion to green and white", DevotionCount.GW)));
|
||||
this.addAbility(new SimpleStaticAbility(new LoseCreatureTypeSourceEffect(DevotionCount.GW, 7))
|
||||
.addHint(DevotionCount.GW.getHint()));
|
||||
|
||||
// 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(
|
||||
|
|
@ -59,7 +56,7 @@ public final class KarametraGodOfHarvests extends CardImpl {
|
|||
));
|
||||
}
|
||||
|
||||
public KarametraGodOfHarvests(final KarametraGodOfHarvests card) {
|
||||
private KarametraGodOfHarvests(final KarametraGodOfHarvests card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ package mage.cards.k;
|
|||
import mage.MageInt;
|
||||
import mage.Mana;
|
||||
import mage.abilities.dynamicvalue.common.DevotionCount;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.abilities.mana.DynamicManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -29,10 +28,10 @@ public final class KarametrasAcolyte extends CardImpl {
|
|||
this.addAbility(new DynamicManaAbility(
|
||||
Mana.GreenMana(1), DevotionCount.G, "Add an amount of {G} equal to your devotion to green. " +
|
||||
"(Each {G} in the mana costs of permanents you control counts towards your devotion to green.)"
|
||||
).addHint(new ValueHint("Devotion to green", DevotionCount.G)));
|
||||
).addHint(DevotionCount.G.getHint()));
|
||||
}
|
||||
|
||||
public KarametrasAcolyte(final KarametrasAcolyte card) {
|
||||
private KarametrasAcolyte(final KarametrasAcolyte card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,12 +4,10 @@ import mage.MageInt;
|
|||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.common.DevotionCount;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.InfoEffect;
|
||||
import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -46,9 +44,8 @@ public final class KeranosGodOfStorms extends CardImpl {
|
|||
this.addAbility(IndestructibleAbility.getInstance());
|
||||
|
||||
// As long as your devotion to blue and red is less than seven, Keranos isn't a creature.
|
||||
Effect effect = new LoseCreatureTypeSourceEffect(DevotionCount.UR, 7);
|
||||
effect.setText("As long as your devotion to blue and red is less than seven, {this} isn't a creature");
|
||||
this.addAbility(new SimpleStaticAbility(effect).addHint(new ValueHint("Devotion to blue and red", DevotionCount.UR)));
|
||||
this.addAbility(new SimpleStaticAbility(new LoseCreatureTypeSourceEffect(DevotionCount.UR, 7))
|
||||
.addHint(DevotionCount.UR.getHint()));
|
||||
|
||||
// Reveal the first card you draw on each of your turns.
|
||||
// Whenever you reveal a land card this way, draw a card.
|
||||
|
|
@ -56,7 +53,7 @@ public final class KeranosGodOfStorms extends CardImpl {
|
|||
this.addAbility(new KeranosGodOfStormsTriggeredAbility(), new CardsAmountDrawnThisTurnWatcher());
|
||||
}
|
||||
|
||||
public KeranosGodOfStorms(final KeranosGodOfStorms card) {
|
||||
private KeranosGodOfStorms(final KeranosGodOfStorms card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,10 +6,8 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.BeginningOfPreCombatMainTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.common.DevotionCount;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -39,9 +37,8 @@ public final class KlothysGodOfDestiny extends CardImpl {
|
|||
this.addAbility(IndestructibleAbility.getInstance());
|
||||
|
||||
// As long as your devotion to red and green is less than seven, Klothys isn't a creature.
|
||||
Effect effect = new LoseCreatureTypeSourceEffect(DevotionCount.RG, 7);
|
||||
effect.setText("As long as your devotion to red and green is less than seven, {this} isn't a creature");
|
||||
this.addAbility(new SimpleStaticAbility(effect).addHint(new ValueHint("Devotion to red and green", DevotionCount.RG)));
|
||||
this.addAbility(new SimpleStaticAbility(new LoseCreatureTypeSourceEffect(DevotionCount.RG, 7))
|
||||
.addHint(DevotionCount.RG.getHint()));
|
||||
|
||||
// At the beginning of your precombat main phase, exile target card from a graveyard. If it was a land card, add {R} or {G}. Otherwise, you gain 2 life and Klothys deals 2 damage to each opponent.
|
||||
Ability ability = new BeginningOfPreCombatMainTriggeredAbility(
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ package mage.cards.k;
|
|||
|
||||
import mage.abilities.dynamicvalue.common.DevotionCount;
|
||||
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
|
@ -22,10 +21,9 @@ public final class KlothyssDesign extends CardImpl {
|
|||
// Creatures you control get +X/+X until end of turn, where X is your devotion to green.
|
||||
this.getSpellAbility().addEffect(new BoostControlledEffect(
|
||||
DevotionCount.G, DevotionCount.G, Duration.EndOfTurn,
|
||||
StaticFilters.FILTER_PERMANENT_CREATURES,
|
||||
false, true
|
||||
StaticFilters.FILTER_PERMANENT_CREATURES, false, true
|
||||
));
|
||||
this.getSpellAbility().addHint(new ValueHint("Devotion to green", DevotionCount.G));
|
||||
this.getSpellAbility().addHint(DevotionCount.G.getHint());
|
||||
}
|
||||
|
||||
private KlothyssDesign(final KlothyssDesign card) {
|
||||
|
|
|
|||
|
|
@ -4,11 +4,9 @@ import mage.MageInt;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.common.DevotionCount;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect;
|
||||
import mage.abilities.effects.common.continuous.MaximumHandSizeControllerEffect;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -35,9 +33,8 @@ public final class KruphixGodOfHorizons extends CardImpl {
|
|||
this.addAbility(IndestructibleAbility.getInstance());
|
||||
|
||||
// As long as your devotion to green and blue is less than seven, Kruhpix isn't a creature.
|
||||
Effect effect = new LoseCreatureTypeSourceEffect(DevotionCount.GU, 7);
|
||||
effect.setText("As long as your devotion to green and blue is less than seven, {this} isn't a creature");
|
||||
this.addAbility(new SimpleStaticAbility(effect).addHint(new ValueHint("Devotion to green and blue", DevotionCount.GU)));
|
||||
this.addAbility(new SimpleStaticAbility(new LoseCreatureTypeSourceEffect(DevotionCount.GU, 7))
|
||||
.addHint(DevotionCount.GU.getHint()));
|
||||
|
||||
// You have no maximum hand size.
|
||||
this.addAbility(new SimpleStaticAbility(new MaximumHandSizeControllerEffect(
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ import mage.abilities.SpellAbility;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.common.DevotionCount;
|
||||
import mage.abilities.effects.common.cost.CostModificationEffectImpl;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
|
|
@ -29,7 +28,7 @@ public final class MarshmistTitan extends CardImpl {
|
|||
|
||||
// Marshmist Titan costs {X} less to cast, where X is your devotion to black.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.STACK, new MarshmistTitanCostReductionEffect())
|
||||
.addHint(new ValueHint("Devotion to black", DevotionCount.B)));
|
||||
.addHint(DevotionCount.B.getHint()));
|
||||
}
|
||||
|
||||
private MarshmistTitan(final MarshmistTitan card) {
|
||||
|
|
@ -46,7 +45,7 @@ class MarshmistTitanCostReductionEffect extends CostModificationEffectImpl {
|
|||
|
||||
MarshmistTitanCostReductionEffect() {
|
||||
super(Duration.Custom, Outcome.Benefit, CostModificationType.REDUCE_COST);
|
||||
staticText = "{this} costs {X} less to cast, where X is your devotion to black. " +
|
||||
staticText = "This spell 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> ";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ import mage.abilities.dynamicvalue.common.DevotionCount;
|
|||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.abilities.keyword.ProtectionAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -48,7 +47,7 @@ public final class MasterOfWaves extends CardImpl {
|
|||
// <i>(Each {U} in the mana costs of permanents you control counts toward your devotion to blue.)</i>
|
||||
Effect effect = new CreateTokenEffect(new MasterOfWavesElementalToken(), DevotionCount.U);
|
||||
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).addHint(new ValueHint("Devotion to blue", DevotionCount.U)));
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(effect).addHint(DevotionCount.U.getHint()));
|
||||
}
|
||||
|
||||
public MasterOfWaves(final MasterOfWaves card) {
|
||||
|
|
|
|||
|
|
@ -1,33 +1,25 @@
|
|||
package mage.cards.m;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
import mage.abilities.dynamicvalue.common.DevotionCount;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.UUID;
|
||||
|
||||
import static mage.filter.StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT;
|
||||
|
||||
/**
|
||||
* @author LevelX2
|
||||
*/
|
||||
|
|
@ -45,16 +37,14 @@ public final class MogisGodOfSlaughter extends CardImpl {
|
|||
this.addAbility(IndestructibleAbility.getInstance());
|
||||
|
||||
// As long as your devotion to black and red is less than seven, Mogis isn't a creature.
|
||||
Effect effect = new LoseCreatureTypeSourceEffect(DevotionCount.BR, 7);
|
||||
effect.setText("As long as your devotion to black and red is less than seven, {this} isn't a creature");
|
||||
this.addAbility(new SimpleStaticAbility(effect).addHint(new ValueHint("Devotion to black and red", DevotionCount.BR)));
|
||||
this.addAbility(new SimpleStaticAbility(new LoseCreatureTypeSourceEffect(DevotionCount.BR, 7))
|
||||
.addHint(DevotionCount.BR.getHint()));
|
||||
|
||||
// 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"),
|
||||
new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT)),
|
||||
"Sacrifice a creature? (otherwise you get 2 damage)");
|
||||
effect.setText("Mogis deals 2 damage to that player unless they sacrifice a creature");
|
||||
Ability ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, effect, TargetController.OPPONENT, false, true);
|
||||
Ability ability = new BeginningOfUpkeepTriggeredAbility(
|
||||
Zone.BATTLEFIELD, new MogisGodOfSlaughterEffect(),
|
||||
TargetController.OPPONENT, false, true
|
||||
);
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
@ -68,76 +58,35 @@ public final class MogisGodOfSlaughter extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class DoUnlessTargetPaysCost extends OneShotEffect {
|
||||
class MogisGodOfSlaughterEffect extends OneShotEffect {
|
||||
|
||||
private final OneShotEffect executingEffect;
|
||||
private final Cost cost;
|
||||
private final String userMessage;
|
||||
|
||||
public DoUnlessTargetPaysCost(OneShotEffect effect, Cost cost) {
|
||||
this(effect, cost, null);
|
||||
MogisGodOfSlaughterEffect() {
|
||||
super(Outcome.Damage);
|
||||
staticText = "{this} deals 2 damage to that player unless they sacrifice a creature";
|
||||
}
|
||||
|
||||
public DoUnlessTargetPaysCost(OneShotEffect effect, Cost cost, String userMessage) {
|
||||
super(Outcome.Benefit);
|
||||
this.executingEffect = effect;
|
||||
this.cost = cost;
|
||||
this.userMessage = userMessage;
|
||||
}
|
||||
|
||||
public DoUnlessTargetPaysCost(final DoUnlessTargetPaysCost effect) {
|
||||
private MogisGodOfSlaughterEffect(final MogisGodOfSlaughterEffect effect) {
|
||||
super(effect);
|
||||
this.executingEffect = (OneShotEffect) effect.executingEffect.copy();
|
||||
this.cost = effect.cost.copy();
|
||||
this.userMessage = effect.userMessage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MogisGodOfSlaughterEffect copy() {
|
||||
return new MogisGodOfSlaughterEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(targetPointer.getFirst(game, source));
|
||||
MageObject mageObject = game.getObject(source.getSourceId());
|
||||
if (player != null && mageObject != null) {
|
||||
String message = userMessage;
|
||||
if (message == null) {
|
||||
message = getCostText() + " to prevent " + executingEffect.getText(source.getModes().getMode()) + '?';
|
||||
}
|
||||
message = CardUtil.replaceSourceName(message, mageObject.getLogName());
|
||||
cost.clearPaid();
|
||||
if (cost.canPay(source, source.getSourceId(), player.getId(), game) && player.chooseUse(executingEffect.getOutcome(), message, source, game)) {
|
||||
cost.pay(source, game, source.getSourceId(), player.getId(), false, null);
|
||||
}
|
||||
if (!cost.isPaid()) {
|
||||
executingEffect.setTargetPointer(this.targetPointer);
|
||||
return executingEffect.apply(game, source);
|
||||
}
|
||||
return true;
|
||||
Player player = game.getPlayer(game.getActivePlayerId());
|
||||
if (player == null || game.getBattlefield().countAll(StaticFilters.FILTER_PERMANENT_CREATURE, game.getActivePlayerId(), game) == 0) {
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
if (!staticText.isEmpty()) {
|
||||
return staticText;
|
||||
TargetPermanent target = new TargetControlledCreaturePermanent(1);
|
||||
target.setNotTarget(true);
|
||||
if (!player.chooseUse(outcome, "Sacrifice a creature to prevent 2 damage?", source, game)
|
||||
|| !player.choose(outcome, target, source.getSourceId(), game)) {
|
||||
return player.damage(2, source.getSourceId(), game) > 0;
|
||||
}
|
||||
return executingEffect.getText(mode) + "unless they" +
|
||||
getCostText();
|
||||
Permanent permanent = game.getPermanent(target.getFirstTarget());
|
||||
return permanent != null && permanent.sacrifice(source.getSourceId(), game);
|
||||
}
|
||||
|
||||
private String getCostText() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
String costText = cost.getText();
|
||||
if (costText != null
|
||||
&& !costText.toLowerCase(Locale.ENGLISH).startsWith("discard")
|
||||
&& !costText.toLowerCase(Locale.ENGLISH).startsWith("sacrifice")
|
||||
&& !costText.toLowerCase(Locale.ENGLISH).startsWith("remove")) {
|
||||
sb.append("pay ");
|
||||
}
|
||||
return sb.append(costText).toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public DoUnlessTargetPaysCost copy() {
|
||||
return new DoUnlessTargetPaysCost(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -5,7 +5,6 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.DevotionCount;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.abilities.keyword.IntimidateAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -44,7 +43,7 @@ public final class MogissMarauder extends CardImpl {
|
|||
"and haste until end of turn, where X is your devotion to black"
|
||||
));
|
||||
ability.setTargetAdjuster(MogissMarauderAdjuster.instance);
|
||||
ability.addHint(new ValueHint("Devotion to black", DevotionCount.B));
|
||||
ability.addHint(DevotionCount.B.getHint());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import mage.abilities.costs.common.TapSourceCost;
|
|||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.dynamicvalue.common.DevotionCount;
|
||||
import mage.abilities.effects.common.ManaEffect;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.abilities.mana.ActivatedManaAbilityImpl;
|
||||
import mage.abilities.mana.ColorlessManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -34,14 +33,9 @@ public final class NykthosShrineToNyx extends CardImpl {
|
|||
|
||||
// {T}: Add {C}.
|
||||
this.addAbility(new ColorlessManaAbility());
|
||||
|
||||
// {2}, {T}: Choose a color. Add an amount of mana of that color equal to your devotion to that color.
|
||||
Ability ability = new NykthosShrineToNyxManaAbility();
|
||||
ability.addHint(new ValueHint("Devotion to white", DevotionCount.W));
|
||||
ability.addHint(new ValueHint("Devotion to blue", DevotionCount.U));
|
||||
ability.addHint(new ValueHint("Devotion to black", DevotionCount.B));
|
||||
ability.addHint(new ValueHint("Devotion to red", DevotionCount.R));
|
||||
ability.addHint(new ValueHint("Devotion to green", DevotionCount.G));
|
||||
this.addAbility(ability);
|
||||
this.addAbility(new NykthosShrineToNyxManaAbility());
|
||||
}
|
||||
|
||||
private NykthosShrineToNyx(final NykthosShrineToNyx card) {
|
||||
|
|
@ -59,6 +53,11 @@ class NykthosShrineToNyxManaAbility extends ActivatedManaAbilityImpl {
|
|||
NykthosShrineToNyxManaAbility() {
|
||||
super(Zone.BATTLEFIELD, new NykthosDynamicManaEffect(), new GenericManaCost(2));
|
||||
this.addCost(new TapSourceCost());
|
||||
this.addHint(DevotionCount.W.getHint());
|
||||
this.addHint(DevotionCount.U.getHint());
|
||||
this.addHint(DevotionCount.B.getHint());
|
||||
this.addHint(DevotionCount.R.getHint());
|
||||
this.addHint(DevotionCount.G.getHint());
|
||||
}
|
||||
|
||||
private NykthosShrineToNyxManaAbility(final NykthosShrineToNyxManaAbility ability) {
|
||||
|
|
|
|||
|
|
@ -6,11 +6,9 @@ import mage.abilities.common.SimpleActivatedAbility;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.common.DevotionCount;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
||||
import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -41,9 +39,8 @@ public final class NyleaGodOfTheHunt extends CardImpl {
|
|||
this.addAbility(IndestructibleAbility.getInstance());
|
||||
|
||||
// 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 effect = new LoseCreatureTypeSourceEffect(DevotionCount.G, 5);
|
||||
effect.setText("As long as your devotion to green is less than five, {this} isn't a creature.");
|
||||
this.addAbility(new SimpleStaticAbility(effect).addHint(new ValueHint("Devotion to green", DevotionCount.G)));
|
||||
this.addAbility(new SimpleStaticAbility(new LoseCreatureTypeSourceEffect(DevotionCount.G, 5))
|
||||
.addHint(DevotionCount.G.getHint()));
|
||||
|
||||
// Other creatures you control have trample.
|
||||
this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect(
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import mage.MageInt;
|
|||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.DevotionCount;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
|
@ -28,7 +27,7 @@ public final class NyleasDisciple extends CardImpl {
|
|||
// When Nylea's Disciple enters the battlefield, you gain life equal to your devotion to green.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(
|
||||
new GainLifeEffect(DevotionCount.G).setText("you gain life equal to your devotion to green")
|
||||
).addHint(new ValueHint("Devotion to green", DevotionCount.G)));
|
||||
).addHint(DevotionCount.G.getHint()));
|
||||
}
|
||||
|
||||
private NyleasDisciple(final NyleasDisciple card) {
|
||||
|
|
|
|||
|
|
@ -6,10 +6,8 @@ import mage.abilities.common.SimpleActivatedAbility;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.common.DevotionCount;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -42,9 +40,8 @@ public final class PharikaGodOfAffliction extends CardImpl {
|
|||
this.addAbility(IndestructibleAbility.getInstance());
|
||||
|
||||
// As long as your devotion to black and green is less than seven, Pharika isn't a creature.
|
||||
Effect effect = new LoseCreatureTypeSourceEffect(DevotionCount.BG, 7);
|
||||
effect.setText("As long as your devotion to black and green is less than seven, {this} isn't a creature");
|
||||
this.addAbility(new SimpleStaticAbility(effect).addHint(new ValueHint("Devotion to black and green", DevotionCount.BG)));
|
||||
this.addAbility(new SimpleStaticAbility(new LoseCreatureTypeSourceEffect(DevotionCount.BG, 7))
|
||||
.addHint(DevotionCount.BG.getHint()));
|
||||
|
||||
// {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(new PharikaExileEffect(), new ManaCostsImpl("{B}{G}"));
|
||||
|
|
|
|||
|
|
@ -7,11 +7,9 @@ import mage.abilities.common.SimpleStaticAbility;
|
|||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.dynamicvalue.common.DevotionCount;
|
||||
import mage.abilities.dynamicvalue.common.SourcePermanentToughnessValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.PutTopCardOfLibraryIntoGraveTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
||||
import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -41,9 +39,8 @@ public final class PhenaxGodOfDeception extends CardImpl {
|
|||
this.addAbility(IndestructibleAbility.getInstance());
|
||||
|
||||
// As long as your devotion to blue and black is less than seven, Phenax isn't a creature.
|
||||
Effect effect = new LoseCreatureTypeSourceEffect(DevotionCount.UB, 7);
|
||||
effect.setText("As long as your devotion to blue and black is less than seven, {this} isn't a creature");
|
||||
this.addAbility(new SimpleStaticAbility(effect).addHint(new ValueHint("Devotion to blue and black", DevotionCount.UB)));
|
||||
this.addAbility(new SimpleStaticAbility(new LoseCreatureTypeSourceEffect(DevotionCount.UB, 7))
|
||||
.addHint(DevotionCount.UB.getHint()));
|
||||
|
||||
// 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."
|
||||
Ability ability = new SimpleActivatedAbility(
|
||||
|
|
@ -59,7 +56,7 @@ public final class PhenaxGodOfDeception extends CardImpl {
|
|||
));
|
||||
}
|
||||
|
||||
public PhenaxGodOfDeception(final PhenaxGodOfDeception card) {
|
||||
private PhenaxGodOfDeception(final PhenaxGodOfDeception card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,15 +6,14 @@ import mage.abilities.common.SimpleActivatedAbility;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.common.DevotionCount;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DamagePlayersEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
||||
import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
|
||||
|
|
@ -25,7 +24,7 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class PurphorosGodOfTheForge extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another creature");
|
||||
private static final FilterPermanent filter = new FilterCreaturePermanent("another creature");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
|
|
@ -44,9 +43,8 @@ public final class PurphorosGodOfTheForge extends CardImpl {
|
|||
this.addAbility(IndestructibleAbility.getInstance());
|
||||
|
||||
// As long as your devotion to red is less than five, Purphoros isn't a creature.
|
||||
Effect effect = new LoseCreatureTypeSourceEffect(DevotionCount.R, 5);
|
||||
effect.setText("As long as your devotion to red is less than five, {this} isn't a creature.");
|
||||
this.addAbility(new SimpleStaticAbility(effect).addHint(new ValueHint("Devotion to red", DevotionCount.R)));
|
||||
this.addAbility(new SimpleStaticAbility(new LoseCreatureTypeSourceEffect(DevotionCount.R, 5))
|
||||
.addHint(DevotionCount.R.getHint()));
|
||||
|
||||
// Whenever another creature enters the battlefield under your control, Purphoros deals 2 damage to each opponent.
|
||||
this.addAbility(new EntersBattlefieldControlledTriggeredAbility(
|
||||
|
|
@ -59,7 +57,7 @@ public final class PurphorosGodOfTheForge extends CardImpl {
|
|||
));
|
||||
}
|
||||
|
||||
public PurphorosGodOfTheForge(final PurphorosGodOfTheForge card) {
|
||||
private PurphorosGodOfTheForge(final PurphorosGodOfTheForge card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import mage.MageInt;
|
|||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.DevotionCount;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
|
@ -29,10 +28,10 @@ public final class ReverentHunter extends CardImpl {
|
|||
// 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), DevotionCount.G, true
|
||||
)).addHint(new ValueHint("Devotion to green", DevotionCount.G)));
|
||||
)).addHint(DevotionCount.G.getHint()));
|
||||
}
|
||||
|
||||
public ReverentHunter(final ReverentHunter card) {
|
||||
private ReverentHunter(final ReverentHunter card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import mage.abilities.dynamicvalue.common.DevotionCount;
|
|||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.LoseLifeSourceControllerEffect;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
|
@ -26,7 +25,7 @@ public final class Sanguimancy extends CardImpl {
|
|||
effect = new LoseLifeSourceControllerEffect(DevotionCount.B);
|
||||
effect.setText("and you lose X life, where X is your devotion to black");
|
||||
this.getSpellAbility().addEffect(effect);
|
||||
this.getSpellAbility().addHint(new ValueHint("Devotion to black", DevotionCount.B));
|
||||
this.getSpellAbility().addHint(DevotionCount.B.getHint());
|
||||
}
|
||||
|
||||
public Sanguimancy(final Sanguimancy card) {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ package mage.cards.s;
|
|||
import mage.abilities.dynamicvalue.common.DevotionCount;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DamageAllEffect;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -31,7 +30,7 @@ public final class Skyreaping extends CardImpl {
|
|||
Effect effect = new DamageAllEffect(DevotionCount.G, 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>");
|
||||
this.getSpellAbility().addEffect(effect);
|
||||
this.getSpellAbility().addHint(new ValueHint("Devotion to green", DevotionCount.G));
|
||||
this.getSpellAbility().addHint(DevotionCount.G.getHint());
|
||||
}
|
||||
|
||||
public Skyreaping(final Skyreaping card) {
|
||||
|
|
|
|||
|
|
@ -7,11 +7,9 @@ import mage.abilities.common.SimpleActivatedAbility;
|
|||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.common.DevotionCount;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.combat.CantBeBlockedTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect;
|
||||
import mage.abilities.effects.keyword.ScryEffect;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -38,9 +36,8 @@ public final class ThassaGodOfTheSea extends CardImpl {
|
|||
this.addAbility(IndestructibleAbility.getInstance());
|
||||
|
||||
// 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 white.)</i>
|
||||
Effect effect = new LoseCreatureTypeSourceEffect(DevotionCount.U, 5);
|
||||
effect.setText("As long as your devotion to blue is less than five, {this} isn't a creature.");
|
||||
this.addAbility(new SimpleStaticAbility(effect).addHint(new ValueHint("Devotion to blue", DevotionCount.U)));
|
||||
this.addAbility(new SimpleStaticAbility(new LoseCreatureTypeSourceEffect(DevotionCount.U, 5))
|
||||
.addHint(DevotionCount.U.getHint()));
|
||||
|
||||
// At the beginning of your upkeep, scry 1.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ package mage.cards.t;
|
|||
|
||||
import mage.abilities.dynamicvalue.common.DevotionCount;
|
||||
import mage.abilities.effects.common.CounterUnlessPaysEffect;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
|
@ -21,10 +20,10 @@ public final class ThassasRebuff extends CardImpl {
|
|||
// Counter target spell unless its controller pays {X}, where X is your devotion to blue.
|
||||
this.getSpellAbility().addEffect(new CounterUnlessPaysEffect(DevotionCount.U));
|
||||
this.getSpellAbility().addTarget(new TargetSpell());
|
||||
this.getSpellAbility().addHint(new ValueHint("Devotion to blue", DevotionCount.U));
|
||||
this.getSpellAbility().addHint(DevotionCount.U.getHint());
|
||||
}
|
||||
|
||||
public ThassasRebuff(final ThassasRebuff card) {
|
||||
private ThassasRebuff(final ThassasRebuff card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import mage.abilities.dynamicvalue.common.DevotionCount;
|
|||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.abilities.keyword.EnchantAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -37,10 +36,10 @@ public final class ThunderousMight extends CardImpl {
|
|||
effect.setText("it gets +X/+0 until end of turn, where X is your devotion to red");
|
||||
effect.setLockedIn(true);
|
||||
this.addAbility(new AttacksAttachedTriggeredAbility(effect, AttachmentType.AURA, false)
|
||||
.addHint(new ValueHint("Devotion to red", DevotionCount.R)));
|
||||
.addHint(DevotionCount.R.getHint()));
|
||||
}
|
||||
|
||||
public ThunderousMight(final ThunderousMight card) {
|
||||
private ThunderousMight(final ThunderousMight card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,23 +5,21 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.BeginningOfCombatTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.common.DevotionCount;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.LoseCreatureTypeSourceEffect;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -30,7 +28,8 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class XenagosGodOfRevels extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another target creature you control");
|
||||
private static final FilterPermanent filter
|
||||
= new FilterControlledCreaturePermanent("another target creature you control");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
|
|
@ -48,18 +47,19 @@ public final class XenagosGodOfRevels extends CardImpl {
|
|||
this.addAbility(IndestructibleAbility.getInstance());
|
||||
|
||||
// As long as your devotion to red and green is less than seven, Xenagos isn't a creature.
|
||||
Effect effect = new LoseCreatureTypeSourceEffect(DevotionCount.RG, 7);
|
||||
effect.setText("As long as your devotion to red and green is less than seven, {this} isn't a creature");
|
||||
this.addAbility(new SimpleStaticAbility(effect).addHint(new ValueHint("Devotion to red and green", DevotionCount.RG)));
|
||||
this.addAbility(new SimpleStaticAbility(new LoseCreatureTypeSourceEffect(DevotionCount.RG, 7))
|
||||
.addHint(DevotionCount.RG.getHint()));
|
||||
|
||||
// At the beginning of combat on your turn, another target creature you control gains haste and gets +X/+X until end of turn, where X is that creature's power.
|
||||
effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn);
|
||||
effect.setText("another target creature you control gains haste");
|
||||
Ability ability = new BeginningOfCombatTriggeredAbility(
|
||||
Zone.BATTLEFIELD, effect, TargetController.YOU, false, false
|
||||
Zone.BATTLEFIELD,
|
||||
new GainAbilityTargetEffect(
|
||||
HasteAbility.getInstance(), Duration.EndOfTurn
|
||||
).setText("another target creature you control gains haste"),
|
||||
TargetController.YOU, false, false
|
||||
);
|
||||
ability.addEffect(new XenagosGodOfRevelsEffect());
|
||||
ability.addTarget(new TargetControlledCreaturePermanent(1, 1, filter, false));
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
@ -95,9 +95,10 @@ class XenagosGodOfRevelsEffect extends OneShotEffect {
|
|||
if (targetCreature == null) {
|
||||
return false;
|
||||
}
|
||||
ContinuousEffect effect = new BoostTargetEffect(targetCreature.getPower().getValue(), targetCreature.getPower().getValue(), Duration.EndOfTurn);
|
||||
effect.setTargetPointer(this.getTargetPointer());
|
||||
game.addEffect(effect, source);
|
||||
int power = targetCreature.getPower().getValue();
|
||||
game.addEffect(new BoostTargetEffect(
|
||||
power, power, Duration.EndOfTurn
|
||||
).setTargetPointer(this.getTargetPointer()), source);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue