text fixes

This commit is contained in:
Evan Kranzler 2021-04-25 14:26:22 -04:00
parent f74dfcb8b6
commit b0fdb4ef5a
18 changed files with 77 additions and 178 deletions

View file

@ -60,7 +60,7 @@ class BalduvianWarlordUnblockEffect extends OneShotEffect {
BalduvianWarlordUnblockEffect() {
super(Outcome.Benefit);
this.staticText = " Remove target blocking creature from combat. Creatures it was blocking that hadn't become blocked by another creature this combat become unblocked, then it blocks an attacking creature of your choice";
this.staticText = "Remove target blocking creature from combat. Creatures it was blocking that hadn't become blocked by another creature this combat become unblocked, then it blocks an attacking creature of your choice";
}
private BalduvianWarlordUnblockEffect(final BalduvianWarlordUnblockEffect effect) {

View file

@ -1,16 +1,11 @@
package mage.cards.c;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.LimitedTimesPerTurnActivatedAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.condition.Condition;
import mage.abilities.costs.Cost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.Effect;
import mage.abilities.effects.Effects;
import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.effects.common.turn.SkipNextTurnSourceEffect;
@ -18,14 +13,15 @@ import mage.abilities.mana.BlueManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.EffectType;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.game.permanent.token.custom.CreatureToken;
import java.util.UUID;
/**
* @author emerald000
*/
@ -38,19 +34,21 @@ public final class ChronatogTotem extends CardImpl {
this.addAbility(new BlueManaAbility());
// {1}{U}: Chronatog Totem becomes a 1/2 blue Atog artifact creature until end of turn.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect(
this.addAbility(new SimpleActivatedAbility(new BecomesCreatureSourceEffect(
new CreatureToken(1, 2, "1/2 blue Atog artifact creature")
.withColor("U")
.withSubType(SubType.ATOG)
.withType(CardType.ARTIFACT),
"", Duration.EndOfTurn), new ManaCostsImpl<>("{1}{U}")));
"", Duration.EndOfTurn
), new ManaCostsImpl<>("{1}{U}")));
// {0}: Chronatog Totem gets +3/+3 until end of turn. You skip your next turn. Activate this ability only once each turn and only if Chronatog Totem is a creature.
Ability ability = new ChronatogTotemAbility(
Ability ability = new LimitedTimesPerTurnActivatedAbility(
Zone.BATTLEFIELD,
new BoostSourceEffect(3, 3, Duration.EndOfTurn),
new ManaCostsImpl<>("{0}"),
new ChronatogTotemCondition());
new GenericManaCost(0), 1,
ChronatogTotemCondition.instance
);
ability.addEffect(new SkipNextTurnSourceEffect());
this.addAbility(ability);
}
@ -65,42 +63,8 @@ public final class ChronatogTotem extends CardImpl {
}
}
class ChronatogTotemAbility extends LimitedTimesPerTurnActivatedAbility {
private static final Effects emptyEffects = new Effects();
public ChronatogTotemAbility(Zone zone, Effect effect, Cost cost, Condition condition) {
super(zone, effect, cost);
this.condition = condition;
}
public ChronatogTotemAbility(ChronatogTotemAbility ability) {
super(ability);
}
@Override
public Effects getEffects(Game game, EffectType effectType) {
if (!condition.apply(game, this)) {
return emptyEffects;
}
return super.getEffects(game, effectType);
}
@Override
public ChronatogTotemAbility copy() {
return new ChronatogTotemAbility(this);
}
@Override
public String getRule() {
StringBuilder sb = new StringBuilder(super.getRule());
sb.deleteCharAt(sb.length() - 1); // remove last '.'
sb.append(" and only if ").append(condition.toString()).append('.');
return sb.toString();
}
}
class ChronatogTotemCondition implements Condition {
enum ChronatogTotemCondition implements Condition {
instance;
@Override
public boolean apply(Game game, Ability source) {

View file

@ -1,7 +1,5 @@
package mage.cards.c;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.ActivateIfConditionActivatedAbility;
@ -15,16 +13,12 @@ import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.continuous.SetPowerSourceEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.SubLayer;
import mage.constants.Zone;
import mage.constants.*;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
*
* @author fireshoes
*/
public final class CraterElemental extends CardImpl {
@ -36,7 +30,9 @@ public final class CraterElemental extends CardImpl {
this.toughness = new MageInt(6);
// {R}, {T}, Sacrifice Crater Elemental: Crater Elemental deals 4 damage to target creature.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(4), new ManaCostsImpl("{R}"));
Ability ability = new SimpleActivatedAbility(
new DamageTargetEffect(4, "it"), new ManaCostsImpl<>("{R}")
);
ability.addCost(new TapSourceCost());
ability.addCost(new SacrificeSourceCost());
ability.addTarget(new TargetCreaturePermanent());
@ -45,9 +41,11 @@ public final class CraterElemental extends CardImpl {
// <i>Formidable</i> &mdash; {2}{R}: Crater Elemental has base power 8 until end of turn. Activate this ability only if creatures you control have total power 8 or greater.
ability = new ActivateIfConditionActivatedAbility(
Zone.BATTLEFIELD,
new SetPowerSourceEffect(StaticValue.get(8), Duration.EndOfTurn, SubLayer.SetPT_7b),
new ManaCostsImpl("{2}{R}"),
FormidableCondition.instance);
new SetPowerSourceEffect(StaticValue.get(8), Duration.EndOfTurn, SubLayer.SetPT_7b)
.setText("{this} has base power 8 until end of turn"),
new ManaCostsImpl<>("{2}{R}"),
FormidableCondition.instance
);
ability.setAbilityWord(AbilityWord.FORMIDABLE);
this.addAbility(ability);
}

View file

@ -22,7 +22,7 @@ import mage.target.common.TargetControlledPermanent;
*/
public final class DeathlessBehemoth extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("two Eldrazi Scions");
private static final FilterControlledPermanent filter = new FilterControlledPermanent("Eldrazi Scions");
static {
filter.add(Predicates.and(

View file

@ -38,7 +38,9 @@ public final class EnergyVortex extends CardImpl {
// At the beginning of your upkeep, remove all vortex counters from Energy Vortex.
this.addAbility(new BeginningOfUpkeepTriggeredAbility(
new RemoveAllCountersSourceEffect(CounterType.VORTEX), TargetController.YOU, false
new RemoveAllCountersSourceEffect(CounterType.VORTEX)
.setText("remove all vortex counters from {this}"),
TargetController.YOU, false
));
// At the beginning of the chosen player's upkeep, Energy Vortex deals 3 damage to that player unless they pay {1} for each vortex counter on Energy Vortex.

View file

@ -29,7 +29,7 @@ public final class GoblinFirestarter extends CardImpl {
// Sacrifice Goblin Firestarter: Goblin Firestarter deals 1 damage to any target. Activate this ability only during your turn, before attackers are declared.
Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD,
new DamageTargetEffect(1), new SacrificeSourceCost(), MyTurnBeforeAttackersDeclaredCondition.instance);
new DamageTargetEffect(1,"it"), new SacrificeSourceCost(), MyTurnBeforeAttackersDeclaredCondition.instance);
ability.addTarget(new TargetAnyTarget());
this.addAbility(ability);
}

View file

@ -149,6 +149,6 @@ class HakimLoreweaverCondition implements Condition {
@Override
public String toString() {
return "only during your upkeep and only if {this} isn't enchanted";
return "during your upkeep and only if {this} isn't enchanted";
}
}

View file

@ -13,15 +13,13 @@ import mage.abilities.hint.common.MetalcraftHint;
import mage.abilities.mana.ColorlessManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.AbilityWord;
import mage.constants.CardType;
import mage.constants.SuperType;
import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.filter.StaticFilters;
import mage.filter.common.FilterArtifactPermanent;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType;
import mage.target.common.TargetCardInLibrary;
import java.util.UUID;
@ -31,12 +29,6 @@ import java.util.UUID;
*/
public final class InventorsFair extends CardImpl {
private static final FilterCard filter = new FilterCard("artifact");
static {
filter.add(CardType.ARTIFACT.getPredicate());
}
public InventorsFair(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
addSuperType(SuperType.LEGENDARY);
@ -49,7 +41,7 @@ public final class InventorsFair extends CardImpl {
// {4}, {T}, Sacrifice Inventors' Fair: Search your library for an artifact card, reveal it, put it into your hand, then shuffle your library.
// Activate this ability only if you control threeor more artifacts.
Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new SearchLibraryPutInHandEffect(new TargetCardInLibrary(1, filter), true),
Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD, new SearchLibraryPutInHandEffect(new TargetCardInLibrary(StaticFilters.FILTER_CARD_ARTIFACT), true),
new GenericManaCost(4), MetalcraftCondition.instance);
ability.addCost(new TapSourceCost());
ability.addCost(new SacrificeSourceCost());

View file

@ -71,7 +71,7 @@ class LiciaSanguineTribuneCostReductionEffect extends CostModificationEffectImpl
LiciaSanguineTribuneCostReductionEffect() {
super(Duration.WhileOnStack, Outcome.Benefit, CostModificationType.REDUCE_COST);
staticText = "this spell costs {1} less to cast for each 1 life you have gained this turn.";
staticText = "this spell costs {1} less to cast for each 1 life you gained this turn.";
}
LiciaSanguineTribuneCostReductionEffect(LiciaSanguineTribuneCostReductionEffect effect) {

View file

@ -1,13 +1,11 @@
package mage.cards.l;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.ActivateIfConditionActivatedAbility;
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
import mage.abilities.condition.Condition;
import mage.abilities.costs.Cost;
import mage.abilities.costs.CostImpl;
import mage.abilities.condition.common.SourceHasCounterCondition;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.CreateTokenEffect;
@ -15,32 +13,40 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.counters.CounterType;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType;
import mage.game.permanent.token.AngelToken;
import mage.watchers.common.PlayerLostLifeWatcher;
import java.util.UUID;
/**
*
* @author jeffwadsworth
*/
public final class LuminarchAscension extends CardImpl {
private static final String rule = "At the beginning of each opponent's end step, if you didn't lose life this turn, you may put a quest counter on {this}. (Damage causes loss of life.)";
private static final String rule = "At the beginning of each opponent's end step, " +
"if you didn't lose life this turn, you may put a quest counter on {this}.";
private static final Condition condition = new SourceHasCounterCondition(CounterType.QUEST, 4);
public LuminarchAscension(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}");
// At the beginning of each opponent's end step, if you didn't lose life this turn, you may put a quest counter on Luminarch Ascension.
this.addAbility(new ConditionalInterveningIfTriggeredAbility(new LuminarchAscensionTriggeredAbility(), YouLostNoLifeThisTurnCondition.instance, rule));
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
new BeginningOfEndStepTriggeredAbility(
new AddCountersSourceEffect(CounterType.QUEST.createInstance()),
TargetController.OPPONENT, true
), LuminarchAscensionCondition.instance, rule
));
// {1}{W}: Create a 4/4 white Angel creature token with flying. Activate this ability only if Luminarch Ascension has four or more quest counters on it.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new AngelToken()), new ManaCostsImpl("{1}{W}"));
ability.addCost(new SourceHasCountersCost(4, CounterType.QUEST));
this.addAbility(ability);
this.addAbility(new ActivateIfConditionActivatedAbility(
Zone.BATTLEFIELD, new CreateTokenEffect(new AngelToken()),
new ManaCostsImpl<>("{1}{W}"), condition
));
}
private LuminarchAscension(final LuminarchAscension card) {
@ -53,68 +59,7 @@ public final class LuminarchAscension extends CardImpl {
}
}
class LuminarchAscensionTriggeredAbility extends TriggeredAbilityImpl {
public LuminarchAscensionTriggeredAbility() {
super(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.QUEST.createInstance()), true);
}
public LuminarchAscensionTriggeredAbility(LuminarchAscensionTriggeredAbility ability) {
super(ability);
}
@Override
public LuminarchAscensionTriggeredAbility copy() {
return new LuminarchAscensionTriggeredAbility(this);
}
@Override
public boolean checkEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.END_TURN_STEP_PRE;
}
@Override
public boolean checkTrigger(GameEvent event, Game game) {
return game.getOpponents(controllerId).contains(event.getPlayerId());
}
}
class SourceHasCountersCost extends CostImpl {
private final int counters;
private final CounterType counterType;
public SourceHasCountersCost(int counters, CounterType counterType) {
this.counters = counters;
this.counterType = counterType;
this.text = "Activate only if Luminarch Ascension has 4 or more quest counters on it";
}
public SourceHasCountersCost(final SourceHasCountersCost cost) {
super(cost);
this.counters = cost.counters;
this.counterType = cost.counterType;
}
@Override
public boolean canPay(Ability ability, Ability source, UUID controllerId, Game game) {
return (game.getPermanent(source.getSourceId()).getCounters(game).getCount(counterType) >= counters);
}
@Override
public boolean pay(Ability ability, Game game, Ability source, UUID controllerId, boolean noMana, Cost costToPay) {
this.paid = true;
return paid;
}
@Override
public SourceHasCountersCost copy() {
return new SourceHasCountersCost(this);
}
}
enum YouLostNoLifeThisTurnCondition implements Condition {
enum LuminarchAscensionCondition implements Condition {
instance;
@Override

View file

@ -62,8 +62,7 @@ public final class Marjhan extends CardImpl {
// {U}{U}: Marjhan gets -1/-0 until end of turn and deals 1 damage to target attacking creature without flying.
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(-1, 0, Duration.EndOfTurn), new ManaCostsImpl("{U}{U}"));
Effect effect = new DamageTargetEffect(1);
ability.addEffect(effect);
ability.addEffect(new DamageTargetEffect(1, "and"));
ability.addTarget(new TargetCreaturePermanent(filter));
this.addAbility(ability);

View file

@ -36,7 +36,7 @@ public final class TransmogrifyingWand extends CardImpl {
// Transmogrifying Wand enters the battlefield with three charge counters on it.
this.addAbility(new EntersBattlefieldAbility(
new AddCountersSourceEffect(CounterType.CHARGE.createInstance(3)),
"{this} enters the battlefield with three charge counters on it"
"with three charge counters on it"
));
// {1}, {T}, Remove a charge counter from Transmogrifying Wand: Destroy target creature. Its controller creates a 2/4 white Ox creature token. Activate this ability only any time you could cast a sorcery.

View file

@ -46,7 +46,7 @@ public final class VentifactBottle extends CardImpl {
new SourceHasCounterCondition(CounterType.CHARGE, 1, Integer.MAX_VALUE),
"At the beginning of your precombat main phase, "
+ "if {this} has a charge counter on it, tap it and remove all charge counters from it. "
+ "Add {C} for each charge counter removed this way"));
+ "Add {C} for each charge counter removed this way."));
}
private VentifactBottle(final VentifactBottle card) {

View file

@ -21,7 +21,7 @@ import mage.constants.SubType;
import mage.constants.SuperType;
import mage.counters.CounterType;
import mage.game.Game;
import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.common.TargetControlledPermanent;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
@ -51,7 +51,8 @@ public final class VishKalBloodArbiter extends CardImpl {
this.addAbility(new SimpleActivatedAbility(
new AddCountersSourceEffect(
CounterType.P1P1.createInstance(), SacrificeCostCreaturesPower.instance, true
), new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT))
).setText("put X +1/+1 counters on {this}, where X is the sacrificed creature's power"),
new SacrificeTargetCost(new TargetControlledPermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT))
));
// Remove all +1/+1 counters from Vish Kal: Target creature gets -1/-1 until end of turn for each +1/+1 counter removed this way.
@ -59,7 +60,7 @@ public final class VishKalBloodArbiter extends CardImpl {
VishKalBloodArbiterDynamicValue.instance,
VishKalBloodArbiterDynamicValue.instance,
Duration.EndOfTurn, true
), new RemoveAllCountersSourceCost(CounterType.P1P1));
).setText("target creature gets -1/-1 until end of turn for each +1/+1 counter removed this way"), new RemoveAllCountersSourceCost(CounterType.P1P1));
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
}

