mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Simplified effects by removing unnecessary getText instances. (#9374)
This commit is contained in:
parent
076c55f1ea
commit
092f3c3fe1
83 changed files with 134 additions and 677 deletions
|
@ -89,6 +89,7 @@ class ActOfAuthorityGainControlEffect extends ContinuousEffectImpl {
|
|||
public ActOfAuthorityGainControlEffect(Duration duration, UUID controller) {
|
||||
super(duration, Layer.ControlChangingEffects_2, SubLayer.NA, Outcome.GainControl);
|
||||
this.controller = controller;
|
||||
this.staticText = "Gain control of {this}";
|
||||
}
|
||||
|
||||
private ActOfAuthorityGainControlEffect(final ActOfAuthorityGainControlEffect effect) {
|
||||
|
@ -114,9 +115,4 @@ class ActOfAuthorityGainControlEffect extends ContinuousEffectImpl {
|
|||
|
||||
return permanent.changeControllerId(controller, game, source);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return "Gain control of {this}";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ public final class AetherBurst extends CardImpl {
|
|||
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.
|
||||
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().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";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -95,6 +95,7 @@ class AkroanHorseGainControlEffect extends ContinuousEffectImpl {
|
|||
public AkroanHorseGainControlEffect(Duration duration, UUID controller) {
|
||||
super(duration, Layer.ControlChangingEffects_2, SubLayer.NA, Outcome.GainControl);
|
||||
this.controller = controller;
|
||||
this.staticText = "Gain control of Akroan Horse";
|
||||
}
|
||||
|
||||
public AkroanHorseGainControlEffect(final AkroanHorseGainControlEffect effect) {
|
||||
|
@ -122,11 +123,6 @@ class AkroanHorseGainControlEffect extends ContinuousEffectImpl {
|
|||
return permanent.changeControllerId(controller, game, source);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return "Gain control of Akroan Horse";
|
||||
}
|
||||
}
|
||||
|
||||
class AkroanHorseCreateTokenEffect extends OneShotEffect {
|
||||
|
|
|
@ -46,6 +46,7 @@ class AnZerrinRuinsDontUntapEffect extends DontUntapInControllersUntapStepAllEff
|
|||
|
||||
public AnZerrinRuinsDontUntapEffect() {
|
||||
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) {
|
||||
|
@ -69,9 +70,4 @@ class AnZerrinRuinsDontUntapEffect extends DontUntapInControllersUntapStepAllEff
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return "Creatures of the chosen type don't untap during their controllers' untap steps";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,17 +42,13 @@ class AncientRunesDamageTargetEffect extends OneShotEffect {
|
|||
|
||||
public AncientRunesDamageTargetEffect() {
|
||||
super(Outcome.Damage);
|
||||
this.staticText = "{this} deals damage to that player equal to the number of artifacts they control";
|
||||
}
|
||||
|
||||
public AncientRunesDamageTargetEffect(AncientRunesDamageTargetEffect 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
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(targetPointer.getFirst(game, source));
|
||||
|
|
|
@ -54,6 +54,7 @@ class AwakenerDruidBecomesCreatureEffect extends BecomesCreatureTargetEffect {
|
|||
|
||||
public AwakenerDruidBecomesCreatureEffect() {
|
||||
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) {
|
||||
|
@ -74,11 +75,6 @@ class AwakenerDruidBecomesCreatureEffect extends BecomesCreatureTargetEffect {
|
|||
}
|
||||
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 {
|
||||
|
|
|
@ -56,6 +56,7 @@ class BanewaspAfflictionLoseLifeEffect extends OneShotEffect {
|
|||
|
||||
public BanewaspAfflictionLoseLifeEffect() {
|
||||
super(Outcome.LoseLife);
|
||||
this.staticText = "that creature's controller loses life equal to its toughness";
|
||||
}
|
||||
|
||||
public BanewaspAfflictionLoseLifeEffect(BanewaspAfflictionLoseLifeEffect copy) {
|
||||
|
@ -80,10 +81,4 @@ class BanewaspAfflictionLoseLifeEffect extends OneShotEffect {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return "that creature's controller loses life equal to its toughness";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -69,8 +69,11 @@ public final class CartoucheOfStrength extends CardImpl {
|
|||
* @author stravant
|
||||
*/
|
||||
class FightEnchantedTargetEffect extends OneShotEffect {
|
||||
|
||||
public FightEnchantedTargetEffect() {
|
||||
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) {
|
||||
|
@ -105,11 +108,4 @@ class FightEnchantedTargetEffect extends OneShotEffect {
|
|||
public FightEnchantedTargetEffect copy() {
|
||||
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>";
|
||||
}
|
||||
|
||||
}
|
|
@ -50,6 +50,7 @@ class ChainOfSilenceEffect extends OneShotEffect {
|
|||
|
||||
public ChainOfSilenceEffect() {
|
||||
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) {
|
||||
|
@ -90,10 +91,4 @@ class ChainOfSilenceEffect extends OneShotEffect {
|
|||
|
||||
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";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -47,6 +47,7 @@ class ChainOfVaporEffect extends OneShotEffect {
|
|||
|
||||
public ChainOfVaporEffect() {
|
||||
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) {
|
||||
|
@ -86,10 +87,4 @@ class ChainOfVaporEffect extends OneShotEffect {
|
|||
|
||||
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";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -49,6 +49,7 @@ class ChainStasisEffect extends OneShotEffect {
|
|||
|
||||
public ChainStasisEffect() {
|
||||
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) {
|
||||
|
@ -90,11 +91,4 @@ class ChainStasisEffect extends OneShotEffect {
|
|||
|
||||
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";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -45,6 +45,7 @@ class ChastiseEffect extends OneShotEffect {
|
|||
|
||||
public ChastiseEffect() {
|
||||
super(Outcome.GainLife);
|
||||
this.staticText = "You gain life equal to its power";
|
||||
}
|
||||
|
||||
public ChastiseEffect(final ChastiseEffect effect) {
|
||||
|
@ -69,9 +70,4 @@ class ChastiseEffect extends OneShotEffect {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return "You gain life equal to its power";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,6 +54,7 @@ class CitadelOfPainEffect extends OneShotEffect {
|
|||
|
||||
public CitadelOfPainEffect() {
|
||||
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) {
|
||||
|
@ -75,9 +76,4 @@ class CitadelOfPainEffect extends OneShotEffect {
|
|||
public CitadelOfPainEffect copy() {
|
||||
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.";
|
||||
}
|
||||
}
|
|
@ -45,7 +45,7 @@ public final class CloakingDevice extends CardImpl {
|
|||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CantBeBlockedAttachedEffect(AttachmentType.AURA)));
|
||||
|
||||
// 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 {
|
||||
|
||||
private DynamicValue amount;
|
||||
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) {
|
||||
public CloakingDeviceLoseLifeDefendingPlayerEffect() {
|
||||
super(Outcome.Damage);
|
||||
this.amount = amount;
|
||||
this.attackerIsSource = attackerIsSource;
|
||||
this.staticText = "defending player loses 1 life";
|
||||
}
|
||||
|
||||
public CloakingDeviceLoseLifeDefendingPlayerEffect(final CloakingDeviceLoseLifeDefendingPlayerEffect effect) {
|
||||
super(effect);
|
||||
this.amount = effect.amount.copy();
|
||||
this.attackerIsSource = effect.attackerIsSource;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -102,15 +86,9 @@ class CloakingDeviceLoseLifeDefendingPlayerEffect extends OneShotEffect {
|
|||
if (enchantment != null && enchantment.getAttachedTo() != null) {
|
||||
Player defender = game.getPlayer(game.getCombat().getDefendingPlayerId(enchantment.getAttachedTo(), game));
|
||||
if (defender != null) {
|
||||
defender.loseLife(amount.calculate(game, source, this), game, source, false);
|
||||
defender.loseLife(1, game, source, false);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return "defending player loses " + amount + " life";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -50,17 +50,13 @@ class ColdSnapDamageTargetEffect extends OneShotEffect {
|
|||
|
||||
public ColdSnapDamageTargetEffect() {
|
||||
super(Outcome.Damage);
|
||||
this.staticText = "{this} deals damage to that player equal to the number of snow lands they control";
|
||||
}
|
||||
|
||||
public ColdSnapDamageTargetEffect(ColdSnapDamageTargetEffect 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
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(targetPointer.getFirst(game, source));
|
||||
|
|
|
@ -95,6 +95,7 @@ class ContestedWarZoneEffect extends ContinuousEffectImpl {
|
|||
|
||||
public ContestedWarZoneEffect() {
|
||||
super(Duration.Custom, Layer.ControlChangingEffects_2, SubLayer.NA, Outcome.GainControl);
|
||||
this.staticText = "Gain control of {this}";
|
||||
}
|
||||
|
||||
public ContestedWarZoneEffect(final ContestedWarZoneEffect effect) {
|
||||
|
@ -117,9 +118,4 @@ class ContestedWarZoneEffect extends ContinuousEffectImpl {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return "Gain control of {this}";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ public final class CranialExtraction extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{B}");
|
||||
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. */
|
||||
this.getSpellAbility().addTarget(new TargetPlayer());
|
||||
this.getSpellAbility().addEffect(new CranialExtractionEffect());
|
||||
|
@ -44,6 +44,7 @@ class CranialExtractionEffect extends SearchTargetGraveyardHandLibraryForCardNam
|
|||
|
||||
CranialExtractionEffect() {
|
||||
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) {
|
||||
|
@ -68,9 +69,4 @@ class CranialExtractionEffect extends SearchTargetGraveyardHandLibraryForCardNam
|
|||
public CranialExtractionEffect copy() {
|
||||
return new CranialExtractionEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return "Choose a nonland card name. " + CardUtil.getTextWithFirstCharUpperCase(super.getText(mode));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ import mage.constants.Outcome;
|
|||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.predicate.mageobject.CommanderPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
@ -59,6 +60,7 @@ class CrimsonHonorGuardEffect extends OneShotEffect {
|
|||
|
||||
public CrimsonHonorGuardEffect() {
|
||||
super(Outcome.Damage);
|
||||
this.staticText = "{this} deals 4 damage to that player unless they control a commander";
|
||||
}
|
||||
|
||||
private CrimsonHonorGuardEffect(final CrimsonHonorGuardEffect effect) {
|
||||
|
@ -78,11 +80,6 @@ class CrimsonHonorGuardEffect extends OneShotEffect {
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return "{this} deals 4 damage to that player unless they control a commander";
|
||||
}
|
||||
|
||||
@Override
|
||||
public CrimsonHonorGuardEffect copy() {
|
||||
return new CrimsonHonorGuardEffect(this);
|
||||
|
|
|
@ -89,6 +89,7 @@ class CrownOfEmpiresControlEffect extends ContinuousEffectImpl {
|
|||
|
||||
public CrownOfEmpiresControlEffect() {
|
||||
super(Duration.EndOfGame, Layer.ControlChangingEffects_2, SubLayer.NA, Outcome.GainControl);
|
||||
this.staticText = "Gain control of {this}";
|
||||
}
|
||||
|
||||
public CrownOfEmpiresControlEffect(final CrownOfEmpiresControlEffect effect) {
|
||||
|
@ -109,9 +110,4 @@ class CrownOfEmpiresControlEffect extends ContinuousEffectImpl {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return "Gain control of {this}";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,6 +43,7 @@ class DeicideExileEffect extends SearchTargetGraveyardHandLibraryForCardNameAndE
|
|||
|
||||
DeicideExileEffect() {
|
||||
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) {
|
||||
|
@ -77,9 +78,4 @@ class DeicideExileEffect extends SearchTargetGraveyardHandLibraryForCardNameAndE
|
|||
public DeicideExileEffect copy() {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -69,6 +69,7 @@ class DimirCharmEffect extends OneShotEffect {
|
|||
|
||||
public DimirCharmEffect() {
|
||||
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) {
|
||||
|
@ -100,9 +101,4 @@ class DimirCharmEffect extends OneShotEffect {
|
|||
public DimirCharmEffect copy() {
|
||||
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";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,6 @@ public final class DismissIntoDream extends CardImpl {
|
|||
public DismissIntoDream(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{6}{U}");
|
||||
|
||||
|
||||
// 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."
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DismissIntoDreamEffect(filter)));
|
||||
|
@ -51,6 +50,7 @@ class DismissIntoDreamEffect extends CreaturesBecomeOtherTypeEffect {
|
|||
DismissIntoDreamEffect(FilterPermanent filter) {
|
||||
super(filter, SubType.ILLUSION, Duration.WhileOnBattlefield);
|
||||
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) {
|
||||
|
@ -84,9 +84,4 @@ class DismissIntoDreamEffect extends CreaturesBecomeOtherTypeEffect {
|
|||
public boolean hasLayer(Layer layer) {
|
||||
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.\"";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,6 +63,7 @@ class DisruptingShoalCounterTargetEffect extends OneShotEffect {
|
|||
|
||||
public DisruptingShoalCounterTargetEffect() {
|
||||
super(Outcome.Detriment);
|
||||
this.staticText = "Counter target spell if its mana value is X";
|
||||
}
|
||||
|
||||
public DisruptingShoalCounterTargetEffect(final DisruptingShoalCounterTargetEffect effect) {
|
||||
|
@ -95,9 +96,4 @@ class DisruptingShoalCounterTargetEffect extends OneShotEffect {
|
|||
// No alternate costs payed so compare to X value
|
||||
return sourceAbility.getManaCostsToPay().getX() == amount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return "Counter target spell if its mana value is X";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -62,6 +62,7 @@ class DuplicantExileTargetEffect extends OneShotEffect {
|
|||
|
||||
public DuplicantExileTargetEffect() {
|
||||
super(Outcome.Exile);
|
||||
this.staticText = "you may exile target nontoken creature";
|
||||
}
|
||||
|
||||
public DuplicantExileTargetEffect(final DuplicantExileTargetEffect effect) {
|
||||
|
@ -87,11 +88,6 @@ class DuplicantExileTargetEffect extends OneShotEffect {
|
|||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return "you may exile target nontoken creature";
|
||||
}
|
||||
}
|
||||
|
||||
class DuplicantContinuousEffect extends ContinuousEffectImpl {
|
||||
|
|
|
@ -49,6 +49,12 @@ class DustOfMomentsEffect extends OneShotEffect {
|
|||
DustOfMomentsEffect(boolean remove) {
|
||||
super(Outcome.Benefit);
|
||||
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) {
|
||||
|
@ -82,17 +88,4 @@ class DustOfMomentsEffect extends OneShotEffect {
|
|||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,6 +50,7 @@ class ReturnToHandAllNamedPermanentsEffect extends OneShotEffect {
|
|||
|
||||
public ReturnToHandAllNamedPermanentsEffect() {
|
||||
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) {
|
||||
|
@ -81,10 +82,4 @@ class ReturnToHandAllNamedPermanentsEffect extends OneShotEffect {
|
|||
}
|
||||
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";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -99,6 +99,7 @@ class FickleEfreetGainControlEffect extends ContinuousEffectImpl {
|
|||
public FickleEfreetGainControlEffect(Duration duration, UUID controller) {
|
||||
super(duration, Layer.ControlChangingEffects_2, SubLayer.NA, Outcome.GainControl);
|
||||
this.controller = controller;
|
||||
this.staticText = "That player gains control of {this}";
|
||||
}
|
||||
|
||||
public FickleEfreetGainControlEffect(final FickleEfreetGainControlEffect effect) {
|
||||
|
@ -122,9 +123,4 @@ class FickleEfreetGainControlEffect extends ContinuousEffectImpl {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return "That player gains control of {this}";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,6 +54,7 @@ class FruitOfTheFirstTreeEffect extends OneShotEffect {
|
|||
|
||||
public FruitOfTheFirstTreeEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "you gain X life and draw X cards, where X is its toughness";
|
||||
}
|
||||
|
||||
public FruitOfTheFirstTreeEffect(FruitOfTheFirstTreeEffect copy) {
|
||||
|
@ -76,10 +77,4 @@ class FruitOfTheFirstTreeEffect extends OneShotEffect {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return "you gain X life and draw X cards, where X is its toughness";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -54,6 +54,7 @@ class GoblinArchaeologistEffect extends OneShotEffect {
|
|||
|
||||
public GoblinArchaeologistEffect() {
|
||||
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) {
|
||||
|
@ -81,9 +82,4 @@ class GoblinArchaeologistEffect extends OneShotEffect {
|
|||
}
|
||||
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}";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -98,6 +98,7 @@ class GoblinFestivalGainControlEffect extends ContinuousEffectImpl {
|
|||
public GoblinFestivalGainControlEffect(Duration duration, UUID controller) {
|
||||
super(duration, Layer.ControlChangingEffects_2, SubLayer.NA, Outcome.GainControl);
|
||||
this.controller = controller;
|
||||
this.staticText = "That player gains control of {this}";
|
||||
}
|
||||
|
||||
public GoblinFestivalGainControlEffect(final GoblinFestivalGainControlEffect effect) {
|
||||
|
@ -121,9 +122,4 @@ class GoblinFestivalGainControlEffect extends ContinuousEffectImpl {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return "That player gains control of {this}";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,6 +57,7 @@ class HammerheimEffect extends ContinuousEffectImpl {
|
|||
|
||||
public HammerheimEffect() {
|
||||
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) {
|
||||
|
@ -81,9 +82,4 @@ class HammerheimEffect extends ContinuousEffectImpl {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return "Target creature loses all landwalk abilities until end of turn.";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,6 +43,7 @@ class HonorablePassageEffect extends PreventNextDamageFromChosenSourceToTargetEf
|
|||
|
||||
public HonorablePassageEffect() {
|
||||
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) {
|
||||
|
@ -73,9 +74,4 @@ class HonorablePassageEffect extends PreventNextDamageFromChosenSourceToTargetEf
|
|||
}
|
||||
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";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -64,6 +64,7 @@ class HuatliWarriorPoetDamageEffect extends OneShotEffect {
|
|||
|
||||
HuatliWarriorPoetDamageEffect() {
|
||||
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) {
|
||||
|
@ -91,14 +92,4 @@ class HuatliWarriorPoetDamageEffect extends OneShotEffect {
|
|||
}
|
||||
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";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,11 +23,10 @@ public final class Hydroblast extends CardImpl {
|
|||
public Hydroblast(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{U}");
|
||||
|
||||
|
||||
// Choose one - Counter target spell if it's red;
|
||||
this.getSpellAbility().addEffect(new HydroblastCounterEffect());
|
||||
this.getSpellAbility().addTarget(new TargetSpell());
|
||||
|
||||
|
||||
// or destroy target permanent if it's red.
|
||||
Mode mode = new Mode(new HydroblastDestroyEffect());
|
||||
mode.addTarget(new TargetPermanent());
|
||||
|
@ -48,6 +47,7 @@ class HydroblastCounterEffect extends OneShotEffect {
|
|||
|
||||
HydroblastCounterEffect() {
|
||||
super(Outcome.Detriment);
|
||||
this.staticText = "Counter target spell if it's red";
|
||||
}
|
||||
|
||||
HydroblastCounterEffect(final HydroblastCounterEffect effect) {
|
||||
|
@ -66,17 +66,13 @@ class HydroblastCounterEffect extends OneShotEffect {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return "Counter target spell if it's red";
|
||||
}
|
||||
}
|
||||
|
||||
class HydroblastDestroyEffect extends OneShotEffect {
|
||||
|
||||
HydroblastDestroyEffect() {
|
||||
super(Outcome.DestroyPermanent);
|
||||
this.staticText = "destroy target permanent if it's red";
|
||||
}
|
||||
|
||||
HydroblastDestroyEffect(final HydroblastDestroyEffect effect) {
|
||||
|
@ -96,9 +92,4 @@ class HydroblastDestroyEffect extends OneShotEffect {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return "destroy target permanent if it's red";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ import mage.constants.CardType;
|
|||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetOpponent;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -21,8 +22,8 @@ public final class InfiniteObliteration extends CardImpl {
|
|||
public InfiniteObliteration(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}{B}");
|
||||
|
||||
// Name 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.
|
||||
// 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.
|
||||
this.getSpellAbility().addEffect(new InfiniteObliterationEffect());
|
||||
this.getSpellAbility().addTarget(new TargetOpponent());
|
||||
}
|
||||
|
@ -41,6 +42,7 @@ class InfiniteObliterationEffect extends SearchTargetGraveyardHandLibraryForCard
|
|||
|
||||
public InfiniteObliterationEffect() {
|
||||
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) {
|
||||
|
@ -63,9 +65,4 @@ class InfiniteObliterationEffect extends SearchTargetGraveyardHandLibraryForCard
|
|||
public InfiniteObliterationEffect copy() {
|
||||
return new InfiniteObliterationEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return "Choose a creature card name. " + super.getText(mode);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -103,6 +103,7 @@ class InfiniteReflectionEntersBattlefieldEffect extends ReplacementEffectImpl {
|
|||
|
||||
public InfiniteReflectionEntersBattlefieldEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||
this.staticText = "Nontoken creatures you control enter the battlefield as a copy of enchanted creature";
|
||||
}
|
||||
|
||||
public InfiniteReflectionEntersBattlefieldEffect(InfiniteReflectionEntersBattlefieldEffect effect) {
|
||||
|
@ -135,11 +136,6 @@ class InfiniteReflectionEntersBattlefieldEffect extends ReplacementEffectImpl {
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return "Nontoken creatures you control enter the battlefield as a copy of enchanted creature";
|
||||
}
|
||||
|
||||
@Override
|
||||
public InfiniteReflectionEntersBattlefieldEffect copy() {
|
||||
return new InfiniteReflectionEntersBattlefieldEffect(this);
|
||||
|
|
|
@ -53,6 +53,10 @@ class InvasiveSurgeryEffect extends SearchTargetGraveyardHandLibraryForCardNameA
|
|||
|
||||
public InvasiveSurgeryEffect() {
|
||||
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> — 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) {
|
||||
|
@ -91,12 +95,4 @@ class InvasiveSurgeryEffect extends SearchTargetGraveyardHandLibraryForCardNameA
|
|||
}
|
||||
return this.applySearchAndExile(game, source, cardName, spellController);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return "Counter target sorcery spell.<br><br>"
|
||||
+ "<i>Delirium</i> — 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";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,6 +42,7 @@ class IronMaidenEffect extends OneShotEffect {
|
|||
|
||||
private IronMaidenEffect(final IronMaidenEffect 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() {
|
||||
|
@ -65,10 +66,4 @@ class IronMaidenEffect extends OneShotEffect {
|
|||
public IronMaidenEffect copy() {
|
||||
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";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -78,11 +78,6 @@ class JaceMemoryAdeptEffect extends DrawCardTargetEffect {
|
|||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return staticText;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JaceMemoryAdeptEffect copy() {
|
||||
return new JaceMemoryAdeptEffect(this);
|
||||
|
|
|
@ -63,6 +63,7 @@ class JovensFerretsEffect extends OneShotEffect {
|
|||
|
||||
public JovensFerretsEffect() {
|
||||
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) {
|
||||
|
@ -100,9 +101,4 @@ class JovensFerretsEffect extends OneShotEffect {
|
|||
}
|
||||
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.";
|
||||
}
|
||||
}
|
|
@ -51,17 +51,13 @@ class KarmaDamageTargetEffect extends OneShotEffect {
|
|||
|
||||
public KarmaDamageTargetEffect() {
|
||||
super(Outcome.Damage);
|
||||
this.staticText = "{this} deals damage to that player equal to the number of Swamps they control";
|
||||
}
|
||||
|
||||
public KarmaDamageTargetEffect(KarmaDamageTargetEffect 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
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(targetPointer.getFirst(game, source));
|
||||
|
|
|
@ -78,6 +78,7 @@ class KyloRenTapTargetEffect extends TapTargetEffect {
|
|||
|
||||
public KyloRenTapTargetEffect() {
|
||||
super();
|
||||
this.staticText = "and you may tap target creature defending player controls";
|
||||
}
|
||||
|
||||
public KyloRenTapTargetEffect(final KyloRenTapTargetEffect effect) {
|
||||
|
@ -100,9 +101,4 @@ class KyloRenTapTargetEffect extends TapTargetEffect {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return "and you may tap target creature defending player controls";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,6 +46,7 @@ class SetSupertypeAllEffect extends ContinuousEffectImpl {
|
|||
|
||||
public SetSupertypeAllEffect() {
|
||||
super(Duration.WhileOnBattlefield, Layer.TypeChangingEffects_4, SubLayer.NA, Outcome.Detriment);
|
||||
this.staticText = "All nonland permanents are legendary";
|
||||
}
|
||||
|
||||
public SetSupertypeAllEffect(final SetSupertypeAllEffect effect) {
|
||||
|
@ -64,9 +65,4 @@ class SetSupertypeAllEffect extends ContinuousEffectImpl {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return "All nonland permanents are legendary";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -95,6 +95,7 @@ class LithoformEngineEffect extends OneShotEffect {
|
|||
|
||||
public LithoformEngineEffect() {
|
||||
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) {
|
||||
|
@ -120,9 +121,4 @@ class LithoformEngineEffect extends OneShotEffect {
|
|||
public LithoformEngineEffect copy() {
|
||||
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";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -76,6 +76,17 @@ class LordXanderTheCollectorEffect extends OneShotEffect {
|
|||
LordXanderTheCollectorEffect(LordXanderTheCollectorEffectType LordXanderTheCollectorEffectType) {
|
||||
super(Outcome.Benefit);
|
||||
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) {
|
||||
|
@ -132,17 +143,4 @@ class LordXanderTheCollectorEffect extends OneShotEffect {
|
|||
}
|
||||
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 "";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,6 +44,7 @@ class LostLegacyEffect extends SearchTargetGraveyardHandLibraryForCardNameAndExi
|
|||
|
||||
LostLegacyEffect() {
|
||||
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) {
|
||||
|
@ -72,9 +73,4 @@ class LostLegacyEffect extends SearchTargetGraveyardHandLibraryForCardNameAndExi
|
|||
public LostLegacyEffect copy() {
|
||||
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";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -60,6 +60,7 @@ class CounterSourceEffect extends OneShotEffect {
|
|||
|
||||
public CounterSourceEffect() {
|
||||
super(Outcome.Detriment);
|
||||
this.staticText = "counter it unless you sacrifice a land";
|
||||
}
|
||||
|
||||
public CounterSourceEffect(final CounterSourceEffect effect) {
|
||||
|
@ -96,14 +97,6 @@ class CounterSourceEffect extends OneShotEffect {
|
|||
}
|
||||
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 {
|
||||
|
|
|
@ -48,6 +48,7 @@ class MeltingEffect extends ContinuousEffectImpl {
|
|||
|
||||
public MeltingEffect() {
|
||||
super(Duration.WhileOnBattlefield, Layer.TypeChangingEffects_4, SubLayer.NA, Outcome.Detriment);
|
||||
this.staticText = "All lands are no longer snow";
|
||||
}
|
||||
|
||||
public MeltingEffect(final MeltingEffect effect) {
|
||||
|
@ -66,9 +67,4 @@ class MeltingEffect extends ContinuousEffectImpl {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return "All lands are no longer snow";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -61,9 +61,4 @@ class MemoricideEffect extends SearchTargetGraveyardHandLibraryForCardNameAndExi
|
|||
public MemoricideEffect copy() {
|
||||
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";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,6 +46,7 @@ class MorgueBurstEffect extends OneShotEffect {
|
|||
|
||||
public MorgueBurstEffect() {
|
||||
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) {
|
||||
|
@ -79,9 +80,4 @@ class MorgueBurstEffect extends OneShotEffect {
|
|||
}
|
||||
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";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -99,6 +99,7 @@ class ChangeCreatureTypeTargetEffect extends ContinuousEffectImpl {
|
|||
super(duration, Layer.TextChangingEffects_3, SubLayer.NA, Outcome.Benefit);
|
||||
this.fromSubType = fromSubType;
|
||||
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) {
|
||||
|
@ -171,9 +172,4 @@ class ChangeCreatureTypeTargetEffect extends ContinuousEffectImpl {
|
|||
public ChangeCreatureTypeTargetEffect copy() {
|
||||
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";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,6 +44,7 @@ class SpellSyphonEffect extends OneShotEffect {
|
|||
|
||||
public SpellSyphonEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "Counter target spell unless its controller pays {1} for each card in your hand";
|
||||
}
|
||||
|
||||
public SpellSyphonEffect(final SpellSyphonEffect effect) {
|
||||
|
@ -76,10 +77,4 @@ class SpellSyphonEffect extends OneShotEffect {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return "Counter target spell unless its controller pays {1} for each card in your hand";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -163,6 +163,7 @@ class OracleEnVecCantAttackRestrictionEffect extends RestrictionEffect {
|
|||
|
||||
OracleEnVecCantAttackRestrictionEffect() {
|
||||
super(Duration.Custom);
|
||||
this.staticText = "{this} can't attack.";
|
||||
}
|
||||
|
||||
OracleEnVecCantAttackRestrictionEffect(final OracleEnVecCantAttackRestrictionEffect effect) {
|
||||
|
@ -200,11 +201,6 @@ class OracleEnVecCantAttackRestrictionEffect extends RestrictionEffect {
|
|||
public boolean isInactive(Ability source, Game 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 {
|
||||
|
@ -214,6 +210,7 @@ class OracleEnVecDelayedTriggeredAbility extends DelayedTriggeredAbility {
|
|||
OracleEnVecDelayedTriggeredAbility(int startingTurn, List<UUID> chosenCreatures) {
|
||||
super(new OracleEnVecDestroyEffect(chosenCreatures), Duration.EndOfGame, true);
|
||||
this.startingTurn = startingTurn;
|
||||
setTriggerPhrase("At the beginning of that turn's end step, ");
|
||||
}
|
||||
|
||||
OracleEnVecDelayedTriggeredAbility(final OracleEnVecDelayedTriggeredAbility ability) {
|
||||
|
@ -235,11 +232,6 @@ class OracleEnVecDelayedTriggeredAbility extends DelayedTriggeredAbility {
|
|||
public OracleEnVecDelayedTriggeredAbility copy() {
|
||||
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 {
|
||||
|
|
|
@ -45,6 +45,7 @@ class OverrideEffect extends OneShotEffect {
|
|||
|
||||
public OverrideEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "Counter target spell unless its controller pays {1} for each artifact you control";
|
||||
}
|
||||
|
||||
public OverrideEffect(final OverrideEffect effect) {
|
||||
|
@ -77,10 +78,4 @@ class OverrideEffect extends OneShotEffect {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return "Counter target spell unless its controller pays {1} for each artifact you control";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -56,6 +56,7 @@ class CounterSourceEffect extends OneShotEffect {
|
|||
|
||||
public CounterSourceEffect() {
|
||||
super(Outcome.AIDontUseIt);
|
||||
this.staticText = "any player may discard three cards. If a player does, counter {this}";
|
||||
}
|
||||
|
||||
public CounterSourceEffect(final CounterSourceEffect effect) {
|
||||
|
@ -91,12 +92,4 @@ class CounterSourceEffect extends OneShotEffect {
|
|||
}
|
||||
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}";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,6 +48,10 @@ class PickTheBrainEffect extends SearchTargetGraveyardHandLibraryForCardNameAndE
|
|||
|
||||
public PickTheBrainEffect() {
|
||||
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> — 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) {
|
||||
|
@ -83,12 +87,4 @@ class PickTheBrainEffect extends SearchTargetGraveyardHandLibraryForCardNameAndE
|
|||
}
|
||||
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> — 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";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,17 +43,13 @@ class PowerSurgeDamageEffect extends OneShotEffect {
|
|||
|
||||
public PowerSurgeDamageEffect() {
|
||||
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) {
|
||||
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
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(targetPointer.getFirst(game, source));
|
||||
|
|
|
@ -44,17 +44,13 @@ class PrimalOrderDamageTargetEffect extends OneShotEffect {
|
|||
|
||||
public PrimalOrderDamageTargetEffect() {
|
||||
super(Outcome.Damage);
|
||||
this.staticText = "{this} deals damage to that player equal to the number of nonbasic lands they control";
|
||||
}
|
||||
|
||||
public PrimalOrderDamageTargetEffect(PrimalOrderDamageTargetEffect 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
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(targetPointer.getFirst(game, source));
|
||||
|
|
|
@ -47,6 +47,7 @@ class PyroblastCounterTargetEffect extends OneShotEffect {
|
|||
|
||||
public PyroblastCounterTargetEffect() {
|
||||
super(Outcome.Detriment);
|
||||
this.staticText = "Counter target spell if it's blue";
|
||||
}
|
||||
|
||||
public PyroblastCounterTargetEffect(final PyroblastCounterTargetEffect effect) {
|
||||
|
@ -66,18 +67,13 @@ class PyroblastCounterTargetEffect extends OneShotEffect {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return "Counter target spell if it's blue";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class PyroblastDestroyTargetEffect extends OneShotEffect {
|
||||
|
||||
public PyroblastDestroyTargetEffect() {
|
||||
super(Outcome.DestroyPermanent);
|
||||
this.staticText = "Destroy target permanent if it's blue";
|
||||
}
|
||||
|
||||
public PyroblastDestroyTargetEffect(final PyroblastDestroyTargetEffect effect) {
|
||||
|
@ -97,10 +93,4 @@ class PyroblastDestroyTargetEffect extends OneShotEffect {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return "Destroy target permanent if it's blue";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.Mode;
|
||||
import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CounterTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
|
@ -27,17 +28,11 @@ import mage.target.targetpointer.FixedTarget;
|
|||
*/
|
||||
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) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{W}{U}{U}");
|
||||
|
||||
// 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().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 {
|
||||
|
||||
public RenderSilentEffect() {
|
||||
|
|
|
@ -106,6 +106,7 @@ class RescueFromTheUnderworldCreateDelayedTriggeredAbilityEffect extends OneShot
|
|||
public RescueFromTheUnderworldCreateDelayedTriggeredAbilityEffect(DelayedTriggeredAbility ability) {
|
||||
super(ability.getEffects().getOutcome(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) {
|
||||
|
@ -140,12 +141,6 @@ class RescueFromTheUnderworldCreateDelayedTriggeredAbilityEffect extends OneShot
|
|||
game.addDelayedTriggeredAbility(delayedAbility, source);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return ability.getRule();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class RescueFromTheUnderworldDelayedTriggeredAbility extends DelayedTriggeredAbility {
|
||||
|
|
|
@ -88,6 +88,7 @@ class RimefeatherOwlEffect extends ContinuousEffectImpl {
|
|||
public RimefeatherOwlEffect(Duration duration, FilterPermanent filter) {
|
||||
super(duration, Layer.TypeChangingEffects_4, SubLayer.NA, Outcome.Detriment);
|
||||
this.filter = filter;
|
||||
this.staticText = "Permanents with ice counters on them are snow.";
|
||||
}
|
||||
|
||||
public RimefeatherOwlEffect(final RimefeatherOwlEffect effect) {
|
||||
|
@ -108,9 +109,4 @@ class RimefeatherOwlEffect extends ContinuousEffectImpl {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return "Permanents with ice counters on them are snow.";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -185,6 +185,7 @@ class RiskyMoveCreatureGainControlEffect extends ContinuousEffectImpl {
|
|||
public RiskyMoveCreatureGainControlEffect(Duration duration, UUID controller) {
|
||||
super(duration, Layer.ControlChangingEffects_2, SubLayer.NA, Outcome.GainControl);
|
||||
this.controller = controller;
|
||||
this.staticText = "If you lose the flip, that opponent gains control of that creature";
|
||||
}
|
||||
|
||||
public RiskyMoveCreatureGainControlEffect(final RiskyMoveCreatureGainControlEffect effect) {
|
||||
|
@ -208,9 +209,4 @@ class RiskyMoveCreatureGainControlEffect extends ContinuousEffectImpl {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return "If you lose the flip, that opponent gains control of that creature";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -148,9 +148,6 @@ class DoUnlessAnyOpponentPaysEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
if (!staticText.isEmpty()) {
|
||||
return staticText;
|
||||
}
|
||||
String effectsText = executingEffects.getText(mode);
|
||||
return effectsText.substring(0, effectsText.length() - 1) + " unless any opponent pays " + cost.getText();
|
||||
}
|
||||
|
|
|
@ -90,18 +90,18 @@ class ShiftingShadowGainEffect extends ContinuousEffectImpl {
|
|||
class ShiftingShadowEffect extends OneShotEffect {
|
||||
|
||||
private final MageObjectReference mor;
|
||||
private final String name;
|
||||
|
||||
ShiftingShadowEffect(Permanent permanent, Game game) {
|
||||
super(Outcome.Benefit);
|
||||
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) {
|
||||
super(effect);
|
||||
this.mor = effect.mor;
|
||||
this.name = effect.name;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -147,11 +147,4 @@ class ShiftingShadowEffect extends OneShotEffect {
|
|||
player.putCardsOnBottomOfLibrary(cards, game, source, false);
|
||||
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.";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -59,6 +59,7 @@ class SkilledAnimatorBecomesCreatureEffect extends BecomesCreatureTargetEffect {
|
|||
|
||||
public SkilledAnimatorBecomesCreatureEffect() {
|
||||
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) {
|
||||
|
@ -79,11 +80,6 @@ class SkilledAnimatorBecomesCreatureEffect extends BecomesCreatureTargetEffect {
|
|||
}
|
||||
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 {
|
||||
|
|
|
@ -53,6 +53,7 @@ class GainControlAllPermanentsEffect extends ContinuousEffectImpl {
|
|||
|
||||
public GainControlAllPermanentsEffect(Duration duration) {
|
||||
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) {
|
||||
|
@ -78,9 +79,4 @@ class GainControlAllPermanentsEffect extends ContinuousEffectImpl {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return "target opponent gains control of all other permanents you control";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,6 +50,7 @@ class SpellRuptureCounterUnlessPaysEffect extends OneShotEffect {
|
|||
|
||||
public SpellRuptureCounterUnlessPaysEffect() {
|
||||
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) {
|
||||
|
@ -81,11 +82,6 @@ class SpellRuptureCounterUnlessPaysEffect extends OneShotEffect {
|
|||
}
|
||||
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 {
|
||||
|
|
|
@ -56,6 +56,7 @@ class SpellSyphonEffect extends OneShotEffect {
|
|||
|
||||
public SpellSyphonEffect() {
|
||||
super(Outcome.Detriment);
|
||||
this.staticText = "Counter target spell unless its controller pays {1} for each blue permanent you control";
|
||||
}
|
||||
|
||||
public SpellSyphonEffect(final SpellSyphonEffect effect) {
|
||||
|
@ -88,10 +89,4 @@ class SpellSyphonEffect extends OneShotEffect {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return "Counter target spell unless its controller pays {1} for each blue permanent you control";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -61,6 +61,7 @@ class StreetSweeperDestroyEffect extends OneShotEffect {
|
|||
|
||||
public StreetSweeperDestroyEffect() {
|
||||
super(Outcome.DestroyPermanent);
|
||||
this.staticText = "destroy all Auras attached to target land";
|
||||
}
|
||||
|
||||
public StreetSweeperDestroyEffect(final StreetSweeperDestroyEffect effect) {
|
||||
|
@ -91,9 +92,4 @@ class StreetSweeperDestroyEffect extends OneShotEffect {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return "destroy all Auras attached to target land";
|
||||
}
|
||||
}
|
|
@ -45,6 +45,7 @@ class StrionicResonatorEffect extends OneShotEffect {
|
|||
|
||||
public StrionicResonatorEffect() {
|
||||
super(Outcome.Copy);
|
||||
this.staticText = "Copy target triggered ability you control. You may choose new targets for the copy";
|
||||
}
|
||||
|
||||
public StrionicResonatorEffect(final StrionicResonatorEffect effect) {
|
||||
|
@ -66,9 +67,4 @@ class StrionicResonatorEffect extends OneShotEffect {
|
|||
public StrionicResonatorEffect copy() {
|
||||
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";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -114,6 +114,7 @@ class ThousandYearStormEffect extends OneShotEffect {
|
|||
public ThousandYearStormEffect() {
|
||||
super(Outcome.Benefit);
|
||||
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) {
|
||||
|
@ -139,11 +140,6 @@ class ThousandYearStormEffect extends OneShotEffect {
|
|||
public void setStormCount(int 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 {
|
||||
|
|
|
@ -47,6 +47,7 @@ class TreefolkMysticEffect extends OneShotEffect {
|
|||
|
||||
public TreefolkMysticEffect() {
|
||||
super(Outcome.DestroyPermanent);
|
||||
this.staticText = "destroy all Auras attached to that creature";
|
||||
}
|
||||
|
||||
public TreefolkMysticEffect(final TreefolkMysticEffect effect) {
|
||||
|
@ -73,10 +74,4 @@ class TreefolkMysticEffect extends OneShotEffect {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return "destroy all Auras attached to that creature";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -54,6 +54,7 @@ class ViashinoHereticEffect extends OneShotEffect {
|
|||
|
||||
public ViashinoHereticEffect() {
|
||||
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) {
|
||||
|
@ -80,9 +81,4 @@ class ViashinoHereticEffect extends OneShotEffect {
|
|||
}
|
||||
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";
|
||||
}
|
||||
}
|
|
@ -44,7 +44,7 @@ class WebOfInertiaEffect extends OneShotEffect {
|
|||
|
||||
public WebOfInertiaEffect() {
|
||||
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) {
|
||||
|
@ -72,16 +72,10 @@ class WebOfInertiaEffect extends OneShotEffect {
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return staticText;
|
||||
}
|
||||
|
||||
@Override
|
||||
public WebOfInertiaEffect copy() {
|
||||
return new WebOfInertiaEffect(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class WebOfInertiaRestrictionEffect extends RestrictionEffect {
|
||||
|
@ -111,11 +105,6 @@ class WebOfInertiaRestrictionEffect extends RestrictionEffect {
|
|||
return !defenderId.equals(source.getControllerId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return staticText;
|
||||
}
|
||||
|
||||
@Override
|
||||
public WebOfInertiaRestrictionEffect copy() {
|
||||
return new WebOfInertiaRestrictionEffect(this);
|
||||
|
|
|
@ -41,6 +41,7 @@ class WheelOfTortureEffect extends OneShotEffect {
|
|||
|
||||
private WheelOfTortureEffect(final WheelOfTortureEffect 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() {
|
||||
|
@ -64,10 +65,4 @@ class WheelOfTortureEffect extends OneShotEffect {
|
|||
public WheelOfTortureEffect copy() {
|
||||
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";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -126,5 +126,4 @@ class YoseiTheMorningStarTapEffect extends OneShotEffect {
|
|||
public String getText(Mode mode) {
|
||||
return staticText;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -81,6 +81,14 @@ class GainManaAbilitiesWhileExiledEffect extends ContinuousEffectImpl {
|
|||
GainManaAbilitiesWhileExiledEffect(String colors) {
|
||||
super(Duration.Custom, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.AddAbility);
|
||||
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) {
|
||||
|
@ -129,17 +137,6 @@ class GainManaAbilitiesWhileExiledEffect extends ContinuousEffectImpl {
|
|||
}
|
||||
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 {
|
||||
|
|
|
@ -83,6 +83,9 @@ public class AmplifyEffect extends ReplacementEffectImpl {
|
|||
public AmplifyEffect(AmplifyFactor amplifyFactor) {
|
||||
super(Duration.EndOfGame, Outcome.BoostCreature);
|
||||
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) {
|
||||
|
@ -133,15 +136,6 @@ public class AmplifyEffect extends ReplacementEffectImpl {
|
|||
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
|
||||
public AmplifyEffect copy() {
|
||||
return new AmplifyEffect(this);
|
||||
|
|
|
@ -19,6 +19,7 @@ public class CantBeRegeneratedSourceEffect extends ContinuousRuleModifyingEffect
|
|||
|
||||
public CantBeRegeneratedSourceEffect(Duration duration) {
|
||||
super(duration, Outcome.Benefit, false, false);
|
||||
this.staticText = buildStaticText();
|
||||
}
|
||||
|
||||
public CantBeRegeneratedSourceEffect(final CantBeRegeneratedSourceEffect effect) {
|
||||
|
@ -56,8 +57,7 @@ public class CantBeRegeneratedSourceEffect extends ContinuousRuleModifyingEffect
|
|||
return Objects.equals(source.getSourceId(), event.getTargetId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
private String buildStaticText() {
|
||||
if (staticText != null && !staticText.isEmpty()) {
|
||||
return staticText;
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ import mage.abilities.effects.OneShotEffect;
|
|||
import mage.constants.Outcome;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
@ -28,46 +29,17 @@ import java.util.UUID;
|
|||
public class SacrificeOpponentsUnlessPayEffect extends OneShotEffect {
|
||||
|
||||
protected Cost cost;
|
||||
protected DynamicValue genericMana;
|
||||
protected DynamicValue amount;
|
||||
protected FilterPermanent filter;
|
||||
|
||||
public SacrificeOpponentsUnlessPayEffect(Cost cost) {
|
||||
this(cost, new FilterPermanent(), 1);
|
||||
}
|
||||
|
||||
public SacrificeOpponentsUnlessPayEffect(int genericManaCost) {
|
||||
this(genericManaCost, new FilterPermanent(), 1);
|
||||
this(new GenericManaCost(genericManaCost), StaticFilters.FILTER_PERMANENT);
|
||||
}
|
||||
|
||||
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);
|
||||
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.staticText = "each opponent sacrifices " + CardUtil.addArticle(filter.getMessage()) + " unless they " + CardUtil.addCostVerb(cost.getText());
|
||||
}
|
||||
|
||||
public SacrificeOpponentsUnlessPayEffect(final SacrificeOpponentsUnlessPayEffect effect) {
|
||||
|
@ -76,14 +48,6 @@ public class SacrificeOpponentsUnlessPayEffect extends OneShotEffect {
|
|||
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) {
|
||||
this.filter = effect.filter.copy();
|
||||
}
|
||||
|
@ -103,27 +67,16 @@ public class SacrificeOpponentsUnlessPayEffect extends OneShotEffect {
|
|||
Player player = game.getPlayer(playerId);
|
||||
|
||||
if (player != null) {
|
||||
Cost costToPay;
|
||||
String costValueMessage;
|
||||
if (cost != null) {
|
||||
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 + '?';
|
||||
Cost costToPay = cost.copy();
|
||||
String costValueMessage = costToPay.getText();
|
||||
String message = ((costToPay instanceof ManaCost) ? "Pay " : "") + costValueMessage + '?';
|
||||
|
||||
costToPay.clearPaid();
|
||||
if (!(player.chooseUse(Outcome.Benefit, message, source, game)
|
||||
&& costToPay.pay(source, game, source, player.getId(), false, null))) {
|
||||
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) {
|
||||
TargetPermanent target = new TargetPermanent(numTargets, numTargets, filter, true);
|
||||
|
||||
|
@ -148,43 +101,4 @@ public class SacrificeOpponentsUnlessPayEffect extends OneShotEffect {
|
|||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,6 +19,8 @@ public class CreaturesBecomeOtherTypeEffect extends ContinuousEffectImpl {
|
|||
this.subType = subType;
|
||||
|
||||
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) {
|
||||
|
@ -52,14 +54,4 @@ public class CreaturesBecomeOtherTypeEffect extends ContinuousEffectImpl {
|
|||
public boolean hasLayer(Layer layer) {
|
||||
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";
|
||||
}
|
||||
}
|
|
@ -38,6 +38,7 @@ public abstract class SearchTargetGraveyardHandLibraryForCardNameAndExileEffect
|
|||
this.searchWhatText = searchWhatText;
|
||||
this.searchForText = searchForText;
|
||||
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) {
|
||||
|
@ -98,17 +99,4 @@ public abstract class SearchTargetGraveyardHandLibraryForCardNameAndExileEffect
|
|||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue