[ALA] various text fixes

This commit is contained in:
Evan Kranzler 2022-03-06 15:29:47 -05:00
parent 670c2a5615
commit edaaac53d9
33 changed files with 185 additions and 248 deletions

View file

@ -45,7 +45,7 @@ public final class AjaniVengeant extends CardImpl {
// 2: Ajani Vengeant deals 3 damage to any target and you gain 3 life.
Effects effects1 = new Effects();
effects1.add(new DamageTargetEffect(3));
effects1.add(new GainLifeEffect(3));
effects1.add(new GainLifeEffect(3).concatBy("and"));
LoyaltyAbility ability2 = new LoyaltyAbility(effects1, -2);
ability2.addTarget(new TargetAnyTarget());
this.addAbility(ability2);

View file

@ -43,7 +43,7 @@ public final class ArchdemonOfUnx extends CardImpl {
this.addAbility(TrampleAbility.getInstance());
// At the beginning of your upkeep, sacrifice a non-Zombie creature, then create a 2/2 black Zombie creature token.
Ability ability = new BeginningOfUpkeepTriggeredAbility(new SacrificeControllerEffect(filter, 1, ""), TargetController.YOU, false);
ability.addEffect(new CreateTokenEffect(new ZombieToken()));
ability.addEffect(new CreateTokenEffect(new ZombieToken()).concatBy(", then"));
this.addAbility(ability);
}

View file

@ -6,6 +6,7 @@ import mage.MageInt;
import mage.abilities.common.DiesSourceTriggeredAbility;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.DoIfCostPaid;
import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect;
import mage.abilities.effects.common.ReturnToHandTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@ -21,7 +22,7 @@ import mage.target.common.TargetCardInYourGraveyard;
*/
public final class CarrionThrash extends CardImpl {
private static final FilterCreatureCard filter = new FilterCreatureCard("another creature card from your graveyard");
private static final FilterCreatureCard filter = new FilterCreatureCard("another target creature card from your graveyard");
static {
filter.add(new AnotherCardPredicate());
@ -36,7 +37,7 @@ public final class CarrionThrash extends CardImpl {
this.toughness = new MageInt(4);
// When Carrion Thrash dies, you may pay {2}. If you do, return another target creature card from your graveyard to your hand.
DiesSourceTriggeredAbility ability = new DiesSourceTriggeredAbility(new DoIfCostPaid(new ReturnToHandTargetEffect(), new GenericManaCost(2)), false);
DiesSourceTriggeredAbility ability = new DiesSourceTriggeredAbility(new DoIfCostPaid(new ReturnFromGraveyardToHandTargetEffect(), new GenericManaCost(2)), false);
ability.addTarget(new TargetCardInYourGraveyard(filter));
this.addAbility(ability);
}

View file

@ -2,8 +2,6 @@ package mage.cards.c;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.effects.common.LoseLifeTargetEffect;
import mage.abilities.effects.common.SacrificeEffect;
import mage.abilities.effects.common.discard.DiscardTargetEffect;
@ -32,13 +30,13 @@ public final class CruelUltimatum extends CardImpl {
// Target opponent sacrifices a creature, discards three cards, then loses 5 life.
// You return a creature card from your graveyard to your hand, draw three cards, then gain 5 life.
this.getSpellAbility().addTarget(new TargetOpponent());
this.getSpellAbility().addEffect(new SacrificeEffect(StaticFilters.FILTER_PERMANENT_CREATURE, 1, "Target opponent"));
this.getSpellAbility().addEffect(new DiscardTargetEffect(3));
this.getSpellAbility().addEffect(new LoseLifeTargetEffect(5));
this.getSpellAbility().addEffect(new SacrificeEffect(
StaticFilters.FILTER_PERMANENT_CREATURE,
1, "Target opponent"
));
this.getSpellAbility().addEffect(new DiscardTargetEffect(3).setText(", discards three cards"));
this.getSpellAbility().addEffect(new LoseLifeTargetEffect(5).setText(", then loses 5 life"));
this.getSpellAbility().addEffect(new CruelUltimatumEffect());
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(3));
this.getSpellAbility().addEffect(new GainLifeEffect(5));
}
private CruelUltimatum(final CruelUltimatum card) {
@ -55,7 +53,8 @@ class CruelUltimatumEffect extends OneShotEffect {
public CruelUltimatumEffect() {
super(Outcome.ReturnToHand);
this.staticText = "Return a creature card from your graveyard to your hand";
this.staticText = "You return a creature card from your graveyard " +
"to your hand, draw three cards, then gain 5 life";
}
public CruelUltimatumEffect(final CruelUltimatumEffect effect) {
@ -74,14 +73,13 @@ class CruelUltimatumEffect extends OneShotEffect {
return false;
}
TargetCardInYourGraveyard target = new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD);
if (target.canChoose(source.getSourceId(), source.getControllerId(), game) && controller.choose(Outcome.ReturnToHand, target, source.getSourceId(), game)) {
Card card = game.getCard(target.getFirstTarget());
if (card == null) {
return false;
}
controller.choose(Outcome.ReturnToHand, target, source.getSourceId(), game);
Card card = game.getCard(target.getFirstTarget());
if (card != null) {
return controller.moveCards(card, Zone.HAND, source, game);
}
controller.drawCards(1, source, game);
controller.gainLife(1, game, source);
return true;
}
}

View file

@ -29,7 +29,7 @@ public final class GoblinAssault extends CardImpl {
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new CreateTokenEffect(new GoblinToken(true)), TargetController.YOU, false));
// Goblin creatures attack each turn if able.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new AttacksIfAbleAllEffect(StaticFilters.FILTER_PERMANENT_CREATURE_GOBLINS, Duration.WhileOnBattlefield)), new AttackedThisTurnWatcher());
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new AttacksIfAbleAllEffect(StaticFilters.FILTER_PERMANENT_CREATURE_GOBLINS, Duration.WhileOnBattlefield, true)), new AttackedThisTurnWatcher());
}
private GoblinAssault(final GoblinAssault card) {

View file

@ -33,7 +33,7 @@ public final class GrixisCharm extends CardImpl {
this.getSpellAbility().addMode(mode);
// or creatures you control get +2/+0 until end of turn.
mode = new Mode();
mode.addEffect(new BoostControlledEffect(2, 0, Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURE, false));
mode.addEffect(new BoostControlledEffect(2, 0, Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURES, false));
this.getSpellAbility().addMode(mode);
}

View file

@ -1,36 +1,36 @@
package mage.cards.g;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.SacrificeSourceCost;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.abilities.effects.common.continuous.GainAbilityAllEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.ComparisonType;
import mage.constants.Duration;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
import mage.constants.SubType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.PowerPredicate;
import java.util.UUID;
/**
*
* @author North
*/
public final class GustriderExuberant extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 5 or greater");
private static final FilterPermanent filter
= new FilterControlledCreaturePermanent("creatures you control with power 5 or greater");
static {
filter.add(new PowerPredicate(ComparisonType.MORE_THAN, 4));
}
public GustriderExuberant(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.WIZARD);
@ -38,9 +38,9 @@ public final class GustriderExuberant extends CardImpl {
this.toughness = new MageInt(2);
this.addAbility(FlyingAbility.getInstance());
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD,
new GainAbilityControlledEffect(FlyingAbility.getInstance(), Duration.EndOfTurn, filter),
new SacrificeSourceCost()));
this.addAbility(new SimpleActivatedAbility(new GainAbilityAllEffect(
FlyingAbility.getInstance(), Duration.EndOfTurn, filter
), new SacrificeSourceCost()));
}
private GustriderExuberant(final GustriderExuberant card) {

View file

@ -36,7 +36,7 @@ public final class HinderingLight extends CardImpl {
this.getSpellAbility().addEffect(new CounterTargetEffect());
this.getSpellAbility().addTarget(new TargetSpell(filter));
// Draw a card.
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1));
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1).concatBy("<br>"));
}
private HinderingLight(final HinderingLight card) {

View file

@ -25,7 +25,7 @@ public final class HissingIguanar extends CardImpl {
this.toughness = new MageInt(1);
// Whenever another creature dies, you may have Hissing Iguanar deal 1 damage to target player.
DiesCreatureTriggeredAbility ability = new DiesCreatureTriggeredAbility(new DamageTargetEffect(1), true, true);
DiesCreatureTriggeredAbility ability = new DiesCreatureTriggeredAbility(new DamageTargetEffect(1).setText("you may have {this} deal 1 damage to target player or planeswalker"), true, true);
ability.addTarget(new TargetPlayerOrPlaneswalker());
this.addAbility(ability);
}

View file

@ -79,7 +79,7 @@ class ImmortalCoilAbility extends StateTriggeredAbility {
@Override
public String getRule() {
return "When there are no cards in your graveyard, you lose the game";
return "When there are no cards in your graveyard, you lose the game.";
}
}

View file

@ -20,7 +20,7 @@ import mage.filter.predicate.mageobject.AnotherPredicate;
*/
public final class KederektLeviathan extends CardImpl {
private static final FilterNonlandPermanent filter = new FilterNonlandPermanent("all other nonland permanents");
private static final FilterNonlandPermanent filter = new FilterNonlandPermanent("other nonland permanents");
static{
filter.add(AnotherPredicate.instance);
}

View file

@ -1,38 +1,39 @@
package mage.cards.m;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.effects.common.InfoEffect;
import mage.abilities.Ability;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Zone;
import mage.constants.SubType;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.stack.Spell;
import mage.target.targetpointer.FixedTarget;
import java.util.Optional;
import java.util.UUID;
/**
*
* @author Plopman
*/
public final class Manaplasm extends CardImpl {
public Manaplasm(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}");
this.subtype.add(SubType.OOZE);
this.power = new MageInt(1);
this.toughness = new MageInt(1);
// Whenever you cast a spell, Manaplasm gets +X/+X until end of turn, where X is that spell's converted mana cost.
this.addAbility(new ManaplasmAbility());
this.addAbility(new SpellCastControllerTriggeredAbility(new BoostSourceEffect(
ManaplasmValue.instance, ManaplasmValue.instance,
Duration.EndOfTurn, true
), false));
}
private Manaplasm(final Manaplasm card) {
@ -45,44 +46,26 @@ public final class Manaplasm extends CardImpl {
}
}
enum ManaplasmValue implements DynamicValue {
instance;
class ManaplasmAbility extends TriggeredAbilityImpl {
public ManaplasmAbility() {
super(Zone.BATTLEFIELD, new InfoEffect("{this} gets +X/+X until end of turn, where X is that spell's mana value"), false);
}
public ManaplasmAbility(final ManaplasmAbility ability) {
super(ability);
@Override
public int calculate(Game game, Ability sourceAbility, Effect effect) {
return Optional.of((Spell) effect.getValue("spellCast")).map(Spell::getManaValue).orElse(0);
}
@Override
public boolean checkEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.SPELL_CAST;
public ManaplasmValue copy() {
return this;
}
@Override
public boolean checkTrigger(GameEvent event, Game game) {
Spell spell = game.getStack().getSpell(event.getTargetId());
if (spell != null && spell.isControlledBy(controllerId)) {
this.getEffects().remove(0);
int x = spell.getManaValue();
this.addEffect(new BoostSourceEffect(x,x, Duration.EndOfTurn));
this.getEffects().get(0).setTargetPointer(new FixedTarget(event.getPlayerId()));
return true;
}
return false;
public String getMessage() {
return "that spell's mana value";
}
@Override
public String getRule() {
return "Whenever you cast a spell, {this} gets +X/+X until end of turn, where X is that spell's mana value";
}
@Override
public ManaplasmAbility copy() {
return new ManaplasmAbility(this);
public String toString() {
return "X";
}
}

View file

@ -1,31 +1,23 @@
package mage.cards.m;
import java.util.UUID;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect;
import mage.abilities.common.SpellCastOpponentTriggeredAbility;
import mage.abilities.effects.common.MillCardsTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
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.target.targetpointer.FixedTarget;
import java.util.UUID;
/**
*
* @author Plopman
*/
public final class MemoryErosion extends CardImpl {
public MemoryErosion(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}{U}");
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}{U}");
// Whenever an opponent casts a spell, that player puts the top two cards of their library into their graveyard.
this.addAbility(new SpellCastTriggeredAbility());
this.addAbility(new SpellCastOpponentTriggeredAbility(new MillCardsTargetEffect(2), false));
}
private MemoryErosion(final MemoryErosion card) {
@ -37,42 +29,3 @@ public final class MemoryErosion extends CardImpl {
return new MemoryErosion(this);
}
}
class SpellCastTriggeredAbility extends TriggeredAbilityImpl {
public SpellCastTriggeredAbility() {
super(Zone.BATTLEFIELD, new PutLibraryIntoGraveTargetEffect(2), false);
}
public SpellCastTriggeredAbility(final SpellCastTriggeredAbility ability) {
super(ability);
}
@Override
public boolean checkEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.SPELL_CAST;
}
@Override
public boolean checkTrigger(GameEvent event, Game game) {
Spell spell = game.getStack().getSpell(event.getTargetId());
if (spell != null && game.getOpponents(this.getControllerId()).contains(spell.getControllerId())) {
this.getEffects().get(0).setTargetPointer(new FixedTarget(event.getPlayerId()));
return true;
}
return false;
}
@Override
public String getRule() {
return "Whenever an opponent casts a spell, that player mills two cards";
}
@Override
public SpellCastTriggeredAbility copy() {
return new SpellCastTriggeredAbility(this);
}
}

View file

@ -1,7 +1,5 @@
package mage.cards.m;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility;
@ -21,32 +19,31 @@ import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.target.targetpointer.FixedTarget;
import java.util.UUID;
/**
*
* @author Plopman
*/
public final class MinionReflector extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nontoken creature");
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a nontoken creature");
static {
filter.add(TokenPredicate.FALSE);
}
public MinionReflector(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{5}");
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{5}");
// Whenever a nontoken creature enters the battlefield under your control, you may pay {2}. If you do, create a token that's a copy of that creature. That token has haste and "At the beginning of the end step, sacrifice this permanent."
Ability ability = new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new DoIfCostPaid(
new MinionReflectorEffect(), new ManaCostsImpl("{2}"),
"Pay {2} to create a token that's a copy of that creature that " +
"entered the battlefield?"),
filter, false, SetTargetPointer.PERMANENT,
"Whenever a nontoken creature enters the battlefield under your control, " +
"you may pay 2. If you do, create a token that's a copy of that creature, " +
"except it has haste and \"At the beginning of the end step, sacrifice this " +
"permanent.\"");
this.addAbility(ability);
this.addAbility(new EntersBattlefieldControlledTriggeredAbility(
Zone.BATTLEFIELD,
new DoIfCostPaid(
new MinionReflectorEffect(), new ManaCostsImpl<>("{2}"), "Pay {2} " +
"to create a token that's a copy of that creature that entered the battlefield?"
),
filter, false, SetTargetPointer.PERMANENT, null
));
}
private MinionReflector(final MinionReflector card) {
@ -64,7 +61,7 @@ class MinionReflectorEffect extends OneShotEffect {
public MinionReflectorEffect() {
super(Outcome.PutCreatureInPlay);
this.staticText = "create a token that's a copy of that creature, except it has haste and \"At the beginning of the end step, sacrifice this permanent.";
this.staticText = "create a token that's a copy of that creature, except it has haste and \"At the beginning of the end step, sacrifice this permanent.\"";
}
public MinionReflectorEffect(final MinionReflectorEffect effect) {

View file

@ -1,6 +1,5 @@
package mage.cards.q;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.condition.CompoundCondition;
@ -13,27 +12,28 @@ import mage.abilities.effects.common.continuous.CastAsThoughItHadFlashSourceEffe
import mage.abilities.keyword.ReachAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.filter.common.FilterControlledPermanent;
import mage.watchers.common.PlayerAttackedStepWatcher;
import java.util.UUID;
/**
*
* @author Plopman
*/
public final class QasaliAmbusher extends CardImpl {
private static final FilterControlledPermanent filterForest = new FilterControlledPermanent();
private static final FilterControlledPermanent filterPlains = new FilterControlledPermanent();
private static final FilterControlledPermanent filterForest = new FilterControlledPermanent(SubType.FOREST);
private static final FilterControlledPermanent filterPlains = new FilterControlledPermanent(SubType.PLAINS);
static {
filterForest.add(SubType.FOREST.getPredicate());
filterPlains.add(SubType.PLAINS.getPredicate());
}
private static final Condition condition =
new CompoundCondition("If a creature is attacking you and you control a Forest and a Plains",
AttackedThisStepCondition.instance, new PermanentsOnTheBattlefieldCondition(filterForest), new PermanentsOnTheBattlefieldCondition(filterPlains));
private static final Condition condition = new CompoundCondition(
"If a creature is attacking you and you control a Forest and a Plains",
AttackedThisStepCondition.instance,
new PermanentsOnTheBattlefieldCondition(filterForest),
new PermanentsOnTheBattlefieldCondition(filterPlains)
);
public QasaliAmbusher(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{W}");
@ -48,11 +48,14 @@ public final class QasaliAmbusher extends CardImpl {
// If a creature is attacking you and you control a Forest and a Plains,
// you may cast Qasali Ambusher without paying its mana cost and as though it had flash.
Ability ability = new AlternativeCostSourceAbility(null, condition);
ability.addEffect(new ConditionalAsThoughEffect(new CastAsThoughItHadFlashSourceEffect(Duration.EndOfGame), condition)
.setText("you may cast {this} without paying its mana cost and as though it had flash"));
ability.addWatcher(new PlayerAttackedStepWatcher());
this.addAbility(ability);
Ability ability = new AlternativeCostSourceAbility(
null, condition, "if a creature is attacking you and you control a Forest and a Plains, " +
"you may cast {this} without paying its mana cost and as though it had flash."
);
ability.addEffect(new ConditionalAsThoughEffect(
new CastAsThoughItHadFlashSourceEffect(Duration.EndOfGame), condition
));
this.addAbility(ability, new PlayerAttackedStepWatcher());
}
private QasaliAmbusher(final QasaliAmbusher card) {
@ -63,4 +66,4 @@ public final class QasaliAmbusher extends CardImpl {
public QasaliAmbusher copy() {
return new QasaliAmbusher(this);
}
}
}

View file

@ -31,7 +31,7 @@ public final class QuietusSpike extends CardImpl {
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(DeathtouchAbility.getInstance(), AttachmentType.EQUIPMENT)));
// Whenever equipped creature deals combat damage to a player, that player loses half their life, rounded up.
this.addAbility(new DealsDamageToAPlayerAttachedTriggeredAbility(new LoseHalfLifeTargetEffect(), "equipped", false, true));
this.addAbility(new DealsDamageToAPlayerAttachedTriggeredAbility(new LoseHalfLifeTargetEffect(), "equipped creature", false, true));
// Equip {3}
this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(3)));

View file

@ -1,7 +1,5 @@
package mage.cards.r;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
@ -13,23 +11,24 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.AbilityPredicate;
import java.util.UUID;
/**
*
* @author Plopman
*/
public final class RockcasterPlatoon extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with flying");
static {
filter.add(new AbilityPredicate(FlyingAbility.class));
}
public RockcasterPlatoon(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}{W}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{W}{W}");
this.subtype.add(SubType.RHINO);
this.subtype.add(SubType.SOLDIER);
@ -37,8 +36,8 @@ public final class RockcasterPlatoon extends CardImpl {
this.toughness = new MageInt(7);
// {4}{G}: Rockcaster Platoon deals 2 damage to each creature with flying and each player.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageAllEffect(2, filter), new ManaCostsImpl("{4}{G}"));
ability.addEffect(new DamagePlayersEffect(2));
Ability ability = new SimpleActivatedAbility(new DamageAllEffect(2, filter), new ManaCostsImpl<>("{4}{G}"));
ability.addEffect(new DamagePlayersEffect(2).setText("and each player"));
this.addAbility(ability);
}

View file

@ -1,7 +1,5 @@
package mage.cards.s;
import java.util.UUID;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
import mage.abilities.keyword.DoubleStrikeAbility;
@ -11,19 +9,23 @@ import mage.constants.CardType;
import mage.constants.Duration;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
*
* @author North
*/
public final class SangriteSurge extends CardImpl {
public SangriteSurge(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{R}{G}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{R}{G}");
// Target creature gets +3/+3 and gains double strike until end of turn.
this.getSpellAbility().addEffect(new BoostTargetEffect(3, 3, Duration.EndOfTurn));
this.getSpellAbility().addEffect(new GainAbilityTargetEffect(DoubleStrikeAbility.getInstance(), Duration.EndOfTurn));
this.getSpellAbility().addEffect(new BoostTargetEffect(
3, 3, Duration.EndOfTurn
).setText("target creature gets +3/+3"));
this.getSpellAbility().addEffect(new GainAbilityTargetEffect(
DoubleStrikeAbility.getInstance(), Duration.EndOfTurn
).setText("and gains double strike until end of turn"));
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
}

View file

@ -26,8 +26,6 @@ import java.util.UUID;
*/
public final class SarkhanVol extends CardImpl {
private static DragonToken dragonToken = new DragonToken();
public SarkhanVol(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{2}{R}{G}");
this.addSuperType(SuperType.LEGENDARY);
@ -36,20 +34,26 @@ public final class SarkhanVol extends CardImpl {
this.setStartingLoyalty(4);
// +1: Creatures you control get +1/+1 and gain haste until end of turn.
Effects effects1 = new Effects();
effects1.add(new BoostControlledEffect(1, 1, Duration.EndOfTurn));
effects1.add(new GainAbilityControlledEffect(HasteAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURES));
Effects effects1 = new Effects(new BoostControlledEffect(
1, 1, Duration.EndOfTurn
).setText("creatures you control get +1/+1"));
effects1.add(new GainAbilityControlledEffect(
HasteAbility.getInstance(), Duration.EndOfTurn,
StaticFilters.FILTER_PERMANENT_CREATURES
).setText("and gain haste until end of turn"));
this.addAbility(new LoyaltyAbility(effects1, 1));
// -2: Gain control of target creature until end of turn. Untap that creature. It gains haste until end of turn.
LoyaltyAbility ability = new LoyaltyAbility(new GainControlTargetEffect(Duration.EndOfTurn), -2);
ability.addEffect(new UntapTargetEffect().setText("Untap that creature"));
ability.addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn));
ability.addEffect(new GainAbilityTargetEffect(
HasteAbility.getInstance(), Duration.EndOfTurn
).setText("It gains haste until end of turn"));
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
// -6: Create five 4/4 red Dragon creature tokens with flying.
this.addAbility(new LoyaltyAbility(new CreateTokenEffect(dragonToken, 5), -6));
this.addAbility(new LoyaltyAbility(new CreateTokenEffect(new DragonToken(), 5), -6));
}
private SarkhanVol(final SarkhanVol card) {

View file

@ -1,8 +1,6 @@
package mage.cards.s;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.AttachEffect;
@ -13,23 +11,19 @@ import mage.abilities.keyword.EnchantAbility;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.AttachmentType;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.constants.*;
import mage.target.TargetPermanent;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
*
* @author Loki
*/
public final class SavageHunger extends CardImpl {
public SavageHunger (UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{G}");
public SavageHunger(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}");
this.subtype.add(SubType.AURA);
@ -38,13 +32,17 @@ public final class SavageHunger extends CardImpl {
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
this.addAbility(new EnchantAbility(auraTarget.getTargetName()));
SimpleStaticAbility ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 0, Duration.WhileOnBattlefield));
ability.addEffect(new GainAbilityAttachedEffect(TrampleAbility.getInstance(), AttachmentType.AURA));
Ability ability = new SimpleStaticAbility(new BoostEnchantedEffect(
1, 0, Duration.WhileOnBattlefield
));
ability.addEffect(new GainAbilityAttachedEffect(
TrampleAbility.getInstance(), AttachmentType.AURA
).setText("and has trample"));
this.addAbility(ability);
this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}")));
this.addAbility(new CyclingAbility(new ManaCostsImpl<>("{2}")));
}
public SavageHunger (final SavageHunger card) {
public SavageHunger(final SavageHunger card) {
super(card);
}

View file

@ -21,7 +21,7 @@ public final class TortoiseFormation extends CardImpl {
// Creatures you control gain shroud until end of turn.
this.getSpellAbility().addEffect(new GainAbilityControlledEffect(
ShroudAbility.getInstance(), Duration.EndOfTurn,
StaticFilters.FILTER_CONTROLLED_CREATURES
StaticFilters.FILTER_PERMANENT_CREATURES
));
}

View file

@ -1,7 +1,5 @@
package mage.cards.v;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.DiesCreatureTriggeredAbility;
import mage.abilities.dynamicvalue.common.CardsInTargetHandCount;
@ -11,18 +9,19 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.target.TargetPlayer;
import java.util.UUID;
/**
*
* @author Plopman
*/
public final class ViciousShadows extends CardImpl {
public ViciousShadows(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{6}{R}");
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{6}{R}");
// Whenever a creature dies, you may have Vicious Shadows deal damage to target player equal to the number of cards in that player's hand.
Ability ability = new DiesCreatureTriggeredAbility(new DamageTargetEffect(CardsInTargetHandCount.instance), true);
Ability ability = new DiesCreatureTriggeredAbility(new DamageTargetEffect(CardsInTargetHandCount.instance)
.setText("you may have {this} deal damage to target player equal to the number of cards in that player's hand"), true);
ability.addTarget(new TargetPlayer());
this.addAbility(ability);
}

View file

@ -1,30 +1,28 @@
package mage.cards.v;
import java.util.UUID;
import mage.abilities.effects.common.DestroyTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.FilterPermanent;
import mage.filter.StaticFilters;
import mage.target.TargetPermanent;
import java.util.UUID;
/**
*
* @author Loki
*/
public final class ViolentUltimatum extends CardImpl {
public ViolentUltimatum (UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{B}{B}{R}{R}{R}{G}{G}");
public ViolentUltimatum(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{B}{B}{R}{R}{R}{G}{G}");
this.getSpellAbility().addEffect(new DestroyTargetEffect());
this.getSpellAbility().addTarget(new TargetPermanent(3, 3, new FilterPermanent(), false));
this.getSpellAbility().addTarget(new TargetPermanent(3, StaticFilters.FILTER_PERMANENTS));
}
public ViolentUltimatum (final ViolentUltimatum card) {
public ViolentUltimatum(final ViolentUltimatum card) {
super(card);
}

View file

@ -1,7 +1,5 @@
package mage.cards.w;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
@ -11,18 +9,19 @@ import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
*
* @author North
*/
public final class WelkinGuide extends CardImpl {
public WelkinGuide(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}");
this.subtype.add(SubType.BIRD);
this.subtype.add(SubType.CLERIC);
@ -30,8 +29,12 @@ public final class WelkinGuide extends CardImpl {
this.toughness = new MageInt(2);
this.addAbility(FlyingAbility.getInstance());
Ability ability = new EntersBattlefieldTriggeredAbility(new BoostTargetEffect(2, 2, Duration.EndOfTurn), false);
ability.addEffect(new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn));
Ability ability = new EntersBattlefieldTriggeredAbility(new BoostTargetEffect(
2, 2, Duration.EndOfTurn
).setText("target creature gets +2/+2"), false);
ability.addEffect(new GainAbilityTargetEffect(
FlyingAbility.getInstance(), Duration.EndOfTurn
).setText("and gains flying until end of turn"));
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
}

View file

@ -20,7 +20,7 @@ import mage.target.common.TargetAnyTarget;
*/
public final class WhereAncientsTread extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with power 5 or greater");
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature with power 5 or greater");
static {
filter.add(new PowerPredicate(ComparisonType.MORE_THAN, 4));
}
@ -30,7 +30,7 @@ import mage.target.common.TargetAnyTarget;
// Whenever a creature with power 5 or greater enters the battlefield under your control, you may have Where Ancients Tread deal 5 damage to any target.
Ability ability = new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new DamageTargetEffect(5), filter, true);
Ability ability = new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new DamageTargetEffect(5).setText("you may have {this} deal 5 damage to any target"), filter, true);
ability.addTarget(new TargetAnyTarget());
this.addAbility(ability);
}

View file

@ -62,7 +62,7 @@ public class VerifyCardDataTest {
private static final Logger logger = Logger.getLogger(VerifyCardDataTest.class);
private static final String FULL_ABILITIES_CHECK_SET_CODE = "KHC"; // check all abilities and output cards with wrong abilities texts;
private static final String FULL_ABILITIES_CHECK_SET_CODE = "ALA"; // 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,11 +118,12 @@ public class CreateTokenEffect extends OneShotEffect {
}
StringBuilder sb = new StringBuilder("create ");
if (amount.toString().equals("1")) {
sb.append("a ");
if (tapped && !attacking) {
sb.append("tapped ");
sb.append("a tapped ");
sb.append(token.getDescription());
} else {
sb.append(CardUtil.addArticle(token.getDescription()));
}
sb.append(token.getDescription());
} else {
sb.append(CardUtil.numberToText(amount.toString())).append(' ');
if (tapped && !attacking) {

View file

@ -1,26 +1,23 @@
package mage.abilities.effects.common;
import mage.constants.Outcome;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.constants.Outcome;
import mage.filter.FilterPermanent;
import mage.game.Game;
import mage.game.permanent.Permanent;
/**
*
* @author BetaSteward_at_googlemail.com
*/
public class DestroyAllControlledTargetEffect extends OneShotEffect {
private FilterPermanent filter;
private final FilterPermanent filter;
public DestroyAllControlledTargetEffect(FilterPermanent filter) {
super(Outcome.DestroyPermanent);
this.filter = filter;
staticText = "Destroy all " + filter.getMessage() + " controlled by target player";
staticText = "Destroy all " + filter.getMessage() + " target player controls";
}
public DestroyAllControlledTargetEffect(final DestroyAllControlledTargetEffect effect) {
@ -35,10 +32,9 @@ public class DestroyAllControlledTargetEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
for (Permanent permanent: game.getBattlefield().getAllActivePermanents(filter, source.getFirstTarget(), game)) {
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, source.getFirstTarget(), game)) {
permanent.destroy(source, game, false);
}
return true;
}
}

View file

@ -51,7 +51,8 @@ public class MayTapOrUntapTargetEffect extends OneShotEffect {
if (mode.getTargets().isEmpty()) {
return "you may tap or untap it";
} else {
return "you may tap or untap target " + mode.getTargets().get(0).getTargetName();
String targetName = mode.getTargets().get(0).getTargetName();
return "you may tap or untap " + (targetName.contains("target") ? "" : "target ") + targetName;
}
}
}

View file

@ -51,11 +51,12 @@ public class MillCardsTargetEffect extends OneShotEffect {
if (staticText != null && !staticText.isEmpty()) {
return staticText;
}
StringBuilder sb = new StringBuilder("target ");
StringBuilder sb = new StringBuilder();
if (!mode.getTargets().isEmpty()) {
sb.append("target ");
sb.append(mode.getTargets().get(0).getTargetName());
} else {
sb.append("player");
sb.append("that player");
}
sb.append(" mills ");
if (numberCards.toString().equals("1")) {

View file

@ -24,7 +24,7 @@ public class ReturnToHandFromBattlefieldAllEffect extends OneShotEffect {
public ReturnToHandFromBattlefieldAllEffect(FilterPermanent filter) {
super(Outcome.ReturnToHand);
this.filter = filter;
staticText = "Return all " + filter.getMessage() + " to their owners' hands";
staticText = "return all " + filter.getMessage() + " to their owners' hands";
}
public ReturnToHandFromBattlefieldAllEffect(final ReturnToHandFromBattlefieldAllEffect effect) {

View file

@ -13,7 +13,7 @@ import mage.abilities.keyword.FlyingAbility;
public final class ThopterToken extends TokenImpl {
public ThopterToken() {
super("Thopter", "1/1 blue Thopter artifact creature tokens with flying");
super("Thopter", "1/1 blue Thopter artifact creature token with flying");
cardType.add(CardType.CREATURE);
cardType.add(CardType.ARTIFACT);
color.setBlue(true);

View file

@ -948,7 +948,7 @@ public final class CardUtil {
}
}
private static final String vowels = "aeiouAEIOU";
private static final String vowels = "aeiouAEIOU8";
public static String addArticle(String text) {
if (text.startsWith("a ")