diff --git a/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/MTGO1v1Commander.java b/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/MTGO1v1Commander.java index 6b0f0dab252..7281e662c8c 100644 --- a/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/MTGO1v1Commander.java +++ b/Mage.Server.Plugins/Mage.Deck.Constructed/src/mage/deck/MTGO1v1Commander.java @@ -36,17 +36,20 @@ public class MTGO1v1Commander extends Commander { public MTGO1v1Commander() { super("MTGO 1v1 Commander"); banned.add("Ancestral Recall"); - banned.add("Arcum Dagsson"); banned.add("Back to Basics"); banned.add("Balance"); + banned.add("Baral, Chief of Compliance"); banned.add("Bazaar of Baghdad"); banned.add("Black Lotus"); banned.add("Braids, Cabal Minion"); banned.add("Brainstorm"); banned.add("Channel"); banned.add("Derevi, Empyrial Tactician"); + banned.add("Demonic Tutor"); banned.add("Dig Through Time"); banned.add("Edric, Spymaster of Trest"); + banned.add("Emrakul, the Aeons Torn"); + banned.add("Enlightened Tutor"); banned.add("Entomb"); banned.add("Fastbond"); banned.add("Food Chain"); @@ -55,6 +58,7 @@ public class MTGO1v1Commander extends Commander { banned.add("Griselbrand"); banned.add("Hermit Druid"); banned.add("Humility"); + banned.add("Imperial Seal"); banned.add("Karakas"); banned.add("Library of Alexandria"); banned.add("Mana Crypt"); @@ -68,6 +72,7 @@ public class MTGO1v1Commander extends Commander { banned.add("Mox Pearl"); banned.add("Mox Ruby"); banned.add("Mox Sapphire"); + banned.add("Mystical Tutor"); banned.add("Natural Order"); banned.add("Necropotence"); banned.add("Oath of Druids"); @@ -88,8 +93,8 @@ public class MTGO1v1Commander extends Commander { banned.add("Treachery"); banned.add("Treasure Cruise"); banned.add("Vial Smasher the Fierce"); + banned.add("Vampiric Tutor"); banned.add("Yamgmoth's Bargain"); - banned.add("Yisan, the Wanderer Bard"); banned.add("Zur the Enchanter"); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/a/AdmiralBeckettBrass.java b/Mage.Sets/src/mage/cards/a/AdmiralBeckettBrass.java index 5b92f7cd1f8..cd291187e89 100644 --- a/Mage.Sets/src/mage/cards/a/AdmiralBeckettBrass.java +++ b/Mage.Sets/src/mage/cards/a/AdmiralBeckettBrass.java @@ -56,7 +56,7 @@ import java.util.*; */ public class AdmiralBeckettBrass extends CardImpl { - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("other Pirates you control"); + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Pirates you control"); private static final FilterNonlandPermanent filter2 = new FilterNonlandPermanent("nonland permanent controlled by a player who was dealt combat damage by three or more Pirates this turn"); static { diff --git a/Mage.Sets/src/mage/cards/a/AgelessSentinels.java b/Mage.Sets/src/mage/cards/a/AgelessSentinels.java index fe9bd4e47b5..95e308c9f3e 100644 --- a/Mage.Sets/src/mage/cards/a/AgelessSentinels.java +++ b/Mage.Sets/src/mage/cards/a/AgelessSentinels.java @@ -87,7 +87,7 @@ public class AgelessSentinels extends CardImpl { public AgelessSentinelsEffect() { super(Duration.WhileOnBattlefield, Outcome.BecomeCreature); - staticText = "it becomes a Bird Giant, "; + staticText = "it becomes a Bird Giant,"; } public AgelessSentinelsEffect(final AgelessSentinelsEffect effect) { diff --git a/Mage.Sets/src/mage/cards/a/AlliedStrategies.java b/Mage.Sets/src/mage/cards/a/AlliedStrategies.java index 7d1009bad95..517210b49bf 100644 --- a/Mage.Sets/src/mage/cards/a/AlliedStrategies.java +++ b/Mage.Sets/src/mage/cards/a/AlliedStrategies.java @@ -32,6 +32,7 @@ import mage.abilities.dynamicvalue.common.DomainValue; import mage.abilities.effects.common.DrawCardTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; +import mage.constants.AbilityWord; import mage.constants.CardType; import mage.target.TargetPlayer; @@ -42,11 +43,13 @@ import mage.target.TargetPlayer; public class AlliedStrategies extends CardImpl { public AlliedStrategies(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{U}"); // Domain - Target player draws a card for each basic land type among lands he or she controls. this.getSpellAbility().addEffect(new DrawCardTargetEffect(new DomainValue(true))); this.getSpellAbility().addTarget(new TargetPlayer()); + this.getSpellAbility().setAbilityWord(AbilityWord.DOMAIN); + } public AlliedStrategies(final AlliedStrategies card) { diff --git a/Mage.Sets/src/mage/cards/a/AlphaStatus.java b/Mage.Sets/src/mage/cards/a/AlphaStatus.java index 3e106f9fabb..9701f4a5231 100644 --- a/Mage.Sets/src/mage/cards/a/AlphaStatus.java +++ b/Mage.Sets/src/mage/cards/a/AlphaStatus.java @@ -109,6 +109,6 @@ class AlphaStatusDynamicValue implements DynamicValue { @Override public String getMessage() { - return "each other creature on the battlefield that shares a creature type with it"; + return "other creature on the battlefield that shares a creature type with it"; } } diff --git a/Mage.Sets/src/mage/cards/a/AltarGolem.java b/Mage.Sets/src/mage/cards/a/AltarGolem.java index 551314c24d6..40a7fad9498 100644 --- a/Mage.Sets/src/mage/cards/a/AltarGolem.java +++ b/Mage.Sets/src/mage/cards/a/AltarGolem.java @@ -53,18 +53,18 @@ import mage.target.common.TargetControlledCreaturePermanent; /** * * @author jeffwadsworth - + * */ public class AltarGolem extends CardImpl { - + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("untapped creatures you control"); - + static { filter.add(Predicates.not(new TappedPredicate())); } public AltarGolem(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT,CardType.CREATURE},"{7}"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{7}"); this.subtype.add(SubType.GOLEM); this.power = new MageInt(0); @@ -72,17 +72,17 @@ public class AltarGolem extends CardImpl { // Trample this.addAbility(TrampleAbility.getInstance()); - + // Altar Golem's power and toughness are each equal to the number of creatures on the battlefield. - DynamicValue amount = new PermanentsOnBattlefieldCount(new FilterCreaturePermanent("creatures in play")); + DynamicValue amount = new PermanentsOnBattlefieldCount(new FilterCreaturePermanent("creatures on the battlefield")); this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(amount, Duration.EndOfGame))); - + // Altar Golem doesn't untap during your untap step. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepSourceEffect())); - + // Tap five untapped creatures you control: Untap Altar Golem. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapSourceEffect(), new TapTargetCost(new TargetControlledCreaturePermanent(5, 5, filter, true)))); - + } public AltarGolem(final AltarGolem card) { diff --git a/Mage.Sets/src/mage/cards/a/AncientOoze.java b/Mage.Sets/src/mage/cards/a/AncientOoze.java index b1d652fff1d..e6b1542c564 100644 --- a/Mage.Sets/src/mage/cards/a/AncientOoze.java +++ b/Mage.Sets/src/mage/cards/a/AncientOoze.java @@ -52,15 +52,17 @@ import mage.game.permanent.Permanent; public class AncientOoze extends CardImpl { public AncientOoze(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{G}{G}"); this.subtype.add(SubType.OOZE); - this.color.setGreen(true); + this.color.setGreen(true); this.power = new MageInt(0); this.toughness = new MageInt(0); - // Ancient Ooze's power and toughness are each equal to the total converted mana cost of other creatures you control. - this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new AncientOozePowerToughnessValue(), Duration.EndOfGame))); + // Ancient Ooze's power and toughness are each equal to the total converted mana cost of other creatures you control. + this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new AncientOozePowerToughnessValue(), Duration.EndOfGame) + .setText("{this}'s power and toughness are each equal to the total converted mana cost of other creatures you control.") + )); } public AncientOoze(final AncientOoze card) { @@ -74,12 +76,12 @@ public class AncientOoze extends CardImpl { } class AncientOozePowerToughnessValue implements DynamicValue { - + @Override public int calculate(Game game, Ability sourceAbility, Effect effect) { int value = 0; - for(Permanent creature : game.getBattlefield().getActivePermanents(new FilterControlledCreaturePermanent(), sourceAbility.getControllerId(), game)){ - if(creature != null && !sourceAbility.getSourceId().equals(creature.getId())){ + for (Permanent creature : game.getBattlefield().getActivePermanents(new FilterControlledCreaturePermanent(), sourceAbility.getControllerId(), game)) { + if (creature != null && !sourceAbility.getSourceId().equals(creature.getId())) { value += creature.getConvertedManaCost(); } } diff --git a/Mage.Sets/src/mage/cards/a/AtalyaSamiteMaster.java b/Mage.Sets/src/mage/cards/a/AtalyaSamiteMaster.java index 474945b89af..8a62d618860 100644 --- a/Mage.Sets/src/mage/cards/a/AtalyaSamiteMaster.java +++ b/Mage.Sets/src/mage/cards/a/AtalyaSamiteMaster.java @@ -68,7 +68,7 @@ public class AtalyaSamiteMaster extends CardImpl { // {X}, {tap}: Choose one - Prevent the next X damage that would be dealt to target creature this turn; or you gain X life. Spend only white mana on X. PreventDamageToTargetEffect effect = new PreventDamageToTargetEffect(Duration.EndOfTurn, false, true, new ManacostVariableValue()); - effect.setText("Prevent the next X damage that would be dealt to target creature this turn"); + effect.setText("Prevent the next X damage that would be dealt to target creature this turn. Spend only white mana on X."); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{X}")); ability.addCost(new TapSourceCost()); @@ -81,7 +81,7 @@ public class AtalyaSamiteMaster extends CardImpl { // or you gain X life Mode mode = new Mode(); - mode.getEffects().add(new GainLifeEffect(new ManacostVariableValue())); + mode.getEffects().add(new GainLifeEffect(new ManacostVariableValue()).setText("You gain X life. Spend only white mana on X.")); ability.addMode(mode); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/a/AuramancersGuise.java b/Mage.Sets/src/mage/cards/a/AuramancersGuise.java index 7ccaf66d283..7bb76dcc1f5 100644 --- a/Mage.Sets/src/mage/cards/a/AuramancersGuise.java +++ b/Mage.Sets/src/mage/cards/a/AuramancersGuise.java @@ -70,7 +70,7 @@ public class AuramancersGuise extends CardImpl { BoostEnchantedEffect effect = new BoostEnchantedEffect(ptBoost, ptBoost, Duration.WhileOnBattlefield); effect.setText("Enchanted creature gets +2/+2 for each Aura attached to it"); SimpleStaticAbility ability2 = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); - ability2.addEffect(new GainAbilityAttachedEffect(VigilanceAbility.getInstance(), AttachmentType.AURA)); + ability2.addEffect(new GainAbilityAttachedEffect(VigilanceAbility.getInstance(), AttachmentType.AURA).setText("and has vigilance")); this.addAbility(ability2); } diff --git a/Mage.Sets/src/mage/cards/b/BanishingKnack.java b/Mage.Sets/src/mage/cards/b/BanishingKnack.java index 63501ca5988..e583d547414 100644 --- a/Mage.Sets/src/mage/cards/b/BanishingKnack.java +++ b/Mage.Sets/src/mage/cards/b/BanishingKnack.java @@ -51,12 +51,14 @@ public class BanishingKnack extends CardImpl { private static final FilterPermanent filter = new FilterNonlandPermanent(); - public BanishingKnack(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{U}"); + public BanishingKnack(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{U}"); Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandTargetEffect(), new TapSourceCost()); gainedAbility.addTarget(new TargetPermanent(filter)); - this.getSpellAbility().addEffect(new GainAbilityTargetEffect(gainedAbility, Duration.EndOfTurn)); + this.getSpellAbility().addEffect(new GainAbilityTargetEffect(gainedAbility, Duration.EndOfTurn) + .setText("Until end of turn, target creature gains \"{T}: Return target nonland permanent to its owner's hand.\"") + ); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); } diff --git a/Mage.Sets/src/mage/cards/b/BattlefieldThaumaturge.java b/Mage.Sets/src/mage/cards/b/BattlefieldThaumaturge.java index 1177fc15e21..9b0993799e3 100644 --- a/Mage.Sets/src/mage/cards/b/BattlefieldThaumaturge.java +++ b/Mage.Sets/src/mage/cards/b/BattlefieldThaumaturge.java @@ -55,7 +55,7 @@ import mage.util.CardUtil; public class BattlefieldThaumaturge extends CardImpl { public BattlefieldThaumaturge(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); this.subtype.add(SubType.HUMAN, SubType.WIZARD); this.power = new MageInt(2); @@ -79,10 +79,9 @@ public class BattlefieldThaumaturge extends CardImpl { class BattlefieldThaumaturgeSpellsCostReductionEffect extends CostModificationEffectImpl { - public BattlefieldThaumaturgeSpellsCostReductionEffect() { super(Duration.WhileOnBattlefield, Outcome.Benefit, CostModificationType.REDUCE_COST); - this.staticText = "Each instant and sorcery spell you cast costs 1 less to cast for each creature it targets"; + this.staticText = "Each instant and sorcery spell you cast costs {1} less to cast for each creature it targets"; } protected BattlefieldThaumaturgeSpellsCostReductionEffect(BattlefieldThaumaturgeSpellsCostReductionEffect effect) { @@ -92,9 +91,9 @@ class BattlefieldThaumaturgeSpellsCostReductionEffect extends CostModificationEf @Override public boolean apply(Game game, Ability source, Ability abilityToModify) { Set creaturesTargeted = new HashSet<>(); - for (Target target: abilityToModify.getTargets()) { - for (UUID uuid: target.getTargets()) { - Permanent permanent = game.getPermanent(uuid); + for (Target target : abilityToModify.getTargets()) { + for (UUID uuid : target.getTargets()) { + Permanent permanent = game.getPermanent(uuid); if (permanent != null && permanent.isCreature()) { creaturesTargeted.add(permanent.getId()); } diff --git a/Mage.Sets/src/mage/cards/b/BellowingAegisaur.java b/Mage.Sets/src/mage/cards/b/BellowingAegisaur.java index 7c2db5f657e..e7dbc3daa49 100644 --- a/Mage.Sets/src/mage/cards/b/BellowingAegisaur.java +++ b/Mage.Sets/src/mage/cards/b/BellowingAegisaur.java @@ -49,7 +49,7 @@ import mage.filter.predicate.permanent.ControllerPredicate; */ public class BellowingAegisaur extends CardImpl { - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("each other creature you control"); + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("other creature you control"); static { filter.add(new ControllerPredicate(TargetController.YOU)); diff --git a/Mage.Sets/src/mage/cards/b/BelltollDragon.java b/Mage.Sets/src/mage/cards/b/BelltollDragon.java index a2eb839f713..8f62f096aba 100644 --- a/Mage.Sets/src/mage/cards/b/BelltollDragon.java +++ b/Mage.Sets/src/mage/cards/b/BelltollDragon.java @@ -49,8 +49,8 @@ import mage.filter.predicate.permanent.AnotherPredicate; * @author fireshoes */ public class BelltollDragon extends CardImpl { - - private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("each other Dragon creature you control"); + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("other Dragon creature you control"); static { filter.add(new AnotherPredicate()); @@ -58,7 +58,7 @@ public class BelltollDragon extends CardImpl { } public BelltollDragon(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{U}"); this.subtype.add(SubType.DRAGON); this.power = new MageInt(3); this.toughness = new MageInt(3); @@ -69,7 +69,7 @@ public class BelltollDragon extends CardImpl { this.addAbility(HexproofAbility.getInstance()); // Megamorph {5}{U}{U} this.addAbility(new MorphAbility(this, new ManaCostsImpl("{5}{U}{U}"), true)); - + // When Belltoll Dragon is turned face up, put a +1/+1 counter on each other Dragon creature you control. this.addAbility(new TurnedFaceUpSourceTriggeredAbility(new AddCountersAllEffect(CounterType.P1P1.createInstance(), filter), false, false)); } diff --git a/Mage.Sets/src/mage/cards/b/Bequeathal.java b/Mage.Sets/src/mage/cards/b/Bequeathal.java index 0243f77892f..e1c6f12f92f 100644 --- a/Mage.Sets/src/mage/cards/b/Bequeathal.java +++ b/Mage.Sets/src/mage/cards/b/Bequeathal.java @@ -48,7 +48,7 @@ import mage.target.common.TargetCreaturePermanent; public class Bequeathal extends CardImpl { public Bequeathal(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{G}"); this.subtype.add(SubType.AURA); // Enchant creature @@ -59,7 +59,7 @@ public class Bequeathal extends CardImpl { this.addAbility(ability); // When enchanted creature dies, you draw two cards. - this.addAbility( new DiesAttachedTriggeredAbility(new DrawCardSourceControllerEffect(2), "enchanted creature")); + this.addAbility(new DiesAttachedTriggeredAbility(new DrawCardSourceControllerEffect(2).setText("you draw two cards"), "enchanted creature")); } public Bequeathal(final Bequeathal card) { diff --git a/Mage.Sets/src/mage/cards/b/BlackCarriage.java b/Mage.Sets/src/mage/cards/b/BlackCarriage.java index 98e36a38c46..1c6908c9afa 100644 --- a/Mage.Sets/src/mage/cards/b/BlackCarriage.java +++ b/Mage.Sets/src/mage/cards/b/BlackCarriage.java @@ -52,21 +52,21 @@ import mage.target.common.TargetControlledCreaturePermanent; public class BlackCarriage extends CardImpl { public BlackCarriage(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}"); this.subtype.add(SubType.HORSE); this.power = new MageInt(4); this.toughness = new MageInt(4); // Trample this.addAbility(TrampleAbility.getInstance()); - + // Black Carriage doesn't untap during your untap step. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepSourceEffect())); - + // Sacrifice a creature: Untap Black Carriage. Activate this ability only during your upkeep. - this.addAbility(new ConditionalActivatedAbility(Zone.BATTLEFIELD, + this.addAbility(new ConditionalActivatedAbility(Zone.BATTLEFIELD, new UntapSourceEffect(), new SacrificeTargetCost(new TargetControlledCreaturePermanent(new FilterControlledCreaturePermanent("a creature"))), - new IsStepCondition(PhaseStep.UPKEEP), null)); + new IsStepCondition(PhaseStep.UPKEEP), "Sacrifice a creature: Untap {this}. Activate this ability only during your upkeep.")); } public BlackCarriage(final BlackCarriage card) { diff --git a/Mage.Sets/src/mage/cards/b/BlackManaBattery.java b/Mage.Sets/src/mage/cards/b/BlackManaBattery.java index 8e6449f4d12..4b831bee4f0 100644 --- a/Mage.Sets/src/mage/cards/b/BlackManaBattery.java +++ b/Mage.Sets/src/mage/cards/b/BlackManaBattery.java @@ -53,7 +53,6 @@ public class BlackManaBattery extends CardImpl { public BlackManaBattery(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); - // {2}, {tap}: Put a charge counter on Black Mana Battery. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.STORAGE.createInstance(1)), new GenericManaCost(2)); @@ -65,10 +64,10 @@ public class BlackManaBattery extends CardImpl { Mana.BlackMana(1), new IntPlusDynamicValue(1, new RemovedCountersForCostValue()), new TapSourceCost(), - "Add {B} to your mana pool, then add {B} to your mana pool for each storage counter removed this way", - true, new CountersSourceCount(CounterType.STORAGE)); - ability.addCost(new RemoveVariableCountersSourceCost(CounterType.STORAGE.createInstance(), - "Remove X storage counters from {this}")); + "Add {B} to your mana pool, then add {B} to your mana pool for each charge counter removed this way", + true, new CountersSourceCount(CounterType.CHARGE)); + ability.addCost(new RemoveVariableCountersSourceCost(CounterType.CHARGE.createInstance(), + "Remove any number of charge counters from {this}")); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/b/BloodcrazedHoplite.java b/Mage.Sets/src/mage/cards/b/BloodcrazedHoplite.java index b83b30f6847..4ea155477da 100644 --- a/Mage.Sets/src/mage/cards/b/BloodcrazedHoplite.java +++ b/Mage.Sets/src/mage/cards/b/BloodcrazedHoplite.java @@ -61,7 +61,7 @@ public class BloodcrazedHoplite extends CardImpl { } public BloodcrazedHoplite(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); this.subtype.add(SubType.HUMAN, SubType.SOLDIER); this.power = new MageInt(2); @@ -88,7 +88,7 @@ public class BloodcrazedHoplite extends CardImpl { class BloodcrazedHopliteTriggeredAbility extends TriggeredAbilityImpl { public BloodcrazedHopliteTriggeredAbility() { - super(Zone.ALL, new RemoveCounterTargetEffect(CounterType.P1P1.createInstance()), true); + super(Zone.ALL, new RemoveCounterTargetEffect(CounterType.P1P1.createInstance()), false); } public BloodcrazedHopliteTriggeredAbility(BloodcrazedHopliteTriggeredAbility ability) { diff --git a/Mage.Sets/src/mage/cards/b/BlueManaBattery.java b/Mage.Sets/src/mage/cards/b/BlueManaBattery.java index 410b81cb00a..4a16c87b1dc 100644 --- a/Mage.Sets/src/mage/cards/b/BlueManaBattery.java +++ b/Mage.Sets/src/mage/cards/b/BlueManaBattery.java @@ -64,10 +64,10 @@ public class BlueManaBattery extends CardImpl { Mana.BlueMana(1), new IntPlusDynamicValue(1, new RemovedCountersForCostValue()), new TapSourceCost(), - "Add {U} to your mana pool, then add {U} to your mana pool for each storage counter removed this way", - true, new CountersSourceCount(CounterType.STORAGE)); - ability.addCost(new RemoveVariableCountersSourceCost(CounterType.STORAGE.createInstance(), - "Remove X storage counters from {this}")); + "Add {U} to your mana pool, then add {U} to your mana pool for each charge counter removed this way", + true, new CountersSourceCount(CounterType.CHARGE)); + ability.addCost(new RemoveVariableCountersSourceCost(CounterType.CHARGE.createInstance(), + "Remove any number of charge counters from {this}")); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/b/BonethornValesk.java b/Mage.Sets/src/mage/cards/b/BonethornValesk.java index 6af8e310eb8..ebaa60b72fd 100644 --- a/Mage.Sets/src/mage/cards/b/BonethornValesk.java +++ b/Mage.Sets/src/mage/cards/b/BonethornValesk.java @@ -53,7 +53,7 @@ public class BonethornValesk extends CardImpl { this.toughness = new MageInt(2); // Whenever a permanent is turned face up, Bonethorn Valesk deals 1 damage to target creature or player. - Ability ability = new TurnedFaceUpAllTriggeredAbility(new DamageTargetEffect(1), new FilterPermanent()); + Ability ability = new TurnedFaceUpAllTriggeredAbility(new DamageTargetEffect(1), new FilterPermanent("a permanent")); ability.addTarget(new TargetCreatureOrPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/b/BraidsConjurerAdept.java b/Mage.Sets/src/mage/cards/b/BraidsConjurerAdept.java index 950894450f7..0f1050c8752 100644 --- a/Mage.Sets/src/mage/cards/b/BraidsConjurerAdept.java +++ b/Mage.Sets/src/mage/cards/b/BraidsConjurerAdept.java @@ -47,8 +47,8 @@ import mage.filter.predicate.mageobject.CardTypePredicate; */ public class BraidsConjurerAdept extends CardImpl { - private static final FilterCard filter = new FilterCard("artifact, creature, or land card") -; + private static final FilterCard filter = new FilterCard("an artifact, creature, or land card"); + static { filter.add(Predicates.or( new CardTypePredicate(CardType.ARTIFACT), @@ -57,7 +57,7 @@ public class BraidsConjurerAdept extends CardImpl { } public BraidsConjurerAdept(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{U}"); addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.HUMAN, SubType.WIZARD); this.power = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/b/BrownOuphe.java b/Mage.Sets/src/mage/cards/b/BrownOuphe.java index 0e8014f0325..1810831dd07 100644 --- a/Mage.Sets/src/mage/cards/b/BrownOuphe.java +++ b/Mage.Sets/src/mage/cards/b/BrownOuphe.java @@ -53,7 +53,7 @@ import java.util.UUID; */ public class BrownOuphe extends CardImpl { - private final static FilterStackObject filter = new FilterStackObject("ability from an artifact source"); + private final static FilterStackObject filter = new FilterStackObject("activated ability from an artifact source"); static { filter.add(new ArtifactSourcePredicate()); diff --git a/Mage.Sets/src/mage/cards/c/CabalConditioning.java b/Mage.Sets/src/mage/cards/c/CabalConditioning.java index bd96b2cd0ff..5ac53f18b1b 100644 --- a/Mage.Sets/src/mage/cards/c/CabalConditioning.java +++ b/Mage.Sets/src/mage/cards/c/CabalConditioning.java @@ -42,10 +42,12 @@ import mage.target.TargetPlayer; public class CabalConditioning extends CardImpl { public CabalConditioning(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{6}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{6}{B}"); // Any number of target players each discard a number of cards equal to the highest converted mana cost among permanents you control. - this.getSpellAbility().addEffect(new DiscardTargetEffect(new HighestConvertedManaCostValue())); + this.getSpellAbility().addEffect(new DiscardTargetEffect(new HighestConvertedManaCostValue()) + .setText("Any number of target players each discard a number of cards equal to the highest converted mana cost among permanents you control.") + ); this.getSpellAbility().addTarget(new TargetPlayer(0, Integer.MAX_VALUE, false)); } diff --git a/Mage.Sets/src/mage/cards/c/CaptivatingCrew.java b/Mage.Sets/src/mage/cards/c/CaptivatingCrew.java index 5e90f4283d8..ae87461a4f0 100644 --- a/Mage.Sets/src/mage/cards/c/CaptivatingCrew.java +++ b/Mage.Sets/src/mage/cards/c/CaptivatingCrew.java @@ -54,7 +54,7 @@ import mage.target.common.TargetCreaturePermanent; */ public class CaptivatingCrew extends CardImpl { - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("target creature an opponent controls"); + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls"); static { filter.add(new ControllerPredicate(TargetController.OPPONENT)); diff --git a/Mage.Sets/src/mage/cards/c/CavalryMaster.java b/Mage.Sets/src/mage/cards/c/CavalryMaster.java index ca06f4981a9..6d201730641 100644 --- a/Mage.Sets/src/mage/cards/c/CavalryMaster.java +++ b/Mage.Sets/src/mage/cards/c/CavalryMaster.java @@ -46,15 +46,15 @@ import mage.filter.predicate.mageobject.AbilityPredicate; * @author Plopman */ public class CavalryMaster extends CardImpl { - + static final private FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creatures you control with flanking"); - - static{ + + static { filter.add(new AbilityPredicate(FlankingAbility.class)); } - + public CavalryMaster(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{W}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.KNIGHT); @@ -64,7 +64,10 @@ public class CavalryMaster extends CardImpl { // Flanking this.addAbility(new FlankingAbility()); // Other creatures you control with flanking have flanking. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(new FlankingAbility(), Duration.WhileOnBattlefield, filter, true))); + this.addAbility(new SimpleStaticAbility( + Zone.BATTLEFIELD, new GainAbilityAllEffect(new FlankingAbility(), Duration.WhileOnBattlefield, filter, true) + .setText("Other creatures you control with flanking have flanking.") + )); } public CavalryMaster(final CavalryMaster card) { diff --git a/Mage.Sets/src/mage/cards/c/ChariotOfVictory.java b/Mage.Sets/src/mage/cards/c/ChariotOfVictory.java index e45ae7966d1..9207df79dde 100644 --- a/Mage.Sets/src/mage/cards/c/ChariotOfVictory.java +++ b/Mage.Sets/src/mage/cards/c/ChariotOfVictory.java @@ -52,13 +52,13 @@ import mage.constants.Zone; public class ChariotOfVictory extends CardImpl { public ChariotOfVictory(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); this.subtype.add(SubType.EQUIPMENT); // Equipped creature has first strike, trample, and haste. Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FirstStrikeAbility.getInstance(), AttachmentType.EQUIPMENT)); Effect effect = new GainAbilityAttachedEffect(TrampleAbility.getInstance(), AttachmentType.EQUIPMENT); - effect.setText(", trample"); + effect.setText(", trample,"); ability.addEffect(effect); effect = new GainAbilityAttachedEffect(HasteAbility.getInstance(), AttachmentType.EQUIPMENT); effect.setText("and haste"); diff --git a/Mage.Sets/src/mage/cards/c/ChillHaunting.java b/Mage.Sets/src/mage/cards/c/ChillHaunting.java index 4b678c04116..77610b404dd 100644 --- a/Mage.Sets/src/mage/cards/c/ChillHaunting.java +++ b/Mage.Sets/src/mage/cards/c/ChillHaunting.java @@ -50,7 +50,7 @@ public class ChillHaunting extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{B}"); // As an additional cost to cast Chill Haunting, exile X creature cards from your graveyard. - this.getSpellAbility().addCost(new ExileXFromYourGraveCost(new FilterCreatureCard("cards from your graveyard"))); + this.getSpellAbility().addCost(new ExileXFromYourGraveCost(new FilterCreatureCard("creature cards from your graveyard"), true)); // Target creature gets -X/-X until end of turn. this.getSpellAbility().addTarget(new TargetCreaturePermanent()); diff --git a/Mage.Sets/src/mage/cards/c/ClergyOfTheHolyNimbus.java b/Mage.Sets/src/mage/cards/c/ClergyOfTheHolyNimbus.java index f8c2be4edd7..5022878c6fb 100644 --- a/Mage.Sets/src/mage/cards/c/ClergyOfTheHolyNimbus.java +++ b/Mage.Sets/src/mage/cards/c/ClergyOfTheHolyNimbus.java @@ -53,7 +53,7 @@ import mage.game.permanent.Permanent; public class ClergyOfTheHolyNimbus extends CardImpl { public ClergyOfTheHolyNimbus(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); @@ -61,7 +61,7 @@ public class ClergyOfTheHolyNimbus extends CardImpl { // If Clergy of the Holy Nimbus would be destroyed, regenerate it. this.addAbility(new SimpleStaticAbility(Zone.ALL, new ClergyOfTheHolyNimbusReplacementEffect())); - + // {1}: Clergy of the Holy Nimbus can't be regenerated this turn. Only any opponent may activate this ability. this.addAbility(new ActivateOnlyByOpponentActivatedAbility(Zone.BATTLEFIELD, new CantBeRegeneratedSourceEffect(Duration.EndOfTurn), new ManaCostsImpl("{1}"))); } @@ -90,7 +90,7 @@ class ClergyOfTheHolyNimbusReplacementEffect extends ReplacementEffectImpl { @Override public boolean replaceEvent(GameEvent event, Ability source, Game game) { Permanent ClergyOfTheHolyNimbus = game.getPermanent(event.getTargetId()); - if (ClergyOfTheHolyNimbus != null + if (ClergyOfTheHolyNimbus != null && event.getAmount() == 0) { // 1=noRegen if (ClergyOfTheHolyNimbus.regenerate(source.getSourceId(), game)) { game.informPlayers(source.getSourceObject(game).getName() + " has been regenerated."); @@ -116,4 +116,4 @@ class ClergyOfTheHolyNimbusReplacementEffect extends ReplacementEffectImpl { return new ClergyOfTheHolyNimbusReplacementEffect(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/c/CoalitionFlag.java b/Mage.Sets/src/mage/cards/c/CoalitionFlag.java index 811512b53e5..a5e996cd2d6 100644 --- a/Mage.Sets/src/mage/cards/c/CoalitionFlag.java +++ b/Mage.Sets/src/mage/cards/c/CoalitionFlag.java @@ -45,7 +45,7 @@ import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterPermanent; import mage.target.TargetPermanent; -import mage.target.common.TargetCreaturePermanent; +import mage.target.common.TargetControlledCreaturePermanent; /** * @@ -59,7 +59,7 @@ public class CoalitionFlag extends CardImpl { this.subtype.add(SubType.AURA); // Enchant creature you control - TargetPermanent auraTarget = new TargetCreaturePermanent(); + TargetPermanent auraTarget = new TargetControlledCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); diff --git a/Mage.Sets/src/mage/cards/c/CollapsingBorders.java b/Mage.Sets/src/mage/cards/c/CollapsingBorders.java index b99b7dfd7fa..c273b3e7b8f 100644 --- a/Mage.Sets/src/mage/cards/c/CollapsingBorders.java +++ b/Mage.Sets/src/mage/cards/c/CollapsingBorders.java @@ -36,6 +36,7 @@ import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.GainLifeTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; +import mage.constants.AbilityWord; import mage.constants.CardType; import mage.constants.TargetController; @@ -47,7 +48,7 @@ import mage.constants.TargetController; public class CollapsingBorders extends CardImpl { public CollapsingBorders(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{R}"); // Domain - At the beginning of each player's upkeep, that player gains 1 life for each basic land type among lands he or she controls. Then Collapsing Borders deals 3 damage to him or her. Effect effect = new GainLifeTargetEffect(new DomainValue(true)); @@ -56,6 +57,7 @@ public class CollapsingBorders extends CardImpl { effect = new DamageTargetEffect(3); effect.setText("Then {this} deals 3 damage to him or her."); ability.addEffect(effect); + ability.setAbilityWord(AbilityWord.DOMAIN); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/c/CollectiveRestraint.java b/Mage.Sets/src/mage/cards/c/CollectiveRestraint.java index a956c845950..d2b60309a0b 100644 --- a/Mage.Sets/src/mage/cards/c/CollectiveRestraint.java +++ b/Mage.Sets/src/mage/cards/c/CollectiveRestraint.java @@ -36,6 +36,7 @@ import mage.abilities.dynamicvalue.common.DomainValue; import mage.abilities.effects.common.combat.CantAttackYouUnlessPayManaAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; +import mage.constants.AbilityWord; import mage.constants.CardType; import mage.constants.Zone; import mage.game.Game; @@ -51,7 +52,9 @@ public class CollectiveRestraint extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{U}"); // Domain - Creatures can't attack you unless their controller pays {X} for each creature he or she controls that's attacking you, where X is the number of basic land types you control. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CollectiveRestraintPayManaToAttackAllEffect())); + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new CollectiveRestraintPayManaToAttackAllEffect()); + ability.setAbilityWord(AbilityWord.DOMAIN); + this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/c/ColossalHeroics.java b/Mage.Sets/src/mage/cards/c/ColossalHeroics.java index bcad9fda9e0..3dd66083024 100644 --- a/Mage.Sets/src/mage/cards/c/ColossalHeroics.java +++ b/Mage.Sets/src/mage/cards/c/ColossalHeroics.java @@ -45,14 +45,13 @@ import mage.target.common.TargetCreaturePermanent; public class ColossalHeroics extends CardImpl { public ColossalHeroics(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{G}"); - + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{G}"); // Strive - Colossal Heroics costs {1}{G} more to cast for each target beyond the first. this.addAbility(new StriveAbility("{1}{G}")); // Any number of target creatures each get +2/+2 until end of turn. Untap those creatures. - Effect effect = new BoostTargetEffect(2,2, Duration.EndOfTurn); - effect.setText("Any number of target creatures each get +2/+2"); + Effect effect = new BoostTargetEffect(2, 2, Duration.EndOfTurn); + effect.setText("Any number of target creatures each get +2/+2 until end of turn."); this.getSpellAbility().addEffect(effect); effect = new UntapTargetEffect(); effect.setText("Untap those creatures"); diff --git a/Mage.Sets/src/mage/cards/c/Confound.java b/Mage.Sets/src/mage/cards/c/Confound.java index 38575e88dc4..3675f891f22 100644 --- a/Mage.Sets/src/mage/cards/c/Confound.java +++ b/Mage.Sets/src/mage/cards/c/Confound.java @@ -44,14 +44,14 @@ import mage.target.TargetSpell; */ public class Confound extends CardImpl { - private final static FilterSpell filter = new FilterSpell("spell that targets one or more creatures"); + private final static FilterSpell filter = new FilterSpell("spell that targets a creature"); static { filter.add(new TargetsPermanentPredicate(new FilterCreaturePermanent())); } public Confound(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}"); // Counter target spell that targets one or more creatures. this.getSpellAbility().addEffect(new CounterTargetEffect()); diff --git a/Mage.Sets/src/mage/cards/d/DakraMystic.java b/Mage.Sets/src/mage/cards/d/DakraMystic.java index 18ff2b5fa94..3c9b890b5c0 100644 --- a/Mage.Sets/src/mage/cards/d/DakraMystic.java +++ b/Mage.Sets/src/mage/cards/d/DakraMystic.java @@ -52,7 +52,7 @@ import mage.players.Player; public class DakraMystic extends CardImpl { public DakraMystic(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U}"); this.subtype.add(SubType.MERFOLK); this.subtype.add(SubType.WIZARD); @@ -63,8 +63,7 @@ public class DakraMystic extends CardImpl { Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DakraMysticEffect(), new ManaCostsImpl("{U}")); ability.addCost(new TapSourceCost()); this.addAbility(ability); - - + } public DakraMystic(final DakraMystic card) { @@ -78,38 +77,38 @@ public class DakraMystic extends CardImpl { } class DakraMysticEffect extends OneShotEffect { - + public DakraMysticEffect() { super(Outcome.Detriment); - this.staticText = "Each player reveals the top card of his or her library. You may put the revealed cards into their owners graveyard. If you don't, each player draws a card"; + this.staticText = "Each player reveals the top card of his or her library. You may put the revealed cards into their owners' graveyard. If you don't, each player draws a card"; } - + public DakraMysticEffect(final DakraMysticEffect effect) { super(effect); } - + @Override public DakraMysticEffect copy() { return new DakraMysticEffect(this); } - + @Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { - for(UUID playerId: game.getState().getPlayersInRange(controller.getId(), game)) { + for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { Player player = game.getPlayer(playerId); if (player != null && player.getLibrary().hasCards()) { player.revealCards(player.getLogName(), new CardsImpl(player.getLibrary().getFromTop(game)), game); } } if (controller.chooseUse(outcome, "Put revealed cards into graveyard?", source, game)) { - for(UUID playerId: game.getState().getPlayersInRange(controller.getId(), game)) { - Player player = game.getPlayer(playerId); + for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) { + Player player = game.getPlayer(playerId); if (player != null && player.getLibrary().hasCards()) { player.moveCards(player.getLibrary().getFromTop(game), Zone.GRAVEYARD, source, game); } - } + } } else { new DrawCardAllEffect(1).apply(game, source); } diff --git a/Mage.Sets/src/mage/cards/d/DarienKingOfKjeldor.java b/Mage.Sets/src/mage/cards/d/DarienKingOfKjeldor.java index 5aa34573f37..3581920ec0a 100644 --- a/Mage.Sets/src/mage/cards/d/DarienKingOfKjeldor.java +++ b/Mage.Sets/src/mage/cards/d/DarienKingOfKjeldor.java @@ -53,7 +53,7 @@ import mage.players.Player; public class DarienKingOfKjeldor extends CardImpl { public DarienKingOfKjeldor(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{W}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}{W}"); addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.SOLDIER); @@ -74,6 +74,7 @@ public class DarienKingOfKjeldor extends CardImpl { return new DarienKingOfKjeldor(this); } } + class DarienKingOfKjeldorTriggeredAbility extends TriggeredAbilityImpl { public DarienKingOfKjeldorTriggeredAbility() { @@ -105,7 +106,7 @@ class DarienKingOfKjeldorTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "Whenever you are dealt damage, you may create that many 1/1 white Soldier creature tokens."; + return "Whenever you're dealt damage, you may create that many 1/1 white Soldier creature tokens."; } } @@ -133,4 +134,4 @@ class DarienKingOfKjeldorEffect extends OneShotEffect { } return false; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/d/DaughterOfAutumn.java b/Mage.Sets/src/mage/cards/d/DaughterOfAutumn.java index 07fa354c4a6..464864afe58 100644 --- a/Mage.Sets/src/mage/cards/d/DaughterOfAutumn.java +++ b/Mage.Sets/src/mage/cards/d/DaughterOfAutumn.java @@ -71,6 +71,7 @@ public class DaughterOfAutumn extends CardImpl { // {W}: The next 1 damage that would be dealt to target white creature this turn is dealt to Daughter of Autumn instead. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DaughterOfAutumnPreventDamageTargetEffect(Duration.EndOfTurn, 1), new ManaCostsImpl("{W}")); ability.addTarget(new TargetCreaturePermanent(filter)); + this.addAbility(ability); } public DaughterOfAutumn(final DaughterOfAutumn card) { diff --git a/Mage.Sets/src/mage/cards/d/DecreeOfSilence.java b/Mage.Sets/src/mage/cards/d/DecreeOfSilence.java index b8a5262544a..2c641e7c7d1 100644 --- a/Mage.Sets/src/mage/cards/d/DecreeOfSilence.java +++ b/Mage.Sets/src/mage/cards/d/DecreeOfSilence.java @@ -45,7 +45,7 @@ import mage.constants.CardType; import mage.constants.SetTargetPointer; import mage.constants.Zone; import mage.counters.CounterType; -import mage.filter.StaticFilters; +import mage.filter.FilterSpell; import mage.target.TargetSpell; /** @@ -55,19 +55,19 @@ import mage.target.TargetSpell; public class DecreeOfSilence extends CardImpl { public DecreeOfSilence(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{6}{U}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{6}{U}{U}"); // Whenever an opponent casts a spell, counter that spell and put a depletion counter on Decree of Silence. If there are three or more depletion counters on Decree of Silence, sacrifice it. Effect effect = new CounterTargetEffect(); effect.setText("counter that spell"); - Ability ability = new SpellCastOpponentTriggeredAbility(Zone.BATTLEFIELD, effect, StaticFilters.FILTER_SPELL, - false, SetTargetPointer.SPELL); + Ability ability = new SpellCastOpponentTriggeredAbility(Zone.BATTLEFIELD, effect, new FilterSpell("a spell"), + false, SetTargetPointer.SPELL); effect = new AddCountersSourceEffect(CounterType.DEPLETION.createInstance()); effect.setText("and put a depletion counter on {this}."); ability.addEffect(effect); ability.addEffect(new ConditionalOneShotEffect(new SacrificeSourceEffect(), - new SourceHasCounterCondition(CounterType.DEPLETION, 3, Integer.MAX_VALUE), - " If there are three or more depletion counters on {this}, sacrifice it")); + new SourceHasCounterCondition(CounterType.DEPLETION, 3, Integer.MAX_VALUE), + " If there are three or more depletion counters on {this}, sacrifice it")); this.addAbility(ability); // Cycling {4}{U}{U} this.addAbility(new CyclingAbility(new ManaCostsImpl("{4}{U}{U}"))); diff --git a/Mage.Sets/src/mage/cards/d/DeityOfScars.java b/Mage.Sets/src/mage/cards/d/DeityOfScars.java index b996d9bc067..6d979524ba5 100644 --- a/Mage.Sets/src/mage/cards/d/DeityOfScars.java +++ b/Mage.Sets/src/mage/cards/d/DeityOfScars.java @@ -50,11 +50,10 @@ import mage.counters.CounterType; public class DeityOfScars extends CardImpl { public DeityOfScars(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B/G}{B/G}{B/G}{B/G}{B/G}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B/G}{B/G}{B/G}{B/G}{B/G}"); this.subtype.add(SubType.SPIRIT); this.subtype.add(SubType.AVATAR); - this.power = new MageInt(7); this.toughness = new MageInt(7); @@ -62,7 +61,7 @@ public class DeityOfScars extends CardImpl { this.addAbility(TrampleAbility.getInstance()); // Deity of Scars enters the battlefield with two -1/-1 counters on it. - this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.M1M1.createInstance(2)))); + this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.M1M1.createInstance(2)), "with two -1/-1 counters on it")); // {B/G}, Remove a -1/-1 counter from Deity of Scars: Regenerate Deity of Scars. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ManaCostsImpl("{B/G}")); diff --git a/Mage.Sets/src/mage/cards/d/DementiaSliver.java b/Mage.Sets/src/mage/cards/d/DementiaSliver.java index 97d586ff79a..8e5cfb838b2 100644 --- a/Mage.Sets/src/mage/cards/d/DementiaSliver.java +++ b/Mage.Sets/src/mage/cards/d/DementiaSliver.java @@ -51,7 +51,7 @@ import mage.target.common.TargetOpponent; * @author fireshoes */ public class DementiaSliver extends CardImpl { - + private static final FilterPermanent filter = new FilterPermanent("All Slivers"); static { @@ -59,7 +59,7 @@ public class DementiaSliver extends CardImpl { } public DementiaSliver(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{B}"); this.subtype.add(SubType.SLIVER); this.power = new MageInt(3); this.toughness = new MageInt(3); @@ -70,7 +70,12 @@ public class DementiaSliver extends CardImpl { gainedAbility.addTarget(new TargetOpponent()); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(gainedAbility, Duration.WhileOnBattlefield, filter, - "All Slivers have \"{T}: Name a card. Target opponent reveals a card at random from his or her hand. If it's the named card, that player discards it\""))); + "All Slivers have \"{T}: Choose a card name. " + + "Target opponent reveals a card at random from his or her hand." + + " If that card has the chosen name, that player discards it." + + " Activate this ability only during your turn.\"" + ) + )); } public DementiaSliver(final DementiaSliver card) { @@ -98,7 +103,7 @@ class DementiaSliverEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player opponent = game.getPlayer(targetPointer.getFirst(game, source)); MageObject sourceObject = game.getObject(source.getSourceId()); - String cardName = (String) game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY); + String cardName = (String) game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY); if (opponent != null && sourceObject != null && !cardName.isEmpty()) { if (!opponent.getHand().isEmpty()) { Cards revealed = new CardsImpl(); @@ -121,4 +126,4 @@ class DementiaSliverEffect extends OneShotEffect { return new DementiaSliverEffect(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/d/DescentOfTheDragons.java b/Mage.Sets/src/mage/cards/d/DescentOfTheDragons.java index da4c02d0cd1..a8ec7660aa7 100644 --- a/Mage.Sets/src/mage/cards/d/DescentOfTheDragons.java +++ b/Mage.Sets/src/mage/cards/d/DescentOfTheDragons.java @@ -72,7 +72,7 @@ class DescentOfTheDragonsEffect extends OneShotEffect { public DescentOfTheDragonsEffect() { super(Outcome.Benefit); - staticText = "Destroy any number of target creatures. For each creature destroyed this way, its controller creates a 4/4 red Dragon creature token with flying"; + staticText = "Destroy any number of target creatures. For each creature destroyed this way, its controller creates a 4/4 red Dragon creature token with flying"; } public DescentOfTheDragonsEffect(final DescentOfTheDragonsEffect effect) { diff --git a/Mage.Sets/src/mage/cards/d/Detritivore.java b/Mage.Sets/src/mage/cards/d/Detritivore.java index 4be1d1f6841..1865dfd7529 100644 --- a/Mage.Sets/src/mage/cards/d/Detritivore.java +++ b/Mage.Sets/src/mage/cards/d/Detritivore.java @@ -63,7 +63,7 @@ import mage.target.common.TargetNonBasicLandPermanent; public class Detritivore extends CardImpl { public Detritivore(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); this.subtype.add(SubType.LHURGOYF); this.power = new MageInt(0); @@ -132,7 +132,6 @@ class NonBasicLandsInOpponentsGraveyards implements DynamicValue { filter.add(Predicates.not(new SupertypePredicate(SuperType.BASIC))); } - @Override public int calculate(Game game, Ability sourceAbility, Effect effect) { int amount = 0; @@ -162,6 +161,6 @@ class NonBasicLandsInOpponentsGraveyards implements DynamicValue { @Override public String getMessage() { - return "the number of nonbasic land cards in your opponents' graveyards"; + return "nonbasic land cards in your opponents' graveyards"; } } diff --git a/Mage.Sets/src/mage/cards/d/DictateOfErebos.java b/Mage.Sets/src/mage/cards/d/DictateOfErebos.java index 87cb1a626f4..4efc724617a 100644 --- a/Mage.Sets/src/mage/cards/d/DictateOfErebos.java +++ b/Mage.Sets/src/mage/cards/d/DictateOfErebos.java @@ -45,19 +45,19 @@ import mage.filter.predicate.permanent.ControllerPredicate; */ public class DictateOfErebos extends CardImpl { - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature you control"); + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature you control"); static { filter.add(new ControllerPredicate(TargetController.YOU)); } public DictateOfErebos(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{B}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{B}{B}"); // Flash this.addAbility(FlashAbility.getInstance()); // Whenever a creature you control dies, each opponent sacrifices a creature. - this.addAbility(new DiesCreatureTriggeredAbility(new SacrificeOpponentsEffect(new FilterControlledCreaturePermanent("a creature")), false, filter)); + this.addAbility(new DiesCreatureTriggeredAbility(new SacrificeOpponentsEffect(new FilterControlledCreaturePermanent("creature")), false, filter)); } public DictateOfErebos(final DictateOfErebos card) { diff --git a/Mage.Sets/src/mage/cards/d/DivineLight.java b/Mage.Sets/src/mage/cards/d/DivineLight.java index 3035f362f88..ca3e4380ec4 100644 --- a/Mage.Sets/src/mage/cards/d/DivineLight.java +++ b/Mage.Sets/src/mage/cards/d/DivineLight.java @@ -50,10 +50,12 @@ public class DivineLight extends CardImpl { } public DivineLight(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{W}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{W}"); // Prevent all damage that would be dealt this turn to creatures you control. - this.getSpellAbility().addEffect(new PreventAllDamageToAllEffect(Duration.EndOfTurn, filter)); + this.getSpellAbility().addEffect(new PreventAllDamageToAllEffect(Duration.EndOfTurn, filter) + .setText("Prevent all damage that would be dealt this turn to creatures you control.") + ); } public DivineLight(final DivineLight card) { diff --git a/Mage.Sets/src/mage/cards/d/DralnusPet.java b/Mage.Sets/src/mage/cards/d/DralnusPet.java index 267078de937..8627591833a 100644 --- a/Mage.Sets/src/mage/cards/d/DralnusPet.java +++ b/Mage.Sets/src/mage/cards/d/DralnusPet.java @@ -65,7 +65,7 @@ import mage.players.Player; public class DralnusPet extends CardImpl { public DralnusPet(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{U}"); this.subtype.add(SubType.SHAPESHIFTER); this.power = new MageInt(2); this.toughness = new MageInt(2); @@ -77,7 +77,7 @@ public class DralnusPet extends CardImpl { this.addAbility(new KickerAbility(kickerCosts)); // If Dralnu's Pet was kicked, it enters the battlefield with flying and with X +1/+1 counters on it, where X is the discarded card's converted mana cost. Ability ability = new EntersBattlefieldAbility(new DralnusPetEffect(), KickedCondition.instance, - "If {this} was kicked, it enters the battlefield with flying and with X +1/+1 counters on it, where X is the discarded card's converted mana cost", ""); + "If {this} was kicked, it enters the battlefield with flying and with X +1/+1 counters on it, where X is the discarded card's converted mana cost.", ""); ability.addEffect(new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.WhileOnBattlefield)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/d/DreamcallerSiren.java b/Mage.Sets/src/mage/cards/d/DreamcallerSiren.java index 5677be80edd..67709860a01 100644 --- a/Mage.Sets/src/mage/cards/d/DreamcallerSiren.java +++ b/Mage.Sets/src/mage/cards/d/DreamcallerSiren.java @@ -84,7 +84,7 @@ public class DreamcallerSiren extends CardImpl { ability.addTarget(new TargetNonlandPermanent(0, 2, false)); this.addAbility(new ConditionalTriggeredAbility(ability, new PermanentsOnTheBattlefieldCondition(filter), - "when {this} enters the battlefield, if you control another Pirate, tap up to two nonland permanents.")); + "when {this} enters the battlefield, if you control another Pirate, tap up to two target nonland permanents.")); } public DreamcallerSiren(final DreamcallerSiren card) { diff --git a/Mage.Sets/src/mage/cards/d/DroverOfTheMighty.java b/Mage.Sets/src/mage/cards/d/DroverOfTheMighty.java index a9b0bb1bb6e..43a6e628403 100644 --- a/Mage.Sets/src/mage/cards/d/DroverOfTheMighty.java +++ b/Mage.Sets/src/mage/cards/d/DroverOfTheMighty.java @@ -46,7 +46,7 @@ import mage.filter.predicate.mageobject.SubtypePredicate; */ public class DroverOfTheMighty extends CardImpl { - private static final FilterPermanent filter = new FilterPermanent("a Dinosaur"); + private static final FilterPermanent filter = new FilterPermanent("Dinosaur"); static { filter.add(new SubtypePredicate(SubType.DINOSAUR)); diff --git a/Mage.Sets/src/mage/cards/d/DuergarMineCaptain.java b/Mage.Sets/src/mage/cards/d/DuergarMineCaptain.java index 09b46d0ffd0..aeb12838785 100644 --- a/Mage.Sets/src/mage/cards/d/DuergarMineCaptain.java +++ b/Mage.Sets/src/mage/cards/d/DuergarMineCaptain.java @@ -45,12 +45,12 @@ import mage.filter.common.FilterAttackingCreature; /** * * @author jeffwadsworth - + * */ public class DuergarMineCaptain extends CardImpl { public DuergarMineCaptain(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R/W}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R/W}"); this.subtype.add(SubType.DWARF); this.subtype.add(SubType.SOLDIER); @@ -58,10 +58,13 @@ public class DuergarMineCaptain extends CardImpl { this.toughness = new MageInt(1); // {1}{RW}, {untap}: Attacking creatures get +1/+0 until end of turn. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostAllEffect(1, 0, Duration.EndOfTurn, new FilterAttackingCreature(), false), new ManaCostsImpl("{1}{R/W}")); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, + new BoostAllEffect(1, 0, Duration.EndOfTurn, new FilterAttackingCreature("attacking creatures"), false), + new ManaCostsImpl("{1}{R/W}") + ); ability.addCost(new UntapSourceCost()); this.addAbility(ability); - + } public DuergarMineCaptain(final DuergarMineCaptain card) { diff --git a/Mage.Sets/src/mage/cards/d/DutifulAttendant.java b/Mage.Sets/src/mage/cards/d/DutifulAttendant.java index 98407cddd0c..a3d5a5e2a87 100644 --- a/Mage.Sets/src/mage/cards/d/DutifulAttendant.java +++ b/Mage.Sets/src/mage/cards/d/DutifulAttendant.java @@ -46,14 +46,14 @@ import mage.target.common.TargetCardInYourGraveyard; */ public class DutifulAttendant 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()); } public DutifulAttendant(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.WARRIOR); this.power = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/d/DwarvenPatrol.java b/Mage.Sets/src/mage/cards/d/DwarvenPatrol.java index 41403091afd..9cb25e7bf99 100644 --- a/Mage.Sets/src/mage/cards/d/DwarvenPatrol.java +++ b/Mage.Sets/src/mage/cards/d/DwarvenPatrol.java @@ -46,18 +46,18 @@ import mage.filter.predicate.mageobject.ColorPredicate; /** * * @author LoneFox - + * */ public class DwarvenPatrol extends CardImpl { - private static final FilterSpell filter = new FilterSpell("nonred spell"); + private static final FilterSpell filter = new FilterSpell("a nonred spell"); static { filter.add(Predicates.not(new ColorPredicate(ObjectColor.RED))); } public DwarvenPatrol(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); this.subtype.add(SubType.DWARF); this.power = new MageInt(4); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/e/EnergyTap.java b/Mage.Sets/src/mage/cards/e/EnergyTap.java index 2eab4647597..3012505d16a 100644 --- a/Mage.Sets/src/mage/cards/e/EnergyTap.java +++ b/Mage.Sets/src/mage/cards/e/EnergyTap.java @@ -56,9 +56,9 @@ public class EnergyTap extends CardImpl { } public EnergyTap(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{U}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{U}"); - // Tap target untapped creature you control. If you do, add X mana of {C} to your mana pool, where X is that creature's converted mana cost. + // Tap target untapped creature you control. If you do, add an amount of {C} to your mana pool equal to that creature's converted mana cost. this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent(filter)); this.getSpellAbility().addEffect(new EnergyTapEffect()); } @@ -77,7 +77,7 @@ class EnergyTapEffect extends OneShotEffect { EnergyTapEffect() { super(Outcome.PutManaInPool); - this.staticText = "Tap target untapped creature you control. If you do, add X mana of {C} to your mana pool, where X is that creature's converted mana cost"; + this.staticText = "Tap target untapped creature you control. If you do, add an amount of {C} to your mana pool equal to that creature's converted mana cost"; } EnergyTapEffect(final EnergyTapEffect effect) { @@ -106,4 +106,4 @@ class EnergyTapEffect extends OneShotEffect { } return applied; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/e/EntropicSpecter.java b/Mage.Sets/src/mage/cards/e/EntropicSpecter.java index 836cc8fd16d..eb0cb15d734 100644 --- a/Mage.Sets/src/mage/cards/e/EntropicSpecter.java +++ b/Mage.Sets/src/mage/cards/e/EntropicSpecter.java @@ -52,7 +52,7 @@ import mage.players.Player; public class EntropicSpecter extends CardImpl { public EntropicSpecter(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}"); this.subtype.add(SubType.SPECTER); this.subtype.add(SubType.SPIRIT); @@ -105,7 +105,7 @@ class CardsInTargetPlayerHandCount implements DynamicValue { @Override public String getMessage() { - return "cards in chosen opponents hand"; + return "cards in the chosen player's hand"; } @Override diff --git a/Mage.Sets/src/mage/cards/e/Evangelize.java b/Mage.Sets/src/mage/cards/e/Evangelize.java index 74ad62887d9..c9209a99c3c 100644 --- a/Mage.Sets/src/mage/cards/e/Evangelize.java +++ b/Mage.Sets/src/mage/cards/e/Evangelize.java @@ -53,7 +53,7 @@ public class Evangelize extends CardImpl { // Gain control of target creature of an opponent's choice that he or she controls. GainControlTargetEffect effect = new GainControlTargetEffect(Duration.EndOfGame); - effect.setText("Gain control of target creature of an opponent's choice that he or she controls"); + effect.setText("Gain control of target creature of an opponent's choice he or she controls"); this.getSpellAbility().addEffect(effect); this.getSpellAbility().addTarget(new TargetOpponentsChoicePermanent(1, 1, filter, false, true)); } diff --git a/Mage.Sets/src/mage/cards/e/EvasiveAction.java b/Mage.Sets/src/mage/cards/e/EvasiveAction.java index f271c86d6d0..87773fdc233 100644 --- a/Mage.Sets/src/mage/cards/e/EvasiveAction.java +++ b/Mage.Sets/src/mage/cards/e/EvasiveAction.java @@ -32,6 +32,7 @@ import mage.abilities.dynamicvalue.common.DomainValue; import mage.abilities.effects.common.CounterUnlessPaysEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; +import mage.constants.AbilityWord; import mage.constants.CardType; import mage.target.TargetSpell; @@ -42,11 +43,12 @@ import mage.target.TargetSpell; public class EvasiveAction extends CardImpl { public EvasiveAction(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}"); // Domain - Counter target spell unless its controller pays {1} for each basic land type among lands you control. this.getSpellAbility().addEffect(new CounterUnlessPaysEffect(new DomainValue())); this.getSpellAbility().addTarget(new TargetSpell()); + this.getSpellAbility().setAbilityWord(AbilityWord.DOMAIN); } public EvasiveAction(final EvasiveAction card) { diff --git a/Mage.Sets/src/mage/cards/e/ExoticCurse.java b/Mage.Sets/src/mage/cards/e/ExoticCurse.java index f1adf3fee9b..34c231b9bb4 100644 --- a/Mage.Sets/src/mage/cards/e/ExoticCurse.java +++ b/Mage.Sets/src/mage/cards/e/ExoticCurse.java @@ -28,6 +28,7 @@ package mage.cards.e; import java.util.UUID; +import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.DomainValue; @@ -37,6 +38,7 @@ import mage.abilities.effects.common.continuous.BoostEnchantedEffect; import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; +import mage.constants.AbilityWord; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Duration; @@ -51,7 +53,7 @@ import mage.target.TargetPermanent; public class ExoticCurse extends CardImpl { public ExoticCurse(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}"); this.subtype.add(SubType.AURA); // Enchant creature @@ -62,8 +64,9 @@ public class ExoticCurse extends CardImpl { // Domain - Enchanted creature gets -1/-1 for each basic land type among lands you control. DynamicValue unboost = new SignInversionDynamicValue(new DomainValue()); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, - new BoostEnchantedEffect(unboost, unboost, Duration.WhileOnBattlefield))); + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(unboost, unboost, Duration.WhileOnBattlefield)); + ability.setAbilityWord(AbilityWord.DOMAIN); + this.addAbility(ability); } public ExoticCurse(final ExoticCurse card) { diff --git a/Mage.Sets/src/mage/cards/f/FatalFrenzy.java b/Mage.Sets/src/mage/cards/f/FatalFrenzy.java index 08ab764a29b..2794d52a209 100644 --- a/Mage.Sets/src/mage/cards/f/FatalFrenzy.java +++ b/Mage.Sets/src/mage/cards/f/FatalFrenzy.java @@ -55,11 +55,15 @@ import mage.target.targetpointer.FixedTarget; public class FatalFrenzy extends CardImpl { public FatalFrenzy(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{R}"); // Until end of turn, target creature you control gains trample and gets +X/+0, where X is its power. Sacrifice it at the beginning of the next end step. - this.getSpellAbility().addEffect(new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn)); - this.getSpellAbility().addEffect(new BoostTargetEffect(new TargetPermanentPowerCount(), new StaticValue(0), Duration.EndOfTurn, true)); + this.getSpellAbility().addEffect(new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn) + .setText("Until end of turn, target creature you control gains trample") + ); + this.getSpellAbility().addEffect(new BoostTargetEffect(new TargetPermanentPowerCount(), new StaticValue(0), Duration.EndOfTurn, true) + .setText("and gets +X/+0, where X is its power.") + ); this.getSpellAbility().addEffect(new FatalFrenzyEffect()); this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); diff --git a/Mage.Sets/src/mage/cards/f/FathomFleetCaptain.java b/Mage.Sets/src/mage/cards/f/FathomFleetCaptain.java index 72f6e09eaed..9d7913136a9 100644 --- a/Mage.Sets/src/mage/cards/f/FathomFleetCaptain.java +++ b/Mage.Sets/src/mage/cards/f/FathomFleetCaptain.java @@ -76,7 +76,7 @@ public class FathomFleetCaptain extends CardImpl { this.addAbility(new ConditionalTriggeredAbility( new AttacksTriggeredAbility(new DoIfCostPaid(new CreateTokenEffect(new PirateToken()), new GenericManaCost(2)), false), new PermanentsOnTheBattlefieldCondition(filter), - "Whenever {this} attacks, if you control another nontoken Pirate, you may pay {2}. If you do, creature a 2/2 black Pirate creature token with menace")); + "Whenever {this} attacks, if you control another nontoken Pirate, you may pay {2}. If you do, create a 2/2 black Pirate creature token with menace")); } public FathomFleetCaptain(final FathomFleetCaptain card) { diff --git a/Mage.Sets/src/mage/cards/f/FieryBombardment.java b/Mage.Sets/src/mage/cards/f/FieryBombardment.java index a7c51fa2b13..63d29ac716d 100644 --- a/Mage.Sets/src/mage/cards/f/FieryBombardment.java +++ b/Mage.Sets/src/mage/cards/f/FieryBombardment.java @@ -37,6 +37,7 @@ import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; +import mage.constants.AbilityWord; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; @@ -54,15 +55,14 @@ import mage.target.common.TargetCreatureOrPlayer; public class FieryBombardment extends CardImpl { public FieryBombardment(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}"); - + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{R}"); // Chroma - {2}, Sacrifice a creature: Fiery Bombardment deals damage to target creature or player equal to the number of red mana symbols in the sacrificed creature's mana cost. Effect effect = new FieryBombardmentEffect(); - effect.setText("Chroma - Fiery Bombardment deals damage to target creature or player equal to the number of red mana symbols in the sacrificed creature's mana cost."); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{2}")); ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent())); ability.addTarget(new TargetCreatureOrPlayer()); + ability.setAbilityWord(AbilityWord.CHROMA); this.addAbility(ability); } @@ -81,6 +81,7 @@ class FieryBombardmentEffect extends OneShotEffect { public FieryBombardmentEffect() { super(Outcome.Benefit); + staticText = "{this} deals damage to target creature or player equal to the number of red mana symbols in the sacrificed creature's mana cost."; } public FieryBombardmentEffect(final FieryBombardmentEffect effect) { @@ -117,4 +118,4 @@ class FieryBombardmentEffect extends OneShotEffect { } return true; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/f/FireAtWill.java b/Mage.Sets/src/mage/cards/f/FireAtWill.java index 91856964581..182baebb8a6 100644 --- a/Mage.Sets/src/mage/cards/f/FireAtWill.java +++ b/Mage.Sets/src/mage/cards/f/FireAtWill.java @@ -54,11 +54,10 @@ public class FireAtWill extends CardImpl { } public FireAtWill(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R/W}{R/W}{R/W}"); - + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R/W}{R/W}{R/W}"); // Fire at Will deals 3 damage divided as you choose among one, two, or three target attacking or blocking creatures. - this.getSpellAbility().addEffect(new DamageMultiEffect(3)); + this.getSpellAbility().addEffect(new DamageMultiEffect(3).setText("{this} deals 3 damage divided as you choose among one, two, or three target attacking or blocking creatures.")); this.getSpellAbility().addTarget(new TargetCreaturePermanentAmount(3, filter)); } diff --git a/Mage.Sets/src/mage/cards/f/FirebrandRanger.java b/Mage.Sets/src/mage/cards/f/FirebrandRanger.java index 4ea4f8bcf6c..3c335a7fd50 100644 --- a/Mage.Sets/src/mage/cards/f/FirebrandRanger.java +++ b/Mage.Sets/src/mage/cards/f/FirebrandRanger.java @@ -57,7 +57,7 @@ import mage.target.common.TargetCardInHand; public class FirebrandRanger extends CardImpl { public FirebrandRanger(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); @@ -80,7 +80,7 @@ public class FirebrandRanger extends CardImpl { } class PutLandOnBattlefieldEffect extends OneShotEffect { - + private static final FilterCard filter = new FilterCard("basic land card"); static { @@ -91,7 +91,7 @@ class PutLandOnBattlefieldEffect extends OneShotEffect { public PutLandOnBattlefieldEffect() { super(Outcome.PutLandInPlay); - this.staticText = "put a basic land card from your hand onto the battlefield"; + this.staticText = "you may put a basic land card from your hand onto the battlefield"; } public PutLandOnBattlefieldEffect(final PutLandOnBattlefieldEffect effect) { @@ -120,4 +120,4 @@ class PutLandOnBattlefieldEffect extends OneShotEffect { } return false; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/f/FirewakeSliver.java b/Mage.Sets/src/mage/cards/f/FirewakeSliver.java index 3fcef064a96..fe0ec2a538c 100644 --- a/Mage.Sets/src/mage/cards/f/FirewakeSliver.java +++ b/Mage.Sets/src/mage/cards/f/FirewakeSliver.java @@ -53,32 +53,32 @@ import mage.target.common.TargetCreaturePermanent; */ public class FirewakeSliver extends CardImpl { - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("All sliver creatures"); + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("All Sliver creatures"); private static final FilterCreaturePermanent targetSliverFilter = new FilterCreaturePermanent("Sliver"); static { filter.add(new SubtypePredicate(SubType.SLIVER)); targetSliverFilter.add(new SubtypePredicate(SubType.SLIVER)); } - + public FirewakeSliver(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{G}"); this.subtype.add(SubType.SLIVER); this.power = new MageInt(1); this.toughness = new MageInt(1); // All Sliver creatures have haste. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield, filter, false))); - + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield, filter, false))); + // All Slivers have "{1}, Sacrifice this permanent: Target Sliver creature gets +2/+2 until end of turn." - Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(2,2,Duration.EndOfTurn), new GenericManaCost(1)); + Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(2, 2, Duration.EndOfTurn), new GenericManaCost(1)); gainedAbility.addCost(new SacrificeSourceCost()); gainedAbility.addTarget(new TargetCreaturePermanent(targetSliverFilter)); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect( gainedAbility, Duration.WhileOnBattlefield, - filter, "All Slivers have \"{1}, Sacrifice this permanent: Target Sliver creature gets +2/+2 until end of turn.\""))); - + filter, "All Slivers have \"{1}, Sacrifice this permanent: Target Sliver creature gets +2/+2 until end of turn.\""))); + } public FirewakeSliver(final FirewakeSliver card) { diff --git a/Mage.Sets/src/mage/cards/f/FlagstonesOfTrokair.java b/Mage.Sets/src/mage/cards/f/FlagstonesOfTrokair.java index d9decea82e5..b49857fe674 100644 --- a/Mage.Sets/src/mage/cards/f/FlagstonesOfTrokair.java +++ b/Mage.Sets/src/mage/cards/f/FlagstonesOfTrokair.java @@ -53,14 +53,14 @@ public class FlagstonesOfTrokair extends CardImpl { } public FlagstonesOfTrokair(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.LAND},""); + super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); addSuperType(SuperType.LEGENDARY); // {tap}: Add {W} to your mana pool. this.addAbility(new WhiteManaAbility()); // When Flagstones of Trokair is put into a graveyard from the battlefield, you may search your library for a Plains card and put it onto the battlefield tapped. If you do, shuffle your library. - this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(FILTER), true, true), true)); + this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(FILTER), true, false), true)); } public FlagstonesOfTrokair(final FlagstonesOfTrokair card) { diff --git a/Mage.Sets/src/mage/cards/f/FlowstoneChanneler.java b/Mage.Sets/src/mage/cards/f/FlowstoneChanneler.java index 6ed51dca079..b70542b911b 100644 --- a/Mage.Sets/src/mage/cards/f/FlowstoneChanneler.java +++ b/Mage.Sets/src/mage/cards/f/FlowstoneChanneler.java @@ -31,7 +31,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.common.DiscardTargetCost; +import mage.abilities.costs.common.DiscardCardCost; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.Effect; @@ -43,7 +43,6 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.target.common.TargetCardInHand; import mage.target.common.TargetCreaturePermanent; /** @@ -69,7 +68,7 @@ public class FlowstoneChanneler extends CardImpl { ability.addEffect(effect); ability.addTarget(new TargetCreaturePermanent()); ability.addCost(new TapSourceCost()); - ability.addCost(new DiscardTargetCost(new TargetCardInHand())); + ability.addCost(new DiscardCardCost()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/f/FreyalisesRadiance.java b/Mage.Sets/src/mage/cards/f/FreyalisesRadiance.java index f1beb8ac1eb..ab44a4e85f3 100644 --- a/Mage.Sets/src/mage/cards/f/FreyalisesRadiance.java +++ b/Mage.Sets/src/mage/cards/f/FreyalisesRadiance.java @@ -48,7 +48,7 @@ import mage.filter.predicate.mageobject.SupertypePredicate; */ public class FreyalisesRadiance extends CardImpl { - private static final FilterPermanent filter = new FilterPermanent(); + private static final FilterPermanent filter = new FilterPermanent("snow permanents"); static { filter.add(new SupertypePredicate(SuperType.SNOW)); diff --git a/Mage.Sets/src/mage/cards/g/GaeasMight.java b/Mage.Sets/src/mage/cards/g/GaeasMight.java index ad18c3dc5ef..52daaeeabc2 100644 --- a/Mage.Sets/src/mage/cards/g/GaeasMight.java +++ b/Mage.Sets/src/mage/cards/g/GaeasMight.java @@ -32,6 +32,7 @@ import mage.abilities.dynamicvalue.common.DomainValue; import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; +import mage.constants.AbilityWord; import mage.constants.CardType; import mage.constants.Duration; import mage.target.common.TargetCreaturePermanent; @@ -43,12 +44,12 @@ import mage.target.common.TargetCreaturePermanent; public class GaeasMight extends CardImpl { public GaeasMight(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{G}"); - + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{G}"); // Domain - Target creature gets +1/+1 until end of turn for each basic land type among lands you control. this.getSpellAbility().addEffect(new BoostTargetEffect(new DomainValue(), new DomainValue(), Duration.EndOfTurn)); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + this.getSpellAbility().setAbilityWord(AbilityWord.DOMAIN); } public GaeasMight(final GaeasMight card) { diff --git a/Mage.Sets/src/mage/cards/g/GateSmasher.java b/Mage.Sets/src/mage/cards/g/GateSmasher.java index 4b16473ea63..f8b0b896bce 100644 --- a/Mage.Sets/src/mage/cards/g/GateSmasher.java +++ b/Mage.Sets/src/mage/cards/g/GateSmasher.java @@ -56,14 +56,14 @@ import mage.target.common.TargetControlledCreaturePermanent; */ public class GateSmasher extends CardImpl { - private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creature with 3 or more power"); + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creature with toughness 4 or greater"); static { filter.add(new ToughnessPredicate(ComparisonType.MORE_THAN, 3)); } public GateSmasher(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); this.subtype.add(SubType.EQUIPMENT); Target target = new TargetControlledCreaturePermanent(1, 1, filter, false); diff --git a/Mage.Sets/src/mage/cards/g/GhituFire.java b/Mage.Sets/src/mage/cards/g/GhituFire.java index ff3fe2b8fe0..833cf73397b 100644 --- a/Mage.Sets/src/mage/cards/g/GhituFire.java +++ b/Mage.Sets/src/mage/cards/g/GhituFire.java @@ -42,18 +42,19 @@ import mage.target.common.TargetCreatureOrPlayer; /** * * @author LoneFox - + * */ public class GhituFire extends CardImpl { public GhituFire(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{R}"); Effect effect = new DamageTargetEffect(new ManacostVariableValue()); // You may cast Ghitu Fire as though it had flash if you pay {2} more to cast it. Ability ability = new PayMoreToCastAsThoughtItHadFlashAbility(this, new ManaCostsImpl("{2}")); ability.addEffect(effect); ability.addTarget(new TargetCreatureOrPlayer()); + ability.setRuleAtTheTop(true); this.addAbility(ability); // Ghitu Fire deals X damage to target creature or player. this.getSpellAbility().addEffect(effect); diff --git a/Mage.Sets/src/mage/cards/g/GilderBairn.java b/Mage.Sets/src/mage/cards/g/GilderBairn.java index 0fadbc07bbe..1ce80895467 100644 --- a/Mage.Sets/src/mage/cards/g/GilderBairn.java +++ b/Mage.Sets/src/mage/cards/g/GilderBairn.java @@ -52,7 +52,7 @@ import mage.target.TargetPermanent; public class GilderBairn extends CardImpl { public GilderBairn(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G/U}{G/U}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G/U}{G/U}"); this.subtype.add(SubType.OUPHE); this.power = new MageInt(1); @@ -80,7 +80,7 @@ class GilderBairnEffect extends OneShotEffect { public GilderBairnEffect() { super(Outcome.Benefit); - this.staticText = "For each counter on target permanent, put another of those counters on that permanent"; + this.staticText = "Double the number of each kind of counter on target permanent"; } public GilderBairnEffect(final GilderBairnEffect effect) { diff --git a/Mage.Sets/src/mage/cards/g/GleamOfAuthority.java b/Mage.Sets/src/mage/cards/g/GleamOfAuthority.java index 75f1d0d9123..669c69b48f2 100644 --- a/Mage.Sets/src/mage/cards/g/GleamOfAuthority.java +++ b/Mage.Sets/src/mage/cards/g/GleamOfAuthority.java @@ -58,7 +58,7 @@ import mage.target.common.TargetCreaturePermanent; public class GleamOfAuthority extends CardImpl { public GleamOfAuthority(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}"); this.subtype.add(SubType.AURA); // Enchant creature @@ -67,16 +67,19 @@ public class GleamOfAuthority extends CardImpl { this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); - + // Enchanted creature gets +1/+1 for each +1/+1 counter on other creatures you control DynamicValue amount = new CountersOnControlledCount(); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(amount, amount, Duration.WhileOnBattlefield))); - + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(amount, amount, Duration.WhileOnBattlefield) + .setText("Enchanted creature gets +1/+1 for each +1/+1 counter on other creatures you control.") + )); + // Enchanted creature has vigilance and "{W}, {T}: Bloster 1." - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(VigilanceAbility.getInstance(), AttachmentType.AURA))); - ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BolsterEffect(1), new ManaCostsImpl("{W}")); - ability.addCost(new TapSourceCost()); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(ability, AttachmentType.AURA))); + ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(VigilanceAbility.getInstance(), AttachmentType.AURA)); + Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BolsterEffect(1), new ManaCostsImpl("{W}")); + gainedAbility.addCost(new TapSourceCost()); + ability.addEffect(new GainAbilityAttachedEffect(ability, AttachmentType.AURA).setText("and \"{W}, {T}: Bloster 1.\"")); + this.addAbility(ability); } public GleamOfAuthority(final GleamOfAuthority card) { @@ -92,7 +95,7 @@ public class GleamOfAuthority extends CardImpl { class CountersOnControlledCount implements DynamicValue { static FilterCreaturePermanent filter = new FilterCreaturePermanent(); - + public CountersOnControlledCount() { } diff --git a/Mage.Sets/src/mage/cards/g/GoblinFestival.java b/Mage.Sets/src/mage/cards/g/GoblinFestival.java new file mode 100644 index 00000000000..8a12d1021a3 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GoblinFestival.java @@ -0,0 +1,147 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.g; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.Mode; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.Target; +import mage.target.common.TargetCreatureOrPlayer; +import mage.target.common.TargetOpponent; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author L_J + */ +public class GoblinFestival extends CardImpl { + + public GoblinFestival(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{R}"); + + // {2}: Goblin Festival deals 1 damage to target creature or player. Flip a coin. If you lose the flip, choose one of your opponents. That player gains control of Goblin Festival. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{2}")); + ability.addTarget(new TargetCreatureOrPlayer()); + ability.addEffect(new GoblinFestivalChangeControlEffect()); + this.addAbility(ability); + } + + public GoblinFestival(final GoblinFestival card) { + super(card); + } + + @Override + public GoblinFestival copy() { + return new GoblinFestival(this); + } +} + +class GoblinFestivalChangeControlEffect extends OneShotEffect { + + public GoblinFestivalChangeControlEffect() { + super(Outcome.Benefit); + this.staticText = "Flip a coin. If you lose the flip, choose one of your opponents. That player gains control of {this}"; + } + + public GoblinFestivalChangeControlEffect(final GoblinFestivalChangeControlEffect effect) { + super(effect); + } + + @Override + public GoblinFestivalChangeControlEffect copy() { + return new GoblinFestivalChangeControlEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + if (!controller.flipCoin(game)) { + Target target = new TargetOpponent(); + target.setNotTarget(true); + if (controller.chooseTarget(outcome, target, source, game)) { + ContinuousEffect effect = new GoblinFestivalGainControlEffect(Duration.Custom, target.getFirstTarget()); + effect.setTargetPointer(new FixedTarget(source.getSourceId())); + game.addEffect(effect, source); + return true; + } + } + } + return false; + } +} + +class GoblinFestivalGainControlEffect extends ContinuousEffectImpl { + + UUID controller; + + public GoblinFestivalGainControlEffect(Duration duration, UUID controller) { + super(duration, Layer.ControlChangingEffects_2, SubLayer.NA, Outcome.GainControl); + this.controller = controller; + } + + public GoblinFestivalGainControlEffect(final GoblinFestivalGainControlEffect effect) { + super(effect); + this.controller = effect.controller; + } + + @Override + public GoblinFestivalGainControlEffect copy() { + return new GoblinFestivalGainControlEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getFirstTarget()); + if (targetPointer != null) { + permanent = game.getPermanent(targetPointer.getFirst(game, source)); + } + if (permanent != null) { + return permanent.changeControllerId(controller, game); + } + return false; + } + + @Override + public String getText(Mode mode) { + return "That player gains control of {this}"; + } +} diff --git a/Mage.Sets/src/mage/cards/g/GoblinSkycutter.java b/Mage.Sets/src/mage/cards/g/GoblinSkycutter.java index 16147bfc0f0..112f0a02caa 100644 --- a/Mage.Sets/src/mage/cards/g/GoblinSkycutter.java +++ b/Mage.Sets/src/mage/cards/g/GoblinSkycutter.java @@ -48,7 +48,7 @@ import mage.target.common.TargetCreaturePermanent; /** * * @author LoneFox - + * */ public class GoblinSkycutter extends CardImpl { @@ -59,7 +59,7 @@ public class GoblinSkycutter extends CardImpl { } public GoblinSkycutter(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); this.subtype.add(SubType.GOBLIN); this.subtype.add(SubType.WARRIOR); this.power = new MageInt(2); @@ -67,7 +67,7 @@ public class GoblinSkycutter extends CardImpl { // Sacrifice Goblin Skycutter: Goblin Skycutter deals 2 damage to target creature with flying. That creature loses flying until end of turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new SacrificeSourceCost()); - ability.addEffect(new LoseAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn)); + ability.addEffect(new LoseAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn).setText("that creature loses flying until end of turn")); ability.addTarget(new TargetCreaturePermanent(filter)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/Godsend.java b/Mage.Sets/src/mage/cards/g/Godsend.java index 580494ee006..c47dbf04cb8 100644 --- a/Mage.Sets/src/mage/cards/g/Godsend.java +++ b/Mage.Sets/src/mage/cards/g/Godsend.java @@ -63,7 +63,7 @@ import mage.util.CardUtil; public class Godsend extends CardImpl { public Godsend(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}{W}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}{W}{W}"); addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.EQUIPMENT); @@ -195,7 +195,7 @@ class GodsendRuleModifyingEffect extends ContinuousRuleModifyingEffectImpl { public GodsendRuleModifyingEffect() { super(Duration.WhileOnBattlefield, Outcome.Detriment); - staticText = "Opponents can't cast cards with the same name as cards exiled with {this}"; + staticText = "Your opponents can't cast cards with the same name as cards exiled with {this}"; } public GodsendRuleModifyingEffect(final GodsendRuleModifyingEffect effect) { diff --git a/Mage.Sets/src/mage/cards/g/GohamDjinn.java b/Mage.Sets/src/mage/cards/g/GohamDjinn.java index 52670942375..412d5d98d8c 100644 --- a/Mage.Sets/src/mage/cards/g/GohamDjinn.java +++ b/Mage.Sets/src/mage/cards/g/GohamDjinn.java @@ -30,9 +30,12 @@ package mage.cards.g; import java.util.UUID; import mage.MageInt; import mage.ObjectColor; +import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.condition.common.MostCommonColorCondition; +import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.RegenerateSourceEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -55,6 +58,8 @@ public class GohamDjinn extends CardImpl { this.toughness = new MageInt(5); // {1}{B}: Regenerate Goham Djinn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ManaCostsImpl("{1}{B}"))); + // Goham Djinn gets -2/-2 as long as black is the most common color among all permanents or is tied for most common. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(new BoostSourceEffect(-2, -2, Duration.WhileOnBattlefield), diff --git a/Mage.Sets/src/mage/cards/g/GreatDefender.java b/Mage.Sets/src/mage/cards/g/GreatDefender.java index d7c8a832402..101c127b17d 100644 --- a/Mage.Sets/src/mage/cards/g/GreatDefender.java +++ b/Mage.Sets/src/mage/cards/g/GreatDefender.java @@ -48,7 +48,9 @@ public class GreatDefender extends CardImpl { // Target creature gets +0/+X until end of turn, where X is its converted mana cost. this.getSpellAbility().addTarget(new TargetCreaturePermanent()); - this.getSpellAbility().addEffect(new BoostTargetEffect(new StaticValue(0), new TargetConvertedManaCost(), Duration.EndOfTurn, true)); + this.getSpellAbility().addEffect(new BoostTargetEffect(new StaticValue(0), new TargetConvertedManaCost(), Duration.EndOfTurn, true) + .setText("Target creature gets +0/+X until end of turn, where X is its converted mana cost.") + ); } public GreatDefender(final GreatDefender card) { diff --git a/Mage.Sets/src/mage/cards/g/GreaterStoneSpirit.java b/Mage.Sets/src/mage/cards/g/GreaterStoneSpirit.java index 1f3702f52ad..a9a59aefb16 100644 --- a/Mage.Sets/src/mage/cards/g/GreaterStoneSpirit.java +++ b/Mage.Sets/src/mage/cards/g/GreaterStoneSpirit.java @@ -54,14 +54,15 @@ import mage.target.common.TargetCreaturePermanent; * @author fireshoes */ public class GreaterStoneSpirit extends CardImpl { - + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creatures with flying"); + static { filter.add(new AbilityPredicate(FlyingAbility.class)); } public GreaterStoneSpirit(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}{R}"); this.subtype.add(SubType.ELEMENTAL); this.subtype.add(SubType.SPIRIT); this.power = new MageInt(4); @@ -69,10 +70,13 @@ public class GreaterStoneSpirit extends CardImpl { // Greater Stone Spirit can't be blocked by creatures with flying. this.addAbility(new SimpleEvasionAbility(new CantBeBlockedByCreaturesSourceEffect(filter, Duration.WhileOnBattlefield))); - + // {2}{R}: Until end of turn, target creature gets +0/+2 and gains "{R}: This creature gets +1/+0 until end of turn." Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, - new BoostSourceEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{R}")); + new BoostSourceEffect(1, 0, Duration.EndOfTurn) + .setText("until end of turn, target creature gets +0/+2"), + new ManaCostsImpl("{R}") + ); Effect effect = new GainAbilityTargetEffect(gainedAbility, Duration.EndOfTurn); effect.setText("and gains \"{R}: This creature gets +1/+0 until end of turn.\""); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(0, 2, Duration.EndOfTurn), new ManaCostsImpl("{2}{R}")); diff --git a/Mage.Sets/src/mage/cards/g/GreenManaBattery.java b/Mage.Sets/src/mage/cards/g/GreenManaBattery.java index 7a407edcc5b..2106d125af6 100644 --- a/Mage.Sets/src/mage/cards/g/GreenManaBattery.java +++ b/Mage.Sets/src/mage/cards/g/GreenManaBattery.java @@ -64,10 +64,10 @@ public class GreenManaBattery extends CardImpl { Mana.GreenMana(1), new IntPlusDynamicValue(1, new RemovedCountersForCostValue()), new TapSourceCost(), - "Add {G} to your mana pool, then add {G} to your mana pool for each storage counter removed this way", - true, new CountersSourceCount(CounterType.STORAGE)); - ability.addCost(new RemoveVariableCountersSourceCost(CounterType.STORAGE.createInstance(), - "Remove X storage counters from {this}")); + "Add {G} to your mana pool, then add {G} to your mana pool for each charge counter removed this way", + true, new CountersSourceCount(CounterType.CHARGE)); + ability.addCost(new RemoveVariableCountersSourceCost(CounterType.CHARGE.createInstance(), + "Remove any number of charge counters from {this}")); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/g/Greenseeker.java b/Mage.Sets/src/mage/cards/g/Greenseeker.java index 9f0a7e6ece9..4b873b29bb3 100644 --- a/Mage.Sets/src/mage/cards/g/Greenseeker.java +++ b/Mage.Sets/src/mage/cards/g/Greenseeker.java @@ -51,7 +51,7 @@ import java.util.UUID; public class Greenseeker extends CardImpl { public Greenseeker(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}"); this.subtype.add(SubType.ELF); this.subtype.add(SubType.SPELLSHAPER); this.power = new MageInt(1); @@ -59,8 +59,8 @@ public class Greenseeker extends CardImpl { // {G}, {tap}, Discard a card: Search your library for a basic land card, reveal it, and put it into your hand. Then shuffle your library. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, - new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 1, StaticFilters.FILTER_BASIC_LAND_CARD), true, true), - new ManaCostsImpl("{G}")); + new SearchLibraryPutInHandEffect(new TargetCardInLibrary(1, 1, StaticFilters.FILTER_BASIC_LAND_CARD), true, true), + new ManaCostsImpl("{G}")); ability.addCost(new TapSourceCost()); ability.addCost(new DiscardCardCost()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/h/HedonistsTrove.java b/Mage.Sets/src/mage/cards/h/HedonistsTrove.java index a024d4458a2..44aa5b482b3 100644 --- a/Mage.Sets/src/mage/cards/h/HedonistsTrove.java +++ b/Mage.Sets/src/mage/cards/h/HedonistsTrove.java @@ -54,7 +54,7 @@ import java.util.UUID; public class HedonistsTrove extends CardImpl { public HedonistsTrove(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{5}{B}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{5}{B}{B}"); // When Hedonist's Trove enters the battlefield, exile all cards from target opponent's graveyard. Ability ability = new EntersBattlefieldTriggeredAbility(new HedonistsTroveExileEffect()); @@ -115,7 +115,7 @@ class HedonistsTrovePlayLandEffect extends AsThoughEffectImpl { public HedonistsTrovePlayLandEffect() { super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.WhileOnBattlefield, Outcome.Benefit); - staticText = "You may play land cards exiled by {this}"; + staticText = "You may play land cards exiled with {this}"; } public HedonistsTrovePlayLandEffect(final HedonistsTrovePlayLandEffect effect) { diff --git a/Mage.Sets/src/mage/cards/h/HelixPinnacle.java b/Mage.Sets/src/mage/cards/h/HelixPinnacle.java index 5a5501bfb6e..c4fe64e45a2 100644 --- a/Mage.Sets/src/mage/cards/h/HelixPinnacle.java +++ b/Mage.Sets/src/mage/cards/h/HelixPinnacle.java @@ -50,7 +50,7 @@ import mage.counters.CounterType; */ public class HelixPinnacle extends CardImpl { - static final String rule = "if there are 100 or more tower counters on Helix Pinnacle, you win the game"; + static final String rule = "at the beginning of your upkeep, if there are 100 or more tower counters on Helix Pinnacle, you win the game"; public HelixPinnacle(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{G}"); diff --git a/Mage.Sets/src/mage/cards/h/HerdchaserDragon.java b/Mage.Sets/src/mage/cards/h/HerdchaserDragon.java index 5e3579d7103..a5c7b8ceda7 100644 --- a/Mage.Sets/src/mage/cards/h/HerdchaserDragon.java +++ b/Mage.Sets/src/mage/cards/h/HerdchaserDragon.java @@ -49,8 +49,8 @@ import mage.filter.predicate.permanent.AnotherPredicate; * @author fireshoes */ public class HerdchaserDragon extends CardImpl { - - private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("each other Dragon creature you control"); + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("other Dragon creature you control"); static { filter.add(new AnotherPredicate()); @@ -58,20 +58,20 @@ public class HerdchaserDragon extends CardImpl { } public HerdchaserDragon(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{G}"); this.subtype.add(SubType.DRAGON); this.power = new MageInt(3); this.toughness = new MageInt(3); // Flying this.addAbility(FlyingAbility.getInstance()); - + // Trample this.addAbility(TrampleAbility.getInstance()); - + // Megamorph {5}{G}{G} this.addAbility(new MorphAbility(this, new ManaCostsImpl("{5}{G}{G}"), true)); - + // When Herdchaser Dragon is turned face up, put a +1/+1 counter on each other Dragon creature you control. this.addAbility(new TurnedFaceUpSourceTriggeredAbility(new AddCountersAllEffect(CounterType.P1P1.createInstance(), filter), false, false)); } diff --git a/Mage.Sets/src/mage/cards/h/HierophantsChalice.java b/Mage.Sets/src/mage/cards/h/HierophantsChalice.java index 7773026a687..73e175fd7c4 100644 --- a/Mage.Sets/src/mage/cards/h/HierophantsChalice.java +++ b/Mage.Sets/src/mage/cards/h/HierophantsChalice.java @@ -50,7 +50,7 @@ public class HierophantsChalice extends CardImpl { // When Hierophant's Chalice enters the battlefield, target opponent loses 1 life and you gain 1 life. Ability ability = new EntersBattlefieldTriggeredAbility(new LoseLifeTargetEffect(1), false); - ability.addEffect(new GainLifeEffect(1)); + ability.addEffect(new GainLifeEffect(1).setText("and you gain one life.")); Target target = new TargetOpponent(); ability.addTarget(target); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/h/HuatliDinosaurKnight.java b/Mage.Sets/src/mage/cards/h/HuatliDinosaurKnight.java index a7f28c381b3..593d3856819 100644 --- a/Mage.Sets/src/mage/cards/h/HuatliDinosaurKnight.java +++ b/Mage.Sets/src/mage/cards/h/HuatliDinosaurKnight.java @@ -74,7 +74,9 @@ public class HuatliDinosaurKnight extends CardImpl { this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(4)); // +2: Put two +1/+1 counters on up to one target Dinosaur you control. - Ability ability = new LoyaltyAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance(2)), 2); + Ability ability = new LoyaltyAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance(2)) + .setText("Put two +1/+1 counters on up to one target Dinosaur you control."), 2 + ); ability.addTarget(new TargetCreaturePermanent(0, 1, filter, false)); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/h/Hubris.java b/Mage.Sets/src/mage/cards/h/Hubris.java index 0c8751cc888..cb4cb55983e 100644 --- a/Mage.Sets/src/mage/cards/h/Hubris.java +++ b/Mage.Sets/src/mage/cards/h/Hubris.java @@ -52,7 +52,7 @@ import mage.target.common.TargetCreaturePermanent; public class Hubris extends CardImpl { public Hubris(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}"); // Return target creature and all Auras attached to it to their owners' hand. this.getSpellAbility().addEffect(new HubrisReturnEffect()); @@ -80,7 +80,7 @@ class HubrisReturnEffect extends OneShotEffect { public HubrisReturnEffect() { super(Outcome.Benefit); - this.staticText = "Return target creature and all Auras attached to it to their owners' hand"; + this.staticText = "Return target creature and all Auras attached to it to their owners' hands"; } public HubrisReturnEffect(final HubrisReturnEffect effect) { diff --git a/Mage.Sets/src/mage/cards/i/IceCave.java b/Mage.Sets/src/mage/cards/i/IceCave.java index 4a8234f99a4..188f79f42b2 100644 --- a/Mage.Sets/src/mage/cards/i/IceCave.java +++ b/Mage.Sets/src/mage/cards/i/IceCave.java @@ -52,11 +52,10 @@ import mage.players.Player; public class IceCave extends CardImpl { public IceCave(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{U}{U}"); - + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{U}{U}"); // Whenever a player casts a spell, any other player may pay that spell's mana cost. If a player does, counter the spell. (Mana cost includes color.) - this.addAbility(new SpellCastAllTriggeredAbility(Zone.BATTLEFIELD, new IceCaveEffect(), StaticFilters.FILTER_SPELL, false, SetTargetPointer.SPELL)); + this.addAbility(new SpellCastAllTriggeredAbility(Zone.BATTLEFIELD, new IceCaveEffect(), StaticFilters.FILTER_A_SPELL, false, SetTargetPointer.SPELL)); } public IceCave(final IceCave card) { @@ -90,17 +89,17 @@ class IceCaveEffect extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); Spell spell = (Spell) game.getStack().getStackObject(targetPointer.getFirst(game, source)); - if(sourcePermanent != null && spell != null && controller != null) { + if (sourcePermanent != null && spell != null && controller != null) { Player spellController = game.getPlayer(spell.getControllerId()); Cost cost = new ManaCostsImpl(spell.getSpellAbility().getManaCosts().getText()); - if(spellController != null) { + if (spellController != null) { for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) { Player player = game.getPlayer(playerId); - if(player != null && player != spellController) { + if (player != null && player != spellController) { cost.clearPaid(); - if(cost.canPay(source, source.getSourceId(), player.getId(), game) + if (cost.canPay(source, source.getSourceId(), player.getId(), game) && player.chooseUse(outcome, "Pay " + cost.getText() + " to counter " + spell.getIdName() + '?', source, game)) { - if(cost.pay(source, game, source.getSourceId(), playerId, false, null)) { + if (cost.pay(source, game, source.getSourceId(), playerId, false, null)) { game.informPlayers(player.getLogName() + " pays" + cost.getText() + " to counter " + spell.getIdName() + '.'); game.getStack().counter(spell.getId(), source.getSourceId(), game); return true; diff --git a/Mage.Sets/src/mage/cards/i/Illuminate.java b/Mage.Sets/src/mage/cards/i/Illuminate.java index a357d8f9a42..9ee484a69ae 100644 --- a/Mage.Sets/src/mage/cards/i/Illuminate.java +++ b/Mage.Sets/src/mage/cards/i/Illuminate.java @@ -47,7 +47,7 @@ import mage.target.common.TargetCreaturePermanent; public class Illuminate extends CardImpl { public Illuminate(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{R}"); // Kicker {2}{R} and/or {3}{U} KickerAbility kickerAbility = new KickerAbility("{2}{R}"); @@ -57,13 +57,13 @@ public class Illuminate extends CardImpl { this.getSpellAbility().addEffect(new DamageTargetEffect(new ManacostVariableValue())); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addEffect(new ConditionalOneShotEffect( - new DamageTargetControllerEffect(new ManacostVariableValue()), - new KickedCostCondition("{2}{R}"), - "If {this} was kicked with its {2}{R} kicker, it deals X damage to that creature's controller.")); + new DamageTargetControllerEffect(new ManacostVariableValue()), + new KickedCostCondition("{2}{R}"), + "If {this} was kicked with its {2}{R} kicker, it deals X damage to that creature's controller.")); this.getSpellAbility().addEffect(new ConditionalOneShotEffect( - new DrawCardSourceControllerEffect(new ManacostVariableValue()), - new KickedCostCondition("{3}{U}"), - "If {this} was kicked with its {3}{U} kicker, you draw X cards.")); + new DrawCardSourceControllerEffect(new ManacostVariableValue()), + new KickedCostCondition("{3}{U}"), + " If {this} was kicked with its {3}{U} kicker, you draw X cards.")); } diff --git a/Mage.Sets/src/mage/cards/i/IllusoryGains.java b/Mage.Sets/src/mage/cards/i/IllusoryGains.java index 74c227de3b2..d2b7f01df0a 100644 --- a/Mage.Sets/src/mage/cards/i/IllusoryGains.java +++ b/Mage.Sets/src/mage/cards/i/IllusoryGains.java @@ -65,7 +65,7 @@ public class IllusoryGains extends CardImpl { } public IllusoryGains(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{U}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{U}{U}"); this.subtype.add(SubType.AURA); // Enchant creature @@ -80,7 +80,7 @@ public class IllusoryGains extends CardImpl { // Whenever a creature enters the battlefield under an opponent's control, attach Illusory Gains to that creature. this.addAbility(new EntersBattlefieldAllTriggeredAbility( - Zone.BATTLEFIELD, new IllusoryGainsEffect(), filter, false, SetTargetPointer.PERMANENT, "Whenever a creature enters the battlefield under an opponent's control, you attach Illusory Gains to that creature.")); + Zone.BATTLEFIELD, new IllusoryGainsEffect(), filter, false, SetTargetPointer.PERMANENT, "Whenever a creature enters the battlefield under an opponent's control, attach Illusory Gains to that creature.")); } public IllusoryGains(final IllusoryGains card) { diff --git a/Mage.Sets/src/mage/cards/j/JaceIngeniousMindMage.java b/Mage.Sets/src/mage/cards/j/JaceIngeniousMindMage.java index cfc7cfeb048..5d8fdb57f0e 100644 --- a/Mage.Sets/src/mage/cards/j/JaceIngeniousMindMage.java +++ b/Mage.Sets/src/mage/cards/j/JaceIngeniousMindMage.java @@ -40,7 +40,7 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Duration; import mage.constants.SuperType; -import static mage.filter.StaticFilters.FILTER_PERMANENT_CREATURES; +import mage.filter.StaticFilters; import mage.target.common.TargetCreaturePermanent; /** @@ -61,11 +61,11 @@ public class JaceIngeniousMindMage extends CardImpl { this.addAbility(new LoyaltyAbility(new DrawCardSourceControllerEffect(1), 1)); // +1: Untap all creatures you control. - this.addAbility(new LoyaltyAbility(new UntapAllControllerEffect(FILTER_PERMANENT_CREATURES), 1)); + this.addAbility(new LoyaltyAbility(new UntapAllControllerEffect(StaticFilters.FILTER_PERMANENT_CREATURES), 1)); // -9: Gain control of up to three target creatures. Ability ability = new LoyaltyAbility(new GainControlTargetEffect(Duration.Custom), -9); - ability.addTarget(new TargetCreaturePermanent(0, 3)); + ability.addTarget(new TargetCreaturePermanent(0, 3, StaticFilters.FILTER_PERMANENT_CREATURES, false)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/j/JacesSentinel.java b/Mage.Sets/src/mage/cards/j/JacesSentinel.java index a9288ece7d5..5d27ac6b601 100644 --- a/Mage.Sets/src/mage/cards/j/JacesSentinel.java +++ b/Mage.Sets/src/mage/cards/j/JacesSentinel.java @@ -77,7 +77,7 @@ public class JacesSentinel extends CardImpl { ability.addEffect(new ConditionalContinuousEffect( new CantBeBlockedSourceEffect(), new PermanentsOnTheBattlefieldCondition(filter), - "and has can't be blocked")); + "and can't be blocked")); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/j/Jilt.java b/Mage.Sets/src/mage/cards/j/Jilt.java index 799208d43d5..2f3d30c68ec 100644 --- a/Mage.Sets/src/mage/cards/j/Jilt.java +++ b/Mage.Sets/src/mage/cards/j/Jilt.java @@ -53,11 +53,11 @@ import mage.target.targetpointer.SecondTargetPointer; public class Jilt extends CardImpl { public Jilt(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}"); // Kicker {1}{R} this.addAbility(new KickerAbility("{1}{R}")); - + // Return target creature to its owner's hand. If Jilt was kicked, it deals 2 damage to another target creature. this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); Effect effect = new ConditionalOneShotEffect( @@ -66,11 +66,11 @@ public class Jilt extends CardImpl { "If {this} was kicked, it deals 2 damage to another target creature"); effect.setTargetPointer(new SecondTargetPointer()); this.getSpellAbility().addEffect(effect); - Target target = new TargetCreaturePermanent(new FilterCreaturePermanent("Target Creature: returned to Hand")); + Target target = new TargetCreaturePermanent(); target.setTargetTag(1); this.getSpellAbility().addTarget(target); } - + @Override public void adjustTargets(Ability ability, Game game) { if (ability instanceof SpellAbility && KickedCondition.instance.apply(game, ability)) { diff --git a/Mage.Sets/src/mage/cards/j/Jokulmorder.java b/Mage.Sets/src/mage/cards/j/Jokulmorder.java index 87ce51cb027..99c8ba7525e 100644 --- a/Mage.Sets/src/mage/cards/j/Jokulmorder.java +++ b/Mage.Sets/src/mage/cards/j/Jokulmorder.java @@ -59,26 +59,26 @@ import java.util.UUID; public class Jokulmorder extends CardImpl { public Jokulmorder(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}{U}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}{U}{U}"); this.subtype.add(SubType.LEVIATHAN); this.power = new MageInt(12); this.toughness = new MageInt(12); // Trample this.addAbility(TrampleAbility.getInstance()); - + // Jokulmorder enters the battlefield tapped. this.addAbility(new EntersBattlefieldTappedAbility()); - + // When Jokulmorder enters the battlefield, sacrifice it unless you sacrifice five lands. Effect effect = new SacrificeSourceUnlessPaysEffect( new SacrificeTargetCost(new TargetControlledPermanent(5, 5, new FilterControlledLandPermanent("five lands"), true))); effect.setText("sacrifice it unless you sacrifice five lands"); this.addAbility(new EntersBattlefieldTriggeredAbility(effect, false)); - + // Jokulmorder doesn't untap during your untap step. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepSourceEffect())); - + // Whenever you play an Island, you may untap Jokulmorder. this.addAbility(new JokulmorderTriggeredAbility()); } @@ -122,6 +122,6 @@ class JokulmorderTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "When you play an Island, you may untap {this}"; + return "Whenever you play an Island, you may untap {this}."; } } diff --git a/Mage.Sets/src/mage/cards/k/KangeeAerieKeeper.java b/Mage.Sets/src/mage/cards/k/KangeeAerieKeeper.java index 7dea607f9cf..6c2bf154405 100644 --- a/Mage.Sets/src/mage/cards/k/KangeeAerieKeeper.java +++ b/Mage.Sets/src/mage/cards/k/KangeeAerieKeeper.java @@ -57,16 +57,16 @@ import mage.game.Game; * @author emerald000 */ public class KangeeAerieKeeper extends CardImpl { - + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Bird creatures"); - + static { filter.add(new SubtypePredicate(SubType.BIRD)); filter.add(new AnotherPredicate()); } public KangeeAerieKeeper(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{U}"); addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.BIRD); this.subtype.add(SubType.WIZARD); @@ -75,15 +75,15 @@ public class KangeeAerieKeeper extends CardImpl { this.toughness = new MageInt(2); // Kicker {X}{2} - this.addAbility(new KickerAbility("{X}{2}")); - + this.addAbility(new KickerAbility("{2}{X}")); + // Flying this.addAbility(FlyingAbility.getInstance()); - + // When Kangee, Aerie Keeper enters the battlefield, if it was kicked, put X feather counters on it. TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new AddCountersSourceEffect(CounterType.FEATHER.createInstance(), new KangeeAerieKeeperGetKickerXValue(), true)); this.addAbility(new ConditionalTriggeredAbility(ability, KickedCondition.instance, "When {this} enters the battlefield, if it was kicked, put X feather counters on it.")); - + // Other Bird creatures get +1/+1 for each feather counter on Kangee, Aerie Keeper. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(new CountersSourceCount(CounterType.FEATHER), new CountersSourceCount(CounterType.FEATHER), Duration.WhileOnBattlefield, filter, true, "Other Bird creatures get +1/+1 for each feather counter on {this}."))); } @@ -108,7 +108,7 @@ class KangeeAerieKeeperGetKickerXValue implements DynamicValue { int count = 0; Card card = game.getCard(source.getSourceId()); if (card != null) { - for (Ability ability: card.getAbilities()) { + for (Ability ability : card.getAbilities()) { if (ability instanceof KickerAbility) { count += ((KickerAbility) ability).getXManaValue(); } @@ -131,4 +131,4 @@ class KangeeAerieKeeperGetKickerXValue implements DynamicValue { public String getMessage() { return "X"; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/k/KarplusanMinotaur.java b/Mage.Sets/src/mage/cards/k/KarplusanMinotaur.java index 8d21319da3f..a244cd23b10 100644 --- a/Mage.Sets/src/mage/cards/k/KarplusanMinotaur.java +++ b/Mage.Sets/src/mage/cards/k/KarplusanMinotaur.java @@ -32,20 +32,15 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.costs.Cost; import mage.abilities.costs.CostImpl; -import mage.abilities.TriggeredAbility; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.effects.common.DamageTargetEffect; -import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.keyword.CumulativeUpkeepAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.SubType; -import mage.constants.TargetController; import mage.constants.Zone; -import mage.counters.CounterType; -import mage.filter.common.FilterCreaturePermanent; import mage.game.Game; import mage.game.events.GameEvent; import mage.players.Player; @@ -60,7 +55,7 @@ import mage.target.common.TargetOpponent; public class KarplusanMinotaur extends CardImpl { public KarplusanMinotaur(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); this.subtype.add(SubType.MINOTAUR); this.subtype.add(SubType.WARRIOR); this.power = new MageInt(3); @@ -68,7 +63,7 @@ public class KarplusanMinotaur extends CardImpl { // Cumulative upkeep-Flip a coin. this.addAbility(new CumulativeUpkeepAbility(new KarplusanMinotaurCost())); - + // Whenever you win a coin flip, Karplusan Minotaur deals 1 damage to target creature or player. Ability abilityWin = new KarplusanMinotaurFlipWinTriggeredAbility(); abilityWin.addTarget(new TargetCreatureOrPlayer()); @@ -80,23 +75,22 @@ public class KarplusanMinotaur extends CardImpl { abilityLose.addTarget(new TargetCreatureOrPlayer()); this.addAbility(abilityLose); } - + @Override public void adjustTargets(Ability ability, Game game) { if (ability instanceof KarplusanMinotaurFlipLoseTriggeredAbility) { Player controller = game.getPlayer(ability.getControllerId()); - if(controller != null) { + if (controller != null) { UUID opponentId = null; - if(game.getOpponents(controller.getId()).size() > 1) { + if (game.getOpponents(controller.getId()).size() > 1) { Target target = new TargetOpponent(true); - if(controller.chooseTarget(Outcome.Neutral, target, ability, game)) { + if (controller.chooseTarget(Outcome.Neutral, target, ability, game)) { opponentId = target.getFirstTarget(); } - } - else { + } else { opponentId = game.getOpponents(controller.getId()).iterator().next(); } - if(opponentId != null) { + if (opponentId != null) { ability.getTargets().get(0).setTargetController(opponentId); } } @@ -171,12 +165,12 @@ class KarplusanMinotaurFlipLoseTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "Whenever you lose a coin flip, {this} deals 1 damage to target creature or player of an opponent's choice"; + return "Whenever you lose a coin flip, {this} deals 1 damage to target creature or player of an opponent's choice."; } } class KarplusanMinotaurCost extends CostImpl { - + KarplusanMinotaurCost() { this.text = "Flip a coin"; } @@ -188,7 +182,7 @@ class KarplusanMinotaurCost extends CostImpl { controller.flipCoin(game); this.paid = true; return true; - } + } return false; } @@ -202,7 +196,7 @@ class KarplusanMinotaurCost extends CostImpl { } return false; } - + @Override public KarplusanMinotaurCost copy() { return new KarplusanMinotaurCost(); diff --git a/Mage.Sets/src/mage/cards/k/KavuScout.java b/Mage.Sets/src/mage/cards/k/KavuScout.java index f8bcb743a35..f9a94eadcc1 100644 --- a/Mage.Sets/src/mage/cards/k/KavuScout.java +++ b/Mage.Sets/src/mage/cards/k/KavuScout.java @@ -29,12 +29,14 @@ package mage.cards.k; import java.util.UUID; import mage.MageInt; +import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.dynamicvalue.common.DomainValue; import mage.abilities.dynamicvalue.common.StaticValue; import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; +import mage.constants.AbilityWord; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Duration; @@ -47,7 +49,7 @@ import mage.constants.Zone; public class KavuScout extends CardImpl { public KavuScout(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); this.subtype.add(SubType.KAVU); this.subtype.add(SubType.SCOUT); @@ -55,7 +57,9 @@ public class KavuScout extends CardImpl { this.toughness = new MageInt(2); // Domain - Kavu Scout gets +1/+0 for each basic land type among lands you control. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(new DomainValue(), new StaticValue(0), Duration.WhileOnBattlefield))); + Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostSourceEffect(new DomainValue(), new StaticValue(0), Duration.WhileOnBattlefield)); + ability.setAbilityWord(AbilityWord.DOMAIN); + this.addAbility(ability); } public KavuScout(final KavuScout card) { diff --git a/Mage.Sets/src/mage/cards/k/KrovikanMist.java b/Mage.Sets/src/mage/cards/k/KrovikanMist.java index 3cd681609cf..e937c2d8db2 100644 --- a/Mage.Sets/src/mage/cards/k/KrovikanMist.java +++ b/Mage.Sets/src/mage/cards/k/KrovikanMist.java @@ -39,7 +39,7 @@ import mage.constants.CardType; import mage.constants.Duration; import mage.constants.SubType; import mage.constants.Zone; -import mage.filter.common.FilterControlledPermanent; +import mage.filter.FilterPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; /** @@ -47,15 +47,15 @@ import mage.filter.predicate.mageobject.SubtypePredicate; * @author LevelX2 */ public class KrovikanMist extends CardImpl { - - private static final FilterControlledPermanent controlledIllusionsFilter = new FilterControlledPermanent("Illusions you control"); - + + private static final FilterPermanent illusionsFilter = new FilterPermanent("Illusions on the battlefield"); + static { - controlledIllusionsFilter.add(new SubtypePredicate(SubType.ILLUSION)); + illusionsFilter.add(new SubtypePredicate(SubType.ILLUSION)); } public KrovikanMist(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); this.subtype.add(SubType.ILLUSION); this.power = new MageInt(0); @@ -65,7 +65,7 @@ public class KrovikanMist extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // Krovikan Mist's power and toughness are each equal to the number of Illusions on the battlefield. this.addAbility(new SimpleStaticAbility(Zone.ALL, - new SetPowerToughnessSourceEffect(new PermanentsOnBattlefieldCount(controlledIllusionsFilter), Duration.EndOfGame))); + new SetPowerToughnessSourceEffect(new PermanentsOnBattlefieldCount(illusionsFilter), Duration.EndOfGame))); } diff --git a/Mage.Sets/src/mage/cards/k/KrovikanWhispers.java b/Mage.Sets/src/mage/cards/k/KrovikanWhispers.java index e454889dc4e..2aee7e8829f 100644 --- a/Mage.Sets/src/mage/cards/k/KrovikanWhispers.java +++ b/Mage.Sets/src/mage/cards/k/KrovikanWhispers.java @@ -28,7 +28,6 @@ package mage.cards.k; import java.util.UUID; -import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.PutIntoGraveFromBattlefieldSourceTriggeredAbility; @@ -36,7 +35,6 @@ import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.continuous.ControlEnchantedEffect; import mage.abilities.costs.OrCost; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.MultipliedValue; import mage.abilities.dynamicvalue.common.CountersSourceCount; import mage.abilities.effects.common.LoseLifeSourceControllerEffect; @@ -70,13 +68,15 @@ public class KrovikanWhispers extends CardImpl { this.addAbility(ability); // Cumulative upkeep-Pay {U} or {B}. - this.addAbility(new CumulativeUpkeepAbility(new OrCost(new ManaCostsImpl("{U}"), new ManaCostsImpl("{B}"), "Pay {U} or pay {B}"))); + this.addAbility(new CumulativeUpkeepAbility(new OrCost(new ManaCostsImpl("{U}"), new ManaCostsImpl("{B}"), "{U} or {B}"))); // You control enchanted creature. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ControlEnchantedEffect())); // When Krovikan Whispers is put into a graveyard from the battlefield, you lose 2 life for each age counter on it. - this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new LoseLifeSourceControllerEffect(new MultipliedValue(new CountersSourceCount(CounterType.AGE), 2)))); + this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new LoseLifeSourceControllerEffect(new MultipliedValue(new CountersSourceCount(CounterType.AGE), 2)) + .setText("you lose 2 life for each age counter on it.") + )); } public KrovikanWhispers(final KrovikanWhispers card) { @@ -88,4 +88,3 @@ public class KrovikanWhispers extends CardImpl { return new KrovikanWhispers(this); } } - diff --git a/Mage.Sets/src/mage/cards/l/LastCaress.java b/Mage.Sets/src/mage/cards/l/LastCaress.java index 3bc5473e34b..e4652239ec5 100644 --- a/Mage.Sets/src/mage/cards/l/LastCaress.java +++ b/Mage.Sets/src/mage/cards/l/LastCaress.java @@ -43,12 +43,12 @@ import mage.target.TargetPlayer; public class LastCaress extends CardImpl { public LastCaress(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}"); this.getSpellAbility().addEffect(new LoseLifeTargetEffect(1)); this.getSpellAbility().addTarget(new TargetPlayer()); - this.getSpellAbility().addEffect(new GainLifeEffect(1)); - this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); + this.getSpellAbility().addEffect(new GainLifeEffect(1).setText("and you gain 1 life")); + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1).setText("

Draw a card")); } public LastCaress(final LastCaress card) { diff --git a/Mage.Sets/src/mage/cards/l/LaunchTheFleet.java b/Mage.Sets/src/mage/cards/l/LaunchTheFleet.java index edb409c372b..8a19cbb2d2a 100644 --- a/Mage.Sets/src/mage/cards/l/LaunchTheFleet.java +++ b/Mage.Sets/src/mage/cards/l/LaunchTheFleet.java @@ -55,7 +55,7 @@ public class LaunchTheFleet extends CardImpl { // Until end of turn, any number of target creatures each gain "Whenever this creature attacks, create a 1/1 white Soldier token tapped and attacking." this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, Integer.MAX_VALUE)); Effect effect = new GainAbilityTargetEffect(new AttacksTriggeredAbility(new CreateTokenEffect(new SoldierToken(), 1, true, true), false), Duration.EndOfTurn); - effect.setText("Until end of turn, any number of target creatures each gain \"Whenever this creature attacks, create a 1/1 white Soldier token tapped and attacking.\""); + effect.setText("Until end of turn, any number of target creatures each gain \"Whenever this creature attacks, create a 1/1 white Soldier creature token that's tapped and attacking.\""); this.getSpellAbility().addEffect(effect); } diff --git a/Mage.Sets/src/mage/cards/l/LightningSerpent.java b/Mage.Sets/src/mage/cards/l/LightningSerpent.java index 37e36d2d728..c567141b31c 100644 --- a/Mage.Sets/src/mage/cards/l/LightningSerpent.java +++ b/Mage.Sets/src/mage/cards/l/LightningSerpent.java @@ -29,8 +29,8 @@ package mage.cards.l; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.BeginningOfEndStepTriggeredAbility; import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.OnEventTriggeredAbility; import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect; import mage.abilities.effects.common.SacrificeSourceEffect; import mage.abilities.keyword.HasteAbility; @@ -39,8 +39,8 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.constants.TargetController; import mage.counters.CounterType; +import mage.game.events.GameEvent; /** * @@ -49,7 +49,7 @@ import mage.counters.CounterType; public class LightningSerpent extends CardImpl { public LightningSerpent(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{X}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{X}{R}"); this.subtype.add(SubType.ELEMENTAL); this.subtype.add(SubType.SERPENT); this.power = new MageInt(2); @@ -62,7 +62,7 @@ public class LightningSerpent extends CardImpl { // Lightning Serpent enters the battlefield with X +1/+0 counters on it. this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.P1P0.createInstance()))); // At the beginning of the end step, sacrifice Lightning Serpent. - this.addAbility(new BeginningOfEndStepTriggeredAbility(new SacrificeSourceEffect(), TargetController.ANY, false)); + this.addAbility(new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new SacrificeSourceEffect())); } public LightningSerpent(final LightningSerpent card) { diff --git a/Mage.Sets/src/mage/cards/l/LightningStorm.java b/Mage.Sets/src/mage/cards/l/LightningStorm.java index 9c856fcada2..0c7c4cd07bb 100644 --- a/Mage.Sets/src/mage/cards/l/LightningStorm.java +++ b/Mage.Sets/src/mage/cards/l/LightningStorm.java @@ -57,7 +57,7 @@ import mage.target.common.TargetCreatureOrPlayer; public class LightningStorm extends CardImpl { public LightningStorm(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{R}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}{R}"); // Lightning Storm deals X damage to target creature or player, where X is 3 plus the number of charge counters on it. Effect effect = new DamageTargetEffect(new LightningStormCountCondition(CounterType.CHARGE)); @@ -67,9 +67,9 @@ public class LightningStorm extends CardImpl { // Discard a land card: Put two charge counters on Lightning Storm. You may choose a new target for it. Any player may activate this ability but only if Lightning Storm is on the stack. SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.STACK, new LightningStormAddCounterEffect(), - new DiscardTargetCost(new TargetCardInHand(new FilterLandCard()))); + new DiscardTargetCost(new TargetCardInHand(new FilterLandCard("a land card")))); ability.setMayActivate(TargetController.ANY); - ability.addEffect(new InfoEffect("Any player may activate this ability but only if {this} is on the stack")); + ability.addEffect(new InfoEffect(" Any player may activate this ability but only if {this} is on the stack")); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/l/LimDulTheNecromancer.java b/Mage.Sets/src/mage/cards/l/LimDulTheNecromancer.java index 0e1abb3ccaa..c04355a0baf 100644 --- a/Mage.Sets/src/mage/cards/l/LimDulTheNecromancer.java +++ b/Mage.Sets/src/mage/cards/l/LimDulTheNecromancer.java @@ -58,7 +58,7 @@ import mage.target.targetpointer.FixedTarget; */ public class LimDulTheNecromancer extends CardImpl { - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls"); + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature an opponent controls"); private static final FilterPermanent filter2 = new FilterPermanent("Zombie"); static { @@ -67,7 +67,7 @@ public class LimDulTheNecromancer extends CardImpl { } public LimDulTheNecromancer(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{B}{B}"); addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.WIZARD); diff --git a/Mage.Sets/src/mage/cards/l/LookoutsDispersal.java b/Mage.Sets/src/mage/cards/l/LookoutsDispersal.java index 556e32d4fd2..2aa8d97464f 100644 --- a/Mage.Sets/src/mage/cards/l/LookoutsDispersal.java +++ b/Mage.Sets/src/mage/cards/l/LookoutsDispersal.java @@ -49,7 +49,7 @@ import mage.target.TargetSpell; */ public class LookoutsDispersal extends CardImpl { - private static final FilterControlledPermanent filter = new FilterControlledPermanent(); + private static final FilterControlledPermanent filter = new FilterControlledPermanent("a Pirate"); static { filter.add(new SubtypePredicate(SubType.PIRATE)); diff --git a/Mage.Sets/src/mage/cards/l/LoseCalm.java b/Mage.Sets/src/mage/cards/l/LoseCalm.java index 7891c5c802c..d64891833cc 100644 --- a/Mage.Sets/src/mage/cards/l/LoseCalm.java +++ b/Mage.Sets/src/mage/cards/l/LoseCalm.java @@ -47,17 +47,17 @@ import mage.target.common.TargetCreaturePermanent; public class LoseCalm extends CardImpl { public LoseCalm(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{R}"); // Gain control of target creature until end of turn. Untap that creature. It gains haste and menace until end of turn. (A creature with menace can't be blocked except by two or more creatures.) this.getSpellAbility().addEffect(new GainControlTargetEffect(Duration.EndOfTurn)); Effect effect = new UntapTargetEffect(); effect.setText("Untap that creature"); this.getSpellAbility().addEffect(effect); - this.getSpellAbility().addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn, "It gains haste until end of turn")); + this.getSpellAbility().addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn, "It gains haste")); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); effect = new GainAbilityTargetEffect(new MenaceAbility(), Duration.EndOfTurn); - effect.setText("and menace until end of turn. (A creature with menace can't be blocked except by two or more creatures.) "); + effect.setText("and menace until end of turn"); this.getSpellAbility().addEffect(effect); } diff --git a/Mage.Sets/src/mage/cards/m/MagusOfTheScroll.java b/Mage.Sets/src/mage/cards/m/MagusOfTheScroll.java index 3c84e6ae224..aab52ad5417 100644 --- a/Mage.Sets/src/mage/cards/m/MagusOfTheScroll.java +++ b/Mage.Sets/src/mage/cards/m/MagusOfTheScroll.java @@ -57,7 +57,7 @@ import mage.target.common.TargetCreatureOrPlayer; public class MagusOfTheScroll extends CardImpl { public MagusOfTheScroll(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.WIZARD); this.power = new MageInt(1); @@ -85,7 +85,7 @@ class MagusOfTheScrollEffect extends OneShotEffect { public MagusOfTheScrollEffect() { super(Outcome.Neutral); - staticText = "Reveal a card at random from your hand. If it's the named card, {this} deals 2 damage to target creature or player"; + staticText = ", then reveal a card at random from your hand. If it's the named card, {this} deals 2 damage to target creature or player"; } public MagusOfTheScrollEffect(final MagusOfTheScrollEffect effect) { @@ -126,4 +126,4 @@ class MagusOfTheScrollEffect extends OneShotEffect { public MagusOfTheScrollEffect copy() { return new MagusOfTheScrollEffect(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/m/MagusOfTheTabernacle.java b/Mage.Sets/src/mage/cards/m/MagusOfTheTabernacle.java index a85772a723e..0fdd344d1e7 100644 --- a/Mage.Sets/src/mage/cards/m/MagusOfTheTabernacle.java +++ b/Mage.Sets/src/mage/cards/m/MagusOfTheTabernacle.java @@ -50,7 +50,7 @@ import mage.filter.StaticFilters; */ public class MagusOfTheTabernacle extends CardImpl { - static private final String rule = "All creatures have \"At the beginning of your upkeep, sacrifice this creature unless you pay {1}\""; + static private final String rule = "All creatures have \"At the beginning of your upkeep, sacrifice this creature unless you pay {1}.\""; public MagusOfTheTabernacle(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}"); diff --git a/Mage.Sets/src/mage/cards/m/MakeshiftMunitions.java b/Mage.Sets/src/mage/cards/m/MakeshiftMunitions.java index ca6c60abd18..2be6c83d59d 100644 --- a/Mage.Sets/src/mage/cards/m/MakeshiftMunitions.java +++ b/Mage.Sets/src/mage/cards/m/MakeshiftMunitions.java @@ -49,7 +49,7 @@ import mage.target.common.TargetCreatureOrPlayer; */ public class MakeshiftMunitions extends CardImpl { - private static final FilterControlledPermanent filter = new FilterControlledPermanent("artifact or creature you control"); + private static final FilterControlledPermanent filter = new FilterControlledPermanent("artifact or creature"); static { filter.add(Predicates.or( diff --git a/Mage.Sets/src/mage/cards/m/MaliciousAdvice.java b/Mage.Sets/src/mage/cards/m/MaliciousAdvice.java index a9d044d72e4..05479e10072 100644 --- a/Mage.Sets/src/mage/cards/m/MaliciousAdvice.java +++ b/Mage.Sets/src/mage/cards/m/MaliciousAdvice.java @@ -59,18 +59,18 @@ public class MaliciousAdvice extends CardImpl { } public MaliciousAdvice(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{X}{U}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{X}{U}{B}"); // Tap X target artifacts, creatures, and/or lands. You lose X life. Effect effect = new TapTargetEffect(); - effect.setText("Tap X target artifacts, creatures, and/or lands"); + effect.setText("X target artifacts, creatures, and/or lands"); this.getSpellAbility().addEffect(effect); this.getSpellAbility().addEffect(new LoseLifeSourceControllerEffect(new ManacostVariableValue())); } @Override public void adjustTargets(Ability ability, Game game) { - if(ability instanceof SpellAbility) { + if (ability instanceof SpellAbility) { ability.getTargets().clear(); ability.addTarget(new TargetPermanent(ability.getManaCostsToPay().getX(), filter)); } diff --git a/Mage.Sets/src/mage/cards/m/MangaraOfCorondor.java b/Mage.Sets/src/mage/cards/m/MangaraOfCorondor.java index 718cfcd57fa..3decdc220e5 100644 --- a/Mage.Sets/src/mage/cards/m/MangaraOfCorondor.java +++ b/Mage.Sets/src/mage/cards/m/MangaraOfCorondor.java @@ -59,7 +59,7 @@ public class MangaraOfCorondor extends CardImpl { // {T}: Exile Mangara of Corondor and target permanent. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileSourceEffect(), new TapSourceCost()); - ability.addEffect(new ExileTargetEffect()); + ability.addEffect(new ExileTargetEffect().setText("and target permanent")); ability.addTarget(new TargetPermanent()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/MaraudingLooter.java b/Mage.Sets/src/mage/cards/m/MaraudingLooter.java index c87a6297a66..609f05cdab5 100644 --- a/Mage.Sets/src/mage/cards/m/MaraudingLooter.java +++ b/Mage.Sets/src/mage/cards/m/MaraudingLooter.java @@ -61,7 +61,7 @@ public class MaraudingLooter extends CardImpl { RaidCondition.instance, "Raid — At the beginning of your end step, " + "if you attacked with a creature this turn, " - + "you may draw a card. If you do, discard a card"); + + "you may draw a card. If you do, discard a card."); this.addAbility(ability, new PlayerAttackedWatcher()); } diff --git a/Mage.Sets/src/mage/cards/m/MarchOfTheDrowned.java b/Mage.Sets/src/mage/cards/m/MarchOfTheDrowned.java index 393917cb020..cd3f5d8513d 100644 --- a/Mage.Sets/src/mage/cards/m/MarchOfTheDrowned.java +++ b/Mage.Sets/src/mage/cards/m/MarchOfTheDrowned.java @@ -30,7 +30,6 @@ package mage.cards.m; import java.util.UUID; import mage.abilities.Mode; import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; -import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -57,7 +56,7 @@ public class MarchOfTheDrowned extends CardImpl { // Choose one — // &bull; Return target creature card from your graveyard to your hand. - this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); + this.getSpellAbility().addEffect(new ReturnFromGraveyardToHandTargetEffect()); this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard"))); // &bull; Return two target Pirate cards from your graveyard to your hand. Mode mode = new Mode(); diff --git a/Mage.Sets/src/mage/cards/m/MercurialKite.java b/Mage.Sets/src/mage/cards/m/MercurialKite.java index b36bc71d321..c359ce3197c 100644 --- a/Mage.Sets/src/mage/cards/m/MercurialKite.java +++ b/Mage.Sets/src/mage/cards/m/MercurialKite.java @@ -46,7 +46,7 @@ import mage.constants.SubType; public class MercurialKite extends CardImpl { public MercurialKite(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); this.subtype.add(SubType.BIRD); this.power = new MageInt(2); this.toughness = new MageInt(2); @@ -56,7 +56,7 @@ public class MercurialKite extends CardImpl { // Whenever Mercurial Kite deals combat damage to a creature, tap that creature. That creature doesn't untap during its controller's next untap step. Ability ability; ability = new DealsDamageToACreatureTriggeredAbility(new TapTargetEffect("that creature"), true, false, true); - ability.addEffect(new DontUntapInControllersNextUntapStepTargetEffect("and it")); + ability.addEffect(new DontUntapInControllersNextUntapStepTargetEffect("That creature")); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/m/MerrowBonegnawer.java b/Mage.Sets/src/mage/cards/m/MerrowBonegnawer.java index 089a13e1082..87554db3494 100644 --- a/Mage.Sets/src/mage/cards/m/MerrowBonegnawer.java +++ b/Mage.Sets/src/mage/cards/m/MerrowBonegnawer.java @@ -54,14 +54,14 @@ public class MerrowBonegnawer extends CardImpl { private UUID exileId = UUID.randomUUID(); - private static final FilterSpell filter = new FilterSpell("black spell"); + private static final FilterSpell filter = new FilterSpell("a black spell"); static { filter.add(new ColorPredicate(ObjectColor.BLACK)); } public MerrowBonegnawer(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}"); this.subtype.add(SubType.MERFOLK); this.subtype.add(SubType.ROGUE); diff --git a/Mage.Sets/src/mage/cards/m/MidnightCharm.java b/Mage.Sets/src/mage/cards/m/MidnightCharm.java index 10b4c3e693f..f4e9be58d95 100644 --- a/Mage.Sets/src/mage/cards/m/MidnightCharm.java +++ b/Mage.Sets/src/mage/cards/m/MidnightCharm.java @@ -47,11 +47,11 @@ import mage.target.common.TargetCreaturePermanent; public class MidnightCharm extends CardImpl { public MidnightCharm(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{B}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{B}"); // Choose one - Midnight Charm deals 1 damage to target creature and you gain 1 life; or target creature gains first strike until end of turn; or tap target creature. this.getSpellAbility().addEffect(new DamageTargetEffect(1)); - this.getSpellAbility().addEffect(new GainLifeEffect(1)); + this.getSpellAbility().addEffect(new GainLifeEffect(1).setText("and you gain 1 life")); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); Mode mode = new Mode(); mode.getEffects().add(new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn)); diff --git a/Mage.Sets/src/mage/cards/m/MinotaurTactician.java b/Mage.Sets/src/mage/cards/m/MinotaurTactician.java index 27413e44db0..b9203d82880 100644 --- a/Mage.Sets/src/mage/cards/m/MinotaurTactician.java +++ b/Mage.Sets/src/mage/cards/m/MinotaurTactician.java @@ -52,33 +52,33 @@ import java.util.UUID; * @author fireshoes */ public class MinotaurTactician extends CardImpl { - + private static final FilterControlledCreaturePermanent filterWhite = new FilterControlledCreaturePermanent(); private static final FilterControlledCreaturePermanent filterBlue = new FilterControlledCreaturePermanent(); - + static { filterWhite.add(new ColorPredicate(ObjectColor.WHITE)); filterBlue.add(new ColorPredicate(ObjectColor.BLUE)); } - - static final private String ruleWhite = "{this} gets +1/+1 as long as you control another white creature"; - - static final private String ruleBlue = "{this} gets +1/+1 as long as you control another white creature"; + + static final private String ruleWhite = "{this} gets +1/+1 as long as you control a white creature"; + + static final private String ruleBlue = "{this} gets +1/+1 as long as you control a blue creature"; public MinotaurTactician(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); this.subtype.add(SubType.MINOTAUR); this.power = new MageInt(1); this.toughness = new MageInt(1); // Haste this.addAbility(HasteAbility.getInstance()); - + // Minotaur Tactician gets +1/+1 as long as you control a white creature. Condition conditionWhite = new PermanentsOnTheBattlefieldCondition(filterWhite); Effect effectWhite = new ConditionalContinuousEffect(new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), conditionWhite, ruleWhite); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effectWhite)); - + // Minotaur Tactician gets +1/+1 as long as you control a blue creature. Condition conditionBlue = new PermanentsOnTheBattlefieldCondition(filterBlue); Effect effectBlue = new ConditionalContinuousEffect(new BoostSourceEffect(1, 1, Duration.WhileOnBattlefield), conditionBlue, ruleBlue); diff --git a/Mage.Sets/src/mage/cards/m/MirrorMockery.java b/Mage.Sets/src/mage/cards/m/MirrorMockery.java index f4c45349421..b0572190fbf 100644 --- a/Mage.Sets/src/mage/cards/m/MirrorMockery.java +++ b/Mage.Sets/src/mage/cards/m/MirrorMockery.java @@ -55,7 +55,7 @@ import mage.target.targetpointer.FixedTarget; public class MirrorMockery extends CardImpl { public MirrorMockery(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}"); this.subtype.add(SubType.AURA); // Enchant creature @@ -83,7 +83,7 @@ class MirrorMockeryEffect extends OneShotEffect { public MirrorMockeryEffect() { super(Outcome.Benefit); - this.staticText = "you may create a token that's a copy of that creature. Exile that token at the end of combat"; + this.staticText = "you may create a token that's a copy of that creature. Exile that token at end of combat"; } public MirrorMockeryEffect(final MirrorMockeryEffect effect) { diff --git a/Mage.Sets/src/mage/cards/m/MirrorUniverse.java b/Mage.Sets/src/mage/cards/m/MirrorUniverse.java index fe8b1ba1416..aae1fd8ea1e 100644 --- a/Mage.Sets/src/mage/cards/m/MirrorUniverse.java +++ b/Mage.Sets/src/mage/cards/m/MirrorUniverse.java @@ -55,7 +55,7 @@ public class MirrorUniverse extends CardImpl { Zone.BATTLEFIELD, new ExchangeLifeTargetEffect(), new TapSourceCost(), - new IsStepCondition(PhaseStep.UPKEEP), + new IsStepCondition(PhaseStep.UPKEEP, true), null); ability.addCost(new SacrificeSourceCost()); ability.addTarget(new TargetOpponent()); diff --git a/Mage.Sets/src/mage/cards/m/MischievousQuanar.java b/Mage.Sets/src/mage/cards/m/MischievousQuanar.java index cb89d7fe413..646992201e8 100644 --- a/Mage.Sets/src/mage/cards/m/MischievousQuanar.java +++ b/Mage.Sets/src/mage/cards/m/MischievousQuanar.java @@ -53,19 +53,19 @@ import mage.target.TargetSpell; public class MischievousQuanar extends CardImpl { public MischievousQuanar(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}"); this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(3); // {3}{U}{U}: Turn Mischievous Quanar face down. Effect effect = new BecomesFaceDownCreatureEffect(Duration.Custom, BecomesFaceDownCreatureEffect.FaceDownType.MANUAL); - effect.setText("Turn Michievous Quanar face down. (It becomes a 2/2 creature.)"); + effect.setText("Turn {this} face down. (It becomes a 2/2 creature.)"); this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{3}{U}{U}"))); - + // Morph {1}{U}{U} this.addAbility(new MorphAbility(this, new ManaCostsImpl("{1}{U}{U}"))); - + // When Mischievous Quanar is turned face up, copy target instant or sorcery spell. You may choose new targets for that copy. Effect effect2 = new CopyTargetSpellEffect(); effect2.setText("copy target instant or sorcery spell. You may choose new targets for that copy"); diff --git a/Mage.Sets/src/mage/cards/m/MogissWarhound.java b/Mage.Sets/src/mage/cards/m/MogissWarhound.java index d4138b8534f..1d5ce89a0a0 100644 --- a/Mage.Sets/src/mage/cards/m/MogissWarhound.java +++ b/Mage.Sets/src/mage/cards/m/MogissWarhound.java @@ -51,7 +51,7 @@ import mage.constants.Zone; public class MogissWarhound extends CardImpl { public MogissWarhound(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{1}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{1}{R}"); this.subtype.add(SubType.HOUND); this.power = new MageInt(2); @@ -62,13 +62,13 @@ public class MogissWarhound extends CardImpl { // Mogis's Warhound attacks each turn if able. this.addAbility(new AttacksEachCombatStaticAbility()); // Enchanted creature gets +2/+2 and attacks each turn if able. - Effect effect = new BoostEnchantedEffect(2,2,Duration.WhileOnBattlefield); + Effect effect = new BoostEnchantedEffect(2, 2, Duration.WhileOnBattlefield); effect.setText("Enchanted creature gets +2/+2"); Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); effect = new AttacksIfAbleAttachedEffect(Duration.WhileOnBattlefield, AttachmentType.AURA); - effect.setText("and attacks each turn if able"); + effect.setText("and attacks each combat if able"); ability.addEffect(effect); - this.addAbility(ability); + this.addAbility(ability); } public MogissWarhound(final MogissWarhound card) { diff --git a/Mage.Sets/src/mage/cards/m/Molder.java b/Mage.Sets/src/mage/cards/m/Molder.java index 3969ed8f674..303dd0f33c6 100644 --- a/Mage.Sets/src/mage/cards/m/Molder.java +++ b/Mage.Sets/src/mage/cards/m/Molder.java @@ -49,17 +49,17 @@ import mage.target.TargetPermanent; public class Molder extends CardImpl { public Molder(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{X}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{X}{G}"); // Destroy target artifact or enchantment with converted mana cost X. It can't be regenerated. You gain X life. - this.getSpellAbility().addEffect(new DestroyTargetEffect()); + this.getSpellAbility().addEffect(new DestroyTargetEffect(true)); this.getSpellAbility().addTarget(new TargetPermanent(new FilterArtifactOrEnchantmentPermanent("artifact or enchantment with converted mana cost X"))); this.getSpellAbility().addEffect(new GainLifeEffect(new ManacostVariableValue())); } @Override public void adjustTargets(Ability ability, Game game) { - if(ability instanceof SpellAbility) { + if (ability instanceof SpellAbility) { ability.getTargets().clear(); int xValue = ability.getManaCostsToPay().getX(); FilterArtifactOrEnchantmentPermanent filter = new FilterArtifactOrEnchantmentPermanent("artifact or enchantment with converted mana cost X"); diff --git a/Mage.Sets/src/mage/cards/m/Moonhold.java b/Mage.Sets/src/mage/cards/m/Moonhold.java index 9c559325dfa..1c10f6a44a9 100644 --- a/Mage.Sets/src/mage/cards/m/Moonhold.java +++ b/Mage.Sets/src/mage/cards/m/Moonhold.java @@ -55,13 +55,13 @@ import mage.watchers.common.ManaSpentToCastWatcher; public class Moonhold extends CardImpl { public Moonhold(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{R/W}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{R/W}"); // Target player can't play land cards this turn if {R} was spent to cast Moonhold and can't play creature cards this turn if {W} was spent to cast it. ContinuousRuleModifyingEffect effect = new MoonholdEffect(); ContinuousRuleModifyingEffect effect2 = new MoonholdEffect2(); - effect.setText("Target player can't play land cards this turn if {R} was spent to cast {this} "); - effect2.setText("and can't play creature cards this turn if {W} was spent to cast it."); + effect.setText("Target player can't play lands this turn if {R} was spent to cast {this}"); + effect2.setText("and can't cast creature spells this turn if {W} was spent to cast it."); this.getSpellAbility().addEffect(new ConditionalContinuousRuleModifyingEffect( effect, new LockedInCondition(new ManaWasSpentCondition(ColoredManaSymbol.R)))); @@ -69,7 +69,7 @@ public class Moonhold extends CardImpl { effect2, new LockedInCondition(new ManaWasSpentCondition(ColoredManaSymbol.W)))); this.getSpellAbility().addTarget(new TargetPlayer()); - this.getSpellAbility().addEffect(new InfoEffect("(Do both if {R}{W} was spent.)")); + this.getSpellAbility().addEffect(new InfoEffect(" (Do both if {R}{W} was spent.)")); this.getSpellAbility().addWatcher(new ManaSpentToCastWatcher()); } diff --git a/Mage.Sets/src/mage/cards/m/MwonvuliAcidMoss.java b/Mage.Sets/src/mage/cards/m/MwonvuliAcidMoss.java index 0b59350e95c..e4d18bdc96e 100644 --- a/Mage.Sets/src/mage/cards/m/MwonvuliAcidMoss.java +++ b/Mage.Sets/src/mage/cards/m/MwonvuliAcidMoss.java @@ -46,14 +46,17 @@ import mage.target.common.TargetCardInLibrary; */ public class MwonvuliAcidMoss extends CardImpl { - public MwonvuliAcidMoss(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{G}{G}"); - - FilterLandCard filterForest = new FilterLandCard(); + private static final FilterLandCard filterForest = new FilterLandCard("Forest card"); + + static { filterForest.add(new SubtypePredicate(SubType.FOREST)); - + } + + public MwonvuliAcidMoss(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{G}{G}"); + // Destroy target land. Search your library for a Forest card and put that card onto the battlefield tapped. Then shuffle your library. - this.getSpellAbility().addEffect(new DestroyTargetEffect(true)); + this.getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellAbility().addTarget(new TargetPermanent(new FilterLandPermanent())); this.getSpellAbility().addEffect(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(filterForest), true, true)); } @@ -67,4 +70,3 @@ public class MwonvuliAcidMoss extends CardImpl { return new MwonvuliAcidMoss(this); } } - diff --git a/Mage.Sets/src/mage/cards/n/NessianGameWarden.java b/Mage.Sets/src/mage/cards/n/NessianGameWarden.java index fe78091f32e..9f6511ef2c2 100644 --- a/Mage.Sets/src/mage/cards/n/NessianGameWarden.java +++ b/Mage.Sets/src/mage/cards/n/NessianGameWarden.java @@ -57,7 +57,7 @@ import mage.target.TargetCard; public class NessianGameWarden extends CardImpl { public NessianGameWarden(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{G}"); this.subtype.add(SubType.BEAST); this.power = new MageInt(4); @@ -87,7 +87,7 @@ class NessianGameWardenEffect extends OneShotEffect { public NessianGameWardenEffect() { super(Outcome.DrawCard); - this.staticText = "look at the top X cards of your library, where X is the number of forests you control. You may reveal a creature card from among them and put it into your hand. Put the rest on the bottom of your library in any order"; + this.staticText = "look at the top X cards of your library, where X is the number of Forests you control. You may reveal a creature card from among them and put it into your hand. Put the rest on the bottom of your library in any order"; } public NessianGameWardenEffect(final NessianGameWardenEffect effect) { diff --git a/Mage.Sets/src/mage/cards/n/NightskyMimic.java b/Mage.Sets/src/mage/cards/n/NightskyMimic.java index a0e1832e991..268d86b9aef 100644 --- a/Mage.Sets/src/mage/cards/n/NightskyMimic.java +++ b/Mage.Sets/src/mage/cards/n/NightskyMimic.java @@ -58,10 +58,10 @@ public class NightskyMimic extends CardImpl { filter.add(new ColorPredicate(ObjectColor.BLACK)); } - private String rule = "Whenever you cast a spell that's both white and black, {this} has base power and toughness 4/4 until end of turn and gains flying until end of turn"; + private String rule = "Whenever you cast a spell that's both white and black, {this} has base power and toughness 4/4 until end of turn and gains flying until end of turn."; public NightskyMimic(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W/B}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W/B}"); this.subtype.add(SubType.SHAPESHIFTER); this.color.setBlack(true); diff --git a/Mage.Sets/src/mage/cards/n/NullProfusion.java b/Mage.Sets/src/mage/cards/n/NullProfusion.java index acfa8a026a7..d319c62a118 100644 --- a/Mage.Sets/src/mage/cards/n/NullProfusion.java +++ b/Mage.Sets/src/mage/cards/n/NullProfusion.java @@ -30,6 +30,7 @@ package mage.cards.n; import java.util.UUID; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.common.StaticValue; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.SkipDrawStepEffect; import mage.abilities.effects.common.continuous.MaximumHandSizeControllerEffect; @@ -38,6 +39,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.TargetController; import mage.constants.Zone; import mage.game.Game; import mage.game.events.GameEvent; @@ -50,16 +52,23 @@ import mage.game.events.GameEvent.EventType; public class NullProfusion extends CardImpl { public NullProfusion(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{B}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{B}{B}"); // Skip your draw step. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SkipDrawStepEffect())); - + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SkipDrawStepEffect())); + // Whenever you play a card, draw a card. this.addAbility(new NullProfusionTriggeredAbility()); - + // Your maximum hand size is two. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new MaximumHandSizeControllerEffect(2, Duration.WhileOnBattlefield, HandSizeModification.SET))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new MaximumHandSizeControllerEffect( + new StaticValue(2), + Duration.WhileOnBattlefield, + HandSizeModification.SET, + TargetController.YOU + ) + )); } public NullProfusion(final NullProfusion card) { @@ -73,15 +82,15 @@ public class NullProfusion extends CardImpl { } class NullProfusionTriggeredAbility extends TriggeredAbilityImpl { - + NullProfusionTriggeredAbility() { super(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), false); } - + NullProfusionTriggeredAbility(final NullProfusionTriggeredAbility ability) { super(ability); } - + @Override public NullProfusionTriggeredAbility copy() { return new NullProfusionTriggeredAbility(this); @@ -91,14 +100,14 @@ class NullProfusionTriggeredAbility extends TriggeredAbilityImpl { public boolean checkEventType(GameEvent event, Game game) { return event.getType() == EventType.SPELL_CAST || event.getType() == EventType.LAND_PLAYED; } - + @Override public boolean checkTrigger(GameEvent event, Game game) { return event.getPlayerId().equals(this.getControllerId()); } - + @Override public String getRule() { return "Whenever you play a card, draw a card."; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/o/OjutaiExemplars.java b/Mage.Sets/src/mage/cards/o/OjutaiExemplars.java index 74717e6e7cc..49a334ddfdc 100644 --- a/Mage.Sets/src/mage/cards/o/OjutaiExemplars.java +++ b/Mage.Sets/src/mage/cards/o/OjutaiExemplars.java @@ -58,7 +58,7 @@ import mage.target.common.TargetCreaturePermanent; * @author fireshoes */ public class OjutaiExemplars extends CardImpl { - + private static final FilterSpell filter = new FilterSpell("a noncreature spell"); static { @@ -66,7 +66,7 @@ public class OjutaiExemplars extends CardImpl { } public OjutaiExemplars(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{W}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.MONK); this.power = new MageInt(4); @@ -75,22 +75,22 @@ public class OjutaiExemplars extends CardImpl { // Whenever you cast a noncreature spell, choose one - Tap target creature; Ability ability = new SpellCastControllerTriggeredAbility(new TapTargetEffect(), filter, false); ability.addTarget(new TargetCreaturePermanent()); - + // Ojutai Exemplars gain first strike and lifelink until end of turn; Mode mode = new Mode(); Effect effect = new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn); effect.setText("{this} gains first strike"); mode.getEffects().add(effect); Effect effect2 = new GainAbilitySourceEffect(LifelinkAbility.getInstance(), Duration.EndOfTurn); - effect2.setText("and lifelink"); + effect2.setText("and lifelink until end of turn"); mode.getEffects().add(effect2); ability.addMode(mode); - + // or Exile Ojutai Exemplars, then return it to the battlefield tapped under its owner's control. mode = new Mode(); mode.getEffects().add(new OjutaiExemplarsEffect()); ability.addMode(mode); - + this.addAbility(ability); } @@ -133,4 +133,4 @@ class OjutaiExemplarsEffect extends OneShotEffect { } return false; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/o/OneWithNature.java b/Mage.Sets/src/mage/cards/o/OneWithNature.java index 55c0e36dab9..6f4e7097f9e 100644 --- a/Mage.Sets/src/mage/cards/o/OneWithNature.java +++ b/Mage.Sets/src/mage/cards/o/OneWithNature.java @@ -52,7 +52,7 @@ import java.util.UUID; public class OneWithNature extends CardImpl { public OneWithNature(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{G}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{G}"); this.subtype.add(SubType.AURA); // Enchant creature @@ -61,12 +61,13 @@ public class OneWithNature extends CardImpl { this.getSpellAbility().addEffect(new AttachEffect(Outcome.PutLandInPlay)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); - + // Whenever enchanted creature deals combat damage to a player, you may search your library for a basic land card, put that card onto the battlefield tapped, then shuffle your library. ability = new DealsDamageToAPlayerAttachedTriggeredAbility( - new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true, Outcome.PutLandInPlay), + new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true, Outcome.PutLandInPlay) + .setText("you may search your library for a basic land card, put that card onto the battlefield tapped, then shuffle your library."), "enchanted creature", true, false, true, TargetController.ANY); - this.addAbility(ability); + this.addAbility(ability); } public OneWithNature(final OneWithNature card) { diff --git a/Mage.Sets/src/mage/cards/o/OrderedMigration.java b/Mage.Sets/src/mage/cards/o/OrderedMigration.java index 179b6d6e62f..ee18b8acf76 100644 --- a/Mage.Sets/src/mage/cards/o/OrderedMigration.java +++ b/Mage.Sets/src/mage/cards/o/OrderedMigration.java @@ -32,6 +32,7 @@ import mage.abilities.dynamicvalue.common.DomainValue; import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; +import mage.constants.AbilityWord; import mage.constants.CardType; import mage.game.permanent.token.OrderedMigrationBirdToken; @@ -47,6 +48,7 @@ public class OrderedMigration extends CardImpl { // Domain - Create a 1/1 blue Bird creature token with flying for each basic land type among lands you control. this.getSpellAbility().addEffect(new CreateTokenEffect(new OrderedMigrationBirdToken(), new DomainValue())); + this.getSpellAbility().setAbilityWord(AbilityWord.DOMAIN); } public OrderedMigration(final OrderedMigration card) { diff --git a/Mage.Sets/src/mage/cards/o/Overload.java b/Mage.Sets/src/mage/cards/o/Overload.java index 3913a90d2ed..6e956bb8f7b 100644 --- a/Mage.Sets/src/mage/cards/o/Overload.java +++ b/Mage.Sets/src/mage/cards/o/Overload.java @@ -29,17 +29,17 @@ package mage.cards.o; import java.util.UUID; import mage.abilities.Ability; -import mage.abilities.SpellAbility; import mage.abilities.condition.common.KickedCondition; +import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; -import mage.filter.common.FilterArtifactPermanent; -import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; +import mage.constants.Outcome; import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; import mage.target.common.TargetArtifactPermanent; /** @@ -48,32 +48,15 @@ import mage.target.common.TargetArtifactPermanent; */ public class Overload extends CardImpl { - private static final FilterArtifactPermanent filter2 = new FilterArtifactPermanent("artifact if its converted mana cost is 2 or less"); - private static final FilterArtifactPermanent filter5 = new FilterArtifactPermanent("artifact if its converted mana cost is 5 or less"); - - static { - filter2.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 3)); - filter5.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 5)); - } - public Overload(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R}"); // Kicker {2} this.addAbility(new KickerAbility("{2}")); + // Destroy target artifact if its converted mana cost is 2 or less. If Overload was kicked, destroy that artifact if its converted mana cost is 5 or less instead. this.getSpellAbility().addEffect(new DestroyTargetEffect()); - this.getSpellAbility().addTarget(new TargetArtifactPermanent(filter5)); - } - - @Override - public void adjustTargets(Ability ability, Game game) { - if(ability instanceof SpellAbility) { - if(!KickedCondition.instance.apply(game, ability)) { - ability.getTargets().clear(); - ability.getTargets().add(new TargetArtifactPermanent(filter2)); - } - } + this.getSpellAbility().addTarget(new TargetArtifactPermanent()); } public Overload(final Overload card) { @@ -85,3 +68,36 @@ public class Overload extends CardImpl { return new Overload(this); } } + +class OverloadEffect extends OneShotEffect { + + OverloadEffect() { + super(Outcome.DestroyPermanent); + this.staticText = "Destroy target artifact if its converted mana cost is 2 or less. If {this} was kicked, destroy that artifact if its converted mana cost is 5 or less instead."; + } + + OverloadEffect(final OverloadEffect effect) { + super(effect); + } + + @Override + public OverloadEffect copy() { + return new OverloadEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Permanent targetArtifact = game.getPermanent(this.getTargetPointer().getFirst(game, source)); + if (targetArtifact != null) { + int cmc = targetArtifact.getConvertedManaCost(); + if (cmc <= 2 || (KickedCondition.instance.apply(game, source) && cmc <= 5)) { + targetArtifact.destroy(source.getSourceId(), game, false); + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/o/Ovinize.java b/Mage.Sets/src/mage/cards/o/Ovinize.java index a69bc20af05..6c9af1d7dc5 100644 --- a/Mage.Sets/src/mage/cards/o/Ovinize.java +++ b/Mage.Sets/src/mage/cards/o/Ovinize.java @@ -40,16 +40,19 @@ import mage.target.common.TargetCreaturePermanent; /** * * @author LoneFox - + * */ public class Ovinize extends CardImpl { public Ovinize(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}"); // Target creature loses all abilities and becomes 0/1 until end of turn. this.getSpellAbility().addTarget(new TargetCreaturePermanent()); - this.getSpellAbility().addEffect(new LoseAllAbilitiesTargetEffect(Duration.EndOfTurn)); + this.getSpellAbility().addEffect( + new LoseAllAbilitiesTargetEffect(Duration.EndOfTurn) + .setText("Until end of turn, target creature loses all abilities") + ); Effect effect = new SetPowerToughnessTargetEffect(0, 1, Duration.EndOfTurn); effect.setText("and has base power and toughness 0/1"); this.getSpellAbility().addEffect(effect); diff --git a/Mage.Sets/src/mage/cards/p/PendelhavenElder.java b/Mage.Sets/src/mage/cards/p/PendelhavenElder.java index f35e1bdf70f..ea1ff6e889c 100644 --- a/Mage.Sets/src/mage/cards/p/PendelhavenElder.java +++ b/Mage.Sets/src/mage/cards/p/PendelhavenElder.java @@ -52,6 +52,7 @@ import mage.filter.predicate.permanent.ControllerPredicate; public class PendelhavenElder extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("each 1/1 creature you control"); + static { filter.add(new PowerPredicate(ComparisonType.EQUAL_TO, 1)); filter.add(new ToughnessPredicate(ComparisonType.EQUAL_TO, 1)); @@ -59,14 +60,17 @@ public class PendelhavenElder extends CardImpl { } public PendelhavenElder(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); this.subtype.add(SubType.ELF); this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); // {tap}: Each 1/1 creature you control gets +1/+2 until end of turn. - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostAllEffect(1, 2, Duration.EndOfTurn, filter, false), new TapSourceCost())); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostAllEffect(1, 2, Duration.EndOfTurn, filter, false) + .setText("Each 1/1 creature you control gets +1/+2 until end of turn."), + new TapSourceCost() + )); } public PendelhavenElder(final PendelhavenElder card) { diff --git a/Mage.Sets/src/mage/cards/p/PharikaGodOfAffliction.java b/Mage.Sets/src/mage/cards/p/PharikaGodOfAffliction.java index 44d0bafbb68..1314189669f 100644 --- a/Mage.Sets/src/mage/cards/p/PharikaGodOfAffliction.java +++ b/Mage.Sets/src/mage/cards/p/PharikaGodOfAffliction.java @@ -91,7 +91,7 @@ class PharikaExileEffect extends OneShotEffect { public PharikaExileEffect() { super(Outcome.PutCreatureInPlay); - staticText = "Exile target creature card from a graveyard. It's owner creates a 1/1 black and green Snake enchantment creature token with deathtouch"; + staticText = "Exile target creature card from a graveyard. Its owner creates a 1/1 black and green Snake enchantment creature token with deathtouch"; } public PharikaExileEffect(final PharikaExileEffect effect) { diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianEtchings.java b/Mage.Sets/src/mage/cards/p/PhyrexianEtchings.java index 7734e59a99f..7c1aa549500 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianEtchings.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianEtchings.java @@ -28,11 +28,9 @@ package mage.cards.p; import java.util.UUID; -import mage.MageInt; import mage.abilities.common.BeginningOfYourEndStepTriggeredAbility; import mage.abilities.common.PutIntoGraveFromBattlefieldSourceTriggeredAbility; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.MultipliedValue; import mage.abilities.dynamicvalue.common.CountersSourceCount; import mage.abilities.effects.common.DrawCardSourceControllerEffect; @@ -59,7 +57,9 @@ public class PhyrexianEtchings extends CardImpl { this.addAbility(new BeginningOfYourEndStepTriggeredAbility(new DrawCardSourceControllerEffect(new CountersSourceCount(CounterType.AGE)), false)); // When Phyrexian Etchings is put into a graveyard from the battlefield, you lose 2 life for each age counter on it. - this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new LoseLifeSourceControllerEffect(new MultipliedValue(new CountersSourceCount(CounterType.AGE), 2)))); + this.addAbility(new PutIntoGraveFromBattlefieldSourceTriggeredAbility(new LoseLifeSourceControllerEffect(new MultipliedValue(new CountersSourceCount(CounterType.AGE), 2)) + .setText("you lose 2 life for each age counter on it") + )); } public PhyrexianEtchings(final PhyrexianEtchings card) { diff --git a/Mage.Sets/src/mage/cards/p/PhyrexianTyranny.java b/Mage.Sets/src/mage/cards/p/PhyrexianTyranny.java index 92d11254b4d..4816a99a9e5 100644 --- a/Mage.Sets/src/mage/cards/p/PhyrexianTyranny.java +++ b/Mage.Sets/src/mage/cards/p/PhyrexianTyranny.java @@ -100,7 +100,7 @@ class PhyrexianTyrannyTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "Whenever a player draws a card, that player loses 2 life unless he or she pays {2}"; + return "Whenever a player draws a card, that player loses 2 life unless he or she pays {2}."; } } diff --git a/Mage.Sets/src/mage/cards/p/PoulticeSliver.java b/Mage.Sets/src/mage/cards/p/PoulticeSliver.java index 4d7cf354c92..079aab0ce43 100644 --- a/Mage.Sets/src/mage/cards/p/PoulticeSliver.java +++ b/Mage.Sets/src/mage/cards/p/PoulticeSliver.java @@ -66,7 +66,7 @@ public class PoulticeSliver extends CardImpl { this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(ability, Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_SLIVERS, - "Slivers have \"{2}, {T}: Regenerate target Sliver.\""))); + "All Slivers have \"{2}, {T}: Regenerate target Sliver.\""))); } public PoulticeSliver(final PoulticeSliver card) { diff --git a/Mage.Sets/src/mage/cards/p/PowerArmor.java b/Mage.Sets/src/mage/cards/p/PowerArmor.java index 11fce7c8cac..ae96023b0f1 100644 --- a/Mage.Sets/src/mage/cards/p/PowerArmor.java +++ b/Mage.Sets/src/mage/cards/p/PowerArmor.java @@ -36,6 +36,7 @@ import mage.abilities.dynamicvalue.common.DomainValue; import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; +import mage.constants.AbilityWord; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Zone; @@ -48,13 +49,14 @@ import mage.target.common.TargetCreaturePermanent; public class PowerArmor extends CardImpl { public PowerArmor(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); // Domain - {3}, {tap}: Target creature gets +1/+1 until end of turn for each basic land type among lands you control. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect( new DomainValue(), new DomainValue(), Duration.EndOfTurn), new TapSourceCost()); ability.addCost(new ManaCostsImpl("{3}")); ability.addTarget(new TargetCreaturePermanent()); + ability.setAbilityWord(AbilityWord.DOMAIN); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/p/PriestOfTheWakeningSun.java b/Mage.Sets/src/mage/cards/p/PriestOfTheWakeningSun.java index 7e40ff57213..6abcebba751 100644 --- a/Mage.Sets/src/mage/cards/p/PriestOfTheWakeningSun.java +++ b/Mage.Sets/src/mage/cards/p/PriestOfTheWakeningSun.java @@ -59,7 +59,7 @@ import mage.target.common.TargetCardInLibrary; */ public class PriestOfTheWakeningSun extends CardImpl { - private static final FilterCard filter = new FilterCard("a Dinosaur card"); + private static final FilterCard filter = new FilterCard("Dinosaur card"); static { filter.add(new SubtypePredicate(SubType.DINOSAUR)); diff --git a/Mage.Sets/src/mage/cards/p/PrismaticGeoscope.java b/Mage.Sets/src/mage/cards/p/PrismaticGeoscope.java index 181e72eae54..eaf69c3c93c 100644 --- a/Mage.Sets/src/mage/cards/p/PrismaticGeoscope.java +++ b/Mage.Sets/src/mage/cards/p/PrismaticGeoscope.java @@ -29,19 +29,20 @@ package mage.cards.p; import java.util.UUID; import mage.Mana; +import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.dynamicvalue.common.DomainValue; import mage.abilities.mana.DynamicManaAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; +import mage.constants.AbilityWord; import mage.constants.CardType; /** * * @author fireshoes */ - public class PrismaticGeoscope extends CardImpl { public PrismaticGeoscope(UUID ownerId, CardSetInfo setInfo) { @@ -51,8 +52,13 @@ public class PrismaticGeoscope extends CardImpl { this.addAbility(new EntersBattlefieldTappedAbility()); // Domain — {T}: Add X mana in any combination of colors to your mana pool, where X is the number of basic land types among lands you control. - this.addAbility(new DynamicManaAbility(new Mana(0,0,0,0,0,0,1, 0), new DomainValue(), new TapSourceCost(), - "Add X mana in any combination of colors to your mana pool, where X is the number of basic land types among lands you control.")); + Ability ability = new DynamicManaAbility( + new Mana(0, 0, 0, 0, 0, 0, 1, 0), new DomainValue(), new TapSourceCost(), + "Add X mana in any combination of colors to your mana pool," + + " where X is the number of basic land types among lands you control." + ); + ability.setAbilityWord(AbilityWord.DOMAIN); + this.addAbility(ability); } public PrismaticGeoscope(final PrismaticGeoscope card) { diff --git a/Mage.Sets/src/mage/cards/p/PrisonBarricade.java b/Mage.Sets/src/mage/cards/p/PrisonBarricade.java index c5f63fd01ae..1e9e12b7c35 100644 --- a/Mage.Sets/src/mage/cards/p/PrisonBarricade.java +++ b/Mage.Sets/src/mage/cards/p/PrisonBarricade.java @@ -46,26 +46,28 @@ import mage.counters.CounterType; /** * * @author LoneFox - + * */ public class PrisonBarricade extends CardImpl { public PrisonBarricade(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); this.subtype.add(SubType.WALL); this.power = new MageInt(1); this.toughness = new MageInt(3); - // Defender - this.addAbility(DefenderAbility.getInstance()); // Kicker {1}{W} this.addAbility(new KickerAbility("{1}{W}")); + + // Defender + this.addAbility(DefenderAbility.getInstance()); + // If Prison Barricade was kicked, it enters the battlefield with a +1/+1 counter on it and with "Prison Barricade can attack as though it didn't have defender." Ability ability = new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(1)), - KickedCondition.instance, "If {this} was kicked, it enters the battlefield with a +1/+1 counter on it and with \"{this} can attack as though it didn't have defender.\"", ""); + KickedCondition.instance, "If {this} was kicked, it enters the battlefield with a +1/+1 counter on it and with \"{this} can attack as though it didn't have defender.\"", ""); ability.addEffect(new CanAttackAsThoughItDidntHaveDefenderSourceEffect(Duration.WhileOnBattlefield)); this.addAbility(ability); - } + } public PrisonBarricade(final PrisonBarricade card) { super(card); diff --git a/Mage.Sets/src/mage/cards/p/Probe.java b/Mage.Sets/src/mage/cards/p/Probe.java index 9430f0c0da2..35f7b37351c 100644 --- a/Mage.Sets/src/mage/cards/p/Probe.java +++ b/Mage.Sets/src/mage/cards/p/Probe.java @@ -48,17 +48,17 @@ import mage.target.TargetPlayer; public class Probe extends CardImpl { public Probe(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{U}"); // Kicker {1}{B} this.addAbility(new KickerAbility("{1}{B}")); // Draw three cards, then discard two cards. - this.getSpellAbility().addEffect(new DrawDiscardControllerEffect(3,2)); + this.getSpellAbility().addEffect(new DrawDiscardControllerEffect(3, 2)); // If Probe was kicked, target player discards two cards. this.getSpellAbility().addEffect(new ConditionalOneShotEffect( - new DiscardTargetEffect(2), - KickedCondition.instance, - "If {this} was kicked, target player discards two cards")); + new DiscardTargetEffect(2), + KickedCondition.instance, + "

If {this} was kicked, target player discards two cards")); } @Override @@ -70,7 +70,7 @@ public class Probe extends CardImpl { } } } - + public Probe(final Probe card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/p/Prohibit.java b/Mage.Sets/src/mage/cards/p/Prohibit.java index f7d8641138a..1fe93900788 100644 --- a/Mage.Sets/src/mage/cards/p/Prohibit.java +++ b/Mage.Sets/src/mage/cards/p/Prohibit.java @@ -29,17 +29,17 @@ package mage.cards.p; import java.util.UUID; import mage.abilities.Ability; -import mage.abilities.SpellAbility; import mage.abilities.condition.common.KickedCondition; +import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.CounterTargetEffect; import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ComparisonType; -import mage.filter.FilterSpell; -import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; +import mage.constants.Outcome; import mage.game.Game; +import mage.game.stack.Spell; +import mage.players.Player; import mage.target.TargetSpell; /** @@ -48,34 +48,15 @@ import mage.target.TargetSpell; */ public class Prohibit extends CardImpl { - private static final FilterSpell filter2 = new FilterSpell("spell if its converted mana cost is 2 or less"); - private static final FilterSpell filter4 = new FilterSpell("spell if its converted mana cost is 4 or less"); - - static { - filter2.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 3)); - filter4.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, 5)); - } - public Prohibit(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}"); - + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}"); // Kicker {2} this.addAbility(new KickerAbility("{2}")); // Counter target spell if its converted mana cost is 2 or less. If Prohibit was kicked, counter that spell if its converted mana cost is 4 or less instead. this.getSpellAbility().addEffect(new CounterTargetEffect()); - this.getSpellAbility().addTarget(new TargetSpell(filter4)); - } - - @Override - public void adjustTargets(Ability ability, Game game) { - if (ability instanceof SpellAbility) { - if (!KickedCondition.instance.apply(game, ability)) { - ability.getTargets().clear(); - ability.getTargets().add(new TargetSpell(filter2)); - } - } + this.getSpellAbility().addTarget(new TargetSpell()); } public Prohibit(final Prohibit card) { @@ -87,3 +68,36 @@ public class Prohibit extends CardImpl { return new Prohibit(this); } } + +class OverloadEffect extends OneShotEffect { + + OverloadEffect() { + super(Outcome.DestroyPermanent); + this.staticText = "Counter target spell if its converted mana cost is 2 or less. If {this} was kicked, counter that spell if its converted mana cost is 4 or less instead."; + } + + OverloadEffect(final OverloadEffect effect) { + super(effect); + } + + @Override + public OverloadEffect copy() { + return new OverloadEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Spell targetSpell = game.getSpell(this.getTargetPointer().getFirst(game, source)); + if (targetSpell != null) { + int cmc = targetSpell.getConvertedManaCost(); + if (cmc <= 2 || (KickedCondition.instance.apply(game, source) && cmc <= 4)) { + targetSpell.counter(source.getSourceId(), game); + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/p/PropheticFlamespeaker.java b/Mage.Sets/src/mage/cards/p/PropheticFlamespeaker.java index 9755ae63acc..437e494cebb 100644 --- a/Mage.Sets/src/mage/cards/p/PropheticFlamespeaker.java +++ b/Mage.Sets/src/mage/cards/p/PropheticFlamespeaker.java @@ -58,7 +58,7 @@ import mage.target.targetpointer.FixedTarget; public class PropheticFlamespeaker extends CardImpl { public PropheticFlamespeaker(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{R}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.SHAMAN); @@ -87,7 +87,7 @@ class PropheticFlamespeakerExileEffect extends OneShotEffect { public PropheticFlamespeakerExileEffect() { super(Outcome.Detriment); - this.staticText = "Exile the top card of your library. You may play it this turn"; + this.staticText = "exile the top card of your library. You may play it this turn"; } public PropheticFlamespeakerExileEffect(final PropheticFlamespeakerExileEffect effect) { @@ -142,7 +142,7 @@ class PropheticFlamespeakerCastFromExileEffect extends AsThoughEffectImpl { @Override public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) { - return source.getControllerId().equals(affectedControllerId) && - objectId.equals(getTargetPointer().getFirst(game, source)); + return source.getControllerId().equals(affectedControllerId) + && objectId.equals(getTargetPointer().getFirst(game, source)); } } diff --git a/Mage.Sets/src/mage/cards/p/PunctureBlast.java b/Mage.Sets/src/mage/cards/p/PunctureBlast.java index 3e6bfc161d3..715e672a61b 100644 --- a/Mage.Sets/src/mage/cards/p/PunctureBlast.java +++ b/Mage.Sets/src/mage/cards/p/PunctureBlast.java @@ -41,11 +41,12 @@ import mage.target.common.TargetCreatureOrPlayer; public class PunctureBlast extends CardImpl { public PunctureBlast(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{R}"); this.addAbility(WitherAbility.getInstance()); this.getSpellAbility().addEffect(new DamageTargetEffect(3)); this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); + this.getSpellAbility().setRuleAtTheTop(false); } public PunctureBlast(final PunctureBlast card) { diff --git a/Mage.Sets/src/mage/cards/p/PyreZombie.java b/Mage.Sets/src/mage/cards/p/PyreZombie.java index 86200277bee..7dc04411240 100644 --- a/Mage.Sets/src/mage/cards/p/PyreZombie.java +++ b/Mage.Sets/src/mage/cards/p/PyreZombie.java @@ -52,15 +52,15 @@ import mage.target.common.TargetCreatureOrPlayer; public class PyreZombie extends CardImpl { public PyreZombie(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{R}"); this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(2); this.toughness = new MageInt(1); // At the beginning of your upkeep, if Pyre Zombie is in your graveyard, you may pay {1}{B}{B}. If you do, return Pyre Zombie to your hand. this.addAbility(new BeginningOfUpkeepTriggeredAbility(Zone.GRAVEYARD, - new DoIfCostPaid(new ReturnToHandSourceEffect(), new ManaCostsImpl("{1}{B}{B}")), - TargetController.YOU, false)); + new DoIfCostPaid(new ReturnToHandSourceEffect().setText("return {this} to your hand"), new ManaCostsImpl("{1}{B}{B}")), + TargetController.YOU, false)); // {1}{R}{R}, Sacrifice Pyre Zombie: Pyre Zombie deals 2 damage to target creature or player. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{1}{R}{R}")); ability.addCost(new SacrificeSourceCost()); diff --git a/Mage.Sets/src/mage/cards/q/QuicksilverDagger.java b/Mage.Sets/src/mage/cards/q/QuicksilverDagger.java index 7904d92d3ae..9da954dd660 100644 --- a/Mage.Sets/src/mage/cards/q/QuicksilverDagger.java +++ b/Mage.Sets/src/mage/cards/q/QuicksilverDagger.java @@ -41,6 +41,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.AttachmentType; import mage.constants.CardType; +import mage.constants.Duration; import mage.constants.SubType; import mage.constants.Outcome; import mage.constants.Zone; @@ -55,22 +56,24 @@ import mage.target.common.TargetCreaturePermanent; public class QuicksilverDagger extends CardImpl { public QuicksilverDagger(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}{R}"); this.subtype.add(SubType.AURA); - // Enchant creature TargetPermanent auraTarget = new TargetCreaturePermanent(); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.AddAbility)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); - + // Enchanted creature has "{tap}: This creature deals 1 damage to target player. You draw a card." Ability gainAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost()); gainAbility.addTarget(new TargetPlayer()); gainAbility.addEffect(new DrawCardSourceControllerEffect(1)); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(gainAbility, AttachmentType.AURA))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new GainAbilityAttachedEffect(gainAbility, AttachmentType.AURA, Duration.WhileOnBattlefield, + "Enchanted creature has \"{tap}: This creature deals 1 damage to target player. You draw a card.\"") + )); } public QuicksilverDagger(final QuicksilverDagger card) { diff --git a/Mage.Sets/src/mage/cards/q/QuirionTrailblazer.java b/Mage.Sets/src/mage/cards/q/QuirionTrailblazer.java index 24d7e351d20..ee26c88734d 100644 --- a/Mage.Sets/src/mage/cards/q/QuirionTrailblazer.java +++ b/Mage.Sets/src/mage/cards/q/QuirionTrailblazer.java @@ -36,7 +36,6 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.filter.StaticFilters; -import mage.filter.common.FilterBasicLandCard; import mage.target.common.TargetCardInLibrary; /** @@ -46,14 +45,14 @@ import mage.target.common.TargetCardInLibrary; public class QuirionTrailblazer extends CardImpl { public QuirionTrailblazer(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); this.subtype.add(SubType.ELF); this.subtype.add(SubType.SCOUT); this.power = new MageInt(1); this.toughness = new MageInt(2); // When Quirion Trailblazer enters the battlefield, you may search your library for a basic land card and put that card onto the battlefield tapped. If you do, shuffle your library. - this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true, true))); + this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_BASIC_LAND_CARD), true, true), true)); } public QuirionTrailblazer(final QuirionTrailblazer card) { diff --git a/Mage.Sets/src/mage/cards/r/RaidersWake.java b/Mage.Sets/src/mage/cards/r/RaidersWake.java index 8ac022dbdb5..0cfd603bf1b 100644 --- a/Mage.Sets/src/mage/cards/r/RaidersWake.java +++ b/Mage.Sets/src/mage/cards/r/RaidersWake.java @@ -58,7 +58,7 @@ public class RaidersWake extends CardImpl { // Raid — At the beginning of your end step, if you attacked with a creature this turn, target opponent discards a card. Ability ability = new ConditionalTriggeredAbility( new BeginningOfEndStepTriggeredAbility(new DiscardTargetEffect(1), TargetController.YOU, false), RaidCondition.instance, - "Raid - At the beginning of your end step, if you attacked with a creature this turn, target opponent discards a card"); + "Raid - At the beginning of your end step, if you attacked with a creature this turn, target opponent discards a card."); ability.addTarget(new TargetOpponent()); this.addAbility(ability, new PlayerAttackedWatcher()); } diff --git a/Mage.Sets/src/mage/cards/r/RavenGuildInitiate.java b/Mage.Sets/src/mage/cards/r/RavenGuildInitiate.java index 45441eb9e58..5269c61f266 100644 --- a/Mage.Sets/src/mage/cards/r/RavenGuildInitiate.java +++ b/Mage.Sets/src/mage/cards/r/RavenGuildInitiate.java @@ -45,7 +45,7 @@ import mage.target.common.TargetControlledPermanent; */ public class RavenGuildInitiate extends CardImpl { - private static final FilterControlledPermanent filter = new FilterControlledPermanent("Bird you control"); + private static final FilterControlledPermanent filter = new FilterControlledPermanent("a Bird"); static { filter.add(new SubtypePredicate(SubType.BIRD)); diff --git a/Mage.Sets/src/mage/cards/r/RazingSnidd.java b/Mage.Sets/src/mage/cards/r/RazingSnidd.java index f0aff98ea6e..6e66ea6cc69 100644 --- a/Mage.Sets/src/mage/cards/r/RazingSnidd.java +++ b/Mage.Sets/src/mage/cards/r/RazingSnidd.java @@ -45,7 +45,7 @@ import mage.filter.predicate.mageobject.ColorPredicate; /** * * @author LoneFox - + * */ public class RazingSnidd extends CardImpl { @@ -56,7 +56,7 @@ public class RazingSnidd extends CardImpl { } public RazingSnidd(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}{R}"); this.subtype.add(SubType.BEAST); this.power = new MageInt(3); this.toughness = new MageInt(3); @@ -64,7 +64,7 @@ public class RazingSnidd extends CardImpl { // When Razing Snidd enters the battlefield, return a black or red creature you control to its owner's hand. this.addAbility(new EntersBattlefieldTriggeredAbility(new ReturnToHandChosenControlledPermanentEffect(filter), false)); // When Razing Snidd enters the battlefield, each player sacrifices a land. - this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeAllEffect(1, new FilterControlledLandPermanent("a land")), false)); + this.addAbility(new EntersBattlefieldTriggeredAbility(new SacrificeAllEffect(1, new FilterControlledLandPermanent("land")), false)); } public RazingSnidd(final RazingSnidd card) { diff --git a/Mage.Sets/src/mage/cards/r/ReapingTheGraves.java b/Mage.Sets/src/mage/cards/r/ReapingTheGraves.java index 03fcbeb2455..070b57e6864 100644 --- a/Mage.Sets/src/mage/cards/r/ReapingTheGraves.java +++ b/Mage.Sets/src/mage/cards/r/ReapingTheGraves.java @@ -43,12 +43,11 @@ import mage.target.common.TargetCardInYourGraveyard; public class ReapingTheGraves extends CardImpl { public ReapingTheGraves(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{B}"); - + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{B}"); // Return target creature card from your graveyard to your hand. this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(new FilterCreatureCard("creature card from your graveyard"))); - this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); + this.getSpellAbility().addEffect(new ReturnToHandTargetEffect().setText("Return target creature card from your graveyard to your hand.")); // Storm this.addAbility(new StormAbility()); } diff --git a/Mage.Sets/src/mage/cards/r/ReapingTheRewards.java b/Mage.Sets/src/mage/cards/r/ReapingTheRewards.java index 848f6ca74b4..f46924f5b50 100644 --- a/Mage.Sets/src/mage/cards/r/ReapingTheRewards.java +++ b/Mage.Sets/src/mage/cards/r/ReapingTheRewards.java @@ -44,11 +44,11 @@ import mage.target.common.TargetControlledPermanent; public class ReapingTheRewards extends CardImpl { public ReapingTheRewards(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{W}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{W}"); // Buyback-Sacrifice a land. - this.addAbility(new BuybackAbility(new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledLandPermanent())))); - + this.addAbility(new BuybackAbility(new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledLandPermanent("a land"))))); + // You gain 2 life. this.getSpellAbility().addEffect(new GainLifeEffect(2)); } diff --git a/Mage.Sets/src/mage/cards/r/RecklessOgre.java b/Mage.Sets/src/mage/cards/r/RecklessOgre.java index b21dc15a7d6..59d93a7e8c0 100644 --- a/Mage.Sets/src/mage/cards/r/RecklessOgre.java +++ b/Mage.Sets/src/mage/cards/r/RecklessOgre.java @@ -44,13 +44,13 @@ import mage.constants.Duration; public class RecklessOgre extends CardImpl { public RecklessOgre(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); this.subtype.add(SubType.OGRE); this.power = new MageInt(3); this.toughness = new MageInt(2); // Whenever Reckless Ogre attacks alone, it gets +3/+0 until end of turn. - this.addAbility(new AttacksAloneTriggeredAbility(new BoostSourceEffect(3, 0, Duration.EndOfTurn))); + this.addAbility(new AttacksAloneTriggeredAbility(new BoostSourceEffect(3, 0, Duration.EndOfTurn).setText("it gets +3/+0 until end of turn"))); } public RecklessOgre(final RecklessOgre card) { diff --git a/Mage.Sets/src/mage/cards/r/RedManaBattery.java b/Mage.Sets/src/mage/cards/r/RedManaBattery.java index 2b6fbe11d03..e661c113598 100644 --- a/Mage.Sets/src/mage/cards/r/RedManaBattery.java +++ b/Mage.Sets/src/mage/cards/r/RedManaBattery.java @@ -64,10 +64,10 @@ public class RedManaBattery extends CardImpl { Mana.RedMana(1), new IntPlusDynamicValue(1, new RemovedCountersForCostValue()), new TapSourceCost(), - "Add {R} to your mana pool, then add {R} to your mana pool for each storage counter removed this way", - true, new CountersSourceCount(CounterType.STORAGE)); - ability.addCost(new RemoveVariableCountersSourceCost(CounterType.STORAGE.createInstance(), - "Remove X storage counters from {this}")); + "Add {R} to your mana pool, then add {R} to your mana pool for each charge counter removed this way", + true, new CountersSourceCount(CounterType.CHARGE)); + ability.addCost(new RemoveVariableCountersSourceCost(CounterType.CHARGE.createInstance(), + "Remove any number of charge counters from {this}")); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/r/RegisaurAlpha.java b/Mage.Sets/src/mage/cards/r/RegisaurAlpha.java index e73c5e301f0..fb603c77ebd 100644 --- a/Mage.Sets/src/mage/cards/r/RegisaurAlpha.java +++ b/Mage.Sets/src/mage/cards/r/RegisaurAlpha.java @@ -52,7 +52,7 @@ import mage.game.permanent.token.DinosaurToken; */ public class RegisaurAlpha extends CardImpl { - private static final FilterPermanent filter = new FilterPermanent("other Dinosaurss you control"); + private static final FilterPermanent filter = new FilterPermanent("Dinosaurs"); static { filter.add(new SubtypePredicate(SubType.DINOSAUR)); diff --git a/Mage.Sets/src/mage/cards/r/Reiterate.java b/Mage.Sets/src/mage/cards/r/Reiterate.java index a2b8feeeba3..867267f8f29 100644 --- a/Mage.Sets/src/mage/cards/r/Reiterate.java +++ b/Mage.Sets/src/mage/cards/r/Reiterate.java @@ -33,9 +33,7 @@ import mage.abilities.keyword.BuybackAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.filter.FilterSpell; -import mage.filter.predicate.Predicates; -import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.filter.StaticFilters; import mage.target.TargetSpell; /** @@ -43,23 +41,15 @@ import mage.target.TargetSpell; * @author fireshoes */ public class Reiterate extends CardImpl { - - private static final FilterSpell filter = new FilterSpell(); - - static { - filter.add(Predicates.or( - new CardTypePredicate(CardType.INSTANT), - new CardTypePredicate(CardType.SORCERY))); - } public Reiterate(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{R}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}{R}"); // Buyback {3} this.addAbility(new BuybackAbility("{3}")); - + // 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_INSTANT_OR_SORCERY_SPELL)); this.getSpellAbility().addEffect(new CopyTargetSpellEffect()); } diff --git a/Mage.Sets/src/mage/cards/r/RekindledFlame.java b/Mage.Sets/src/mage/cards/r/RekindledFlame.java index a9896973ca1..c8fde664607 100644 --- a/Mage.Sets/src/mage/cards/r/RekindledFlame.java +++ b/Mage.Sets/src/mage/cards/r/RekindledFlame.java @@ -31,7 +31,7 @@ import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.condition.Condition; -import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.decorator.ConditionalTriggeredAbility; import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.effects.common.ReturnSourceFromGraveyardToHandEffect; import mage.cards.CardImpl; @@ -48,22 +48,25 @@ import mage.target.common.TargetCreatureOrPlayer; * @author jeffwadsworth */ public class RekindledFlame extends CardImpl { - + static final String rule = "if an opponent has no cards in hand, you may return Rekindled Flame from your graveyard to your hand"; public RekindledFlame(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{R}{R}"); - + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{R}{R}"); // Rekindled Flame deals 4 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(4)); this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); - + // At the beginning of your upkeep, if an opponent has no cards in hand, you may return Rekindled Flame from your graveyard to your hand. - Ability ability = new BeginningOfUpkeepTriggeredAbility(Zone.GRAVEYARD, new ConditionalOneShotEffect(new ReturnSourceFromGraveyardToHandEffect(), new OpponentHasNoCardsInHandCondition(), rule), TargetController.YOU, true); + Ability ability = new ConditionalTriggeredAbility( + new BeginningOfUpkeepTriggeredAbility( + Zone.GRAVEYARD, new ReturnSourceFromGraveyardToHandEffect(), TargetController.YOU, true + ), + new OpponentHasNoCardsInHandCondition(), rule); ability.setRuleVisible(true); this.addAbility(ability); - + } public RekindledFlame(final RekindledFlame card) { @@ -91,4 +94,4 @@ class OpponentHasNoCardsInHandCondition implements Condition { } return false; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/r/ReveilleSquad.java b/Mage.Sets/src/mage/cards/r/ReveilleSquad.java index 3c7aa5d44ce..fc79bb682b1 100644 --- a/Mage.Sets/src/mage/cards/r/ReveilleSquad.java +++ b/Mage.Sets/src/mage/cards/r/ReveilleSquad.java @@ -92,7 +92,12 @@ class ReveilleSquadTriggeredAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { - return game.getCombat().getDefenders().contains(controllerId); + for (UUID attackerId : game.getCombat().getAttackers()) { + if (game.getCombat().getDefenderId(attackerId).equals(controllerId)) { + return true; + } + } + return false; } @Override diff --git a/Mage.Sets/src/mage/cards/r/RevelInRiches.java b/Mage.Sets/src/mage/cards/r/RevelInRiches.java index 2fde790bda0..3e757cb225b 100644 --- a/Mage.Sets/src/mage/cards/r/RevelInRiches.java +++ b/Mage.Sets/src/mage/cards/r/RevelInRiches.java @@ -53,7 +53,7 @@ import mage.game.permanent.token.TreasureToken; */ public class RevelInRiches extends CardImpl { - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature an opponent controls"); + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("a creature an opponent controls"); private static final FilterPermanent filter2 = new FilterPermanent("Treasures"); static { diff --git a/Mage.Sets/src/mage/cards/r/RewardTheFaithful.java b/Mage.Sets/src/mage/cards/r/RewardTheFaithful.java index a41add973c0..46eafe8f828 100644 --- a/Mage.Sets/src/mage/cards/r/RewardTheFaithful.java +++ b/Mage.Sets/src/mage/cards/r/RewardTheFaithful.java @@ -42,10 +42,11 @@ import mage.target.TargetPlayer; public class RewardTheFaithful extends CardImpl { public RewardTheFaithful(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{W}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{W}"); // Any number of target players each gain life equal to the highest converted mana cost among permanents you control. - this.getSpellAbility().addEffect(new GainLifeTargetEffect(new HighestConvertedManaCostValue())); + this.getSpellAbility().addEffect(new GainLifeTargetEffect(new HighestConvertedManaCostValue()) + .setText("Any number of target players each gain life equal to the highest converted mana cost among permanents you control.")); this.getSpellAbility().addTarget(new TargetPlayer(0, Integer.MAX_VALUE, false)); } diff --git a/Mage.Sets/src/mage/cards/r/RewardsOfDiversity.java b/Mage.Sets/src/mage/cards/r/RewardsOfDiversity.java index bfda5d16f03..48c4854bb8f 100644 --- a/Mage.Sets/src/mage/cards/r/RewardsOfDiversity.java +++ b/Mage.Sets/src/mage/cards/r/RewardsOfDiversity.java @@ -44,7 +44,7 @@ import mage.filter.predicate.permanent.ControllerPredicate; */ public class RewardsOfDiversity extends CardImpl { - private static final FilterSpell filter = new FilterSpell("multicolored spell"); + private static final FilterSpell filter = new FilterSpell("a multicolored spell"); static { filter.add(new ControllerPredicate(TargetController.OPPONENT)); @@ -52,7 +52,7 @@ public class RewardsOfDiversity extends CardImpl { } public RewardsOfDiversity(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}"); // Whenever an opponent casts a multicolored spell, you gain 4 life. this.addAbility(new SpellCastOpponentTriggeredAbility(new GainLifeEffect(4), filter, false)); diff --git a/Mage.Sets/src/mage/cards/r/RiggingRunner.java b/Mage.Sets/src/mage/cards/r/RiggingRunner.java index 9b6576fa95b..b60adefa57c 100644 --- a/Mage.Sets/src/mage/cards/r/RiggingRunner.java +++ b/Mage.Sets/src/mage/cards/r/RiggingRunner.java @@ -60,7 +60,7 @@ public class RiggingRunner extends CardImpl { // Raid — Rigging Runner enters the battlefield with a +1/+1 counter on it if you attacked with a creature this turn. this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(1), false), RaidCondition.instance, - "Raid — {this} enters the battlefield with a +1/+1 counter on it if you attacked with a creature this turn", + "Raid — {this} enters the battlefield with a +1/+1 counter on it if you attacked with a creature this turn.", "{this} enters the battlefield with a +1/+1 counter"), new PlayerAttackedWatcher()); } diff --git a/Mage.Sets/src/mage/cards/r/RimefeatherOwl.java b/Mage.Sets/src/mage/cards/r/RimefeatherOwl.java index 9e89292b850..0ffb468b39f 100644 --- a/Mage.Sets/src/mage/cards/r/RimefeatherOwl.java +++ b/Mage.Sets/src/mage/cards/r/RimefeatherOwl.java @@ -87,7 +87,12 @@ public class RimefeatherOwl extends CardImpl { this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new PermanentsOnBattlefieldCount(filter2), Duration.EndOfGame))); // {1}{snow}: Put an ice counter on target permanent. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.ICE.createInstance()), new ManaCostsImpl("{1}{S}")); + Ability ability = new SimpleActivatedAbility( + Zone.BATTLEFIELD, + new AddCountersTargetEffect(CounterType.ICE.createInstance()) + .setText("Put an ice counter on target permanent."), + new ManaCostsImpl("{1}{S}") + ); ability.addTarget(new TargetPermanent()); this.addAbility(ability); @@ -135,6 +140,6 @@ class RimefeatherOwlEffect extends ContinuousEffectImpl { @Override public String getText(Mode mode) { - return "All nonland permanents are legendary"; + return "Permanents with ice counters on them are snow."; } } diff --git a/Mage.Sets/src/mage/cards/r/RiptideChimera.java b/Mage.Sets/src/mage/cards/r/RiptideChimera.java index 487b25e6ed6..a8cc3869ac7 100644 --- a/Mage.Sets/src/mage/cards/r/RiptideChimera.java +++ b/Mage.Sets/src/mage/cards/r/RiptideChimera.java @@ -48,14 +48,13 @@ import mage.filter.predicate.mageobject.CardTypePredicate; public class RiptideChimera extends CardImpl { private static final FilterControlledPermanent filter = new FilterControlledPermanent("an enchantment you control"); - + static { filter.add(new CardTypePredicate(CardType.ENCHANTMENT)); } - - + public RiptideChimera(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{2}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{2}{U}"); this.subtype.add(SubType.CHIMERA); this.power = new MageInt(3); @@ -65,7 +64,7 @@ public class RiptideChimera extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // At the beginning of your upkeep, return an enchantment you control to its owner's hand. Effect effect = new ReturnToHandChosenControlledPermanentEffect(filter, 1); - effect.setText("return an enchanment you control to its owner's hand"); + effect.setText("return an enchantment you control to its owner's hand"); this.addAbility(new BeginningOfUpkeepTriggeredAbility(effect, TargetController.YOU, false)); } diff --git a/Mage.Sets/src/mage/cards/r/RisenExecutioner.java b/Mage.Sets/src/mage/cards/r/RisenExecutioner.java index 75ab550c546..0b5dcc205c2 100644 --- a/Mage.Sets/src/mage/cards/r/RisenExecutioner.java +++ b/Mage.Sets/src/mage/cards/r/RisenExecutioner.java @@ -53,15 +53,15 @@ import mage.util.CardUtil; * @author LevelX2 */ public class RisenExecutioner extends CardImpl { - + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Zombie creatures"); - + static { filter.add(new SubtypePredicate(SubType.ZOMBIE)); } - + public RisenExecutioner(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{B}"); this.subtype.add(SubType.ZOMBIE); this.subtype.add(SubType.WARRIOR); this.power = new MageInt(4); @@ -69,16 +69,16 @@ public class RisenExecutioner extends CardImpl { // Risen Executioner can't block. this.addAbility(new CantBlockAbility()); - + // Other Zombie creatures you control get +1/+1. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filter, true))); - + // You may cast Risen Executioner from your graveyard if you pay {1} more to cast it for each other creature card in your graveyard. // TODO: cost increase does not happen if Risen Executioner is cast grom graveyard because of other effects Ability ability = new SimpleStaticAbility(Zone.ALL, new RisenExecutionerCastEffect()); ability.addEffect(new RisenExecutionerCostIncreasingEffect()); this.addAbility(ability); - + } public RisenExecutioner(final RisenExecutioner card) { @@ -92,10 +92,10 @@ public class RisenExecutioner extends CardImpl { } class RisenExecutionerCastEffect extends AsThoughEffectImpl { - + RisenExecutionerCastEffect() { super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfGame, Outcome.Benefit); - staticText = "You may cast {this} from your graveyard"; + staticText = "You may cast {this} from your graveyard if you pay {1} more to cast it for each other creature card in your graveyard"; } RisenExecutionerCastEffect(final RisenExecutionerCastEffect effect) { @@ -116,8 +116,8 @@ class RisenExecutionerCastEffect extends AsThoughEffectImpl { public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) { if (sourceId.equals(source.getSourceId())) { Card card = game.getCard(source.getSourceId()); - if (card != null - && card.getOwnerId().equals(affectedControllerId) + if (card != null + && card.getOwnerId().equals(affectedControllerId) && game.getState().getZone(source.getSourceId()) == Zone.GRAVEYARD) { return true; } @@ -129,14 +129,14 @@ class RisenExecutionerCastEffect extends AsThoughEffectImpl { class RisenExecutionerCostIncreasingEffect extends CostModificationEffectImpl { protected static final FilterCreatureCard filter = new FilterCreatureCard(); - + static { filter.add(new AnotherCardPredicate()); } - - RisenExecutionerCostIncreasingEffect () { + + RisenExecutionerCostIncreasingEffect() { super(Duration.EndOfGame, Outcome.Benefit, CostModificationType.INCREASE_COST); - staticText = "if you pay {1} more to cast it for each other creature card in your graveyard"; + staticText = ""; } RisenExecutionerCostIncreasingEffect(final RisenExecutionerCostIncreasingEffect effect) { diff --git a/Mage.Sets/src/mage/cards/r/RitualOfTheReturned.java b/Mage.Sets/src/mage/cards/r/RitualOfTheReturned.java index 32466b5951a..5d59286f573 100644 --- a/Mage.Sets/src/mage/cards/r/RitualOfTheReturned.java +++ b/Mage.Sets/src/mage/cards/r/RitualOfTheReturned.java @@ -71,7 +71,7 @@ class RitualOfTheReturnedExileEffect extends OneShotEffect { public RitualOfTheReturnedExileEffect() { super(Outcome.PutCreatureInPlay); - this.staticText = "Exile target creature card from your graveyard. Create a black Zombie creature token with power equal to the exiled card's power and toughness equal to the exiled card's toughness"; + this.staticText = "Exile target creature card from your graveyard. Create a black Zombie creature token. Its power is equal to that card's power and its toughness is equal to that card's toughness."; } public RitualOfTheReturnedExileEffect(final RitualOfTheReturnedExileEffect effect) { diff --git a/Mage.Sets/src/mage/cards/r/RoilingHorror.java b/Mage.Sets/src/mage/cards/r/RoilingHorror.java index fe6d3c8f910..dcb8b43196a 100644 --- a/Mage.Sets/src/mage/cards/r/RoilingHorror.java +++ b/Mage.Sets/src/mage/cards/r/RoilingHorror.java @@ -59,18 +59,20 @@ import mage.target.TargetPlayer; public class RoilingHorror extends CardImpl { public RoilingHorror(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}"); this.subtype.add(SubType.HORROR); this.power = new MageInt(0); this.toughness = new MageInt(0); // Roiling Horror's power and toughness are each equal to your life total minus the life total of an opponent with the most life. - this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new RoilingHorrorDynamicValue(), Duration.EndOfGame))); + this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(new RoilingHorrorDynamicValue(), Duration.EndOfGame) + .setText("{this}'s power and toughness are each equal to your life total minus the life total of an opponent with the most life.") + )); // Suspend X-{X}{B}{B}{B}. X can't be 0. this.addAbility(new SuspendAbility(Integer.MAX_VALUE, new ManaCostsImpl("{B}{B}{B}"), this, true)); - + // Whenever a time counter is removed from Roiling Horror while it's exiled, target player loses 1 life and you gain 1 life. this.addAbility(new RoilingHorrorTriggeredAbility()); diff --git a/Mage.Sets/src/mage/cards/r/RonomUnicorn.java b/Mage.Sets/src/mage/cards/r/RonomUnicorn.java index bfcfb18f581..fe12934ca47 100644 --- a/Mage.Sets/src/mage/cards/r/RonomUnicorn.java +++ b/Mage.Sets/src/mage/cards/r/RonomUnicorn.java @@ -37,10 +37,9 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; -import mage.filter.StaticFilters; -import mage.target.TargetPermanent; import java.util.UUID; +import mage.target.common.TargetEnchantmentPermanent; /** * @@ -49,14 +48,14 @@ import java.util.UUID; public class RonomUnicorn extends CardImpl { public RonomUnicorn(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); this.subtype.add(SubType.UNICORN); this.power = new MageInt(2); this.toughness = new MageInt(2); // Sacrifice Ronom Unicorn: Destroy target enchantment. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new SacrificeSourceCost()); - ability.addTarget(new TargetPermanent(StaticFilters.ARTIFACT_OR_ENCHANTMENT_PERMANENT)); + ability.addTarget(new TargetEnchantmentPermanent()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/r/Rust.java b/Mage.Sets/src/mage/cards/r/Rust.java index c1f5f4edc94..21dd121bf95 100644 --- a/Mage.Sets/src/mage/cards/r/Rust.java +++ b/Mage.Sets/src/mage/cards/r/Rust.java @@ -46,7 +46,7 @@ import mage.target.common.TargetActivatedOrTriggeredAbility; */ public class Rust extends CardImpl { - private final static FilterStackObject filter = new FilterStackObject("ability from an artifact source"); + private final static FilterStackObject filter = new FilterStackObject("activated ability from an artifact source"); static { filter.add(new ArtifactSourcePredicate()); diff --git a/Mage.Sets/src/mage/cards/r/RuthlessKnave.java b/Mage.Sets/src/mage/cards/r/RuthlessKnave.java index c78724c8d22..96f7b85fdaa 100644 --- a/Mage.Sets/src/mage/cards/r/RuthlessKnave.java +++ b/Mage.Sets/src/mage/cards/r/RuthlessKnave.java @@ -53,7 +53,7 @@ import mage.target.common.TargetControlledPermanent; */ public class RuthlessKnave extends CardImpl { - private static final FilterControlledPermanent filter = new FilterControlledPermanent("three three Treasures"); + private static final FilterControlledPermanent filter = new FilterControlledPermanent("three Treasures"); static { filter.add(new SubtypePredicate(SubType.TREASURE)); diff --git a/Mage.Sets/src/mage/cards/s/SamitePilgrim.java b/Mage.Sets/src/mage/cards/s/SamitePilgrim.java index ab148f89a2d..8aa8e03e3fb 100644 --- a/Mage.Sets/src/mage/cards/s/SamitePilgrim.java +++ b/Mage.Sets/src/mage/cards/s/SamitePilgrim.java @@ -48,7 +48,7 @@ import mage.target.common.TargetCreaturePermanent; public class SamitePilgrim extends CardImpl { public SamitePilgrim(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); @@ -57,6 +57,7 @@ public class SamitePilgrim extends CardImpl { // Domain - {T}: Prevent the next X damage that would be dealt to target creature this turn, where X is the number of basic land types among lands you control. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SamitePilgrimPreventDamageToTargetEffect(), new TapSourceCost()); ability.addTarget(new TargetCreaturePermanent()); + ability.setAbilityWord(AbilityWord.DOMAIN); this.addAbility(ability); } @@ -72,7 +73,6 @@ public class SamitePilgrim extends CardImpl { class SamitePilgrimPreventDamageToTargetEffect extends PreventionEffectImpl { - public SamitePilgrimPreventDamageToTargetEffect() { super(Duration.EndOfTurn, Integer.MAX_VALUE, false, true); staticText = "Prevent the next X damage that would be dealt to target creature this turn, where X is the number of basic land types among lands you control."; diff --git a/Mage.Sets/src/mage/cards/s/SanctumSeeker.java b/Mage.Sets/src/mage/cards/s/SanctumSeeker.java index ec8e8d81f64..cc1f8076e9b 100644 --- a/Mage.Sets/src/mage/cards/s/SanctumSeeker.java +++ b/Mage.Sets/src/mage/cards/s/SanctumSeeker.java @@ -47,7 +47,7 @@ import mage.filter.predicate.mageobject.SubtypePredicate; */ public class SanctumSeeker extends CardImpl { - private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("a Vampire you control attacks"); + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Vampire you control"); static { filter.add(new SubtypePredicate(SubType.VAMPIRE)); diff --git a/Mage.Sets/src/mage/cards/s/SaprolingSymbiosis.java b/Mage.Sets/src/mage/cards/s/SaprolingSymbiosis.java index 77c70ea0e26..e15ba49ae23 100644 --- a/Mage.Sets/src/mage/cards/s/SaprolingSymbiosis.java +++ b/Mage.Sets/src/mage/cards/s/SaprolingSymbiosis.java @@ -43,17 +43,18 @@ import mage.game.permanent.token.SaprolingToken; /** * * @author LoneFox - + * */ public class SaprolingSymbiosis extends CardImpl { public SaprolingSymbiosis(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{G}"); Effect effect = new CreateTokenEffect(new SaprolingToken(), new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent())); // You may cast Saproling Symbiosis as though it had flash if you pay {2} more to cast it. Ability ability = new PayMoreToCastAsThoughtItHadFlashAbility(this, new ManaCostsImpl("{2}")); ability.addEffect(effect); + ability.setRuleAtTheTop(true); this.addAbility(ability); // Create a 1/1 green Saproling creature token for each creature you control. this.getSpellAbility().addEffect(effect); diff --git a/Mage.Sets/src/mage/cards/s/SarkhanUnbroken.java b/Mage.Sets/src/mage/cards/s/SarkhanUnbroken.java index be4e25985ed..48a642f9b1a 100644 --- a/Mage.Sets/src/mage/cards/s/SarkhanUnbroken.java +++ b/Mage.Sets/src/mage/cards/s/SarkhanUnbroken.java @@ -58,7 +58,7 @@ import mage.target.common.TargetCardInLibrary; */ public class SarkhanUnbroken extends CardImpl { - private static final FilterCard dragonFilter = new FilterCard("Dragon creature card"); + private static final FilterCard dragonFilter = new FilterCard("Dragon creature cards"); static { dragonFilter.add(new SubtypePredicate(SubType.DRAGON)); diff --git a/Mage.Sets/src/mage/cards/s/SawtoothLoon.java b/Mage.Sets/src/mage/cards/s/SawtoothLoon.java index ba3e5957290..27ab1c640aa 100644 --- a/Mage.Sets/src/mage/cards/s/SawtoothLoon.java +++ b/Mage.Sets/src/mage/cards/s/SawtoothLoon.java @@ -65,7 +65,7 @@ public class SawtoothLoon extends CardImpl { } public SawtoothLoon(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}{U}"); this.subtype.add(SubType.BIRD); this.power = new MageInt(2); this.toughness = new MageInt(2); @@ -94,7 +94,7 @@ class SawtoothLoonEffect extends OneShotEffect { public SawtoothLoonEffect() { super(Outcome.DrawCard); - this.staticText = "Draw two cards, then put two cards from your hand on the bottom of your library"; + this.staticText = "draw two cards, then put two cards from your hand on the bottom of your library"; } public SawtoothLoonEffect(final SawtoothLoonEffect effect) { diff --git a/Mage.Sets/src/mage/cards/s/ScaldingSalamander.java b/Mage.Sets/src/mage/cards/s/ScaldingSalamander.java index dee50f94aa4..093ec1376ab 100644 --- a/Mage.Sets/src/mage/cards/s/ScaldingSalamander.java +++ b/Mage.Sets/src/mage/cards/s/ScaldingSalamander.java @@ -66,7 +66,7 @@ public class ScaldingSalamander extends CardImpl { // Whenever Scalding Salamander attacks, you may have it deal 1 damage to each creature without flying defending player controls. this.addAbility(new AttacksTriggeredAbility( new DamageAllEffect(1, filter), true, - "Whenever Scalding Salamander attacks, you may have it deal 1 damage to each creature without flying defending player controls" + "Whenever Scalding Salamander attacks, you may have it deal 1 damage to each creature without flying defending player controls." )); } diff --git a/Mage.Sets/src/mage/cards/s/ScaleBlessing.java b/Mage.Sets/src/mage/cards/s/ScaleBlessing.java index e354df9011f..59a9c5f17bd 100644 --- a/Mage.Sets/src/mage/cards/s/ScaleBlessing.java +++ b/Mage.Sets/src/mage/cards/s/ScaleBlessing.java @@ -51,11 +51,11 @@ import mage.players.Player; public class ScaleBlessing extends CardImpl { public ScaleBlessing(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{W}"); // Bolster 1, then put a +1/+1 counter on each creature you control with a +1/+1 counter on it. Effect effect = new BolsterEffect(1); - effect.setText("Bolster 1"); + effect.setText("Bolster 1"); this.getSpellAbility().addEffect(effect); this.getSpellAbility().addEffect(new ScaleBlessingEffect()); @@ -81,7 +81,7 @@ class ScaleBlessingEffect extends OneShotEffect { public ScaleBlessingEffect() { super(Outcome.Benefit); - this.staticText = ", then put a +1/+1 counter on each creature you control with a +1/+1 counter on it. "; + this.staticText = ", then put a +1/+1 counter on each creature you control with a +1/+1 counter on it. (To bolster 1, choose a creature with the least toughness among creatures you control and put +1/+1 counter on it.)"; } public ScaleBlessingEffect(final ScaleBlessingEffect effect) { @@ -98,7 +98,7 @@ class ScaleBlessingEffect extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); MageObject sourceObject = source.getSourceObject(game); if (controller != null && sourceObject != null) { - for(Permanent permanent: game.getState().getBattlefield().getAllActivePermanents(filter , controller.getId(), game)) { + for (Permanent permanent : game.getState().getBattlefield().getAllActivePermanents(filter, controller.getId(), game)) { permanent.addCounters(CounterType.P1P1.createInstance(), source, game); game.informPlayers(sourceObject.getName() + ": Put a +1/+1 counter on " + permanent.getLogName()); } diff --git a/Mage.Sets/src/mage/cards/s/ScaleguardSentinels.java b/Mage.Sets/src/mage/cards/s/ScaleguardSentinels.java index 03828716ffc..c0a19bac1d3 100644 --- a/Mage.Sets/src/mage/cards/s/ScaleguardSentinels.java +++ b/Mage.Sets/src/mage/cards/s/ScaleguardSentinels.java @@ -62,7 +62,7 @@ public class ScaleguardSentinels extends CardImpl { } public ScaleguardSentinels(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}{G}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.SOLDIER); this.power = new MageInt(2); @@ -74,7 +74,7 @@ public class ScaleguardSentinels extends CardImpl { // Scaleguard Sentinels enters the battlefield with a +1/+1 counter on it if you revealed a Dragon card or controlled a Dragon as you cast Scaleguard Sentinels. this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(), true), ScaleguardSentinelsCondition.instance, - "{this} enters the battlefield with a +1/+1 counter on it if you revealed a Dragon card or controlled a Dragon as you cast {this}", ""), + "{this} enters the battlefield with a +1/+1 counter on it if you revealed a Dragon card or controlled a Dragon as you cast {this}.", ""), new DragonOnTheBattlefieldWhileSpellWasCastWatcher()); } diff --git a/Mage.Sets/src/mage/cards/s/ScarwoodTreefolk.java b/Mage.Sets/src/mage/cards/s/ScarwoodTreefolk.java index 4224b953214..e8cc9eae1a2 100644 --- a/Mage.Sets/src/mage/cards/s/ScarwoodTreefolk.java +++ b/Mage.Sets/src/mage/cards/s/ScarwoodTreefolk.java @@ -42,16 +42,14 @@ import mage.constants.SubType; */ public class ScarwoodTreefolk extends CardImpl { - private static final String staticText = "{this} enters the battlefield tapped"; - public ScarwoodTreefolk(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); this.subtype.add(SubType.TREEFOLK); this.power = new MageInt(3); this.toughness = new MageInt(5); // Scarwood Treefolk enters the battlefield tapped. - this.addAbility(new EntersBattlefieldAbility(new TapSourceEffect(), staticText)); + this.addAbility(new EntersBattlefieldAbility(new TapSourceEffect(), "tapped")); } public ScarwoodTreefolk(final ScarwoodTreefolk card) { diff --git a/Mage.Sets/src/mage/cards/s/ScorchingLava.java b/Mage.Sets/src/mage/cards/s/ScorchingLava.java index 51bb207a58f..3ce722d731c 100644 --- a/Mage.Sets/src/mage/cards/s/ScorchingLava.java +++ b/Mage.Sets/src/mage/cards/s/ScorchingLava.java @@ -65,8 +65,9 @@ public class ScorchingLava extends CardImpl { this.getSpellAbility().addEffect(new ConditionalContinuousRuleModifyingEffect( new CantRegenerateTargetEffect(Duration.EndOfTurn, "that creature"), new LockedInCondition(KickedCondition.instance))); this.getSpellAbility().addEffect(new ConditionalOneShotEffect( - (OneShotEffect) new ExileTargetIfDiesEffect().setText("and if it would die this turn, exile it instead"), - new LockedInCondition(KickedCondition.instance))); + new ExileTargetIfDiesEffect(), + new LockedInCondition(KickedCondition.instance) + ).setText("and if it would die this turn, exile it instead")); this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } diff --git a/Mage.Sets/src/mage/cards/s/ScreechingSliver.java b/Mage.Sets/src/mage/cards/s/ScreechingSliver.java index 410b3bb91d8..60629282727 100644 --- a/Mage.Sets/src/mage/cards/s/ScreechingSliver.java +++ b/Mage.Sets/src/mage/cards/s/ScreechingSliver.java @@ -52,7 +52,7 @@ public class ScreechingSliver extends CardImpl { private static final FilterPermanent filter = new FilterPermanent(SubType.SLIVER, "All Slivers"); public ScreechingSliver(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U}"); this.subtype.add(SubType.SLIVER); this.power = new MageInt(1); this.toughness = new MageInt(1); @@ -63,7 +63,7 @@ public class ScreechingSliver extends CardImpl { this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(ability, Duration.WhileOnBattlefield, - filter, "All Sliver creatures have \"{T}: Target player puts the top card of his or her library into his or her graveyard.\""))); + filter, "All Slivers have \"{T}: Target player puts the top card of his or her library into his or her graveyard.\""))); } public ScreechingSliver(final ScreechingSliver card) { diff --git a/Mage.Sets/src/mage/cards/s/ScrybRanger.java b/Mage.Sets/src/mage/cards/s/ScrybRanger.java index 02046aa5570..cf02647b4fd 100644 --- a/Mage.Sets/src/mage/cards/s/ScrybRanger.java +++ b/Mage.Sets/src/mage/cards/s/ScrybRanger.java @@ -53,13 +53,14 @@ import mage.target.common.TargetCreaturePermanent; */ public class ScrybRanger extends CardImpl { - private static final FilterControlledLandPermanent filterForest = new FilterControlledLandPermanent("Forest"); + private static final FilterControlledLandPermanent filterForest = new FilterControlledLandPermanent("a Forest"); + static { filterForest.add(new SubtypePredicate(SubType.FOREST)); } public ScrybRanger(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); this.subtype.add(SubType.FAERIE); this.power = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/s/SeersVision.java b/Mage.Sets/src/mage/cards/s/SeersVision.java index 389d362363c..c4f694f0f73 100644 --- a/Mage.Sets/src/mage/cards/s/SeersVision.java +++ b/Mage.Sets/src/mage/cards/s/SeersVision.java @@ -48,12 +48,12 @@ import mage.target.TargetPlayer; public class SeersVision extends CardImpl { public SeersVision(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{U}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}{B}"); // Your opponents play with their hands revealed. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PlayWithHandRevealedEffect(TargetController.OPPONENT))); // Sacrifice Seer's Vision: Look at target player's hand and choose a card from it. That player discards that card. Activate this ability only any time you could cast a sorcery. - Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new DiscardCardYouChooseTargetEffect(), new SacrificeSourceCost()); + Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new DiscardCardYouChooseTargetEffect(TargetController.ANY), new SacrificeSourceCost()); ability.addTarget(new TargetPlayer()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/ServantOfTheScale.java b/Mage.Sets/src/mage/cards/s/ServantOfTheScale.java index b4c2ffd74be..f8e235f3db8 100644 --- a/Mage.Sets/src/mage/cards/s/ServantOfTheScale.java +++ b/Mage.Sets/src/mage/cards/s/ServantOfTheScale.java @@ -55,7 +55,7 @@ import mage.target.common.TargetControlledCreaturePermanent; public class ServantOfTheScale extends CardImpl { public ServantOfTheScale(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.SOLDIER); this.power = new MageInt(0); @@ -63,7 +63,7 @@ public class ServantOfTheScale extends CardImpl { // Servant of the Scale enters the battlefield with a +1/+1 counter on it. this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(1)), - "with a +1/+1 counters on it")); + "with a +1/+1 counter on it")); // When Servant of the Scale dies, put X +1/+1 counters on target creature you control, where X is the number of +1/+1 counter on Servant of the Scale. Ability ability = new DiesTriggeredAbility(new ServantOfTheScaleEffect(), false); @@ -85,7 +85,7 @@ class ServantOfTheScaleEffect extends OneShotEffect { public ServantOfTheScaleEffect() { super(Outcome.BoostCreature); - this.staticText = "put X +1/+1 counters on target creature you control, where X is the number of +1/+1 counter on {this}"; + this.staticText = "put X +1/+1 counters on target creature you control, where X is the number of +1/+1 counters on {this}"; } public ServantOfTheScaleEffect(final ServantOfTheScaleEffect effect) { @@ -101,8 +101,8 @@ class ServantOfTheScaleEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); Permanent sourcePermanent = (Permanent) game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD); - if (sourcePermanent != null && controller != null && - (sourcePermanent.getZoneChangeCounter(game) == source.getSourceObjectZoneChangeCounter() // Token + if (sourcePermanent != null && controller != null + && (sourcePermanent.getZoneChangeCounter(game) == source.getSourceObjectZoneChangeCounter() // Token || sourcePermanent.getZoneChangeCounter(game) + 1 == source.getSourceObjectZoneChangeCounter())) { // PermanentCard int amount = sourcePermanent.getCounters(game).getCount(CounterType.P1P1); if (amount > 0) { diff --git a/Mage.Sets/src/mage/cards/s/SetessanTactics.java b/Mage.Sets/src/mage/cards/s/SetessanTactics.java index 05a5d4b4c67..cee3c7f116d 100644 --- a/Mage.Sets/src/mage/cards/s/SetessanTactics.java +++ b/Mage.Sets/src/mage/cards/s/SetessanTactics.java @@ -58,20 +58,19 @@ public class SetessanTactics extends CardImpl { } public SetessanTactics(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{G}"); - + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{G}"); // Strive - Setessan Tactics costs G more to cast for each target beyond the first. this.addAbility(new StriveAbility("{G}")); // Until end of turn, any number of target creatures each get +1/+1 and gain "T: This creature fights another target creature." this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, Integer.MAX_VALUE)); - Effect effect = new BoostTargetEffect(1,1, Duration.EndOfTurn); + Effect effect = new BoostTargetEffect(1, 1, Duration.EndOfTurn); effect.setText("Until end of turn, any number of target creatures each get +1/+1"); this.getSpellAbility().addEffect(effect); Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new FightTargetSourceEffect(), new TapSourceCost()); gainedAbility.addTarget(new TargetCreaturePermanent(filter)); this.getSpellAbility().addEffect(new GainAbilityTargetEffect(gainedAbility, Duration.EndOfTurn, - "and gain \"T: This creature fights another target creature.\"")); + "and gain \"{T}: This creature fights another target creature.\"")); } public SetessanTactics(final SetessanTactics card) { diff --git a/Mage.Sets/src/mage/cards/s/ShieldhideDragon.java b/Mage.Sets/src/mage/cards/s/ShieldhideDragon.java index 4a855a92b6e..329a6620be2 100644 --- a/Mage.Sets/src/mage/cards/s/ShieldhideDragon.java +++ b/Mage.Sets/src/mage/cards/s/ShieldhideDragon.java @@ -49,8 +49,8 @@ import mage.filter.predicate.permanent.AnotherPredicate; * @author fireshoes */ public class ShieldhideDragon extends CardImpl { - - private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("each other Dragon creature you control"); + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("other Dragon creature you control"); static { filter.add(new AnotherPredicate()); @@ -58,20 +58,20 @@ public class ShieldhideDragon extends CardImpl { } public ShieldhideDragon(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{W}"); this.subtype.add(SubType.DRAGON); this.power = new MageInt(3); this.toughness = new MageInt(3); // Flying this.addAbility(FlyingAbility.getInstance()); - + // Lifelink this.addAbility(LifelinkAbility.getInstance()); - + // Megamorph {5}{W}{W} this.addAbility(new MorphAbility(this, new ManaCostsImpl("{5}{W}{W}"), true)); - + // When Shieldhide Dragon is turned face up, put a +1/+1 counter on each other Dragon you control. this.addAbility(new TurnedFaceUpSourceTriggeredAbility(new AddCountersAllEffect(CounterType.P1P1.createInstance(), filter), false, false)); } diff --git a/Mage.Sets/src/mage/cards/s/ShimmeringMirage.java b/Mage.Sets/src/mage/cards/s/ShimmeringMirage.java index 273b7bcb0f0..47761a07bd3 100644 --- a/Mage.Sets/src/mage/cards/s/ShimmeringMirage.java +++ b/Mage.Sets/src/mage/cards/s/ShimmeringMirage.java @@ -43,13 +43,13 @@ import mage.target.common.TargetLandPermanent; public class ShimmeringMirage extends CardImpl { public ShimmeringMirage(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}"); // Target land becomes the basic land type of your choice until end of turn. this.getSpellAbility().addEffect(new BecomesBasicLandTargetEffect(Duration.EndOfTurn)); this.getSpellAbility().addTarget(new TargetLandPermanent()); // Draw a card. - this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1).setText("

Draw a card")); } public ShimmeringMirage(final ShimmeringMirage card) { diff --git a/Mage.Sets/src/mage/cards/s/ShipwreckLooter.java b/Mage.Sets/src/mage/cards/s/ShipwreckLooter.java index 0a8d7e92a74..dc6f2eb24b1 100644 --- a/Mage.Sets/src/mage/cards/s/ShipwreckLooter.java +++ b/Mage.Sets/src/mage/cards/s/ShipwreckLooter.java @@ -58,7 +58,7 @@ public class ShipwreckLooter extends CardImpl { Ability ability = new ConditionalTriggeredAbility( new EntersBattlefieldTriggeredAbility(new DrawDiscardControllerEffect(1, 1, true)), RaidCondition.instance, - "Raid - When {this} enters the battlefield,if you attacked with a creature this turn, you may draw a card. If you do, discard a card."); + "Raid - When {this} enters the battlefield, if you attacked with a creature this turn, you may draw a card. If you do, discard a card."); this.addAbility(ability, new PlayerAttackedWatcher()); } diff --git a/Mage.Sets/src/mage/cards/s/ShorecrasherMimic.java b/Mage.Sets/src/mage/cards/s/ShorecrasherMimic.java index 23e4341c3a5..ac72bc7161a 100644 --- a/Mage.Sets/src/mage/cards/s/ShorecrasherMimic.java +++ b/Mage.Sets/src/mage/cards/s/ShorecrasherMimic.java @@ -58,10 +58,10 @@ public class ShorecrasherMimic extends CardImpl { filter.add(new ColorPredicate(ObjectColor.BLUE)); } - private String rule = "Whenever you cast a spell that's both green and blue, {this} has base power and toughness 5/3 until end of turn and gains trample until end of turn"; + private String rule = "Whenever you cast a spell that's both green and blue, {this} has base power and toughness 5/3 until end of turn and gains trample until end of turn."; public ShorecrasherMimic(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G/U}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G/U}"); this.subtype.add(SubType.SHAPESHIFTER); this.color.setBlue(true); diff --git a/Mage.Sets/src/mage/cards/s/SidewinderSliver.java b/Mage.Sets/src/mage/cards/s/SidewinderSliver.java index a550eb520d3..2feea699fc1 100644 --- a/Mage.Sets/src/mage/cards/s/SidewinderSliver.java +++ b/Mage.Sets/src/mage/cards/s/SidewinderSliver.java @@ -48,20 +48,23 @@ import mage.filter.predicate.mageobject.SubtypePredicate; public class SidewinderSliver extends CardImpl { static final private FilterCreaturePermanent filter = new FilterCreaturePermanent("All Sliver creatures"); - - static{ + + static { filter.add(new SubtypePredicate(SubType.SLIVER)); } - + public SidewinderSliver(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}"); this.subtype.add(SubType.SLIVER); this.power = new MageInt(1); this.toughness = new MageInt(1); // All Sliver creatures have flanking. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAllEffect(new FlankingAbility(), Duration.WhileOnBattlefield, filter, false))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, + new GainAbilityAllEffect(new FlankingAbility(), Duration.WhileOnBattlefield, filter, false) + .setText("all Slivers have flanking") + )); } public SidewinderSliver(final SidewinderSliver card) { diff --git a/Mage.Sets/src/mage/cards/s/SightOfTheScalelords.java b/Mage.Sets/src/mage/cards/s/SightOfTheScalelords.java index 1ddb95a8b7e..77fbf8d6b79 100644 --- a/Mage.Sets/src/mage/cards/s/SightOfTheScalelords.java +++ b/Mage.Sets/src/mage/cards/s/SightOfTheScalelords.java @@ -59,11 +59,11 @@ public class SightOfTheScalelords extends CardImpl { } public SightOfTheScalelords(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{G}"); // At the beginning of combat on your turn, creature you control with toughness 4 or greater get +2/+2 and gain vigilance until end of turn. - Effect effect = new BoostControlledEffect(2,2,Duration.EndOfTurn, filter, false); - effect.setText("creature you control with toughness 4 or greater get +2/+2"); + Effect effect = new BoostControlledEffect(2, 2, Duration.EndOfTurn, filter, false); + effect.setText("creatures you control with toughness 4 or greater get +2/+2"); Ability ability = new BeginningOfCombatTriggeredAbility(Zone.BATTLEFIELD, effect, TargetController.YOU, false, false); effect = new GainAbilityControlledEffect(VigilanceAbility.getInstance(), Duration.EndOfTurn, filter); effect.setText("and gain vigilance until end of turn"); diff --git a/Mage.Sets/src/mage/cards/s/SirensRuse.java b/Mage.Sets/src/mage/cards/s/SirensRuse.java index 58ec90f304c..f9a040d090d 100644 --- a/Mage.Sets/src/mage/cards/s/SirensRuse.java +++ b/Mage.Sets/src/mage/cards/s/SirensRuse.java @@ -69,7 +69,7 @@ class SirensRuseEffect extends ExileTargetForSourceEffect { SirensRuseEffect() { super(); - this.staticText = "Exile target creature you control, then return that card to the battlefield under its owner's control. If a Pirate was exiled this way, draw a card."; + this.staticText = "Exile target creature you control, then return that card to the battlefield under its owner's control. If a Pirate was exiled this way, draw a card."; } SirensRuseEffect(final SirensRuseEffect effect) { diff --git a/Mage.Sets/src/mage/cards/s/SkyshipWeatherlight.java b/Mage.Sets/src/mage/cards/s/SkyshipWeatherlight.java index 53dd9426f87..6ee53ae9fd8 100644 --- a/Mage.Sets/src/mage/cards/s/SkyshipWeatherlight.java +++ b/Mage.Sets/src/mage/cards/s/SkyshipWeatherlight.java @@ -37,7 +37,7 @@ import mage.util.CardUtil; public class SkyshipWeatherlight extends CardImpl { public SkyshipWeatherlight(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); addSuperType(SuperType.LEGENDARY); // When Skyship Weatherlight enters the battlefield, search your library for any number of artifact and/or creature cards and exile them. Then shuffle your library. @@ -73,7 +73,7 @@ class SkyshipWeatherlightEffect extends SearchEffect { public SkyshipWeatherlightEffect() { super(new TargetCardInLibrary(0, Integer.MAX_VALUE, filter), Outcome.Neutral); - this.staticText = "search your library for any number of artifact and/or creature cards and remove them from the game. Then shuffle your library"; + this.staticText = "search your library for any number of artifact and/or creature cards and exile them. Then shuffle your library"; } @@ -114,7 +114,7 @@ class SkyshipWeatherlightEffect2 extends OneShotEffect { public SkyshipWeatherlightEffect2() { super(Outcome.ReturnToHand); - this.staticText = "Choose a card at random that was removed from the game with {this}. Put that card into your hand"; + this.staticText = "Choose a card at random that was exiled with {this}. Put that card into its owner's hand"; } public SkyshipWeatherlightEffect2(final SkyshipWeatherlightEffect2 effect) { diff --git a/Mage.Sets/src/mage/cards/s/SnappingSailback.java b/Mage.Sets/src/mage/cards/s/SnappingSailback.java index 7a7d1468d63..2fc3f7f4941 100644 --- a/Mage.Sets/src/mage/cards/s/SnappingSailback.java +++ b/Mage.Sets/src/mage/cards/s/SnappingSailback.java @@ -58,7 +58,7 @@ public class SnappingSailback extends CardImpl { // Enrage — Whenever Snapping Sailback is dealt damage, put a +1/+1 counter on it. this.addAbility(new DealtDamageToSourceTriggeredAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance(1)) - .setText("put a +1/+1 counter on it"), false)); + .setText("put a +1/+1 counter on it"), false, true)); } public SnappingSailback(final SnappingSailback card) { diff --git a/Mage.Sets/src/mage/cards/s/SpellSwindle.java b/Mage.Sets/src/mage/cards/s/SpellSwindle.java index 6745cc8009a..a956b52b363 100644 --- a/Mage.Sets/src/mage/cards/s/SpellSwindle.java +++ b/Mage.Sets/src/mage/cards/s/SpellSwindle.java @@ -69,7 +69,7 @@ class SpellSwindleEffect extends OneShotEffect { public SpellSwindleEffect() { super(Outcome.Detriment); staticText = "Counter target spell. Create X colorless Treasure artifact tokens, where X is that spell's converted mana cost. " - + "They have \"{T}, Sacrifice this artifact: Add one mana of any color to your mana pool"; + + "They have \"{T}, Sacrifice this artifact: Add one mana of any color to your mana pool.\""; } public SpellSwindleEffect(final SpellSwindleEffect effect) { diff --git a/Mage.Sets/src/mage/cards/s/SphereOfPurity.java b/Mage.Sets/src/mage/cards/s/SphereOfPurity.java new file mode 100644 index 00000000000..d7c691bc970 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SphereOfPurity.java @@ -0,0 +1,97 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.cards.s; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.PreventionEffectImpl; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; + +/** + * + * @author L_J + */ +public class SphereOfPurity extends CardImpl { + + public SphereOfPurity(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}"); + + // If an artifact would deal damage to you, prevent 1 of that damage. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SphereOfPurityEffect())); + } + + public SphereOfPurity(final SphereOfPurity card) { + super(card); + } + + @Override + public SphereOfPurity copy() { + return new SphereOfPurity(this); + } +} + +class SphereOfPurityEffect extends PreventionEffectImpl { + + public SphereOfPurityEffect() { + super(Duration.WhileOnBattlefield, 1, false, false); + this.staticText = "If an artifact would deal damage to you, prevent 1 of that damage"; + } + + public SphereOfPurityEffect(SphereOfPurityEffect effect) { + super(effect); + } + + @Override + public boolean checksEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.DAMAGE_PLAYER; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + if (event.getTargetId().equals(source.getControllerId())) { + Permanent permanent = game.getPermanentOrLKIBattlefield(event.getSourceId()); + if (permanent != null && permanent.isArtifact()) { + return super.applies(event, source, game); + } + } + return false; + } + + @Override + public SphereOfPurityEffect copy() { + return new SphereOfPurityEffect(this); + } +} diff --git a/Mage.Sets/src/mage/cards/s/SpikeCannibal.java b/Mage.Sets/src/mage/cards/s/SpikeCannibal.java index c87670061da..876717e641d 100644 --- a/Mage.Sets/src/mage/cards/s/SpikeCannibal.java +++ b/Mage.Sets/src/mage/cards/s/SpikeCannibal.java @@ -53,13 +53,13 @@ import mage.game.permanent.Permanent; public class SpikeCannibal extends CardImpl { public SpikeCannibal(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{B}"); this.subtype.add(SubType.SPIKE); this.power = new MageInt(0); this.toughness = new MageInt(0); // Spike Cannibal enters the battlefield with a +1/+1 counter on it. - this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), "Spike Cannibal enters the battlefield with a +1/+1 counter on it")); + this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), "with a +1/+1 counter on it")); // When Spike Cannibal enters the battlefield, move all +1/+1 counters from all creatures onto it. this.addAbility(new EntersBattlefieldTriggeredAbility(new SpikeCannibalEffect())); diff --git a/Mage.Sets/src/mage/cards/s/SpikeRogue.java b/Mage.Sets/src/mage/cards/s/SpikeRogue.java index b7a6efd2dd8..a27148a327e 100644 --- a/Mage.Sets/src/mage/cards/s/SpikeRogue.java +++ b/Mage.Sets/src/mage/cards/s/SpikeRogue.java @@ -54,23 +54,23 @@ import mage.target.common.TargetCreaturePermanent; public class SpikeRogue extends CardImpl { public SpikeRogue(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{G}"); this.subtype.add(SubType.SPIKE); this.power = new MageInt(0); this.toughness = new MageInt(0); // Spike Rogue enters the battlefield with two +1/+1 counters on it. - this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(2)))); + this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(2)), "with two +1/+1 counters on it")); // {2}, Remove a +1/+1 counter from Spike Rogue: Put a +1/+1 counter on target creature. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.P1P1.createInstance()), new GenericManaCost(2)); ability.addCost(new RemoveCountersSourceCost(CounterType.P1P1.createInstance())); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); - + // {2}, Remove a +1/+1 counter from a creature you control: Put a +1/+1 counter on Spike Rogue. Ability ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance(1)), new GenericManaCost(2)); - ability2.addCost(new RemoveCounterCost(new TargetControlledCreaturePermanent(1,1, new FilterControlledCreaturePermanent(), true), CounterType.P1P1)); + ability2.addCost(new RemoveCounterCost(new TargetControlledCreaturePermanent(1, 1, new FilterControlledCreaturePermanent(), true), CounterType.P1P1)); this.addAbility(ability2); } diff --git a/Mage.Sets/src/mage/cards/s/SpikeWeaver.java b/Mage.Sets/src/mage/cards/s/SpikeWeaver.java index 7c7f90cbdc7..d30ff8cce9d 100644 --- a/Mage.Sets/src/mage/cards/s/SpikeWeaver.java +++ b/Mage.Sets/src/mage/cards/s/SpikeWeaver.java @@ -53,21 +53,21 @@ import mage.target.common.TargetCreaturePermanent; public class SpikeWeaver extends CardImpl { public SpikeWeaver(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); this.subtype.add(SubType.SPIKE); this.power = new MageInt(0); this.toughness = new MageInt(0); // Spike Weaver enters the battlefield with three +1/+1 counters on it. - this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(3)))); - + this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(3)), "with three +1/+1 counters on it")); + // {2}, Remove a +1/+1 counter from Spike Weaver: Put a +1/+1 counter on target creature. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.P1P1.createInstance()), new GenericManaCost(2)); ability.addCost(new RemoveCountersSourceCost(CounterType.P1P1.createInstance())); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); - + // {1}, Remove a +1/+1 counter from Spike Weaver: Prevent all combat damage that would be dealt this turn. Ability ability2 = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PreventAllDamageByAllPermanentsEffect(Duration.EndOfTurn, true), new GenericManaCost(1)); ability2.addCost(new RemoveCountersSourceCost(CounterType.P1P1.createInstance())); diff --git a/Mage.Sets/src/mage/cards/s/Spirespine.java b/Mage.Sets/src/mage/cards/s/Spirespine.java index 056814ee38e..84e2e02ffd8 100644 --- a/Mage.Sets/src/mage/cards/s/Spirespine.java +++ b/Mage.Sets/src/mage/cards/s/Spirespine.java @@ -51,7 +51,7 @@ import mage.constants.Zone; public class Spirespine extends CardImpl { public Spirespine(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT,CardType.CREATURE},"{2}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{2}{G}"); this.subtype.add(SubType.BEAST); this.power = new MageInt(4); @@ -61,12 +61,12 @@ public class Spirespine extends CardImpl { this.addAbility(new BestowAbility(this, "{4}{G}")); // Spirespine blocks each turn if able. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BlocksIfAbleSourceEffect(Duration.WhileOnBattlefield))); - // Enchanted creature gets +4/+1 and blocks each turn if able. - Effect effect = new BoostEnchantedEffect(4,1, Duration.WhileOnBattlefield); + // Enchanted creature gets +4/+1 and blocks each combat if able. + Effect effect = new BoostEnchantedEffect(4, 1, Duration.WhileOnBattlefield); effect.setText("Enchanted creature gets +4/+1"); Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); effect = new BlocksIfAbleAttachedEffect(Duration.WhileOnBattlefield, AttachmentType.AURA); - effect.setText("and blocks each turn if able"); + effect.setText("and blocks each combat if able"); ability.addEffect(effect); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/StarOfExtinction.java b/Mage.Sets/src/mage/cards/s/StarOfExtinction.java index 1fdb4a3469b..15e6c31a9a0 100644 --- a/Mage.Sets/src/mage/cards/s/StarOfExtinction.java +++ b/Mage.Sets/src/mage/cards/s/StarOfExtinction.java @@ -47,7 +47,7 @@ public class StarOfExtinction extends CardImpl { // Destroy target land. Star of Extinction deals 20 damage to each creature and each planeswalker. this.getSpellAbility().addEffect(new DestroyTargetEffect()); - this.getSpellAbility().addEffect(new DamageAllEffect(20, new FilterCreatureOrPlaneswalkerPermanent("each creature and each planeswalker"))); + this.getSpellAbility().addEffect(new DamageAllEffect(20, new FilterCreatureOrPlaneswalkerPermanent("creature and each planeswalker"))); this.getSpellAbility().addTarget(new TargetLandPermanent()); } diff --git a/Mage.Sets/src/mage/cards/s/StormFleetAerialist.java b/Mage.Sets/src/mage/cards/s/StormFleetAerialist.java index eec83b174cf..c62904dbd12 100644 --- a/Mage.Sets/src/mage/cards/s/StormFleetAerialist.java +++ b/Mage.Sets/src/mage/cards/s/StormFleetAerialist.java @@ -60,7 +60,7 @@ public class StormFleetAerialist extends CardImpl { // Raid - Storm Fleet Aerialist enters the battlefield with a +1/+1 counter on it if you attacked with a creature this turn. this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(1), false), RaidCondition.instance, - "Raid - {this} enters the battlefield with a +1/+1 counter on it if you attacked with a creature this turn", + "Raid - {this} enters the battlefield with a +1/+1 counter on it if you attacked with a creature this turn.", "{this} enters the battlefield with a +1/+1 counter"), new PlayerAttackedWatcher()); } diff --git a/Mage.Sets/src/mage/cards/s/StormriderRig.java b/Mage.Sets/src/mage/cards/s/StormriderRig.java index 1257360455c..740d3e30255 100644 --- a/Mage.Sets/src/mage/cards/s/StormriderRig.java +++ b/Mage.Sets/src/mage/cards/s/StormriderRig.java @@ -50,20 +50,20 @@ import mage.filter.common.FilterControlledCreaturePermanent; public class StormriderRig extends CardImpl { public StormriderRig(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}"); + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +1/+1. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 1))); - + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 1))); + // Whenever a creature enters the battlefield under your control, you may attach Stormrider Rig to it. this.addAbility(new EntersBattlefieldAllTriggeredAbility( Zone.BATTLEFIELD, new AttachEffect(Outcome.Detriment, "attach {source} to it"), - new FilterControlledCreaturePermanent(), true, SetTargetPointer.PERMANENT, null, true)); - + new FilterControlledCreaturePermanent("a creature"), true, SetTargetPointer.PERMANENT, null, true)); + // Equip {2} - this.addAbility(new EquipAbility(Outcome.BoostCreature, new GenericManaCost(2))); - + this.addAbility(new EquipAbility(Outcome.BoostCreature, new GenericManaCost(2))); + } public StormriderRig(final StormriderRig card) { diff --git a/Mage.Sets/src/mage/cards/s/StormscapeMaster.java b/Mage.Sets/src/mage/cards/s/StormscapeMaster.java index fa30ec1d16f..2fc0a0097e0 100644 --- a/Mage.Sets/src/mage/cards/s/StormscapeMaster.java +++ b/Mage.Sets/src/mage/cards/s/StormscapeMaster.java @@ -49,12 +49,12 @@ import mage.target.common.TargetCreaturePermanent; /** * * @author LoneFox - + * */ public class StormscapeMaster extends CardImpl { public StormscapeMaster(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{U}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.WIZARD); this.power = new MageInt(2); @@ -70,7 +70,7 @@ public class StormscapeMaster extends CardImpl { // {B}{B}, {T}: Target player loses 2 life and you gain 2 life. ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LoseLifeTargetEffect(2), new ManaCostsImpl("{B}{B}")); - ability.addEffect(new GainLifeEffect(2)); + ability.addEffect(new GainLifeEffect(2).setText("and you gain 2 life")); ability.addCost(new TapSourceCost()); ability.addTarget(new TargetPlayer()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/s/StormwingDragon.java b/Mage.Sets/src/mage/cards/s/StormwingDragon.java index e16ba6e75fb..daae80e3be1 100644 --- a/Mage.Sets/src/mage/cards/s/StormwingDragon.java +++ b/Mage.Sets/src/mage/cards/s/StormwingDragon.java @@ -49,8 +49,8 @@ import mage.filter.predicate.permanent.AnotherPredicate; * @author fireshoes */ public class StormwingDragon extends CardImpl { - - private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("each other Dragon creature you control"); + + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("other Dragon creature you control"); static { filter.add(new AnotherPredicate()); @@ -58,20 +58,20 @@ public class StormwingDragon extends CardImpl { } public StormwingDragon(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{R}"); this.subtype.add(SubType.DRAGON); this.power = new MageInt(3); this.toughness = new MageInt(3); // Flying this.addAbility(FlyingAbility.getInstance()); - + // First strike this.addAbility(FirstStrikeAbility.getInstance()); - + // Megamorph {5}{R}{R} this.addAbility(new MorphAbility(this, new ManaCostsImpl("{5}{R}{R}"), true)); - + // When Stormwing Dragon is turned face up, put a +1/+1 counter on each other Dragon creature you control. this.addAbility(new TurnedFaceUpSourceTriggeredAbility(new AddCountersAllEffect(CounterType.P1P1.createInstance(), filter), false, false)); } diff --git a/Mage.Sets/src/mage/cards/s/StranglingSoot.java b/Mage.Sets/src/mage/cards/s/StranglingSoot.java index a0d58fff080..e0d40c4eb8c 100644 --- a/Mage.Sets/src/mage/cards/s/StranglingSoot.java +++ b/Mage.Sets/src/mage/cards/s/StranglingSoot.java @@ -45,7 +45,7 @@ import mage.target.common.TargetCreaturePermanent; */ public class StranglingSoot extends CardImpl { - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with toughess 3 or less"); + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("creature with toughness 3 or less"); static { filter.add(new ToughnessPredicate(ComparisonType.FEWER_THAN, 4)); diff --git a/Mage.Sets/src/mage/cards/s/SulfurElemental.java b/Mage.Sets/src/mage/cards/s/SulfurElemental.java index a43214d4a4d..741e04f5133 100644 --- a/Mage.Sets/src/mage/cards/s/SulfurElemental.java +++ b/Mage.Sets/src/mage/cards/s/SulfurElemental.java @@ -48,25 +48,28 @@ import mage.filter.predicate.mageobject.ColorPredicate; * @author LevelX2 */ public class SulfurElemental extends CardImpl { - + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("white creatures"); + static { filter.add(new ColorPredicate(ObjectColor.WHITE)); } public SulfurElemental(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); this.subtype.add(SubType.ELEMENTAL); this.power = new MageInt(3); this.toughness = new MageInt(2); - // Flash - this.addAbility(FlashAbility.getInstance()); // Split second this.addAbility(new SplitSecondAbility()); + + // Flash + this.addAbility(FlashAbility.getInstance()); + // White creatures get +1/-1. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(1,-1, Duration.WhileOnBattlefield, filter, false))); + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostAllEffect(1, -1, Duration.WhileOnBattlefield, filter, false))); } public SulfurElemental(final SulfurElemental card) { diff --git a/Mage.Sets/src/mage/cards/s/SunbirdsInvocation.java b/Mage.Sets/src/mage/cards/s/SunbirdsInvocation.java index 0b934660f81..815955a089a 100644 --- a/Mage.Sets/src/mage/cards/s/SunbirdsInvocation.java +++ b/Mage.Sets/src/mage/cards/s/SunbirdsInvocation.java @@ -105,6 +105,16 @@ class SunbirdsInvocationTriggeredAbility extends SpellCastControllerTriggeredAbi public SunbirdsInvocationTriggeredAbility copy() { return new SunbirdsInvocationTriggeredAbility(this); } + + @Override + public String getRule() { + return "Whenever you cast a spell from your hand, " + + "reveal the top X cards of your library, " + + "where X is that spell's converted mana cost. " + + "You may cast a card revealed this way with " + + "converted mana cost X or less without paying its mana cost." + + " Put the rest on the bottom of your library in a random order."; + } } class SunbirdsInvocationEffect extends OneShotEffect { diff --git a/Mage.Sets/src/mage/cards/s/Sunscour.java b/Mage.Sets/src/mage/cards/s/Sunscour.java index 7649c08e97a..aca679b76bf 100644 --- a/Mage.Sets/src/mage/cards/s/Sunscour.java +++ b/Mage.Sets/src/mage/cards/s/Sunscour.java @@ -36,7 +36,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.filter.FilterCard; -import mage.filter.common.FilterCreaturePermanent; +import mage.filter.StaticFilters; import mage.filter.predicate.mageobject.ColorPredicate; import mage.target.common.TargetCardInHand; @@ -47,18 +47,19 @@ import mage.target.common.TargetCardInHand; public class Sunscour extends CardImpl { private static final FilterCard filter = new FilterCard("two white cards"); + static { filter.add(new ColorPredicate(ObjectColor.WHITE)); } public Sunscour(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{5}{W}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{5}{W}{W}"); // You may exile two white cards from your hand rather than pay Sunscour's mana cost. this.addAbility(new AlternativeCostSourceAbility(new ExileFromHandCost(new TargetCardInHand(2, filter)))); // Destroy all creatures. - this.getSpellAbility().addEffect(new DestroyAllEffect(new FilterCreaturePermanent())); + this.getSpellAbility().addEffect(new DestroyAllEffect(StaticFilters.FILTER_PERMANENT_CREATURES)); } public Sunscour(final Sunscour card) { diff --git a/Mage.Sets/src/mage/cards/s/SurgingAether.java b/Mage.Sets/src/mage/cards/s/SurgingAether.java index bb9a0b3a5f1..79d406787fc 100644 --- a/Mage.Sets/src/mage/cards/s/SurgingAether.java +++ b/Mage.Sets/src/mage/cards/s/SurgingAether.java @@ -42,10 +42,11 @@ import mage.target.TargetPermanent; public class SurgingAether extends CardImpl { public SurgingAether(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{U}"); // Ripple 4 - this.addAbility(new RippleAbility(4)); + this.addAbility(new RippleAbility(4).setRuleAtTheTop(true)); + // Return target permanent to its owner's hand. this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); this.getSpellAbility().addTarget(new TargetPermanent()); diff --git a/Mage.Sets/src/mage/cards/s/SurgingDementia.java b/Mage.Sets/src/mage/cards/s/SurgingDementia.java index dfe6b8e92c0..d24c284691b 100644 --- a/Mage.Sets/src/mage/cards/s/SurgingDementia.java +++ b/Mage.Sets/src/mage/cards/s/SurgingDementia.java @@ -42,10 +42,10 @@ import mage.target.TargetPlayer; public class SurgingDementia extends CardImpl { public SurgingDementia(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}"); // Ripple 4 - this.addAbility(new RippleAbility(4)); + this.addAbility(new RippleAbility(4).setRuleAtTheTop(true)); // Target player discards a card. this.getSpellAbility().getEffects().add(new DiscardTargetEffect(1)); diff --git a/Mage.Sets/src/mage/cards/s/SurgingFlame.java b/Mage.Sets/src/mage/cards/s/SurgingFlame.java index 07ab76ed795..2a7b218a354 100644 --- a/Mage.Sets/src/mage/cards/s/SurgingFlame.java +++ b/Mage.Sets/src/mage/cards/s/SurgingFlame.java @@ -42,10 +42,11 @@ import mage.target.common.TargetCreatureOrPlayer; public class SurgingFlame extends CardImpl { public SurgingFlame(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}"); // Ripple 4 - this.addAbility(new RippleAbility(4)); + this.addAbility(new RippleAbility(4).setRuleAtTheTop(true)); + // Surging Flame deals 2 damage to target creature or player. this.getSpellAbility().addEffect(new DamageTargetEffect(2)); this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); diff --git a/Mage.Sets/src/mage/cards/s/SwarmbornGiant.java b/Mage.Sets/src/mage/cards/s/SwarmbornGiant.java index a5499529a0b..e5a2333fac3 100644 --- a/Mage.Sets/src/mage/cards/s/SwarmbornGiant.java +++ b/Mage.Sets/src/mage/cards/s/SwarmbornGiant.java @@ -56,7 +56,7 @@ import mage.game.events.GameEvent.EventType; public class SwarmbornGiant extends CardImpl { public SwarmbornGiant(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); this.subtype.add(SubType.GIANT); this.power = new MageInt(6); @@ -67,13 +67,13 @@ public class SwarmbornGiant extends CardImpl { // {4}{G}{G}: Monstrosity 2. this.addAbility(new MonstrosityAbility("{4}{G}{G}", 2)); - + // As long as Swarmborn Giant is monstrous, it has reach. Ability ability = new SimpleStaticAbility( Zone.BATTLEFIELD, new ConditionalContinuousEffect(new GainAbilitySourceEffect(ReachAbility.getInstance(), Duration.WhileOnBattlefield), - MonstrousCondition.instance, - "As long as {this} is monstrous, it has reach")); + MonstrousCondition.instance, + "As long as {this} is monstrous, it has reach")); this.addAbility(ability); } @@ -118,6 +118,6 @@ class SwarmbornGiantTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "Whenever you're dealt combat damage, " + super.getRule(); + return "When you're dealt combat damage, " + super.getRule(); } } diff --git a/Mage.Sets/src/mage/cards/t/TalarasBane.java b/Mage.Sets/src/mage/cards/t/TalarasBane.java index c89e8fb6a86..9715eeb33f0 100644 --- a/Mage.Sets/src/mage/cards/t/TalarasBane.java +++ b/Mage.Sets/src/mage/cards/t/TalarasBane.java @@ -53,13 +53,12 @@ import mage.target.common.TargetOpponent; public class TalarasBane extends CardImpl { public TalarasBane(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{B}"); - + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}"); // Target opponent reveals his or her hand. You choose a green or white creature card from it. You gain life equal that creature card's toughness, then that player discards that card. this.getSpellAbility().addEffect(new TalarasBaneEffect()); this.getSpellAbility().addTarget(new TargetOpponent()); - + } public TalarasBane(final TalarasBane card) { @@ -73,9 +72,9 @@ public class TalarasBane extends CardImpl { } class TalarasBaneEffect extends OneShotEffect { - + private static final FilterCard filter = new FilterCard("a green or white creature card"); - + static { filter.add(Predicates.or( new ColorPredicate(ObjectColor.GREEN), @@ -85,7 +84,7 @@ class TalarasBaneEffect extends OneShotEffect { public TalarasBaneEffect() { super(Outcome.Detriment); - this.staticText = "Target opponent reveals his or her hand. You choose a green or white creature card from it. You gain life equal that creature card's toughness, then that player discards that card"; + this.staticText = "Target opponent reveals his or her hand. You choose a green or white creature card from it. You gain life equal to that creature card's toughness, then that player discards that card"; } public TalarasBaneEffect(final TalarasBaneEffect effect) { @@ -110,10 +109,10 @@ class TalarasBaneEffect extends OneShotEffect { } if (card != null) { int lifeGain = card.getToughness().getValue(); - you .gainLife(lifeGain, game); + you.gainLife(lifeGain, game); return targetPlayer.discard(card, source, game); } } return false; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/t/TempestCaller.java b/Mage.Sets/src/mage/cards/t/TempestCaller.java index 94ee292caa0..7910dfa1853 100644 --- a/Mage.Sets/src/mage/cards/t/TempestCaller.java +++ b/Mage.Sets/src/mage/cards/t/TempestCaller.java @@ -54,7 +54,7 @@ public class TempestCaller extends CardImpl { this.toughness = new MageInt(3); // When Tempest Caller enters the battlefield, tap all creatures target opponent controls. - Ability ability = new EntersBattlefieldTriggeredAbility(new TapAllTargetPlayerControlsEffect(new FilterCreaturePermanent("creatures target opponent controls"))); + Ability ability = new EntersBattlefieldTriggeredAbility(new TapAllTargetPlayerControlsEffect(new FilterCreaturePermanent("creatures"))); ability.addTarget(new TargetOpponent()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/t/TemporalDistortion.java b/Mage.Sets/src/mage/cards/t/TemporalDistortion.java index 1a18ec7e822..302059905e2 100644 --- a/Mage.Sets/src/mage/cards/t/TemporalDistortion.java +++ b/Mage.Sets/src/mage/cards/t/TemporalDistortion.java @@ -57,7 +57,7 @@ import mage.game.permanent.Permanent; */ public class TemporalDistortion extends CardImpl { - private static final FilterPermanent filter = new FilterPermanent("creature or land"); + private static final FilterPermanent filter = new FilterPermanent("a creature or land"); private static final FilterPermanent filter2 = new FilterPermanent("permanents with hourglass counters on them"); static { diff --git a/Mage.Sets/src/mage/cards/t/ThunderscapeMaster.java b/Mage.Sets/src/mage/cards/t/ThunderscapeMaster.java index b6f623d1f20..f7e84c7e1a8 100644 --- a/Mage.Sets/src/mage/cards/t/ThunderscapeMaster.java +++ b/Mage.Sets/src/mage/cards/t/ThunderscapeMaster.java @@ -51,7 +51,7 @@ import mage.target.TargetPlayer; public class ThunderscapeMaster extends CardImpl { public ThunderscapeMaster(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{R}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.WIZARD); @@ -60,7 +60,7 @@ public class ThunderscapeMaster extends CardImpl { // {B}{B}, {tap}: Target player loses 2 life and you gain 2 life. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new LoseLifeTargetEffect(2), new ManaCostsImpl("{B}{B}")); - ability.addEffect(new GainLifeEffect(2)); + ability.addEffect(new GainLifeEffect(2).setText("and you gain 2 life")); ability.addCost(new TapSourceCost()); ability.addTarget(new TargetPlayer()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/t/TorrentOfFire.java b/Mage.Sets/src/mage/cards/t/TorrentOfFire.java index d07918ce53c..6f6501f595a 100644 --- a/Mage.Sets/src/mage/cards/t/TorrentOfFire.java +++ b/Mage.Sets/src/mage/cards/t/TorrentOfFire.java @@ -42,10 +42,12 @@ import mage.target.common.TargetCreatureOrPlayer; public class TorrentOfFire extends CardImpl { public TorrentOfFire(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{R}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{R}{R}"); // Torrent of Fire deals damage equal to the highest converted mana cost among permanents you control to target creature or player. - this.getSpellAbility().addEffect(new DamageTargetEffect(new HighestConvertedManaCostValue())); + this.getSpellAbility().addEffect(new DamageTargetEffect(new HighestConvertedManaCostValue()) + .setText("{this} deals damage to target creature or player equal to the highest converted mana cost among permanents you control.") + ); this.getSpellAbility().addTarget(new TargetCreatureOrPlayer()); } diff --git a/Mage.Sets/src/mage/cards/t/TranquilPath.java b/Mage.Sets/src/mage/cards/t/TranquilPath.java index de90b5056b4..04d214cd1e8 100644 --- a/Mage.Sets/src/mage/cards/t/TranquilPath.java +++ b/Mage.Sets/src/mage/cards/t/TranquilPath.java @@ -42,13 +42,12 @@ import mage.filter.common.FilterEnchantmentPermanent; public class TranquilPath extends CardImpl { public TranquilPath(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{G}"); - + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{G}"); // Destroy all enchantments. this.getSpellAbility().addEffect(new DestroyAllEffect(new FilterEnchantmentPermanent("enchantments"))); // Draw a card. - this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); + this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1).setText("

Draw a card")); } public TranquilPath(final TranquilPath card) { diff --git a/Mage.Sets/src/mage/cards/u/UnnaturalSelection.java b/Mage.Sets/src/mage/cards/u/UnnaturalSelection.java index d069036dbfa..aabc4cf8ff4 100644 --- a/Mage.Sets/src/mage/cards/u/UnnaturalSelection.java +++ b/Mage.Sets/src/mage/cards/u/UnnaturalSelection.java @@ -45,7 +45,7 @@ import mage.target.common.TargetCreaturePermanent; public class UnnaturalSelection extends CardImpl { public UnnaturalSelection(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}"); // {1}: Choose a creature type other than Wall. Target creature becomes that type until end of turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesChosenCreatureTypeTargetEffect(true), new GenericManaCost(1)); diff --git a/Mage.Sets/src/mage/cards/u/UnnervingAssault.java b/Mage.Sets/src/mage/cards/u/UnnervingAssault.java index 9c6251028c6..220e916e018 100644 --- a/Mage.Sets/src/mage/cards/u/UnnervingAssault.java +++ b/Mage.Sets/src/mage/cards/u/UnnervingAssault.java @@ -45,32 +45,31 @@ import mage.watchers.common.ManaSpentToCastWatcher; /** * * @author jeffwadsworth - + * */ public class UnnervingAssault extends CardImpl { - + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Creatures your opponents control"); private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent("creatures you control"); - + static { filter.add(new ControllerPredicate(TargetController.OPPONENT)); filter2.add(new ControllerPredicate(TargetController.YOU)); } public UnnervingAssault(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{U/R}"); - + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{U/R}"); // Creatures your opponents control get -1/-0 until end of turn if {U} was spent to cast Unnerving Assault, and creatures you control get +1/+0 until end of turn if {R} was spent to cast it. this.getSpellAbility().addEffect(new ConditionalContinuousEffect( new BoostAllEffect(-1, 0, Duration.EndOfTurn, filter, false), - new ManaWasSpentCondition(ColoredManaSymbol.U), "Creatures your opponents control get -1/0 until end of turn if {U} was spent to cast {this},")); + new ManaWasSpentCondition(ColoredManaSymbol.U), "Creatures your opponents control get -1/-0 until end of turn if {U} was spent to cast {this},")); this.getSpellAbility().addEffect(new ConditionalContinuousEffect( new BoostAllEffect(1, 0, Duration.EndOfTurn, filter2, false), - new ManaWasSpentCondition(ColoredManaSymbol.R), " and creatures you control get +1/0 until end of turn if {R} was spent to cast it")); + new ManaWasSpentCondition(ColoredManaSymbol.R), " and creatures you control get +1/+0 until end of turn if {R} was spent to cast it")); this.getSpellAbility().addEffect(new InfoEffect("(Do both if {U}{R} was spent.)")); this.getSpellAbility().addWatcher(new ManaSpentToCastWatcher()); - + } public UnnervingAssault(final UnnervingAssault card) { @@ -82,4 +81,3 @@ public class UnnervingAssault extends CardImpl { return new UnnervingAssault(this); } } - diff --git a/Mage.Sets/src/mage/cards/u/UrborgSkeleton.java b/Mage.Sets/src/mage/cards/u/UrborgSkeleton.java index 8a00564be41..2ce0b055bd4 100644 --- a/Mage.Sets/src/mage/cards/u/UrborgSkeleton.java +++ b/Mage.Sets/src/mage/cards/u/UrborgSkeleton.java @@ -24,7 +24,7 @@ * The views and conclusions contained in the software and documentation are those of the * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. -*/ + */ package mage.cards.u; import java.util.UUID; @@ -45,15 +45,15 @@ import mage.constants.Zone; import mage.counters.CounterType; /** -* -* @author LevelX2 -*/ + * + * @author LevelX2 + */ public class UrborgSkeleton extends CardImpl { - private static final String staticText = "If Urborg Skeleton was kicked, it enters the battlefield with a +1/+1 counter on it"; + private static final String staticText = "If {this} was kicked, it enters the battlefield with a +1/+1 counter on it."; public UrborgSkeleton(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}"); this.subtype.add(SubType.SKELETON); this.power = new MageInt(0); @@ -68,7 +68,7 @@ public class UrborgSkeleton extends CardImpl { // If Urborg Skeleton was kicked, it enters the battlefield with a +1/+1 counter on it. Ability ability = new EntersBattlefieldAbility( new AddCountersSourceEffect(CounterType.P1P1.createInstance(1)), - KickedCondition.instance, staticText,""); + KickedCondition.instance, staticText, ""); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/u/UrzasGuilt.java b/Mage.Sets/src/mage/cards/u/UrzasGuilt.java index 76400716c3a..a3224df09e1 100644 --- a/Mage.Sets/src/mage/cards/u/UrzasGuilt.java +++ b/Mage.Sets/src/mage/cards/u/UrzasGuilt.java @@ -43,13 +43,12 @@ import mage.constants.CardType; public class UrzasGuilt extends CardImpl { public UrzasGuilt(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{U}{B}"); - + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{U}{B}"); // Each player draws two cards, then discards three cards, then loses 4 life. this.getSpellAbility().addEffect(new DrawCardAllEffect(2)); Effect effect = new DiscardEachPlayerEffect(3, false); - effect.setText("then discards three cards"); + effect.setText("then discards three cards,"); this.getSpellAbility().addEffect(effect); effect = new LoseLifeAllPlayersEffect(4); effect.setText("then loses 4 life"); diff --git a/Mage.Sets/src/mage/cards/v/VanquishersBanner.java b/Mage.Sets/src/mage/cards/v/VanquishersBanner.java index 105e7c99ff1..58af23ab79f 100644 --- a/Mage.Sets/src/mage/cards/v/VanquishersBanner.java +++ b/Mage.Sets/src/mage/cards/v/VanquishersBanner.java @@ -128,6 +128,6 @@ class DrawCardIfCreatureTypeAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "Whenever you cast a creature spell of the chosen type, draw a card"; + return "Whenever you cast a creature spell of the chosen type, draw a card."; } } diff --git a/Mage.Sets/src/mage/cards/v/VeldraneOfSengir.java b/Mage.Sets/src/mage/cards/v/VeldraneOfSengir.java index 056e7011d6f..f50e6011d4c 100644 --- a/Mage.Sets/src/mage/cards/v/VeldraneOfSengir.java +++ b/Mage.Sets/src/mage/cards/v/VeldraneOfSengir.java @@ -50,7 +50,7 @@ import mage.constants.Zone; public class VeldraneOfSengir extends CardImpl { public VeldraneOfSengir(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{B}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{B}{B}"); addSuperType(SuperType.LEGENDARY); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.ROGUE); @@ -58,8 +58,8 @@ public class VeldraneOfSengir extends CardImpl { this.toughness = new MageInt(5); // {1}{B}{B}: Veldrane of Sengir gets -3/-0 and gains forestwalk until end of turn. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(-3, -0, Duration.EndOfTurn), new ManaCostsImpl("{1}{B}{B}")); - ability.addEffect(new GainAbilitySourceEffect(new ForestwalkAbility(false), Duration.EndOfTurn)); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(-3, -0, Duration.EndOfTurn).setText("{this} gets -3/-0"), new ManaCostsImpl("{1}{B}{B}")); + ability.addEffect(new GainAbilitySourceEffect(new ForestwalkAbility(false), Duration.EndOfTurn).setText("and gains forestwalk until end of turn")); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/v/VengefulDead.java b/Mage.Sets/src/mage/cards/v/VengefulDead.java index 5c2eec5918b..863da2da6a2 100644 --- a/Mage.Sets/src/mage/cards/v/VengefulDead.java +++ b/Mage.Sets/src/mage/cards/v/VengefulDead.java @@ -43,15 +43,15 @@ import mage.filter.predicate.mageobject.SubtypePredicate; * @author fireshoes */ public class VengefulDead extends CardImpl { - - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("{this} or another Zombie"); - + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Zombie"); + static { filter.add(new SubtypePredicate(SubType.ZOMBIE)); } public VengefulDead(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); this.subtype.add(SubType.ZOMBIE); this.power = new MageInt(3); this.toughness = new MageInt(2); diff --git a/Mage.Sets/src/mage/cards/v/VerdantSunsAvatar.java b/Mage.Sets/src/mage/cards/v/VerdantSunsAvatar.java index 7a75f45fd14..c930ee18874 100644 --- a/Mage.Sets/src/mage/cards/v/VerdantSunsAvatar.java +++ b/Mage.Sets/src/mage/cards/v/VerdantSunsAvatar.java @@ -59,7 +59,7 @@ public class VerdantSunsAvatar extends CardImpl { this.power = new MageInt(5); this.toughness = new MageInt(5); - // When Verdant Sun's Avatar or another creature enters the battlefield under your control, you gain life equal to that creature's toughness. + // Whenever Verdant Sun's Avatar or another creature enters the battlefield under your control, you gain life equal to that creature's toughness. this.addAbility(new VerdantSunsAvatarTriggeredAbility()); } @@ -104,7 +104,7 @@ class VerdantSunsAvatarTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "When {this} or another creature enters the battlefield under your control, " + super.getRule(); + return "Whenever {this} or another creature enters the battlefield under your control, " + super.getRule(); } @Override diff --git a/Mage.Sets/src/mage/cards/v/VesuvanShapeshifter.java b/Mage.Sets/src/mage/cards/v/VesuvanShapeshifter.java index 128d109df87..87525a45d81 100644 --- a/Mage.Sets/src/mage/cards/v/VesuvanShapeshifter.java +++ b/Mage.Sets/src/mage/cards/v/VesuvanShapeshifter.java @@ -72,9 +72,6 @@ public class VesuvanShapeshifter extends CardImpl { this.power = new MageInt(0); this.toughness = new MageInt(0); - // Morph {1}{U} - this.addAbility(new MorphAbility(this, new ManaCostsImpl("{1}{U}"))); - // As Vesuvan Shapeshifter turned face up, may choose another creature. If you do, until Vesuvan Shapeshifter is turned face down, it becomes a copy of that creature Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new AsTurnedFaceUpEffect(new VesuvanShapeshifterEffect(), false)); ability.setWorksFaceDown(true); @@ -91,6 +88,9 @@ public class VesuvanShapeshifter extends CardImpl { effect = new VesuvanShapeshifterFaceDownEffect(); ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, effect, TargetController.YOU, true); this.addAbility(ability); + + // Morph {1}{U} + this.addAbility(new MorphAbility(this, new ManaCostsImpl("{1}{U}"))); } public VesuvanShapeshifter(final VesuvanShapeshifter card) { diff --git a/Mage.Sets/src/mage/cards/v/VexingSphinx.java b/Mage.Sets/src/mage/cards/v/VexingSphinx.java index 3a1f7376c2c..d5908b2b31f 100644 --- a/Mage.Sets/src/mage/cards/v/VexingSphinx.java +++ b/Mage.Sets/src/mage/cards/v/VexingSphinx.java @@ -30,7 +30,7 @@ package mage.cards.v; import java.util.UUID; import mage.MageInt; import mage.abilities.common.DiesTriggeredAbility; -import mage.abilities.costs.common.DiscardTargetCost; +import mage.abilities.costs.common.DiscardCardCost; import mage.abilities.keyword.FlyingAbility; import mage.abilities.dynamicvalue.common.CountersSourceCount; import mage.abilities.effects.common.DrawCardSourceControllerEffect; @@ -40,7 +40,6 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.counters.CounterType; -import mage.target.common.TargetCardInHand; /** * @@ -59,7 +58,7 @@ public class VexingSphinx extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // Cumulative upkeep-Discard a card. - this.addAbility(new CumulativeUpkeepAbility(new DiscardTargetCost(new TargetCardInHand()))); + this.addAbility(new CumulativeUpkeepAbility(new DiscardCardCost())); // When Vexing Sphinx dies, draw a card for each age counter on it. this.addAbility(new DiesTriggeredAbility(new DrawCardSourceControllerEffect(new CountersSourceCount(CounterType.AGE)))); diff --git a/Mage.Sets/src/mage/cards/v/VodalianMerchant.java b/Mage.Sets/src/mage/cards/v/VodalianMerchant.java index 448e135a9dc..c63300fd079 100644 --- a/Mage.Sets/src/mage/cards/v/VodalianMerchant.java +++ b/Mage.Sets/src/mage/cards/v/VodalianMerchant.java @@ -29,7 +29,7 @@ package mage.cards.v; import java.util.UUID; import mage.MageInt; -import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.common.DrawDiscardControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -43,13 +43,13 @@ import mage.constants.SubType; public class VodalianMerchant extends CardImpl { public VodalianMerchant(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}"); this.subtype.add(SubType.MERFOLK); this.power = new MageInt(1); this.toughness = new MageInt(2); // When Vodalian Merchant enters the battlefield, draw a card, then discard a card. - this.addAbility(new EntersBattlefieldAbility(new DrawDiscardControllerEffect(1, 1, false))); + this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawDiscardControllerEffect(1, 1, false))); } public VodalianMerchant(final VodalianMerchant card) { diff --git a/Mage.Sets/src/mage/cards/v/VraskaRelicSeeker.java b/Mage.Sets/src/mage/cards/v/VraskaRelicSeeker.java index 4795a2c12f1..0ca53b9549e 100644 --- a/Mage.Sets/src/mage/cards/v/VraskaRelicSeeker.java +++ b/Mage.Sets/src/mage/cards/v/VraskaRelicSeeker.java @@ -90,7 +90,7 @@ class VraskaRelicSeekerDestroyEffect extends OneShotEffect { VraskaRelicSeekerDestroyEffect() { super(Outcome.Benefit); - this.staticText = "Destroy target artifact, creature, or enchantment. Create a colorless Treasure artifact token with \"{T}, Sacrfice this artifact. Add one mana of any color to your mana pool.\""; + this.staticText = "Destroy target artifact, creature, or enchantment. Create a colorless Treasure artifact token with \"{T}, Sacrifice this artifact. Add one mana of any color to your mana pool.\""; } VraskaRelicSeekerDestroyEffect(final VraskaRelicSeekerDestroyEffect effect) { diff --git a/Mage.Sets/src/mage/cards/w/WakeThrasher.java b/Mage.Sets/src/mage/cards/w/WakeThrasher.java index 077a90acaa9..b9f7be99fe8 100644 --- a/Mage.Sets/src/mage/cards/w/WakeThrasher.java +++ b/Mage.Sets/src/mage/cards/w/WakeThrasher.java @@ -49,7 +49,7 @@ import mage.game.events.GameEvent.EventType; public class WakeThrasher extends CardImpl { public WakeThrasher(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); this.subtype.add(SubType.MERFOLK); this.subtype.add(SubType.SOLDIER); @@ -57,7 +57,7 @@ public class WakeThrasher extends CardImpl { this.toughness = new MageInt(1); // Whenever a permanent you control becomes untapped, Wake Thrasher gets +1/+1 until end of turn. - this.addAbility(new BecomesUntappedControlledPermanentTriggeredAbility(new BoostSourceEffect(1,1, Duration.EndOfTurn), false)); + this.addAbility(new BecomesUntappedControlledPermanentTriggeredAbility(new BoostSourceEffect(1, 1, Duration.EndOfTurn), false)); } @@ -71,7 +71,7 @@ public class WakeThrasher extends CardImpl { } } -class BecomesUntappedControlledPermanentTriggeredAbility extends TriggeredAbilityImpl{ +class BecomesUntappedControlledPermanentTriggeredAbility extends TriggeredAbilityImpl { public BecomesUntappedControlledPermanentTriggeredAbility(Effect effect, boolean optional) { super(Zone.BATTLEFIELD, effect, optional); @@ -98,7 +98,7 @@ class BecomesUntappedControlledPermanentTriggeredAbility extends TriggeredAbilit @Override public String getRule() { - return "When a permanent you control becomes untapped, " + super.getRule(); + return "Whenever a permanent you control becomes untapped, " + super.getRule(); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/w/WakerOfTheWilds.java b/Mage.Sets/src/mage/cards/w/WakerOfTheWilds.java index f9cbcd3f23c..ab1ff757723 100644 --- a/Mage.Sets/src/mage/cards/w/WakerOfTheWilds.java +++ b/Mage.Sets/src/mage/cards/w/WakerOfTheWilds.java @@ -62,8 +62,14 @@ public class WakerOfTheWilds extends CardImpl { this.toughness = new MageInt(3); // {X}{G}{G}: Put X +1/+1 counters on target land you control. That land becomes a 0/0 Elemental creature with haste that's still a land. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, - new AddCountersTargetEffect(CounterType.P1P1.createInstance(0), new ManacostVariableValue()), new ManaCostsImpl("{X}{G}{G}")); + Ability ability = new SimpleActivatedAbility( + Zone.BATTLEFIELD, + new AddCountersTargetEffect( + CounterType.P1P1.createInstance(0), + new ManacostVariableValue() + ).setText("Put X +1/+1 counters on target land you control."), + new ManaCostsImpl("{X}{G}{G}") + ); Effect effect = new BecomesCreatureTargetEffect(new WallOfResurgenceToken(), false, true, Duration.Custom); effect.setText("That land becomes a 0/0 Elemental creature with haste. It's still a land"); ability.addEffect(effect); diff --git a/Mage.Sets/src/mage/cards/w/WardOfBones.java b/Mage.Sets/src/mage/cards/w/WardOfBones.java index 85058af51f3..ca33b2b267c 100644 --- a/Mage.Sets/src/mage/cards/w/WardOfBones.java +++ b/Mage.Sets/src/mage/cards/w/WardOfBones.java @@ -76,7 +76,9 @@ class WardOfBonesEffect extends ContinuousRuleModifyingEffectImpl { public WardOfBonesEffect() { super(Duration.WhileOnBattlefield, Outcome.Benefit); - staticText = "Each opponent who controls more creatures than you can't play creature cards. The same is true for artifacts, enchantments, and lands"; + staticText = "Each opponent who controls more creatures than you can't cast creature spells. " + + "The same is true for artifacts and enchantments.

" + + "Each opponent who controls more lands than you can't play lands."; } public WardOfBonesEffect(final WardOfBonesEffect effect) { diff --git a/Mage.Sets/src/mage/cards/w/WaterspoutElemental.java b/Mage.Sets/src/mage/cards/w/WaterspoutElemental.java index 2317a14d4e0..f8abdd82729 100644 --- a/Mage.Sets/src/mage/cards/w/WaterspoutElemental.java +++ b/Mage.Sets/src/mage/cards/w/WaterspoutElemental.java @@ -69,7 +69,7 @@ public class WaterspoutElemental extends CardImpl { EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandFromBattlefieldAllEffect(filter)); ability.addEffect(new SkipNextTurnSourceEffect()); this.addAbility(new ConditionalTriggeredAbility(ability, KickedCondition.instance, - "When {this} enters the battlefield, if it was kicked, return all other creatures to their owners' hands and you skip your next turn")); + "When {this} enters the battlefield, if it was kicked, return all other creatures to their owners' hands and you skip your next turn.")); } public WaterspoutElemental(final WaterspoutElemental card) { diff --git a/Mage.Sets/src/mage/cards/w/WelkinHawk.java b/Mage.Sets/src/mage/cards/w/WelkinHawk.java index 8996177ae0c..81cb90cac0f 100644 --- a/Mage.Sets/src/mage/cards/w/WelkinHawk.java +++ b/Mage.Sets/src/mage/cards/w/WelkinHawk.java @@ -44,9 +44,8 @@ import mage.target.common.TargetCardInLibrary; * * @author fireshoes */ - public class WelkinHawk extends CardImpl { - + private static final FilterCard filter = new FilterCard("card named Welkin Hawk"); static { @@ -54,16 +53,16 @@ public class WelkinHawk extends CardImpl { } public WelkinHawk(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); this.subtype.add(SubType.BIRD); this.power = new MageInt(1); this.toughness = new MageInt(1); // Flying this.addAbility(FlyingAbility.getInstance()); - + // When Welkin Hawk dies, you may search your library for a card named Welkin Hawk, reveal that card, put it into your hand, then shuffle your library. - TargetCardInLibrary target = new TargetCardInLibrary(0, 1, filter); + TargetCardInLibrary target = new TargetCardInLibrary(1, 1, filter); this.addAbility(new DiesTriggeredAbility(new SearchLibraryPutInHandEffect(target, true, true), true)); } diff --git a/Mage.Sets/src/mage/cards/w/WheelOfFate.java b/Mage.Sets/src/mage/cards/w/WheelOfFate.java index fa76391ccee..4dd0bd1ae02 100644 --- a/Mage.Sets/src/mage/cards/w/WheelOfFate.java +++ b/Mage.Sets/src/mage/cards/w/WheelOfFate.java @@ -43,7 +43,7 @@ import mage.constants.CardType; public class WheelOfFate extends CardImpl { public WheelOfFate(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},""); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, ""); this.color.setRed(true); @@ -51,7 +51,7 @@ public class WheelOfFate extends CardImpl { this.addAbility(new SuspendAbility(4, new ManaCostsImpl("{1}{R}"), this)); // Each player discards his or her hand, then draws seven cards. this.getSpellAbility().addEffect(new DiscardHandAllEffect()); - this.getSpellAbility().addEffect(new DrawCardAllEffect(7)); + this.getSpellAbility().addEffect(new DrawCardAllEffect(7).setText(", then draws seven cards")); } public WheelOfFate(final WheelOfFate card) { diff --git a/Mage.Sets/src/mage/cards/w/WhiteManaBattery.java b/Mage.Sets/src/mage/cards/w/WhiteManaBattery.java index fada4c7f921..d2304d34b99 100644 --- a/Mage.Sets/src/mage/cards/w/WhiteManaBattery.java +++ b/Mage.Sets/src/mage/cards/w/WhiteManaBattery.java @@ -64,10 +64,10 @@ public class WhiteManaBattery extends CardImpl { Mana.WhiteMana(1), new IntPlusDynamicValue(1, new RemovedCountersForCostValue()), new TapSourceCost(), - "Add {W} to your mana pool, then add {W} to your mana pool for each storage counter removed this way", - true, new CountersSourceCount(CounterType.STORAGE)); - ability.addCost(new RemoveVariableCountersSourceCost(CounterType.STORAGE.createInstance(), - "Remove X storage counters from {this}")); + "Add {W} to your mana pool, then add {W} to your mana pool for each charge counter removed this way", + true, new CountersSourceCount(CounterType.CHARGE)); + ability.addCost(new RemoveVariableCountersSourceCost(CounterType.CHARGE.createInstance(), + "Remove any number of charge counters from {this}")); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/w/WormwoodDryad.java b/Mage.Sets/src/mage/cards/w/WormwoodDryad.java index b82f938a240..3751876afd3 100644 --- a/Mage.Sets/src/mage/cards/w/WormwoodDryad.java +++ b/Mage.Sets/src/mage/cards/w/WormwoodDryad.java @@ -50,7 +50,7 @@ import mage.constants.Zone; public class WormwoodDryad extends CardImpl { public WormwoodDryad(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.DRYAD); this.power = new MageInt(3); this.toughness = new MageInt(1); @@ -58,13 +58,13 @@ public class WormwoodDryad extends CardImpl { // {G}: Wormwood Dryad gains forestwalk until end of turn and deals 1 damage to you. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(new ForestwalkAbility(false), Duration.EndOfTurn), new ManaCostsImpl("{G}")); - ability.addEffect(new DamageControllerEffect(1)); + ability.addEffect(new DamageControllerEffect(1).setText("and deals 1 damage to you")); this.addAbility(ability); // {B}: Wormwood Dryad gains swampwalk until end of turn and deals 1 damage to you. ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(new SwampwalkAbility(false), Duration.EndOfTurn), new ManaCostsImpl("{B}")); - ability.addEffect(new DamageControllerEffect(1)); + ability.addEffect(new DamageControllerEffect(1).setText("and deals 1 damage to you")); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/Mirrodin.java b/Mage.Sets/src/mage/sets/Mirrodin.java index 2348a680acf..7222f68d8a5 100644 --- a/Mage.Sets/src/mage/sets/Mirrodin.java +++ b/Mage.Sets/src/mage/sets/Mirrodin.java @@ -250,6 +250,7 @@ public class Mirrodin extends ExpansionSet { cards.add(new SetCardInfo("Soul Foundry", 246, Rarity.RARE, mage.cards.s.SoulFoundry.class)); cards.add(new SetCardInfo("Soul Nova", 25, Rarity.UNCOMMON, mage.cards.s.SoulNova.class)); cards.add(new SetCardInfo("Spellweaver Helix", 247, Rarity.RARE, mage.cards.s.SpellweaverHelix.class)); + cards.add(new SetCardInfo("Sphere of Purity", 26, Rarity.COMMON, mage.cards.s.SphereOfPurity.class)); cards.add(new SetCardInfo("Spikeshot Goblin", 108, Rarity.COMMON, mage.cards.s.SpikeshotGoblin.class)); cards.add(new SetCardInfo("Spoils of the Vault", 78, Rarity.RARE, mage.cards.s.SpoilsOfTheVault.class)); cards.add(new SetCardInfo("Stalking Stones", 284, Rarity.UNCOMMON, mage.cards.s.StalkingStones.class)); diff --git a/Mage.Sets/src/mage/sets/UrzasDestiny.java b/Mage.Sets/src/mage/sets/UrzasDestiny.java index e05b5e775aa..6a243198e5f 100644 --- a/Mage.Sets/src/mage/sets/UrzasDestiny.java +++ b/Mage.Sets/src/mage/sets/UrzasDestiny.java @@ -73,7 +73,7 @@ public class UrzasDestiny extends ExpansionSet { cards.add(new SetCardInfo("Capashen Standard", 4, Rarity.COMMON, mage.cards.c.CapashenStandard.class)); cards.add(new SetCardInfo("Capashen Templar", 5, Rarity.COMMON, mage.cards.c.CapashenTemplar.class)); cards.add(new SetCardInfo("Carnival of Souls", 55, Rarity.RARE, mage.cards.c.CarnivalOfSouls.class)); - cards.add(new SetCardInfo("Chime of Night", 56, Rarity.COMMON, mage.cards.c.ChimeOfNight.class)); + cards.add(new SetCardInfo("Chime of Night", 56, Rarity.COMMON, mage.cards.c.ChimeOfNight.class)); cards.add(new SetCardInfo("Colos Yearling", 79, Rarity.COMMON, mage.cards.c.ColosYearling.class)); cards.add(new SetCardInfo("Compost", 102, Rarity.UNCOMMON, mage.cards.c.Compost.class)); cards.add(new SetCardInfo("Covetous Dragon", 80, Rarity.RARE, mage.cards.c.CovetousDragon.class)); @@ -95,6 +95,7 @@ public class UrzasDestiny extends ExpansionSet { cards.add(new SetCardInfo("Fodder Cannon", 131, Rarity.UNCOMMON, mage.cards.f.FodderCannon.class)); cards.add(new SetCardInfo("Gamekeeper", 106, Rarity.UNCOMMON, mage.cards.g.Gamekeeper.class)); cards.add(new SetCardInfo("Goblin Berserker", 82, Rarity.UNCOMMON, mage.cards.g.GoblinBerserker.class)); + cards.add(new SetCardInfo("Goblin Festival", 83, Rarity.RARE, mage.cards.g.GoblinFestival.class)); cards.add(new SetCardInfo("Goblin Gardener", 84, Rarity.COMMON, mage.cards.g.GoblinGardener.class)); cards.add(new SetCardInfo("Goblin Marshal", 85, Rarity.RARE, mage.cards.g.GoblinMarshal.class)); cards.add(new SetCardInfo("Goblin Masons", 86, Rarity.COMMON, mage.cards.g.GoblinMasons.class)); @@ -104,7 +105,7 @@ public class UrzasDestiny extends ExpansionSet { cards.add(new SetCardInfo("Hunting Moa", 109, Rarity.UNCOMMON, mage.cards.h.HuntingMoa.class)); cards.add(new SetCardInfo("Illuminated Wings", 34, Rarity.COMMON, mage.cards.i.IlluminatedWings.class)); cards.add(new SetCardInfo("Impatience", 88, Rarity.RARE, mage.cards.i.Impatience.class)); - cards.add(new SetCardInfo("Iridescent Drake", 35, Rarity.UNCOMMON, mage.cards.i.IridescentDrake.class)); + cards.add(new SetCardInfo("Iridescent Drake", 35, Rarity.UNCOMMON, mage.cards.i.IridescentDrake.class)); cards.add(new SetCardInfo("Junk Diver", 132, Rarity.RARE, mage.cards.j.JunkDiver.class)); cards.add(new SetCardInfo("Keldon Champion", 90, Rarity.UNCOMMON, mage.cards.k.KeldonChampion.class)); cards.add(new SetCardInfo("Keldon Vandals", 91, Rarity.COMMON, mage.cards.k.KeldonVandals.class)); @@ -140,7 +141,7 @@ public class UrzasDestiny extends ExpansionSet { cards.add(new SetCardInfo("Rescue", 44, Rarity.COMMON, mage.cards.r.Rescue.class)); cards.add(new SetCardInfo("Rofellos, Llanowar Emissary", 118, Rarity.RARE, mage.cards.r.RofellosLlanowarEmissary.class)); cards.add(new SetCardInfo("Sanctimony", 16, Rarity.UNCOMMON, mage.cards.s.Sanctimony.class)); - cards.add(new SetCardInfo("Scent of Jasmine", 17, Rarity.COMMON, mage.cards.s.ScentOfJasmine.class)); + cards.add(new SetCardInfo("Scent of Jasmine", 17, Rarity.COMMON, mage.cards.s.ScentOfJasmine.class)); cards.add(new SetCardInfo("Scour", 18, Rarity.UNCOMMON, mage.cards.s.Scour.class)); cards.add(new SetCardInfo("Serra Advocate", 19, Rarity.UNCOMMON, mage.cards.s.SerraAdvocate.class)); cards.add(new SetCardInfo("Sigil of Sleep", 46, Rarity.COMMON, mage.cards.s.SigilOfSleep.class)); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/DeathtouchTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/DeathtouchTest.java index 5d6ec647d16..387bc7127e8 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/DeathtouchTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/DeathtouchTest.java @@ -88,7 +88,7 @@ public class DeathtouchTest extends CardTestPlayerBase { activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Equip {2}", "Marath, Will of the Wild", "Marath, Will of the Wild", StackClause.WHILE_NOT_ON_STACK); - activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{X},Remove X +1/+1 counters from Marath", "Archangel of Thune"); + activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{X}, Remove X +1/+1 counters from Marath", "Archangel of Thune"); setChoice(playerA, "X=3"); setModeChoice(playerA, "2"); // Marath deals X damage to target creature or player @@ -132,7 +132,7 @@ public class DeathtouchTest extends CardTestPlayerBase { activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Equip {2}", "Marath, Will of the Wild"); - activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{X},Remove X +1/+1 counters from Marath", "Elesh Norn, Grand Cenobite"); + activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{X}, Remove X +1/+1 counters from Marath", "Elesh Norn, Grand Cenobite"); setModeChoice(playerA, "2"); // Marath deals X damage to target creature or player setChoice(playerA, "X=1"); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ManifestTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ManifestTest.java index 4d9ad428692..058c8787f88 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ManifestTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/ManifestTest.java @@ -273,7 +273,7 @@ public class ManifestTest extends CardTestPlayerBase { skipInitShuffling(); - activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{1}{B},{T}, Sacrifice another creature"); + activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{1}{B}, {T}, Sacrifice another creature"); addTarget(playerB, "Silvercoat Lion"); setStopAt(2, PhaseStep.BEGIN_COMBAT); @@ -309,7 +309,7 @@ public class ManifestTest extends CardTestPlayerBase { skipInitShuffling(); - activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{1}{B},{T}, Sacrifice another creature"); + activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{1}{B}, {T}, Sacrifice another creature"); addTarget(playerB, "Silvercoat Lion"); activateAbility(2, PhaseStep.POSTCOMBAT_MAIN, playerB, "{5}{G}: Turn"); @@ -353,7 +353,7 @@ public class ManifestTest extends CardTestPlayerBase { skipInitShuffling(); - activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{1}{B},{T}, Sacrifice another creature"); + activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{1}{B}, {T}, Sacrifice another creature"); addTarget(playerB, "Silvercoat Lion"); setStopAt(2, PhaseStep.END_TURN); @@ -431,7 +431,7 @@ public class ManifestTest extends CardTestPlayerBase { skipInitShuffling(); - activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{1}{B},{T}, Sacrifice another creature"); + activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{1}{B}, {T}, Sacrifice another creature"); setChoice(playerB, "Silvercoat Lion"); activateAbility(2, PhaseStep.POSTCOMBAT_MAIN, playerB, "Sacrifice a creature"); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/SuspendTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/SuspendTest.java index b57d4b3c5a6..9f25fe66a11 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/SuspendTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/SuspendTest.java @@ -82,7 +82,7 @@ public class SuspendTest extends CardTestPlayerBase { addCard(Zone.HAND, playerA, "Silvercoat Lion", 1); addCard(Zone.BATTLEFIELD, playerA, "Jhoira of the Ghitu", 1); - activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{2},Exile a nonland card from your hand: Put four time counters on the exiled card. If it doesn't have suspend, it gains suspend"); + activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{2}, Exile a nonland card from your hand: Put four time counters on the exiled card. If it doesn't have suspend, it gains suspend"); setChoice(playerA, "Silvercoat Lion"); setStopAt(11, PhaseStep.PRECOMBAT_MAIN); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/exile/ExileAndReturnTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/exile/ExileAndReturnTest.java index 23cf48dd180..9d950e8a0f3 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/exile/ExileAndReturnTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/exile/ExileAndReturnTest.java @@ -53,7 +53,7 @@ public class ExileAndReturnTest extends CardTestPlayerBase { castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Tawnos's Coffin"); - activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{3},{T}", "Silvercoat Lion"); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{3}, {T}", "Silvercoat Lion"); setStopAt(3, PhaseStep.PRECOMBAT_MAIN); execute(); @@ -83,7 +83,7 @@ public class ExileAndReturnTest extends CardTestPlayerBase { castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Tawnos's Coffin"); castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Battlegrowth", "Silvercoat Lion"); - activateAbility(2, PhaseStep.POSTCOMBAT_MAIN, playerA, "{3},{T}", "Silvercoat Lion"); + activateAbility(2, PhaseStep.POSTCOMBAT_MAIN, playerA, "{3}, {T}", "Silvercoat Lion"); setStopAt(3, PhaseStep.PRECOMBAT_MAIN); execute(); @@ -123,7 +123,7 @@ public class ExileAndReturnTest extends CardTestPlayerBase { castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Battlegrowth", "Bramble Elemental"); castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Blanchwood Armor", "Bramble Elemental"); castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Frog Tongue", "Bramble Elemental"); - activateAbility(2, PhaseStep.POSTCOMBAT_MAIN, playerA, "{3},{T}", "Bramble Elemental"); + activateAbility(2, PhaseStep.POSTCOMBAT_MAIN, playerA, "{3}, {T}", "Bramble Elemental"); setStopAt(3, PhaseStep.PRECOMBAT_MAIN); execute(); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/sacrifice/TradingPostTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/sacrifice/TradingPostTest.java index 2ca85699eb1..f1e1a6900fb 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/sacrifice/TradingPostTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/oneshot/sacrifice/TradingPostTest.java @@ -59,7 +59,7 @@ public class TradingPostTest extends CardTestPlayerBase { castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Act of Treason", "Savannah Lions"); - activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{1},{T}, Sacrifice a creature", "Helm of Possession", "Act of Treason", StackClause.WHILE_NOT_ON_STACK); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{1}, {T}, Sacrifice a creature", "Helm of Possession", "Act of Treason", StackClause.WHILE_NOT_ON_STACK); setChoice(playerA, "Savannah Lions"); setStopAt(1, PhaseStep.BEGIN_COMBAT); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/other/SoulfireGrandMasterTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/other/SoulfireGrandMasterTest.java index 32387a9896d..d180cdadf67 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/other/SoulfireGrandMasterTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/other/SoulfireGrandMasterTest.java @@ -185,7 +185,7 @@ public class SoulfireGrandMasterTest extends CardTestPlayerBase { // {3}, {T}: Rod of Ruin deals 1 damage to target creature or player. addCard(Zone.BATTLEFIELD, playerA, "Rod of Ruin", 1); - activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{3},{T}"); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{3}, {T}"); setStopAt(1, PhaseStep.BEGIN_COMBAT); execute(); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/continuous/AngelOfJubilationTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/continuous/AngelOfJubilationTest.java index b5acc76e54a..e5ce6a0800f 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/continuous/AngelOfJubilationTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/continuous/AngelOfJubilationTest.java @@ -82,7 +82,7 @@ public class AngelOfJubilationTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerB, "Island", 4); addCard(Zone.BATTLEFIELD, playerB, "Food Chain"); - activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerB, "{2},Sacrifice a permanent you control: Return target creature to its owner's hand."); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerB, "{2}, Sacrifice a permanent you control: Return target creature to its owner's hand."); playerB.addChoice("Food Chain"); playerA.addTarget("Angel of Jubilation"); @@ -100,7 +100,7 @@ public class AngelOfJubilationTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerB, "Nantuko Husk"); addCard(Zone.BATTLEFIELD, playerB, "Llanowar Elves", 2); - activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerB, "{2},Sacrifice a permanent you control: Return target creature to its owner's hand."); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerB, "{2}, Sacrifice a permanent you control: Return target creature to its owner's hand."); playerB.addChoice("Nantuko Husk"); playerA.addTarget("Angel of Jubilation"); @@ -151,7 +151,7 @@ public class AngelOfJubilationTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerB, "Tomb of Urami"); addCard(Zone.BATTLEFIELD, playerB, "Swamp", 4); - activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerB, "{2}{B}{B},{T}, Sacrifice all lands you control: Create a legendary 5/5 black Demon Spirit creature token with flying named Urami."); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerB, "{2}{B}{B}, {T}, Sacrifice all lands you control: Create a legendary 5/5 black Demon Spirit creature token with flying named Urami."); setStopAt(1, PhaseStep.END_TURN); execute(); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/continuous/SerraAscendantTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/continuous/SerraAscendantTest.java index 1e192121922..ceed83b9974 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/continuous/SerraAscendantTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/continuous/SerraAscendantTest.java @@ -69,7 +69,7 @@ public class SerraAscendantTest extends CardTestPlayerBase { playLand(3, PhaseStep.PRECOMBAT_MAIN, playerA, "Plains"); castSpell(3, PhaseStep.PRECOMBAT_MAIN, playerA, "Martyr of Sands"); - activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{1},You may reveal X white cards from your hand"); + activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{1}, You may reveal X white cards from your hand"); setChoice(playerA,"X=3"); attack(3, playerA, "Serra Ascendant"); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/control/ExchangeControlTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/control/ExchangeControlTest.java index 9eba9d61cb0..038f5665e87 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/control/ExchangeControlTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/control/ExchangeControlTest.java @@ -214,7 +214,7 @@ public class ExchangeControlTest extends CardTestPlayerBase { addTarget(playerA, "Manta Riders"); // now use the activated ability to make the "Silvercoat Lions" (that became Mana Riders) flying - activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{U}: {this} gains Flying until end of turn."); + activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{U}: {this} gains flying until end of turn."); setStopAt(1, PhaseStep.END_TURN); execute(); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/control/GainControlDiedCastAgainTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/control/GainControlDiedCastAgainTest.java index f6cf2fd3f1a..2246c955a10 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/control/GainControlDiedCastAgainTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/control/GainControlDiedCastAgainTest.java @@ -100,7 +100,7 @@ public class GainControlDiedCastAgainTest extends CardTestPlayerBase { castSpell(4, PhaseStep.POSTCOMBAT_MAIN, playerB, "Akroma's Vengeance"); // Put Elesh Norn back on library - activateAbility(5, PhaseStep.END_TURN, playerB, "{1}{B},{T}: Put target creature card", "Elesh Norn, Grand Cenobite"); + activateAbility(5, PhaseStep.END_TURN, playerB, "{1}{B}, {T}: Put target creature card", "Elesh Norn, Grand Cenobite"); castSpell(6, PhaseStep.PRECOMBAT_MAIN, playerB, "Elesh Norn, Grand Cenobite"); setStopAt(6, PhaseStep.BEGIN_COMBAT); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/control/GainControlTargetEffectTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/control/GainControlTargetEffectTest.java index 075d4f1ac03..3a169d8f9d7 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/control/GainControlTargetEffectTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/control/GainControlTargetEffectTest.java @@ -60,10 +60,10 @@ public class GainControlTargetEffectTest extends CardTestPlayerBase { // Persist (When this creature dies, if it had no -1/-1 counters on it, return it to the battlefield under its owner's control with a -1/-1 counter on it.) addCard(Zone.BATTLEFIELD, playerB, "Glen Elendra Archmage"); - activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2},{T}: Gain control of target creature with power less than or equal to the number of Islands you control for as long as {this} remains tapped.", "Glen Elendra Archmage"); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2}, {T}: Gain control of target creature with power less than or equal to the number of Islands you control for as long as {this} remains tapped.", "Glen Elendra Archmage"); castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerB, "Lightning Strike", playerA); - activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{U},Sacrifice {this}: Counter target noncreature spell.", "Lightning Strike"); + activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{U}, Sacrifice {this}: Counter target noncreature spell.", "Lightning Strike"); setStopAt(1, PhaseStep.END_TURN); execute(); @@ -94,7 +94,7 @@ public class GainControlTargetEffectTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerB, "Mutavault", 1); activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{1}: Until end of turn {this} becomes"); - activateAbility(2, PhaseStep.POSTCOMBAT_MAIN, playerA, "{2},{T}: Gain control", "Mutavault"); + activateAbility(2, PhaseStep.POSTCOMBAT_MAIN, playerA, "{2}, {T}: Gain control", "Mutavault"); setChoice(playerA, "No"); // Don't untap the Shackles setStopAt(3, PhaseStep.PRECOMBAT_MAIN); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/control/WillbreakerTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/control/WillbreakerTest.java index 103c8848bb0..893bd4fd0da 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/control/WillbreakerTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/control/WillbreakerTest.java @@ -60,7 +60,7 @@ public class WillbreakerTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion"); - activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{B},Remove", "Silvercoat Lion"); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{B}, Remove", "Silvercoat Lion"); setChoice(playerA, "X=0"); setStopAt(1, PhaseStep.BEGIN_COMBAT); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/copy/FeldonOfTheThirdPathTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/copy/FeldonOfTheThirdPathTest.java index d157967cb53..29f0bf95f49 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/copy/FeldonOfTheThirdPathTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/copy/FeldonOfTheThirdPathTest.java @@ -58,7 +58,7 @@ public class FeldonOfTheThirdPathTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerA, "Mountain", 3); activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerA, - "{2}{R},{T}: Create a token that's a copy of target creature card in your graveyard, except it's an artifact in addition to its other types. It gains haste. Sacrifice it at the beginning of the next end step.", + "{2}{R}, {T}: Create a token that's a copy of target creature card in your graveyard, except it's an artifact in addition to its other types. It gains haste. Sacrifice it at the beginning of the next end step.", "Highway Robber"); setStopAt(2, PhaseStep.POSTCOMBAT_MAIN); execute(); @@ -82,7 +82,7 @@ public class FeldonOfTheThirdPathTest extends CardTestPlayerBase { addCard(Zone.GRAVEYARD, playerB, "Silvercoat Lion", 1); activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerA, - "{2}{R},{T}: Create a token that's a copy of target creature card in your graveyard, except it's an artifact in addition to its other types. It gains haste. Sacrifice it at the beginning of the next end step.", + "{2}{R}, {T}: Create a token that's a copy of target creature card in your graveyard, except it's an artifact in addition to its other types. It gains haste. Sacrifice it at the beginning of the next end step.", "Sepulchral Primordial"); addTarget(playerA, "Silvercoat Lion"); // target for ETB Sepulchral Primordial setStopAt(2, PhaseStep.POSTCOMBAT_MAIN); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/copy/IsochronScepterTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/copy/IsochronScepterTest.java index 2036f56dc25..83697190404 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/copy/IsochronScepterTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/copy/IsochronScepterTest.java @@ -71,7 +71,7 @@ public class IsochronScepterTest extends CardTestPlayerBase { castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Isochron Scepter"); addTarget(playerA, "Lightning Bolt"); - activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{2},{T}:"); + activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{2}, {T}:"); setChoice(playerA, "Yes"); setChoice(playerA, "Yes"); @@ -93,7 +93,7 @@ public class IsochronScepterTest extends CardTestPlayerBase { castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Isochron Scepter"); addTarget(playerA, "Lightning Bolt"); - activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{2},{T}:"); + activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{2}, {T}:"); setChoice(playerA, "Yes"); setChoice(playerA, "No"); @@ -136,7 +136,7 @@ public class IsochronScepterTest extends CardTestPlayerBase { attack(2, playerB, "Dross Crocodile"); attack(2, playerB, "Dross Crocodile"); - activateAbility(2, PhaseStep.DECLARE_BLOCKERS, playerA, "{2},{T}:"); + activateAbility(2, PhaseStep.DECLARE_BLOCKERS, playerA, "{2}, {T}:"); setChoice(playerA, "Yes"); setChoice(playerA, "Yes"); @@ -180,7 +180,7 @@ public class IsochronScepterTest extends CardTestPlayerBase { castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Isochron Scepter"); addTarget(playerA, "Silence"); - activateAbility(2, PhaseStep.UPKEEP, playerA, "{2},{T}:"); + activateAbility(2, PhaseStep.UPKEEP, playerA, "{2}, {T}:"); setChoice(playerA, "Yes"); setChoice(playerA, "Yes"); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/copy/MimicVatTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/copy/MimicVatTest.java index 9004e3a81aa..b708a3d6c9a 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/copy/MimicVatTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/copy/MimicVatTest.java @@ -63,10 +63,10 @@ public class MimicVatTest extends CardTestPlayerBase { castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Clone"); setChoice(playerA, "Silvercoat Lion"); - activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2},{T}, Sacrifice a creature"); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2}, {T}, Sacrifice a creature"); setChoice(playerA, "Yes"); - activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{3},{T}: Create a token"); + activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{3}, {T}: Create a token"); setChoice(playerA, "Silvercoat Lion"); setStopAt(3, PhaseStep.BEGIN_COMBAT); @@ -95,10 +95,10 @@ public class MimicVatTest extends CardTestPlayerBase { castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Phyrexian Metamorph"); setChoice(playerA, "Yes"); setChoice(playerA, "Silvercoat Lion"); - activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2},{T}, Sacrifice a creature"); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2}, {T}, Sacrifice a creature"); setChoice(playerA, "Yes"); - activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{3},{T}: Create a token that's a copy of a card exiled with "); + activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{3}, {T}: Create a token that's a copy of a card exiled with "); setChoice(playerA, "Yes"); setChoice(playerA, "Silvercoat Lion"); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/cost/additional/RemoveCounterCostTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/cost/additional/RemoveCounterCostTest.java index 96f73b57b83..d2650054c73 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/cost/additional/RemoveCounterCostTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/cost/additional/RemoveCounterCostTest.java @@ -48,7 +48,7 @@ public class RemoveCounterCostTest extends CardTestPlayerBase { castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Novijen Sages"); - activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{1},Remove two +1/+1 counters"); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{1}, Remove two +1/+1 counters"); setChoice(playerA, "X=2"); setStopAt(1, PhaseStep.BEGIN_COMBAT); execute(); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/cost/modification/HeartstoneTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/cost/modification/HeartstoneTest.java index 9310dcbf952..f33ff1c4fb4 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/cost/modification/HeartstoneTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/cost/modification/HeartstoneTest.java @@ -54,7 +54,7 @@ public class HeartstoneTest extends CardTestPlayerBase { addCard(Zone.HAND, playerB, "Lightning Bolt"); castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Lightning Bolt", playerA); - activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{1}{U},Tap two untapped Wizards you control: Copy target instant or sorcery spell. You may choose new targets for the copy.", "Lightning Bolt"); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{1}{U}, Tap two untapped Wizards you control: Copy target instant or sorcery spell. You may choose new targets for the copy.", "Lightning Bolt"); setChoice(playerA, "Yes"); addTarget(playerA, playerB); setStopAt(1, PhaseStep.BEGIN_COMBAT); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/enchantments/SkullclampTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/enchantments/SkullclampTest.java index 2d00ce3f91c..71ea880114b 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/enchantments/SkullclampTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/enchantments/SkullclampTest.java @@ -69,7 +69,7 @@ public class SkullclampTest extends CardTestPlayerBase { activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Equip", "Silvercoat Lion"); - activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerB, "{X},Sacrifice"); + activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerB, "{X}, Sacrifice"); setChoice(playerB, "X=2"); setStopAt(1, PhaseStep.END_TURN); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/mana/ConditionalManaTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/mana/ConditionalManaTest.java index 4c68018520f..104cebecbf1 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/mana/ConditionalManaTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/mana/ConditionalManaTest.java @@ -128,7 +128,7 @@ public class ConditionalManaTest extends CardTestPlayerBase { activateManaAbility(2, PhaseStep.POSTCOMBAT_MAIN, playerB, "{T}: Add {C}{C}{C}{C}"); - activateAbility(2, PhaseStep.POSTCOMBAT_MAIN, playerB, "{X},{T}: Untap"); + activateAbility(2, PhaseStep.POSTCOMBAT_MAIN, playerB, "{X}, {T}: Untap"); setChoice(playerB, "X=4"); addTarget(playerB, "Island"); addTarget(playerB, "Island"); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/mana/CryptGhastTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/mana/CryptGhastTest.java index b178bc64728..54f9684f2e7 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/mana/CryptGhastTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/mana/CryptGhastTest.java @@ -84,7 +84,7 @@ public class CryptGhastTest extends CardTestPlayerBase { // {X}{U}{R},{T}: Nin, the Pain Artist deals X damage to target creature. That creature's controller draws X cards. addCard(Zone.BATTLEFIELD, playerB, "Nin, the Pain Artist", 1); - activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{X}{U}{R},{T}: {this} deals X damage to target creature", "Crypt Ghast"); + activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{X}{U}{R}, {T}: {this} deals X damage to target creature", "Crypt Ghast"); setChoice(playerB, "X=2"); // Crypt Ghast may no longer give additional mana diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/mana/DoublingCubeTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/mana/DoublingCubeTest.java index 19b042b09d6..e5d467026c8 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/mana/DoublingCubeTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/mana/DoublingCubeTest.java @@ -1,12 +1,10 @@ package org.mage.test.cards.mana; -import mage.abilities.costs.mana.ColorlessManaCost; import mage.constants.ManaType; import mage.constants.PhaseStep; import mage.constants.Zone; import org.junit.Test; import org.mage.test.serverside.base.CardTestPlayerBase; -import org.mage.test.serverside.base.impl.CardTestAPIImpl; public class DoublingCubeTest extends CardTestPlayerBase { @@ -26,18 +24,16 @@ public class DoublingCubeTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerA, cube); addCard(Zone.BATTLEFIELD, playerA, upwelling); - activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {G} to your mana pool"); activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {G} to your mana pool"); activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {G} to your mana pool"); activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Add {C}{C}"); - activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{3},{T}:"); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{3}, {T}:"); setStopAt(1, PhaseStep.PRECOMBAT_MAIN); execute(); assertManaPool(playerA, ManaType.COLORLESS, 4); - } } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/mana/HarvesterDruidTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/mana/HarvesterDruidTest.java index 48ce51cda9a..f03c021f1ce 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/mana/HarvesterDruidTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/mana/HarvesterDruidTest.java @@ -52,8 +52,8 @@ public class HarvesterDruidTest extends CardTestPlayerBase { execute(); ManaOptions options = playerA.getAvailableManaTest(currentGame); - Assert.assertEquals("Player should be able to create 2 red and 1 blue mana", "{R}{R}{U}", options.get(0).toString()); - Assert.assertEquals("Player should be able to create 1 red and 3 blue mana", "{R}{U}{U}", options.get(1).toString()); + Assert.assertEquals("Player should be able to create 2 red and 1 blue mana", "{U}{R}{R}", options.get(0).toString()); + Assert.assertEquals("Player should be able to create 1 red and 3 blue mana", "{U}{U}{R}", options.get(1).toString()); } @Test @@ -68,9 +68,9 @@ public class HarvesterDruidTest extends CardTestPlayerBase { execute(); ManaOptions options = playerA.getAvailableManaTest(currentGame); - Assert.assertEquals("Player should be able to create 3 red and 1 blue mana", "{R}{R}{R}{U}", options.get(0).toString()); - Assert.assertEquals("Player should be able to create 2 red and 2 blue mana", "{R}{R}{U}{U}", options.get(1).toString()); - Assert.assertEquals("Player should be able to create 2 red and 2 blue mana", "{R}{R}{U}{U}", options.get(2).toString()); - Assert.assertEquals("Player should be able to create 1 red and 3 blue mana", "{R}{U}{U}{U}", options.get(3).toString()); + Assert.assertEquals("Player should be able to create 3 red and 1 blue mana", "{U}{R}{R}{R}", options.get(0).toString()); + Assert.assertEquals("Player should be able to create 2 red and 2 blue mana", "{U}{U}{R}{R}", options.get(1).toString()); + Assert.assertEquals("Player should be able to create 2 red and 2 blue mana", "{U}{U}{R}{R}", options.get(2).toString()); + Assert.assertEquals("Player should be able to create 1 red and 3 blue mana", "{U}{U}{U}{R}", options.get(3).toString()); } } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/mana/NykthosShrineToNyxTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/mana/NykthosShrineToNyxTest.java index 2c7a35b08c2..29df140553e 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/mana/NykthosShrineToNyxTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/mana/NykthosShrineToNyxTest.java @@ -52,7 +52,7 @@ public class NykthosShrineToNyxTest extends CardTestPlayerBase { // Omnath, Locus of Mana gets +1/+1 for each green mana in your mana pool. addCard(Zone.BATTLEFIELD, playerA, "Omnath, Locus of Mana", 1); - activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2},{T}: Choose a color. Add to your mana pool an amount of mana of that color equal to your devotion to that color."); + activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2}, {T}: Choose a color. Add to your mana pool an amount of mana of that color equal to your devotion to that color."); setChoice(playerA, "Green"); setStopAt(1, PhaseStep.PRECOMBAT_MAIN); @@ -75,12 +75,12 @@ public class NykthosShrineToNyxTest extends CardTestPlayerBase { // Omnath, Locus of Mana gets +1/+1 for each green mana in your mana pool. addCard(Zone.BATTLEFIELD, playerA, "Omnath, Locus of Mana", 1); - activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2},{T}: Choose a color. Add to your mana pool an amount of mana of that color equal to your devotion to that color."); + activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2}, {T}: Choose a color. Add to your mana pool an amount of mana of that color equal to your devotion to that color."); setChoice(playerA, "Green"); activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Untap another target permanent.", "Nykthos, Shrine to Nyx"); - activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2},{T}: Choose a color. Add to your mana pool an amount of mana of that color equal to your devotion to that color."); + activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2}, {T}: Choose a color. Add to your mana pool an amount of mana of that color equal to your devotion to that color."); setChoice(playerA, "Green"); setStopAt(1, PhaseStep.PRECOMBAT_MAIN); @@ -106,12 +106,12 @@ public class NykthosShrineToNyxTest extends CardTestPlayerBase { // If unused mana would empty from your mana pool, that mana becomes colorless instead. addCard(Zone.BATTLEFIELD, playerA, "Kruphix, God of Horizons", 1); // 1 G devotion - activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2},{T}: Choose a color. Add to your mana pool an amount of mana of that color equal to your devotion to that color."); + activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2}, {T}: Choose a color. Add to your mana pool an amount of mana of that color equal to your devotion to that color."); setChoice(playerA, "Green"); activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Untap another target permanent.", "Nykthos, Shrine to Nyx"); - activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2},{T}: Choose a color. Add to your mana pool an amount of mana of that color equal to your devotion to that color."); + activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2}, {T}: Choose a color. Add to your mana pool an amount of mana of that color equal to your devotion to that color."); setChoice(playerA, "Green"); setStopAt(1, PhaseStep.BEGIN_COMBAT); @@ -143,7 +143,7 @@ public class NykthosShrineToNyxTest extends CardTestPlayerBase { castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Cackling Counterpart"); addTarget(playerA, "Simic Guildmage"); - activateManaAbility(1, PhaseStep.BEGIN_COMBAT, playerA, "{2},{T}: Choose a color. Add to your mana pool an amount of mana of that color equal to your devotion to that color."); + activateManaAbility(1, PhaseStep.BEGIN_COMBAT, playerA, "{2}, {T}: Choose a color. Add to your mana pool an amount of mana of that color equal to your devotion to that color."); setChoice(playerA, "Green"); setStopAt(1, PhaseStep.BEGIN_COMBAT); @@ -205,7 +205,7 @@ public class NykthosShrineToNyxTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerA, "Wastes", 2); // two colorless to pay for nykthos addCard(Zone.HAND, playerA, pObliterator); // just for something to cast for 4 black mana - activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2},{T}: Choose a color. Add to your mana pool an amount of mana of that color equal to your devotion to that color."); + activateManaAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2}, {T}: Choose a color. Add to your mana pool an amount of mana of that color equal to your devotion to that color."); setChoice(playerA, "Black"); // should produce 4 black mana castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, pObliterator); // costs exactly 4 black mana should be castable diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/mana/ReflectingPoolTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/mana/ReflectingPoolTest.java index 862b036a30b..8479228d8b7 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/mana/ReflectingPoolTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/mana/ReflectingPoolTest.java @@ -174,13 +174,13 @@ public class ReflectingPoolTest extends CardTestPlayerBase { ManaOptions options = playerA.getAvailableManaTest(currentGame); Assert.assertEquals("Player A should be able to create the ", "{G}{G}{G}", options.get(0).toString()); - Assert.assertEquals("Player A should be able to create the ", "{G}{G}{W}", options.get(1).toString()); - Assert.assertEquals("Player A should be able to create the ", "{G}{G}{W}", options.get(2).toString()); // ManaOption type optimzing seems not optimal yet - Assert.assertEquals("Player A should be able to create the ", "{G}{W}{W}", options.get(3).toString()); + Assert.assertEquals("Player A should be able to create the ", "{W}{G}{G}", options.get(1).toString()); + Assert.assertEquals("Player A should be able to create the ", "{W}{G}{G}", options.get(2).toString()); // ManaOption type optimzing seems not optimal yet + Assert.assertEquals("Player A should be able to create the ", "{W}{W}{G}", options.get(3).toString()); Assert.assertEquals("Player A should be able to create only 3 different mana options", 4, options.size()); options = playerB.getAvailableManaTest(currentGame); - Assert.assertEquals("Player B should be able to create the ", "{G}{W}", options.get(0).toString()); + Assert.assertEquals("Player B should be able to create the ", "{W}{G}", options.get(0).toString()); Assert.assertEquals("Player B should be able to create the ", "{W}{W}", options.get(1).toString()); Assert.assertEquals("Player B should be able to create only 3 different mana options", 2, options.size()); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/mana/SylvokExplorerTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/mana/SylvokExplorerTest.java index be7cc9427ca..3c6fce6f11d 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/mana/SylvokExplorerTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/mana/SylvokExplorerTest.java @@ -70,8 +70,8 @@ public class SylvokExplorerTest extends CardTestPlayerBase { execute(); ManaOptions options = playerA.getAvailableManaTest(currentGame); - Assert.assertEquals("Player should be able to create 1 red and 1 white mana", "{R}{W}", options.get(0).toString()); - Assert.assertEquals("Player should be able to create 1 blue and 1 white mana", "{U}{W}", options.get(1).toString()); + Assert.assertEquals("Player should be able to create 1 red and 1 white mana", "{W}{R}", options.get(0).toString()); + Assert.assertEquals("Player should be able to create 1 blue and 1 white mana", "{W}{U}", options.get(1).toString()); } @Test diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/replacement/GrindstoneTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/replacement/GrindstoneTest.java index eea4e061a7f..56e6ce1d86c 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/replacement/GrindstoneTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/replacement/GrindstoneTest.java @@ -37,12 +37,11 @@ import org.mage.test.serverside.base.CardTestPlayerBase; * * @author LevelX2 */ - public class GrindstoneTest extends CardTestPlayerBase { /** - * Tests that Grindstone mills all cards to graveyard while Painter's Servant is in play - * Leaving one Progenius in play + * Tests that Grindstone mills all cards to graveyard while Painter's + * Servant is in play Leaving one Progenius in play */ @Test public void testGrindstoneProgenius() { @@ -61,19 +60,19 @@ public class GrindstoneTest extends CardTestPlayerBase { castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Painter's Servant"); setChoice(playerA, "Blue"); - activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{3},{T}: Target player puts the top two cards of his or her library into his or her graveyard. If both cards share a color, repeat this process."); + activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{3}, {T}: Target player puts the top two cards of his or her library into his or her graveyard. If both cards share a color, repeat this process."); addTarget(playerA, playerB); setStopAt(1, PhaseStep.END_TURN); execute(); - - Assert.assertEquals("Progenitus has to be in the libarary", 1, playerB.getLibrary().size()); + + Assert.assertEquals("Progenitus has to be in the libarary", 1, playerB.getLibrary().size()); assertPermanentCount(playerA, "Painter's Servant", 1); } - + /** - * Tests that Grindstone mills all cards to graveyard while Painter's Servant is in play - * Iterating with two Progenius for a draw + * Tests that Grindstone mills all cards to graveyard while Painter's + * Servant is in play Iterating with two Progenius for a draw */ @Test public void testGrindstoneProgeniusDraw() { @@ -92,19 +91,19 @@ public class GrindstoneTest extends CardTestPlayerBase { castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Painter's Servant"); setChoice(playerA, "Blue"); - activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{3},{T}: Target player puts the top two cards of his or her library into his or her graveyard. If both cards share a color, repeat this process."); + activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{3}, {T}: Target player puts the top two cards of his or her library into his or her graveyard. If both cards share a color, repeat this process."); addTarget(playerA, playerB); setStopAt(1, PhaseStep.END_TURN); execute(); - + Assert.assertTrue("Has to be a draw because of endless iteration", currentGame.isADraw()); assertPermanentCount(playerA, "Painter's Servant", 1); } - -/** - * Tests that Grindstone mills all cards to graveyard while Painter's Servant is in play - * Iterating with two Progenius for a draw + + /** + * Tests that Grindstone mills all cards to graveyard while Painter's + * Servant is in play Iterating with two Progenius for a draw */ @Test public void testGrindstoneUlamog() { @@ -125,16 +124,14 @@ public class GrindstoneTest extends CardTestPlayerBase { castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Painter's Servant"); setChoice(playerA, "Blue"); - activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{3},{T}: Target player puts the top two cards of his or her library into his or her graveyard. If both cards share a color, repeat this process."); + activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{3}, {T}: Target player puts the top two cards of his or her library into his or her graveyard. If both cards share a color, repeat this process."); addTarget(playerA, playerB); setStopAt(1, PhaseStep.END_TURN); execute(); - + // No cards in graveyard because Ulamog shuffle all cards back to Lib assertGraveyardCount(playerB, 0); assertPermanentCount(playerA, "Painter's Servant", 1); - } + } } - - diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/replacement/LeylineOfTheVoidTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/replacement/LeylineOfTheVoidTest.java index 9ef378862f4..52168da7c82 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/replacement/LeylineOfTheVoidTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/replacement/LeylineOfTheVoidTest.java @@ -59,7 +59,7 @@ public class LeylineOfTheVoidTest extends CardTestPlayerBase { // {X}, {T}: Target opponent puts cards from the top of his or her library into his or her graveyard until a creature card or X cards are put into that graveyard this way, whichever comes first. If a creature card is put into that graveyard this way, sacrifice Helm of Obedience and put that card onto the battlefield under your control. X can't be 0. addCard(Zone.BATTLEFIELD, playerA, "Helm of Obedience"); - activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{X},{T}: Target opponent puts cards", playerB); + activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{X}, {T}: Target opponent puts cards", playerB); setChoice(playerA, "X=1"); setStopAt(1, PhaseStep.END_TURN); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/replacement/ZoneChangeReplacementTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/replacement/ZoneChangeReplacementTest.java index d9c413363f8..6680c849773 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/replacement/ZoneChangeReplacementTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/replacement/ZoneChangeReplacementTest.java @@ -332,7 +332,7 @@ public class ZoneChangeReplacementTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerB, "Swamp", 4); addCard(Zone.GRAVEYARD, playerB, "Silvercoat Lion"); - activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{2}{B}{B},{T}: Return target creature", "Silvercoat Lion"); + activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{2}{B}{B}, {T}: Return target creature", "Silvercoat Lion"); castSpell(2, PhaseStep.BEGIN_COMBAT, playerA, "Terror", "Silvercoat Lion"); setStopAt(2, PhaseStep.END_COMBAT); @@ -364,7 +364,7 @@ public class ZoneChangeReplacementTest extends CardTestPlayerBase { addCard(Zone.GRAVEYARD, playerB, "Swamp", 5); addCard(Zone.GRAVEYARD, playerB, "Jace, Vryn's Prodigy"); - activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{2}{B}{B},{T}: Return target creature", "Jace, Vryn's Prodigy"); + activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{2}{B}{B}, {T}: Return target creature", "Jace, Vryn's Prodigy"); // {T}: Draw a card, then discard a card. If there are five or more cards in your graveyard, exile Jace, Vryn's Prodigy, then return him to the battefield transformed under his owner's control. activateAbility(2, PhaseStep.BEGIN_COMBAT, playerB, "{T}: Draw a card, then discard a card. If there are five or more cards in your graveyard"); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/single/ContagionEngineTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/single/ContagionEngineTest.java index ff91ebf6530..2b24a746802 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/single/ContagionEngineTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/single/ContagionEngineTest.java @@ -85,7 +85,7 @@ public class ContagionEngineTest extends CardTestPlayerBase { castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Contagion Engine"); addTarget(playerA, playerB); - activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{4},{T}: Proliferate"); + activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{4}, {T}: Proliferate"); setChoice(playerA, "Wall of Frost^Kalonian Behemoth^Plated Slagwurm^Teysa, Envoy of Ghosts^Ajani Goldmane"); setChoice(playerA, "Wall of Frost^Kalonian Behemoth^Plated Slagwurm^Teysa, Envoy of Ghosts^Ajani Goldmane"); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/single/MagewrightStoneTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/single/MagewrightStoneTest.java index bc6de562930..9f931fbd179 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/single/MagewrightStoneTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/single/MagewrightStoneTest.java @@ -17,7 +17,7 @@ public class MagewrightStoneTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerA, meanderer, 1, true); addCard(Zone.BATTLEFIELD, playerA, magewrightStone); - activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{1},{T}: Untap target creature", meanderer); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{1}, {T}: Untap target creature", meanderer); setStopAt(1, PhaseStep.POSTCOMBAT_MAIN); execute(); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/single/SoulFoundryTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/single/SoulFoundryTest.java index 09a5327a486..59aae8be99c 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/single/SoulFoundryTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/single/SoulFoundryTest.java @@ -53,7 +53,7 @@ public class SoulFoundryTest extends CardTestPlayerBase { castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Soul Foundry"); setChoice(playerA, "Yes"); - activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{X},{T}: Create a token"); + activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{X}, {T}: Create a token"); setStopAt(1, PhaseStep.END_TURN); execute(); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/single/mir/GrinningTotemTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/single/mir/GrinningTotemTest.java index 0484faccaa5..8069e2d2e1a 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/single/mir/GrinningTotemTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/single/mir/GrinningTotemTest.java @@ -12,7 +12,7 @@ public class GrinningTotemTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerA, "Mountain", 2); addCard(Zone.BATTLEFIELD, playerA, "Grinning Totem"); - activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2},{T}, Sacrifice {this}: Search target opponent's library for a card and exile it", playerB); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2}, {T}, Sacrifice {this}: Search target opponent's library for a card and exile it", playerB); setStopAt(3, PhaseStep.BEGIN_COMBAT); execute(); @@ -28,7 +28,7 @@ public class GrinningTotemTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerB, "Tormod's Crypt"); - activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2},{T}, Sacrifice {this}: Search target opponent's library for a card and exile it", playerB); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2}, {T}, Sacrifice {this}: Search target opponent's library for a card and exile it", playerB); activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerB, "{T}, Sacrifice {this}: Exile all cards", playerA); setStopAt(3, PhaseStep.BEGIN_COMBAT); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/BecomesTheTargetTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/BecomesTheTargetTest.java index 7f90d651e39..6cf97093b46 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/BecomesTheTargetTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/BecomesTheTargetTest.java @@ -52,7 +52,7 @@ public class BecomesTheTargetTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerA, "Silvercoat Lion", 1); - activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{W/P},{T}: Tap target creature", "Silvercoat Lion"); + activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerB, "{W/P}, {T}: Tap target creature", "Silvercoat Lion"); setStopAt(2, PhaseStep.BEGIN_COMBAT); execute(); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/SpellskiteTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/SpellskiteTest.java index d342098352f..28ca2c83e01 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/SpellskiteTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/SpellskiteTest.java @@ -97,7 +97,7 @@ public class SpellskiteTest extends CardTestPlayerBase { // Whenever Frost Titan enters the battlefield or attacks, tap target permanent. It doesn't untap during its controller's next untap step. addCard(Zone.HAND, playerB, "Frost Titan", 1); - activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2},{T}: Gain control", "Spellskite"); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2}, {T}: Gain control", "Spellskite"); castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, "Frost Titan"); addTarget(playerB, "Silvercoat Lion"); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/watchers/FellShepherdTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/watchers/FellShepherdTest.java index 160f68428f0..01a5e9eb1b5 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/watchers/FellShepherdTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/watchers/FellShepherdTest.java @@ -29,7 +29,7 @@ public class FellShepherdTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerA, "Fell Shepherd"); playerA.addChoice("Craw Wurm"); - activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{B},Sacrifice another creature: Target creature gets -2/-2 until end of turn.", "Raging Goblin"); + activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{B}, Sacrifice another creature: Target creature gets -2/-2 until end of turn.", "Raging Goblin"); attack(3, playerA, "Fell Shepherd"); setStopAt(3, PhaseStep.END_TURN); diff --git a/Mage.Tests/src/test/java/org/mage/test/multiplayer/BloodchiefAscensionTest.java b/Mage.Tests/src/test/java/org/mage/test/multiplayer/BloodchiefAscensionTest.java index 0bcc3813764..1569a8ec8d3 100644 --- a/Mage.Tests/src/test/java/org/mage/test/multiplayer/BloodchiefAscensionTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/multiplayer/BloodchiefAscensionTest.java @@ -172,7 +172,7 @@ public class BloodchiefAscensionTest extends CardTestMultiPlayerBase { addCard(Zone.HAND, playerB, "Bellows Lizard", 5); // Player order: A -> D -> C -> B - activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerD, "{U},{T}: Each player discards"); + activateAbility(2, PhaseStep.PRECOMBAT_MAIN, playerD, "{U}, {T}: Each player discards"); setStopAt(2, PhaseStep.BEGIN_COMBAT); execute(); diff --git a/Mage.Tests/src/test/java/org/mage/test/serverside/cards/abilities/ProtectionFromTypeTest.java b/Mage.Tests/src/test/java/org/mage/test/serverside/cards/abilities/ProtectionFromTypeTest.java index 08c6b54f2f1..6c11c327309 100644 --- a/Mage.Tests/src/test/java/org/mage/test/serverside/cards/abilities/ProtectionFromTypeTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/serverside/cards/abilities/ProtectionFromTypeTest.java @@ -17,7 +17,7 @@ public class ProtectionFromTypeTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerB, "Tel-Jilad Fallen"); - activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2},Remove a charge counter from {this}, {T}: put a -1/-1 counter on target creature.", "Tel-Jilad Fallen"); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2}, Remove a charge counter from {this}, {T}: put a -1/-1 counter on target creature.", "Tel-Jilad Fallen"); setStopAt(1, PhaseStep.BEGIN_COMBAT); execute(); @@ -32,7 +32,7 @@ public class ProtectionFromTypeTest extends CardTestPlayerBase { addCard(Zone.BATTLEFIELD, playerB, "Coral Merfolk"); - activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2},Remove a charge counter from {this}, {T}: Put a -1/-1 counter on target creature.", "Coral Merfolk"); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2}, Remove a charge counter from {this}, {T}: Put a -1/-1 counter on target creature.", "Coral Merfolk"); setStopAt(1, PhaseStep.BEGIN_COMBAT); execute(); diff --git a/Mage.Tests/src/test/java/org/mage/test/utils/ManaOptionsTest.java b/Mage.Tests/src/test/java/org/mage/test/utils/ManaOptionsTest.java index 0f45a8e7176..91ea81bf863 100644 --- a/Mage.Tests/src/test/java/org/mage/test/utils/ManaOptionsTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/utils/ManaOptionsTest.java @@ -72,9 +72,9 @@ public class ManaOptionsTest extends CardTestPlayerBase { Assert.assertEquals("mana variations don't fit", 4, manaOptions.size()); Assert.assertEquals("{G}{G}{G}", getManaOption(0, manaOptions)); - Assert.assertEquals("{R}{G}{G}{W}", getManaOption(1, manaOptions)); - Assert.assertEquals("{R}{R}{G}{W}{W}", getManaOption(2, manaOptions)); - Assert.assertEquals("{R}{R}{R}{W}{W}{W}", getManaOption(3, manaOptions)); + Assert.assertEquals("{W}{R}{G}{G}", getManaOption(1, manaOptions)); + Assert.assertEquals("{W}{W}{R}{R}{G}", getManaOption(2, manaOptions)); + Assert.assertEquals("{W}{W}{W}{R}{R}{R}", getManaOption(3, manaOptions)); } @@ -95,11 +95,11 @@ public class ManaOptionsTest extends CardTestPlayerBase { Assert.assertEquals("{C}{C}{W}", getManaOption(1, manaOptions)); Assert.assertEquals("{C}{C}{U}", getManaOption(2, manaOptions)); Assert.assertEquals("{C}{W}{W}", getManaOption(3, manaOptions)); - Assert.assertEquals("{C}{U}{W}", getManaOption(4, manaOptions)); + Assert.assertEquals("{C}{W}{U}", getManaOption(4, manaOptions)); Assert.assertEquals("{C}{U}{U}", getManaOption(5, manaOptions)); Assert.assertEquals("{W}{W}{W}", getManaOption(6, manaOptions)); - Assert.assertEquals("{U}{W}{W}", getManaOption(7, manaOptions)); - Assert.assertEquals("{U}{U}{W}", getManaOption(8, manaOptions)); + Assert.assertEquals("{W}{W}{U}", getManaOption(7, manaOptions)); + Assert.assertEquals("{W}{U}{U}", getManaOption(8, manaOptions)); Assert.assertEquals("{U}{U}{U}", getManaOption(9, manaOptions)); } @@ -151,7 +151,7 @@ public class ManaOptionsTest extends CardTestPlayerBase { ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame); Assert.assertEquals("mana variations don't fit", 1, manaOptions.size()); - Assert.assertEquals("{C}{G}{G}{W}{W}", getManaOption(0, manaOptions)); + Assert.assertEquals("{C}{W}{W}{G}{G}", getManaOption(0, manaOptions)); } // Crystal Quarry @@ -169,8 +169,8 @@ public class ManaOptionsTest extends CardTestPlayerBase { ManaOptions manaOptions = playerA.getAvailableManaTest(currentGame); Assert.assertEquals("mana variations don't fit", 2, manaOptions.size()); - Assert.assertEquals("{C}{G}{G}{G}{W}{W}", getManaOption(0, manaOptions)); - Assert.assertEquals("{R}{G}{U}{W}{B}", getManaOption(1, manaOptions)); + Assert.assertEquals("{C}{W}{W}{G}{G}{G}", getManaOption(0, manaOptions)); + Assert.assertEquals("{W}{U}{B}{R}{G}", getManaOption(1, manaOptions)); } // Nykthos, Shrine to Nyx diff --git a/Mage/src/main/java/mage/Mana.java b/Mage/src/main/java/mage/Mana.java index 9c8e54dd506..5e4ea50e9a0 100644 --- a/Mage/src/main/java/mage/Mana.java +++ b/Mage/src/main/java/mage/Mana.java @@ -480,21 +480,21 @@ public class Mana implements Comparable, Serializable, Copyable { for (int i = 0; i < colorless; i++) { sbMana.append("{C}"); } + for (int i = 0; i < white; i++) { + sbMana.append("{W}"); + } + for (int i = 0; i < blue; i++) { + sbMana.append("{U}"); + } + for (int i = 0; i < black; i++) { + sbMana.append("{B}"); + } for (int i = 0; i < red; i++) { sbMana.append("{R}"); } for (int i = 0; i < green; i++) { sbMana.append("{G}"); } - for (int i = 0; i < blue; i++) { - sbMana.append("{U}"); - } - for (int i = 0; i < white; i++) { - sbMana.append("{W}"); - } - for (int i = 0; i < black; i++) { - sbMana.append("{B}"); - } for (int i = 0; i < any; i++) { sbMana.append("{Any}"); } diff --git a/Mage/src/main/java/mage/abilities/Abilities.java b/Mage/src/main/java/mage/abilities/Abilities.java index 2e4c629a2cc..d0425f6fd7e 100644 --- a/Mage/src/main/java/mage/abilities/Abilities.java +++ b/Mage/src/main/java/mage/abilities/Abilities.java @@ -61,6 +61,8 @@ public interface Abilities extends List, Serializable { */ List getRules(String source); + List getRules(String source, boolean capitalize); + /** * Retrieves all activated abilities for the given {@link Zone}. * diff --git a/Mage/src/main/java/mage/abilities/AbilitiesImpl.java b/Mage/src/main/java/mage/abilities/AbilitiesImpl.java index 7a1dfba19d3..a7a10a32365 100644 --- a/Mage/src/main/java/mage/abilities/AbilitiesImpl.java +++ b/Mage/src/main/java/mage/abilities/AbilitiesImpl.java @@ -69,6 +69,11 @@ public class AbilitiesImpl extends ArrayList implements Ab @Override public List getRules(String source) { + return getRules(source, true); + } + + @Override + public List getRules(String source, boolean capitalize) { List rules = new ArrayList<>(); for (T ability : this) { @@ -78,7 +83,9 @@ public class AbilitiesImpl extends ArrayList implements Ab if (!(ability instanceof SpellAbility || ability instanceof PlayLandAbility)) { String rule = ability.getRule(); if (rule != null && rule.length() > 3) { - rule = Character.toUpperCase(rule.charAt(0)) + rule.substring(1); + if (capitalize) { + rule = Character.toUpperCase(rule.charAt(0)) + rule.substring(1); + } if (ability.getRuleAtTheTop()) { rules.add(0, rule); } else { diff --git a/Mage/src/main/java/mage/abilities/AbilityImpl.java b/Mage/src/main/java/mage/abilities/AbilityImpl.java index 3fc2020dd77..8e52732e5d8 100644 --- a/Mage/src/main/java/mage/abilities/AbilityImpl.java +++ b/Mage/src/main/java/mage/abilities/AbilityImpl.java @@ -773,7 +773,7 @@ public abstract class AbilityImpl implements Ability { } if (!costs.isEmpty()) { if (sbRule.length() > 0) { - sbRule.append(','); + sbRule.append(", "); } sbRule.append(costs.getText()); } diff --git a/Mage/src/main/java/mage/abilities/CompoundAbility.java b/Mage/src/main/java/mage/abilities/CompoundAbility.java index d122735f843..e07d9349804 100644 --- a/Mage/src/main/java/mage/abilities/CompoundAbility.java +++ b/Mage/src/main/java/mage/abilities/CompoundAbility.java @@ -31,7 +31,7 @@ public class CompoundAbility extends AbilitiesImpl { } StringBuilder sb = new StringBuilder(); - List rules = super.getRules(null); + List rules = super.getRules(null,false); for (int index = 0; index < rules.size(); index++) { if (index > 0) { if (index < rules.size() - 1) { diff --git a/Mage/src/main/java/mage/abilities/common/CantBlockAbility.java b/Mage/src/main/java/mage/abilities/common/CantBlockAbility.java index 0e008763676..409af297ef6 100644 --- a/Mage/src/main/java/mage/abilities/common/CantBlockAbility.java +++ b/Mage/src/main/java/mage/abilities/common/CantBlockAbility.java @@ -47,7 +47,7 @@ public class CantBlockAbility extends SimpleStaticAbility { @Override public String getRule() { - return "{this} can't block"; + return "{this} can't block."; } @Override diff --git a/Mage/src/main/java/mage/abilities/common/EndOfCombatTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/EndOfCombatTriggeredAbility.java index cdff752da72..3c332a232b4 100644 --- a/Mage/src/main/java/mage/abilities/common/EndOfCombatTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/common/EndOfCombatTriggeredAbility.java @@ -15,7 +15,6 @@ import mage.game.events.GameEvent; * * @author LevelX2 */ - public class EndOfCombatTriggeredAbility extends TriggeredAbilityImpl { public EndOfCombatTriggeredAbility(Effect effect, boolean optional) { @@ -35,7 +34,7 @@ public class EndOfCombatTriggeredAbility extends TriggeredAbilityImpl { public boolean checkEventType(GameEvent event, Game game) { return event.getType() == GameEvent.EventType.END_COMBAT_STEP_PRE; } - + @Override public boolean checkTrigger(GameEvent event, Game game) { return true; @@ -43,6 +42,6 @@ public class EndOfCombatTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "At the end of combat, " + super.getRule(); + return "At end of combat, " + super.getRule(); } -} \ No newline at end of file +} diff --git a/Mage/src/main/java/mage/abilities/common/PayMoreToCastAsThoughtItHadFlashAbility.java b/Mage/src/main/java/mage/abilities/common/PayMoreToCastAsThoughtItHadFlashAbility.java index 599b1a2d81d..3faa62f5c45 100644 --- a/Mage/src/main/java/mage/abilities/common/PayMoreToCastAsThoughtItHadFlashAbility.java +++ b/Mage/src/main/java/mage/abilities/common/PayMoreToCastAsThoughtItHadFlashAbility.java @@ -26,7 +26,7 @@ public class PayMoreToCastAsThoughtItHadFlashAbility extends SpellAbility { super(card.getSpellAbility().getManaCosts().copy(), card.getName() + " as though it had flash", Zone.HAND, SpellAbilityType.BASE_ALTERNATE); this.costsToAdd = costsToAdd; this.timing = TimingRule.INSTANT; - + this.ruleAtTheTop = true; CardUtil.increaseCost(this, costsToAdd); } diff --git a/Mage/src/main/java/mage/abilities/condition/common/CardsInHandCondition.java b/Mage/src/main/java/mage/abilities/condition/common/CardsInHandCondition.java index 9025cf0af46..e434c860029 100644 --- a/Mage/src/main/java/mage/abilities/condition/common/CardsInHandCondition.java +++ b/Mage/src/main/java/mage/abilities/condition/common/CardsInHandCondition.java @@ -45,7 +45,6 @@ import mage.util.CardUtil; */ public class CardsInHandCondition implements Condition { - private Condition condition; private ComparisonType type; private int count; @@ -114,7 +113,7 @@ public class CardsInHandCondition implements Condition { @Override public String toString() { int workCount = count; - StringBuilder sb = new StringBuilder("if "); + StringBuilder sb = new StringBuilder("if"); switch (targetController) { case YOU: sb.append(" you have"); diff --git a/Mage/src/main/java/mage/abilities/condition/common/IsStepCondition.java b/Mage/src/main/java/mage/abilities/condition/common/IsStepCondition.java index 3d474b252ae..9fc545d9828 100644 --- a/Mage/src/main/java/mage/abilities/condition/common/IsStepCondition.java +++ b/Mage/src/main/java/mage/abilities/condition/common/IsStepCondition.java @@ -59,7 +59,7 @@ public class IsStepCondition implements Condition { public String toString() { StringBuilder sb = new StringBuilder("during "); if (onlyDuringYourSteps) { - sb.append("your "); + sb.append("your ").append(phaseStep.getStepText()); } else if (phaseStep == PhaseStep.UPKEEP) { sb.append("any upkeep step"); } else { diff --git a/Mage/src/main/java/mage/abilities/condition/common/RaidCondition.java b/Mage/src/main/java/mage/abilities/condition/common/RaidCondition.java index 72856c0629f..f71ad504718 100644 --- a/Mage/src/main/java/mage/abilities/condition/common/RaidCondition.java +++ b/Mage/src/main/java/mage/abilities/condition/common/RaidCondition.java @@ -25,7 +25,6 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.abilities.condition.common; import mage.abilities.Ability; @@ -45,4 +44,8 @@ public enum RaidCondition implements Condition { PlayerAttackedWatcher watcher = (PlayerAttackedWatcher) game.getState().getWatchers().get(PlayerAttackedWatcher.class.getSimpleName()); return watcher != null && watcher.getNumberOfAttackersCurrentTurn(source.getControllerId()) > 0; } + + public String toString() { + return "if you attacked with a creature this turn"; + } } diff --git a/Mage/src/main/java/mage/abilities/costs/common/UntapTargetCost.java b/Mage/src/main/java/mage/abilities/costs/common/UntapTargetCost.java index 6f58c745bd7..9eca132786d 100644 --- a/Mage/src/main/java/mage/abilities/costs/common/UntapTargetCost.java +++ b/Mage/src/main/java/mage/abilities/costs/common/UntapTargetCost.java @@ -25,7 +25,6 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.abilities.costs.common; import mage.constants.Outcome; @@ -38,6 +37,7 @@ import mage.target.common.TargetControlledPermanent; import java.util.List; import java.util.UUID; import mage.abilities.costs.Cost; +import mage.util.CardUtil; /** * @@ -49,7 +49,7 @@ public class UntapTargetCost extends CostImpl { public UntapTargetCost(TargetControlledPermanent target) { this.target = target; - this.text = "Untap " + target.getMaxNumberOfTargets() + ' ' + target.getTargetName(); + this.text = "Untap " + CardUtil.numberToText(target.getMaxNumberOfTargets(), "") + ' ' + target.getTargetName(); } public UntapTargetCost(final UntapTargetCost cost) { @@ -60,10 +60,11 @@ public class UntapTargetCost extends CostImpl { @Override public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana, Cost costToPay) { if (target.choose(Outcome.Untap, controllerId, sourceId, game)) { - for (UUID targetId: (List)target.getTargets()) { + for (UUID targetId : (List) target.getTargets()) { Permanent permanent = game.getPermanent(targetId); - if (permanent == null) + if (permanent == null) { return false; + } paid |= permanent.untap(game); } } @@ -80,5 +81,4 @@ public class UntapTargetCost extends CostImpl { return new UntapTargetCost(this); } - } diff --git a/Mage/src/main/java/mage/abilities/effects/common/AddConditionalManaOfAnyColorEffect.java b/Mage/src/main/java/mage/abilities/effects/common/AddConditionalManaOfAnyColorEffect.java index 2da6d5747f8..633d8a0bd37 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/AddConditionalManaOfAnyColorEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/AddConditionalManaOfAnyColorEffect.java @@ -35,6 +35,7 @@ import mage.abilities.mana.builder.ConditionalManaBuilder; import mage.choices.ChoiceColor; import mage.game.Game; import mage.players.Player; +import mage.util.CardUtil; /** * @author noxx @@ -59,8 +60,12 @@ public class AddConditionalManaOfAnyColorEffect extends ManaEffect { this.manaBuilder = manaBuilder; this.oneChoice = oneChoice; // - staticText = "Add " + amount + " mana of " - + (oneChoice ? "any one color" : "in any combination of colors") + staticText = "Add " + + (amount instanceof StaticValue ? (CardUtil.numberToText(((StaticValue) amount).toString())) : "") + + " mana " + + (oneChoice ? "of any" + + (amount instanceof StaticValue && (((StaticValue) amount).toString()).equals("1") ? "" : " one") + + " color" : "in any combination of colors") + " to your mana pool. " + manaBuilder.getRule(); } diff --git a/Mage/src/main/java/mage/abilities/effects/common/CantBeRegeneratedSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/CantBeRegeneratedSourceEffect.java index 5d21c6e346c..f1b8a2238f6 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/CantBeRegeneratedSourceEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/CantBeRegeneratedSourceEffect.java @@ -78,9 +78,8 @@ public class CantBeRegeneratedSourceEffect extends ContinuousRuleModifyingEffect return staticText; } StringBuilder sb = new StringBuilder(); - sb.append(" {this} can't be regenerated"); + sb.append("{this} can't be regenerated"); if (!duration.toString().isEmpty()) { - sb.append(' '); if (duration == Duration.EndOfTurn) { sb.append(" this turn"); } else { diff --git a/Mage/src/main/java/mage/abilities/effects/common/CastSourceTriggeredAbility.java b/Mage/src/main/java/mage/abilities/effects/common/CastSourceTriggeredAbility.java index f1c4c1d3a5c..97a11cd3e78 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/CastSourceTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/effects/common/CastSourceTriggeredAbility.java @@ -46,11 +46,12 @@ public class CastSourceTriggeredAbility extends TriggeredAbilityImpl { public CastSourceTriggeredAbility(Effect effect) { this(effect, false); } - + public CastSourceTriggeredAbility(Effect effect, boolean optional) { super(Zone.STACK, effect, optional); + this.ruleAtTheTop = true; } - + public CastSourceTriggeredAbility(final CastSourceTriggeredAbility ability) { super(ability); } @@ -70,7 +71,7 @@ public class CastSourceTriggeredAbility extends TriggeredAbilityImpl { if (event.getSourceId().equals(this.getSourceId())) { MageObject spellObject = game.getObject(sourceId); if (spellObject != null && (spellObject instanceof Spell)) { - Spell spell = (Spell)spellObject; + Spell spell = (Spell) spellObject; if (spell.getSpellAbility() != null) { for (Effect effect : getEffects()) { effect.setValue(SOURCE_CAST_SPELL_ABILITY, spell.getSpellAbility()); diff --git a/Mage/src/main/java/mage/abilities/effects/common/CounterUnlessPaysEffect.java b/Mage/src/main/java/mage/abilities/effects/common/CounterUnlessPaysEffect.java index a409e5b1fda..d0cdc8fdf20 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/CounterUnlessPaysEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/CounterUnlessPaysEffect.java @@ -113,7 +113,7 @@ public class CounterUnlessPaysEffect extends OneShotEffect { if (mode.getTargets().isEmpty()) { sb.append("counter it"); } else { - sb.append("Counter target ").append(mode.getTargets().get(0).getTargetName()); + sb.append("counter target ").append(mode.getTargets().get(0).getTargetName()); } sb.append(" unless its controller pays "); if (cost != null) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/CreateTokenCopyTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/CreateTokenCopyTargetEffect.java index 56c2b435154..a6c556be365 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/CreateTokenCopyTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/CreateTokenCopyTargetEffect.java @@ -277,14 +277,14 @@ public class CreateTokenCopyTargetEffect extends OneShotEffect { if (tapped && !attacking) { sb.append("tapped "); } - sb.append("token"); + sb.append("token that's a copy of target creature"); } else { sb.append(number); sb.append(" "); if (tapped && !attacking) { sb.append("tapped "); } - sb.append("tokens"); + sb.append("tokens that are copies of target creature"); } if (attacking) { sb.append(" that are"); diff --git a/Mage/src/main/java/mage/abilities/effects/common/ExileAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ExileAllEffect.java index 5c076adc381..ec46d232102 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/ExileAllEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/ExileAllEffect.java @@ -25,7 +25,6 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.abilities.effects.common; import java.util.List; @@ -52,6 +51,7 @@ public class ExileAllEffect extends OneShotEffect { public ExileAllEffect(FilterPermanent filter) { this(filter, null, null); } + public ExileAllEffect(FilterPermanent filter, UUID exileId, String exileZone) { super(Outcome.Exile); this.filter = filter; @@ -77,19 +77,18 @@ public class ExileAllEffect extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { List permanents = game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game); - for (Permanent permanent: permanents) { + for (Permanent permanent : permanents) { controller.moveCardToExileWithInfo(permanent, exileId, exileZone, source.getSourceId(), game, Zone.BATTLEFIELD, true); } return true; } return false; - } private void setText() { StringBuilder sb = new StringBuilder(); - sb.append("Exile all ").append(filter.getMessage()); + sb.append("exile all ").append(filter.getMessage()); staticText = sb.toString(); } } diff --git a/Mage/src/main/java/mage/abilities/effects/common/ExileSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ExileSourceEffect.java index 60efb497e97..455d3a54664 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/ExileSourceEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/ExileSourceEffect.java @@ -57,7 +57,7 @@ public class ExileSourceEffect extends OneShotEffect { */ public ExileSourceEffect(boolean toUniqueExileZone) { super(Outcome.Exile); - staticText = "Exile {this}"; + staticText = "exile {this}"; this.toUniqueExileZone = toUniqueExileZone; } diff --git a/Mage/src/main/java/mage/abilities/effects/common/GetEmblemEffect.java b/Mage/src/main/java/mage/abilities/effects/common/GetEmblemEffect.java index 796fb677001..7ceebd01113 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/GetEmblemEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/GetEmblemEffect.java @@ -27,6 +27,7 @@ */ package mage.abilities.effects.common; +import java.util.List; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; @@ -45,7 +46,7 @@ public class GetEmblemEffect extends OneShotEffect { public GetEmblemEffect(Emblem emblem) { super(Outcome.Benefit); this.emblem = emblem; - this.staticText = "You get an emblem with \"" + emblem.getAbilities().getRules(null) + '"'; + this.staticText = getText(); } public GetEmblemEffect(final GetEmblemEffect effect) { @@ -68,4 +69,22 @@ public class GetEmblemEffect extends OneShotEffect { return true; } + public String getText() { + StringBuilder sb = new StringBuilder(); + sb.append("You get an emblem with \""); + List rules = emblem.getAbilities().getRules(null); + if (rules.size() == 1) { + for (String s : rules) { + sb.append(s); + } + sb.append('"'); + } else if (rules.size() == 2) { + for (String s : rules) { + sb.append(s); + sb.append("\" and \""); + } + sb.append('"'); + } + return sb.toString(); + } } diff --git a/Mage/src/main/java/mage/abilities/effects/common/LookLibraryAndPickControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/LookLibraryAndPickControllerEffect.java index b7e43315d50..5a93cbae466 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/LookLibraryAndPickControllerEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/LookLibraryAndPickControllerEffect.java @@ -264,9 +264,11 @@ public class LookLibraryAndPickControllerEffect extends LookLibraryControllerEff sb.append(". You may reveal "); sb.append(filter.getMessage()).append(" from among them and put it into your "); } else if (targetPickedCards == Zone.BATTLEFIELD) { - sb.append(". You "); + sb.append(". "); if (optional) { - sb.append("may "); + sb.append("You may p"); + } else { + sb.append('P'); } sb.append("put ").append(filter.getMessage()).append(" from among them onto the "); } else { diff --git a/Mage/src/main/java/mage/abilities/effects/common/LookLibraryControllerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/LookLibraryControllerEffect.java index 4b53c47eaf5..42bd8e092fc 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/LookLibraryControllerEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/LookLibraryControllerEffect.java @@ -243,7 +243,7 @@ public class LookLibraryControllerEffect extends OneShotEffect { sb.append(" cards "); } - sb.append("of your Library"); + sb.append("of your library"); if (numberLook == 0) { sb.append(", where {X} is the number of cards ").append(numberOfCards.getMessage()); } diff --git a/Mage/src/main/java/mage/abilities/effects/common/LookLibraryTopCardTargetPlayerEffect.java b/Mage/src/main/java/mage/abilities/effects/common/LookLibraryTopCardTargetPlayerEffect.java index bf7c607f31a..3081206ac6f 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/LookLibraryTopCardTargetPlayerEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/LookLibraryTopCardTargetPlayerEffect.java @@ -106,7 +106,7 @@ public class LookLibraryTopCardTargetPlayerEffect extends OneShotEffect { sb.append(CardUtil.numberToText(amount)); sb.append(" cards "); } else { - sb.append(" card "); + sb.append("card "); } sb.append("of target player's library"); if (putToGraveyard) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/NameACardEffect.java b/Mage/src/main/java/mage/abilities/effects/common/NameACardEffect.java index 63effc4e1c8..8c0d69c78c5 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/NameACardEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/NameACardEffect.java @@ -82,27 +82,27 @@ public class NameACardEffect extends OneShotEffect { switch (typeOfName) { case ALL: cardChoice.setChoices(CardRepository.instance.getNames()); - cardChoice.setMessage("Name a card"); + cardChoice.setMessage("Choose a card name"); break; case NON_ARTIFACT_AND_NON_LAND_NAME: cardChoice.setChoices(CardRepository.instance.getNonArtifactAndNonLandNames()); - cardChoice.setMessage("Name a non artifact and non land card"); + cardChoice.setMessage("Choose a nonartifact, nonland card name"); break; case NON_LAND_AND_NON_CREATURE_NAME: cardChoice.setChoices(CardRepository.instance.getNonLandAndNonCreatureNames()); - cardChoice.setMessage("Name a non land and non creature card"); + cardChoice.setMessage("Choose a nonland and non creature card"); break; case NON_LAND_NAME: cardChoice.setChoices(CardRepository.instance.getNonLandNames()); - cardChoice.setMessage("Name a non land card"); + cardChoice.setMessage("Choose a nonland card name"); break; case CREATURE_NAME: cardChoice.setChoices(CardRepository.instance.getCreatureNames()); - cardChoice.setMessage("Name a creature card"); + cardChoice.setMessage("Choose a creature card name"); break; case ARTIFACT_NAME: cardChoice.setChoices(CardRepository.instance.getArtifactNames()); - cardChoice.setMessage("Name an artifact card"); + cardChoice.setMessage("Choose an artifact card name"); break; } cardChoice.clearChoice(); @@ -130,7 +130,7 @@ public class NameACardEffect extends OneShotEffect { } private String setText() { - StringBuilder sb = new StringBuilder("name a "); + StringBuilder sb = new StringBuilder("choose a "); switch (typeOfName) { case ALL: sb.append("card"); @@ -139,7 +139,7 @@ public class NameACardEffect extends OneShotEffect { sb.append("nonartifact, nonland card"); break; case NON_LAND_AND_NON_CREATURE_NAME: - sb.append("card other than a creature or a land card"); + sb.append("noncreature, nonland card"); break; case NON_LAND_NAME: sb.append("nonland card"); @@ -151,6 +151,7 @@ public class NameACardEffect extends OneShotEffect { sb.append("artifact card"); break; } + sb.append(" name"); return sb.toString(); } } diff --git a/Mage/src/main/java/mage/abilities/effects/common/PreventAllDamageByAllPermanentsEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PreventAllDamageByAllPermanentsEffect.java index cee08029fbd..13948eef4db 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/PreventAllDamageByAllPermanentsEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/PreventAllDamageByAllPermanentsEffect.java @@ -31,6 +31,7 @@ import mage.abilities.Ability; import mage.abilities.Mode; import mage.abilities.effects.PreventionEffectImpl; import mage.constants.Duration; +import static mage.constants.Duration.EndOfTurn; import mage.filter.FilterPermanent; import mage.filter.common.FilterCreaturePermanent; import mage.game.Game; @@ -98,10 +99,19 @@ public class PreventAllDamageByAllPermanentsEffect extends PreventionEffectImpl sb.append("combat "); } sb.append("damage "); - sb.append(duration.toString()); - if (filter != null) { - sb.append(" dealt by "); - sb.append(filter.getMessage()); + if (duration == EndOfTurn) { + if (filter != null) { + sb.append(filter.getMessage()); + sb.append(" would deal this turn"); + } else { + sb.append("that would be dealt this turn"); + } + } else { + sb.append(duration.toString()); + if (filter != null) { + sb.append(" dealt by "); + sb.append(filter.getMessage()); + } } return sb.toString(); } diff --git a/Mage/src/main/java/mage/abilities/effects/common/PreventDamageToSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PreventDamageToSourceEffect.java index e4a0e408061..c1f0ade0747 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/PreventDamageToSourceEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/PreventDamageToSourceEffect.java @@ -31,6 +31,7 @@ import mage.abilities.Ability; import mage.abilities.Mode; import mage.abilities.effects.PreventionEffectImpl; import mage.constants.Duration; +import static mage.constants.Duration.EndOfTurn; import mage.game.Game; import mage.game.events.GameEvent; @@ -74,7 +75,12 @@ public class PreventDamageToSourceEffect extends PreventionEffectImpl { } else { sb.append("Prevent the next ").append(amountToPrevent).append(" damage that would be dealt to "); } - sb.append("{source} ").append(duration.toString()); + sb.append("{source} "); + if (duration == EndOfTurn) { + sb.append("this turn"); + } else { + sb.append(duration.toString()); + } return sb.toString(); } } diff --git a/Mage/src/main/java/mage/abilities/effects/common/PreventDamageToTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PreventDamageToTargetEffect.java index a1167c7f024..aa07e5bdd03 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/PreventDamageToTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/PreventDamageToTargetEffect.java @@ -25,7 +25,6 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.abilities.effects.common; import mage.constants.Duration; @@ -45,23 +44,23 @@ public class PreventDamageToTargetEffect extends PreventionEffectImpl { public PreventDamageToTargetEffect(Duration duration) { this(duration, false); } - + public PreventDamageToTargetEffect(Duration duration, boolean onlyCombat) { this(duration, Integer.MAX_VALUE, onlyCombat); } - + public PreventDamageToTargetEffect(Duration duration, int amount) { this(duration, amount, false); } - + public PreventDamageToTargetEffect(Duration duration, int amount, boolean onlyCombat) { super(duration, amount, onlyCombat); } - + public PreventDamageToTargetEffect(Duration duration, boolean onlyCombat, boolean consumable, DynamicValue amountToPreventDynamic) { super(duration, 0, onlyCombat, consumable, amountToPreventDynamic); } - + public PreventDamageToTargetEffect(final PreventDamageToTargetEffect effect) { super(effect); } @@ -83,9 +82,9 @@ public class PreventDamageToTargetEffect extends PreventionEffectImpl { } StringBuilder sb = new StringBuilder(); if (amountToPrevent == Integer.MAX_VALUE) { - sb.append("Prevent all damage that would be dealt to target "); + sb.append("prevent all damage that would be dealt to target "); } else { - sb.append("Prevent the next ").append(amountToPrevent).append(" damage that would be dealt to target "); + sb.append("prevent the next ").append(amountToPrevent).append(" damage that would be dealt to target "); } sb.append(mode.getTargets().get(0).getTargetName()); if (!duration.toString().isEmpty()) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/PutTopCardOfLibraryIntoGraveTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/PutTopCardOfLibraryIntoGraveTargetEffect.java index 27b2e0c1497..717a3426b58 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/PutTopCardOfLibraryIntoGraveTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/PutTopCardOfLibraryIntoGraveTargetEffect.java @@ -75,7 +75,7 @@ public class PutTopCardOfLibraryIntoGraveTargetEffect extends OneShotEffect { } private String setText() { - StringBuilder sb = new StringBuilder("Target player puts the top "); + StringBuilder sb = new StringBuilder("target player puts the top "); if (numberCards.toString().equals("1")) { sb.append(" card"); } else { diff --git a/Mage/src/main/java/mage/abilities/effects/common/RevealLibraryPutIntoHandEffect.java b/Mage/src/main/java/mage/abilities/effects/common/RevealLibraryPutIntoHandEffect.java index 5d8965fde1a..d0b57104663 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/RevealLibraryPutIntoHandEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/RevealLibraryPutIntoHandEffect.java @@ -117,7 +117,7 @@ public class RevealLibraryPutIntoHandEffect extends OneShotEffect { } private String setText() { - StringBuilder sb = new StringBuilder("Reveal the top "); + StringBuilder sb = new StringBuilder("reveal the top "); sb.append(CardUtil.numberToText(amountCards.toString())).append(" cards of your library. Put all "); sb.append(filter.getMessage()); sb.append(" revealed this way into your hand and the rest "); diff --git a/Mage/src/main/java/mage/abilities/effects/common/TapAllTargetPlayerControlsEffect.java b/Mage/src/main/java/mage/abilities/effects/common/TapAllTargetPlayerControlsEffect.java index 0ad564a7211..08ca0c506f2 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/TapAllTargetPlayerControlsEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/TapAllTargetPlayerControlsEffect.java @@ -25,7 +25,6 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.abilities.effects.common; import java.util.List; @@ -60,10 +59,10 @@ public class TapAllTargetPlayerControlsEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { Player player = game.getPlayer(targetPointer.getFirst(game, source)); - if(player != null) { + if (player != null) { filter.add(new ControllerIdPredicate(player.getId())); List permanents = game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game); - for(Permanent p : permanents) { + for (Permanent p : permanents) { p.tap(game); } return true; @@ -78,9 +77,9 @@ public class TapAllTargetPlayerControlsEffect extends OneShotEffect { @Override public String getText(Mode mode) { - if(staticText != null && !staticText.isEmpty()) { + if (staticText != null && !staticText.isEmpty()) { return staticText; } - return "tap all " + filter.getMessage() + " target player controls"; + return "tap all " + filter.toString() + " target " + mode.getTargets().get(0).getMessage() + " controls"; } } diff --git a/Mage/src/main/java/mage/abilities/effects/common/UntapAllThatAttackedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/UntapAllThatAttackedEffect.java index f5a366b6c17..7cf8dbfd71c 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/UntapAllThatAttackedEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/UntapAllThatAttackedEffect.java @@ -48,7 +48,7 @@ public class UntapAllThatAttackedEffect extends OneShotEffect { public UntapAllThatAttackedEffect() { super(Outcome.Benefit); - staticText = " Untap all creatures that attacked this turn"; + staticText = "Untap all creatures that attacked this turn"; } public UntapAllThatAttackedEffect(final UntapAllThatAttackedEffect effect) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/combat/BlocksIfAbleAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/BlocksIfAbleAttachedEffect.java index 988c75ff76c..c7dd2cf8c2b 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/combat/BlocksIfAbleAttachedEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/combat/BlocksIfAbleAttachedEffect.java @@ -25,7 +25,6 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.abilities.effects.common.combat; import mage.abilities.Ability; @@ -38,12 +37,11 @@ import mage.game.permanent.Permanent; /** * @author LevelX2 */ - public class BlocksIfAbleAttachedEffect extends RequirementEffect { public BlocksIfAbleAttachedEffect(Duration duration, AttachmentType attachmentType) { super(duration); - this.staticText = attachmentType.verb() + " creature blocks each turn if able"; + this.staticText = attachmentType.verb() + " creature blocks each combat if able"; } public BlocksIfAbleAttachedEffect(final BlocksIfAbleAttachedEffect effect) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/combat/BlocksIfAbleSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/BlocksIfAbleSourceEffect.java index 97e46cc5715..1fda34c4975 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/combat/BlocksIfAbleSourceEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/combat/BlocksIfAbleSourceEffect.java @@ -25,7 +25,6 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.abilities.effects.common.combat; import mage.abilities.Ability; @@ -39,7 +38,6 @@ import mage.game.permanent.Permanent; * * @author LevelX2 */ - public class BlocksIfAbleSourceEffect extends RequirementEffect { public BlocksIfAbleSourceEffect(Duration duration) { @@ -78,7 +76,7 @@ public class BlocksIfAbleSourceEffect extends RequirementEffect { @Override public String getText(Mode mode) { - return "{this} blocks each turn if able."; + return "{this} blocks each combat if able."; } -} \ No newline at end of file +} diff --git a/Mage/src/main/java/mage/abilities/effects/common/combat/CantBeBlockedByAllTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantBeBlockedByAllTargetEffect.java index fdd2aefac52..fae351becc8 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/combat/CantBeBlockedByAllTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/combat/CantBeBlockedByAllTargetEffect.java @@ -30,6 +30,7 @@ package mage.abilities.effects.common.combat; import mage.abilities.Ability; import mage.abilities.effects.RestrictionEffect; import mage.constants.Duration; +import static mage.constants.Duration.EndOfTurn; import mage.filter.common.FilterCreaturePermanent; import mage.game.Game; import mage.game.permanent.Permanent; @@ -45,8 +46,9 @@ public class CantBeBlockedByAllTargetEffect extends RestrictionEffect { public CantBeBlockedByAllTargetEffect(FilterCreaturePermanent filterBlockedBy, Duration duration) { super(duration); this.filterBlockedBy = filterBlockedBy; - staticText = "Target creature" + staticText = "target creature" + " can't be blocked " + + (duration == EndOfTurn ? "this turn " : "") + (filterBlockedBy.getMessage().startsWith("except by") ? "" : "by ") + filterBlockedBy.getMessage(); } diff --git a/Mage/src/main/java/mage/abilities/effects/common/combat/CantBlockAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/CantBlockAttachedEffect.java index 76a23da819c..f622abea915 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/combat/CantBlockAttachedEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/combat/CantBlockAttachedEffect.java @@ -31,6 +31,7 @@ import mage.abilities.Ability; import mage.abilities.effects.RestrictionEffect; import mage.constants.AttachmentType; import mage.constants.Duration; +import static mage.constants.Duration.EndOfTurn; import mage.filter.common.FilterCreaturePermanent; import mage.game.Game; import mage.game.permanent.Permanent; @@ -61,7 +62,9 @@ public class CantBlockAttachedEffect extends RestrictionEffect { if (!filter.getMessage().equals("creature")) { sb.append(' ').append(filter.getMessage()); } - if (!duration.toString().isEmpty()) { + if (duration == EndOfTurn) { + sb.append(" this turn"); + } else if (!duration.toString().isEmpty()) { sb.append(' ').append(duration.toString()); } staticText = sb.toString(); diff --git a/Mage/src/main/java/mage/abilities/effects/common/combat/MustBeBlockedByAtLeastOneTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/combat/MustBeBlockedByAtLeastOneTargetEffect.java index 7f1c8b1de7b..c03f59a035b 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/combat/MustBeBlockedByAtLeastOneTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/combat/MustBeBlockedByAtLeastOneTargetEffect.java @@ -25,7 +25,6 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.abilities.effects.common.combat; import java.util.UUID; @@ -35,35 +34,32 @@ import mage.constants.Duration; import mage.game.Game; import mage.game.permanent.Permanent; - /** * !! This effect does only support one target. * * * http://tappedout.net/mtg-questions/must-be-blocked-if-able-effect-makes-other-attacking-creatures-essentially-unblockable/ * - * When you Declare Blockers, you choose an arrangement for your blockers, - * then check to see if there are any restrictions or requirements. + * When you Declare Blockers, you choose an arrangement for your blockers, then + * check to see if there are any restrictions or requirements. * - * If any restrictions are violated, the block is illegal. (For example, - * trying to block with Sightless Ghoul) - * If any requirements are violated, the least possible number of requirements - * must be violated, otherwise the block is illegal. (For example, your opponent - * control two creatures that he has cast Deadly Allure on, but you control only - * one creature. Blocking either one will violate a requirement, "This creature - * must be blocked this turn if able", but it will also violate the least - * possible number of requirements, thus it is legal.) - * If the block is illegal, the game state backs up and you declare blockers - * again. (Note that while you can, in some cases, circumvent requirements - * such as "This creature must be blocked" or "This creature must block - * any attacking creature" you can never circumvent restrictions: "This creature - * can't block" or "Only one creature may block this turn.") - * Because you declare ALL your blockers at once, THEN check for - * restrictions/requirements, you may block Deadly Allure'd creatures - * with only one creature, if you choose. - * This still works with Lure: This card sets up a requirement that ALL - * creatures must block it if able. Any block that violates more than - * the minimum number of requirements is still illegal. + * If any restrictions are violated, the block is illegal. (For example, trying + * to block with Sightless Ghoul) If any requirements are violated, the least + * possible number of requirements must be violated, otherwise the block is + * illegal. (For example, your opponent control two creatures that he has cast + * Deadly Allure on, but you control only one creature. Blocking either one will + * violate a requirement, "This creature must be blocked this turn if able", but + * it will also violate the least possible number of requirements, thus it is + * legal.) If the block is illegal, the game state backs up and you declare + * blockers again. (Note that while you can, in some cases, circumvent + * requirements such as "This creature must be blocked" or "This creature must + * block any attacking creature" you can never circumvent restrictions: "This + * creature can't block" or "Only one creature may block this turn.") Because + * you declare ALL your blockers at once, THEN check for + * restrictions/requirements, you may block Deadly Allure'd creatures with only + * one creature, if you choose. This still works with Lure: This card sets up a + * requirement that ALL creatures must block it if able. Any block that violates + * more than the minimum number of requirements is still illegal. * * @author LevelX2 */ @@ -75,7 +71,7 @@ public class MustBeBlockedByAtLeastOneTargetEffect extends RequirementEffect { public MustBeBlockedByAtLeastOneTargetEffect(Duration duration) { super(duration); - staticText = "Target creature must be blocked this turn if able"; + staticText = "target creature must be blocked this turn if able"; } public MustBeBlockedByAtLeastOneTargetEffect(final MustBeBlockedByAtLeastOneTargetEffect effect) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesBasicLandTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesBasicLandTargetEffect.java index e8430823051..4d0bb0703e7 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesBasicLandTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesBasicLandTargetEffect.java @@ -191,7 +191,7 @@ public class BecomesBasicLandTargetEffect extends ContinuousEffectImpl { private String setText() { StringBuilder sb = new StringBuilder(); if (chooseLandType) { - sb.append("Target land becomes the basic land type of your choice "); + sb.append("Target land becomes the basic land type of your choice"); } else { sb.append("Target land becomes a "); int i = 1; diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesChosenCreatureTypeTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesChosenCreatureTypeTargetEffect.java index 6a21fcf093b..dde5970a68c 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesChosenCreatureTypeTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesChosenCreatureTypeTargetEffect.java @@ -26,7 +26,7 @@ public class BecomesChosenCreatureTypeTargetEffect extends OneShotEffect { super(Outcome.BoostCreature); this.nonWall = nonWall; if(nonWall) { - staticText = "choose a creature type other than wall, target creature's type becomes that type until end of turn"; + staticText = "choose a creature type other than Wall. Target creature becomes that type until end of turn"; } else { staticText = "target creature becomes the creature type of your choice until end of turn"; diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesColorTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesColorTargetEffect.java index abf36d2d3a3..c437a9404fb 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesColorTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesColorTargetEffect.java @@ -52,12 +52,13 @@ public class BecomesColorTargetEffect extends ContinuousEffectImpl { /** * Set the color of a spell or permanent - * - * @param duration + * + * @param duration */ public BecomesColorTargetEffect(Duration duration) { this(null, duration, null); } + public BecomesColorTargetEffect(ObjectColor setColor, Duration duration) { this(setColor, duration, null); } @@ -78,7 +79,7 @@ public class BecomesColorTargetEffect extends ContinuousEffectImpl { Player controller = game.getPlayer(source.getControllerId()); if (controller == null) { return; - } + } if (setColor == null) { ChoiceColor choice = new ChoiceColor(); while (!choice.isChosen()) { @@ -95,9 +96,8 @@ public class BecomesColorTargetEffect extends ContinuousEffectImpl { if (!game.isSimulation()) { game.informPlayers(controller.getLogName() + " has chosen the color: " + setColor.toString()); } - } - - + } + super.init(source, game); //To change body of generated methods, choose Tools | Templates. } @@ -109,11 +109,11 @@ public class BecomesColorTargetEffect extends ContinuousEffectImpl { } if (setColor != null) { boolean objectFound = false; - for (UUID targetId :targetPointer.getTargets(game, source)) { + for (UUID targetId : targetPointer.getTargets(game, source)) { MageObject targetObject = game.getObject(targetId); if (targetObject != null) { objectFound = true; - targetObject.getColor(game).setColor(setColor); + targetObject.getColor(game).setColor(setColor); } } if (!objectFound && this.getDuration() == Duration.Custom) { @@ -143,7 +143,9 @@ public class BecomesColorTargetEffect extends ContinuousEffectImpl { } else { sb.append(setColor.getDescription()); } - sb.append(' ').append(duration.toString()); + if (!duration.toString().equals("")) { + sb.append(' ').append(duration.toString()); + } return sb.toString(); } } diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureAllEffect.java index f6f796c25fd..d78d9a26ef4 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureAllEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureAllEffect.java @@ -138,7 +138,6 @@ public class BecomesCreatureAllEffect extends ContinuousEffectImpl { if (duration.toString() != null && !duration.toString().isEmpty()) { sb.append(duration.toString()).append(", "); } - sb.append("all "); sb.append(filter.getMessage()); if (duration.toString() != null && duration.toString().isEmpty()) { sb.append(" are "); @@ -147,7 +146,7 @@ public class BecomesCreatureAllEffect extends ContinuousEffectImpl { } sb.append(token.getDescription()); if (type != null && !type.isEmpty()) { - sb.append(". They are still ").append(type); + sb.append(". They're still ").append(type); } return sb.toString(); } diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostEnchantedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostEnchantedEffect.java index 884cc61e3af..4b9eedc8f6d 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostEnchantedEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostEnchantedEffect.java @@ -125,7 +125,7 @@ public class BoostEnchantedEffect extends ContinuousEffectImpl { private void setText() { StringBuilder sb = new StringBuilder(); - sb.append("Enchanted creature gets "); + sb.append("enchanted creature gets "); String p = power.toString(); if (!p.startsWith("-")) { sb.append('+'); diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostEquippedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostEquippedEffect.java index 796fa3060ca..0de648e5bff 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostEquippedEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostEquippedEffect.java @@ -25,7 +25,6 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.abilities.effects.common.continuous; import mage.constants.Duration; @@ -116,21 +115,24 @@ public class BoostEquippedEffect extends ContinuousEffectImpl { private void setText() { StringBuilder sb = new StringBuilder(); - sb.append("Equipped creature gets "); + sb.append("equipped creature gets "); String p = power.toString(); - if (!p.startsWith("-")) + if (!p.startsWith("-")) { sb.append('+'); + } sb.append(p).append('/'); String t = toughness.toString(); if (!t.startsWith("-")) { - if (p.startsWith("-")) + if (p.startsWith("-")) { sb.append('-'); - else + } else { sb.append('+'); + } } sb.append(t); - if (duration != Duration.WhileOnBattlefield) + if (duration != Duration.WhileOnBattlefield) { sb.append(' ').append(duration.toString()); + } String message = power.getMessage(); if (!message.isEmpty()) { sb.append(" for each "); diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/GainAbilityControlledSpellsEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/GainAbilityControlledSpellsEffect.java index 59ea0284754..4fb3d05810e 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/GainAbilityControlledSpellsEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/GainAbilityControlledSpellsEffect.java @@ -53,7 +53,7 @@ public class GainAbilityControlledSpellsEffect extends ContinuousEffectImpl { super(Duration.WhileOnBattlefield, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.AddAbility); this.ability = ability; this.filter = filter; - staticText = filter.getMessage() + " you cast have " + ability.getRule(); + staticText = filter.getMessage() + " you cast have " + ability.getRule() + '.'; } public GainAbilityControlledSpellsEffect(final GainAbilityControlledSpellsEffect effect) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/counter/AddCountersAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/counter/AddCountersAllEffect.java index 3bc9ba0e983..b896c2b9502 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/counter/AddCountersAllEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/counter/AddCountersAllEffect.java @@ -36,6 +36,7 @@ import mage.filter.FilterPermanent; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; +import mage.util.CardUtil; /** * @@ -82,7 +83,7 @@ public class AddCountersAllEffect extends OneShotEffect { StringBuilder sb = new StringBuilder(); sb.append("put "); if (counter.getCount() > 1) { - sb.append(Integer.toString(counter.getCount())).append(' ').append(counter.getName().toLowerCase()).append(" counters on each "); + sb.append(CardUtil.numberToText(counter.getCount(), "a")).append(' ').append(counter.getName().toLowerCase()).append(" counters on each "); } else { sb.append("a ").append(counter.getName().toLowerCase()).append(" counter on each "); } diff --git a/Mage/src/main/java/mage/abilities/effects/common/counter/AddCountersSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/counter/AddCountersSourceEffect.java index 1f28040a739..9376340acff 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/counter/AddCountersSourceEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/counter/AddCountersSourceEffect.java @@ -152,14 +152,20 @@ public class AddCountersSourceEffect extends OneShotEffect { private void setText() { StringBuilder sb = new StringBuilder(); sb.append("put "); + boolean plural = true; if (counter.getCount() > 1) { sb.append(CardUtil.numberToText(counter.getCount())).append(' '); } else if (amount.toString().equals("X") && amount.getMessage().isEmpty()) { sb.append("X "); } else { sb.append("a "); + plural = false; } - sb.append(counter.getName().toLowerCase()).append(" counter on {this}"); + sb.append(counter.getName().toLowerCase()).append(" counter"); + if (plural) { + sb.append('s'); + } + sb.append(" on {this}"); if (!amount.getMessage().isEmpty()) { sb.append(" for each ").append(amount.getMessage()); } diff --git a/Mage/src/main/java/mage/abilities/effects/common/discard/DiscardTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/discard/DiscardTargetEffect.java index a053e6f2560..4bf488649b9 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/discard/DiscardTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/discard/DiscardTargetEffect.java @@ -108,7 +108,7 @@ public class DiscardTargetEffect extends OneShotEffect { } sb.append(" discards "); if (amount.toString().equals("1")) { - sb.append(" a card"); + sb.append("a card"); } else { sb.append(CardUtil.numberToText(amount.toString())).append(" cards"); } diff --git a/Mage/src/main/java/mage/abilities/effects/common/search/SearchLibraryGraveyardPutInHandEffect.java b/Mage/src/main/java/mage/abilities/effects/common/search/SearchLibraryGraveyardPutInHandEffect.java index f540608e80f..137a384bf1c 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/search/SearchLibraryGraveyardPutInHandEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/search/SearchLibraryGraveyardPutInHandEffect.java @@ -57,7 +57,7 @@ public class SearchLibraryGraveyardPutInHandEffect extends OneShotEffect { super(Outcome.Benefit); this.filter = filter; this.forceToSearchBoth = forceToSearchBoth; - staticText = "search your library and" + (forceToSearchBoth ? "" : "/or ") + " graveyard for a card named " + filter.getMessage() + staticText = "search your library and" + (forceToSearchBoth ? "" : "/or") + " graveyard for a card named " + filter.getMessage() + ", reveal it, and put it into your hand. " + (forceToSearchBoth ? "Then shuffle your library" : "If you search your library this way, shuffle it"); } diff --git a/Mage/src/main/java/mage/abilities/effects/common/search/SearchLibraryPutInPlayEffect.java b/Mage/src/main/java/mage/abilities/effects/common/search/SearchLibraryPutInPlayEffect.java index 52f45373b0f..75ba52ece36 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/search/SearchLibraryPutInPlayEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/search/SearchLibraryPutInPlayEffect.java @@ -37,6 +37,7 @@ import mage.constants.Zone; import mage.game.Game; import mage.players.Player; import mage.target.common.TargetCardInLibrary; +import mage.util.CardUtil; /** * @@ -106,9 +107,9 @@ public class SearchLibraryPutInPlayEffect extends SearchEffect { sb.append("search your library for "); if (target.getNumberOfTargets() == 0 && target.getMaxNumberOfTargets() > 0) { if (target.getMaxNumberOfTargets() == Integer.MAX_VALUE) { - sb.append("any number of ").append(' '); + sb.append("any number of "); } else { - sb.append("up to ").append(target.getMaxNumberOfTargets()).append(' '); + sb.append("up to ").append(CardUtil.numberToText(target.getMaxNumberOfTargets())).append(' '); } sb.append(target.getTargetName()).append(" and put them onto the battlefield"); } else { diff --git a/Mage/src/main/java/mage/abilities/effects/common/search/SearchTargetGraveyardHandLibraryForCardNameAndExileEffect.java b/Mage/src/main/java/mage/abilities/effects/common/search/SearchTargetGraveyardHandLibraryForCardNameAndExileEffect.java index 797a5edcf93..5be2bb16f27 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/search/SearchTargetGraveyardHandLibraryForCardNameAndExileEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/search/SearchTargetGraveyardHandLibraryForCardNameAndExileEffect.java @@ -129,7 +129,7 @@ public abstract class SearchTargetGraveyardHandLibraryForCardNameAndExileEffect @Override public String getText(Mode mode) { StringBuilder sb = new StringBuilder(); - sb.append("Search ").append(this.searchWhatText); + sb.append("search ").append(this.searchWhatText); sb.append(" graveyard, hand, and library for "); sb.append(this.searchForText); sb.append(" and exile them. Then that player shuffles his or her library"); diff --git a/Mage/src/main/java/mage/abilities/effects/keyword/BolsterEffect.java b/Mage/src/main/java/mage/abilities/effects/keyword/BolsterEffect.java index c29a2ef4cf1..c0900885728 100644 --- a/Mage/src/main/java/mage/abilities/effects/keyword/BolsterEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/keyword/BolsterEffect.java @@ -122,7 +122,7 @@ public class BolsterEffect extends OneShotEffect { } else { sb.append("X, where X is the number of "); sb.append(amount.getMessage()); - sb.append(". (Choose a creature with the least toughness among creatures you control and put X +1/+1 counters on it.)"); + sb.append(" (Choose a creature with the least toughness among creatures you control and put X +1/+1 counters on it.)"); } return sb.toString(); } diff --git a/Mage/src/main/java/mage/abilities/keyword/CumulativeUpkeepAbility.java b/Mage/src/main/java/mage/abilities/keyword/CumulativeUpkeepAbility.java index f24a1a88178..42144532db7 100644 --- a/Mage/src/main/java/mage/abilities/keyword/CumulativeUpkeepAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/CumulativeUpkeepAbility.java @@ -31,6 +31,7 @@ import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.costs.Cost; import mage.abilities.costs.CostsImpl; +import mage.abilities.costs.OrCost; import mage.abilities.costs.mana.ManaCost; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.OneShotEffect; @@ -70,9 +71,11 @@ public class CumulativeUpkeepAbility extends BeginningOfUpkeepTriggeredAbility { @Override public String getRule() { - StringBuilder sb = new StringBuilder("Cumulative upkeep "); - if (!(cumulativeCost instanceof ManaCost)) { - sb.append("— "); + StringBuilder sb = new StringBuilder("Cumulative upkeep"); + if (!(cumulativeCost instanceof ManaCost || cumulativeCost instanceof OrCost)) { + sb.append("—"); + } else { + sb.append(' '); } sb.append(cumulativeCost.getText()); return sb.toString(); diff --git a/Mage/src/main/java/mage/abilities/keyword/DashAbility.java b/Mage/src/main/java/mage/abilities/keyword/DashAbility.java index 93a7f9fe425..96d2e45a432 100644 --- a/Mage/src/main/java/mage/abilities/keyword/DashAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/DashAbility.java @@ -78,6 +78,7 @@ public class DashAbility extends StaticAbility implements AlternativeSourceCosts new GainAbilitySourceEffect(HasteAbility.getInstance(), Duration.Custom, false), DashedCondition.instance, "", ""); ability.addEffect(new DashAddDelayedTriggeredAbilityEffect()); + ability.setRuleVisible(false); addSubAbility(ability); } diff --git a/Mage/src/main/java/mage/abilities/keyword/DeathtouchAbility.java b/Mage/src/main/java/mage/abilities/keyword/DeathtouchAbility.java index 514a4e3370b..b746561a417 100644 --- a/Mage/src/main/java/mage/abilities/keyword/DeathtouchAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/DeathtouchAbility.java @@ -25,7 +25,6 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.abilities.keyword; import mage.constants.Zone; @@ -40,7 +39,7 @@ import java.io.ObjectStreamException; */ public class DeathtouchAbility extends StaticAbility implements MageSingleton { - private static final DeathtouchAbility instance = new DeathtouchAbility(); + private static final DeathtouchAbility instance = new DeathtouchAbility(); private Object readResolve() throws ObjectStreamException { return instance; @@ -56,7 +55,7 @@ public class DeathtouchAbility extends StaticAbility implements MageSingleton { @Override public String getRule() { - return "Deathtouch (Any amount of damage this deals to a creature is enough to destroy it.)"; + return "deathtouch"; } @Override @@ -64,6 +63,4 @@ public class DeathtouchAbility extends StaticAbility implements MageSingleton { return instance; } - - } diff --git a/Mage/src/main/java/mage/abilities/keyword/FearAbility.java b/Mage/src/main/java/mage/abilities/keyword/FearAbility.java index e730552c9d9..939b05cfabf 100644 --- a/Mage/src/main/java/mage/abilities/keyword/FearAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/FearAbility.java @@ -24,11 +24,9 @@ * The views and conclusions contained in the software and documentation are those of the * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. -*/ - + */ package mage.abilities.keyword; -import mage.constants.CardType; import mage.constants.Duration; import mage.abilities.Ability; import mage.abilities.EvasionAbility; @@ -45,7 +43,7 @@ import java.io.ObjectStreamException; */ public class FearAbility extends EvasionAbility implements MageSingleton { - private static final FearAbility instance = new FearAbility(); + private static final FearAbility instance = new FearAbility(); private Object readResolve() throws ObjectStreamException { return instance; @@ -61,7 +59,7 @@ public class FearAbility extends EvasionAbility implements MageSingleton { @Override public String getRule() { - return "Fear"; + return "fear"; } @Override @@ -102,4 +100,4 @@ class FearEffect extends RestrictionEffect implements MageSingleton { return new FearEffect(this); } -} \ No newline at end of file +} diff --git a/Mage/src/main/java/mage/abilities/keyword/FlankingAbility.java b/Mage/src/main/java/mage/abilities/keyword/FlankingAbility.java index d8df61ca873..ce887d86e0c 100644 --- a/Mage/src/main/java/mage/abilities/keyword/FlankingAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/FlankingAbility.java @@ -1,4 +1,3 @@ - package mage.abilities.keyword; import mage.abilities.TriggeredAbilityImpl; @@ -11,12 +10,9 @@ import mage.game.events.GameEvent; import mage.game.permanent.Permanent; import mage.target.targetpointer.FixedTarget; - /** * @author Plopman */ - - public class FlankingAbility extends TriggeredAbilityImpl { public FlankingAbility() { @@ -37,9 +33,8 @@ public class FlankingAbility extends TriggeredAbilityImpl { if (event.getTargetId().equals(this.getSourceId())) { Permanent permanent = game.getPermanent(event.getSourceId()); if (permanent != null) { - boolean hasFlankingAbility = - permanent.getAbilities().stream().anyMatch(ability -> ability instanceof FlankingAbility); - + boolean hasFlankingAbility + = permanent.getAbilities().stream().anyMatch(ability -> ability instanceof FlankingAbility); if (!hasFlankingAbility) { for (Effect effect : this.getEffects()) { @@ -54,7 +49,7 @@ public class FlankingAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "Flanking"; + return "flanking"; } @Override @@ -62,5 +57,4 @@ public class FlankingAbility extends TriggeredAbilityImpl { return new FlankingAbility(this); } - } diff --git a/Mage/src/main/java/mage/abilities/keyword/FlyingAbility.java b/Mage/src/main/java/mage/abilities/keyword/FlyingAbility.java index 86d243c6753..1e0bf34cb13 100644 --- a/Mage/src/main/java/mage/abilities/keyword/FlyingAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/FlyingAbility.java @@ -24,8 +24,7 @@ * The views and conclusions contained in the software and documentation are those of the * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. -*/ - + */ package mage.abilities.keyword; import mage.abilities.Ability; @@ -46,7 +45,7 @@ import java.io.ObjectStreamException; */ public class FlyingAbility extends EvasionAbility implements MageSingleton { - private static final FlyingAbility instance = new FlyingAbility(); + private static final FlyingAbility instance = new FlyingAbility(); private Object readResolve() throws ObjectStreamException { return instance; @@ -62,7 +61,7 @@ public class FlyingAbility extends EvasionAbility implements MageSingleton { @Override public String getRule() { - return "Flying"; + return "flying"; } @Override @@ -91,7 +90,7 @@ class FlyingEffect extends RestrictionEffect implements MageSingleton { public boolean canBeBlocked(Permanent attacker, Permanent blocker, Ability source, Game game) { return blocker.getAbilities().containsKey(FlyingAbility.getInstance().getId()) || blocker.getAbilities().containsKey(ReachAbility.getInstance().getId()) - || (game.getContinuousEffects().asThough(blocker.getId(), AsThoughEffectType.BLOCK_DRAGON, source, blocker.getControllerId(), game) && attacker.hasSubtype(SubType.DRAGON, game)) ; + || (game.getContinuousEffects().asThough(blocker.getId(), AsThoughEffectType.BLOCK_DRAGON, source, blocker.getControllerId(), game) && attacker.hasSubtype(SubType.DRAGON, game)); } @Override diff --git a/Mage/src/main/java/mage/abilities/keyword/IndestructibleAbility.java b/Mage/src/main/java/mage/abilities/keyword/IndestructibleAbility.java index d5a09f16294..70d7008032b 100644 --- a/Mage/src/main/java/mage/abilities/keyword/IndestructibleAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/IndestructibleAbility.java @@ -32,15 +32,15 @@ import mage.constants.Zone; import mage.abilities.StaticAbility; /** - * OLD RULES: - * 700.4. If a permanent is indestructible, rules and effects can't destroy it. (See rule 701.6, "Destroy.") - * Such permanents are not destroyed by lethal damage, and they ignore the lethal-damage state-based action - * (see rule 704.5g). Rules or effects may cause an indestructible permanent to be sacrificed, put into a - * graveyard, or exiled. # + * OLD RULES: 700.4. If a permanent is indestructible, rules and effects can't + * destroy it. (See rule 701.6, "Destroy.") Such permanents are not destroyed by + * lethal damage, and they ignore the lethal-damage state-based action (see rule + * 704.5g). Rules or effects may cause an indestructible permanent to be + * sacrificed, put into a graveyard, or exiled. # * - * 700.4a Although the text "[This permanent] is indestructible" is an ability, actually being - * indestructible is neither an ability nor a characteristic. It's just something that's true - * about a permanent. + * 700.4a Although the text "[This permanent] is indestructible" is an ability, + * actually being indestructible is neither an ability nor a characteristic. + * It's just something that's true about a permanent. * * NEW RULES * @@ -48,10 +48,9 @@ import mage.abilities.StaticAbility; * * * - * + * * @author BetaSteward_at_googlemail.com */ - public class IndestructibleAbility extends StaticAbility { private static final IndestructibleAbility instance; @@ -79,7 +78,7 @@ public class IndestructibleAbility extends StaticAbility { @Override public String getRule() { - return "Indestructible"; + return "indestructible"; } } diff --git a/Mage/src/main/java/mage/abilities/keyword/MorphAbility.java b/Mage/src/main/java/mage/abilities/keyword/MorphAbility.java index 557236e5ca5..dfe545198cd 100644 --- a/Mage/src/main/java/mage/abilities/keyword/MorphAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/MorphAbility.java @@ -138,7 +138,11 @@ public class MorphAbility extends StaticAbility implements AlternativeSourceCost break; } } - sb.append(morphCosts.getText()).append(' '); + sb.append(morphCosts.getText()); + if (!(morphCosts.get(morphCosts.size() - 1) instanceof ManaCosts)) { + sb.append('.'); + } + sb.append(' '); if (megamorph) { sb.append(REMINDER_TEXT_MEGA); } else { diff --git a/Mage/src/main/java/mage/abilities/keyword/ProtectionAbility.java b/Mage/src/main/java/mage/abilities/keyword/ProtectionAbility.java index 1e8c5adc2bc..5f1b480406e 100644 --- a/Mage/src/main/java/mage/abilities/keyword/ProtectionAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/ProtectionAbility.java @@ -32,7 +32,6 @@ import mage.MageObject; import mage.ObjectColor; import mage.abilities.StaticAbility; import mage.cards.Card; -import mage.constants.CardType; import mage.constants.Zone; import mage.filter.Filter; import mage.filter.FilterCard; diff --git a/Mage/src/main/java/mage/abilities/keyword/RampageAbility.java b/Mage/src/main/java/mage/abilities/keyword/RampageAbility.java index 29fde94fe9e..b35919daa51 100644 --- a/Mage/src/main/java/mage/abilities/keyword/RampageAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/RampageAbility.java @@ -46,7 +46,7 @@ public class RampageAbility extends BecomesBlockedTriggeredAbility { public RampageAbility(int amount) { super(null, false); - rule = "rampage " + amount + "(Whenever this creature becomes blocked, it gets +" + rule = "rampage " + amount + " (Whenever this creature becomes blocked, it gets +" + amount + "/+" + amount + " until end of turn for each creature blocking it beyond the first.)"; RampageValue rv = new RampageValue(amount); this.addEffect(new BoostSourceEffect(rv, rv, Duration.EndOfTurn, true)); diff --git a/Mage/src/main/java/mage/abilities/keyword/ReachAbility.java b/Mage/src/main/java/mage/abilities/keyword/ReachAbility.java index 88e97204f6f..b871cf0b814 100644 --- a/Mage/src/main/java/mage/abilities/keyword/ReachAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/ReachAbility.java @@ -24,8 +24,7 @@ * The views and conclusions contained in the software and documentation are those of the * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. -*/ - + */ package mage.abilities.keyword; import mage.constants.Zone; @@ -40,7 +39,7 @@ import java.io.ObjectStreamException; */ public class ReachAbility extends StaticAbility implements MageSingleton { - private static final ReachAbility instance = new ReachAbility(); + private static final ReachAbility instance = new ReachAbility(); private Object readResolve() throws ObjectStreamException { return instance; @@ -56,7 +55,7 @@ public class ReachAbility extends StaticAbility implements MageSingleton { @Override public String getRule() { - return "Reach"; + return "reach"; } @Override diff --git a/Mage/src/main/java/mage/abilities/keyword/RippleAbility.java b/Mage/src/main/java/mage/abilities/keyword/RippleAbility.java index dde3a57961e..cf70a573362 100644 --- a/Mage/src/main/java/mage/abilities/keyword/RippleAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/RippleAbility.java @@ -56,13 +56,11 @@ public class RippleAbility extends TriggeredAbilityImpl { return new RippleAbility(this); } - @Override public String getRule() { - return "Ripple " + rippleNumber + " (When you cast this spell, you may reveal the top " + CardUtil.numberToText(rippleNumber) + " cards of your library. You may cast any revealed cards with the same name as this spell without paying their mana costs. Put the rest on the bottom of your library.)"; + return "ripple " + rippleNumber + " (When you cast this spell, you may reveal the top " + CardUtil.numberToText(rippleNumber) + " cards of your library. You may cast any revealed cards with the same name as this spell without paying their mana costs. Put the rest on the bottom of your library.)"; } - } class RippleEffect extends OneShotEffect { @@ -84,13 +82,12 @@ class RippleEffect extends OneShotEffect { return new RippleEffect(this); } - @Override public boolean apply(Game game, Ability source) { Player player = game.getPlayer(source.getControllerId()); MageObject sourceObject = game.getObject(source.getSourceId()); if (player != null) { - if (!player.chooseUse(Outcome.Neutral, "Reveal " + rippleNumber + " cards from the top of your library?", source, game)){ + if (!player.chooseUse(Outcome.Neutral, "Reveal " + rippleNumber + " cards from the top of your library?", source, game)) { return true; //fizzle } // reveal to/**/p cards from library @@ -123,4 +120,3 @@ class RippleEffect extends OneShotEffect { } } - diff --git a/Mage/src/main/java/mage/abilities/keyword/ShadowAbility.java b/Mage/src/main/java/mage/abilities/keyword/ShadowAbility.java index 667e4aa22f3..2573570731c 100644 --- a/Mage/src/main/java/mage/abilities/keyword/ShadowAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/ShadowAbility.java @@ -12,10 +12,12 @@ import mage.game.permanent.Permanent; /** * "Shadow" keyword + * * @author Loki */ public class ShadowAbility extends EvasionAbility implements MageSingleton { - private static final ShadowAbility instance = new ShadowAbility(); + + private static final ShadowAbility instance = new ShadowAbility(); private Object readResolve() throws ObjectStreamException { return instance; @@ -31,7 +33,7 @@ public class ShadowAbility extends EvasionAbility implements MageSingleton { @Override public String getRule() { - return "Shadow (This creature can block or be blocked by only creatures with shadow.)"; + return "shadow (This creature can block or be blocked by only creatures with shadow.)"; } @Override diff --git a/Mage/src/main/java/mage/abilities/keyword/ShroudAbility.java b/Mage/src/main/java/mage/abilities/keyword/ShroudAbility.java index 53e32db4502..556f9addb9e 100644 --- a/Mage/src/main/java/mage/abilities/keyword/ShroudAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/ShroudAbility.java @@ -56,7 +56,7 @@ public class ShroudAbility extends StaticAbility implements MageSingleton { @Override public String getRule() { - return "Shroud"; + return "shroud"; } @Override diff --git a/Mage/src/main/java/mage/abilities/keyword/SuspendAbility.java b/Mage/src/main/java/mage/abilities/keyword/SuspendAbility.java index 3382b061dbf..0921b18e12d 100644 --- a/Mage/src/main/java/mage/abilities/keyword/SuspendAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/SuspendAbility.java @@ -166,7 +166,7 @@ public class SuspendAbility extends SpecialAction { } StringBuilder sb = new StringBuilder("Suspend "); if (cost != null) { - sb.append(suspend == Integer.MAX_VALUE ? "X" : suspend).append(" - ").append(cost.getText()); + sb.append(suspend == Integer.MAX_VALUE ? "X" : suspend).append(" - ").append(cost.getText()).append(suspend == Integer.MAX_VALUE ? ". X can't be 0" : ""); if (!shortRule) { sb.append(" (Rather than cast this card from your hand, pay ") .append(cost.getText()) diff --git a/Mage/src/main/java/mage/abilities/keyword/VigilanceAbility.java b/Mage/src/main/java/mage/abilities/keyword/VigilanceAbility.java index a4d5f29d5a3..13925a8ee3e 100644 --- a/Mage/src/main/java/mage/abilities/keyword/VigilanceAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/VigilanceAbility.java @@ -25,7 +25,6 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.abilities.keyword; import mage.constants.Zone; @@ -40,7 +39,7 @@ import java.io.ObjectStreamException; */ public class VigilanceAbility extends StaticAbility implements MageSingleton { - private static final VigilanceAbility instance = new VigilanceAbility(); + private static final VigilanceAbility instance = new VigilanceAbility(); private Object readResolve() throws ObjectStreamException { return instance; @@ -56,7 +55,7 @@ public class VigilanceAbility extends StaticAbility implements MageSingleton { @Override public String getRule() { - return "Vigilance"; + return "vigilance"; } @Override diff --git a/Mage/src/main/java/mage/abilities/keyword/WitherAbility.java b/Mage/src/main/java/mage/abilities/keyword/WitherAbility.java index a88922d345e..69381c0a157 100644 --- a/Mage/src/main/java/mage/abilities/keyword/WitherAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/WitherAbility.java @@ -24,8 +24,7 @@ * The views and conclusions contained in the software and documentation are those of the * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. -*/ - + */ package mage.abilities.keyword; import mage.constants.Zone; @@ -37,19 +36,24 @@ import java.io.ObjectStreamException; /** * 702.77. Wither * - * 702.77a. Wither is a static ability. Damage dealt to a creature by a source with wither isn't marked on that creature. Rather, it causes that many -1/-1 counters to be put on that creature. See rule 119.3. + * 702.77a. Wither is a static ability. Damage dealt to a creature by a source + * with wither isn't marked on that creature. Rather, it causes that many -1/-1 + * counters to be put on that creature. See rule 119.3. * - * 702.77b. If a permanent leaves the battlefield before an effect causes it to deal damage, its last known information is used to determine whether it had wither. + * 702.77b. If a permanent leaves the battlefield before an effect causes it to + * deal damage, its last known information is used to determine whether it had + * wither. * - * 702.77c. The wither rules function no matter what zone an object with wither deals damage from. + * 702.77c. The wither rules function no matter what zone an object with wither + * deals damage from. * - * 702.77d. Multiple instances of wither on the same object are redundant. + * 702.77d. Multiple instances of wither on the same object are redundant. * - * @author nantuko + * @author nantuko */ public class WitherAbility extends StaticAbility implements MageSingleton { - private static final WitherAbility instance = new WitherAbility(); + private static final WitherAbility instance = new WitherAbility(); private Object readResolve() throws ObjectStreamException { return instance; @@ -65,7 +69,7 @@ public class WitherAbility extends StaticAbility implements MageSingleton { @Override public String getRule() { - return "Wither (This deals damage to creatures in the form of -1/-1 counters.)"; + return "wither (This deals damage to creatures in the form of -1/-1 counters.)"; } @Override diff --git a/Mage/src/main/java/mage/filter/StaticFilters.java b/Mage/src/main/java/mage/filter/StaticFilters.java index 42676a1b122..84695fd94f9 100644 --- a/Mage/src/main/java/mage/filter/StaticFilters.java +++ b/Mage/src/main/java/mage/filter/StaticFilters.java @@ -59,7 +59,7 @@ public final class StaticFilters { public static final FilterCreaturePermanent FILTER_PERMANENT_A_CREATURE = new FilterCreaturePermanent("a creature"); public static final FilterCreaturePermanent FILTER_PERMANENT_CREATURES = new FilterCreaturePermanent("creatures"); public static final FilterCreaturePermanent FILTER_PERMANENT_CREATURE_GOBLINS = new FilterCreaturePermanent(SubType.GOBLIN, "Goblin creatures"); - public static final FilterCreaturePermanent FILTER_PERMANENT_CREATURE_SLIVERS = new FilterCreaturePermanent(SubType.SLIVER, "Sliver creatures"); + public static final FilterCreaturePermanent FILTER_PERMANENT_CREATURE_SLIVERS = new FilterCreaturePermanent(SubType.SLIVER, "all Sliver creatures"); public static final FilterPlaneswalkerPermanent FILTER_PERMANENT_PLANESWALKER = new FilterPlaneswalkerPermanent(); public static final FilterPermanent FILTER_PERMANENT_NON_LAND = new FilterNonlandPermanent(); @@ -69,6 +69,7 @@ public final class StaticFilters { = (FilterSpell) new FilterSpell("noncreature spell").add(Predicates.not(new CardTypePredicate(CardType.CREATURE))); public static final FilterSpell FILTER_SPELL = new FilterSpell(); + public static final FilterSpell FILTER_A_SPELL = new FilterSpell("a spell"); public static final FilterSpell FILTER_INSTANT_OR_SORCERY_SPELL = new FilterSpell("instant or sorcery spell"); public static final FilterSpell FILTER_INSTANT_OR_SORCERY_SPELLS = new FilterSpell("instant or sorcery spells"); diff --git a/Mage/src/main/java/mage/filter/common/FilterBlockingCreature.java b/Mage/src/main/java/mage/filter/common/FilterBlockingCreature.java index 7e6aa117690..896517c0bf2 100644 --- a/Mage/src/main/java/mage/filter/common/FilterBlockingCreature.java +++ b/Mage/src/main/java/mage/filter/common/FilterBlockingCreature.java @@ -24,8 +24,7 @@ * The views and conclusions contained in the software and documentation are those of the * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. -*/ - + */ package mage.filter.common; import mage.filter.predicate.permanent.BlockingPredicate; @@ -37,7 +36,7 @@ import mage.filter.predicate.permanent.BlockingPredicate; public class FilterBlockingCreature extends FilterCreaturePermanent { public FilterBlockingCreature() { - this("Blocking creature"); + this("blocking creature"); } public FilterBlockingCreature(String name) { diff --git a/Mage/src/test/java/mage/ManaTest.java b/Mage/src/test/java/mage/ManaTest.java index 2f496269550..1ad59de4684 100644 --- a/Mage/src/test/java/mage/ManaTest.java +++ b/Mage/src/test/java/mage/ManaTest.java @@ -497,7 +497,7 @@ public class ManaTest { String ret = mana.toString(); // then - assertEquals("{6}{R}{G}{G}{U}{U}{U}{B}{B}{B}{Any}{Any}", ret); + assertEquals("{6}{U}{U}{U}{B}{B}{B}{R}{G}{G}{Any}{Any}", ret); } @Test