1
0
Fork 0
mirror of https://github.com/correl/mage.git synced 2025-04-13 17:00:09 -09:00

Simplified effects by removing unnecessary getText instances. ()

This commit is contained in:
Alex Vasile 2022-09-09 12:02:22 -04:00 committed by GitHub
parent 076c55f1ea
commit 092f3c3fe1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
83 changed files with 134 additions and 677 deletions
Mage.Sets/src/mage/cards
Mage/src/main/java/mage/abilities

View file

@ -89,6 +89,7 @@ class ActOfAuthorityGainControlEffect extends ContinuousEffectImpl {
public ActOfAuthorityGainControlEffect(Duration duration, UUID controller) { public ActOfAuthorityGainControlEffect(Duration duration, UUID controller) {
super(duration, Layer.ControlChangingEffects_2, SubLayer.NA, Outcome.GainControl); super(duration, Layer.ControlChangingEffects_2, SubLayer.NA, Outcome.GainControl);
this.controller = controller; this.controller = controller;
this.staticText = "Gain control of {this}";
} }
private ActOfAuthorityGainControlEffect(final ActOfAuthorityGainControlEffect effect) { private ActOfAuthorityGainControlEffect(final ActOfAuthorityGainControlEffect effect) {
@ -114,9 +115,4 @@ class ActOfAuthorityGainControlEffect extends ContinuousEffectImpl {
return permanent.changeControllerId(controller, game, source); return permanent.changeControllerId(controller, game, source);
} }
@Override
public String getText(Mode mode) {
return "Gain control of {this}";
}
} }

View file

@ -27,7 +27,7 @@ public final class AetherBurst extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}"); super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}");
// Return up to X target creatures to their owners' hands, where X is one plus the number of cards named Aether Burst in all graveyards as you cast Aether Burst. // Return up to X target creatures to their owners' hands, where X is one plus the number of cards named Aether Burst in all graveyards as you cast Aether Burst.
this.getSpellAbility().addEffect(new DynamicReturnToHandTargetEffect()); this.getSpellAbility().addEffect(new ReturnToHandTargetEffect().setText("Return up to X target creatures to their owners' hands, where X is one plus the number of cards named Aether Burst in all graveyards as you cast Aether Burst"));
this.getSpellAbility().addTarget(new DynamicTargetCreaturePermanent()); this.getSpellAbility().addTarget(new DynamicTargetCreaturePermanent());
this.getSpellAbility().setTargetAdjuster(AetherBurstAdjuster.instance); this.getSpellAbility().setTargetAdjuster(AetherBurstAdjuster.instance);
} }
@ -91,28 +91,3 @@ class DynamicTargetCreaturePermanent extends TargetPermanent {
} }
} }
/**
* We extend ReturnToHandTargetEffect class just to override the rules.
*/
class DynamicReturnToHandTargetEffect extends ReturnToHandTargetEffect {
public DynamicReturnToHandTargetEffect() {
super();
}
public DynamicReturnToHandTargetEffect(final DynamicReturnToHandTargetEffect effect) {
super(effect);
}
@Override
public DynamicReturnToHandTargetEffect copy() {
return new DynamicReturnToHandTargetEffect(this);
}
@Override
public String getText(Mode mode) {
return "Return up to X target creatures to their owners' hands, where X is one plus the number of cards named Aether Burst in all graveyards as you cast Aether Burst";
}
}

View file

@ -95,6 +95,7 @@ class AkroanHorseGainControlEffect extends ContinuousEffectImpl {
public AkroanHorseGainControlEffect(Duration duration, UUID controller) { public AkroanHorseGainControlEffect(Duration duration, UUID controller) {
super(duration, Layer.ControlChangingEffects_2, SubLayer.NA, Outcome.GainControl); super(duration, Layer.ControlChangingEffects_2, SubLayer.NA, Outcome.GainControl);
this.controller = controller; this.controller = controller;
this.staticText = "Gain control of Akroan Horse";
} }
public AkroanHorseGainControlEffect(final AkroanHorseGainControlEffect effect) { public AkroanHorseGainControlEffect(final AkroanHorseGainControlEffect effect) {
@ -122,11 +123,6 @@ class AkroanHorseGainControlEffect extends ContinuousEffectImpl {
return permanent.changeControllerId(controller, game, source); return permanent.changeControllerId(controller, game, source);
} }
@Override
public String getText(Mode mode) {
return "Gain control of Akroan Horse";
}
} }
class AkroanHorseCreateTokenEffect extends OneShotEffect { class AkroanHorseCreateTokenEffect extends OneShotEffect {

View file

@ -46,6 +46,7 @@ class AnZerrinRuinsDontUntapEffect extends DontUntapInControllersUntapStepAllEff
public AnZerrinRuinsDontUntapEffect() { public AnZerrinRuinsDontUntapEffect() {
super(Duration.WhileOnBattlefield, TargetController.ANY, new FilterCreaturePermanent()); super(Duration.WhileOnBattlefield, TargetController.ANY, new FilterCreaturePermanent());
this.staticText = "Creatures of the chosen type don't untap during their controllers' untap steps";
} }
public AnZerrinRuinsDontUntapEffect(final AnZerrinRuinsDontUntapEffect effect) { public AnZerrinRuinsDontUntapEffect(final AnZerrinRuinsDontUntapEffect effect) {
@ -69,9 +70,4 @@ class AnZerrinRuinsDontUntapEffect extends DontUntapInControllersUntapStepAllEff
} }
return false; return false;
} }
@Override
public String getText(Mode mode) {
return "Creatures of the chosen type don't untap during their controllers' untap steps";
}
} }

View file

@ -42,17 +42,13 @@ class AncientRunesDamageTargetEffect extends OneShotEffect {
public AncientRunesDamageTargetEffect() { public AncientRunesDamageTargetEffect() {
super(Outcome.Damage); super(Outcome.Damage);
this.staticText = "{this} deals damage to that player equal to the number of artifacts they control";
} }
public AncientRunesDamageTargetEffect(AncientRunesDamageTargetEffect copy) { public AncientRunesDamageTargetEffect(AncientRunesDamageTargetEffect copy) {
super(copy); super(copy);
} }
@Override
public String getText(Mode mode) {
return "{this} deals damage to that player equal to the number of artifacts they control";
}
@Override @Override
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(targetPointer.getFirst(game, source)); Player player = game.getPlayer(targetPointer.getFirst(game, source));

View file

@ -54,6 +54,7 @@ class AwakenerDruidBecomesCreatureEffect extends BecomesCreatureTargetEffect {
public AwakenerDruidBecomesCreatureEffect() { public AwakenerDruidBecomesCreatureEffect() {
super(new AwakenerDruidToken(), false, true, Duration.WhileOnBattlefield); super(new AwakenerDruidToken(), false, true, Duration.WhileOnBattlefield);
this.staticText = "target Forest becomes a 4/5 green Treefolk creature for as long as {this} remains on the battlefield. It's still a land";
} }
public AwakenerDruidBecomesCreatureEffect(final AwakenerDruidBecomesCreatureEffect effect) { public AwakenerDruidBecomesCreatureEffect(final AwakenerDruidBecomesCreatureEffect effect) {
@ -74,11 +75,6 @@ class AwakenerDruidBecomesCreatureEffect extends BecomesCreatureTargetEffect {
} }
return super.apply(layer, sublayer, source, game); return super.apply(layer, sublayer, source, game);
} }
@Override
public String getText(Mode mode) {
return "target Forest becomes a 4/5 green Treefolk creature for as long as {this} remains on the battlefield. It's still a land";
}
} }
class AwakenerDruidToken extends TokenImpl { class AwakenerDruidToken extends TokenImpl {

View file

@ -56,6 +56,7 @@ class BanewaspAfflictionLoseLifeEffect extends OneShotEffect {
public BanewaspAfflictionLoseLifeEffect() { public BanewaspAfflictionLoseLifeEffect() {
super(Outcome.LoseLife); super(Outcome.LoseLife);
this.staticText = "that creature's controller loses life equal to its toughness";
} }
public BanewaspAfflictionLoseLifeEffect(BanewaspAfflictionLoseLifeEffect copy) { public BanewaspAfflictionLoseLifeEffect(BanewaspAfflictionLoseLifeEffect copy) {
@ -80,10 +81,4 @@ class BanewaspAfflictionLoseLifeEffect extends OneShotEffect {
} }
return false; return false;
} }
@Override
public String getText(Mode mode) {
return "that creature's controller loses life equal to its toughness";
}
} }

View file

