diff --git a/Mage.Sets/src/mage/cards/a/AltarOfShadows.java b/Mage.Sets/src/mage/cards/a/AltarOfShadows.java index efaa95dce93..e885492a63c 100644 --- a/Mage.Sets/src/mage/cards/a/AltarOfShadows.java +++ b/Mage.Sets/src/mage/cards/a/AltarOfShadows.java @@ -57,7 +57,7 @@ class AltarOfShadowsEffect extends OneShotEffect { AltarOfShadowsEffect() { super(Outcome.PutManaInPool); - this.staticText = "add {B} for each charge counter on Altar of Shadows"; + this.staticText = "add {B} for each charge counter on {this}"; } private AltarOfShadowsEffect(final AltarOfShadowsEffect effect) { diff --git a/Mage.Sets/src/mage/cards/a/ArcboundOverseer.java b/Mage.Sets/src/mage/cards/a/ArcboundOverseer.java index df81ba97c48..2fd4ffb9a12 100644 --- a/Mage.Sets/src/mage/cards/a/ArcboundOverseer.java +++ b/Mage.Sets/src/mage/cards/a/ArcboundOverseer.java @@ -24,7 +24,7 @@ public final class ArcboundOverseer extends CardImpl { private static final FilterControlledCreaturePermanent filter; static { - filter = new FilterControlledCreaturePermanent("creature with modular you control"); + filter = new FilterControlledCreaturePermanent("creature you control with modular"); filter.add(new AbilityPredicate(ModularAbility.class)); } diff --git a/Mage.Sets/src/mage/cards/d/DeathCloud.java b/Mage.Sets/src/mage/cards/d/DeathCloud.java index 048f2bf268c..6944a0bca79 100644 --- a/Mage.Sets/src/mage/cards/d/DeathCloud.java +++ b/Mage.Sets/src/mage/cards/d/DeathCloud.java @@ -31,10 +31,10 @@ public final class DeathCloud extends CardImpl { effect.setText(", discards X cards"); this.getSpellAbility().addEffect(effect); effect = new SacrificeAllEffect(xValue, new FilterControlledCreaturePermanent("creatures")); - effect.setText(", sacrifices X creatures"); + effect.setText(", sacrifices X creatures of their choice"); this.getSpellAbility().addEffect(effect); effect = new SacrificeAllEffect(xValue, new FilterControlledLandPermanent("lands")); - effect.setText(", then sacrifices X lands"); + effect.setText(", then sacrifices X lands of their choice"); this.getSpellAbility().addEffect(effect); } diff --git a/Mage.Sets/src/mage/cards/d/Duplicant.java b/Mage.Sets/src/mage/cards/d/Duplicant.java index c1a1ebd8a9b..96ba6d2ea3a 100644 --- a/Mage.Sets/src/mage/cards/d/Duplicant.java +++ b/Mage.Sets/src/mage/cards/d/Duplicant.java @@ -94,7 +94,7 @@ class DuplicantContinuousEffect extends ContinuousEffectImpl { DuplicantContinuousEffect() { super(Duration.WhileOnBattlefield, Outcome.BoostCreature); - staticText = "As long as a card exiled with {this} is a creature card, {this} has the power, toughness, and creature types of the last creature card exiled with {this}. It's still a Shapeshifter."; + staticText = "As long as a card exiled with {this} is a creature card, {this} has the power, toughness, and creature types of the last creature card exiled with it. It's still a Shapeshifter."; } private DuplicantContinuousEffect(final DuplicantContinuousEffect effect) { diff --git a/Mage.Sets/src/mage/cards/e/EmpyrialPlate.java b/Mage.Sets/src/mage/cards/e/EmpyrialPlate.java index 0010967bbc3..0c1ae165c5a 100644 --- a/Mage.Sets/src/mage/cards/e/EmpyrialPlate.java +++ b/Mage.Sets/src/mage/cards/e/EmpyrialPlate.java @@ -24,7 +24,7 @@ public final class EmpyrialPlate extends CardImpl { this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +1/+1 for each card in your hand. - this.addAbility(new SimpleStaticAbility(new BoostEquippedEffect(CardsInControllerHandCount.ANY, CardsInControllerHandCount.ANY))); + this.addAbility(new SimpleStaticAbility(new BoostEquippedEffect(CardsInControllerHandCount.ANY_SINGULAR, CardsInControllerHandCount.ANY_SINGULAR))); // Equip {2} this.addAbility(new EquipAbility(Outcome.BoostCreature, new GenericManaCost(2), false)); diff --git a/Mage.Sets/src/mage/cards/j/JinxedChoker.java b/Mage.Sets/src/mage/cards/j/JinxedChoker.java index 6d139469066..94cc4ea2104 100644 --- a/Mage.Sets/src/mage/cards/j/JinxedChoker.java +++ b/Mage.Sets/src/mage/cards/j/JinxedChoker.java @@ -1,23 +1,21 @@ package mage.cards.j; import mage.abilities.Ability; +import mage.abilities.dynamicvalue.common.CountersSourceCount; import mage.abilities.triggers.BeginningOfEndStepTriggeredAbility; -import mage.abilities.common.OnEventTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.dynamicvalue.DynamicValue; -import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.DamageControllerEffect; import mage.abilities.effects.common.TargetPlayerGainControlSourceEffect; import mage.abilities.effects.common.counter.AddCountersSourceEffect; import mage.abilities.effects.common.counter.RemoveCounterSourceEffect; +import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; import mage.counters.CounterType; import mage.game.Game; -import mage.game.events.GameEvent; import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.common.TargetOpponent; @@ -40,8 +38,7 @@ public final class JinxedChoker extends CardImpl { this.addAbility(endStepAbility); // At the beginning of your upkeep, Jinxed Choker deals damage to you equal to the number of charge counters on it. - Ability upkeepAbility = new OnEventTriggeredAbility(GameEvent.EventType.UPKEEP_STEP_PRE, "beginning of your upkeep", new DamageControllerEffect(new JinxedChokerDynamicValue()), false); - this.addAbility(upkeepAbility); + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new DamageControllerEffect(new CountersSourceCount(CounterType.CHARGE)))); // {3}: Put a charge counter on Jinxed Choker or remove one from it. Ability ability = new SimpleActivatedAbility(new JinxedChokerCounterEffect(), new ManaCostsImpl<>("{3}")); @@ -84,35 +81,6 @@ class JinxedChokerAddCounterEffect extends OneShotEffect { } -class JinxedChokerDynamicValue implements DynamicValue { - - @Override - public int calculate(Game game, Ability sourceAbility, Effect effect) { - Permanent permanent = game.getPermanent(sourceAbility.getSourceId()); - - int count = 0; - if (permanent != null) { - count = permanent.getCounters(game).getCount(CounterType.CHARGE); - } - return count; - } - - @Override - public JinxedChokerDynamicValue copy() { - return new JinxedChokerDynamicValue(); - } - - @Override - public String getMessage() { - return "charge counter on it"; - } - - @Override - public String toString() { - return "1"; - } -} - class JinxedChokerCounterEffect extends OneShotEffect { JinxedChokerCounterEffect() { diff --git a/Mage.Sets/src/mage/cards/p/PristineAngel.java b/Mage.Sets/src/mage/cards/p/PristineAngel.java index 5e997d5d86c..fa8cdd04e51 100644 --- a/Mage.Sets/src/mage/cards/p/PristineAngel.java +++ b/Mage.Sets/src/mage/cards/p/PristineAngel.java @@ -55,7 +55,7 @@ public final class PristineAngel extends CardImpl { new ConditionalContinuousEffect( new GainAbilitySourceEffect(new ProtectionAbility(filter), Duration.WhileOnBattlefield), SourceTappedCondition.UNTAPPED, - "As long as {this} is untapped, it has protection from artifacts and from all colors"))); + "As long as {this} is untapped, it has protection from artifacts and from each color"))); // Whenever you cast a spell, you may untap Pristine Angel. this.addAbility(new SpellCastControllerTriggeredAbility(new UntapSourceEffect(), true)); } diff --git a/Mage.Sets/src/mage/cards/r/RebukingCeremony.java b/Mage.Sets/src/mage/cards/r/RebukingCeremony.java index b6caf0e1b9a..29fa4db4c95 100644 --- a/Mage.Sets/src/mage/cards/r/RebukingCeremony.java +++ b/Mage.Sets/src/mage/cards/r/RebukingCeremony.java @@ -18,7 +18,7 @@ public final class RebukingCeremony extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{G}{G}"); // Put two target artifacts on top of their owners' libraries. - getSpellAbility().addEffect(new PutOnLibraryTargetEffect(true)); + getSpellAbility().addEffect(new PutOnLibraryTargetEffect(true, "put two target artifacts on top of their owners' libraries")); getSpellAbility().addTarget(new TargetArtifactPermanent(2)); } diff --git a/Mage.Sets/src/mage/cards/r/RelicBane.java b/Mage.Sets/src/mage/cards/r/RelicBane.java index 4fe114741f3..16d801be4c6 100644 --- a/Mage.Sets/src/mage/cards/r/RelicBane.java +++ b/Mage.Sets/src/mage/cards/r/RelicBane.java @@ -1,23 +1,19 @@ - package mage.cards.r; -import java.util.UUID; -import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.LoseLifeSourceControllerEffect; import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; import mage.abilities.keyword.EnchantAbility; +import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.AttachmentType; -import mage.constants.CardType; -import mage.constants.SubType; -import mage.constants.Outcome; -import mage.constants.Zone; +import mage.constants.*; import mage.target.TargetPermanent; import mage.target.common.TargetArtifactPermanent; +import java.util.UUID; + /** * * @author LoneFox @@ -33,10 +29,11 @@ public final class RelicBane extends CardImpl { this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment)); this.addAbility(new EnchantAbility(auraTarget)); + // Enchanted artifact has "At the beginning of your upkeep, you lose 2 life." this.addAbility(new SimpleStaticAbility(new GainAbilityAttachedEffect( - new BeginningOfUpkeepTriggeredAbility(new LoseLifeSourceControllerEffect(2) - ), AttachmentType.AURA))); + new BeginningOfUpkeepTriggeredAbility(new LoseLifeSourceControllerEffect(2)), + AttachmentType.AURA, Duration.WhileOnBattlefield, null, "artifact"))); } private RelicBane(final RelicBane card) { diff --git a/Mage.Sets/src/mage/cards/r/RustElemental.java b/Mage.Sets/src/mage/cards/r/RustElemental.java index ab148557dd1..190e9ceef41 100644 --- a/Mage.Sets/src/mage/cards/r/RustElemental.java +++ b/Mage.Sets/src/mage/cards/r/RustElemental.java @@ -2,9 +2,9 @@ package mage.cards.r; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.common.OnEventTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.keyword.FlyingAbility; +import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -13,10 +13,8 @@ import mage.constants.SubType; import mage.filter.common.FilterControlledArtifactPermanent; import mage.filter.predicate.mageobject.AnotherPredicate; import mage.game.Game; -import mage.game.events.GameEvent; import mage.game.permanent.Permanent; import mage.players.Player; -import mage.target.common.TargetControlledPermanent; import mage.target.common.TargetSacrifice; import java.util.UUID; @@ -34,8 +32,9 @@ public final class RustElemental extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); + // At the beginning of your upkeep, sacrifice an artifact other than Rust Elemental. If you can't, tap Rust Elemental and you lose 4 life. - this.addAbility(new OnEventTriggeredAbility(GameEvent.EventType.UPKEEP_STEP_PRE, "beginning of your upkeep", new RustElementalEffect(), false)); + this.addAbility(new BeginningOfUpkeepTriggeredAbility(new RustElementalEffect())); } private RustElemental(final RustElemental card) { @@ -56,9 +55,9 @@ class RustElementalEffect extends OneShotEffect { filter.add(AnotherPredicate.instance); } - public RustElementalEffect() { + RustElementalEffect() { super(Outcome.Damage); - this.staticText = "sacrifice an artifact other than {this}. If you can't, tap {this} and you lose 4 life."; + this.staticText = "sacrifice another artifact. If you can't, tap {this} and you lose 4 life."; } private RustElementalEffect(final RustElementalEffect effect) { diff --git a/Mage.Sets/src/mage/cards/s/ScreamsFromWithin.java b/Mage.Sets/src/mage/cards/s/ScreamsFromWithin.java index e0826275125..6037655954e 100644 --- a/Mage.Sets/src/mage/cards/s/ScreamsFromWithin.java +++ b/Mage.Sets/src/mage/cards/s/ScreamsFromWithin.java @@ -63,7 +63,7 @@ class ScreamsFromWithinEffect extends OneShotEffect { ScreamsFromWithinEffect() { super(Outcome.PutCardInPlay); - staticText = "return {this} from your graveyard to the battlefield"; + staticText = "return this card from your graveyard to the battlefield"; } private ScreamsFromWithinEffect(final ScreamsFromWithinEffect effect) { diff --git a/Mage.Sets/src/mage/cards/s/SerumPowder.java b/Mage.Sets/src/mage/cards/s/SerumPowder.java index 8200726143d..42530ac3040 100644 --- a/Mage.Sets/src/mage/cards/s/SerumPowder.java +++ b/Mage.Sets/src/mage/cards/s/SerumPowder.java @@ -48,7 +48,7 @@ public final class SerumPowder extends CardImpl { class SerumPowderReplaceEffect extends ReplacementEffectImpl { SerumPowderReplaceEffect() { super(Duration.EndOfGame, Outcome.Detriment); - staticText = "Any time you could mulligan and {this} is in your hand, you may exile all the cards from your hand, then draw that many cards"; + staticText = "Any time you could mulligan and this card is in your hand, you may exile all the cards from your hand, then draw that many cards"; } private SerumPowderReplaceEffect(final SerumPowderReplaceEffect effect) { diff --git a/Mage.Sets/src/mage/cards/s/SpellweaverHelix.java b/Mage.Sets/src/mage/cards/s/SpellweaverHelix.java index af8ef841e10..89bbba6f492 100644 --- a/Mage.Sets/src/mage/cards/s/SpellweaverHelix.java +++ b/Mage.Sets/src/mage/cards/s/SpellweaverHelix.java @@ -148,7 +148,7 @@ class SpellweaverHelixTriggeredAbility extends TriggeredAbilityImpl { @Override public String getRule() { - return "Whenever a player casts a card, if it has the same name as one of the cards exiled with Spellweaver Helix, you may copy the other. If you do, you may cast the copy without paying its mana cost."; + return "Whenever a player casts a card, if it has the same name as one of the cards exiled with {this}, you may copy the other. If you do, you may cast the copy without paying its mana cost."; } } diff --git a/Mage.Sets/src/mage/cards/t/Timesifter.java b/Mage.Sets/src/mage/cards/t/Timesifter.java index 5c98cdb79e8..2ef423ca5de 100644 --- a/Mage.Sets/src/mage/cards/t/Timesifter.java +++ b/Mage.Sets/src/mage/cards/t/Timesifter.java @@ -46,7 +46,7 @@ class TimesifterEffect extends OneShotEffect { TimesifterEffect() { super(Outcome.ExtraTurn); - this.staticText = "each player exiles the top card of their library. The player who exiled the card with the highest mana value takes an extra turn after this one. If two or more players' cards are tied for highest, the tied players repeat this process until the tie is broken"; + this.staticText = "each player exiles the top card of their library. The player who exiled the card with the greatest mana value takes an extra turn after this one. If two or more players' cards are tied for greatest, the tied players repeat this process until the tie is broken"; } private TimesifterEffect(final TimesifterEffect effect) { diff --git a/Mage.Sets/src/mage/cards/v/ViridianJoiner.java b/Mage.Sets/src/mage/cards/v/ViridianJoiner.java index 2a72625ec06..399bf05854a 100644 --- a/Mage.Sets/src/mage/cards/v/ViridianJoiner.java +++ b/Mage.Sets/src/mage/cards/v/ViridianJoiner.java @@ -26,7 +26,10 @@ public final class ViridianJoiner extends CardImpl { this.toughness = new MageInt(2); // {T}: Add an amount of {G} equal to Viridian Joiner's power. - this.addAbility(new DynamicManaAbility(Mana.GreenMana(1), SourcePermanentPowerValue.NOT_NEGATIVE)); + this.addAbility(new DynamicManaAbility(Mana.GreenMana(1), + SourcePermanentPowerValue.NOT_NEGATIVE, + "Add an amount of {G} equal to {this}'s power" + )); } private ViridianJoiner(final ViridianJoiner card) { diff --git a/Mage.Sets/src/mage/cards/v/VulshokGauntlets.java b/Mage.Sets/src/mage/cards/v/VulshokGauntlets.java index 89226e8ac9f..84720726be1 100644 --- a/Mage.Sets/src/mage/cards/v/VulshokGauntlets.java +++ b/Mage.Sets/src/mage/cards/v/VulshokGauntlets.java @@ -36,7 +36,7 @@ public final class VulshokGauntlets extends CardImpl { effect.setText("Equipped creature gets +4/+2"); Ability ability = new SimpleStaticAbility(effect); effect = new VulshokGauntletsEffect(); - effect.setText("and has doesn't untap during its controller's untap step"); + effect.setText("and doesn't untap during its controller's untap step"); ability.addEffect(effect); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/w/WarElemental.java b/Mage.Sets/src/mage/cards/w/WarElemental.java index 51147cd3b3d..557d791b3fb 100644 --- a/Mage.Sets/src/mage/cards/w/WarElemental.java +++ b/Mage.Sets/src/mage/cards/w/WarElemental.java @@ -97,6 +97,6 @@ enum WarElementalCondition implements Condition { @Override public String toString() { - return "if an opponent was dealt damage this turn"; + return "an opponent was dealt damage this turn"; } } diff --git a/Mage/src/main/java/mage/abilities/dynamicvalue/common/CardsInControllerHandCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/CardsInControllerHandCount.java index 6163ffdf6a2..e6d342d7f46 100644 --- a/Mage/src/main/java/mage/abilities/dynamicvalue/common/CardsInControllerHandCount.java +++ b/Mage/src/main/java/mage/abilities/dynamicvalue/common/CardsInControllerHandCount.java @@ -16,7 +16,9 @@ import java.util.Set; public enum CardsInControllerHandCount implements DynamicValue { + ANY(StaticFilters.FILTER_CARD_CARDS), + ANY_SINGULAR(StaticFilters.FILTER_CARD), CREATURES(StaticFilters.FILTER_CARD_CREATURES), LANDS(StaticFilters.FILTER_CARD_LANDS);