diff --git a/Mage.Sets/src/mage/cards/a/AbzanCharm.java b/Mage.Sets/src/mage/cards/a/AbzanCharm.java index f34b01dd664..0de055f435a 100644 --- a/Mage.Sets/src/mage/cards/a/AbzanCharm.java +++ b/Mage.Sets/src/mage/cards/a/AbzanCharm.java @@ -43,7 +43,7 @@ public final class AbzanCharm extends CardImpl { this.getSpellAbility().addMode(mode); // *Distribute two +1/+1 counters among one or two target creatures. - mode = new Mode(new DistributeCountersEffect(CounterType.P1P1, 2, false, "one or two target creatures")); + mode = new Mode(new DistributeCountersEffect(2, "one or two target creatures")); mode.addTarget(new TargetCreaturePermanentAmount(2)); this.getSpellAbility().addMode(mode); diff --git a/Mage.Sets/src/mage/cards/a/AjaniMentorOfHeroes.java b/Mage.Sets/src/mage/cards/a/AjaniMentorOfHeroes.java index 7015d62397e..02796fb08c5 100644 --- a/Mage.Sets/src/mage/cards/a/AjaniMentorOfHeroes.java +++ b/Mage.Sets/src/mage/cards/a/AjaniMentorOfHeroes.java @@ -38,7 +38,7 @@ public final class AjaniMentorOfHeroes extends CardImpl { this.setStartingLoyalty(4); // +1: Distribute three +1/+1 counters among one, two, or three target creatures you control - Ability ability = new LoyaltyAbility(new DistributeCountersEffect(CounterType.P1P1, 3, false, "one, two, or three target creatures you control"), 1); + Ability ability = new LoyaltyAbility(new DistributeCountersEffect(3, "one, two, or three target creatures you control"), 1); ability.addTarget(new TargetCreaturePermanentAmount(3, StaticFilters.FILTER_CONTROLLED_CREATURES)); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/a/AjaniSleeperAgent.java b/Mage.Sets/src/mage/cards/a/AjaniSleeperAgent.java index 1307aed6550..091d653edea 100644 --- a/Mage.Sets/src/mage/cards/a/AjaniSleeperAgent.java +++ b/Mage.Sets/src/mage/cards/a/AjaniSleeperAgent.java @@ -42,7 +42,7 @@ public final class AjaniSleeperAgent extends CardImpl { this.addAbility(new LoyaltyAbility(new AjaniSleeperAgentEffect(), 1)); // −3: Distribute three +1/+1 counters among up to three target creatures. They gain vigilance until end of turn. - Ability ability = new LoyaltyAbility(new DistributeCountersEffect(CounterType.P1P1, 3, false, "up to three target creatures"), -3); + Ability ability = new LoyaltyAbility(new DistributeCountersEffect(3, "up to three target creatures"), -3); ability.addEffect(new GainAbilityTargetEffect(VigilanceAbility.getInstance()).setText("They gain vigilance until end of turn")); Target target = new TargetCreaturePermanentAmount(3); target.setMinNumberOfTargets(0); diff --git a/Mage.Sets/src/mage/cards/a/ArmamentCorps.java b/Mage.Sets/src/mage/cards/a/ArmamentCorps.java index dd6f95e5014..454359f62e7 100644 --- a/Mage.Sets/src/mage/cards/a/ArmamentCorps.java +++ b/Mage.Sets/src/mage/cards/a/ArmamentCorps.java @@ -28,7 +28,7 @@ public final class ArmamentCorps extends CardImpl { this.toughness = new MageInt(4); // When Armament Corps enters the battlefield, distribute two +1/+1 counters among one or two target creatures you control. - Ability ability = new EntersBattlefieldTriggeredAbility(new DistributeCountersEffect(CounterType.P1P1, 2, false, "one or two target creatures you control"), false); + Ability ability = new EntersBattlefieldTriggeredAbility(new DistributeCountersEffect(2, "one or two target creatures you control"), false); ability.addTarget(new TargetCreaturePermanentAmount(2, StaticFilters.FILTER_CONTROLLED_CREATURES)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/b/BiogenicUpgrade.java b/Mage.Sets/src/mage/cards/b/BiogenicUpgrade.java index 8d0622f6e4d..af5253deaee 100644 --- a/Mage.Sets/src/mage/cards/b/BiogenicUpgrade.java +++ b/Mage.Sets/src/mage/cards/b/BiogenicUpgrade.java @@ -27,7 +27,7 @@ public final class BiogenicUpgrade extends CardImpl { // Distribute three +1/+1 counters among one, two, or three target creatures, then double the number of +1/+1 counters on each of those creatures. this.getSpellAbility().addEffect(new DistributeCountersEffect( - CounterType.P1P1, 3, false, + 3, "one, two, or three target creatures" )); this.getSpellAbility().addTarget(new TargetCreaturePermanentAmount(3)); @@ -75,4 +75,4 @@ class BiogenicUpgradeEffect extends OneShotEffect { } return true; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/b/BlessingsOfNature.java b/Mage.Sets/src/mage/cards/b/BlessingsOfNature.java index 0dd2185b863..b6f13ca0c49 100644 --- a/Mage.Sets/src/mage/cards/b/BlessingsOfNature.java +++ b/Mage.Sets/src/mage/cards/b/BlessingsOfNature.java @@ -19,7 +19,7 @@ public final class BlessingsOfNature extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{G}"); // Distribute four +1/+1 counters among any number of target creatures. - this.getSpellAbility().addEffect(new DistributeCountersEffect(CounterType.P1P1, 4, false, "any number of target creatures")); + this.getSpellAbility().addEffect(new DistributeCountersEffect(4, "any number of target creatures")); this.getSpellAbility().addTarget(new TargetCreaturePermanentAmount(4)); this.addAbility(new MiracleAbility("{G}")); diff --git a/Mage.Sets/src/mage/cards/b/BountyOfTheHunt.java b/Mage.Sets/src/mage/cards/b/BountyOfTheHunt.java index 6def70de482..082ba4df231 100644 --- a/Mage.Sets/src/mage/cards/b/BountyOfTheHunt.java +++ b/Mage.Sets/src/mage/cards/b/BountyOfTheHunt.java @@ -35,9 +35,9 @@ public final class BountyOfTheHunt extends CardImpl { // Distribute three +1/+1 counters among one, two, or three target creatures. For each +1/+1 counter you put on a creature this way, remove a +1/+1 counter from that creature at the beginning of the next cleanup step. this.getSpellAbility().addEffect(new DistributeCountersEffect( - CounterType.P1P1, 3, true, + 3, "one, two, or three target creatures" - )); + ).withRemoveAtEndOfTurn()); this.getSpellAbility().addTarget(new TargetCreaturePermanentAmount(3)); } diff --git a/Mage.Sets/src/mage/cards/c/CaseOfTheTrampledGarden.java b/Mage.Sets/src/mage/cards/c/CaseOfTheTrampledGarden.java index fefa7177521..bc7153a94ce 100644 --- a/Mage.Sets/src/mage/cards/c/CaseOfTheTrampledGarden.java +++ b/Mage.Sets/src/mage/cards/c/CaseOfTheTrampledGarden.java @@ -40,7 +40,7 @@ public final class CaseOfTheTrampledGarden extends CardImpl { this.subtype.add(SubType.CASE); // When this Case enters the battlefield, distribute two +1/+1 counters among one or two target creatures you control. - Ability initialAbility = new EntersBattlefieldTriggeredAbility(new DistributeCountersEffect(CounterType.P1P1, 2, + Ability initialAbility = new EntersBattlefieldTriggeredAbility(new DistributeCountersEffect(2, "one or two target creatures you control")); TargetPermanentAmount target = new TargetPermanentAmount(2, StaticFilters.FILTER_CONTROLLED_CREATURES); target.setMinNumberOfTargets(1); diff --git a/Mage.Sets/src/mage/cards/c/Contagion.java b/Mage.Sets/src/mage/cards/c/Contagion.java index c1e223c9079..0e27f3f1b90 100644 --- a/Mage.Sets/src/mage/cards/c/Contagion.java +++ b/Mage.Sets/src/mage/cards/c/Contagion.java @@ -39,7 +39,7 @@ public final class Contagion extends CardImpl { // Distribute two -2/-1 counters among one or two target creatures. this.getSpellAbility().addTarget(new TargetCreaturePermanentAmount(2)); this.getSpellAbility().addEffect(new DistributeCountersEffect( - CounterType.M2M1, 2, false, + CounterType.M2M1, 2, "one or two target creatures" )); } diff --git a/Mage.Sets/src/mage/cards/c/CourtOfGarenbrig.java b/Mage.Sets/src/mage/cards/c/CourtOfGarenbrig.java index f932580a229..bb9072ea778 100644 --- a/Mage.Sets/src/mage/cards/c/CourtOfGarenbrig.java +++ b/Mage.Sets/src/mage/cards/c/CourtOfGarenbrig.java @@ -33,7 +33,7 @@ public final class CourtOfGarenbrig extends CardImpl { // At the beginning of your upkeep, distribute two +1/+1 counters among up to two target creatures. Then if you're the monarch, double the number of +1/+1 counters on each creature you control. Ability ability = new BeginningOfUpkeepTriggeredAbility( new DistributeCountersEffect( - CounterType.P1P1, 2, false, "up to two target creatures" + 2, "up to two target creatures" ) ); TargetCreaturePermanentAmount target = new TargetCreaturePermanentAmount(2); diff --git a/Mage.Sets/src/mage/cards/d/DefendTheCelestus.java b/Mage.Sets/src/mage/cards/d/DefendTheCelestus.java index 6aaf9f372af..cf520b7eb23 100644 --- a/Mage.Sets/src/mage/cards/d/DefendTheCelestus.java +++ b/Mage.Sets/src/mage/cards/d/DefendTheCelestus.java @@ -20,7 +20,7 @@ public final class DefendTheCelestus extends CardImpl { // Distribute three +1/+1 counters among one, two, or three target creatures you control. this.getSpellAbility().addEffect(new DistributeCountersEffect( - CounterType.P1P1, 3, false, + 3, "one, two, or three target creatures you control" )); this.getSpellAbility().addTarget(new TargetCreaturePermanentAmount( diff --git a/Mage.Sets/src/mage/cards/e/ElusiveOtter.java b/Mage.Sets/src/mage/cards/e/ElusiveOtter.java index bd427e0393a..fdc288de3bd 100644 --- a/Mage.Sets/src/mage/cards/e/ElusiveOtter.java +++ b/Mage.Sets/src/mage/cards/e/ElusiveOtter.java @@ -38,7 +38,7 @@ public final class ElusiveOtter extends AdventureCard { // Grove's Bounty // Distribute X +1/+1 counters among any number of target creatures you control. this.getSpellCard().getSpellAbility().addEffect(new DistributeCountersEffect( - CounterType.P1P1, GetXValue.instance, false, + CounterType.P1P1, GetXValue.instance, "any number of target creatures you control" )); Target target = new TargetCreaturePermanentAmount(GetXValue.instance, StaticFilters.FILTER_CONTROLLED_CREATURES); diff --git a/Mage.Sets/src/mage/cards/e/ElvenRite.java b/Mage.Sets/src/mage/cards/e/ElvenRite.java index 9acd8a00d2c..030277f47db 100644 --- a/Mage.Sets/src/mage/cards/e/ElvenRite.java +++ b/Mage.Sets/src/mage/cards/e/ElvenRite.java @@ -19,7 +19,7 @@ public final class ElvenRite extends CardImpl { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{G}"); // Distribute two +1/+1 counters among one or two target creatures. - this.getSpellAbility().addEffect(new DistributeCountersEffect(CounterType.P1P1, 2, false, "one or two target creatures")); + this.getSpellAbility().addEffect(new DistributeCountersEffect(2, "one or two target creatures")); this.getSpellAbility().addTarget(new TargetCreaturePermanentAmount(2)); } diff --git a/Mage.Sets/src/mage/cards/g/GlintWeaver.java b/Mage.Sets/src/mage/cards/g/GlintWeaver.java index 1a9ab59f620..2d8f0e0d398 100644 --- a/Mage.Sets/src/mage/cards/g/GlintWeaver.java +++ b/Mage.Sets/src/mage/cards/g/GlintWeaver.java @@ -33,7 +33,7 @@ public final class GlintWeaver extends CardImpl { // When Glint Weaver enters the battlefield, distribute three +1/+1 counters among one, two, or three target creatures, then you gain life equal to the greatest toughness among creatures you control. Ability ability = new EntersBattlefieldTriggeredAbility(new DistributeCountersEffect( - CounterType.P1P1, 3, "one, two, or three target creatures" + 3, "one, two, or three target creatures" )); ability.addEffect(new GainLifeEffect(GreatestToughnessAmongControlledCreaturesValue.instance) .setText(", then you gain life equal to the greatest toughness among creatures you control")); diff --git a/Mage.Sets/src/mage/cards/j/JadeSeedstones.java b/Mage.Sets/src/mage/cards/j/JadeSeedstones.java index 837679c29fa..149827d2016 100644 --- a/Mage.Sets/src/mage/cards/j/JadeSeedstones.java +++ b/Mage.Sets/src/mage/cards/j/JadeSeedstones.java @@ -24,7 +24,7 @@ public final class JadeSeedstones extends CardImpl { // When Jade Seedstones enters the battlefield, distribute three +1/+1 counters among one, two, or three target creatures you control. Ability ability = new EntersBattlefieldTriggeredAbility(new DistributeCountersEffect( - CounterType.P1P1, 3, "one, two, or three target creatures you control" + 3, "one, two, or three target creatures you control" )); TargetPermanentAmount target = new TargetPermanentAmount(3, StaticFilters.FILTER_CONTROLLED_CREATURES); target.setMinNumberOfTargets(1); diff --git a/Mage.Sets/src/mage/cards/j/JuganTheRisingStar.java b/Mage.Sets/src/mage/cards/j/JuganTheRisingStar.java index 192819795c9..effc7db6288 100644 --- a/Mage.Sets/src/mage/cards/j/JuganTheRisingStar.java +++ b/Mage.Sets/src/mage/cards/j/JuganTheRisingStar.java @@ -33,7 +33,7 @@ public final class JuganTheRisingStar extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); // When Jugan, the Rising Star dies, you may distribute five +1/+1 counters among any number of target creatures. - Ability ability = new DiesSourceTriggeredAbility(new DistributeCountersEffect(CounterType.P1P1, 5, false, "any number of target creatures"), true); + Ability ability = new DiesSourceTriggeredAbility(new DistributeCountersEffect(5, "any number of target creatures"), true); ability.addTarget(new TargetCreaturePermanentAmount(5)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/l/LathielTheBounteousDawn.java b/Mage.Sets/src/mage/cards/l/LathielTheBounteousDawn.java index f78d7464be6..47bf24fade8 100644 --- a/Mage.Sets/src/mage/cards/l/LathielTheBounteousDawn.java +++ b/Mage.Sets/src/mage/cards/l/LathielTheBounteousDawn.java @@ -45,7 +45,7 @@ public final class LathielTheBounteousDawn extends CardImpl { // At the beginning of each end step, if you gained life this turn, distribute up to that many +1/+1 counters among any number of other target creatures. Ability ability = new ConditionalInterveningIfTriggeredAbility( new BeginningOfEndStepTriggeredAbility(TargetController.ANY, new DistributeCountersEffect( - CounterType.P1P1, 1, false, "" + 1, "" ), false), condition, "At the beginning of each end step, if you gained life this turn, " + "distribute up to that many +1/+1 counters among any number of other target creatures." diff --git a/Mage.Sets/src/mage/cards/m/MyojinOfToweringMight.java b/Mage.Sets/src/mage/cards/m/MyojinOfToweringMight.java index 22ebbcd5ea3..7191e76fad9 100644 --- a/Mage.Sets/src/mage/cards/m/MyojinOfToweringMight.java +++ b/Mage.Sets/src/mage/cards/m/MyojinOfToweringMight.java @@ -45,7 +45,7 @@ public final class MyojinOfToweringMight extends CardImpl { // Remove an indestructible counter from Myojin of Towering Might: Distribute eight +1/+1 counters among any number of target creatures you control. They gain trample until end of turn. Ability ability = new SimpleActivatedAbility(new DistributeCountersEffect( - CounterType.P1P1, 8, false, + 8, "any number of target creatures you control" ), new RemoveCountersSourceCost(CounterType.INDESTRUCTIBLE.createInstance())); ability.addEffect(new GainAbilityTargetEffect( diff --git a/Mage.Sets/src/mage/cards/n/NumaJoragaChieftain.java b/Mage.Sets/src/mage/cards/n/NumaJoragaChieftain.java index 8f128de6df0..16dc5790cdd 100644 --- a/Mage.Sets/src/mage/cards/n/NumaJoragaChieftain.java +++ b/Mage.Sets/src/mage/cards/n/NumaJoragaChieftain.java @@ -88,7 +88,7 @@ class NumaJoragaChieftainEffect extends OneShotEffect { return false; } ReflexiveTriggeredAbility ability = new ReflexiveTriggeredAbility( - new DistributeCountersEffect(CounterType.P1P1, costX, false, ""), + new DistributeCountersEffect(costX, ""), false, "distribute " + costX + " +1/+1 counters among any number of target Elves" ); ability.addTarget(new TargetCreaturePermanentAmount(costX, filter)); diff --git a/Mage.Sets/src/mage/cards/o/OnduKnotmaster.java b/Mage.Sets/src/mage/cards/o/OnduKnotmaster.java index 3fadb3e5c83..421ac8229eb 100644 --- a/Mage.Sets/src/mage/cards/o/OnduKnotmaster.java +++ b/Mage.Sets/src/mage/cards/o/OnduKnotmaster.java @@ -52,7 +52,7 @@ public final class OnduKnotmaster extends AdventureCard { // Distribute two +1/+1 counters among one or two target creatures. this.getSpellCard().getSpellAbility().addEffect( new DistributeCountersEffect( - CounterType.P1P1, 2, false, + 2, "one or two target creatures" ) ); diff --git a/Mage.Sets/src/mage/cards/p/PicnicRuiner.java b/Mage.Sets/src/mage/cards/p/PicnicRuiner.java index d7eeb6c0ab7..e8ef4ec3cd9 100644 --- a/Mage.Sets/src/mage/cards/p/PicnicRuiner.java +++ b/Mage.Sets/src/mage/cards/p/PicnicRuiner.java @@ -42,7 +42,7 @@ public final class PicnicRuiner extends AdventureCard { // Distribute three +1/+1 counters among any number of target creatures you control. this.getSpellCard().getSpellAbility().addEffect( new DistributeCountersEffect( - CounterType.P1P1, 3, false, + 3, "any number of target creatures you control" ) ); diff --git a/Mage.Sets/src/mage/cards/q/QuirionBeastcaller.java b/Mage.Sets/src/mage/cards/q/QuirionBeastcaller.java index f246f6aaf5a..3cb8f79460c 100644 --- a/Mage.Sets/src/mage/cards/q/QuirionBeastcaller.java +++ b/Mage.Sets/src/mage/cards/q/QuirionBeastcaller.java @@ -40,7 +40,7 @@ public final class QuirionBeastcaller extends CardImpl { // When Quirion Beastcaller dies, distribute X +1/+1 counters among any number of target creatures you control, where X is the number of +1/+1 counters on Quirion Beastcaller. Ability ability = new DiesSourceTriggeredAbility(new DistributeCountersEffect( // Amount here is only used for text generation. Real amount is set in target. - CounterType.P1P1, 1, false, "any number of target creatures you control" + 1, "any number of target creatures you control" ).setText("distribute X +1/+1 counters among any number of target creatures you control, where X is the number of +1/+1 counters on {this}")); ability.addTarget(new TargetPermanentAmount(new CountersSourceCount(CounterType.P1P1), StaticFilters.FILTER_CONTROLLED_CREATURES)); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/s/ShamblingSwarm.java b/Mage.Sets/src/mage/cards/s/ShamblingSwarm.java index 759c1ee3f0c..d3f9dc9c8f9 100644 --- a/Mage.Sets/src/mage/cards/s/ShamblingSwarm.java +++ b/Mage.Sets/src/mage/cards/s/ShamblingSwarm.java @@ -26,7 +26,9 @@ public final class ShamblingSwarm extends CardImpl { this.toughness = new MageInt(3); // When Shambling Swarm dies, distribute three -1/-1 counters among one, two, or three target creatures. For each -1/-1 counter you put on a creature this way, remove a -1/-1 counter from that creature at the beginning of the next end step. - Ability ability = new DiesSourceTriggeredAbility(new DistributeCountersEffect(CounterType.M1M1, 3, true, "one, two, or three target creatures"), false); + Ability ability = new DiesSourceTriggeredAbility(new DistributeCountersEffect( + CounterType.M1M1, 3, "one, two, or three target creatures" + ).withRemoveAtEndOfTurn(), false); ability.addTarget(new TargetCreaturePermanentAmount(3)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SplendidAgony.java b/Mage.Sets/src/mage/cards/s/SplendidAgony.java index 0ed6e347ff0..b553a39d4a7 100644 --- a/Mage.Sets/src/mage/cards/s/SplendidAgony.java +++ b/Mage.Sets/src/mage/cards/s/SplendidAgony.java @@ -19,7 +19,7 @@ public final class SplendidAgony extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{B}"); // Distribute two -1/-1 counters among one or two target creatures. - getSpellAbility().addEffect(new DistributeCountersEffect(CounterType.M1M1, 2, false, "one or two target creatures")); + getSpellAbility().addEffect(new DistributeCountersEffect(CounterType.M1M1, 2, "one or two target creatures")); getSpellAbility().addTarget(new TargetCreaturePermanentAmount(2)); } diff --git a/Mage.Sets/src/mage/cards/s/StormTheSeedcore.java b/Mage.Sets/src/mage/cards/s/StormTheSeedcore.java index bc6757909fc..39433a1b5d7 100644 --- a/Mage.Sets/src/mage/cards/s/StormTheSeedcore.java +++ b/Mage.Sets/src/mage/cards/s/StormTheSeedcore.java @@ -25,7 +25,7 @@ public final class StormTheSeedcore extends CardImpl { // Distribute four +1/+1 counter among up to four target creatures you control. Creatures you control gain vigilance and trample until end of turn. this.getSpellAbility().addEffect(new DistributeCountersEffect( - CounterType.P1P1, 4, false, + 4, "up to four target creatures you control" )); TargetPermanentAmount target = new TargetCreaturePermanentAmount(4, StaticFilters.FILTER_CONTROLLED_CREATURES); diff --git a/Mage.Sets/src/mage/cards/t/TheGrandEvolution.java b/Mage.Sets/src/mage/cards/t/TheGrandEvolution.java index 9f79f79efca..49ae80faade 100644 --- a/Mage.Sets/src/mage/cards/t/TheGrandEvolution.java +++ b/Mage.Sets/src/mage/cards/t/TheGrandEvolution.java @@ -46,7 +46,7 @@ public final class TheGrandEvolution extends CardImpl { sagaAbility.addChapterEffect( this, SagaChapter.CHAPTER_II, SagaChapter.CHAPTER_II, new DistributeCountersEffect( - CounterType.P1P1, 7, + 7, "any number of target creatures you control" ), new TargetPermanentAmount(7, StaticFilters.FILTER_CONTROLLED_CREATURES) ); diff --git a/Mage.Sets/src/mage/cards/u/UndercityUpheaval.java b/Mage.Sets/src/mage/cards/u/UndercityUpheaval.java index 9129b3df8a7..ea27f64da27 100644 --- a/Mage.Sets/src/mage/cards/u/UndercityUpheaval.java +++ b/Mage.Sets/src/mage/cards/u/UndercityUpheaval.java @@ -30,7 +30,7 @@ public final class UndercityUpheaval extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{G}{G}"); // Undergrowth -- Distribute X +1/+1 counters among any number of target creatures you control, where X is the number of creature cards in your graveyard as you cast this spell. Creatures you control gain vigilance until end of turn. - this.getSpellAbility().addEffect(new DistributeCountersEffect(CounterType.P1P1, 1, "") + this.getSpellAbility().addEffect(new DistributeCountersEffect(1, "") .setText("distribute X +1/+1 counters among any number of target creatures you control, " + "where X is the number of creature cards in your graveyard as you cast this spell")); this.getSpellAbility().addEffect(new GainAbilityControlledEffect( diff --git a/Mage.Sets/src/mage/cards/u/UrzaAcademyHeadmaster.java b/Mage.Sets/src/mage/cards/u/UrzaAcademyHeadmaster.java index 0d05ae0f168..6032b4ee8c1 100644 --- a/Mage.Sets/src/mage/cards/u/UrzaAcademyHeadmaster.java +++ b/Mage.Sets/src/mage/cards/u/UrzaAcademyHeadmaster.java @@ -144,7 +144,7 @@ class UrzaAcademyHeadmasterRandomEffect extends OneShotEffect { break; case 2: // AJANI MENTOR OF HEROES 1 sb.append("Distribute three +1/+1 counters among one, two, or three target creatures you control."); - effects.add(new DistributeCountersEffect(CounterType.P1P1, 3, false, "one, two, or three target creatures you control")); + effects.add(new DistributeCountersEffect(3, "one, two, or three target creatures you control")); target = new TargetCreaturePermanentAmount(3, filter1); break; case 3: // NICOL BOLAS PLANESWALKER 1 diff --git a/Mage.Sets/src/mage/cards/v/VerdurousGearhulk.java b/Mage.Sets/src/mage/cards/v/VerdurousGearhulk.java index f0b0a04f93c..b17752c6191 100644 --- a/Mage.Sets/src/mage/cards/v/VerdurousGearhulk.java +++ b/Mage.Sets/src/mage/cards/v/VerdurousGearhulk.java @@ -31,7 +31,7 @@ public final class VerdurousGearhulk extends CardImpl { this.addAbility(TrampleAbility.getInstance()); // When Verdurous Gearhulk enters the battlefield, distribute four +1/+1 counters among any number of target creatures you control. - Ability ability = new EntersBattlefieldTriggeredAbility(new DistributeCountersEffect(CounterType.P1P1, 4, false, "any number of target creatures you control"), false); + Ability ability = new EntersBattlefieldTriggeredAbility(new DistributeCountersEffect(4, "any number of target creatures you control"), false); ability.addTarget(new TargetCreaturePermanentAmount(4, StaticFilters.FILTER_CONTROLLED_CREATURES)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/v/VivienArkbowRanger.java b/Mage.Sets/src/mage/cards/v/VivienArkbowRanger.java index 699ff98981f..44b54206a5a 100644 --- a/Mage.Sets/src/mage/cards/v/VivienArkbowRanger.java +++ b/Mage.Sets/src/mage/cards/v/VivienArkbowRanger.java @@ -36,7 +36,7 @@ public final class VivienArkbowRanger extends CardImpl { // +1: Distribute two +1/+1 counters among up to two target creatures. They gain trample until end of turn. Ability ability = new LoyaltyAbility(new DistributeCountersEffect( - CounterType.P1P1, 2, false, "up to two target creatures"), 1); + 2, "up to two target creatures"), 1); ability.addEffect(new GainAbilityTargetEffect( TrampleAbility.getInstance(), Duration.EndOfTurn, "They gain trample until end of turn" diff --git a/Mage.Sets/src/mage/cards/w/WurmskinForger.java b/Mage.Sets/src/mage/cards/w/WurmskinForger.java index a76efa49449..88a1b282c0d 100644 --- a/Mage.Sets/src/mage/cards/w/WurmskinForger.java +++ b/Mage.Sets/src/mage/cards/w/WurmskinForger.java @@ -27,7 +27,7 @@ public final class WurmskinForger extends CardImpl { this.toughness = new MageInt(2); // When Wurmskin Forger enters the battlefield, distribute three +1/+1 counters among one, two, or three target creatures. - Ability ability = new EntersBattlefieldTriggeredAbility(new DistributeCountersEffect(CounterType.P1P1, 3, false, "one, two, or three target creatures"), false); + Ability ability = new EntersBattlefieldTriggeredAbility(new DistributeCountersEffect(3, "one, two, or three target creatures"), false); ability.addTarget(new TargetCreaturePermanentAmount(3)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/y/YannikScavengingSentinel.java b/Mage.Sets/src/mage/cards/y/YannikScavengingSentinel.java index 1bcfeadfce7..648aa7cecc1 100644 --- a/Mage.Sets/src/mage/cards/y/YannikScavengingSentinel.java +++ b/Mage.Sets/src/mage/cards/y/YannikScavengingSentinel.java @@ -99,9 +99,8 @@ class YannikScavengingSentinelEffect extends OneShotEffect { game.addDelayedTriggeredAbility(new OnLeaveReturnExiledAbility(), source); if (game.getState().getZone(permanent.getId()) != Zone.BATTLEFIELD) { ReflexiveTriggeredAbility ability = new ReflexiveTriggeredAbility( - new DistributeCountersEffect( - CounterType.P1P1, power, false, "" - ), false, "distribute X +1/+1 counters among any number of target creatures, " + + new DistributeCountersEffect(power, ""), false, + "distribute X +1/+1 counters among any number of target creatures, " + "where X is the exiled creature's power" ); ability.addTarget(new TargetCreaturePermanentAmount(power)); diff --git a/Mage/src/main/java/mage/abilities/effects/common/counter/DistributeCountersEffect.java b/Mage/src/main/java/mage/abilities/effects/common/counter/DistributeCountersEffect.java index 0dd023ffcb8..d1ee03ce613 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/counter/DistributeCountersEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/counter/DistributeCountersEffect.java @@ -1,4 +1,3 @@ - package mage.abilities.effects.common.counter; import mage.abilities.Ability; @@ -24,22 +23,24 @@ public class DistributeCountersEffect extends OneShotEffect { private final CounterType counterType; private final DynamicValue amount; - private final boolean removeAtEndOfTurn; + private boolean removeAtEndOfTurn = false; private final String targetDescription; + /** + * Distribute +1/+1 counters among targets + */ + public DistributeCountersEffect(int amount, String targetDescription) { + this(CounterType.P1P1, StaticValue.get(amount), targetDescription); + } + public DistributeCountersEffect(CounterType counterType, int amount, String targetDescription) { - this(counterType, amount, false, targetDescription); + this(counterType, StaticValue.get(amount), targetDescription); } - public DistributeCountersEffect(CounterType counterType, int amount, boolean removeAtEndOfTurn, String targetDescription) { - this(counterType, StaticValue.get(amount), removeAtEndOfTurn, targetDescription); - } - - public DistributeCountersEffect(CounterType counterType, DynamicValue amount, boolean removeAtEndOfTurn, String targetDescription) { + public DistributeCountersEffect(CounterType counterType, DynamicValue amount, String targetDescription) { super(Outcome.BoostCreature); this.counterType = counterType; this.amount = amount; - this.removeAtEndOfTurn = removeAtEndOfTurn; this.targetDescription = targetDescription; } @@ -56,6 +57,11 @@ public class DistributeCountersEffect extends OneShotEffect { return new DistributeCountersEffect(this); } + public DistributeCountersEffect withRemoveAtEndOfTurn() { + this.removeAtEndOfTurn = true; + return this; + } + @Override public boolean apply(Game game, Ability source) { if (!source.getTargets().isEmpty()) { @@ -99,7 +105,7 @@ class RemoveCountersAtEndOfTurn extends OneShotEffect { private final CounterType counterType; - public RemoveCountersAtEndOfTurn(CounterType counterType) { + RemoveCountersAtEndOfTurn(CounterType counterType) { super(Outcome.Detriment); this.counterType = counterType; String name = counterType.getName();