View file

@ -18,9 +18,7 @@ import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.TargetController;
import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.players.Player;
import mage.target.TargetPlayer;
import mage.target.common.TargetCardInHand;
@ -45,10 +43,11 @@ public final class VolrathsDungeon extends CardImpl {
this.addAbility(ability);
// Discard a card: Target player puts a card from their hand on top of their library. Activate this ability only any time you could cast a sorcery.
FilterCard filter = new FilterCard("a card for payment");
Ability ability2 = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new VolrathsDungeonEffect(), new DiscardCardCost(filter));
ability2.addTarget(new TargetPlayer());
this.addAbility(ability2);
ability = new ActivateAsSorceryActivatedAbility(
Zone.BATTLEFIELD, new VolrathsDungeonEffect(), new DiscardCardCost()
);
ability.addTarget(new TargetPlayer());
this.addAbility(ability);
}
private VolrathsDungeon(final VolrathsDungeon card) {

View file

@ -21,7 +21,7 @@ import java.util.UUID;
*/
public final class WirewoodSymbiote extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("Elf");
private static final FilterControlledPermanent filter = new FilterControlledPermanent("an Elf");
static {
filter.add(SubType.ELF.getPredicate());

View file

@ -7,9 +7,9 @@ import mage.cards.Card;
import mage.counters.CounterType;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.util.CardUtil;
/**
*
* @author nantuko
*/
public class SourceHasCounterCondition implements Condition {
@ -68,14 +68,13 @@ public class SourceHasCounterCondition implements Condition {
@Override
public String toString() {
if (from != -1) { //range compare
if (from != -1) {
if (to == Integer.MAX_VALUE) {
return "{this} has equal to or more than " + from + " " + this.counterType.toString() + " counters";
}
return "{this} has between " + from + " and " + to + " " + this.counterType.toString() + " counters";
} else // single compare (lte)
{
return "{this} has equal or more than " + amount + " " + this.counterType.toString() + " counters";
} else {
return "{this} has " + CardUtil.numberToText(amount) + " or more " + this.counterType.toString() + " counters on it";
}
}
}

View file

@ -3,6 +3,7 @@ package mage.abilities.effects.common;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.effects.OneShotEffect;
import mage.cards.Cards;
import mage.cards.CardsImpl;
@ -17,8 +18,6 @@ import mage.target.common.TargetCardInHand;
import mage.target.common.TargetCardInYourGraveyard;
import mage.util.CardUtil;
import java.util.Locale;
/**
* @author BetaSteward_at_googlemail.com
*/
@ -43,7 +42,6 @@ public class ExileFromZoneTargetEffect extends OneShotEffect {
this.filter = filter;
this.amount = amount;
this.withSource = withSource;
setText();
}
public ExileFromZoneTargetEffect(final ExileFromZoneTargetEffect effect) {
@ -87,8 +85,10 @@ public class ExileFromZoneTargetEffect extends OneShotEffect {
return new ExileFromZoneTargetEffect(this);
}
private void setText() {
staticText = "target player exiles " + CardUtil.numberToText(amount, "a")
+ ' ' + filter.getMessage() + " from their " + zone.toString().toLowerCase(Locale.ENGLISH);
@Override
public String getText(Mode mode) {
return "target " + mode.getTargets().get(0).getTargetName() + " exiles "
+ CardUtil.numberToText(amount, "a") + ' ' + filter.getMessage()
+ " from their " + zone.toString().toLowerCase();
}
}