[40K] various text fixes

This commit is contained in:
theelk801 2023-04-30 15:26:40 -04:00
parent b3a421d094
commit df322c680c
33 changed files with 105 additions and 83 deletions

View file

@ -55,13 +55,13 @@ public final class AbaddonTheDespoiler extends CardImpl {
// Trample
this.addAbility(TrampleAbility.getInstance());
// Mark of the Chaos Ascendant During your turn, spells you cast from your hand with mana value X or less have cascade, where X is the total amount of life your opponents have lost this turn.
// Mark of Chaos Ascendant During your turn, spells you cast from your hand with mana value X or less have cascade, where X is the total amount of life your opponents have lost this turn.
this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect(
new GainAbilitySpellsEffect(new CascadeAbility(false), filter),
MyTurnCondition.instance, "during your turn, spells you cast from " +
"your hand with mana value X or less have cascade, where X is the " +
"total amount of life your opponents have lost this turn"
)).addHint(hint).withFlavorWord("Mark of the Chaos Ascendant"));
)).addHint(hint).withFlavorWord("Mark of Chaos Ascendant"));
}
private AbaddonTheDespoiler(final AbaddonTheDespoiler card) {

View file

@ -34,7 +34,7 @@ import java.util.UUID;
public final class BelakorTheDarkMaster extends CardImpl {
private static final FilterPermanent filter = new FilterControlledPermanent(SubType.DEMON, "Demons you control");
private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(filter);
private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(filter, null);
private static final Hint hint = new ValueHint("Demons you control", xValue);
private static final FilterPermanent filter2 = new FilterControlledPermanent(SubType.DEMON, "another Demon");

View file

@ -85,7 +85,7 @@ class CallidusAssassinApplier extends CopyApplier {
@Override
public String getText() {
return "except it has \"When this creature enters the battlefield, " +
return ", except it has \"When this creature enters the battlefield, " +
"destroy up to one other target creature with the same name as this creature.\"";
}
}

View file

@ -56,7 +56,7 @@ public final class CanoptekWraith extends CardImpl {
"pay {3} and sacrifice it"
)
), false
).withFlavorWord("Transdimensional Scout"));
).setTriggerPhrase("When {this} deals combat damage to a player, ").withFlavorWord("Transdimensional Scout"));
}
private CanoptekWraith(final CanoptekWraith card) {

View file

@ -62,7 +62,7 @@ class ChaosDefilerEffect extends OneShotEffect {
ChaosDefilerEffect() {
super(Outcome.Benefit);
staticText = "for each opponent, choose a nonland permanent " +
"that players controls. Destroy one of them chosen at random";
"that player controls. Destroy one of them chosen at random";
}
private ChaosDefilerEffect(final ChaosDefilerEffect effect) {

View file

@ -1,11 +1,13 @@
package mage.cards.d;
import mage.abilities.Ability;
import mage.abilities.common.ActivateIfConditionActivatedAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.condition.CompoundCondition;
import mage.abilities.condition.Condition;
import mage.abilities.condition.common.MyTurnCondition;
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
import mage.abilities.costs.common.ExileSourceCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.dynamicvalue.common.GetXValue;
import mage.abilities.dynamicvalue.common.ManacostVariableValue;
@ -18,9 +20,9 @@ import mage.constants.CardType;
import mage.constants.ComparisonType;
import mage.constants.Zone;
import mage.filter.StaticFilters;
import mage.game.permanent.token.WhiteAstartesWarriorToken;
import java.util.UUID;
import mage.game.permanent.token.WhiteAstartesWarriorToken;
/**
* @author TheElk801
@ -44,12 +46,14 @@ public final class DefendersOfHumanity extends CardImpl {
));
// {X}{2}{W}, Exile Defenders of Humanity: Create X 2/2 white Astartes Warrior creature tokens with vigilance. Activate only if you control no creatures and only during your turn.
this.addAbility(new ActivateIfConditionActivatedAbility(
Ability ability = new ActivateIfConditionActivatedAbility(
Zone.BATTLEFIELD,
new CreateTokenEffect(
new WhiteAstartesWarriorToken(), GetXValue.instance
), new ManaCostsImpl<>("{X}{2}{W}"), condition
).addHint(CreaturesYouControlHint.instance).addHint(MyTurnHint.instance));
).addHint(CreaturesYouControlHint.instance).addHint(MyTurnHint.instance);
ability.addCost(new ExileSourceCost());
this.addAbility(ability);
}
private DefendersOfHumanity(final DefendersOfHumanity card) {

View file

@ -19,8 +19,7 @@ import java.util.UUID;
*/
public final class Exterminatus extends CardImpl {
private static final FilterPermanent filter
= new FilterNonlandPermanent("nonland permanents your opponents control");
private static final FilterPermanent filter = new FilterNonlandPermanent();
static {
filter.add(TargetController.OPPONENT.getControllerPredicate());
@ -32,7 +31,7 @@ public final class Exterminatus extends CardImpl {
// Nonland permanents your opponents control lose indestructible until end of turn.
this.getSpellAbility().addEffect(new LoseAbilityAllEffect(
IndestructibleAbility.getInstance(), Duration.EndOfTurn, filter
));
).setText("nonland permanents your opponents control lose indestructible until end of turn"));
// Destroy all nonland permanents.
this.getSpellAbility().addEffect(new DestroyAllEffect(

View file

@ -21,15 +21,17 @@ public final class ForTheEmperor extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{W}");
// Creatures you control get +2/+2 and gain vigilance and lifelink until end of turn.
this.getSpellAbility().addEffect(new BoostControlledEffect(2, 2, Duration.EndOfTurn));
this.getSpellAbility().addEffect(new BoostControlledEffect(
2, 2, Duration.EndOfTurn
).setText("creatures you control get +2/+2"));
this.getSpellAbility().addEffect(new GainAbilityControlledEffect(
VigilanceAbility.getInstance(), Duration.EndOfTurn,
StaticFilters.FILTER_PERMANENT_CREATURE
).setText("and gain lifelink"));
).setText("and gain vigilance"));
this.getSpellAbility().addEffect(new GainAbilityControlledEffect(
LifelinkAbility.getInstance(), Duration.EndOfTurn,
StaticFilters.FILTER_PERMANENT_CREATURE
).setText("and vigilance until end of turn"));
).setText("and lifelink until end of turn"));
}
private ForTheEmperor(final ForTheEmperor card) {

View file

@ -4,10 +4,10 @@ import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.common.DiesCreatureTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.CreateTokenCopyTargetEffect;
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
@ -15,6 +15,7 @@ import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.counters.CounterType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.DefendingPlayerControlsPredicate;
import mage.game.Game;
@ -32,10 +33,14 @@ import java.util.UUID;
*/
public final class GenestealerPatriarch extends CardImpl {
public static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature defending player controls");
public static final FilterCreaturePermanent filter
= new FilterCreaturePermanent("creature defending player controls");
private static final FilterPermanent filter2
= new FilterCreaturePermanent("a creature with an infection counter on it");
static {
filter.add(DefendingPlayerControlsPredicate.instance);
filter2.add(CounterType.INFECTION.getPredicate());
}
public GenestealerPatriarch(UUID ownerId, CardSetInfo setInfo) {
@ -45,13 +50,17 @@ public final class GenestealerPatriarch extends CardImpl {
this.toughness = new MageInt(4);
// Genestealer's Kiss Whenever Genestealer Patriarch attacks, put an infection counter on target creature defending player controls.
Ability ability = new AttacksTriggeredAbility(new AddCountersTargetEffect(CounterType.INFECTION.createInstance())).withFlavorWord("Genestealer's Kiss");
Ability ability = new AttacksTriggeredAbility(
new AddCountersTargetEffect(CounterType.INFECTION.createInstance())
).withFlavorWord("Genestealer's Kiss");
ability.addTarget(new TargetPermanent(filter));
this.addAbility(ability);
// Children of the Cult Whenever a creature with an infection counter on it dies, you create
// a token that's a copy of that creature, except it's a Tyranid in addition to its other types.
this.addAbility(new GenestealerPatriarchTriggeredAbility().withFlavorWord("Children of the Cult"));
this.addAbility(new DiesCreatureTriggeredAbility(
new GenestealerPatriarchCloneEffect(), false, filter2, false
).withFlavorWord("Children of the Cult"));
}
private GenestealerPatriarch(final GenestealerPatriarch card) {
@ -68,11 +77,12 @@ class GenestealerPatriarchTriggeredAbility extends TriggeredAbilityImpl {
public GenestealerPatriarchTriggeredAbility() {
super(Zone.BATTLEFIELD, new GenestealerPatriarchCloneEffect());
setTriggerPhrase("Whenever a creature with an infection counter on it dies, ");
;
}
public GenestealerPatriarchTriggeredAbility(GenestealerPatriarchTriggeredAbility ability) {
super(ability);
setTriggerPhrase("Whenever a creature with an infection counter on it dies, ");
}
@Override
@ -105,7 +115,8 @@ class GenestealerPatriarchCloneEffect extends OneShotEffect {
public GenestealerPatriarchCloneEffect() {
super(Outcome.PutCreatureInPlay);
staticText = "you create a token that's a copy of that creature, except it's a Tyranid in addition to its other types";
staticText = "you create a token that's a copy of that creature, " +
"except it's a Tyranid in addition to its other types";
}
public GenestealerPatriarchCloneEffect(final GenestealerPatriarchCloneEffect effect) {
@ -119,15 +130,14 @@ class GenestealerPatriarchCloneEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
Card creature = game.getCard(getTargetPointer().getFirst(game, source));
Player controller = game.getPlayer(source.getControllerId());
if (creature != null && controller != null) {
CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(source.getControllerId());
effect.setTargetPointer(new FixedTarget(creature, game));
effect.setAdditionalSubType(SubType.TYRANID);
effect.apply(game, source);
return true;
Permanent creature = (Permanent) getValue("creatureDied");
if (controller == null || creature == null) {
return false;
}
return false;
CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(source.getControllerId());
effect.setSavedPermanent(creature);
effect.setAdditionalSubType(SubType.TYRANID);
return effect.apply(game, source);
}
}

View file

@ -37,7 +37,7 @@ public final class GreatUncleanOne extends CardImpl {
);
ability.addEffect(new CreateTokenEffect(
new PlaguebearerOfNurgleToken(), GreatUncleanOneValue.instance
).setText("then for each opponent who has less life than you, " +
).setText("Then for each opponent who has less life than you, " +
"create a 1/3 black Demon creature token named Plaguebearer of Nurgle"));
this.addAbility(ability.withFlavorWord("Reverberating Summons"));
}

View file

@ -32,11 +32,14 @@ public final class KnightRampager extends CardImpl {
this.addAbility(TrampleAbility.getInstance());
// Frenzied Rampage At the beginning of combat on your turn, choose an opponent at random. Knight Rampager attacks that player this combat if able.
this.addAbility(new BeginningOfCombatTriggeredAbility(new AttackIfAbleTargetRandomOpponentSourceEffect(), TargetController.YOU, false)
.withFlavorWord("Frenzied Rampage"));
this.addAbility(new BeginningOfCombatTriggeredAbility(
new AttackIfAbleTargetRandomOpponentSourceEffect(), TargetController.YOU, false
).withFlavorWord("Frenzied Rampage"));
// When Knight Rampager dies, it deals 4 damage to target opponent chosen at random.
Ability ability = new DiesSourceTriggeredAbility(new DamageTargetEffect(4), false);
Ability ability = new DiesSourceTriggeredAbility(
new DamageTargetEffect(4, "it"), false
);
Target target = new TargetOpponent();
target.setRandom(true);
ability.addTarget(target);

View file

@ -29,10 +29,10 @@ public final class Lychguard extends CardImpl {
this.power = new MageInt(2);
this.toughness = new MageInt(3);
// Guardian Patrols -- {3}{B}, Sacrifice Lychguard: Return all legendary creature cards from your graveyard to your hand.
// Guardian Protocols -- {3}{B}, Sacrifice Lychguard: Return all legendary creature cards from your graveyard to your hand.
Ability ability = new SimpleActivatedAbility(new LychguardEffect(), new ManaCostsImpl<>("{3}{B}"));
ability.addCost(new SacrificeSourceCost());
this.addAbility(ability);
this.addAbility(ability.withFlavorWord("Guardian Protocols"));
}
private Lychguard(final Lychguard card) {

View file

@ -30,7 +30,8 @@ public final class Mawloc extends CardImpl {
this.addAbility(new RavenousAbility());
// Terror from the Deep -- When Mawloc enters the battlefield, it fights up to one target creature an opponent controls. If that creature would die this turn, exile it instead.
Ability ability = new EntersBattlefieldTriggeredAbility(new FightTargetSourceEffect());
Ability ability = new EntersBattlefieldTriggeredAbility(new FightTargetSourceEffect()
.setText("it fights up to one target creature an opponent controls"));
ability.addEffect(new ExileTargetIfDiesEffect());
ability.addTarget(new TargetOpponentsCreaturePermanent(0, 1));
this.addAbility(ability.withFlavorWord("Terror from the Deep"));

View file

@ -40,7 +40,7 @@ public final class Nexos extends CardImpl {
// Strategic Coordinator -- Basic lands you control have "{T}: Add {C}{C}. Spend this mana only on costs that contain {X}."
this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect(
new NexosManaAbility(), Duration.WhileOnBattlefield, filter
)));
)).withFlavorWord("Strategic Coordinator"));
}
private Nexos(final Nexos card) {

View file

@ -34,7 +34,7 @@ public final class NurglesRot extends CardImpl {
// When enchanted creature dies, return Nurgle's Rot to its owner's hand and you create a 1/3 black Demon creature token named Plaguebearer of Nurgle.
Ability ability = new DiesAttachedTriggeredAbility(new ReturnToHandSourceEffect(false, true), "enchanted creature");
ability.addEffect(new CreateTokenEffect(new PlaguebearerOfNurgleToken()).concatBy("and"));
ability.addEffect(new CreateTokenEffect(new PlaguebearerOfNurgleToken()).concatBy("and you"));
this.addAbility(ability);
}

View file

@ -40,7 +40,7 @@ public final class Poxwalkers extends CardImpl {
this.addAbility(new SpellCastControllerTriggeredAbility(
Zone.GRAVEYARD, new ReturnSourceFromGraveyardToBattlefieldEffect(true),
filter, false, false
));
).withFlavorWord("Curse of the Walking Pox"));
}
private Poxwalkers(final Poxwalkers card) {

View file

@ -47,7 +47,7 @@ public final class PrimarisEliminator extends CardImpl {
// * Hyperfang Round -- Creatures target player controls gets -2/-2 until end of turn.
ability.addMode(new Mode(new BoostAllEffect(
-2, -2, Duration.EndOfTurn, filter, false
)).addTarget(new TargetPlayer()).withFlavorWord("Hyperfang Round"));
)).addTarget(new TargetPlayer()).withFlavorWord("Hyperfrag Round"));
this.addAbility(ability);
}

View file

@ -14,6 +14,7 @@ import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.events.ZoneChangeEvent;
import mage.game.permanent.PermanentToken;
import mage.target.common.TargetOpponent;
import java.util.UUID;
@ -52,6 +53,7 @@ class PsychomancerTriggeredAbility extends TriggeredAbilityImpl {
PsychomancerTriggeredAbility() {
super(Zone.BATTLEFIELD, new LoseLifeTargetEffect(1));
this.addEffect(new GainLifeEffect(1).concatBy("and"));
this.addTarget(new TargetOpponent());
this.setTriggerPhrase("Whenever {this} or another nontoken artifact you control is put " +
"into a graveyard from the battlefield or is put into exile from the battlefield, ");
this.withFlavorWord("Harbinger of Despair");

View file

@ -1,36 +1,24 @@
package mage.cards.r;
import java.util.UUID;
import mage.abilities.effects.common.CopyTargetSpellEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.FilterSpell;
import mage.filter.predicate.Predicates;
import mage.filter.StaticFilters;
import mage.target.TargetSpell;
import java.util.UUID;
/**
*
* @author BetaSteward_at_googlemail.com
*/
public final class Reverberate extends CardImpl {
private static final FilterSpell filter = new FilterSpell();
static {
filter.add(Predicates.or(
CardType.INSTANT.getPredicate(),
CardType.SORCERY.getPredicate()));
}
public Reverberate(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}{R}");
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R}{R}");
// Copy target instant or sorcery spell. You may choose new targets for the copy.
this.getSpellAbility().addTarget(new TargetSpell(filter));
this.getSpellAbility().addTarget(new TargetSpell(StaticFilters.FILTER_SPELL_INSTANT_OR_SORCERY));
this.getSpellAbility().addEffect(new CopyTargetSpellEffect());
}

View file

@ -37,7 +37,7 @@ public final class ShardOfTheVoidDragon extends CardImpl {
// Sphere of the Void Dragon -- Whenever Shard of the Void Dragon attacks, each opponent sacrifices a nonland permanent.
this.addAbility(new AttacksTriggeredAbility(
new SacrificeOpponentsEffect(StaticFilters.FILTER_PERMANENT_NON_LAND)
).withFlavorWord("Sphere of the Void Dragon"));
).withFlavorWord("Spear of the Void Dragon"));
// Matter Absorption -- Whenever an artifact is put into a graveyard from the battlefield or is put into exile from the battlefield, put two +1/+1 counters on Shard of the Void Dragon.
this.addAbility(new ShardOfTheVoidDragonTriggeredAbility());

View file

@ -28,7 +28,7 @@ public final class SisterRepentia extends CardImpl {
// Martyrdom -- When Sister Repentia dies, you gain 2 life and draw two cards.
Ability ability = new DiesSourceTriggeredAbility(new GainLifeEffect(2));
ability.addEffect(new DrawCardSourceControllerEffect(2));
ability.addEffect(new DrawCardSourceControllerEffect(2).concatBy("and"));
this.addAbility(ability.withFlavorWord("Martyrdom"));
// Miracle {W}{B}

View file

@ -51,8 +51,8 @@ public final class SpaceMarineScout extends CardImpl {
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInPlayEffect(
new TargetCardInLibrary(filter), true, true
)), condition, "When {this} enters the battlefield, if an opponent controls more lands than you, "
+ "search your library for a basic Plains card, put it onto the battlefield tapped, then shuffle."
), true), condition, "When {this} enters the battlefield, if an opponent controls more lands " +
"than you, you may search your library for a basic Plains card, put it onto the battlefield tapped, then shuffle."
).withFlavorWord("Concealed Position"));
}