@ -69,8 +69,11 @@ public final class CartoucheOfStrength extends CardImpl {
* @author stravant * @author stravant
*/ */
class FightEnchantedTargetEffect extends OneShotEffect { class FightEnchantedTargetEffect extends OneShotEffect {
public FightEnchantedTargetEffect() { public FightEnchantedTargetEffect() {
super(Outcome.Damage); super(Outcome.Damage);
this.staticText = "you may have enchanted creature fight target creature an opponent controls. " +
"<i>(Each deals damage equal to its power to the other.)</i>";
} }
public FightEnchantedTargetEffect(final FightEnchantedTargetEffect effect) { public FightEnchantedTargetEffect(final FightEnchantedTargetEffect effect) {
@ -105,11 +108,4 @@ class FightEnchantedTargetEffect extends OneShotEffect {
public FightEnchantedTargetEffect copy() { public FightEnchantedTargetEffect copy() {
return new FightEnchantedTargetEffect(this); return new FightEnchantedTargetEffect(this);
} }
@Override
public String getText(Mode mode) {
return "you may have enchanted creature fight target creature an opponent controls. " +
"<i>(Each deals damage equal to its power to the other.)</i>";
}
} }

View file

@ -50,6 +50,7 @@ class ChainOfSilenceEffect extends OneShotEffect {
public ChainOfSilenceEffect() { public ChainOfSilenceEffect() {
super(Outcome.PreventDamage); super(Outcome.PreventDamage);
this.staticText = "Prevent all damage target creature would deal this turn. That creature's controller may sacrifice a land. If the player does, they may copy this spell and may choose a new target for that copy";
} }
public ChainOfSilenceEffect(final ChainOfSilenceEffect effect) { public ChainOfSilenceEffect(final ChainOfSilenceEffect effect) {
@ -90,10 +91,4 @@ class ChainOfSilenceEffect extends OneShotEffect {
return false; return false;
} }
@Override
public String getText(Mode mode) {
return "Prevent all damage target creature would deal this turn. That creature's controller may sacrifice a land. If the player does, they may copy this spell and may choose a new target for that copy";
}
} }

View file

@ -47,6 +47,7 @@ class ChainOfVaporEffect extends OneShotEffect {
public ChainOfVaporEffect() { public ChainOfVaporEffect() {
super(Outcome.ReturnToHand); super(Outcome.ReturnToHand);
this.staticText = "Return target nonland permanent to its owner's hand. Then that permanent's controller may sacrifice a land. If the player does, they may copy this spell and may choose a new target for that copy";
} }
public ChainOfVaporEffect(final ChainOfVaporEffect effect) { public ChainOfVaporEffect(final ChainOfVaporEffect effect) {
@ -86,10 +87,4 @@ class ChainOfVaporEffect extends OneShotEffect {
return false; return false;
} }
@Override
public String getText(Mode mode) {
return "Return target nonland permanent to its owner's hand. Then that permanent's controller may sacrifice a land. If the player does, they may copy this spell and may choose a new target for that copy";
}
} }

View file

@ -49,6 +49,7 @@ class ChainStasisEffect extends OneShotEffect {
public ChainStasisEffect() { public ChainStasisEffect() {
super(Outcome.Benefit); super(Outcome.Benefit);
this.staticText = "You may tap or untap target creature. Then that creature's controller may pay {2}{U}. If the player does, they may copy this spell and may choose a new target for that copy";
} }
public ChainStasisEffect(final ChainStasisEffect effect) { public ChainStasisEffect(final ChainStasisEffect effect) {
@ -90,11 +91,4 @@ class ChainStasisEffect extends OneShotEffect {
return false; return false;
} }
@Override
public String getText(Mode mode
) {
return "You may tap or untap target creature. Then that creature's controller may pay {2}{U}. If the player does, they may copy this spell and may choose a new target for that copy";
}
} }

View file

@ -45,6 +45,7 @@ class ChastiseEffect extends OneShotEffect {
public ChastiseEffect() { public ChastiseEffect() {
super(Outcome.GainLife); super(Outcome.GainLife);
this.staticText = "You gain life equal to its power";
} }
public ChastiseEffect(final ChastiseEffect effect) { public ChastiseEffect(final ChastiseEffect effect) {
@ -69,9 +70,4 @@ class ChastiseEffect extends OneShotEffect {
} }
return false; return false;
} }
@Override
public String getText(Mode mode) {
return "You gain life equal to its power";
}
} }

View file

@ -54,6 +54,7 @@ class CitadelOfPainEffect extends OneShotEffect {
public CitadelOfPainEffect() { public CitadelOfPainEffect() {
super(Outcome.Damage); super(Outcome.Damage);
this.staticText = "{this} deals X damage to that player, where X is the number of untapped lands they control.";
} }
private CitadelOfPainEffect(final CitadelOfPainEffect effect) { private CitadelOfPainEffect(final CitadelOfPainEffect effect) {
@ -75,9 +76,4 @@ class CitadelOfPainEffect extends OneShotEffect {
public CitadelOfPainEffect copy() { public CitadelOfPainEffect copy() {
return new CitadelOfPainEffect(this); return new CitadelOfPainEffect(this);
} }
@Override
public String getText(Mode mode) {
return "{this} deals X damage to that player, where X is the number of untapped lands they control.";
}
} }

View file

@ -45,7 +45,7 @@ public final class CloakingDevice extends CardImpl {
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantBeBlockedAttachedEffect(AttachmentType.AURA))); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantBeBlockedAttachedEffect(AttachmentType.AURA)));
// Whenever enchanted creature attacks, defending player loses 1 life. // Whenever enchanted creature attacks, defending player loses 1 life.
this.addAbility(new AttacksAttachedTriggeredAbility(new CloakingDeviceLoseLifeDefendingPlayerEffect(1, true), AttachmentType.AURA, false)); this.addAbility(new AttacksAttachedTriggeredAbility(new CloakingDeviceLoseLifeDefendingPlayerEffect(), AttachmentType.AURA, false));
} }
@ -61,29 +61,13 @@ public final class CloakingDevice extends CardImpl {
class CloakingDeviceLoseLifeDefendingPlayerEffect extends OneShotEffect { class CloakingDeviceLoseLifeDefendingPlayerEffect extends OneShotEffect {
private DynamicValue amount; public CloakingDeviceLoseLifeDefendingPlayerEffect() {
private boolean attackerIsSource;
/**
*
* @param amount
* @param attackerIsSource true if the source.getSourceId() contains the
* attacker false if attacker has to be taken from targetPointer
*/
public CloakingDeviceLoseLifeDefendingPlayerEffect(int amount, boolean attackerIsSource) {
this(StaticValue.get(amount), attackerIsSource);
}
public CloakingDeviceLoseLifeDefendingPlayerEffect(DynamicValue amount, boolean attackerIsSource) {
super(Outcome.Damage); super(Outcome.Damage);
this.amount = amount; this.staticText = "defending player loses 1 life";
this.attackerIsSource = attackerIsSource;
} }
public CloakingDeviceLoseLifeDefendingPlayerEffect(final CloakingDeviceLoseLifeDefendingPlayerEffect effect) { public CloakingDeviceLoseLifeDefendingPlayerEffect(final CloakingDeviceLoseLifeDefendingPlayerEffect effect) {
super(effect); super(effect);
this.amount = effect.amount.copy();
this.attackerIsSource = effect.attackerIsSource;
} }
@Override @Override
@ -102,15 +86,9 @@ class CloakingDeviceLoseLifeDefendingPlayerEffect extends OneShotEffect {
if (enchantment != null && enchantment.getAttachedTo() != null) { if (enchantment != null && enchantment.getAttachedTo() != null) {
Player defender = game.getPlayer(game.getCombat().getDefendingPlayerId(enchantment.getAttachedTo(), game)); Player defender = game.getPlayer(game.getCombat().getDefendingPlayerId(enchantment.getAttachedTo(), game));
if (defender != null) { if (defender != null) {
defender.loseLife(amount.calculate(game, source, this), game, source, false); defender.loseLife(1, game, source, false);
} }
} }
return true; return true;
} }
@Override
public String getText(Mode mode) {
return "defending player loses " + amount + " life";
}
} }

View file

@ -50,17 +50,13 @@ class ColdSnapDamageTargetEffect extends OneShotEffect {
public ColdSnapDamageTargetEffect() { public ColdSnapDamageTargetEffect() {
super(Outcome.Damage); super(Outcome.Damage);
this.staticText = "{this} deals damage to that player equal to the number of snow lands they control";
} }
public ColdSnapDamageTargetEffect(ColdSnapDamageTargetEffect copy) { public ColdSnapDamageTargetEffect(ColdSnapDamageTargetEffect copy) {
super(copy); super(copy);
} }
@Override
public String getText(Mode mode) {
return "{this} deals damage to that player equal to the number of snow lands they control";
}
@Override @Override
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(targetPointer.getFirst(game, source)); Player player = game.getPlayer(targetPointer.getFirst(game, source));

View file

@ -95,6 +95,7 @@ class ContestedWarZoneEffect extends ContinuousEffectImpl {
public ContestedWarZoneEffect() { public ContestedWarZoneEffect() {
super(Duration.Custom, Layer.ControlChangingEffects_2, SubLayer.NA, Outcome.GainControl); super(Duration.Custom, Layer.ControlChangingEffects_2, SubLayer.NA, Outcome.GainControl);
this.staticText = "Gain control of {this}";
} }
public ContestedWarZoneEffect(final ContestedWarZoneEffect effect) { public ContestedWarZoneEffect(final ContestedWarZoneEffect effect) {
@ -117,9 +118,4 @@ class ContestedWarZoneEffect extends ContinuousEffectImpl {
} }
return false; return false;
} }
@Override
public String getText(Mode mode) {
return "Gain control of {this}";
}
} }

View file

@ -24,7 +24,7 @@ public final class CranialExtraction extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{B}"); super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{B}");
this.subtype.add(SubType.ARCANE); this.subtype.add(SubType.ARCANE);
/* Name a nonland card. Search target player's graveyard, hand, and library for /* Choose a nonland card. Search target player's graveyard, hand, and library for
* all cards with that name and exile them. Then that player shuffles their library. */ * all cards with that name and exile them. Then that player shuffles their library. */
this.getSpellAbility().addTarget(new TargetPlayer()); this.getSpellAbility().addTarget(new TargetPlayer());
this.getSpellAbility().addEffect(new CranialExtractionEffect()); this.getSpellAbility().addEffect(new CranialExtractionEffect());
@ -44,6 +44,7 @@ class CranialExtractionEffect extends SearchTargetGraveyardHandLibraryForCardNam
CranialExtractionEffect() { CranialExtractionEffect() {
super(false, "target player's", "all cards with that name"); super(false, "target player's", "all cards with that name");
this.staticText = "Choose a nonland card name. " + CardUtil.getTextWithFirstCharUpperCase(this.staticText);
} }
CranialExtractionEffect(final CranialExtractionEffect effect) { CranialExtractionEffect(final CranialExtractionEffect effect) {
@ -68,9 +69,4 @@ class CranialExtractionEffect extends SearchTargetGraveyardHandLibraryForCardNam
public CranialExtractionEffect copy() { public CranialExtractionEffect copy() {
return new CranialExtractionEffect(this); return new CranialExtractionEffect(this);
} }
@Override
public String getText(Mode mode) {
return "Choose a nonland card name. " + CardUtil.getTextWithFirstCharUpperCase(super.getText(mode));
}
} }

View file

@ -13,6 +13,7 @@ import mage.constants.Outcome;
import mage.constants.SubType; import mage.constants.SubType;
import mage.constants.TargetController; import mage.constants.TargetController;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.StaticFilters;
import mage.filter.predicate.mageobject.CommanderPredicate; import mage.filter.predicate.mageobject.CommanderPredicate;
import mage.game.Game; import mage.game.Game;
import mage.players.Player; import mage.players.Player;
@ -59,6 +60,7 @@ class CrimsonHonorGuardEffect extends OneShotEffect {
public CrimsonHonorGuardEffect() { public CrimsonHonorGuardEffect() {
super(Outcome.Damage); super(Outcome.Damage);
this.staticText = "{this} deals 4 damage to that player unless they control a commander";
} }
private CrimsonHonorGuardEffect(final CrimsonHonorGuardEffect effect) { private CrimsonHonorGuardEffect(final CrimsonHonorGuardEffect effect) {
@ -78,11 +80,6 @@ class CrimsonHonorGuardEffect extends OneShotEffect {
return false; return false;
} }
@Override
public String getText(Mode mode) {
return "{this} deals 4 damage to that player unless they control a commander";
}
@Override @Override
public CrimsonHonorGuardEffect copy() { public CrimsonHonorGuardEffect copy() {
return new CrimsonHonorGuardEffect(this); return new CrimsonHonorGuardEffect(this);

View file

@ -89,6 +89,7 @@ class CrownOfEmpiresControlEffect extends ContinuousEffectImpl {
public CrownOfEmpiresControlEffect() { public CrownOfEmpiresControlEffect() {
super(Duration.EndOfGame, Layer.ControlChangingEffects_2, SubLayer.NA, Outcome.GainControl); super(Duration.EndOfGame, Layer.ControlChangingEffects_2, SubLayer.NA, Outcome.GainControl);
this.staticText = "Gain control of {this}";
} }
public CrownOfEmpiresControlEffect(final CrownOfEmpiresControlEffect effect) { public CrownOfEmpiresControlEffect(final CrownOfEmpiresControlEffect effect) {
@ -109,9 +110,4 @@ class CrownOfEmpiresControlEffect extends ContinuousEffectImpl {
} }
return false; return false;
} }
@Override
public String getText(Mode mode) {
return "Gain control of {this}";
}
} }

View file

@ -43,6 +43,7 @@ class DeicideExileEffect extends SearchTargetGraveyardHandLibraryForCardNameAndE
DeicideExileEffect() { DeicideExileEffect() {
super(true, "its controller's", "any number of cards with the same name as that card"); super(true, "its controller's", "any number of cards with the same name as that card");
this.staticText = "Exile target enchantment. If the exiled card is a God card, " + this.staticText;
} }
private DeicideExileEffect(final DeicideExileEffect effect) { private DeicideExileEffect(final DeicideExileEffect effect) {
@ -77,9 +78,4 @@ class DeicideExileEffect extends SearchTargetGraveyardHandLibraryForCardNameAndE
public DeicideExileEffect copy() { public DeicideExileEffect copy() {
return new DeicideExileEffect(this); return new DeicideExileEffect(this);
} }
@Override
public String getText(Mode mode) {
return "Exile target enchantment. If the exiled card is a God card, " + super.getText(mode);
}
} }

View file

@ -69,6 +69,7 @@ class DimirCharmEffect extends OneShotEffect {
public DimirCharmEffect() { public DimirCharmEffect() {
super(Outcome.Benefit); super(Outcome.Benefit);
this.staticText = "look at the top three cards of target player's library, then put one back and the rest into that player's graveyard";
} }
public DimirCharmEffect(final DimirCharmEffect effect) { public DimirCharmEffect(final DimirCharmEffect effect) {
@ -100,9 +101,4 @@ class DimirCharmEffect extends OneShotEffect {
public DimirCharmEffect copy() { public DimirCharmEffect copy() {
return new DimirCharmEffect(this); return new DimirCharmEffect(this);
} }
@Override
public String getText(Mode mode) {
return "look at the top three cards of target player's library, then put one back and the rest into that player's graveyard";
}
} }

View file

@ -30,7 +30,6 @@ public final class DismissIntoDream extends CardImpl {
public DismissIntoDream(UUID ownerId, CardSetInfo setInfo) { public DismissIntoDream(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{6}{U}"); super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{6}{U}");
// Each creature your opponents control is an Illusion in addition to its other types // Each creature your opponents control is an Illusion in addition to its other types
// and has "When this creature becomes the target of a spell or ability, sacrifice it." // and has "When this creature becomes the target of a spell or ability, sacrifice it."
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DismissIntoDreamEffect(filter))); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DismissIntoDreamEffect(filter)));
@ -51,6 +50,7 @@ class DismissIntoDreamEffect extends CreaturesBecomeOtherTypeEffect {
DismissIntoDreamEffect(FilterPermanent filter) { DismissIntoDreamEffect(FilterPermanent filter) {
super(filter, SubType.ILLUSION, Duration.WhileOnBattlefield); super(filter, SubType.ILLUSION, Duration.WhileOnBattlefield);
this.outcome = Outcome.Detriment; this.outcome = Outcome.Detriment;
this.staticText = this.staticText + " and has \"When this creature becomes the target of a spell or ability, sacrifice it.\"";
} }
DismissIntoDreamEffect(final DismissIntoDreamEffect effect) { DismissIntoDreamEffect(final DismissIntoDreamEffect effect) {
@ -84,9 +84,4 @@ class DismissIntoDreamEffect extends CreaturesBecomeOtherTypeEffect {
public boolean hasLayer(Layer layer) { public boolean hasLayer(Layer layer) {
return super.hasLayer(layer) || layer == Layer.AbilityAddingRemovingEffects_6; return super.hasLayer(layer) || layer == Layer.AbilityAddingRemovingEffects_6;
} }
@Override
public String getText(Mode mode) {
return super.getText(mode) + " and has \"When this creature becomes the target of a spell or ability, sacrifice it.\"";
}
} }

View file

@ -63,6 +63,7 @@ class DisruptingShoalCounterTargetEffect extends OneShotEffect {
public DisruptingShoalCounterTargetEffect() { public DisruptingShoalCounterTargetEffect() {
super(Outcome.Detriment); super(Outcome.Detriment);
this.staticText = "Counter target spell if its mana value is X";
} }
public DisruptingShoalCounterTargetEffect(final DisruptingShoalCounterTargetEffect effect) { public DisruptingShoalCounterTargetEffect(final DisruptingShoalCounterTargetEffect effect) {
@ -95,9 +96,4 @@ class DisruptingShoalCounterTargetEffect extends OneShotEffect {
// No alternate costs payed so compare to X value // No alternate costs payed so compare to X value
return sourceAbility.getManaCostsToPay().getX() == amount; return sourceAbility.getManaCostsToPay().getX() == amount;
} }
@Override
public String getText(Mode mode) {
return "Counter target spell if its mana value is X";
}
} }

View file

@ -62,6 +62,7 @@ class DuplicantExileTargetEffect extends OneShotEffect {
public DuplicantExileTargetEffect() { public DuplicantExileTargetEffect() {
super(Outcome.Exile); super(Outcome.Exile);
this.staticText = "you may exile target nontoken creature";
} }
public DuplicantExileTargetEffect(final DuplicantExileTargetEffect effect) { public DuplicantExileTargetEffect(final DuplicantExileTargetEffect effect) {
@ -87,11 +88,6 @@ class DuplicantExileTargetEffect extends OneShotEffect {
return false; return false;
} }
@Override
public String getText(Mode mode) {
return "you may exile target nontoken creature";
}
} }
class DuplicantContinuousEffect extends ContinuousEffectImpl { class DuplicantContinuousEffect extends ContinuousEffectImpl {

View file

@ -49,6 +49,12 @@ class DustOfMomentsEffect extends OneShotEffect {
DustOfMomentsEffect(boolean remove) { DustOfMomentsEffect(boolean remove) {
super(Outcome.Benefit); super(Outcome.Benefit);
this.remove = remove; this.remove = remove;
this.staticText = (remove ? "remove" : "put") +
" two time counters " +
(remove ? "from" : "on") +
" each permanent" +
(remove ? "" : "with a time counter on it") +
" and each suspended card";
} }
private DustOfMomentsEffect(final DustOfMomentsEffect effect) { private DustOfMomentsEffect(final DustOfMomentsEffect effect) {
@ -82,17 +88,4 @@ class DustOfMomentsEffect extends OneShotEffect {
} }
return true; return true;
} }
@Override
public String getText(Mode mode) {
StringBuilder sb = new StringBuilder(remove ? "remove" : "put");
sb.append(" two time counters ");
sb.append(remove ? "from" : "on");
sb.append(" each permanent");
if (!remove) {
sb.append("with a time counter on it");
}
sb.append(" and each suspended card");
return sb.toString();
}
} }

View file

@ -50,6 +50,7 @@ class ReturnToHandAllNamedPermanentsEffect extends OneShotEffect {
public ReturnToHandAllNamedPermanentsEffect() { public ReturnToHandAllNamedPermanentsEffect() {
super(Outcome.ReturnToHand); super(Outcome.ReturnToHand);
this.staticText = "Return target nonland permanent and all other permanents with the same name as that permanent to their owners' hands";
} }
public ReturnToHandAllNamedPermanentsEffect(final ReturnToHandAllNamedPermanentsEffect effect) { public ReturnToHandAllNamedPermanentsEffect(final ReturnToHandAllNamedPermanentsEffect effect) {
@ -81,10 +82,4 @@ class ReturnToHandAllNamedPermanentsEffect extends OneShotEffect {
} }
return true; return true;
} }
@Override
public String getText(Mode mode) {
return "Return target nonland permanent and all other permanents with the same name as that permanent to their owners' hands";
}
} }

View file

@ -99,6 +99,7 @@ class FickleEfreetGainControlEffect extends ContinuousEffectImpl {
public FickleEfreetGainControlEffect(Duration duration, UUID controller) { public FickleEfreetGainControlEffect(Duration duration, UUID controller) {
super(duration, Layer.ControlChangingEffects_2, SubLayer.NA, Outcome.GainControl); super(duration, Layer.ControlChangingEffects_2, SubLayer.NA, Outcome.GainControl);
this.controller = controller; this.controller = controller;
this.staticText = "That player gains control of {this}";
} }
public FickleEfreetGainControlEffect(final FickleEfreetGainControlEffect effect) { public FickleEfreetGainControlEffect(final FickleEfreetGainControlEffect effect) {
@ -122,9 +123,4 @@ class FickleEfreetGainControlEffect extends ContinuousEffectImpl {
} }
return false; return false;
} }
@Override
public String getText(Mode mode) {
return "That player gains control of {this}";
}
} }

View file

@ -54,6 +54,7 @@ class FruitOfTheFirstTreeEffect extends OneShotEffect {
public FruitOfTheFirstTreeEffect() { public FruitOfTheFirstTreeEffect() {
super(Outcome.Benefit); super(Outcome.Benefit);
this.staticText = "you gain X life and draw X cards, where X is its toughness";
} }
public FruitOfTheFirstTreeEffect(FruitOfTheFirstTreeEffect copy) { public FruitOfTheFirstTreeEffect(FruitOfTheFirstTreeEffect copy) {
@ -76,10 +77,4 @@ class FruitOfTheFirstTreeEffect extends OneShotEffect {
} }
return false; return false;
} }
@Override
public String getText(Mode mode) {
return "you gain X life and draw X cards, where X is its toughness";
}
} }

View file

@ -54,6 +54,7 @@ class GoblinArchaeologistEffect extends OneShotEffect {
public GoblinArchaeologistEffect() { public GoblinArchaeologistEffect() {
super(Outcome.DestroyPermanent); super(Outcome.DestroyPermanent);
this.staticText = "Flip a coin. If you win the flip, destroy target artifact and untap {this}. If you lose the flip, sacrifice {this}";
} }
public GoblinArchaeologistEffect(final GoblinArchaeologistEffect ability) { public GoblinArchaeologistEffect(final GoblinArchaeologistEffect ability) {
@ -81,9 +82,4 @@ class GoblinArchaeologistEffect extends OneShotEffect {
} }
return false; return false;
} }
@Override
public String getText(Mode mode) {
return "Flip a coin. If you win the flip, destroy target artifact and untap {this}. If you lose the flip, sacrifice {this}";
}
} }

View file

@ -98,6 +98,7 @@ class GoblinFestivalGainControlEffect extends ContinuousEffectImpl {
public GoblinFestivalGainControlEffect(Duration duration, UUID controller) { public GoblinFestivalGainControlEffect(Duration duration, UUID controller) {
super(duration, Layer.ControlChangingEffects_2, SubLayer.NA, Outcome.GainControl); super(duration, Layer.ControlChangingEffects_2, SubLayer.NA, Outcome.GainControl);
this.controller = controller; this.controller = controller;
this.staticText = "That player gains control of {this}";
} }
public GoblinFestivalGainControlEffect(final GoblinFestivalGainControlEffect effect) { public GoblinFestivalGainControlEffect(final GoblinFestivalGainControlEffect effect) {
@ -121,9 +122,4 @@ class GoblinFestivalGainControlEffect extends ContinuousEffectImpl {
} }
return false; return false;
} }
@Override
public String getText(Mode mode) {
return "That player gains control of {this}";
}
} }

View file

@ -57,6 +57,7 @@ class HammerheimEffect extends ContinuousEffectImpl {
public HammerheimEffect() { public HammerheimEffect() {
super(Duration.EndOfTurn, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.LoseAbility); super(Duration.EndOfTurn, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.LoseAbility);
this.staticText = "Target creature loses all landwalk abilities until end of turn.";
} }
public HammerheimEffect(final HammerheimEffect effect) { public HammerheimEffect(final HammerheimEffect effect) {
@ -81,9 +82,4 @@ class HammerheimEffect extends ContinuousEffectImpl {
} }
return true; return true;
} }
@Override
public String getText(Mode mode) {
return "Target creature loses all landwalk abilities until end of turn.";
}
} }

View file

@ -43,6 +43,7 @@ class HonorablePassageEffect extends PreventNextDamageFromChosenSourceToTargetEf
public HonorablePassageEffect() { public HonorablePassageEffect() {
super(Duration.EndOfTurn); super(Duration.EndOfTurn);
this.staticText = "The next time a source of your choice would deal damage to any target this turn, prevent that damage. If damage from a red source is prevented this way, {this} deals that much damage to the source's controller";
} }
public HonorablePassageEffect(final HonorablePassageEffect effect) { public HonorablePassageEffect(final HonorablePassageEffect effect) {
@ -73,9 +74,4 @@ class HonorablePassageEffect extends PreventNextDamageFromChosenSourceToTargetEf
} }
return false; return false;
} }
@Override
public String getText(Mode mode) {
return "The next time a source of your choice would deal damage to any target this turn, prevent that damage. If damage from a red source is prevented this way, {this} deals that much damage to the source's controller";
}
} }

View file

@ -64,6 +64,7 @@ class HuatliWarriorPoetDamageEffect extends OneShotEffect {
HuatliWarriorPoetDamageEffect() { HuatliWarriorPoetDamageEffect() {
super(Outcome.Damage); super(Outcome.Damage);
this.staticText = "{this} deals X damage divided as you choose among any number of target creatures. Creatures dealt damage this way can't block this turn";
} }
private HuatliWarriorPoetDamageEffect(final HuatliWarriorPoetDamageEffect effect) { private HuatliWarriorPoetDamageEffect(final HuatliWarriorPoetDamageEffect effect) {
@ -91,14 +92,4 @@ class HuatliWarriorPoetDamageEffect extends OneShotEffect {
} }
return true; return true;
} }
@Override
public String getText(Mode mode) {
if (staticText != null && !staticText.isEmpty()) {
return staticText;
}
return "{this} deals X damage divided as you choose among any number of target "
+ mode.getTargets().get(0).getTargetName()
+ ". Creatures dealt damage this way can't block this turn";
}
} }

View file

@ -23,11 +23,10 @@ public final class Hydroblast extends CardImpl {
public Hydroblast(UUID ownerId, CardSetInfo setInfo) { public Hydroblast(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{U}"); super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{U}");
// Choose one - Counter target spell if it's red; // Choose one - Counter target spell if it's red;
this.getSpellAbility().addEffect(new HydroblastCounterEffect()); this.getSpellAbility().addEffect(new HydroblastCounterEffect());
this.getSpellAbility().addTarget(new TargetSpell()); this.getSpellAbility().addTarget(new TargetSpell());
// or destroy target permanent if it's red. // or destroy target permanent if it's red.
Mode mode = new Mode(new HydroblastDestroyEffect()); Mode mode = new Mode(new HydroblastDestroyEffect());
mode.addTarget(new TargetPermanent()); mode.addTarget(new TargetPermanent());
@ -48,6 +47,7 @@ class HydroblastCounterEffect extends OneShotEffect {
HydroblastCounterEffect() { HydroblastCounterEffect() {
super(Outcome.Detriment); super(Outcome.Detriment);
this.staticText = "Counter target spell if it's red";
} }
HydroblastCounterEffect(final HydroblastCounterEffect effect) { HydroblastCounterEffect(final HydroblastCounterEffect effect) {
@ -66,17 +66,13 @@ class HydroblastCounterEffect extends OneShotEffect {
} }
return true; return true;
} }
@Override
public String getText(Mode mode) {
return "Counter target spell if it's red";
}
} }
class HydroblastDestroyEffect extends OneShotEffect { class HydroblastDestroyEffect extends OneShotEffect {
HydroblastDestroyEffect() { HydroblastDestroyEffect() {
super(Outcome.DestroyPermanent); super(Outcome.DestroyPermanent);
this.staticText = "destroy target permanent if it's red";
} }
HydroblastDestroyEffect(final HydroblastDestroyEffect effect) { HydroblastDestroyEffect(final HydroblastDestroyEffect effect) {
@ -96,9 +92,4 @@ class HydroblastDestroyEffect extends OneShotEffect {
} }
return true; return true;
} }
@Override
public String getText(Mode mode) {
return "destroy target permanent if it's red";
}
} }

View file

@ -10,6 +10,7 @@ import mage.constants.CardType;
import mage.game.Game; import mage.game.Game;
import mage.players.Player; import mage.players.Player;
import mage.target.common.TargetOpponent; import mage.target.common.TargetOpponent;
import mage.util.CardUtil;
import java.util.UUID; import java.util.UUID;
@ -21,8 +22,8 @@ public final class InfiniteObliteration extends CardImpl {
public InfiniteObliteration(UUID ownerId, CardSetInfo setInfo) { public InfiniteObliteration(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}{B}"); super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}{B}");
// Name a creature card. Search target opponent's graveyard, hand, and library // Choose a creature card. Search target opponent's graveyard, hand, and library
// for any number of cards with that name and exile them. Then that player shuffles their library. // for any number of cards with that name and exile them. Then that player shuffles their library.
this.getSpellAbility().addEffect(new InfiniteObliterationEffect()); this.getSpellAbility().addEffect(new InfiniteObliterationEffect());
this.getSpellAbility().addTarget(new TargetOpponent()); this.getSpellAbility().addTarget(new TargetOpponent());
} }
@ -41,6 +42,7 @@ class InfiniteObliterationEffect extends SearchTargetGraveyardHandLibraryForCard
public InfiniteObliterationEffect() { public InfiniteObliterationEffect() {
super(true, "target opponent's", "any number of cards with that name"); super(true, "target opponent's", "any number of cards with that name");
this.staticText = "Choose a creature card name. " + CardUtil.getTextWithFirstCharUpperCase(this.staticText);
} }
public InfiniteObliterationEffect(final InfiniteObliterationEffect effect) { public InfiniteObliterationEffect(final InfiniteObliterationEffect effect) {
@ -63,9 +65,4 @@ class InfiniteObliterationEffect extends SearchTargetGraveyardHandLibraryForCard
public InfiniteObliterationEffect copy() { public InfiniteObliterationEffect copy() {
return new InfiniteObliterationEffect(this); return new InfiniteObliterationEffect(this);
} }
@Override
public String getText(Mode mode) {
return "Choose a creature card name. " + super.getText(mode);
}
} }

View file

@ -103,6 +103,7 @@ class InfiniteReflectionEntersBattlefieldEffect extends ReplacementEffectImpl {
public InfiniteReflectionEntersBattlefieldEffect() { public InfiniteReflectionEntersBattlefieldEffect() {
super(Duration.WhileOnBattlefield, Outcome.Benefit); super(Duration.WhileOnBattlefield, Outcome.Benefit);
this.staticText = "Nontoken creatures you control enter the battlefield as a copy of enchanted creature";
} }
public InfiniteReflectionEntersBattlefieldEffect(InfiniteReflectionEntersBattlefieldEffect effect) { public InfiniteReflectionEntersBattlefieldEffect(InfiniteReflectionEntersBattlefieldEffect effect) {
@ -135,11 +136,6 @@ class InfiniteReflectionEntersBattlefieldEffect extends ReplacementEffectImpl {
return false; return false;
} }
@Override
public String getText(Mode mode) {
return "Nontoken creatures you control enter the battlefield as a copy of enchanted creature";
}
@Override @Override
public InfiniteReflectionEntersBattlefieldEffect copy() { public InfiniteReflectionEntersBattlefieldEffect copy() {
return new InfiniteReflectionEntersBattlefieldEffect(this); return new InfiniteReflectionEntersBattlefieldEffect(this);

View file

@ -53,6 +53,10 @@ class InvasiveSurgeryEffect extends SearchTargetGraveyardHandLibraryForCardNameA
public InvasiveSurgeryEffect() { public InvasiveSurgeryEffect() {
super(true, "that spell's controller", "all cards with the same name as that spell"); super(true, "that spell's controller", "all cards with the same name as that spell");
this.staticText = "Counter target sorcery spell.<br><br>"
+ "<i>Delirium</i> &mdash; If there are four or more card types among cards in your graveyard, "
+ "search the graveyard, hand, and library of that spell's controller for any number of cards "
+ "with the same name as that spell, exile those cards, then that player shuffles";
} }
public InvasiveSurgeryEffect(final InvasiveSurgeryEffect effect) { public InvasiveSurgeryEffect(final InvasiveSurgeryEffect effect) {
@ -91,12 +95,4 @@ class InvasiveSurgeryEffect extends SearchTargetGraveyardHandLibraryForCardNameA
} }
return this.applySearchAndExile(game, source, cardName, spellController); return this.applySearchAndExile(game, source, cardName, spellController);
} }
@Override
public String getText(Mode mode) {
return "Counter target sorcery spell.<br><br>"
+ "<i>Delirium</i> &mdash; If there are four or more card types among cards in your graveyard, "
+ "search the graveyard, hand, and library of that spell's controller for any number of cards "
+ "with the same name as that spell, exile those cards, then that player shuffles";
}
} }

View file

@ -42,6 +42,7 @@ class IronMaidenEffect extends OneShotEffect {
private IronMaidenEffect(final IronMaidenEffect effect) { private IronMaidenEffect(final IronMaidenEffect effect) {
super(effect); super(effect);
this.staticText = "Iron Maiden deals X damage to that player, where X is the number of cards in their hand minus 4";
} }
public IronMaidenEffect() { public IronMaidenEffect() {
@ -65,10 +66,4 @@ class IronMaidenEffect extends OneShotEffect {
public IronMaidenEffect copy() { public IronMaidenEffect copy() {
return new IronMaidenEffect(this); return new IronMaidenEffect(this);
} }
@Override
public String getText(Mode mode) {
return "Iron Maiden deals X damage to that player, where X is the number of cards in their hand minus 4";
}
} }

View file

@ -78,11 +78,6 @@ class JaceMemoryAdeptEffect extends DrawCardTargetEffect {
return true; return true;
} }
@Override
public String getText(Mode mode) {
return staticText;
}
@Override @Override
public JaceMemoryAdeptEffect copy() { public JaceMemoryAdeptEffect copy() {
return new JaceMemoryAdeptEffect(this); return new JaceMemoryAdeptEffect(this);

View file

@ -63,6 +63,7 @@ class JovensFerretsEffect extends OneShotEffect {
public JovensFerretsEffect() { public JovensFerretsEffect() {
super(Outcome.Benefit); super(Outcome.Benefit);
this.staticText = "tap all creatures that blocked {this} this turn. They don't untap during their controller's next untap step.";
} }
public JovensFerretsEffect(final JovensFerretsEffect effect) { public JovensFerretsEffect(final JovensFerretsEffect effect) {
@ -100,9 +101,4 @@ class JovensFerretsEffect extends OneShotEffect {
} }
return false; return false;
} }
@Override
public String getText(Mode mode) {
return "tap all creatures that blocked {this} this turn. They don't untap during their controller's next untap step.";
}
} }

View file

@ -51,17 +51,13 @@ class KarmaDamageTargetEffect extends OneShotEffect {
public KarmaDamageTargetEffect() { public KarmaDamageTargetEffect() {
super(Outcome.Damage); super(Outcome.Damage);
this.staticText = "{this} deals damage to that player equal to the number of Swamps they control";
} }
public KarmaDamageTargetEffect(KarmaDamageTargetEffect copy) { public KarmaDamageTargetEffect(KarmaDamageTargetEffect copy) {
super(copy); super(copy);
} }
@Override
public String getText(Mode mode) {
return "{this} deals damage to that player equal to the number of Swamps they control";
}
@Override @Override
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(targetPointer.getFirst(game, source)); Player player = game.getPlayer(targetPointer.getFirst(game, source));

View file

@ -78,6 +78,7 @@ class KyloRenTapTargetEffect extends TapTargetEffect {
public KyloRenTapTargetEffect() { public KyloRenTapTargetEffect() {
super(); super();
this.staticText = "and you may tap target creature defending player controls";
} }
public KyloRenTapTargetEffect(final KyloRenTapTargetEffect effect) { public KyloRenTapTargetEffect(final KyloRenTapTargetEffect effect) {
@ -100,9 +101,4 @@ class KyloRenTapTargetEffect extends TapTargetEffect {
} }
return false; return false;
} }
@Override
public String getText(Mode mode) {
return "and you may tap target creature defending player controls";
}
} }

View file

@ -46,6 +46,7 @@ class SetSupertypeAllEffect extends ContinuousEffectImpl {
public SetSupertypeAllEffect() { public SetSupertypeAllEffect() {
super(Duration.WhileOnBattlefield, Layer.TypeChangingEffects_4, SubLayer.NA, Outcome.Detriment); super(Duration.WhileOnBattlefield, Layer.TypeChangingEffects_4, SubLayer.NA, Outcome.Detriment);
this.staticText = "All nonland permanents are legendary";
} }
public SetSupertypeAllEffect(final SetSupertypeAllEffect effect) { public SetSupertypeAllEffect(final SetSupertypeAllEffect effect) {
@ -64,9 +65,4 @@ class SetSupertypeAllEffect extends ContinuousEffectImpl {
} }
return true; return true;
} }
@Override
public String getText(Mode mode) {
return "All nonland permanents are legendary";
}
} }

View file

