From 5d0c1c96c8c97d27b4e3e6eedd5c3f77ce9db75d Mon Sep 17 00:00:00 2001 From: xenohedron Date: Sat, 26 Aug 2023 00:26:25 -0400 Subject: [PATCH] remove sublayer parameter in SetBasePowerToughnessSourceEffect --- Mage.Sets/src/mage/cards/a/Amplifire.java | 3 +-- Mage.Sets/src/mage/cards/a/AquamorphEntity.java | 2 +- Mage.Sets/src/mage/cards/a/AscendantSpirit.java | 5 ++--- Mage.Sets/src/mage/cards/b/BattlegateMimic.java | 3 +-- Mage.Sets/src/mage/cards/b/BramblefortFink.java | 2 +- Mage.Sets/src/mage/cards/b/BrokersInitiate.java | 3 +-- Mage.Sets/src/mage/cards/d/DonalHeraldOfWings.java | 2 +- Mage.Sets/src/mage/cards/d/Dracoplasm.java | 2 +- Mage.Sets/src/mage/cards/e/ElvishImpersonators.java | 2 +- Mage.Sets/src/mage/cards/e/EvolvedSleeper.java | 4 ++-- Mage.Sets/src/mage/cards/f/FigureOfDestiny.java | 6 +++--- Mage.Sets/src/mage/cards/f/FrodoSauronsBane.java | 2 +- Mage.Sets/src/mage/cards/g/Gigantiform.java | 2 +- Mage.Sets/src/mage/cards/h/Halfdane.java | 6 +++--- Mage.Sets/src/mage/cards/m/MarshFlitter.java | 2 +- Mage.Sets/src/mage/cards/m/MasterOfWinds.java | 2 +- Mage.Sets/src/mage/cards/m/MinionOfTheWastes.java | 2 +- Mage.Sets/src/mage/cards/m/MoltenSentry.java | 2 +- Mage.Sets/src/mage/cards/n/NamelessRace.java | 2 +- Mage.Sets/src/mage/cards/n/NightskyMimic.java | 3 +-- Mage.Sets/src/mage/cards/p/PrimalClay.java | 2 +- Mage.Sets/src/mage/cards/p/PrimalPlasma.java | 2 +- Mage.Sets/src/mage/cards/r/RisenRiptide.java | 3 +-- Mage.Sets/src/mage/cards/r/RiverfallMimic.java | 3 +-- Mage.Sets/src/mage/cards/s/ShapeStealer.java | 3 +-- Mage.Sets/src/mage/cards/s/ShorecrasherMimic.java | 3 +-- Mage.Sets/src/mage/cards/s/SurgeEngine.java | 2 +- Mage.Sets/src/mage/cards/s/SwornDefender.java | 2 +- Mage.Sets/src/mage/cards/t/TimberPaladin.java | 9 ++++----- Mage.Sets/src/mage/cards/t/TrenchGorger.java | 2 +- Mage.Sets/src/mage/cards/w/WardenOfTheFirstTree.java | 2 +- Mage.Sets/src/mage/cards/w/WoodElemental.java | 3 +-- Mage.Sets/src/mage/cards/w/WoodlurkerMimic.java | 3 +-- .../continuous/SetBasePowerToughnessSourceEffect.java | 4 ++-- .../java/mage/abilities/keyword/LevelerCardBuilder.java | 3 +-- 35 files changed, 45 insertions(+), 58 deletions(-) diff --git a/Mage.Sets/src/mage/cards/a/Amplifire.java b/Mage.Sets/src/mage/cards/a/Amplifire.java index d7a3c643e36..1919bd1e3a1 100644 --- a/Mage.Sets/src/mage/cards/a/Amplifire.java +++ b/Mage.Sets/src/mage/cards/a/Amplifire.java @@ -83,8 +83,7 @@ class AmplifireEffect extends OneShotEffect { SetBasePowerToughnessSourceEffect setBasePowerToughnessSourceEffect = new SetBasePowerToughnessSourceEffect( 2*lastCard.getPower().getValue(), 2*lastCard.getToughness().getValue(), - Duration.UntilYourNextTurn, - SubLayer.SetPT_7b + Duration.UntilYourNextTurn ); game.addEffect(setBasePowerToughnessSourceEffect, source); } diff --git a/Mage.Sets/src/mage/cards/a/AquamorphEntity.java b/Mage.Sets/src/mage/cards/a/AquamorphEntity.java index 09156b6ba28..b4075b0fe3f 100644 --- a/Mage.Sets/src/mage/cards/a/AquamorphEntity.java +++ b/Mage.Sets/src/mage/cards/a/AquamorphEntity.java @@ -124,7 +124,7 @@ class AquamorphEntityReplacementEffect extends ReplacementEffectImpl { toughness = 5; break; } - game.addEffect(new SetBasePowerToughnessSourceEffect(power, toughness, Duration.WhileOnBattlefield, SubLayer.CharacteristicDefining_7a), source); + game.addEffect(new SetBasePowerToughnessSourceEffect(power, toughness, Duration.WhileOnBattlefield), source); return false; } diff --git a/Mage.Sets/src/mage/cards/a/AscendantSpirit.java b/Mage.Sets/src/mage/cards/a/AscendantSpirit.java index a414df1ad2b..c70ec869315 100644 --- a/Mage.Sets/src/mage/cards/a/AscendantSpirit.java +++ b/Mage.Sets/src/mage/cards/a/AscendantSpirit.java @@ -39,8 +39,7 @@ public final class AscendantSpirit extends CardImpl { ability.addEffect(new SetBasePowerToughnessSourceEffect( 2, 3, - Duration.WhileOnBattlefield, - SubLayer.SetPT_7b + Duration.WhileOnBattlefield ).setText("with base power and toughness 2/3")); this.addAbility(ability); @@ -93,7 +92,7 @@ class AscendantSpiritWarriorEffect extends OneShotEffect { Duration.Custom, SubType.SPIRIT, SubType.WARRIOR, SubType.ANGEL ), source); game.addEffect(new SetBasePowerToughnessSourceEffect( - 4, 4, Duration.Custom, SubLayer.SetPT_7b + 4, 4, Duration.Custom ), source); return true; } diff --git a/Mage.Sets/src/mage/cards/b/BattlegateMimic.java b/Mage.Sets/src/mage/cards/b/BattlegateMimic.java index 43beaa70e8e..d4655b7fa10 100644 --- a/Mage.Sets/src/mage/cards/b/BattlegateMimic.java +++ b/Mage.Sets/src/mage/cards/b/BattlegateMimic.java @@ -12,7 +12,6 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.constants.SubLayer; import mage.constants.SubType; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ColorPredicate; @@ -41,7 +40,7 @@ public final class BattlegateMimic extends CardImpl { this.toughness = new MageInt(1); // Whenever you cast a spell that's both red and white, Battlegate Mimic has base power and toughness 4/2 and gains first strike until end of turn. - SetBasePowerToughnessSourceEffect baseToughnessSourceEffect = new SetBasePowerToughnessSourceEffect(4, 2, Duration.EndOfTurn, SubLayer.SetPT_7b); + SetBasePowerToughnessSourceEffect baseToughnessSourceEffect = new SetBasePowerToughnessSourceEffect(4, 2, Duration.EndOfTurn); Ability ability = SpellCastControllerTriggeredAbility.createWithRule(baseToughnessSourceEffect, filter, false, rule); ability.addEffect(new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn, false, true)); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/b/BramblefortFink.java b/Mage.Sets/src/mage/cards/b/BramblefortFink.java index 9a1ad980931..c7f7eca5764 100644 --- a/Mage.Sets/src/mage/cards/b/BramblefortFink.java +++ b/Mage.Sets/src/mage/cards/b/BramblefortFink.java @@ -34,7 +34,7 @@ public final class BramblefortFink extends CardImpl { this.addAbility(new ActivateIfConditionActivatedAbility( Zone.BATTLEFIELD, new SetBasePowerToughnessSourceEffect( - 10, 10, Duration.EndOfTurn, SubLayer.SetPT_7b + 10, 10, Duration.EndOfTurn ).setText("{this} has base power and toughness 10/10 until end of turn"), new GenericManaCost(8), condition)); diff --git a/Mage.Sets/src/mage/cards/b/BrokersInitiate.java b/Mage.Sets/src/mage/cards/b/BrokersInitiate.java index 99ff6178c6a..085f1ce4943 100644 --- a/Mage.Sets/src/mage/cards/b/BrokersInitiate.java +++ b/Mage.Sets/src/mage/cards/b/BrokersInitiate.java @@ -8,7 +8,6 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.constants.SubLayer; import mage.constants.SubType; import java.util.UUID; @@ -28,7 +27,7 @@ public final class BrokersInitiate extends CardImpl { // {4}{G/U}: Brokers Initiate has base power and toughness 5/5 until end of turn. this.addAbility(new SimpleActivatedAbility( - new SetBasePowerToughnessSourceEffect(5, 5, Duration.EndOfTurn, SubLayer.SetPT_7b), + new SetBasePowerToughnessSourceEffect(5, 5, Duration.EndOfTurn), new ManaCostsImpl<>("{4}{G/U}") )); } diff --git a/Mage.Sets/src/mage/cards/d/DonalHeraldOfWings.java b/Mage.Sets/src/mage/cards/d/DonalHeraldOfWings.java index ab54c8e0b9c..eaff66a9962 100644 --- a/Mage.Sets/src/mage/cards/d/DonalHeraldOfWings.java +++ b/Mage.Sets/src/mage/cards/d/DonalHeraldOfWings.java @@ -103,7 +103,7 @@ enum DonalHeraldOfWingsApplier implements StackObjectCopyApplier { copiedSpell.addSubType(SubType.SPIRIT); copiedSpell.getPower().setModifiedBaseValue(1); copiedSpell.getToughness().setModifiedBaseValue(1); - Ability ability = new SimpleStaticAbility(new SetBasePowerToughnessSourceEffect(1,1, Duration.Custom, SubLayer.SetPT_7b)); + Ability ability = new SimpleStaticAbility(new SetBasePowerToughnessSourceEffect(1,1, Duration.Custom)); ability.setRuleVisible(false); copiedSpell.getAbilities().add(ability); } diff --git a/Mage.Sets/src/mage/cards/d/Dracoplasm.java b/Mage.Sets/src/mage/cards/d/Dracoplasm.java index 35fa182e4a2..c0971d5dc88 100644 --- a/Mage.Sets/src/mage/cards/d/Dracoplasm.java +++ b/Mage.Sets/src/mage/cards/d/Dracoplasm.java @@ -117,7 +117,7 @@ class DracoplasmEffect extends ReplacementEffectImpl { toughness = CardUtil.overflowInc(toughness, targetCreature.getToughness().getValue()); } } - ContinuousEffect effect = new SetBasePowerToughnessSourceEffect(power, toughness, Duration.Custom, SubLayer.SetPT_7b); + ContinuousEffect effect = new SetBasePowerToughnessSourceEffect(power, toughness, Duration.Custom); game.addEffect(effect, source); return false; } diff --git a/Mage.Sets/src/mage/cards/e/ElvishImpersonators.java b/Mage.Sets/src/mage/cards/e/ElvishImpersonators.java index e83b05cf75b..7270a5e6b39 100644 --- a/Mage.Sets/src/mage/cards/e/ElvishImpersonators.java +++ b/Mage.Sets/src/mage/cards/e/ElvishImpersonators.java @@ -65,7 +65,7 @@ class ElvishImpersonatorsEffect extends OneShotEffect { List results = controller.rollDice(outcome, source, game, 6, 2, 0); int firstRoll = results.get(0); int secondRoll = results.get(1); - game.addEffect(new SetBasePowerToughnessSourceEffect(firstRoll, secondRoll, Duration.WhileOnBattlefield, SubLayer.SetPT_7b), source); + game.addEffect(new SetBasePowerToughnessSourceEffect(firstRoll, secondRoll, Duration.WhileOnBattlefield), source); return true; } } diff --git a/Mage.Sets/src/mage/cards/e/EvolvedSleeper.java b/Mage.Sets/src/mage/cards/e/EvolvedSleeper.java index 2f5df81a307..26fe6d8e53d 100644 --- a/Mage.Sets/src/mage/cards/e/EvolvedSleeper.java +++ b/Mage.Sets/src/mage/cards/e/EvolvedSleeper.java @@ -34,7 +34,7 @@ public final class EvolvedSleeper extends CardImpl { Duration.Custom, SubType.HUMAN, SubType.CLERIC ).setText("{this} becomes a Human Cleric"), new ManaCostsImpl<>("{B}")); ability.addEffect(new SetBasePowerToughnessSourceEffect( - 2, 2, Duration.Custom, SubLayer.SetPT_7b + 2, 2, Duration.Custom ).setText("with base power and toughness 2/2")); this.addAbility(ability); @@ -87,7 +87,7 @@ class EvolvedSleeperClericEffect extends OneShotEffect { Duration.Custom, SubType.PHYREXIAN, SubType.HUMAN, SubType.CLERIC ), source); game.addEffect(new SetBasePowerToughnessSourceEffect( - 3, 3, Duration.Custom, SubLayer.SetPT_7b + 3, 3, Duration.Custom ), source); return true; } diff --git a/Mage.Sets/src/mage/cards/f/FigureOfDestiny.java b/Mage.Sets/src/mage/cards/f/FigureOfDestiny.java index 19cf8b538fd..8c7e9f56e2e 100644 --- a/Mage.Sets/src/mage/cards/f/FigureOfDestiny.java +++ b/Mage.Sets/src/mage/cards/f/FigureOfDestiny.java @@ -35,7 +35,7 @@ public final class FigureOfDestiny extends CardImpl { Duration.Custom, SubType.KITHKIN, SubType.SPIRIT ).setText("{this} becomes a Kithkin Spirit"), new ManaCostsImpl<>("{R/W}")); ability.addEffect(new SetBasePowerToughnessSourceEffect( - 2, 2, Duration.Custom, SubLayer.SetPT_7b + 2, 2, Duration.Custom ).setText("with base power and toughness 2/2")); this.addAbility(ability); @@ -86,7 +86,7 @@ class FigureOfDestinySpiritEffect extends OneShotEffect { Duration.Custom, SubType.KITHKIN, SubType.SPIRIT, SubType.WARRIOR ), source); game.addEffect(new SetBasePowerToughnessSourceEffect( - 4, 4, Duration.Custom, SubLayer.SetPT_7b + 4, 4, Duration.Custom ), source); return true; } @@ -119,7 +119,7 @@ class FigureOfDestinyWarriorEffect extends OneShotEffect { Duration.Custom, SubType.KITHKIN, SubType.SPIRIT, SubType.WARRIOR, SubType.AVATAR ), source); game.addEffect(new SetBasePowerToughnessSourceEffect( - 8, 8, Duration.Custom, SubLayer.SetPT_7b + 8, 8, Duration.Custom ), source); game.addEffect(new GainAbilitySourceEffect( FlyingAbility.getInstance(), Duration.Custom diff --git a/Mage.Sets/src/mage/cards/f/FrodoSauronsBane.java b/Mage.Sets/src/mage/cards/f/FrodoSauronsBane.java index 5e6e1e640e5..e4843b0e83d 100644 --- a/Mage.Sets/src/mage/cards/f/FrodoSauronsBane.java +++ b/Mage.Sets/src/mage/cards/f/FrodoSauronsBane.java @@ -44,7 +44,7 @@ public final class FrodoSauronsBane extends CardImpl { this.addAbility(new SimpleActivatedAbility( new ConditionalOneShotEffect(new AddContinuousEffectToGame( new AddCardSubTypeSourceEffect(Duration.Custom, SubType.HALFLING, SubType.SCOUT), - new SetBasePowerToughnessSourceEffect(2, 3, Duration.Custom, SubLayer.SetPT_7b), + new SetBasePowerToughnessSourceEffect(2, 3, Duration.Custom), new GainAbilitySourceEffect(LifelinkAbility.getInstance(), Duration.Custom) ), condition1, "if {this} is a Citizen, it becomes a Halfling Scout with base power and toughness 2/3 and lifelink"), new ManaCostsImpl<>("{W/B}{W/B}") diff --git a/Mage.Sets/src/mage/cards/g/Gigantiform.java b/Mage.Sets/src/mage/cards/g/Gigantiform.java index 90fc0d36393..12daf2b3088 100644 --- a/Mage.Sets/src/mage/cards/g/Gigantiform.java +++ b/Mage.Sets/src/mage/cards/g/Gigantiform.java @@ -71,7 +71,7 @@ class GigantiformAbility extends StaticAbility { super(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(TrampleAbility.getInstance(), AttachmentType.AURA)); Ability ability = new SimpleStaticAbility( Zone.BATTLEFIELD, - new SetBasePowerToughnessSourceEffect(8, 8, Duration.WhileOnBattlefield, SubLayer.SetPT_7b) + new SetBasePowerToughnessSourceEffect(8, 8, Duration.WhileOnBattlefield) ); this.addEffect(new GainAbilityAttachedEffect(ability, AttachmentType.AURA)); } diff --git a/Mage.Sets/src/mage/cards/h/Halfdane.java b/Mage.Sets/src/mage/cards/h/Halfdane.java index 210408bdb50..b3e421f1706 100644 --- a/Mage.Sets/src/mage/cards/h/Halfdane.java +++ b/Mage.Sets/src/mage/cards/h/Halfdane.java @@ -81,9 +81,9 @@ class HalfdaneUpkeepEffect extends OneShotEffect { ContinuousEffect effect = new SetBasePowerToughnessSourceEffect( permanent.getPower().getValue(), permanent.getToughness().getValue(), - Duration.UntilYourNextUpkeepStep, - SubLayer.SetPT_7b); + Duration.UntilYourNextUpkeepStep + ); game.addEffect(effect, source); return true; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/m/MarshFlitter.java b/Mage.Sets/src/mage/cards/m/MarshFlitter.java index bea9a8ac24c..641acb0a167 100644 --- a/Mage.Sets/src/mage/cards/m/MarshFlitter.java +++ b/Mage.Sets/src/mage/cards/m/MarshFlitter.java @@ -44,7 +44,7 @@ public final class MarshFlitter extends CardImpl { this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new GoblinRogueToken(), 2), false)); // Sacrifice a Goblin: Marsh Flitter has base power and toughness 3/3 until end of turn. - Effect effect = new SetBasePowerToughnessSourceEffect(3, 3, Duration.EndOfTurn, SubLayer.SetPT_7b); + Effect effect = new SetBasePowerToughnessSourceEffect(3, 3, Duration.EndOfTurn); effect.setText("{this} has base power and toughness 3/3 until end of turn"); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new SacrificeTargetCost(new TargetControlledPermanent(filter))); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/m/MasterOfWinds.java b/Mage.Sets/src/mage/cards/m/MasterOfWinds.java index 575085000c9..13385ec7c5d 100644 --- a/Mage.Sets/src/mage/cards/m/MasterOfWinds.java +++ b/Mage.Sets/src/mage/cards/m/MasterOfWinds.java @@ -79,7 +79,7 @@ class MasterOfWindsEffect extends OneShotEffect { null, "4/1", "1/4", source, game ) ? 4 : 1; game.addEffect(new SetBasePowerToughnessSourceEffect( - power, 5 - power, Duration.EndOfTurn, SubLayer.SetPT_7b + power, 5 - power, Duration.EndOfTurn ), source); return true; } diff --git a/Mage.Sets/src/mage/cards/m/MinionOfTheWastes.java b/Mage.Sets/src/mage/cards/m/MinionOfTheWastes.java index 4fa6df8ea6b..1f621495cb3 100644 --- a/Mage.Sets/src/mage/cards/m/MinionOfTheWastes.java +++ b/Mage.Sets/src/mage/cards/m/MinionOfTheWastes.java @@ -84,7 +84,7 @@ class MinionOfTheWastesEffect extends OneShotEffect { game.informPlayers((sourceCard != null ? sourceCard.getLogName() : "") + ": " + controller.getLogName() + " pays " + payAmount + " life"); game.addEffect(new SetBasePowerToughnessSourceEffect( - payAmount, payAmount, Duration.Custom, SubLayer.CharacteristicDefining_7a + payAmount, payAmount, Duration.Custom ), source); permanent.addInfo("life paid", CardUtil.addToolTipMarkTags("Life paid: " + payAmount), game); return true; diff --git a/Mage.Sets/src/mage/cards/m/MoltenSentry.java b/Mage.Sets/src/mage/cards/m/MoltenSentry.java index 4f64c0bdd42..d90a32bf91b 100644 --- a/Mage.Sets/src/mage/cards/m/MoltenSentry.java +++ b/Mage.Sets/src/mage/cards/m/MoltenSentry.java @@ -79,7 +79,7 @@ class MoltenSentryEffect extends OneShotEffect { toughness = 5; gainedAbility = DefenderAbility.getInstance(); } - game.addEffect(new SetBasePowerToughnessSourceEffect(power, toughness, Duration.WhileOnBattlefield, SubLayer.CharacteristicDefining_7a), source); + game.addEffect(new SetBasePowerToughnessSourceEffect(power, toughness, Duration.WhileOnBattlefield), source); game.addEffect(new GainAbilitySourceEffect(gainedAbility, Duration.WhileOnBattlefield), source); return true; } diff --git a/Mage.Sets/src/mage/cards/n/NamelessRace.java b/Mage.Sets/src/mage/cards/n/NamelessRace.java index eeebb2285cb..94ea4af158e 100644 --- a/Mage.Sets/src/mage/cards/n/NamelessRace.java +++ b/Mage.Sets/src/mage/cards/n/NamelessRace.java @@ -108,7 +108,7 @@ class NamelessRaceEffect extends OneShotEffect { game.informPlayers((sourceCard != null ? sourceCard.getLogName() : "") + ": " + controller.getLogName() + " pays " + payAmount + " life"); game.addEffect(new SetBasePowerToughnessSourceEffect( - payAmount, payAmount, Duration.Custom, SubLayer.CharacteristicDefining_7a + payAmount, payAmount, Duration.Custom ), source); permanent.addInfo("life paid", CardUtil.addToolTipMarkTags("Life paid: " + payAmount), game); return true; diff --git a/Mage.Sets/src/mage/cards/n/NightskyMimic.java b/Mage.Sets/src/mage/cards/n/NightskyMimic.java index 59b97067f75..34f00cb3569 100644 --- a/Mage.Sets/src/mage/cards/n/NightskyMimic.java +++ b/Mage.Sets/src/mage/cards/n/NightskyMimic.java @@ -12,7 +12,6 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.constants.SubLayer; import mage.constants.SubType; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ColorPredicate; @@ -44,7 +43,7 @@ public final class NightskyMimic extends CardImpl { // Whenever you cast a spell that's both white and black, Nightsky Mimic has base power and toughness 4/4 until end of turn and gains flying until end of turn. Ability ability = SpellCastControllerTriggeredAbility.createWithRule( - new SetBasePowerToughnessSourceEffect(4, 4, Duration.EndOfTurn, SubLayer.SetPT_7b), + new SetBasePowerToughnessSourceEffect(4, 4, Duration.EndOfTurn), filter, false, rule ); ability.addEffect(new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.EndOfTurn, false, true)); diff --git a/Mage.Sets/src/mage/cards/p/PrimalClay.java b/Mage.Sets/src/mage/cards/p/PrimalClay.java index 4b8f234833c..0570212a95f 100644 --- a/Mage.Sets/src/mage/cards/p/PrimalClay.java +++ b/Mage.Sets/src/mage/cards/p/PrimalClay.java @@ -114,7 +114,7 @@ public final class PrimalClay extends CardImpl { game.addEffect(new GainAbilitySourceEffect(DefenderAbility.getInstance(), Duration.Custom), source); break; } - game.addEffect(new SetBasePowerToughnessSourceEffect(power, toughness, Duration.WhileOnBattlefield, SubLayer.CharacteristicDefining_7a), source); + game.addEffect(new SetBasePowerToughnessSourceEffect(power, toughness, Duration.WhileOnBattlefield), source); return false; } diff --git a/Mage.Sets/src/mage/cards/p/PrimalPlasma.java b/Mage.Sets/src/mage/cards/p/PrimalPlasma.java index 426e414eb1f..b3dba1d1023 100644 --- a/Mage.Sets/src/mage/cards/p/PrimalPlasma.java +++ b/Mage.Sets/src/mage/cards/p/PrimalPlasma.java @@ -113,7 +113,7 @@ public final class PrimalPlasma extends CardImpl { game.addEffect(new GainAbilitySourceEffect(DefenderAbility.getInstance(), Duration.Custom), source); break; } - game.addEffect(new SetBasePowerToughnessSourceEffect(power, toughness, Duration.WhileOnBattlefield, SubLayer.CharacteristicDefining_7a), source); + game.addEffect(new SetBasePowerToughnessSourceEffect(power, toughness, Duration.WhileOnBattlefield), source); } return false; diff --git a/Mage.Sets/src/mage/cards/r/RisenRiptide.java b/Mage.Sets/src/mage/cards/r/RisenRiptide.java index a120990bec5..976e4c45ccd 100644 --- a/Mage.Sets/src/mage/cards/r/RisenRiptide.java +++ b/Mage.Sets/src/mage/cards/r/RisenRiptide.java @@ -7,7 +7,6 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.constants.SubLayer; import mage.constants.SubType; import mage.filter.StaticFilters; @@ -27,7 +26,7 @@ public final class RisenRiptide extends CardImpl { // Whenever you cast a kicked spell, Risen Riptide has base power and toughness 5/5 until end of turn. this.addAbility(new SpellCastControllerTriggeredAbility( - new SetBasePowerToughnessSourceEffect(5, 5, Duration.EndOfTurn, SubLayer.SetPT_7b) + new SetBasePowerToughnessSourceEffect(5, 5, Duration.EndOfTurn) .setText("{this} has base power and toughness 5/5 until end of turn"), StaticFilters.FILTER_SPELL_KICKED_A, false) diff --git a/Mage.Sets/src/mage/cards/r/RiverfallMimic.java b/Mage.Sets/src/mage/cards/r/RiverfallMimic.java index 5721668acfc..4d3c3341a77 100644 --- a/Mage.Sets/src/mage/cards/r/RiverfallMimic.java +++ b/Mage.Sets/src/mage/cards/r/RiverfallMimic.java @@ -12,7 +12,6 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.constants.SubLayer; import mage.constants.SubType; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ColorPredicate; @@ -44,7 +43,7 @@ public final class RiverfallMimic extends CardImpl { // Whenever you cast a spell that's both blue and red, Riverfall Mimic has base power and toughness 3/3 until end of turn and can't be blocked this turn. Ability ability = SpellCastControllerTriggeredAbility.createWithRule( - new SetBasePowerToughnessSourceEffect(3, 3, Duration.EndOfTurn, SubLayer.SetPT_7b), + new SetBasePowerToughnessSourceEffect(3, 3, Duration.EndOfTurn), filter, false, rule ); ability.addEffect(new GainAbilitySourceEffect(new CantBeBlockedSourceAbility(), Duration.EndOfTurn, false, true)); diff --git a/Mage.Sets/src/mage/cards/s/ShapeStealer.java b/Mage.Sets/src/mage/cards/s/ShapeStealer.java index 33b94100771..402fdbde6fb 100644 --- a/Mage.Sets/src/mage/cards/s/ShapeStealer.java +++ b/Mage.Sets/src/mage/cards/s/ShapeStealer.java @@ -14,7 +14,6 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; -import mage.constants.SubLayer; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; @@ -74,7 +73,7 @@ class ShapeStealerEffect extends OneShotEffect { return false; } - ContinuousEffect effect = new SetBasePowerToughnessSourceEffect(permanent.getPower().getValue(), permanent.getToughness().getValue(), Duration.EndOfTurn, SubLayer.SetPT_7b); + ContinuousEffect effect = new SetBasePowerToughnessSourceEffect(permanent.getPower().getValue(), permanent.getToughness().getValue(), Duration.EndOfTurn); game.addEffect(effect, source); return true; } diff --git a/Mage.Sets/src/mage/cards/s/ShorecrasherMimic.java b/Mage.Sets/src/mage/cards/s/ShorecrasherMimic.java index cd5fbe562c1..37e5c2c347b 100644 --- a/Mage.Sets/src/mage/cards/s/ShorecrasherMimic.java +++ b/Mage.Sets/src/mage/cards/s/ShorecrasherMimic.java @@ -12,7 +12,6 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.constants.SubLayer; import mage.constants.SubType; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ColorPredicate; @@ -44,7 +43,7 @@ public final class ShorecrasherMimic extends CardImpl { // Whenever you cast a spell that's both green and blue, Shorecrasher Mimic has base power and toughness 5/3 until end of turn and gains trample until end of turn. Ability ability = SpellCastControllerTriggeredAbility.createWithRule( - new SetBasePowerToughnessSourceEffect(5, 3, Duration.EndOfTurn, SubLayer.SetPT_7b), + new SetBasePowerToughnessSourceEffect(5, 3, Duration.EndOfTurn), filter, false, rule ); ability.addEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.EndOfTurn, false, true)); diff --git a/Mage.Sets/src/mage/cards/s/SurgeEngine.java b/Mage.Sets/src/mage/cards/s/SurgeEngine.java index b87378e9563..a230a0b0b65 100644 --- a/Mage.Sets/src/mage/cards/s/SurgeEngine.java +++ b/Mage.Sets/src/mage/cards/s/SurgeEngine.java @@ -54,7 +54,7 @@ public final class SurgeEngine extends CardImpl { new ManaCostsImpl<>("{2}{U}"), SurgeEngineCondition.instance ); ability.addEffect(new SetBasePowerToughnessSourceEffect( - 5, 4, Duration.Custom, SubLayer.SetPT_7b + 5, 4, Duration.Custom ).setText("and has base power and toughness 5/4")); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/s/SwornDefender.java b/Mage.Sets/src/mage/cards/s/SwornDefender.java index 02a3aa63e9f..a22492ef37f 100644 --- a/Mage.Sets/src/mage/cards/s/SwornDefender.java +++ b/Mage.Sets/src/mage/cards/s/SwornDefender.java @@ -78,7 +78,7 @@ class SwornDefenderEffect extends OneShotEffect { if (controller != null && targetPermanent != null) { int newPower = CardUtil.overflowDec(targetPermanent.getToughness().getValue(), 1); int newToughness = CardUtil.overflowInc(targetPermanent.getPower().getValue(), 1); - game.addEffect(new SetBasePowerToughnessSourceEffect(newPower, newToughness, Duration.EndOfTurn, SubLayer.SetPT_7b), source); + game.addEffect(new SetBasePowerToughnessSourceEffect(newPower, newToughness, Duration.EndOfTurn), source); return true; } return false; diff --git a/Mage.Sets/src/mage/cards/t/TimberPaladin.java b/Mage.Sets/src/mage/cards/t/TimberPaladin.java index 7c239ba1071..e29954dd081 100644 --- a/Mage.Sets/src/mage/cards/t/TimberPaladin.java +++ b/Mage.Sets/src/mage/cards/t/TimberPaladin.java @@ -17,7 +17,6 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.ComparisonType; import mage.constants.Duration; -import mage.constants.SubLayer; /** * @@ -38,7 +37,7 @@ public final class TimberPaladin extends CardImpl { // As long as Timber Paladin is enchanted by exactly one Aura, it has base power and toughness 3/3. Ability ability1 = new SimpleStaticAbility(new ConditionalContinuousEffect( - new SetBasePowerToughnessSourceEffect(3, 3, Duration.WhileOnBattlefield, SubLayer.SetPT_7b), + new SetBasePowerToughnessSourceEffect(3, 3, Duration.WhileOnBattlefield), exactlyOne, "As long as {this} is enchanted by exactly one Aura, it has base power and toughness 3/3." )); @@ -47,7 +46,7 @@ public final class TimberPaladin extends CardImpl { // As long as Timber Paladin is enchanted by exactly two Auras, it has base power and toughness 5/5 and vigilance. Ability ability2 = new SimpleStaticAbility(new ConditionalContinuousEffect( - new SetBasePowerToughnessSourceEffect(5, 5, Duration.WhileOnBattlefield, SubLayer.SetPT_7b), + new SetBasePowerToughnessSourceEffect(5, 5, Duration.WhileOnBattlefield), exactlyTwo, "As long as {this} is enchanted by exactly two Auras, it has base power and toughness 5/5" )); @@ -57,7 +56,7 @@ public final class TimberPaladin extends CardImpl { // As long as Timber Paladin is enchanted by three or more Auras, it has base power and toughness 10/10, vigilance, and trample. Ability ability3 = new SimpleStaticAbility(new ConditionalContinuousEffect( - new SetBasePowerToughnessSourceEffect(10, 10, Duration.WhileOnBattlefield, SubLayer.SetPT_7b), + new SetBasePowerToughnessSourceEffect(10, 10, Duration.WhileOnBattlefield), threeOrMore, "As long as {this} is enchanted by three or more Auras, it has base power and toughness 10/10" )); @@ -74,4 +73,4 @@ public final class TimberPaladin extends CardImpl { public TimberPaladin copy() { return new TimberPaladin(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/t/TrenchGorger.java b/Mage.Sets/src/mage/cards/t/TrenchGorger.java index 2c0d2be4f88..ef0420943ff 100644 --- a/Mage.Sets/src/mage/cards/t/TrenchGorger.java +++ b/Mage.Sets/src/mage/cards/t/TrenchGorger.java @@ -86,7 +86,7 @@ class TrenchGorgerEffect extends OneShotEffect { } } controller.shuffleLibrary(source, game); - game.addEffect(new SetBasePowerToughnessSourceEffect(count, count, Duration.WhileOnBattlefield, SubLayer.SetPT_7b), source); + game.addEffect(new SetBasePowerToughnessSourceEffect(count, count, Duration.WhileOnBattlefield), source); return true; } } diff --git a/Mage.Sets/src/mage/cards/w/WardenOfTheFirstTree.java b/Mage.Sets/src/mage/cards/w/WardenOfTheFirstTree.java index 49fb66d8140..53c2588fe1a 100644 --- a/Mage.Sets/src/mage/cards/w/WardenOfTheFirstTree.java +++ b/Mage.Sets/src/mage/cards/w/WardenOfTheFirstTree.java @@ -43,7 +43,7 @@ public final class WardenOfTheFirstTree extends CardImpl { Duration.Custom, SubType.HUMAN, SubType.WARRIOR ).setText("{this} becomes a Human Warrior"), new ManaCostsImpl<>("{1}{W/B}")); ability.addEffect(new SetBasePowerToughnessSourceEffect( - 3, 3, Duration.Custom, SubLayer.SetPT_7b + 3, 3, Duration.Custom ).setText("with base power and toughness 3/3")); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/w/WoodElemental.java b/Mage.Sets/src/mage/cards/w/WoodElemental.java index abfa7bf1e98..056ee32ceb0 100644 --- a/Mage.Sets/src/mage/cards/w/WoodElemental.java +++ b/Mage.Sets/src/mage/cards/w/WoodElemental.java @@ -16,7 +16,6 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Duration; import mage.constants.Outcome; -import mage.constants.SubLayer; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.permanent.TappedPredicate; @@ -95,7 +94,7 @@ class WoodElementalEffect extends OneShotEffect { targetPermanent.sacrifice(source, game); } } - game.addEffect(new SetBasePowerToughnessSourceEffect(sacrificedForests, sacrificedForests, Duration.Custom, SubLayer.SetPT_7b), source); + game.addEffect(new SetBasePowerToughnessSourceEffect(sacrificedForests, sacrificedForests, Duration.Custom), source); return true; } } diff --git a/Mage.Sets/src/mage/cards/w/WoodlurkerMimic.java b/Mage.Sets/src/mage/cards/w/WoodlurkerMimic.java index b2fe7cccb8a..c166fbfe989 100644 --- a/Mage.Sets/src/mage/cards/w/WoodlurkerMimic.java +++ b/Mage.Sets/src/mage/cards/w/WoodlurkerMimic.java @@ -12,7 +12,6 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.constants.SubLayer; import mage.constants.SubType; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ColorPredicate; @@ -44,7 +43,7 @@ public final class WoodlurkerMimic extends CardImpl { // Whenever you cast a spell that's both black and green, Woodlurker Mimic has base power and toughness 4/5 until end of turn and gains wither until end of turn. Ability ability = SpellCastControllerTriggeredAbility.createWithRule( - new SetBasePowerToughnessSourceEffect(4, 5, Duration.EndOfTurn, SubLayer.SetPT_7b), + new SetBasePowerToughnessSourceEffect(4, 5, Duration.EndOfTurn), filter, false, rule ); ability.addEffect(new GainAbilitySourceEffect(WitherAbility.getInstance(), Duration.EndOfTurn, false, true)); diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/SetBasePowerToughnessSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/SetBasePowerToughnessSourceEffect.java index 488144005df..d95f8b80afc 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/SetBasePowerToughnessSourceEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/SetBasePowerToughnessSourceEffect.java @@ -42,8 +42,8 @@ public class SetBasePowerToughnessSourceEffect extends ContinuousEffectImpl { this.staticText = "{this}'s power and toughness are each equal to the number of " + amount.getMessage(); } - public SetBasePowerToughnessSourceEffect(int power, int toughness, Duration duration, SubLayer subLayer) { - this(StaticValue.get(power), StaticValue.get(toughness), duration, subLayer); + public SetBasePowerToughnessSourceEffect(int power, int toughness, Duration duration) { + this(StaticValue.get(power), StaticValue.get(toughness), duration, SubLayer.SetPT_7b); this.staticText = "{this} has base power and toughness " + power + '/' + toughness + ' ' + duration.toString(); } diff --git a/Mage/src/main/java/mage/abilities/keyword/LevelerCardBuilder.java b/Mage/src/main/java/mage/abilities/keyword/LevelerCardBuilder.java index 80acc591b5f..e84a97f6d4a 100644 --- a/Mage/src/main/java/mage/abilities/keyword/LevelerCardBuilder.java +++ b/Mage/src/main/java/mage/abilities/keyword/LevelerCardBuilder.java @@ -11,7 +11,6 @@ import mage.abilities.effects.ContinuousEffect; import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; import mage.abilities.effects.common.continuous.SetBasePowerToughnessSourceEffect; import mage.constants.Duration; -import mage.constants.SubLayer; import mage.constants.Zone; import mage.counters.CounterType; @@ -55,7 +54,7 @@ public class LevelerCardBuilder { staticAbility.setRuleVisible(false); constructed.add(staticAbility); } - ContinuousEffect effect = new SetBasePowerToughnessSourceEffect(power, toughness, Duration.WhileOnBattlefield, SubLayer.SetPT_7b); + ContinuousEffect effect = new SetBasePowerToughnessSourceEffect(power, toughness, Duration.WhileOnBattlefield); ConditionalContinuousEffect ptEffect = new ConditionalContinuousEffect(effect, condition, rule); constructed.add(new SimpleStaticAbility(Zone.BATTLEFIELD, ptEffect));