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/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/BlackManaBattery.java b/Mage.Sets/src/mage/cards/b/BlackManaBattery.java index 8e6449f4d12..412775a2340 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)); @@ -68,7 +67,7 @@ public class BlackManaBattery extends CardImpl { "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}")); + "Remove any number of storage counters from {this}")); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/b/BlueManaBattery.java b/Mage.Sets/src/mage/cards/b/BlueManaBattery.java index 410b81cb00a..6883996517d 100644 --- a/Mage.Sets/src/mage/cards/b/BlueManaBattery.java +++ b/Mage.Sets/src/mage/cards/b/BlueManaBattery.java @@ -67,7 +67,7 @@ public class BlueManaBattery extends CardImpl { "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}")); + "Remove any number of storage counters from {this}")); 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/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/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/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/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/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/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/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/GleamOfAuthority.java b/Mage.Sets/src/mage/cards/g/GleamOfAuthority.java index 75f1d0d9123..82f91c5ec95 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,17 @@ 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))); + // 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 +93,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/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/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..0e273c06e0b 100644 --- a/Mage.Sets/src/mage/cards/g/GreenManaBattery.java +++ b/Mage.Sets/src/mage/cards/g/GreenManaBattery.java @@ -67,7 +67,7 @@ public class GreenManaBattery extends CardImpl { "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}")); + "Remove any number of storage counters from {this}")); 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/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/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/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/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/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/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/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/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/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/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/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/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/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/RedManaBattery.java b/Mage.Sets/src/mage/cards/r/RedManaBattery.java index 2b6fbe11d03..224f287c212 100644 --- a/Mage.Sets/src/mage/cards/r/RedManaBattery.java +++ b/Mage.Sets/src/mage/cards/r/RedManaBattery.java @@ -67,7 +67,7 @@ public class RedManaBattery extends CardImpl { "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}")); + "Remove any number of storage counters from {this}")); this.addAbility(ability); } 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/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/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/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/ScaleBlessing.java b/Mage.Sets/src/mage/cards/s/ScaleBlessing.java index e354df9011f..c1d7edba64b 100644 --- a/Mage.Sets/src/mage/cards/s/ScaleBlessing.java +++ b/Mage.Sets/src/mage/cards/s/ScaleBlessing.java @@ -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) { 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/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/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/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/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/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/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/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/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/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/w/WhiteManaBattery.java b/Mage.Sets/src/mage/cards/w/WhiteManaBattery.java index fada4c7f921..9e78d925f26 100644 --- a/Mage.Sets/src/mage/cards/w/WhiteManaBattery.java +++ b/Mage.Sets/src/mage/cards/w/WhiteManaBattery.java @@ -67,7 +67,7 @@ public class WhiteManaBattery extends CardImpl { "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}")); + "Remove any number of storage counters from {this}")); this.addAbility(ability); } 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/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/effects/common/AddConditionalManaOfAnyColorEffect.java b/Mage/src/main/java/mage/abilities/effects/common/AddConditionalManaOfAnyColorEffect.java index 2da6d5747f8..14803dfc478 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,10 @@ 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 one color" : "in any combination of colors") + " to your mana pool. " + manaBuilder.getRule(); } 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/GetEmblemEffect.java b/Mage/src/main/java/mage/abilities/effects/common/GetEmblemEffect.java index 796fb677001..79bd6484f2e 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 = "You get an emblem with \"" + +'"'; } public GetEmblemEffect(final GetEmblemEffect effect) { @@ -68,4 +69,21 @@ 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) { + sb.append(rules.get(0)); + sb.append('"'); + } else if (rules.size() == 2) { + for (String s : rules) { + sb.append(s); + sb.append("\" and \""); + } + sb.append('"'); + } + sb.append('.'); + return sb.toString(); + } } 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/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/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/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/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/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/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/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/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())