@ -95,6 +95,7 @@ class LithoformEngineEffect extends OneShotEffect {
public LithoformEngineEffect() { public LithoformEngineEffect() {
super(Outcome.Copy); super(Outcome.Copy);
this.staticText = "Copy target activated or triggered ability you control. You may choose new targets for the copy";
} }
public LithoformEngineEffect(final LithoformEngineEffect effect) { public LithoformEngineEffect(final LithoformEngineEffect effect) {
@ -120,9 +121,4 @@ class LithoformEngineEffect extends OneShotEffect {
public LithoformEngineEffect copy() { public LithoformEngineEffect copy() {
return new LithoformEngineEffect(this); return new LithoformEngineEffect(this);
} }
@Override
public String getText(Mode mode) {
return "Copy target activated or triggered ability you control. You may choose new targets for the copy";
}
} }

View file

@ -76,6 +76,17 @@ class LordXanderTheCollectorEffect extends OneShotEffect {
LordXanderTheCollectorEffect(LordXanderTheCollectorEffectType LordXanderTheCollectorEffectType) { LordXanderTheCollectorEffect(LordXanderTheCollectorEffectType LordXanderTheCollectorEffectType) {
super(Outcome.Benefit); super(Outcome.Benefit);
this.effectType = LordXanderTheCollectorEffectType; this.effectType = LordXanderTheCollectorEffectType;
switch (effectType) {
case DISCARD:
this.staticText = "target opponent discards half the cards in their hand, rounded down";
break;
case MILL:
this.staticText = "defending player mills half their library, rounded down";
break;
case SACRIFICE:
this.staticText = "target opponent sacrifices half the nonland permanents they control, rounded down";
break;
}
} }
private LordXanderTheCollectorEffect(final LordXanderTheCollectorEffect effect) { private LordXanderTheCollectorEffect(final LordXanderTheCollectorEffect effect) {
@ -132,17 +143,4 @@ class LordXanderTheCollectorEffect extends OneShotEffect {
} }
return false; return false;
} }
@Override
public String getText(Mode mode) {
switch (effectType) {
case DISCARD:
return "target opponent discards half the cards in their hand, rounded down";
case MILL:
return "defending player mills half their library, rounded down";
case SACRIFICE:
return "target opponent sacrifices half the nonland permanents they control, rounded down";
}
return "";
}
} }

View file

@ -44,6 +44,7 @@ class LostLegacyEffect extends SearchTargetGraveyardHandLibraryForCardNameAndExi
LostLegacyEffect() { LostLegacyEffect() {
super(true, "target player's", "any number of cards with that name"); super(true, "target player's", "any number of cards with that name");
this.staticText = "Search target player's graveyard, hand, and library for any number of cards with that name and exile them. That player shuffles, then draws a card for each card exiled from their hand this way";
} }
LostLegacyEffect(final LostLegacyEffect effect) { LostLegacyEffect(final LostLegacyEffect effect) {
@ -72,9 +73,4 @@ class LostLegacyEffect extends SearchTargetGraveyardHandLibraryForCardNameAndExi
public LostLegacyEffect copy() { public LostLegacyEffect copy() {
return new LostLegacyEffect(this); return new LostLegacyEffect(this);
} }
@Override
public String getText(Mode mode) {
return "Search target player's graveyard, hand, and library for any number of cards with that name and exile them. That player shuffles, then draws a card for each card exiled from their hand this way";
}
} }

View file

@ -60,6 +60,7 @@ class CounterSourceEffect extends OneShotEffect {
public CounterSourceEffect() { public CounterSourceEffect() {
super(Outcome.Detriment); super(Outcome.Detriment);
this.staticText = "counter it unless you sacrifice a land";
} }
public CounterSourceEffect(final CounterSourceEffect effect) { public CounterSourceEffect(final CounterSourceEffect effect) {
@ -96,14 +97,6 @@ class CounterSourceEffect extends OneShotEffect {
} }
return false; return false;
} }
@Override
public String getText(Mode mode) {
if (staticText != null && !staticText.isEmpty()) {
return staticText;
}
return "counter it unless you sacrifice a land";
}
} }
class ManaVortexStateTriggeredAbility extends StateTriggeredAbility { class ManaVortexStateTriggeredAbility extends StateTriggeredAbility {

View file

@ -48,6 +48,7 @@ class MeltingEffect extends ContinuousEffectImpl {
public MeltingEffect() { public MeltingEffect() {
super(Duration.WhileOnBattlefield, Layer.TypeChangingEffects_4, SubLayer.NA, Outcome.Detriment); super(Duration.WhileOnBattlefield, Layer.TypeChangingEffects_4, SubLayer.NA, Outcome.Detriment);
this.staticText = "All lands are no longer snow";
} }
public MeltingEffect(final MeltingEffect effect) { public MeltingEffect(final MeltingEffect effect) {
@ -66,9 +67,4 @@ class MeltingEffect extends ContinuousEffectImpl {
} }
return true; return true;
} }
@Override
public String getText(Mode mode) {
return "All lands are no longer snow";
}
} }

View file

@ -61,9 +61,4 @@ class MemoricideEffect extends SearchTargetGraveyardHandLibraryForCardNameAndExi
public MemoricideEffect copy() { public MemoricideEffect copy() {
return new MemoricideEffect(this); return new MemoricideEffect(this);
} }
@Override
public String getText(Mode mode) {
return "Search target player's graveyard, hand, and library for any number of cards with that name and exile them. Then that player shuffles";
}
} }

View file

@ -46,6 +46,7 @@ class MorgueBurstEffect extends OneShotEffect {
public MorgueBurstEffect() { public MorgueBurstEffect() {
super(Outcome.ReturnToHand); super(Outcome.ReturnToHand);
this.staticText = "Return target creature card from your graveyard to your hand. Morgue Burst deals damage to any target equal to the power of the card returned this way";
} }
public MorgueBurstEffect(final MorgueBurstEffect effect) { public MorgueBurstEffect(final MorgueBurstEffect effect) {
@ -79,9 +80,4 @@ class MorgueBurstEffect extends OneShotEffect {
} }
return false; return false;
} }
@Override
public String getText(Mode mode) {
return "Return target creature card from your graveyard to your hand. Morgue Burst deals damage to any target equal to the power of the card returned this way";
}
} }

View file

@ -99,6 +99,7 @@ class ChangeCreatureTypeTargetEffect extends ContinuousEffectImpl {
super(duration, Layer.TextChangingEffects_3, SubLayer.NA, Outcome.Benefit); super(duration, Layer.TextChangingEffects_3, SubLayer.NA, Outcome.Benefit);
this.fromSubType = fromSubType; this.fromSubType = fromSubType;
this.toSubType = toSubType; this.toSubType = toSubType;
this.staticText = "Change the text of that creature by replacing all instances of one creature type with Vampire";
} }
public ChangeCreatureTypeTargetEffect(final ChangeCreatureTypeTargetEffect effect) { public ChangeCreatureTypeTargetEffect(final ChangeCreatureTypeTargetEffect effect) {
@ -171,9 +172,4 @@ class ChangeCreatureTypeTargetEffect extends ContinuousEffectImpl {
public ChangeCreatureTypeTargetEffect copy() { public ChangeCreatureTypeTargetEffect copy() {
return new ChangeCreatureTypeTargetEffect(this); return new ChangeCreatureTypeTargetEffect(this);
} }
@Override
public String getText(Mode mode) {
return "Change the text of that creature by replacing all instances of one creature type with Vampire";
}
} }

View file

@ -44,6 +44,7 @@ class SpellSyphonEffect extends OneShotEffect {
public SpellSyphonEffect() { public SpellSyphonEffect() {
super(Outcome.Benefit); super(Outcome.Benefit);
this.staticText = "Counter target spell unless its controller pays {1} for each card in your hand";
} }
public SpellSyphonEffect(final SpellSyphonEffect effect) { public SpellSyphonEffect(final SpellSyphonEffect effect) {
@ -76,10 +77,4 @@ class SpellSyphonEffect extends OneShotEffect {
} }
return false; return false;
} }
@Override
public String getText(Mode mode) {
return "Counter target spell unless its controller pays {1} for each card in your hand";
}
} }

View file

@ -163,6 +163,7 @@ class OracleEnVecCantAttackRestrictionEffect extends RestrictionEffect {
OracleEnVecCantAttackRestrictionEffect() { OracleEnVecCantAttackRestrictionEffect() {
super(Duration.Custom); super(Duration.Custom);
this.staticText = "{this} can't attack.";
} }
OracleEnVecCantAttackRestrictionEffect(final OracleEnVecCantAttackRestrictionEffect effect) { OracleEnVecCantAttackRestrictionEffect(final OracleEnVecCantAttackRestrictionEffect effect) {
@ -200,11 +201,6 @@ class OracleEnVecCantAttackRestrictionEffect extends RestrictionEffect {
public boolean isInactive(Ability source, Game game) { public boolean isInactive(Ability source, Game game) {
return game.getPhase().getType() == TurnPhase.END && this.isYourNextTurn(game); return game.getPhase().getType() == TurnPhase.END && this.isYourNextTurn(game);
} }
@Override
public String getText(Mode mode) {
return "{this} can't attack.";
}
} }
class OracleEnVecDelayedTriggeredAbility extends DelayedTriggeredAbility { class OracleEnVecDelayedTriggeredAbility extends DelayedTriggeredAbility {
@ -214,6 +210,7 @@ class OracleEnVecDelayedTriggeredAbility extends DelayedTriggeredAbility {
OracleEnVecDelayedTriggeredAbility(int startingTurn, List<UUID> chosenCreatures) { OracleEnVecDelayedTriggeredAbility(int startingTurn, List<UUID> chosenCreatures) {
super(new OracleEnVecDestroyEffect(chosenCreatures), Duration.EndOfGame, true); super(new OracleEnVecDestroyEffect(chosenCreatures), Duration.EndOfGame, true);
this.startingTurn = startingTurn; this.startingTurn = startingTurn;
setTriggerPhrase("At the beginning of that turn's end step, ");
} }
OracleEnVecDelayedTriggeredAbility(final OracleEnVecDelayedTriggeredAbility ability) { OracleEnVecDelayedTriggeredAbility(final OracleEnVecDelayedTriggeredAbility ability) {
@ -235,11 +232,6 @@ class OracleEnVecDelayedTriggeredAbility extends DelayedTriggeredAbility {
public OracleEnVecDelayedTriggeredAbility copy() { public OracleEnVecDelayedTriggeredAbility copy() {
return new OracleEnVecDelayedTriggeredAbility(this); return new OracleEnVecDelayedTriggeredAbility(this);
} }
@Override
public String getRule() {
return "At the beginning of that turn's end step, destroy each of the chosen creatures that didn't attack.";
}
} }
class OracleEnVecDestroyEffect extends OneShotEffect { class OracleEnVecDestroyEffect extends OneShotEffect {

View file

@ -45,6 +45,7 @@ class OverrideEffect extends OneShotEffect {
public OverrideEffect() { public OverrideEffect() {
super(Outcome.Benefit); super(Outcome.Benefit);
this.staticText = "Counter target spell unless its controller pays {1} for each artifact you control";
} }
public OverrideEffect(final OverrideEffect effect) { public OverrideEffect(final OverrideEffect effect) {
@ -77,10 +78,4 @@ class OverrideEffect extends OneShotEffect {
} }
return false; return false;
} }
@Override
public String getText(Mode mode) {
return "Counter target spell unless its controller pays {1} for each artifact you control";
}
} }

View file

@ -56,6 +56,7 @@ class CounterSourceEffect extends OneShotEffect {
public CounterSourceEffect() { public CounterSourceEffect() {
super(Outcome.AIDontUseIt); super(Outcome.AIDontUseIt);
this.staticText = "any player may discard three cards. If a player does, counter {this}";
} }
public CounterSourceEffect(final CounterSourceEffect effect) { public CounterSourceEffect(final CounterSourceEffect effect) {
@ -91,12 +92,4 @@ class CounterSourceEffect extends OneShotEffect {
} }
return false; return false;
} }
@Override
public String getText(Mode mode) {
if (staticText != null && !staticText.isEmpty()) {
return staticText;
}
return "any player may discard three cards. If a player does, counter {this}";
}
} }

View file

@ -48,6 +48,10 @@ class PickTheBrainEffect extends SearchTargetGraveyardHandLibraryForCardNameAndE
public PickTheBrainEffect() { public PickTheBrainEffect() {
super(true, "that card's controller", "all cards with the same name as that card"); super(true, "that card's controller", "all cards with the same name as that card");
this.staticText = "Target opponent reveals their hand. You choose a nonland card from it and exile that card.<br><br>"
+ "<i>Delirium</i> &mdash; If there are four or more card types among cards in your graveyard, "
+ "search that player's graveyard, hand, and library for any number of cards "
+ "with the same name as the exiled card, exile those cards, then that player shuffles";
} }
public PickTheBrainEffect(final PickTheBrainEffect effect) { public PickTheBrainEffect(final PickTheBrainEffect effect) {
@ -83,12 +87,4 @@ class PickTheBrainEffect extends SearchTargetGraveyardHandLibraryForCardNameAndE
} }
return false; return false;
} }
@Override
public String getText(Mode mode) {
return "Target opponent reveals their hand. You choose a nonland card from it and exile that card.<br><br>"
+ "<i>Delirium</i> &mdash; If there are four or more card types among cards in your graveyard, "
+ "search that player's graveyard, hand, and library for any number of cards "
+ "with the same name as the exiled card, exile those cards, then that player shuffles";
}
} }

