[AFR] various text fixes

This commit is contained in:
Evan Kranzler 2021-07-15 18:39:46 -04:00
parent d2f2578cc4
commit 3299641ad4
30 changed files with 78 additions and 66 deletions

View file

@ -20,7 +20,7 @@ import mage.target.common.TargetCreaturePermanent;
*/
public final class AirCultElemental extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("other creature");
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("other target creature");
static {
filter.add(AnotherPredicate.instance);

View file

@ -52,7 +52,7 @@ public final class BardClass extends CardImpl {
// Legendary spells you cast cost {R}{G} less to cast. This effect reduces only the amount of colored mana you pay.
this.addAbility(new SimpleStaticAbility(new GainClassAbilitySourceEffect(
new SpellsCostReductionControllerEffect(filter, new ManaCostsImpl<>("{W}{B}")), 2
new SpellsCostReductionControllerEffect(filter, new ManaCostsImpl<>("{R}{G}")), 2
)));
// {3}{R}{G}: Level 3

View file

@ -33,7 +33,7 @@ public final class ContactOtherPlane extends CardImpl {
// 20 | Scry 3, then draw three cards.
effect.addTableEntry(
20, 20, new ScryEffect(3, false),
new DrawCardSourceControllerEffect(2).concatBy(", then")
new DrawCardSourceControllerEffect(3).concatBy(", then")
);
}

View file

@ -31,7 +31,7 @@ public final class DawnbringerCleric extends CardImpl {
// When Dawnbringer Cleric enters the battlefield, choose one
// Cure Wounds You gain 2 life.
Ability ability = new EntersBattlefieldTriggeredAbility(new GainLifeEffect(1));
Ability ability = new EntersBattlefieldTriggeredAbility(new GainLifeEffect(2));
ability.getModes().getMode().withFlavorWord("Cure Wounds");
// Dispel Magic Destroy target enchantment.

View file

@ -3,18 +3,19 @@ package mage.cards.d;
import mage.MageInt;
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.CompletedDungeonCondition;
import mage.abilities.condition.common.MorbidCondition;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.DoIfCostPaid;
import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.abilities.hint.common.MorbidHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.game.permanent.token.SkeletonToken;
import mage.watchers.common.CompletedDungeonWatcher;
import mage.watchers.common.MorbidWatcher;
import java.util.UUID;
@ -51,8 +52,8 @@ public final class DeathPriestOfMyrkul extends CardImpl {
this.addAbility(new BeginningOfEndStepTriggeredAbility(
Zone.BATTLEFIELD,
new DoIfCostPaid(new CreateTokenEffect(new SkeletonToken()), new GenericManaCost(1)),
TargetController.YOU, CompletedDungeonCondition.instance, false
).addHint(CompletedDungeonCondition.getHint()), new CompletedDungeonWatcher());
TargetController.YOU, MorbidCondition.instance, false
).addHint(MorbidHint.instance), new MorbidWatcher());
}
private DeathPriestOfMyrkul(final DeathPriestOfMyrkul card) {

View file

@ -49,7 +49,7 @@ public final class FighterClass extends CardImpl {
// When Fighter Class enters the battlefield, search your library for an Equipment card, reveal it, put it into your hand, then shuffle.
this.addAbility(new EntersBattlefieldTriggeredAbility(
new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filter))
new SearchLibraryPutInHandEffect(new TargetCardInLibrary(filter), true)
));
// {1}{R}{W}: Level 2
@ -58,7 +58,7 @@ public final class FighterClass extends CardImpl {
// Equip abilities you activate cost {2} less to activate.
this.addAbility(new SimpleStaticAbility(new GainClassAbilitySourceEffect(
new AbilitiesCostReductionControllerEffect(EquipAbility.class, "Equip")
.setText("\"equip abilities you activate cost {2} less to activate\""),
.setText("equip abilities you activate cost {2} less to activate"),
2
)));

View file

@ -43,7 +43,7 @@ public final class FindThePath extends CardImpl {
new SimpleManaAbility(
Zone.BATTLEFIELD, new Mana(ManaType.GREEN, 2), new TapSourceCost()
), AttachmentType.AURA
)));
).setText("enchanted land has \"{T}: Add {G}{G}.\"")));
}
private FindThePath(final FindThePath card) {

View file

@ -33,7 +33,9 @@ public final class GoblinMorningstar extends CardImpl {
// Equipped creature gets +1/+0 and has trample.
Ability ability = new SimpleStaticAbility(new BoostEquippedEffect(1, 0));
ability.addEffect(new GainAbilityAttachedEffect(TrampleAbility.getInstance(), AttachmentType.EQUIPMENT));
ability.addEffect(new GainAbilityAttachedEffect(
TrampleAbility.getInstance(), AttachmentType.EQUIPMENT
).setText("and has trample"));
this.addAbility(ability);
// Equip {1}{R}

View file

@ -36,7 +36,7 @@ public final class GreenDragon extends CardImpl {
// Poison Breath When Green Dragon enters the battlefield, until end of turn, whenever a creature an opponent controls is dealt damage, destroy it.
this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateDelayedTriggeredAbilityEffect(
new GreenDragonDelayedTriggeredAbility(), false
)));
)).withFlavorWord("Poison Breath"));
}
private GreenDragon(final GreenDragon card) {

View file

@ -1,12 +1,9 @@
package mage.cards.g;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.abilities.effects.common.combat.CantBeBlockedSourceEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.cards.CardImpl;
@ -15,7 +12,6 @@ import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.counters.CounterType;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
@ -34,7 +30,9 @@ public final class GuildThief extends CardImpl {
// Whenever Guild Thief deals combat damage to a player, put a +1/+1 counter on it.
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(
new AddCountersSourceEffect(CounterType.P1P1.createInstance(1)), false
new AddCountersSourceEffect(CounterType.P1P1.createInstance(1))
.setText("put a +1/+1 counter on it"),
false
));
// Cunning Action {3}{U}: Guild Thief can't be blocked this turn.

View file

@ -31,7 +31,7 @@ public final class IronGolem extends CardImpl {
// Iron Golem attacks or blocks each combat if able.
Ability ability = new SimpleStaticAbility(new AttacksIfAbleSourceEffect(Duration.WhileOnBattlefield).setText("{this} attacks"));
ability.addEffect(new BlocksIfAbleSourceEffect(Duration.WhileOnBattlefield).setText("or blocks each combat if able"));
ability.addEffect(new BlocksIfAbleSourceEffect(Duration.WhileOnBattlefield).setText("blocks each combat if able").concatBy("or"));
this.addAbility(ability);
}

View file

@ -56,7 +56,7 @@ public final class LightfootRogue extends CardImpl {
20, 20,
new BoostSourceEffect(
3, 0, Duration.EndOfTurn
).setText("it gets +1/+0"),
).setText("it gets +3/+0"),
new GainAbilitySourceEffect(
FirstStrikeAbility.getInstance(), Duration.EndOfTurn
).setText("and gains first strike"),

View file

@ -39,7 +39,7 @@ public final class LoathsomeTroll extends CardImpl {
));
// 10-19 | Return Loathsome Troll to your hand.
effect.addTableEntry(10, 19, new ReturnToHandSourceEffect().setText("retun {this} to your hand"));
effect.addTableEntry(10, 19, new ReturnToHandSourceEffect().setText("return {this} to your hand"));
// 20 | Return Loathsome Troll to the battlefield tapped.
effect.addTableEntry(20, 20, new ReturnSourceFromGraveyardToBattlefieldEffect(true)

View file

@ -58,7 +58,7 @@ enum MercadianAtlasCondition implements Condition {
@Override
public String toString() {
return "{this} is attacking";
return "you didn't play a land this turn";
}
}

View file

@ -46,7 +46,7 @@ public final class OswaldFiddlebender extends CardImpl {
ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(
StaticFilters.FILTER_CONTROLLED_PERMANENT_ARTIFACT_AN
)));
this.addAbility(ability);
this.addAbility(ability.withFlavorWord("Magical Tinkering"));
}
private OswaldFiddlebender(final OswaldFiddlebender card) {

View file

@ -58,7 +58,7 @@ class PowerOfPersuasionEffect extends OneShotEffect {
PowerOfPersuasionEffect() {
super(Outcome.Benefit);
staticText = "its owner puts it on the top of bottom of their library";
staticText = "its owner puts it on the top or bottom of their library";
}
private PowerOfPersuasionEffect(final PowerOfPersuasionEffect effect) {

View file

@ -31,7 +31,7 @@ public final class PurpleWorm extends CardImpl {
// This spell costs {2} less to cast if a creature died this turn.
Ability ability = new SimpleStaticAbility(
Zone.ALL, new SpellCostReductionSourceEffect(1, MorbidCondition.instance)
Zone.ALL, new SpellCostReductionSourceEffect(2, MorbidCondition.instance)
);
ability.setRuleAtTheTop(true);
this.addAbility(ability.addHint(MorbidHint.instance), new MorbidWatcher());

View file

@ -40,9 +40,9 @@ public final class ShessraDeathsWhisper extends CardImpl {
// Whispers of the Grave At the beginning of your end step, if a creature died this turn, you may pay 2 life. If you do, draw a card.
this.addAbility(new BeginningOfEndStepTriggeredAbility(
Zone.BATTLEFIELD, new DoIfCostPaid(new DrawCardSourceControllerEffect(2),
Zone.BATTLEFIELD, new DoIfCostPaid(new DrawCardSourceControllerEffect(1),
new PayLifeCost(2)), TargetController.YOU, MorbidCondition.instance, false
).addHint(MorbidHint.instance), new MorbidWatcher());
).addHint(MorbidHint.instance).withFlavorWord("Whispers of the Grave"), new MorbidWatcher());
}
private ShessraDeathsWhisper(final ShessraDeathsWhisper card) {

View file

@ -44,7 +44,7 @@ public final class SpikedPitTrap extends CardImpl {
));
// 10-20 | Spike Pit Trap deals 5 damage to that creature. Create a Treasure token.
effect.addTableEntry(1, 9, new DamageTargetEffect(
effect.addTableEntry(10, 20, new DamageTargetEffect(
5, true, "that creature."
), new CreateTokenEffect(new TreasureToken()));
}

View file

@ -65,7 +65,7 @@ class TreasureChestEffect extends OneShotEffect {
TreasureChestEffect() {
super(Outcome.Benefit);
staticText = "search your library for a card. If it's an artifact card you may " +
staticText = "search your library for a card. If it's an artifact card, you may " +
"put it onto the battlefield. Otherwise, put that card into your hand. Then shuffle";
}

View file

@ -3,12 +3,14 @@ package mage.cards.w;
import mage.abilities.Ability;
import mage.abilities.common.BecomesClassLevelTriggeredAbility;
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.MorbidCondition;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.dynamicvalue.common.StaticValue;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
import mage.abilities.effects.common.LoseLifeOpponentsEffect;
import mage.abilities.effects.common.continuous.GainClassAbilitySourceEffect;
import mage.abilities.hint.common.MorbidHint;
import mage.abilities.keyword.ClassLevelAbility;
import mage.abilities.keyword.ClassReminderAbility;
@ -39,7 +41,7 @@ public final class WarlockClass extends CardImpl {
// At the beginning of your end step, if a creature died this turn, each opponent loses 1 life.
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
new BeginningOfEndStepTriggeredAbility(
new LoseLifeOpponentsEffect(2), TargetController.YOU, false
new LoseLifeOpponentsEffect(1), TargetController.YOU, false
), MorbidCondition.instance, "At the beginning of your end step, " +
"if a creature died this turn, each opponent loses 1 life."
).addHint(MorbidHint.instance), new MorbidWatcher());
@ -49,7 +51,7 @@ public final class WarlockClass extends CardImpl {
// When this Class becomes level 2, look at the top three cards of your library. Put one of them into your hand and the rest into your graveyard.
this.addAbility(new BecomesClassLevelTriggeredAbility(new LookLibraryAndPickControllerEffect(
StaticValue.get(1), false, StaticValue.get(1), StaticFilters.FILTER_CARD,
StaticValue.get(3), false, StaticValue.get(1), StaticFilters.FILTER_CARD,
Zone.GRAVEYARD, false, false, false, Zone.HAND, false
), 2));
@ -57,9 +59,11 @@ public final class WarlockClass extends CardImpl {
this.addAbility(new ClassLevelAbility(3, "{6}{B}"));
// At the beginning of your end step, each opponent loses life equal to the life they lost this turn.
this.addAbility(new BeginningOfEndStepTriggeredAbility(
this.addAbility(new SimpleStaticAbility(new GainClassAbilitySourceEffect(
new BeginningOfEndStepTriggeredAbility(
new WarlockClassEffect(), TargetController.YOU, false
));
), 3
)));
}
private WarlockClass(final WarlockClass card) {
@ -76,7 +80,7 @@ class WarlockClassEffect extends OneShotEffect {
WarlockClassEffect() {
super(Outcome.Benefit);
staticText = "At the beginning of your end step, each opponent loses life equal to the life they lost this turn.";
staticText = "each opponent loses life equal to the life they lost this turn.";
}
private WarlockClassEffect(final WarlockClassEffect effect) {

View file

@ -25,7 +25,7 @@ public final class WildShape extends CardImpl {
// Choose one. Until end of turn, target creature you control has that base power and toughness, becomes that creature type, and gains that ability.
this.getSpellAbility().getModes().setChooseText(
". Until end of turn, target creature you control has that base power and toughness, " +
"Choose one. Until end of turn, target creature you control has that base power and toughness, " +
"becomes that creature type, and gains that ability."
);

View file

@ -27,7 +27,7 @@ public final class YouFindTheVillainsLair extends CardImpl {
// Learn Their Secrets Draw two cards, then discard two cards.
this.getSpellAbility().addMode(new Mode(
new DrawDiscardControllerEffect(2, 2)
).withFlavorWord("Learn Their Secrts"));
).withFlavorWord("Learn Their Secrets"));
}
private YouFindTheVillainsLair(final YouFindTheVillainsLair card) {

View file

@ -56,7 +56,7 @@ public class VerifyCardDataTest {
private static final Logger logger = Logger.getLogger(VerifyCardDataTest.class);
private static final String FULL_ABILITIES_CHECK_SET_CODE = "MH2"; // check all abilities and output cards with wrong abilities texts;
private static final String FULL_ABILITIES_CHECK_SET_CODE = "AFR"; // 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

View file

@ -118,24 +118,25 @@ public class BeginningOfEndStepTriggeredAbility extends TriggeredAbilityImpl {
}
private String generateConditionString() {
if (interveningIfClauseCondition != null) {
if (interveningIfClauseCondition.toString().startsWith("if")) {
//Fixes punctuation on multiple sentence if-then construction
// see -- Colfenor's Urn
if (interveningIfClauseCondition.toString().endsWith(".")) {
return interveningIfClauseCondition.toString() + " ";
}
return interveningIfClauseCondition.toString() + ", ";
} else {
return "if {this} is " + interveningIfClauseCondition.toString() + ", ";
}
}
if (interveningIfClauseCondition == null) {
switch (getZone()) {
case GRAVEYARD:
return "if {this} is in your graveyard, ";
}
return "";
}
String clauseText = interveningIfClauseCondition.toString();
if (clauseText.startsWith("if")) {
//Fixes punctuation on multiple sentence if-then construction
// see -- Colfenor's Urn
if (clauseText.endsWith(".")) {
return clauseText + " ";
}
return clauseText + ", ";
}
System.out.println("==================");
System.out.println(clauseText);
System.out.println("==================");
return "if " + clauseText + ", ";
}
}

View file

@ -10,7 +10,6 @@ import mage.game.Game;
import mage.game.events.GameEvent;
/**
*
* @author LevelX2
*/
public class CastOnlyIfConditionIsTrueEffect extends ContinuousRuleModifyingEffectImpl {
@ -52,7 +51,7 @@ public class CastOnlyIfConditionIsTrueEffect extends ContinuousRuleModifyingEffe
private String setText() {
StringBuilder sb = new StringBuilder("cast this spell only ");
if (condition != null) {
sb.append(' ').append(condition.toString());
sb.append(condition);
}
return sb.toString();
}

View file

@ -34,7 +34,7 @@ public enum EquippedSourceCondition implements Condition {
@Override
public String toString() {
return "equipped";
return "{this} is equipped";
}
}

View file

@ -182,10 +182,13 @@ public class BecomesCreatureTargetEffect extends ContinuousEffectImpl {
sb.append(token.getDescription());
sb.append(' ').append(duration.toString());
if (addStillALandText) {
if (!sb.toString().endsWith("\" ")) {
sb.append(". ");
}
if (target.getMaxNumberOfTargets() > 1) {
sb.append(". They're still lands");
sb.append("They're still lands");
} else {
sb.append(". It's still a land");
sb.append("It's still a land");
}
}
return sb.toString().replace(" .", ".");

View file

@ -35,7 +35,7 @@ public class SearchLibraryGraveyardPutInHandEffect extends OneShotEffect {
this.filter = filter;
this.forceToSearchBoth = forceToSearchBoth;
staticText = (youMay ? "you may " : "") + "search your library and" + (forceToSearchBoth ? "" : "/or") + " graveyard for a card named " + filter.getMessage()
+ ", reveal it, and put it into your hand. " + (forceToSearchBoth ? "Then shuffle" : "If you search your library this way, shuffle");
+ ", reveal it, and put it into your hand. " + (forceToSearchBoth ? "Then shuffle" : "If you search your library this way, shuffle it");
}
public SearchLibraryGraveyardPutInHandEffect(final SearchLibraryGraveyardPutInHandEffect effect) {

View file

@ -52,17 +52,21 @@ public class EquipAbility extends ActivatedAbilityImpl {
StringBuilder sb = new StringBuilder("Equip");
if (!targetText.equals("creature you control")) {
sb.append(targetText);
sb.append(' ').append(targetText);
}
String costText = costs.getText();
if (costText != null && !costText.isEmpty()) {
sb.append("&mdash;").append(costText).append('.');
} else {
sb.append(' ');
}
sb.append(costs.getText());
sb.append(manaCosts.getText());
if (costReduceText != null && !costReduceText.isEmpty()) {
sb.append(' ');
sb.append(". ");
sb.append(costReduceText);
}
if (maxActivationsPerTurn == 1) {
sb.append(" Activate only once each turn.");
sb.append(". Activate only once each turn.");
}
sb.append(reminderText);
return sb.toString();