View file

@ -60,7 +60,7 @@ public final class TheHorusHeresy extends CardImpl {
});
// II -- Draw a card for each creature you control but don't own.
sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_I, new DrawCardSourceControllerEffect(xValue));
sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_II, new DrawCardSourceControllerEffect(xValue));
// III -- Starting with you, each player chooses a creature. Destroy each creature chosen this way.
sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_III, new TheHorusHeresyDestroyEffect());

View file

@ -23,7 +23,7 @@ public final class TheirNumberIsLegion extends CardImpl {
// Create X tapped 2/2 black Necron Warrior artifact creature tokens, then you gain life equal to the number of artifacts you control. Exile Their Number Is Legion.
this.getSpellAbility().addEffect(new CreateTokenEffect(
new NecronWarriorToken(), ManacostVariableValue.REGULAR
new NecronWarriorToken(), ManacostVariableValue.REGULAR, true, false
));
this.getSpellAbility().addEffect(new GainLifeEffect(ArtifactYouControlCount.instance)
.setText(", then you gain life equal to the number of artifacts you control"));

View file

@ -31,7 +31,9 @@ public final class TriarchPraetorian extends CardImpl {
this.addAbility(FlyingAbility.getInstance());
// Dynastic Codes -- When Triarch Praetorian enters the battlefield from a graveyard, you draw two cards and you lose 2 life.
Ability ability = new EntersBattlefieldFromGraveyardTriggeredAbility(new DrawCardSourceControllerEffect(2));
Ability ability = new EntersBattlefieldFromGraveyardTriggeredAbility(
new DrawCardSourceControllerEffect(2, "you")
);
ability.addEffect(new LoseLifeSourceControllerEffect(2).concatBy("and"));
this.addAbility(ability.withFlavorWord("Dynastic Codes"));

View file

@ -59,7 +59,7 @@ class TyranidHarridanTriggeredAbility extends DealsDamageToAPlayerAllTriggeredAb
TyranidHarridanTriggeredAbility() {
super(new CreateTokenEffect(new TyranidGargoyleToken()), filter, false, SetTargetPointer.NONE, true);
this.setTriggerPhrase("Shrieking Gargoyles");
this.withFlavorWord("Shrieking Gargoyles");
}
private TyranidHarridanTriggeredAbility(final TyranidHarridanTriggeredAbility ability) {

View file

@ -22,7 +22,7 @@ import java.util.UUID;
*/
public final class VexilusPraetor extends CardImpl {
private static final FilterPermanent filter = new FilterControlledPermanent("commanders you control");
private static final FilterPermanent filter = new FilterControlledPermanent("commanders");
static {
filter.add(CommanderPredicate.instance);

View file

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

View file

@ -2,6 +2,7 @@ package mage.abilities;
import mage.MageIdentifier;
import mage.MageObject;
import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.condition.Condition;
import mage.abilities.costs.*;
import mage.abilities.costs.common.PayLifeCost;
@ -821,7 +822,7 @@ public abstract class AbilityImpl implements Ability {
rule = ruleStart;
}
String prefix;
if (this instanceof TriggeredAbility) {
if (this instanceof TriggeredAbility || this instanceof EntersBattlefieldAbility) {
prefix = null;
} else if (abilityWord != null) {
prefix = abilityWord.formatWord();

View file

@ -6,9 +6,9 @@ import mage.abilities.condition.Condition;
import mage.abilities.effects.Effect;
import mage.abilities.effects.EntersBattlefieldEffect;
import mage.constants.Zone;
import mage.util.CardUtil;
/**
*
* @author BetaSteward_at_googlemail.com
*/
public class EntersBattlefieldAbility extends StaticAbility {
@ -21,9 +21,8 @@ public class EntersBattlefieldAbility extends StaticAbility {
}
/**
*
* @param effect effect that happens when the permanent enters the
* battlefield
* @param effect effect that happens when the permanent enters the
* battlefield
* @param optional
*/
public EntersBattlefieldAbility(Effect effect, boolean optional) {
@ -39,14 +38,13 @@ public class EntersBattlefieldAbility extends StaticAbility {
}
/**
*
* @param effect effect that happens when the permanent enters the
* battlefield
* @param effect effect that happens when the permanent enters the
* battlefield
* @param optional
* @param condition only if this condition is true, the effect will happen
* @param condition only if this condition is true, the effect will happen
* @param abilityRule rule for this ability (no text from effects will be
* added)
* @param effectText this text will be used for the EnterBattlefieldEffect
* added)
* @param effectText this text will be used for the EnterBattlefieldEffect
*/
public EntersBattlefieldAbility(Effect effect, boolean optional, Condition condition, String abilityRule, String effectText) {
super(Zone.ALL, new EntersBattlefieldEffect(effect, condition, effectText, true, optional));
@ -83,7 +81,19 @@ public class EntersBattlefieldAbility extends StaticAbility {
return abilityRule;
}
String superRule = super.getRule();
return (optional ? "you may have " : "") + "{this} enter" + (optional ? "" : "s") + " the battlefield"
+ (!superRule.isEmpty() && superRule.charAt(0) == ' ' ? "" : " ") + superRule;
String prefix;
if (abilityWord != null) {
prefix = abilityWord.formatWord();
} else if (flavorWord != null) {
prefix = CardUtil.italicizeWithEmDash(flavorWord);
} else {
prefix = null;
}
String rule = (optional ? "you may have " : "") + "{this} enter" + (optional ? "" : "s") +
" the battlefield" + (!superRule.isEmpty() && superRule.charAt(0) == ' ' ? "" : " ") + superRule;
if (prefix != null) {
return prefix + CardUtil.getTextWithFirstCharUpperCase(rule);
}
return rule;
}
}

View file

@ -15,7 +15,7 @@ import mage.target.common.TargetAnyTarget;
public final class BlueHorrorToken extends TokenImpl {
public BlueHorrorToken() {
super("Blue Horror", "2/2 blue and red Demon Horror creature token named Blue Horror. It has \"Whenever you cast an instant or sorcery spell, this creature deals 1 damage to any target.\"");
super("Blue Horror", "2/2 blue and red Demon Horror creature token named Blue Horror with \"Whenever you cast an instant or sorcery spell, this creature deals 1 damage to any target.\"");
cardType.add(CardType.CREATURE);
color.setBlue(true);
color.setRed(true);

View file

@ -13,7 +13,7 @@ import java.util.Arrays;
public final class TyranidGargoyleToken extends TokenImpl {
public TyranidGargoyleToken() {
super("Tyranid Gargoyle Token", "1/1 blue Tyranid creature token with flying");
super("Tyranid Gargoyle Token", "1/1 blue Tyranid Gargoyle creature token with flying");
cardType.add(CardType.CREATURE);
color.setBlue(true);
subtype.add(SubType.TYRANID);

View file

@ -13,7 +13,7 @@ import java.util.Arrays;
public final class WhiteAstartesWarriorToken extends TokenImpl {
public WhiteAstartesWarriorToken() {
super("Astartes Warrior Token", "2/2 white Astartes Warrior creature tokens with vigilance");
super("Astartes Warrior Token", "2/2 white Astartes Warrior creature token with vigilance");
cardType.add(CardType.CREATURE);
color.setWhite(true);
subtype.add(SubType.ASTARTES);