View file

@ -43,17 +43,13 @@ class PowerSurgeDamageEffect extends OneShotEffect {
public PowerSurgeDamageEffect() { public PowerSurgeDamageEffect() {
super(Outcome.Damage); super(Outcome.Damage);
this.staticText = "{this} deals X damage to that player where X is the number of untapped lands they controlled at the beginning of this turn";
} }
public PowerSurgeDamageEffect(PowerSurgeDamageEffect copy) { public PowerSurgeDamageEffect(PowerSurgeDamageEffect copy) {
super(copy); super(copy);
} }
@Override
public String getText(Mode mode) {
return "{this} deals X damage to that player where X is the number of untapped lands they controlled at the beginning of this turn";
}
@Override @Override
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(targetPointer.getFirst(game, source)); Player player = game.getPlayer(targetPointer.getFirst(game, source));

View file

@ -44,17 +44,13 @@ class PrimalOrderDamageTargetEffect extends OneShotEffect {
public PrimalOrderDamageTargetEffect() { public PrimalOrderDamageTargetEffect() {
super(Outcome.Damage); super(Outcome.Damage);
this.staticText = "{this} deals damage to that player equal to the number of nonbasic lands they control";
} }
public PrimalOrderDamageTargetEffect(PrimalOrderDamageTargetEffect copy) { public PrimalOrderDamageTargetEffect(PrimalOrderDamageTargetEffect copy) {
super(copy); super(copy);
} }
@Override
public String getText(Mode mode) {
return "{this} deals damage to that player equal to the number of nonbasic lands they control";
}
@Override @Override
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(targetPointer.getFirst(game, source)); Player player = game.getPlayer(targetPointer.getFirst(game, source));

View file

@ -47,6 +47,7 @@ class PyroblastCounterTargetEffect extends OneShotEffect {
public PyroblastCounterTargetEffect() { public PyroblastCounterTargetEffect() {
super(Outcome.Detriment); super(Outcome.Detriment);
this.staticText = "Counter target spell if it's blue";
} }
public PyroblastCounterTargetEffect(final PyroblastCounterTargetEffect effect) { public PyroblastCounterTargetEffect(final PyroblastCounterTargetEffect effect) {
@ -66,18 +67,13 @@ class PyroblastCounterTargetEffect extends OneShotEffect {
} }
return true; return true;
} }
@Override
public String getText(Mode mode) {
return "Counter target spell if it's blue";
}
} }
class PyroblastDestroyTargetEffect extends OneShotEffect { class PyroblastDestroyTargetEffect extends OneShotEffect {
public PyroblastDestroyTargetEffect() { public PyroblastDestroyTargetEffect() {
super(Outcome.DestroyPermanent); super(Outcome.DestroyPermanent);
this.staticText = "Destroy target permanent if it's blue";
} }
public PyroblastDestroyTargetEffect(final PyroblastDestroyTargetEffect effect) { public PyroblastDestroyTargetEffect(final PyroblastDestroyTargetEffect effect) {
@ -97,10 +93,4 @@ class PyroblastDestroyTargetEffect extends OneShotEffect {
} }
return true; return true;
} }
@Override
public String getText(Mode mode) {
return "Destroy target permanent if it's blue";
}
} }

View file

@ -7,6 +7,7 @@ import mage.abilities.Ability;
import mage.abilities.Mode; import mage.abilities.Mode;
import mage.abilities.effects.ContinuousRuleModifyingEffectImpl; import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.CounterTargetEffect;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
@ -27,17 +28,11 @@ import mage.target.targetpointer.FixedTarget;
*/ */
public final class RenderSilent extends CardImpl { public final class RenderSilent extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("multicolored permanent");
static {
filter.add(MulticoloredPredicate.instance);
}
public RenderSilent(UUID ownerId, CardSetInfo setInfo) { public RenderSilent(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{W}{U}{U}"); super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{W}{U}{U}");
// Counter target spell. Its controller can't cast spells this turn. // Counter target spell. Its controller can't cast spells this turn.
this.getSpellAbility().addEffect(new RenderSilentCounterEffect()); this.getSpellAbility().addEffect(new CounterTargetEffect());
this.getSpellAbility().addTarget(new TargetSpell()); this.getSpellAbility().addTarget(new TargetSpell());
this.getSpellAbility().addEffect(new RenderSilentEffect()); this.getSpellAbility().addEffect(new RenderSilentEffect());
} }
@ -52,38 +47,6 @@ public final class RenderSilent extends CardImpl {
} }
} }
class RenderSilentCounterEffect extends OneShotEffect {
public RenderSilentCounterEffect() {
super(Outcome.Detriment);
}
public RenderSilentCounterEffect(final RenderSilentCounterEffect effect) {
super(effect);
}
@Override
public RenderSilentCounterEffect copy() {
return new RenderSilentCounterEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Spell spell = game.getStack().getSpell(source.getFirstTarget());
if (spell != null) {
source.getEffects().get(1).setTargetPointer(new FixedTarget(spell.getControllerId()));
return game.getStack().counter(source.getFirstTarget(), source, game);
}
return false;
}
@Override
public String getText(Mode mode) {
return "Counter target " + mode.getTargets().get(0).getTargetName();
}
}
class RenderSilentEffect extends ContinuousRuleModifyingEffectImpl { class RenderSilentEffect extends ContinuousRuleModifyingEffectImpl {
public RenderSilentEffect() { public RenderSilentEffect() {

View file

@ -106,6 +106,7 @@ class RescueFromTheUnderworldCreateDelayedTriggeredAbilityEffect extends OneShot
public RescueFromTheUnderworldCreateDelayedTriggeredAbilityEffect(DelayedTriggeredAbility ability) { public RescueFromTheUnderworldCreateDelayedTriggeredAbilityEffect(DelayedTriggeredAbility ability) {
super(ability.getEffects().getOutcome(ability)); super(ability.getEffects().getOutcome(ability));
this.ability = ability; this.ability = ability;
this.staticText = "Return that card and the sacrificed card to the battlefield under your control at the beginning of your next upkeep";
} }
public RescueFromTheUnderworldCreateDelayedTriggeredAbilityEffect(final RescueFromTheUnderworldCreateDelayedTriggeredAbilityEffect effect) { public RescueFromTheUnderworldCreateDelayedTriggeredAbilityEffect(final RescueFromTheUnderworldCreateDelayedTriggeredAbilityEffect effect) {
@ -140,12 +141,6 @@ class RescueFromTheUnderworldCreateDelayedTriggeredAbilityEffect extends OneShot
game.addDelayedTriggeredAbility(delayedAbility, source); game.addDelayedTriggeredAbility(delayedAbility, source);
return true; return true;
} }
@Override
public String getText(Mode mode) {
return ability.getRule();
}
} }
class RescueFromTheUnderworldDelayedTriggeredAbility extends DelayedTriggeredAbility { class RescueFromTheUnderworldDelayedTriggeredAbility extends DelayedTriggeredAbility {

View file

@ -88,6 +88,7 @@ class RimefeatherOwlEffect extends ContinuousEffectImpl {
public RimefeatherOwlEffect(Duration duration, FilterPermanent filter) { public RimefeatherOwlEffect(Duration duration, FilterPermanent filter) {
super(duration, Layer.TypeChangingEffects_4, SubLayer.NA, Outcome.Detriment); super(duration, Layer.TypeChangingEffects_4, SubLayer.NA, Outcome.Detriment);
this.filter = filter; this.filter = filter;
this.staticText = "Permanents with ice counters on them are snow.";
} }
public RimefeatherOwlEffect(final RimefeatherOwlEffect effect) { public RimefeatherOwlEffect(final RimefeatherOwlEffect effect) {
@ -108,9 +109,4 @@ class RimefeatherOwlEffect extends ContinuousEffectImpl {
} }
return true; return true;
} }
@Override
public String getText(Mode mode) {
return "Permanents with ice counters on them are snow.";
}
} }

View file

@ -185,6 +185,7 @@ class RiskyMoveCreatureGainControlEffect extends ContinuousEffectImpl {
public RiskyMoveCreatureGainControlEffect(Duration duration, UUID controller) { public RiskyMoveCreatureGainControlEffect(Duration duration, UUID controller) {
super(duration, Layer.ControlChangingEffects_2, SubLayer.NA, Outcome.GainControl); super(duration, Layer.ControlChangingEffects_2, SubLayer.NA, Outcome.GainControl);
this.controller = controller; this.controller = controller;
this.staticText = "If you lose the flip, that opponent gains control of that creature";
} }
public RiskyMoveCreatureGainControlEffect(final RiskyMoveCreatureGainControlEffect effect) { public RiskyMoveCreatureGainControlEffect(final RiskyMoveCreatureGainControlEffect effect) {
@ -208,9 +209,4 @@ class RiskyMoveCreatureGainControlEffect extends ContinuousEffectImpl {
} }
return false; return false;
} }
@Override
public String getText(Mode mode) {
return "If you lose the flip, that opponent gains control of that creature";
}
} }

View file

