[2X2] various text fixes

This commit is contained in:
Evan Kranzler 2022-06-27 21:21:59 -04:00
parent d911b70bb4
commit 015444d00f
15 changed files with 79 additions and 143 deletions

View file

@ -38,8 +38,8 @@ public final class AbzanCharm extends CardImpl {
this.getSpellAbility().addEffect(new ExileTargetEffect());
// *You draw two cards and you lose 2 life
Mode mode = new Mode(new DrawCardSourceControllerEffect(2));
mode.addEffect(new LoseLifeSourceControllerEffect(2));
Mode mode = new Mode(new DrawCardSourceControllerEffect(2).setText("you draw two cards"));
mode.addEffect(new LoseLifeSourceControllerEffect(2).concatBy("and"));
this.getSpellAbility().addMode(mode);
// *Distribute two +1/+1 counters among one or two target creatures.

View file

@ -41,7 +41,7 @@ public final class ArachnusWeb extends CardImpl {
FilterPermanent filter = new FilterPermanent("if enchanted creature's power is 4 or greater");
filter.add(new PowerPredicate(ComparisonType.MORE_THAN, 3));
this.addAbility(new BeginningOfEndStepTriggeredAbility(Zone.BATTLEFIELD,
new DestroySourceEffect(), TargetController.ANY,
new DestroySourceEffect(), TargetController.NEXT,
new AttachedToMatchesFilterCondition(filter), false));
}

View file

@ -46,7 +46,7 @@ public final class AtarkasCommand extends CardImpl {
effect.setText("Creatures you control get +1/+1");
mode = new Mode(effect);
effect = new GainAbilityControlledEffect(ReachAbility.getInstance(), Duration.EndOfTurn);
effect.setText("and gain reach until the end of turn");
effect.setText("and gain reach until end of turn");
mode.addEffect(effect);
this.getSpellAbility().addMode(mode);

View file

@ -1,8 +1,6 @@
package mage.cards.c;
import java.util.UUID;
import mage.Mana;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.GenericManaCost;
@ -14,17 +12,18 @@ import mage.abilities.keyword.EquipAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.constants.SubType;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.permanent.Permanent;
import mage.players.Player;
import java.util.Objects;
import java.util.Optional;
import java.util.UUID;
/**
*
* @author spjspj
*/
public final class ConquerorsFlail extends CardImpl {
@ -35,10 +34,12 @@ public final class ConquerorsFlail extends CardImpl {
this.subtype.add(SubType.EQUIPMENT);
// Equipped creature gets +1/+1 for each color among permanents you control.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(new ConquerorsFlailColorCount(), new ConquerorsFlailColorCount(), Duration.WhileOnBattlefield)));
this.addAbility(new SimpleStaticAbility(new BoostEquippedEffect(
ConquerorsFlailColorCount.instance, ConquerorsFlailColorCount.instance, Duration.WhileOnBattlefield
)));
// As long as Conqueror's Flail is attached to a creature, your opponents can't cast spells during your turn.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConquerorsFlailEffect()));
this.addAbility(new SimpleStaticAbility(new ConquerorsFlailEffect()));
// Equip {2}
this.addAbility(new EquipAbility(Outcome.BoostCreature, new GenericManaCost(2), false));
@ -54,38 +55,18 @@ public final class ConquerorsFlail extends CardImpl {
}
}
class ConquerorsFlailColorCount implements DynamicValue {
enum ConquerorsFlailColorCount implements DynamicValue {
instance;
@Override
public int calculate(Game game, Ability sourceAbility, Effect effect) {
Player controller = game.getPlayer(sourceAbility.getControllerId());
int count = 0;
if (controller != null) {
Mana mana = new Mana();
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(controller.getId())) {
if (mana.getBlack() == 0 && permanent.getColor(game).isBlack()) {
mana.increaseBlack();
count++;
}
if (mana.getBlue() == 0 && permanent.getColor(game).isBlue()) {
mana.increaseBlue();
count++;
}
if (mana.getRed() == 0 && permanent.getColor(game).isRed()) {
mana.increaseRed();
count++;
}
if (mana.getGreen() == 0 && permanent.getColor(game).isGreen()) {
mana.increaseGreen();
count++;
}
if (mana.getWhite() == 0 && permanent.getColor(game).isWhite()) {
mana.increaseWhite();
count++;
}
}
}
return count;
ObjectColor color = new ObjectColor("");
game.getBattlefield()
.getAllActivePermanents(sourceAbility.getControllerId())
.stream()
.map(permanent -> permanent.getColor(game))
.forEach(color::addColor);
return color.getColorCount();
}
@Override
@ -95,12 +76,12 @@ class ConquerorsFlailColorCount implements DynamicValue {
@Override
public String getMessage() {
return "for each color among permanents you control";
return "color among permanents you control";
}
@Override
public ConquerorsFlailColorCount copy() {
return new ConquerorsFlailColorCount();
return this;
}
}
@ -108,7 +89,7 @@ class ConquerorsFlailEffect extends ContinuousRuleModifyingEffectImpl {
public ConquerorsFlailEffect() {
super(Duration.WhileOnBattlefield, Outcome.Benefit);
staticText = "As long as {this} is attached to a creature, your opponents can't cast spells during your turn";
staticText = "as long as {this} is attached to a creature, your opponents can't cast spells during your turn";
}
public ConquerorsFlailEffect(final ConquerorsFlailEffect effect) {
@ -132,20 +113,15 @@ class ConquerorsFlailEffect extends ContinuousRuleModifyingEffectImpl {
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
Permanent permanent = game.getPermanent(source.getSourceId());
boolean isAttached = false;
if (permanent != null) {
UUID attachedTo = permanent.getAttachedTo();
Permanent attachment = game.getPermanent(attachedTo);
if (attachment != null) {
isAttached = true;
}
}
if (isAttached && game.isActivePlayer(source.getControllerId())
&& game.getPlayer(source.getControllerId()).hasOpponent(event.getPlayerId(), game)) {
return true;
}
return false;
return game.isActivePlayer(source.getControllerId())
&& game.getOpponents(source.getControllerId()).contains(event.getPlayerId())
&& Optional
.of(source.getSourcePermanentIfItStillExists(game))
.filter(Objects::nonNull)
.map(Permanent::getAttachedTo)
.map(game::getPermanent)
.filter(Objects::nonNull)
.map(permanent -> permanent.isCreature(game))
.orElse(false);
}
}

View file

@ -52,7 +52,7 @@ class CracklingDoomEffect extends OneShotEffect {
public CracklingDoomEffect() {
super(Outcome.Sacrifice);
this.staticText = "Each opponent sacrifices a creature with the greatest power among creatures they control";
this.staticText = "Each opponent sacrifices a creature with the greatest power among creatures that player controls";
}
public CracklingDoomEffect(final CracklingDoomEffect effect) {

View file

@ -34,7 +34,7 @@ public final class DacksDuplicate extends CardImpl {
// You may have Dack's Duplicate enter the battlefield as a copy of any creature on the battlefield except it has haste and dethrone.
Effect effect = new CopyPermanentEffect(StaticFilters.FILTER_PERMANENT_CREATURE, new DacksDuplicateCopyApplier());
effect.setText("as a copy of any creature on the battlefield except it has haste and dethrone");
effect.setText("as a copy of any creature on the battlefield, except it has haste and dethrone");
this.addAbility(new EntersBattlefieldAbility(effect, true));
}

View file

@ -25,7 +25,7 @@ import mage.filter.predicate.mageobject.ColorlessPredicate;
*/
public final class EmrakulTheAeonsTorn extends CardImpl {
private static final FilterStackObject filter = new FilterStackObject("colored spells");
private static final FilterStackObject filter = new FilterStackObject("spells that are one or more colors");
static {
filter.add(Predicates.not(ColorlessPredicate.instance));

View file

@ -42,7 +42,7 @@ public final class GhaveGuruOfSpores extends CardImpl {
this.toughness = new MageInt(0);
// Ghave, Guru of Spores enters the battlefield with five +1/+1 counters on it.
this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(5))));
this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(5)), "with five +1/+1 counters on it"));
// {1}, Remove a +1/+1 counter from a creature you control: Create a 1/1 green Saproling creature token.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new SaprolingToken()), new GenericManaCost(1));

View file

@ -21,7 +21,7 @@ import java.util.UUID;
public final class JudithTheScourgeDiva extends CardImpl {
private static final FilterCreaturePermanent filter
= new FilterCreaturePermanent("nontoken creature you control");
= new FilterCreaturePermanent("a nontoken creature you control");
static {
filter.add(TargetController.YOU.getControllerPredicate());

View file

@ -1,8 +1,7 @@
package mage.cards.l;
import java.util.UUID;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.Ability;
import mage.abilities.common.BecomesTargetTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.DamageTargetEffect;
@ -13,17 +12,14 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.AttachmentType;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType;
import mage.game.stack.Spell;
import mage.constants.SubType;
import mage.filter.StaticFilters;
import mage.target.common.TargetAnyTarget;
import java.util.UUID;
/**
*
* @author North
*/
public final class LivewireLash extends CardImpl {
@ -32,12 +28,15 @@ public final class LivewireLash extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
this.subtype.add(SubType.EQUIPMENT);
// Equipped creature gets +2/+0
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(2, 0)));
// and has "Whenever this creature becomes the target of a spell, this creature deals 2 damage to any target."
LivewireLashAbility ability = new LivewireLashAbility();
ability.addTarget(new TargetAnyTarget());
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(ability, AttachmentType.EQUIPMENT)));
// Equipped creature gets +2/+0 and has "Whenever this creature becomes the target of a spell, this creature deals 2 damage to any target."
Ability ability = new SimpleStaticAbility(new BoostEquippedEffect(2, 0));
Ability ability2 = new BecomesTargetTriggeredAbility(
new DamageTargetEffect(2, "it"), StaticFilters.FILTER_SPELL_A
).setTriggerPhrase("Whenever this creature becomes the target of a spell, ");
ability2.addTarget(new TargetAnyTarget());
ability.addEffect(new GainAbilityAttachedEffect(ability2, AttachmentType.EQUIPMENT)
.setText("and has \"Whenever this creature becomes the target of a spell, this creature deals 2 damage to any target.\""));
this.addAbility(ability);
// Equip {2}
this.addAbility(new EquipAbility(Outcome.BoostCreature, new GenericManaCost(2), false));
@ -52,39 +51,3 @@ public final class LivewireLash extends CardImpl {
return new LivewireLash(this);
}
}
class LivewireLashAbility extends TriggeredAbilityImpl {
public LivewireLashAbility() {
super(Zone.BATTLEFIELD, new DamageTargetEffect(2));
}
public LivewireLashAbility(final LivewireLashAbility ability) {
super(ability);
}
@Override
public LivewireLashAbility copy() {
return new LivewireLashAbility(this);
}
@Override
public boolean checkEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.TARGETED;
}
@Override
public boolean checkTrigger(GameEvent event, Game game) {
if (event.getTargetId().equals(sourceId)) {
if (game.getObject(event.getSourceId()) instanceof Spell) {
return true;
}
}
return false;
}
@Override
public String getRule() {
return "Whenever this creature becomes the target of a spell, this creature deals 2 damage to any target.";
}
}

View file

@ -1,7 +1,5 @@
package mage.cards.l;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.DiscardTargetCost;
@ -13,19 +11,17 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.counters.CounterType;
import mage.filter.common.FilterCreatureCard;
import mage.filter.StaticFilters;
import mage.target.common.TargetCardInHand;
import java.util.UUID;
/**
*
* @author jeffwadsworth
*/
public final class LotlethTroll extends CardImpl {
private static final FilterCreatureCard filter = new FilterCreatureCard("creature card in your hand");
public LotlethTroll(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}{G}");
this.subtype.add(SubType.ZOMBIE);
@ -38,10 +34,13 @@ public final class LotlethTroll extends CardImpl {
this.addAbility(TrampleAbility.getInstance());
// Discard a creature card: Put a +1/+1 counter on Lotleth Troll.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance()), new DiscardTargetCost(new TargetCardInHand(filter))));
this.addAbility(new SimpleActivatedAbility(
new AddCountersSourceEffect(CounterType.P1P1.createInstance()),
new DiscardTargetCost(new TargetCardInHand(StaticFilters.FILTER_CARD_CREATURE_A))
));
// {B}: Regenerate Lotleth Troll.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ManaCostsImpl<>("{B}")));
this.addAbility(new SimpleActivatedAbility(new RegenerateSourceEffect(), new ManaCostsImpl<>("{B}")));
}
private LotlethTroll(final LotlethTroll card) {

View file

@ -23,11 +23,11 @@ import mage.game.events.ZoneChangeEvent;
import mage.game.permanent.Permanent;
import mage.game.permanent.PermanentToken;
import mage.players.Player;
import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.targetpointer.FixedTarget;
import mage.util.ManaUtil;
import java.util.UUID;
import mage.target.common.TargetControlledCreaturePermanent;
/**
* @author nantuko
@ -45,10 +45,10 @@ public final class NimDeathmantle extends CardImpl {
).setText(", has intimidate"));
ability.addEffect(new SetCardColorAttachedEffect(
ObjectColor.BLACK, Duration.WhileOnBattlefield, AttachmentType.EQUIPMENT
).setText(", and is"));
).setText(", and is a black"));
ability.addEffect(new SetCardSubtypeAttachedEffect(
Duration.WhileOnBattlefield, AttachmentType.EQUIPMENT, SubType.ZOMBIE
).setText("black Zombie").concatBy("a"));
).setText("Zombie"));
this.addAbility(ability);
// Whenever a nontoken creature is put into your graveyard from the battlefield, you may pay {4}. If you do, return that card to the battlefield and attach Nim Deathmantle to it.

View file

@ -1,7 +1,5 @@
package mage.cards.s;
import java.util.UUID;
import mage.abilities.effects.common.counter.AddCountersAllEffect;
import mage.abilities.effects.keyword.BolsterEffect;
import mage.cards.CardImpl;
@ -10,8 +8,9 @@ import mage.constants.CardType;
import mage.counters.CounterType;
import mage.filter.StaticFilters;
import java.util.UUID;
/**
*
* @author LevelX2
*/
public final class ScaleBlessing extends CardImpl {
@ -20,12 +19,12 @@ public final class ScaleBlessing extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{W}");
// Bolster 1,
this.getSpellAbility().addEffect(new BolsterEffect(1).setText("Bolster 1, "));
this.getSpellAbility().addEffect(new BolsterEffect(1).setText("Bolster 1"));
// then put a +1/+1 counter on each creature you control with a +1/+1 counter on it. <i.(To bolster 1, choose a creature with the least toughness among creatures you control and put +1/+1 counter on it.)</i>
this.getSpellAbility().addEffect(new AddCountersAllEffect(
CounterType.P1P1.createInstance(), StaticFilters.FILTER_EACH_CONTROLLED_CREATURE_P1P1
).setText("then put a +1/+1 counter on each creature you control with a +1/+1 counter on it. " +
).setText(", then put a +1/+1 counter on each creature you control with a +1/+1 counter on it. " +
"<i>(To bolster 1, choose a creature with the least toughness among creatures you control " +
"and put a +1/+1 counter on it.)</i>"));
}

View file

@ -1,7 +1,5 @@
package mage.cards.t;
import java.util.UUID;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect;
import mage.cards.CardImpl;
@ -9,8 +7,9 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.target.TargetPlayer;
import java.util.UUID;
/**
*
* @author North
*/
public final class ThoughtScour extends CardImpl {
@ -18,12 +17,12 @@ public final class ThoughtScour extends CardImpl {
public ThoughtScour(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{U}");
// Target player puts the top two cards of their library into their graveyard.
this.getSpellAbility().addTarget(new TargetPlayer());
this.getSpellAbility().addEffect(new PutLibraryIntoGraveTargetEffect(2));
// Draw a card.
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1));
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1).concatBy("<br>"));
}
private ThoughtScour(final ThoughtScour card) {

View file

@ -60,7 +60,7 @@ public class VerifyCardDataTest {
private static final Logger logger = Logger.getLogger(VerifyCardDataTest.class);
private static final String FULL_ABILITIES_CHECK_SET_CODE = "CLB"; // check all abilities and output cards with wrong abilities texts;
private static final String FULL_ABILITIES_CHECK_SET_CODE = "2X2"; // check all abilities and output cards with wrong abilities texts;
private static final boolean AUTO_FIX_SAMPLE_DECKS = false; // debug only: auto-fix sample decks by test_checkSampleDecks test run
private static final boolean ONLY_TEXT = false; // use when checking text locally, suppresses unnecessary checks and output messages