diff --git a/Mage.Sets/src/mage/cards/b/BalduvianFallen.java b/Mage.Sets/src/mage/cards/b/BalduvianFallen.java index 04adf3134b9..c01cf245c11 100644 --- a/Mage.Sets/src/mage/cards/b/BalduvianFallen.java +++ b/Mage.Sets/src/mage/cards/b/BalduvianFallen.java @@ -82,6 +82,6 @@ class BalduvianFallenAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "Whenever {this}'s cumulative upkeep is paid, it gets +1/+0 until end of turn for each {B} or {R} spent this way"; + return "Whenever {this}'s cumulative upkeep is paid, it gets +1/+0 until end of turn for each {B} or {R} spent this way."; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/b/BalduvianRage.java b/Mage.Sets/src/mage/cards/b/BalduvianRage.java index 21a307d0ac9..19a8567cb59 100644 --- a/Mage.Sets/src/mage/cards/b/BalduvianRage.java +++ b/Mage.Sets/src/mage/cards/b/BalduvianRage.java @@ -29,7 +29,9 @@ public final class BalduvianRage extends CardImpl { this.getSpellAbility().addTarget(new TargetCreaturePermanent(new FilterAttackingCreature())); // Draw a card at the beginning of the next turn's upkeep. - this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect(new AtTheBeginOfNextUpkeepDelayedTriggeredAbility(new DrawCardSourceControllerEffect(1)),false)); + this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect( + new AtTheBeginOfNextUpkeepDelayedTriggeredAbility(new DrawCardSourceControllerEffect(1)),false + ).concatBy("
")); } private BalduvianRage(final BalduvianRage card) { diff --git a/Mage.Sets/src/mage/cards/c/Counterbalance.java b/Mage.Sets/src/mage/cards/c/Counterbalance.java index 11a567aae9c..63807e164f0 100644 --- a/Mage.Sets/src/mage/cards/c/Counterbalance.java +++ b/Mage.Sets/src/mage/cards/c/Counterbalance.java @@ -30,7 +30,7 @@ public final class Counterbalance extends CardImpl { // Whenever an opponent casts a spell, you may reveal the top card of your library. If you do, counter that spell if it has the same converted mana cost as the revealed card. - this.addAbility(new SpellCastOpponentTriggeredAbility(Zone.BATTLEFIELD, new CounterbalanceEffect(), StaticFilters.FILTER_SPELL, true, SetTargetPointer.SPELL)); + this.addAbility(new SpellCastOpponentTriggeredAbility(Zone.BATTLEFIELD, new CounterbalanceEffect(), StaticFilters.FILTER_SPELL_A, true, SetTargetPointer.SPELL)); } private Counterbalance(final Counterbalance card) { diff --git a/Mage.Sets/src/mage/cards/f/FrozenSolid.java b/Mage.Sets/src/mage/cards/f/FrozenSolid.java index 4c4105b5e79..1c12dc6461a 100644 --- a/Mage.Sets/src/mage/cards/f/FrozenSolid.java +++ b/Mage.Sets/src/mage/cards/f/FrozenSolid.java @@ -37,7 +37,8 @@ public final class FrozenSolid extends CardImpl { // Enchanted creature doesn't untap during its controller's untap step. this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DontUntapInControllersUntapStepEnchantedEffect())); // When enchanted creature is dealt damage, destroy it. - this.addAbility(new DealtDamageAttachedTriggeredAbility(new DestroyAttachedToEffect("it"), false)); + this.addAbility(new DealtDamageAttachedTriggeredAbility(new DestroyAttachedToEffect("it"), false) + .setTriggerPhrase("When enchanted creature is dealt damage, ")); } private FrozenSolid(final FrozenSolid card) { diff --git a/Mage.Sets/src/mage/cards/g/GreaterStoneSpirit.java b/Mage.Sets/src/mage/cards/g/GreaterStoneSpirit.java index 7443bc958c6..e17ffb23372 100644 --- a/Mage.Sets/src/mage/cards/g/GreaterStoneSpirit.java +++ b/Mage.Sets/src/mage/cards/g/GreaterStoneSpirit.java @@ -47,13 +47,13 @@ public final class GreaterStoneSpirit extends CardImpl { // {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) - .setText("until end of turn, target creature gets +0/+2"), + new BoostSourceEffect(1, 0, Duration.EndOfTurn), 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}")); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(0, 2, Duration.EndOfTurn) + .setText("until end of turn, target creature gets +0/+2"), new ManaCostsImpl<>("{2}{R}")); ability.addEffect(effect); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/h/HaakonStromgaldScourge.java b/Mage.Sets/src/mage/cards/h/HaakonStromgaldScourge.java index 3f9a0148b51..6b179886e15 100644 --- a/Mage.Sets/src/mage/cards/h/HaakonStromgaldScourge.java +++ b/Mage.Sets/src/mage/cards/h/HaakonStromgaldScourge.java @@ -82,9 +82,7 @@ class HaakonStromgaldScourgePlayEffect extends AsThoughEffectImpl { if (objectId.equals(source.getSourceId()) && affectedControllerId.equals(source.getControllerId())) { Card card = game.getCard(source.getSourceId()); - if (card != null && game.getState().getZone(source.getSourceId()) == Zone.GRAVEYARD) { - return true; - } + return card != null && game.getState().getZone(source.getSourceId()) == Zone.GRAVEYARD; } return false; } @@ -121,9 +119,7 @@ class HaakonStromgaldScourgePlayEffect2 extends ContinuousRuleModifyingEffectImp Card card = game.getCard(event.getSourceId()); if (card != null && card.getId().equals(source.getSourceId())) { Zone zone = game.getState().getZone(card.getId()); - if (zone != null && (zone != Zone.GRAVEYARD)) { - return true; - } + return zone != null && (zone != Zone.GRAVEYARD); } return false; } @@ -133,7 +129,7 @@ class HaakonPlayKnightsFromGraveyardEffect extends AsThoughEffectImpl { public HaakonPlayKnightsFromGraveyardEffect () { super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.WhileOnBattlefield, Outcome.Benefit); - staticText = "As long as {this} is on the battlefield, you may play Knight cards from your graveyard"; + staticText = "As long as {this} is on the battlefield, you may cast Knight spells from your graveyard"; } public HaakonPlayKnightsFromGraveyardEffect(final HaakonPlayKnightsFromGraveyardEffect effect) { @@ -154,14 +150,12 @@ class HaakonPlayKnightsFromGraveyardEffect extends AsThoughEffectImpl { public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) { if (affectedControllerId.equals(source.getControllerId())) { Card knightToCast = game.getCard(objectId); - if (knightToCast != null + return knightToCast != null && knightToCast.hasSubtype(SubType.KNIGHT, game) + && !knightToCast.isLand(game) && knightToCast.isOwnedBy(source.getControllerId()) - && game.getState().getZone(objectId) == Zone.GRAVEYARD) { - return true; - } + && game.getState().getZone(objectId) == Zone.GRAVEYARD; } return false; } } - diff --git a/Mage.Sets/src/mage/cards/h/HibernationsEnd.java b/Mage.Sets/src/mage/cards/h/HibernationsEnd.java index 827abd1781d..189ef60b09f 100644 --- a/Mage.Sets/src/mage/cards/h/HibernationsEnd.java +++ b/Mage.Sets/src/mage/cards/h/HibernationsEnd.java @@ -79,7 +79,7 @@ class HibernationsEndEffect extends OneShotEffect { public HibernationsEndEffect() { super(Outcome.Benefit); - this.staticText = "search your library for a creature card with mana value equal to the number of age counters on {this} and put it onto the battlefield. If you do, shuffle."; + this.staticText = "search your library for a creature card with mana value equal to the number of age counters on {this}, put it onto the battlefield, then shuffle."; } public HibernationsEndEffect(final HibernationsEndEffect effect) { diff --git a/Mage.Sets/src/mage/cards/k/KarplusanMinotaur.java b/Mage.Sets/src/mage/cards/k/KarplusanMinotaur.java index a1bc49f787f..2c3d588aa37 100644 --- a/Mage.Sets/src/mage/cards/k/KarplusanMinotaur.java +++ b/Mage.Sets/src/mage/cards/k/KarplusanMinotaur.java @@ -88,7 +88,7 @@ class KarplusanMinotaurFlipWinTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "Whenever you win a coin flip, {this} deals 1 damage to any target"; + return "Whenever you win a coin flip, {this} deals 1 damage to any target."; } } @@ -152,12 +152,7 @@ class KarplusanMinotaurCost extends CostImpl { @Override public boolean canPay(Ability ability, Ability source, UUID controllerId, Game game) { Player controller = game.getPlayer(controllerId); - if (controller != null) { - if (!game.getOpponents(controllerId).isEmpty()) { - return true; - } - } - return false; + return controller != null && (!game.getOpponents(controllerId).isEmpty()); } @Override @@ -188,4 +183,4 @@ enum KarplusanMinotaurAdjuster implements TargetAdjuster { ability.getTargets().get(0).setTargetController(opponentId); } } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/m/MysticMelting.java b/Mage.Sets/src/mage/cards/m/MysticMelting.java index 8ed847cb925..471a0c2df31 100644 --- a/Mage.Sets/src/mage/cards/m/MysticMelting.java +++ b/Mage.Sets/src/mage/cards/m/MysticMelting.java @@ -28,7 +28,8 @@ public final class MysticMelting extends CardImpl { // Draw a card at the beginning of the next turn's upkeep. this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect( - new AtTheBeginOfNextUpkeepDelayedTriggeredAbility(new DrawCardSourceControllerEffect(1)), false)); + new AtTheBeginOfNextUpkeepDelayedTriggeredAbility(new DrawCardSourceControllerEffect(1)), false + ).concatBy("
")); } private MysticMelting(final MysticMelting card) { diff --git a/Mage.Sets/src/mage/cards/o/OhranViper.java b/Mage.Sets/src/mage/cards/o/OhranViper.java index c397f66c4f6..94d85c038b2 100644 --- a/Mage.Sets/src/mage/cards/o/OhranViper.java +++ b/Mage.Sets/src/mage/cards/o/OhranViper.java @@ -32,7 +32,8 @@ public final class OhranViper extends CardImpl { // Whenever Ohran Viper deals combat damage to a creature, destroy that creature at end of combat. this.addAbility(new DealsCombatDamageToACreatureTriggeredAbility( new CreateDelayedTriggeredAbilityEffect( - new AtTheEndOfCombatDelayedTriggeredAbility(new DestroyTargetEffect("destroy that creature at end of combat")), true), + new AtTheEndOfCombatDelayedTriggeredAbility(new DestroyTargetEffect("destroy that creature at end of combat")) + .setTriggerPhrase(""), true), false, true)); diff --git a/Mage.Sets/src/mage/cards/s/SoulSpike.java b/Mage.Sets/src/mage/cards/s/SoulSpike.java index 92dc26a234e..8db1938448c 100644 --- a/Mage.Sets/src/mage/cards/s/SoulSpike.java +++ b/Mage.Sets/src/mage/cards/s/SoulSpike.java @@ -36,7 +36,7 @@ public final class SoulSpike extends CardImpl { // Soul Spike deals 4 damage to any target and you gain 4 life. this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addEffect(new DamageTargetEffect(4)); - this.getSpellAbility().addEffect(new GainLifeEffect(4)); + this.getSpellAbility().addEffect(new GainLifeEffect(4).concatBy("and")); } private SoulSpike(final SoulSpike card) { diff --git a/Mage.Sets/src/mage/cards/s/SwiftManeuver.java b/Mage.Sets/src/mage/cards/s/SwiftManeuver.java index c4abc079adc..74b0c2b98ee 100644 --- a/Mage.Sets/src/mage/cards/s/SwiftManeuver.java +++ b/Mage.Sets/src/mage/cards/s/SwiftManeuver.java @@ -27,7 +27,8 @@ public final class SwiftManeuver extends CardImpl { // Draw a card at the beginning of the next turn's upkeep. this.getSpellAbility().addEffect(new CreateDelayedTriggeredAbilityEffect( - new AtTheBeginOfNextUpkeepDelayedTriggeredAbility(new DrawCardSourceControllerEffect(1)), false)); + new AtTheBeginOfNextUpkeepDelayedTriggeredAbility(new DrawCardSourceControllerEffect(1)), false + ).concatBy("
")); } private SwiftManeuver(final SwiftManeuver card) { diff --git a/Mage.Sets/src/mage/cards/t/ThrummingStone.java b/Mage.Sets/src/mage/cards/t/ThrummingStone.java index e10791ba138..c7586c6a57d 100644 --- a/Mage.Sets/src/mage/cards/t/ThrummingStone.java +++ b/Mage.Sets/src/mage/cards/t/ThrummingStone.java @@ -7,8 +7,7 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SuperType; -import mage.constants.Zone; -import mage.filter.FilterCard; +import mage.filter.StaticFilters; import java.util.UUID; @@ -21,8 +20,9 @@ public final class ThrummingStone extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{5}"); this.supertype.add(SuperType.LEGENDARY); - // Spells you cast have Ripple 4 - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledSpellsEffect(new RippleAbility(4), new FilterCard("Spells you cast")))); + // Spells you cast have ripple 4. + this.addAbility(new SimpleStaticAbility(new GainAbilityControlledSpellsEffect(new RippleAbility(4), StaticFilters.FILTER_CARD) + .setText("spells you cast have ripple 4"))); } private ThrummingStone(final ThrummingStone card) { diff --git a/Mage.Sets/src/mage/cards/v/VarchildsWarRiders.java b/Mage.Sets/src/mage/cards/v/VarchildsWarRiders.java index 8b871e6aec3..8ea37690b4e 100644 --- a/Mage.Sets/src/mage/cards/v/VarchildsWarRiders.java +++ b/Mage.Sets/src/mage/cards/v/VarchildsWarRiders.java @@ -56,7 +56,7 @@ public final class VarchildsWarRiders extends CardImpl { class OpponentCreateSurvivorTokenCost extends CostImpl { public OpponentCreateSurvivorTokenCost() { - this.text = "Have an opponent create a 1/1 red Survivor creature token."; + this.text = "Have an opponent create a 1/1 red Survivor creature token"; } public OpponentCreateSurvivorTokenCost(OpponentCreateSurvivorTokenCost cost) { @@ -66,12 +66,7 @@ class OpponentCreateSurvivorTokenCost extends CostImpl { @Override public boolean canPay(Ability ability, Ability source, UUID controllerId, Game game) { Player controller = game.getPlayer(controllerId); - if (controller != null) { - if (!game.getOpponents(controllerId).isEmpty()) { - return true; - } - } - return false; + return controller != null && (!game.getOpponents(controllerId).isEmpty()); } @Override diff --git a/Mage/src/main/java/mage/abilities/costs/common/ExileFromHandCost.java b/Mage/src/main/java/mage/abilities/costs/common/ExileFromHandCost.java index cf7ee37955d..3574805fb3f 100644 --- a/Mage/src/main/java/mage/abilities/costs/common/ExileFromHandCost.java +++ b/Mage/src/main/java/mage/abilities/costs/common/ExileFromHandCost.java @@ -37,7 +37,8 @@ public class ExileFromHandCost extends CostImpl { */ public ExileFromHandCost(TargetCardInHand target, boolean setXFromCMC) { this.addTarget(target); - this.text = "exile " + target.getDescription(); + this.text = "exile " + target.getDescription() + + (target.getDescription().contains("from your hand") ? "" : " from your hand"); this.setXFromCMC = setXFromCMC; } diff --git a/Mage/src/main/java/mage/abilities/keyword/CumulativeUpkeepAbility.java b/Mage/src/main/java/mage/abilities/keyword/CumulativeUpkeepAbility.java index 633cd2d0e7a..2281feb5ae5 100644 --- a/Mage/src/main/java/mage/abilities/keyword/CumulativeUpkeepAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/CumulativeUpkeepAbility.java @@ -18,6 +18,7 @@ import mage.game.events.GameEvent.EventType; import mage.game.events.ManaEvent; import mage.game.permanent.Permanent; import mage.players.Player; +import mage.util.CardUtil; /** * @@ -25,7 +26,7 @@ import mage.players.Player; */ public class CumulativeUpkeepAbility extends BeginningOfUpkeepTriggeredAbility { - private Cost cumulativeCost; + private final Cost cumulativeCost; public CumulativeUpkeepAbility(Cost cumulativeCost) { super(new AddCountersSourceEffect(CounterType.AGE.createInstance()), TargetController.YOU, false); @@ -46,12 +47,14 @@ public class CumulativeUpkeepAbility extends BeginningOfUpkeepTriggeredAbility { @Override public String getRule() { StringBuilder sb = new StringBuilder("Cumulative upkeep"); - if (!(cumulativeCost instanceof ManaCost || cumulativeCost instanceof OrCost)) { - sb.append("—"); - } else { + if (cumulativeCost instanceof ManaCost || cumulativeCost instanceof OrCost) { sb.append(' '); + sb.append(cumulativeCost.getText()); + } else { + sb.append("—"); + sb.append(CardUtil.getTextWithFirstCharUpperCase(cumulativeCost.getText())); + sb.append("."); } - sb.append(cumulativeCost.getText()); return sb.toString(); } }