From ecbfc4edc46ea77a836ad52d68d248662763f537 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Mon, 30 May 2022 22:20:50 -0400 Subject: [PATCH] removed locked in parameter from BoostAllEffect --- Mage.Sets/src/mage/cards/b/BaneOfTheLiving.java | 2 +- Mage.Sets/src/mage/cards/d/DeadOfWinter.java | 2 +- Mage.Sets/src/mage/cards/i/IchorExplosion.java | 2 +- .../src/mage/cards/k/KagemaroFirstToSuffer.java | 2 +- Mage.Sets/src/mage/cards/m/MartonStromgald.java | 4 ++-- Mage.Sets/src/mage/cards/m/Mutilate.java | 2 +- Mage.Sets/src/mage/cards/o/OliviasWrath.java | 2 +- Mage.Sets/src/mage/cards/p/PackAttack.java | 2 +- Mage.Sets/src/mage/cards/r/RabbleRouser.java | 2 +- Mage.Sets/src/mage/cards/r/RoilmagesTrick.java | 2 +- Mage.Sets/src/mage/cards/t/ToxicDeluge.java | 2 +- .../effects/common/continuous/BoostAllEffect.java | 12 +----------- 12 files changed, 13 insertions(+), 23 deletions(-) diff --git a/Mage.Sets/src/mage/cards/b/BaneOfTheLiving.java b/Mage.Sets/src/mage/cards/b/BaneOfTheLiving.java index fd2142522f..319c5a976a 100644 --- a/Mage.Sets/src/mage/cards/b/BaneOfTheLiving.java +++ b/Mage.Sets/src/mage/cards/b/BaneOfTheLiving.java @@ -34,7 +34,7 @@ public final class BaneOfTheLiving extends CardImpl { this.addAbility(new MorphAbility(new ManaCostsImpl<>("{X}{B}{B}"))); // When Bane of the Living is turned face up, all creatures get -X/-X until end of turn. - this.addAbility(new TurnedFaceUpSourceTriggeredAbility(new BoostAllEffect(morphX, morphX, Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_ALL_CREATURES, false, null, true))); + this.addAbility(new TurnedFaceUpSourceTriggeredAbility(new BoostAllEffect(morphX, morphX, Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_ALL_CREATURES, false, null))); } private BaneOfTheLiving(final BaneOfTheLiving card) { diff --git a/Mage.Sets/src/mage/cards/d/DeadOfWinter.java b/Mage.Sets/src/mage/cards/d/DeadOfWinter.java index f7e612ce81..bbb645f45f 100644 --- a/Mage.Sets/src/mage/cards/d/DeadOfWinter.java +++ b/Mage.Sets/src/mage/cards/d/DeadOfWinter.java @@ -40,7 +40,7 @@ public final class DeadOfWinter extends CardImpl { this.getSpellAbility().addEffect(new BoostAllEffect( xValue, xValue, Duration.EndOfTurn, filter, false, "All nonsnow creatures get -X/-X until end of turn," + - " where X is the number of snow permanents you control.", true + " where X is the number of snow permanents you control." )); this.getSpellAbility().addHint(hint); } diff --git a/Mage.Sets/src/mage/cards/i/IchorExplosion.java b/Mage.Sets/src/mage/cards/i/IchorExplosion.java index d55feef133..92f0511156 100644 --- a/Mage.Sets/src/mage/cards/i/IchorExplosion.java +++ b/Mage.Sets/src/mage/cards/i/IchorExplosion.java @@ -32,7 +32,7 @@ public final class IchorExplosion extends CardImpl { this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT))); // All creatures get -X/-X until end of turn, where X is the sacrificed creature's power. DynamicValue xValue = new IchorExplosionDynamicValue(); - this.getSpellAbility().addEffect(new BoostAllEffect(xValue, xValue, Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_ALL_CREATURES, false, null, true)); + this.getSpellAbility().addEffect(new BoostAllEffect(xValue, xValue, Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_ALL_CREATURES, false, null)); } diff --git a/Mage.Sets/src/mage/cards/k/KagemaroFirstToSuffer.java b/Mage.Sets/src/mage/cards/k/KagemaroFirstToSuffer.java index 9d7eee2be6..a18a2791e9 100644 --- a/Mage.Sets/src/mage/cards/k/KagemaroFirstToSuffer.java +++ b/Mage.Sets/src/mage/cards/k/KagemaroFirstToSuffer.java @@ -46,7 +46,7 @@ public final class KagemaroFirstToSuffer extends CardImpl { Ability ability = new SimpleActivatedAbility( Zone.BATTLEFIELD, new BoostAllEffect(xMinusValue, xMinusValue, Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURE, false, - "All creatures get -X/-X until end of turn, where X is the number of cards in your hand", true), + "All creatures get -X/-X until end of turn, where X is the number of cards in your hand"), new ManaCostsImpl("{B}") ); ability.addCost(new SacrificeSourceCost()); diff --git a/Mage.Sets/src/mage/cards/m/MartonStromgald.java b/Mage.Sets/src/mage/cards/m/MartonStromgald.java index bc40b4f10d..5025bc6aaf 100644 --- a/Mage.Sets/src/mage/cards/m/MartonStromgald.java +++ b/Mage.Sets/src/mage/cards/m/MartonStromgald.java @@ -45,10 +45,10 @@ public final class MartonStromgald extends CardImpl { this.toughness = new MageInt(1); // Whenever Marton Stromgald attacks, other attacking creatures get +1/+1 until end of turn for each attacking creature other than Marton Stromgald. - this.addAbility(new AttacksTriggeredAbility(new BoostAllEffect(attackingValue, attackingValue, Duration.EndOfTurn, StaticFilters.FILTER_ATTACKING_CREATURES, true, null, true), false)); + this.addAbility(new AttacksTriggeredAbility(new BoostAllEffect(attackingValue, attackingValue, Duration.EndOfTurn, StaticFilters.FILTER_ATTACKING_CREATURES, true, null), false)); // Whenever Marton Stromgald blocks, other blocking creatures get +1/+1 until end of turn for each blocking creature other than Marton Stromgald. - this.addAbility(new BlocksSourceTriggeredAbility(new BoostAllEffect(blockingValue, blockingValue, Duration.EndOfTurn, StaticFilters.FILTER_BLOCKING_CREATURES, true, null, true), false)); + this.addAbility(new BlocksSourceTriggeredAbility(new BoostAllEffect(blockingValue, blockingValue, Duration.EndOfTurn, StaticFilters.FILTER_BLOCKING_CREATURES, true, null), false)); } private MartonStromgald(final MartonStromgald card) { diff --git a/Mage.Sets/src/mage/cards/m/Mutilate.java b/Mage.Sets/src/mage/cards/m/Mutilate.java index c13bcd64cb..27422d20fd 100644 --- a/Mage.Sets/src/mage/cards/m/Mutilate.java +++ b/Mage.Sets/src/mage/cards/m/Mutilate.java @@ -35,7 +35,7 @@ public final class Mutilate extends CardImpl { // All creatures get -1/-1 until end of turn for each Swamp you control. PermanentsOnBattlefieldCount count = new PermanentsOnBattlefieldCount(filter, -1); this.getSpellAbility().addEffect( - new BoostAllEffect(count, count, Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURES, false, null, true) + new BoostAllEffect(count, count, Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURES, false, null) .setText(ruleText) ); } diff --git a/Mage.Sets/src/mage/cards/o/OliviasWrath.java b/Mage.Sets/src/mage/cards/o/OliviasWrath.java index d6bb58d298..a19a0b2f0e 100644 --- a/Mage.Sets/src/mage/cards/o/OliviasWrath.java +++ b/Mage.Sets/src/mage/cards/o/OliviasWrath.java @@ -41,7 +41,7 @@ public final class OliviasWrath extends CardImpl { this.getSpellAbility().addEffect(new BoostAllEffect( xValue, xValue, Duration.EndOfTurn, filter, false, "each non-Vampire creature gets -X/-X until end of turn, " - + "where X is the number of Vampires you control", true + + "where X is the number of Vampires you control" )); } diff --git a/Mage.Sets/src/mage/cards/p/PackAttack.java b/Mage.Sets/src/mage/cards/p/PackAttack.java index 71ec5bc1a8..cf35adea4f 100644 --- a/Mage.Sets/src/mage/cards/p/PackAttack.java +++ b/Mage.Sets/src/mage/cards/p/PackAttack.java @@ -28,7 +28,7 @@ public final class PackAttack extends CardImpl { // Attacking creatures get +X/+0 until end of turn, where X is the number of players being attacked. this.getSpellAbility().addEffect(new BoostAllEffect( PackAttackValue.instance, StaticValue.get(0), Duration.EndOfTurn, - StaticFilters.FILTER_ATTACKING_CREATURES, false, null, true + StaticFilters.FILTER_ATTACKING_CREATURES, false, null )); // Draw a card. diff --git a/Mage.Sets/src/mage/cards/r/RabbleRouser.java b/Mage.Sets/src/mage/cards/r/RabbleRouser.java index e2827759b8..a62ba5316c 100644 --- a/Mage.Sets/src/mage/cards/r/RabbleRouser.java +++ b/Mage.Sets/src/mage/cards/r/RabbleRouser.java @@ -41,7 +41,7 @@ public final class RabbleRouser extends CardImpl { //{R}, {T}: Attacking creatures get +X/+0 until end of turn, where X is Rabble-Rouser's power. Ability ability = new SimpleActivatedAbility( - new BoostAllEffect(xValue, StaticValue.get(0), Duration.EndOfTurn, StaticFilters.FILTER_ATTACKING_CREATURES, false, null, true), + new BoostAllEffect(xValue, StaticValue.get(0), Duration.EndOfTurn, StaticFilters.FILTER_ATTACKING_CREATURES, false, null), new ColoredManaCost(ColoredManaSymbol.R)); ability.addCost(new TapSourceCost()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/r/RoilmagesTrick.java b/Mage.Sets/src/mage/cards/r/RoilmagesTrick.java index 0159264072..3bbd9f44ac 100644 --- a/Mage.Sets/src/mage/cards/r/RoilmagesTrick.java +++ b/Mage.Sets/src/mage/cards/r/RoilmagesTrick.java @@ -30,7 +30,7 @@ public final class RoilmagesTrick extends CardImpl { this.getSpellAbility().setAbilityWord(AbilityWord.CONVERGE); this.getSpellAbility().addEffect(new BoostAllEffect( xValue, StaticValue.get(0), Duration.EndOfTurn, - StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURES, false, null, true + StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURES, false, null )); // Draw a card. diff --git a/Mage.Sets/src/mage/cards/t/ToxicDeluge.java b/Mage.Sets/src/mage/cards/t/ToxicDeluge.java index ad79c96221..9b70d28cde 100644 --- a/Mage.Sets/src/mage/cards/t/ToxicDeluge.java +++ b/Mage.Sets/src/mage/cards/t/ToxicDeluge.java @@ -27,7 +27,7 @@ public final class ToxicDeluge extends CardImpl { this.getSpellAbility().addCost(new PayVariableLifeCost(true)); // All creatures get -X/-X until end of turn. - this.getSpellAbility().addEffect(new BoostAllEffect(xValue, xValue, Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_ALL_CREATURES, false, null, true)); + this.getSpellAbility().addEffect(new BoostAllEffect(xValue, xValue, Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_ALL_CREATURES, false, null)); } private ToxicDeluge(final ToxicDeluge card) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostAllEffect.java index 0acc9f9ed2..8ed8ee4354 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostAllEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/BoostAllEffect.java @@ -19,7 +19,6 @@ import java.util.Iterator; import java.util.Locale; /** - * * @author BetaSteward_at_googlemail.com */ public class BoostAllEffect extends ContinuousEffectImpl { @@ -28,7 +27,6 @@ public class BoostAllEffect extends ContinuousEffectImpl { protected DynamicValue toughness; protected boolean excludeSource; protected FilterCreaturePermanent filter; - protected boolean lockedInPT; public BoostAllEffect(int power, int toughness, Duration duration) { this(power, toughness, duration, false); @@ -51,17 +49,12 @@ public class BoostAllEffect extends ContinuousEffectImpl { } public BoostAllEffect(DynamicValue power, DynamicValue toughness, Duration duration, FilterCreaturePermanent filter, boolean excludeSource, String rule) { - this(power, toughness, duration, filter, excludeSource, rule, false); - } - - public BoostAllEffect(DynamicValue power, DynamicValue toughness, Duration duration, FilterCreaturePermanent filter, boolean excludeSource, String rule, boolean lockedInPT) { super(duration, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, isCanKill(toughness) ? Outcome.UnboostCreature : Outcome.BoostCreature); this.power = power; this.toughness = toughness; this.filter = filter; this.excludeSource = excludeSource; - this.lockedInPT = lockedInPT; if (rule == null || rule.isEmpty()) { setText(); } else { @@ -75,7 +68,6 @@ public class BoostAllEffect extends ContinuousEffectImpl { this.toughness = effect.toughness; this.filter = effect.filter.copy(); this.excludeSource = effect.excludeSource; - this.lockedInPT = effect.lockedInPT; } @Override @@ -93,8 +85,6 @@ public class BoostAllEffect extends ContinuousEffectImpl { affectedObjectList.add(new MageObjectReference(perm, game)); } } - } - if (lockedInPT) { power = StaticValue.get(power.calculate(game, source, this)); toughness = StaticValue.get(toughness.calculate(game, source, this)); } @@ -103,7 +93,7 @@ public class BoostAllEffect extends ContinuousEffectImpl { @Override public boolean apply(Game game, Ability source) { if (this.affectedObjectsSet) { - for (Iterator it = affectedObjectList.iterator(); it.hasNext();) { // filter may not be used again, because object can have changed filter relevant attributes but still geets boost + for (Iterator it = affectedObjectList.iterator(); it.hasNext(); ) { // filter may not be used again, because object can have changed filter relevant attributes but still geets boost Permanent permanent = it.next().getPermanent(game); if (permanent != null) { permanent.addPower(power.calculate(game, source, this));