@ -148,9 +148,6 @@ class DoUnlessAnyOpponentPaysEffect extends OneShotEffect {
@Override @Override
public String getText(Mode mode) { public String getText(Mode mode) {
if (!staticText.isEmpty()) {
return staticText;
}
String effectsText = executingEffects.getText(mode); String effectsText = executingEffects.getText(mode);
return effectsText.substring(0, effectsText.length() - 1) + " unless any opponent pays " + cost.getText(); return effectsText.substring(0, effectsText.length() - 1) + " unless any opponent pays " + cost.getText();
} }

View file

@ -90,18 +90,18 @@ class ShiftingShadowGainEffect extends ContinuousEffectImpl {
class ShiftingShadowEffect extends OneShotEffect { class ShiftingShadowEffect extends OneShotEffect {
private final MageObjectReference mor; private final MageObjectReference mor;
private final String name;
ShiftingShadowEffect(Permanent permanent, Game game) { ShiftingShadowEffect(Permanent permanent, Game game) {
super(Outcome.Benefit); super(Outcome.Benefit);
this.mor = new MageObjectReference(permanent, game); this.mor = new MageObjectReference(permanent, game);
this.name = permanent.getName(); this.staticText = "destroy this creature. Reveal cards from the top of your library until you reveal a creature card. " +
"Put that card onto the battlefield and attach " + permanent.getName() + " to it, then put all other cards " +
"revealed this way on the bottom of your library in a random order.";
} }
private ShiftingShadowEffect(final ShiftingShadowEffect effect) { private ShiftingShadowEffect(final ShiftingShadowEffect effect) {
super(effect); super(effect);
this.mor = effect.mor; this.mor = effect.mor;
this.name = effect.name;
} }
@Override @Override
@ -147,11 +147,4 @@ class ShiftingShadowEffect extends OneShotEffect {
player.putCardsOnBottomOfLibrary(cards, game, source, false); player.putCardsOnBottomOfLibrary(cards, game, source, false);
return true; return true;
} }
@Override
public String getText(Mode mode) {
return "destroy this creature. Reveal cards from the top of your library until you reveal a creature card. " +
"Put that card onto the battlefield and attach " + name + " to it, then put all other cards " +
"revealed this way on the bottom of your library in a random order.";
}
} }

View file

@ -59,6 +59,7 @@ class SkilledAnimatorBecomesCreatureEffect extends BecomesCreatureTargetEffect {
public SkilledAnimatorBecomesCreatureEffect() { public SkilledAnimatorBecomesCreatureEffect() {
super(new SkilledAnimatorToken(), false, false, Duration.WhileOnBattlefield); super(new SkilledAnimatorToken(), false, false, Duration.WhileOnBattlefield);
this.staticText = "target artifact you control becomes an artifact creature with base power and toughness 5/5 for as long as {this} remains on the battlefield";
} }
public SkilledAnimatorBecomesCreatureEffect(final SkilledAnimatorBecomesCreatureEffect effect) { public SkilledAnimatorBecomesCreatureEffect(final SkilledAnimatorBecomesCreatureEffect effect) {
@ -79,11 +80,6 @@ class SkilledAnimatorBecomesCreatureEffect extends BecomesCreatureTargetEffect {
} }
return super.apply(layer, sublayer, source, game); return super.apply(layer, sublayer, source, game);
} }
@Override
public String getText(Mode mode) {
return "target artifact you control becomes an artifact creature with base power and toughness 5/5 for as long as {this} remains on the battlefield";
}
} }
class SkilledAnimatorToken extends TokenImpl { class SkilledAnimatorToken extends TokenImpl {

View file

@ -53,6 +53,7 @@ class GainControlAllPermanentsEffect extends ContinuousEffectImpl {
public GainControlAllPermanentsEffect(Duration duration) { public GainControlAllPermanentsEffect(Duration duration) {
super(duration, Layer.ControlChangingEffects_2, SubLayer.NA, Outcome.Detriment); super(duration, Layer.ControlChangingEffects_2, SubLayer.NA, Outcome.Detriment);
this.staticText = "target opponent gains control of all other permanents you control";
} }
public GainControlAllPermanentsEffect(final GainControlAllPermanentsEffect effect) { public GainControlAllPermanentsEffect(final GainControlAllPermanentsEffect effect) {
@ -78,9 +79,4 @@ class GainControlAllPermanentsEffect extends ContinuousEffectImpl {
} }
return true; return true;
} }
@Override
public String getText(Mode mode) {
return "target opponent gains control of all other permanents you control";
}
} }

View file

@ -50,6 +50,7 @@ class SpellRuptureCounterUnlessPaysEffect extends OneShotEffect {
public SpellRuptureCounterUnlessPaysEffect() { public SpellRuptureCounterUnlessPaysEffect() {
super(Outcome.Detriment); super(Outcome.Detriment);
this.staticText = "Counter target spell unless its controller pays {X}, where X is the greatest power among creatures you control";
} }
public SpellRuptureCounterUnlessPaysEffect(final SpellRuptureCounterUnlessPaysEffect effect) { public SpellRuptureCounterUnlessPaysEffect(final SpellRuptureCounterUnlessPaysEffect effect) {
@ -81,11 +82,6 @@ class SpellRuptureCounterUnlessPaysEffect extends OneShotEffect {
} }
return false; return false;
} }
@Override
public String getText(Mode mode) {
return "Counter target spell unless its controller pays {X}, where X is the greatest power among creatures you control";
}
} }
class GreatestPowerCountCreatureYouControl implements DynamicValue { class GreatestPowerCountCreatureYouControl implements DynamicValue {

View file

@ -56,6 +56,7 @@ class SpellSyphonEffect extends OneShotEffect {
public SpellSyphonEffect() { public SpellSyphonEffect() {
super(Outcome.Detriment); super(Outcome.Detriment);
this.staticText = "Counter target spell unless its controller pays {1} for each blue permanent you control";
} }
public SpellSyphonEffect(final SpellSyphonEffect effect) { public SpellSyphonEffect(final SpellSyphonEffect effect) {
@ -88,10 +89,4 @@ class SpellSyphonEffect extends OneShotEffect {
} }
return false; return false;
} }
@Override
public String getText(Mode mode) {
return "Counter target spell unless its controller pays {1} for each blue permanent you control";
}
} }

View file

@ -61,6 +61,7 @@ class StreetSweeperDestroyEffect extends OneShotEffect {
public StreetSweeperDestroyEffect() { public StreetSweeperDestroyEffect() {
super(Outcome.DestroyPermanent); super(Outcome.DestroyPermanent);
this.staticText = "destroy all Auras attached to target land";
} }
public StreetSweeperDestroyEffect(final StreetSweeperDestroyEffect effect) { public StreetSweeperDestroyEffect(final StreetSweeperDestroyEffect effect) {
@ -91,9 +92,4 @@ class StreetSweeperDestroyEffect extends OneShotEffect {
} }
return false; return false;
} }
@Override
public String getText(Mode mode) {
return "destroy all Auras attached to target land";
}
} }

View file

@ -45,6 +45,7 @@ class StrionicResonatorEffect extends OneShotEffect {
public StrionicResonatorEffect() { public StrionicResonatorEffect() {
super(Outcome.Copy); super(Outcome.Copy);
this.staticText = "Copy target triggered ability you control. You may choose new targets for the copy";
} }
public StrionicResonatorEffect(final StrionicResonatorEffect effect) { public StrionicResonatorEffect(final StrionicResonatorEffect effect) {
@ -66,9 +67,4 @@ class StrionicResonatorEffect extends OneShotEffect {
public StrionicResonatorEffect copy() { public StrionicResonatorEffect copy() {
return new StrionicResonatorEffect(this); return new StrionicResonatorEffect(this);
} }
@Override
public String getText(Mode mode) {
return "Copy " + mode.getTargets().get(0).getTargetName() + ". You may choose new targets for the copy";
}
} }

View file

@ -114,6 +114,7 @@ class ThousandYearStormEffect extends OneShotEffect {
public ThousandYearStormEffect() { public ThousandYearStormEffect() {
super(Outcome.Benefit); super(Outcome.Benefit);
this.stormCount = -1; this.stormCount = -1;
this.staticText = "copy it for each other instant and sorcery spell you've cast before it this turn. You may choose new targets for the copies";
} }
public ThousandYearStormEffect(final ThousandYearStormEffect effect) { public ThousandYearStormEffect(final ThousandYearStormEffect effect) {
@ -139,11 +140,6 @@ class ThousandYearStormEffect extends OneShotEffect {
public void setStormCount(int stormCount) { public void setStormCount(int stormCount) {
this.stormCount = stormCount; this.stormCount = stormCount;
} }
@Override
public String getText(Mode mode) {
return "copy it for each other instant and sorcery spell you've cast before it this turn. You may choose new targets for the copies";
}
} }
class ThousandYearStormWatcher extends Watcher { class ThousandYearStormWatcher extends Watcher {

View file

@ -47,6 +47,7 @@ class TreefolkMysticEffect extends OneShotEffect {
public TreefolkMysticEffect() { public TreefolkMysticEffect() {
super(Outcome.DestroyPermanent); super(Outcome.DestroyPermanent);
this.staticText = "destroy all Auras attached to that creature";
} }
public TreefolkMysticEffect(final TreefolkMysticEffect effect) { public TreefolkMysticEffect(final TreefolkMysticEffect effect) {
@ -73,10 +74,4 @@ class TreefolkMysticEffect extends OneShotEffect {
} }
return false; return false;
} }
@Override
public String getText(Mode mode) {
return "destroy all Auras attached to that creature";
}
} }

View file

@ -54,6 +54,7 @@ class ViashinoHereticEffect extends OneShotEffect {
public ViashinoHereticEffect() { public ViashinoHereticEffect() {
super(Outcome.DestroyPermanent); super(Outcome.DestroyPermanent);
this.staticText = "Destroy target artifact. Viashino Heretic deals damage to that artifact's controller equal to the artifact's mana value";
} }
public ViashinoHereticEffect(final ViashinoHereticEffect effect) { public ViashinoHereticEffect(final ViashinoHereticEffect effect) {
@ -80,9 +81,4 @@ class ViashinoHereticEffect extends OneShotEffect {
} }
return false; return false;
} }
@Override
public String getText(Mode mode) {
return "Destroy target artifact. Viashino Heretic deals damage to that artifact's controller equal to the artifact's mana value";
}
} }

View file

@ -44,7 +44,7 @@ class WebOfInertiaEffect extends OneShotEffect {
public WebOfInertiaEffect() { public WebOfInertiaEffect() {
super(Outcome.Detriment); super(Outcome.Detriment);
staticText = "that player may exile a card from their graveyard. If the player doesn't, creatures they control can't attack you this turn"; this.staticText = "that player may exile a card from their graveyard. If the player doesn't, creatures they control can't attack you this turn";
} }
public WebOfInertiaEffect(final WebOfInertiaEffect effect) { public WebOfInertiaEffect(final WebOfInertiaEffect effect) {
@ -72,16 +72,10 @@ class WebOfInertiaEffect extends OneShotEffect {
return false; return false;
} }
@Override
public String getText(Mode mode) {
return staticText;
}
@Override @Override
public WebOfInertiaEffect copy() { public WebOfInertiaEffect copy() {
return new WebOfInertiaEffect(this); return new WebOfInertiaEffect(this);
} }
} }
class WebOfInertiaRestrictionEffect extends RestrictionEffect { class WebOfInertiaRestrictionEffect extends RestrictionEffect {
@ -111,11 +105,6 @@ class WebOfInertiaRestrictionEffect extends RestrictionEffect {
return !defenderId.equals(source.getControllerId()); return !defenderId.equals(source.getControllerId());
} }
@Override
public String getText(Mode mode) {
return staticText;
}
@Override @Override
public WebOfInertiaRestrictionEffect copy() { public WebOfInertiaRestrictionEffect copy() {
return new WebOfInertiaRestrictionEffect(this); return new WebOfInertiaRestrictionEffect(this);

View file

@ -41,6 +41,7 @@ class WheelOfTortureEffect extends OneShotEffect {
private WheelOfTortureEffect(final WheelOfTortureEffect effect) { private WheelOfTortureEffect(final WheelOfTortureEffect effect) {
super(effect); super(effect);
this.staticText = "Wheel of Torture deals X damage to that player, where X is 3 minus the number of cards in their hand";
} }
public WheelOfTortureEffect() { public WheelOfTortureEffect() {
@ -64,10 +65,4 @@ class WheelOfTortureEffect extends OneShotEffect {
public WheelOfTortureEffect copy() { public WheelOfTortureEffect copy() {
return new WheelOfTortureEffect(this); return new WheelOfTortureEffect(this);
} }
@Override
public String getText(Mode mode) {
return "Wheel of Torture deals X damage to that player, where X is 3 minus the number of cards in their hand";
}
} }

View file

@ -126,5 +126,4 @@ class YoseiTheMorningStarTapEffect extends OneShotEffect {
public String getText(Mode mode) { public String getText(Mode mode) {
return staticText; return staticText;
} }
} }

View file

@ -81,6 +81,14 @@ class GainManaAbilitiesWhileExiledEffect extends ContinuousEffectImpl {
GainManaAbilitiesWhileExiledEffect(String colors) { GainManaAbilitiesWhileExiledEffect(String colors) {
super(Duration.Custom, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.AddAbility); super(Duration.Custom, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.AddAbility);
this.colors = colors; this.colors = colors;
this.staticText =
"target land gains \"{T}: Add " +
CardUtil.concatWithOr(
Arrays.stream(colors.split(""))
.map(s -> '{' + s + '}')
.collect(Collectors.toList())
) +
"\" until {this} is cast from exile";
} }
private GainManaAbilitiesWhileExiledEffect(final GainManaAbilitiesWhileExiledEffect effect) { private GainManaAbilitiesWhileExiledEffect(final GainManaAbilitiesWhileExiledEffect effect) {
@ -129,17 +137,6 @@ class GainManaAbilitiesWhileExiledEffect extends ContinuousEffectImpl {
} }
return true; return true;
} }
@Override
public String getText(Mode mode) {
return "target land gains \"{T}: Add " +
CardUtil.concatWithOr(
Arrays.stream(colors.split(""))
.map(s -> '{' + s + '}')
.collect(Collectors.toList())
) +
"\" until {this} is cast from exile";
}
} }
class WasCastFromExileWatcher extends Watcher { class WasCastFromExileWatcher extends Watcher {

View file

@ -83,6 +83,9 @@ public class AmplifyEffect extends ReplacementEffectImpl {
public AmplifyEffect(AmplifyFactor amplifyFactor) { public AmplifyEffect(AmplifyFactor amplifyFactor) {
super(Duration.EndOfGame, Outcome.BoostCreature); super(Duration.EndOfGame, Outcome.BoostCreature);
this.amplifyFactor = amplifyFactor; this.amplifyFactor = amplifyFactor;
this.staticText = amplifyFactor.toString() +
" <i>(As this enter the battlefield, " + amplifyFactor.getRuleText() + " for each card"
+ " you reveal that shares a type with it in your hand.)</i>";
} }
public AmplifyEffect(final AmplifyEffect effect) { public AmplifyEffect(final AmplifyEffect effect) {
@ -133,15 +136,6 @@ public class AmplifyEffect extends ReplacementEffectImpl {
return false; return false;
} }
@Override
public String getText(Mode mode) {
StringBuilder sb = new StringBuilder(amplifyFactor.toString());
sb.append(" <i>(As this enter the battlefield, ");
sb.append(amplifyFactor.getRuleText()).append(" for each card"
+ " you reveal that shares a type with it in your hand.)</i>");
return sb.toString();
}
@Override @Override
public AmplifyEffect copy() { public AmplifyEffect copy() {
return new AmplifyEffect(this); return new AmplifyEffect(this);

View file

@ -19,6 +19,7 @@ public class CantBeRegeneratedSourceEffect extends ContinuousRuleModifyingEffect
public CantBeRegeneratedSourceEffect(Duration duration) { public CantBeRegeneratedSourceEffect(Duration duration) {
super(duration, Outcome.Benefit, false, false); super(duration, Outcome.Benefit, false, false);
this.staticText = buildStaticText();
} }
public CantBeRegeneratedSourceEffect(final CantBeRegeneratedSourceEffect effect) { public CantBeRegeneratedSourceEffect(final CantBeRegeneratedSourceEffect effect) {
@ -56,8 +57,7 @@ public class CantBeRegeneratedSourceEffect extends ContinuousRuleModifyingEffect
return Objects.equals(source.getSourceId(), event.getTargetId()); return Objects.equals(source.getSourceId(), event.getTargetId());
} }
@Override private String buildStaticText() {
public String getText(Mode mode) {
if (staticText != null && !staticText.isEmpty()) { if (staticText != null && !staticText.isEmpty()) {
return staticText; return staticText;
} }

View file

@ -11,6 +11,7 @@ import mage.abilities.effects.OneShotEffect;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.constants.TargetController; import mage.constants.TargetController;
import mage.filter.FilterPermanent; import mage.filter.FilterPermanent;
import mage.filter.StaticFilters;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.players.Player; import mage.players.Player;
@ -28,46 +29,17 @@ import java.util.UUID;
public class SacrificeOpponentsUnlessPayEffect extends OneShotEffect { public class SacrificeOpponentsUnlessPayEffect extends OneShotEffect {
protected Cost cost; protected Cost cost;
protected DynamicValue genericMana;
protected DynamicValue amount;
protected FilterPermanent filter; protected FilterPermanent filter;
public SacrificeOpponentsUnlessPayEffect(Cost cost) {
this(cost, new FilterPermanent(), 1);
}
public SacrificeOpponentsUnlessPayEffect(int genericManaCost) { public SacrificeOpponentsUnlessPayEffect(int genericManaCost) {
this(genericManaCost, new FilterPermanent(), 1); this(new GenericManaCost(genericManaCost), StaticFilters.FILTER_PERMANENT);
} }
public SacrificeOpponentsUnlessPayEffect(Cost cost, FilterPermanent filter) { public SacrificeOpponentsUnlessPayEffect(Cost cost, FilterPermanent filter) {
this(cost, filter, 1);
}
public SacrificeOpponentsUnlessPayEffect(int genericManaCost, FilterPermanent filter) {
this(genericManaCost, filter, 1);
}
public SacrificeOpponentsUnlessPayEffect(Cost cost, FilterPermanent filter, int amount) {
this(cost, filter, StaticValue.get(amount));
}
public SacrificeOpponentsUnlessPayEffect(int genericManaCost, FilterPermanent filter, int amount) {
this(new GenericManaCost(genericManaCost), filter, StaticValue.get(amount));
}
public SacrificeOpponentsUnlessPayEffect(Cost cost, FilterPermanent filter, DynamicValue amount) {
super(Outcome.Sacrifice); super(Outcome.Sacrifice);
this.cost = cost; this.cost = cost;
this.amount = amount;
this.filter = filter;
}
public SacrificeOpponentsUnlessPayEffect(DynamicValue genericMana, FilterPermanent filter, DynamicValue amount) {
super(Outcome.Sacrifice);
this.genericMana = genericMana;
this.amount = amount;
this.filter = filter; this.filter = filter;
this.staticText = "each opponent sacrifices " + CardUtil.addArticle(filter.getMessage()) + " unless they " + CardUtil.addCostVerb(cost.getText());
} }
public SacrificeOpponentsUnlessPayEffect(final SacrificeOpponentsUnlessPayEffect effect) { public SacrificeOpponentsUnlessPayEffect(final SacrificeOpponentsUnlessPayEffect effect) {
@ -76,14 +48,6 @@ public class SacrificeOpponentsUnlessPayEffect extends OneShotEffect {
this.cost = effect.cost.copy(); this.cost = effect.cost.copy();
} }
if (effect.genericMana != null) {
this.genericMana = effect.genericMana.copy();
}
if (effect.amount != null) {
this.amount = effect.amount.copy();
}
if (effect.filter != null) { if (effect.filter != null) {
this.filter = effect.filter.copy(); this.filter = effect.filter.copy();
} }
@ -103,27 +67,16 @@ public class SacrificeOpponentsUnlessPayEffect extends OneShotEffect {
Player player = game.getPlayer(playerId); Player player = game.getPlayer(playerId);
if (player != null) { if (player != null) {
Cost costToPay; Cost costToPay = cost.copy();
String costValueMessage; String costValueMessage = costToPay.getText();
if (cost != null) { String message = ((costToPay instanceof ManaCost) ? "Pay " : "") + costValueMessage + '?';
costToPay = cost.copy();
costValueMessage = costToPay.getText();
} else {
costToPay = ManaUtil.createManaCost(genericMana, game, source, this);
costValueMessage = "{" + genericMana.calculate(game, source, this) + "}";
}
String message = "";
if (costToPay instanceof ManaCost) {
message += "Pay ";
}
message += costValueMessage + '?';
costToPay.clearPaid(); costToPay.clearPaid();
if (!(player.chooseUse(Outcome.Benefit, message, source, game) if (!(player.chooseUse(Outcome.Benefit, message, source, game)
&& costToPay.pay(source, game, source, player.getId(), false, null))) { && costToPay.pay(source, game, source, player.getId(), false, null))) {
game.informPlayers(player.getLogName() + " chooses not to pay " + costValueMessage + " to prevent the sacrifice effect"); game.informPlayers(player.getLogName() + " chooses not to pay " + costValueMessage + " to prevent the sacrifice effect");
int numTargets = Math.min(amount.calculate(game, source, this), game.getBattlefield().countAll(filter, player.getId(), game)); int numTargets = Math.min(1, game.getBattlefield().countAll(filter, player.getId(), game));
if (numTargets > 0) { if (numTargets > 0) {
TargetPermanent target = new TargetPermanent(numTargets, numTargets, filter, true); TargetPermanent target = new TargetPermanent(numTargets, numTargets, filter, true);
@ -148,43 +101,4 @@ public class SacrificeOpponentsUnlessPayEffect extends OneShotEffect {
return true; return true;
} }
@Override
public String getText(Mode mode) {
if (staticText != null && !staticText.isEmpty()) {
return staticText;
}
StringBuilder sb = new StringBuilder();
sb.append("each opponent sacrifices ");
switch (amount.toString()) {
case "1":
sb.append(CardUtil.addArticle(filter.getMessage()));
break;
case "X":
sb.append("X ");
sb.append(filter.getMessage());
break;
default:
sb.append(CardUtil.numberToText(amount.toString()));
sb.append(' ');
sb.append(filter.getMessage());
}
sb.append(" unless they ");
if (cost != null) {
sb.append(CardUtil.addCostVerb(cost.getText()));
} else {
sb.append("pay {X}");
}
if (genericMana != null && !genericMana.getMessage().isEmpty()) {
sb.append(", where X is ");
sb.append(genericMana.getMessage());
}
return sb.toString();
}
} }

View file

@ -19,6 +19,8 @@ public class CreaturesBecomeOtherTypeEffect extends ContinuousEffectImpl {
this.subType = subType; this.subType = subType;
this.dependendToTypes.add(DependencyType.BecomeCreature); // Opalescence and Starfield of Nyx this.dependendToTypes.add(DependencyType.BecomeCreature); // Opalescence and Starfield of Nyx
this.staticText = this.filter.getMessage() + " is " + this.subType.getIndefiniteArticle()
+ " " + this.subType.toString() + " in addition to its other types";
} }
protected CreaturesBecomeOtherTypeEffect(final CreaturesBecomeOtherTypeEffect effect) { protected CreaturesBecomeOtherTypeEffect(final CreaturesBecomeOtherTypeEffect effect) {
@ -52,14 +54,4 @@ public class CreaturesBecomeOtherTypeEffect extends ContinuousEffectImpl {
public boolean hasLayer(Layer layer) { public boolean hasLayer(Layer layer) {
return layer == Layer.TypeChangingEffects_4; return layer == Layer.TypeChangingEffects_4;
} }
@Override
public String getText(Mode mode) {
if (staticText != null && !staticText.isEmpty()) {
return staticText;
}
return this.filter.getMessage() + " is " + this.subType.getIndefiniteArticle()
+ " " + this.subType.toString() + " in addition to its other types";
}
} }

View file

@ -38,6 +38,7 @@ public abstract class SearchTargetGraveyardHandLibraryForCardNameAndExileEffect
this.searchWhatText = searchWhatText; this.searchWhatText = searchWhatText;
this.searchForText = searchForText; this.searchForText = searchForText;
this.graveyardExileOptional = graveyardExileOptional; this.graveyardExileOptional = graveyardExileOptional;
this.staticText = "search " + searchWhatText + " graveyard, hand, and library for " + searchForText + " and exile them. Then that player shuffles";
} }
public SearchTargetGraveyardHandLibraryForCardNameAndExileEffect(final SearchTargetGraveyardHandLibraryForCardNameAndExileEffect effect) { public SearchTargetGraveyardHandLibraryForCardNameAndExileEffect(final SearchTargetGraveyardHandLibraryForCardNameAndExileEffect effect) {
@ -98,17 +99,4 @@ public abstract class SearchTargetGraveyardHandLibraryForCardNameAndExileEffect
return false; return false;
} }
@Override
public String getText(Mode mode) {
if (staticText != null && !staticText.isEmpty()) {
return staticText;
}
StringBuilder sb = new StringBuilder();
sb.append("search ").append(this.searchWhatText);
sb.append(" graveyard, hand, and library for ");
sb.append(this.searchForText);
sb.append(" and exile them. Then that player shuffles");
return sb.toString();
}
} }