From 5d0c1c96c8c97d27b4e3e6eedd5c3f77ce9db75d Mon Sep 17 00:00:00 2001 From: xenohedron Date: Sat, 26 Aug 2023 00:26:25 -0400 Subject: [PATCH 01/36] 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)); From c84fbfd00e127b0c91cb54366e94396699337bdb Mon Sep 17 00:00:00 2001 From: xenohedron Date: Sat, 26 Aug 2023 00:51:20 -0400 Subject: [PATCH 02/36] new SetBasePowerToughnessPlusOneSourceEffect --- Mage.Sets/src/mage/cards/c/ConsumingBlob.java | 16 ++++------ Mage.Sets/src/mage/cards/l/Lhurgoyf.java | 18 ++++------- Mage.Sets/src/mage/cards/t/Tarmogoyf.java | 15 ++++------ .../src/mage/cards/u/UrborgLhurgoyf.java | 16 ++++------ ...BasePowerToughnessPlusOneSourceEffect.java | 30 +++++++++++++++++++ .../SetBasePowerToughnessSourceEffect.java | 11 ++----- .../token/ConsumingBlobOozeToken.java | 15 ++++------ 7 files changed, 59 insertions(+), 62 deletions(-) create mode 100644 Mage/src/main/java/mage/abilities/effects/common/continuous/SetBasePowerToughnessPlusOneSourceEffect.java diff --git a/Mage.Sets/src/mage/cards/c/ConsumingBlob.java b/Mage.Sets/src/mage/cards/c/ConsumingBlob.java index 72a18f5c659..e74cd19321f 100644 --- a/Mage.Sets/src/mage/cards/c/ConsumingBlob.java +++ b/Mage.Sets/src/mage/cards/c/ConsumingBlob.java @@ -3,15 +3,16 @@ package mage.cards.c; import mage.MageInt; import mage.abilities.common.BeginningOfEndStepTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.dynamicvalue.AdditiveDynamicValue; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.CardTypesInGraveyardCount; -import mage.abilities.dynamicvalue.common.StaticValue; import mage.abilities.effects.common.CreateTokenEffect; -import mage.abilities.effects.common.continuous.SetBasePowerToughnessSourceEffect; +import mage.abilities.effects.common.continuous.SetBasePowerToughnessPlusOneSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.*; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.constants.Zone; import mage.game.permanent.token.ConsumingBlobOozeToken; import java.util.UUID; @@ -22,7 +23,6 @@ import java.util.UUID; public final class ConsumingBlob extends CardImpl { private static final DynamicValue powerValue = CardTypesInGraveyardCount.YOU; - private static final DynamicValue toughnessValue = new AdditiveDynamicValue(powerValue, StaticValue.get(1)); public ConsumingBlob(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{G}"); @@ -32,11 +32,7 @@ public final class ConsumingBlob extends CardImpl { this.toughness = new MageInt(1); // Consuming Blob's power is equal to the number of card types among cards in your graveyard and its toughness is equal to that number plus 1. - this.addAbility(new SimpleStaticAbility( - Zone.ALL, - new SetBasePowerToughnessSourceEffect(powerValue, toughnessValue, Duration.EndOfGame, SubLayer.CharacteristicDefining_7a) - .setText("{this}'s power is equal to the number of creature cards in all graveyards and its toughness is equal to that number plus 1") - )); + this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetBasePowerToughnessPlusOneSourceEffect(powerValue))); // At the beginning of your end step, create a green Ooze creature token with "This creature's power is equal to the number of card types among cards in your graveyard and its toughness is equal to that number plus 1". this.addAbility(new BeginningOfEndStepTriggeredAbility( diff --git a/Mage.Sets/src/mage/cards/l/Lhurgoyf.java b/Mage.Sets/src/mage/cards/l/Lhurgoyf.java index da9c3611368..8787c128f77 100644 --- a/Mage.Sets/src/mage/cards/l/Lhurgoyf.java +++ b/Mage.Sets/src/mage/cards/l/Lhurgoyf.java @@ -1,30 +1,26 @@ package mage.cards.l; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.dynamicvalue.AdditiveDynamicValue; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.CardsInAllGraveyardsCount; -import mage.abilities.dynamicvalue.common.StaticValue; -import mage.abilities.effects.common.continuous.SetBasePowerToughnessSourceEffect; +import mage.abilities.effects.common.continuous.SetBasePowerToughnessPlusOneSourceEffect; 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.constants.Zone; import mage.filter.StaticFilters; +import java.util.UUID; + /** * * @author Plopman */ public final class Lhurgoyf extends CardImpl { - private static final DynamicValue powerValue = new CardsInAllGraveyardsCount(StaticFilters.FILTER_CARD_CREATURE); - private static final DynamicValue toughnessValue = new AdditiveDynamicValue(powerValue, StaticValue.get(1)); + private static final DynamicValue powerValue = new CardsInAllGraveyardsCount(StaticFilters.FILTER_CARD_CREATURES); public Lhurgoyf(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); @@ -34,11 +30,7 @@ public final class Lhurgoyf extends CardImpl { this.toughness = new MageInt(0); // Lhurgoyf's power is equal to the number of creature cards in all graveyards and its toughness is equal to that number plus 1. - this.addAbility(new SimpleStaticAbility( - Zone.ALL, - new SetBasePowerToughnessSourceEffect(powerValue, toughnessValue, Duration.EndOfGame, SubLayer.CharacteristicDefining_7a) - .setText("{this}'s power is equal to the number of creature cards in all graveyards and its toughness is equal to that number plus 1") - )); + this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetBasePowerToughnessPlusOneSourceEffect(powerValue))); } private Lhurgoyf(final Lhurgoyf card) { diff --git a/Mage.Sets/src/mage/cards/t/Tarmogoyf.java b/Mage.Sets/src/mage/cards/t/Tarmogoyf.java index 71030665f96..f0d292c4318 100644 --- a/Mage.Sets/src/mage/cards/t/Tarmogoyf.java +++ b/Mage.Sets/src/mage/cards/t/Tarmogoyf.java @@ -2,14 +2,14 @@ package mage.cards.t; import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.dynamicvalue.AdditiveDynamicValue; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.CardTypesInGraveyardCount; -import mage.abilities.dynamicvalue.common.StaticValue; -import mage.abilities.effects.common.continuous.SetBasePowerToughnessSourceEffect; +import mage.abilities.effects.common.continuous.SetBasePowerToughnessPlusOneSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.*; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; import java.util.UUID; @@ -19,7 +19,6 @@ import java.util.UUID; public final class Tarmogoyf extends CardImpl { private static final DynamicValue powerValue = CardTypesInGraveyardCount.ALL; - private static final DynamicValue toughnessValue = new AdditiveDynamicValue(powerValue, StaticValue.get(1)); public Tarmogoyf(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); @@ -29,11 +28,7 @@ public final class Tarmogoyf extends CardImpl { this.toughness = new MageInt(1); // Tarmogoyf's power is equal to the number of card types among cards in all graveyards and its toughness is equal to that number plus 1. - this.addAbility(new SimpleStaticAbility( - Zone.ALL, - new SetBasePowerToughnessSourceEffect(powerValue, toughnessValue, Duration.EndOfGame, SubLayer.CharacteristicDefining_7a) - .setText("{this}'s power is equal to the number of card types among cards in all graveyards and its toughness is equal to that number plus 1") - )); + this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetBasePowerToughnessPlusOneSourceEffect(powerValue))); } private Tarmogoyf(final Tarmogoyf card) { diff --git a/Mage.Sets/src/mage/cards/u/UrborgLhurgoyf.java b/Mage.Sets/src/mage/cards/u/UrborgLhurgoyf.java index cae5121a1da..d25cb2e8fb2 100644 --- a/Mage.Sets/src/mage/cards/u/UrborgLhurgoyf.java +++ b/Mage.Sets/src/mage/cards/u/UrborgLhurgoyf.java @@ -3,17 +3,18 @@ package mage.cards.u; import mage.MageInt; import mage.abilities.common.AsEntersBattlefieldAbility; import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.dynamicvalue.IntPlusDynamicValue; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.MultipliedValue; import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount; import mage.abilities.dynamicvalue.common.MultikickerCount; import mage.abilities.effects.common.MillCardsControllerEffect; -import mage.abilities.effects.common.continuous.SetBasePowerToughnessSourceEffect; +import mage.abilities.effects.common.continuous.SetBasePowerToughnessPlusOneSourceEffect; import mage.abilities.keyword.KickerAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.*; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; import mage.filter.StaticFilters; import java.util.UUID; @@ -23,8 +24,7 @@ import java.util.UUID; */ public final class UrborgLhurgoyf extends CardImpl { - private static final DynamicValue powerValue = new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_CREATURE); - private static final DynamicValue toughnessValue = new IntPlusDynamicValue(1, powerValue); + private static final DynamicValue powerValue = new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_CREATURES); private static final DynamicValue millValue = new MultipliedValue(MultikickerCount.instance, 3); public UrborgLhurgoyf(UUID ownerId, CardSetInfo setInfo) { @@ -43,11 +43,7 @@ public final class UrborgLhurgoyf extends CardImpl { this.addAbility(new AsEntersBattlefieldAbility(new MillCardsControllerEffect(millValue))); // Urborg Lhurgoyf's power is equal to the number of creature cards in your graveyard and its toughness is equal to that number plus 1. - this.addAbility(new SimpleStaticAbility( - Zone.ALL, - new SetBasePowerToughnessSourceEffect(powerValue, toughnessValue, Duration.EndOfGame, SubLayer.CharacteristicDefining_7a) - .setText("{this}'s power is equal to the number of creature cards in your graveyard and its toughness is equal to that number plus 1") - )); + this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetBasePowerToughnessPlusOneSourceEffect(powerValue))); } private UrborgLhurgoyf(final UrborgLhurgoyf card) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/SetBasePowerToughnessPlusOneSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/SetBasePowerToughnessPlusOneSourceEffect.java new file mode 100644 index 00000000000..de6fafeedd8 --- /dev/null +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/SetBasePowerToughnessPlusOneSourceEffect.java @@ -0,0 +1,30 @@ +package mage.abilities.effects.common.continuous; + +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.IntPlusDynamicValue; +import mage.constants.Duration; +import mage.constants.SubLayer; + +/** + * @author xenohedron + */ +public class SetBasePowerToughnessPlusOneSourceEffect extends SetBasePowerToughnessSourceEffect { + + /** + * @param amount Power to set as a characteristic-defining ability; toughness is that value plus 1 + */ + public SetBasePowerToughnessPlusOneSourceEffect(DynamicValue amount) { + super(amount, new IntPlusDynamicValue(1, amount), Duration.EndOfGame, SubLayer.CharacteristicDefining_7a); + this.staticText = "{this}'s power is equal to the number of " + amount.getMessage() + " and its toughness is equal to that number plus 1"; + } + + protected SetBasePowerToughnessPlusOneSourceEffect(final SetBasePowerToughnessPlusOneSourceEffect effect) { + super(effect); + } + + @Override + public SetBasePowerToughnessPlusOneSourceEffect copy() { + return new SetBasePowerToughnessPlusOneSourceEffect(this); + } + +} 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 d95f8b80afc..b11a81cddde 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 @@ -1,4 +1,3 @@ - package mage.abilities.effects.common.continuous; import mage.MageObject; @@ -13,8 +12,6 @@ import mage.constants.SubLayer; import mage.game.Game; /** - * RENAME - * * @author BetaSteward_at_googlemail.com, North, Alex-Vasile, xenohedron */ public class SetBasePowerToughnessSourceEffect extends ContinuousEffectImpl { @@ -72,15 +69,11 @@ public class SetBasePowerToughnessSourceEffect extends ContinuousEffectImpl { discard(); return false; } - if (this.power != null) { - int power = this.power.calculate(game, source, this); - mageObject.getPower().setModifiedBaseValue(power); + mageObject.getPower().setModifiedBaseValue(this.power.calculate(game, source, this)); } - if (this.toughness != null) { - int toughness = this.toughness.calculate(game, source, this); - mageObject.getToughness().setModifiedBaseValue(toughness); + mageObject.getToughness().setModifiedBaseValue(this.toughness.calculate(game, source, this)); } return true; } diff --git a/Mage/src/main/java/mage/game/permanent/token/ConsumingBlobOozeToken.java b/Mage/src/main/java/mage/game/permanent/token/ConsumingBlobOozeToken.java index 6f39c1ed03f..42a7f067a44 100644 --- a/Mage/src/main/java/mage/game/permanent/token/ConsumingBlobOozeToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/ConsumingBlobOozeToken.java @@ -2,12 +2,12 @@ package mage.game.permanent.token; import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.dynamicvalue.AdditiveDynamicValue; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.CardTypesInGraveyardCount; -import mage.abilities.dynamicvalue.common.StaticValue; -import mage.abilities.effects.common.continuous.SetBasePowerToughnessSourceEffect; -import mage.constants.*; +import mage.abilities.effects.common.continuous.SetBasePowerToughnessPlusOneSourceEffect; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; /** * @author ciaccona007 @@ -15,7 +15,6 @@ import mage.constants.*; public final class ConsumingBlobOozeToken extends TokenImpl { private static final DynamicValue powerValue = CardTypesInGraveyardCount.YOU; - private static final DynamicValue toughnessValue = new AdditiveDynamicValue(powerValue, StaticValue.get(1)); public ConsumingBlobOozeToken() { super("Ooze Token", "green Ooze creature token with \"This creature's power is equal to the number of card types among cards in your graveyard and its toughness is equal to that number plus 1.\""); @@ -27,11 +26,7 @@ public final class ConsumingBlobOozeToken extends TokenImpl { toughness = new MageInt(1); // This creature's power is equal to the number of card types among cards in your graveyard and its toughness is equal to that number plus 1. - this.addAbility(new SimpleStaticAbility( - Zone.ALL, - new SetBasePowerToughnessSourceEffect(powerValue, toughnessValue, Duration.EndOfGame, SubLayer.CharacteristicDefining_7a) - .setText("{this}'s power is equal to the number of creature cards in all graveyards and its toughness is equal to that number plus 1") - )); + this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetBasePowerToughnessPlusOneSourceEffect(powerValue))); } private ConsumingBlobOozeToken(final ConsumingBlobOozeToken token) { From 33a859cb68905c41e7b62581dd7b48a90fa4cdac Mon Sep 17 00:00:00 2001 From: xenohedron Date: Sat, 26 Aug 2023 01:01:48 -0400 Subject: [PATCH 03/36] simplify SetBasePowerSourceEffect --- .../src/mage/cards/a/ArniBrokenbrow.java | 5 +-- .../src/mage/cards/c/CraterElemental.java | 6 +-- .../src/mage/cards/e/EvraHalcyonWitness.java | 16 +++----- .../src/mage/cards/r/RiptideMangler.java | 12 +++--- .../continuous/SetBasePowerSourceEffect.java | 39 +++++++------------ 5 files changed, 27 insertions(+), 51 deletions(-) diff --git a/Mage.Sets/src/mage/cards/a/ArniBrokenbrow.java b/Mage.Sets/src/mage/cards/a/ArniBrokenbrow.java index 4941b8742f9..eda3f368e66 100644 --- a/Mage.Sets/src/mage/cards/a/ArniBrokenbrow.java +++ b/Mage.Sets/src/mage/cards/a/ArniBrokenbrow.java @@ -4,9 +4,8 @@ import mage.MageInt; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.dynamicvalue.common.StaticValue; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.continuous.SetBasePowerToughnessSourceEffect; +import mage.abilities.effects.common.continuous.SetBasePowerSourceEffect; import mage.abilities.keyword.BoastAbility; import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; @@ -88,7 +87,7 @@ class ArniBrokenbrowEffect extends OneShotEffect { if (controller.chooseUse(outcome, "Change base power of " + mageObject.getLogName() + " to " + power + " until end of turn?", source, game )) { - game.addEffect(new SetBasePowerToughnessSourceEffect(StaticValue.get(power), null, Duration.EndOfTurn, SubLayer.SetPT_7b), source); + game.addEffect(new SetBasePowerSourceEffect(power, Duration.EndOfTurn), source); return true; } return false; diff --git a/Mage.Sets/src/mage/cards/c/CraterElemental.java b/Mage.Sets/src/mage/cards/c/CraterElemental.java index 1508e44040c..aa0bea29657 100644 --- a/Mage.Sets/src/mage/cards/c/CraterElemental.java +++ b/Mage.Sets/src/mage/cards/c/CraterElemental.java @@ -8,9 +8,8 @@ import mage.abilities.condition.common.FormidableCondition; import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.dynamicvalue.common.StaticValue; import mage.abilities.effects.common.DamageTargetEffect; -import mage.abilities.effects.common.continuous.SetBasePowerToughnessSourceEffect; +import mage.abilities.effects.common.continuous.SetBasePowerSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; @@ -41,8 +40,7 @@ public final class CraterElemental extends CardImpl { // Formidable — {2}{R}: Crater Elemental has base power 8 until end of turn. Activate this ability only if creatures you control have total power 8 or greater. ability = new ActivateIfConditionActivatedAbility( Zone.BATTLEFIELD, - new SetBasePowerToughnessSourceEffect(StaticValue.get(8), null, Duration.EndOfTurn, SubLayer.SetPT_7b) - .setText("{this} has base power 8 until end of turn"), + new SetBasePowerSourceEffect(8, Duration.EndOfTurn), new ManaCostsImpl<>("{2}{R}"), FormidableCondition.instance ); diff --git a/Mage.Sets/src/mage/cards/e/EvraHalcyonWitness.java b/Mage.Sets/src/mage/cards/e/EvraHalcyonWitness.java index a6c0d8ba6c1..244a821c08a 100644 --- a/Mage.Sets/src/mage/cards/e/EvraHalcyonWitness.java +++ b/Mage.Sets/src/mage/cards/e/EvraHalcyonWitness.java @@ -1,28 +1,22 @@ package mage.cards.e; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.dynamicvalue.common.StaticValue; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.continuous.SetBasePowerToughnessSourceEffect; -import mage.constants.SubType; -import mage.constants.SuperType; +import mage.abilities.effects.common.continuous.SetBasePowerSourceEffect; import mage.abilities.keyword.LifelinkAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.SubLayer; -import mage.constants.Zone; +import mage.constants.*; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; +import java.util.UUID; + /** * * @author TheElk801 @@ -88,7 +82,7 @@ class EvraHalcyonWitnessEffect extends OneShotEffect { // For example, say Evra is enchanted with Dub (which makes it 6/6) and your life total is 7. // After the exchange, Evra would be a 9/6 creature (its power became 7, which was then modified by Dub) and your life total would be 6. // (2018-04-27) - game.addEffect(new SetBasePowerToughnessSourceEffect(StaticValue.get(life), null, Duration.Custom, SubLayer.SetPT_7b), source); + game.addEffect(new SetBasePowerSourceEffect(life, Duration.Custom), source); return true; } } diff --git a/Mage.Sets/src/mage/cards/r/RiptideMangler.java b/Mage.Sets/src/mage/cards/r/RiptideMangler.java index 55950bae181..9e3164389d8 100644 --- a/Mage.Sets/src/mage/cards/r/RiptideMangler.java +++ b/Mage.Sets/src/mage/cards/r/RiptideMangler.java @@ -1,25 +1,23 @@ - package mage.cards.r; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.dynamicvalue.common.StaticValue; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.continuous.SetBasePowerToughnessSourceEffect; -import mage.constants.SubType; +import mage.abilities.effects.common.continuous.SetBasePowerSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.Outcome; -import mage.constants.SubLayer; +import mage.constants.SubType; import mage.game.Game; import mage.game.permanent.Permanent; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author TheElk801 @@ -71,7 +69,7 @@ class RiptideManglerEffect extends OneShotEffect { if (permanent == null) { return false; } - game.addEffect(new SetBasePowerToughnessSourceEffect(StaticValue.get(permanent.getPower().getValue()), null, Duration.WhileOnBattlefield, SubLayer.SetPT_7b), source); + game.addEffect(new SetBasePowerSourceEffect(permanent.getPower().getValue(), Duration.WhileOnBattlefield), source); return true; } } diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/SetBasePowerSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/SetBasePowerSourceEffect.java index 43c3b08c40c..65b1e247033 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/SetBasePowerSourceEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/SetBasePowerSourceEffect.java @@ -1,36 +1,34 @@ - package mage.abilities.effects.common.continuous; -import mage.MageObject; -import mage.abilities.Ability; import mage.abilities.dynamicvalue.DynamicValue; -import mage.abilities.effects.ContinuousEffectImpl; +import mage.abilities.dynamicvalue.common.StaticValue; import mage.constants.Duration; -import mage.constants.Layer; -import mage.constants.Outcome; import mage.constants.SubLayer; -import mage.game.Game; /** - * @author LevelX2 + * @author xenohedron */ -public class SetBasePowerSourceEffect extends ContinuousEffectImpl { - - private final DynamicValue amount; +public class SetBasePowerSourceEffect extends SetBasePowerToughnessSourceEffect { /** * @param amount Power to set as a characteristic-defining ability */ public SetBasePowerSourceEffect(DynamicValue amount) { - super(Duration.EndOfGame, Layer.PTChangingEffects_7, SubLayer.CharacteristicDefining_7a, Outcome.BoostCreature); - setCharacterDefining(true); - this.amount = amount; + super(amount, null, Duration.EndOfGame, SubLayer.CharacteristicDefining_7a); staticText = "{this}'s power is equal to the number of " + amount.getMessage(); } + /** + * @param amount Power to set in layer 7b + * @param duration Duration for the effect + */ + public SetBasePowerSourceEffect(int amount, Duration duration) { + super(StaticValue.get(amount), null, duration, SubLayer.SetPT_7b); + staticText = "{this} has base power " + amount + ' ' + duration.toString(); + } + protected SetBasePowerSourceEffect(final SetBasePowerSourceEffect effect) { super(effect); - this.amount = effect.amount; } @Override @@ -38,15 +36,4 @@ public class SetBasePowerSourceEffect extends ContinuousEffectImpl { return new SetBasePowerSourceEffect(this); } - @Override - public boolean apply(Game game, Ability source) { - MageObject mageObject = game.getObject(source); - if (mageObject == null) { - return false; - } - int value = amount.calculate(game, source, this); - mageObject.getPower().setModifiedBaseValue(value); - return true; - } - } From ab0abcfd2258ed49a0a4f858915ace706e581dcb Mon Sep 17 00:00:00 2001 From: xenohedron Date: Sat, 26 Aug 2023 01:06:56 -0400 Subject: [PATCH 04/36] simplify SetBaseToughnessSourceEffect fix Duration.WhileOnBattlefield -> Duration.Custom in some effects --- Mage.Sets/src/mage/cards/s/Sentinel.java | 5 +-- .../src/mage/cards/t/TreeOfPerdition.java | 14 ++----- .../src/mage/cards/t/TreeOfRedemption.java | 7 +--- .../src/mage/cards/w/WallOfTombstones.java | 5 +-- .../SetBaseToughnessSourceEffect.java | 41 ++++++------------- 5 files changed, 23 insertions(+), 49 deletions(-) diff --git a/Mage.Sets/src/mage/cards/s/Sentinel.java b/Mage.Sets/src/mage/cards/s/Sentinel.java index 0a7df439e21..a76c0cdb24b 100644 --- a/Mage.Sets/src/mage/cards/s/Sentinel.java +++ b/Mage.Sets/src/mage/cards/s/Sentinel.java @@ -4,9 +4,8 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.dynamicvalue.common.StaticValue; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.continuous.SetBasePowerToughnessSourceEffect; +import mage.abilities.effects.common.continuous.SetBaseToughnessSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; @@ -77,7 +76,7 @@ class SentinelEffect extends OneShotEffect { Permanent targetPermanent = getTargetPointer().getFirstTargetPermanentOrLKI(game, source); if (controller != null && targetPermanent != null) { int newToughness = CardUtil.overflowInc(targetPermanent.getPower().getValue(), 1); - game.addEffect(new SetBasePowerToughnessSourceEffect(null, StaticValue.get(newToughness), Duration.WhileOnBattlefield, SubLayer.SetPT_7b), source); + game.addEffect(new SetBaseToughnessSourceEffect(newToughness, Duration.WhileOnBattlefield), source); return true; } return false; diff --git a/Mage.Sets/src/mage/cards/t/TreeOfPerdition.java b/Mage.Sets/src/mage/cards/t/TreeOfPerdition.java index be473c5011d..b478a50c00c 100644 --- a/Mage.Sets/src/mage/cards/t/TreeOfPerdition.java +++ b/Mage.Sets/src/mage/cards/t/TreeOfPerdition.java @@ -1,16 +1,11 @@ - package mage.cards.t; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.dynamicvalue.common.StaticValue; -import mage.abilities.effects.ContinuousEffect; -import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.continuous.SetBasePowerToughnessTargetEffect; +import mage.abilities.effects.common.continuous.SetBaseToughnessSourceEffect; import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -19,7 +14,8 @@ import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.common.TargetOpponent; -import mage.target.targetpointer.FixedTarget; + +import java.util.UUID; /** * @@ -88,9 +84,7 @@ class TreeOfPerditionEffect extends OneShotEffect { // For example, say Tree of Perdition is equipped with Cultist’s Staff (which makes it 2/15) and the player’s life total is 7. // After the exchange, Tree of Perdition would be a 2/9 creature (its toughness became 7, which was then modified by Cultist’s Staff) and the player’s life total would be 15. // (2016-07-13) - ContinuousEffect powerToughnessEffect = new SetBasePowerToughnessTargetEffect(null, StaticValue.get(life), Duration.Custom); - powerToughnessEffect.setTargetPointer(new FixedTarget(perm.getId())); - game.addEffect(powerToughnessEffect, source); + game.addEffect(new SetBaseToughnessSourceEffect(life, Duration.Custom), source); return true; } diff --git a/Mage.Sets/src/mage/cards/t/TreeOfRedemption.java b/Mage.Sets/src/mage/cards/t/TreeOfRedemption.java index ee93f9e21c1..aefc01504ac 100644 --- a/Mage.Sets/src/mage/cards/t/TreeOfRedemption.java +++ b/Mage.Sets/src/mage/cards/t/TreeOfRedemption.java @@ -1,13 +1,11 @@ - package mage.cards.t; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; -import mage.abilities.dynamicvalue.common.StaticValue; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.continuous.SetBasePowerToughnessSourceEffect; +import mage.abilities.effects.common.continuous.SetBaseToughnessSourceEffect; import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -65,7 +63,6 @@ class TreeOfRedemptionEffect extends OneShotEffect { return false; } - int amount = perm.getToughness().getValue(); int life = player.getLife(); if (life == amount) { @@ -78,7 +75,7 @@ class TreeOfRedemptionEffect extends OneShotEffect { return false; } player.setLife(amount, game, source); - game.addEffect(new SetBasePowerToughnessSourceEffect(null, StaticValue.get(life), Duration.WhileOnBattlefield, SubLayer.SetPT_7b), source); + game.addEffect(new SetBaseToughnessSourceEffect(life, Duration.Custom), source); return true; } diff --git a/Mage.Sets/src/mage/cards/w/WallOfTombstones.java b/Mage.Sets/src/mage/cards/w/WallOfTombstones.java index 2114624b09a..51ab1d0c411 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfTombstones.java +++ b/Mage.Sets/src/mage/cards/w/WallOfTombstones.java @@ -4,9 +4,8 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount; -import mage.abilities.dynamicvalue.common.StaticValue; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.continuous.SetBasePowerToughnessSourceEffect; +import mage.abilities.effects.common.continuous.SetBaseToughnessSourceEffect; import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -65,7 +64,7 @@ class WallOfTombstonesEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { int newToughness = CardUtil.overflowInc(1, new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_CREATURE).calculate(game, source, this)); - game.addEffect(new SetBasePowerToughnessSourceEffect(null, StaticValue.get(newToughness), Duration.WhileOnBattlefield, SubLayer.SetPT_7b), source); + game.addEffect(new SetBaseToughnessSourceEffect(newToughness, Duration.WhileOnBattlefield), source); return true; } } diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/SetBaseToughnessSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/SetBaseToughnessSourceEffect.java index cbe57b62c56..f203194bd1d 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/SetBaseToughnessSourceEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/SetBaseToughnessSourceEffect.java @@ -1,38 +1,34 @@ - package mage.abilities.effects.common.continuous; -import mage.MageObject; -import mage.abilities.Ability; import mage.abilities.dynamicvalue.DynamicValue; -import mage.abilities.effects.ContinuousEffectImpl; +import mage.abilities.dynamicvalue.common.StaticValue; import mage.constants.Duration; -import mage.constants.Layer; -import mage.constants.Outcome; import mage.constants.SubLayer; -import mage.game.Game; /** - * RENAME - * - * @author Backfir3, noxx + * @author xenohedron */ -public class SetBaseToughnessSourceEffect extends ContinuousEffectImpl { - - private final DynamicValue amount; +public class SetBaseToughnessSourceEffect extends SetBasePowerToughnessSourceEffect { /** * @param amount Toughness to set as a characteristic-defining ability */ public SetBaseToughnessSourceEffect(DynamicValue amount) { - super(Duration.EndOfGame, Layer.PTChangingEffects_7, SubLayer.CharacteristicDefining_7a, Outcome.BoostCreature); - setCharacterDefining(true); - this.amount = amount; + super(null, amount, Duration.EndOfGame, SubLayer.CharacteristicDefining_7a); staticText = "{this}'s toughness is equal to the number of " + amount.getMessage(); } + /** + * @param amount Toughness to set in layer 7b + * @param duration Duration for the effect + */ + public SetBaseToughnessSourceEffect(int amount, Duration duration) { + super(null, StaticValue.get(amount), duration, SubLayer.SetPT_7b); + staticText = "{this} has base toughness " + amount + ' ' + duration.toString(); + } + protected SetBaseToughnessSourceEffect(final SetBaseToughnessSourceEffect effect) { super(effect); - this.amount = effect.amount; } @Override @@ -40,15 +36,4 @@ public class SetBaseToughnessSourceEffect extends ContinuousEffectImpl { return new SetBaseToughnessSourceEffect(this); } - @Override - public boolean apply(Game game, Ability source) { - MageObject mageObject = game.getObject(source); - if (mageObject != null) { - int value = amount.calculate(game, source, this); - mageObject.getToughness().setModifiedBaseValue(value); - return true; - } - return false; - } - } From 2eab7836f66169588e3c16a9b213780d23d63011 Mon Sep 17 00:00:00 2001 From: xenohedron Date: Sat, 26 Aug 2023 01:22:49 -0400 Subject: [PATCH 05/36] cleanup SetBasePowerToughnessSourceEffect usages --- .../src/mage/cards/b/BramblefortFink.java | 4 +--- Mage.Sets/src/mage/cards/c/ChimericMass.java | 2 +- Mage.Sets/src/mage/cards/d/DruidClass.java | 2 +- .../src/mage/cards/e/EntropicSpecter.java | 5 +---- Mage.Sets/src/mage/cards/g/Gigantoplasm.java | 6 +----- .../src/mage/cards/m/MinionOfTheWastes.java | 2 +- Mage.Sets/src/mage/cards/m/MythRealized.java | 3 ++- .../mage/cards/s/SvogthosTheRestlessTomb.java | 2 +- .../src/mage/cards/t/TestamentOfFaith.java | 2 +- .../SetBasePowerToughnessSourceEffect.java | 21 +++++++++++++++---- 10 files changed, 27 insertions(+), 22 deletions(-) diff --git a/Mage.Sets/src/mage/cards/b/BramblefortFink.java b/Mage.Sets/src/mage/cards/b/BramblefortFink.java index c7f7eca5764..dfb393b5f22 100644 --- a/Mage.Sets/src/mage/cards/b/BramblefortFink.java +++ b/Mage.Sets/src/mage/cards/b/BramblefortFink.java @@ -33,9 +33,7 @@ public final class BramblefortFink extends CardImpl { // {8}: Bramblefort Fink has base power and toughness 10/10 until end of turn. Activate this ability only if you control an Oko planeswalker. this.addAbility(new ActivateIfConditionActivatedAbility( Zone.BATTLEFIELD, - new SetBasePowerToughnessSourceEffect( - 10, 10, Duration.EndOfTurn - ).setText("{this} has base power and toughness 10/10 until end of turn"), + new SetBasePowerToughnessSourceEffect(10, 10, Duration.EndOfTurn), new GenericManaCost(8), condition)); } diff --git a/Mage.Sets/src/mage/cards/c/ChimericMass.java b/Mage.Sets/src/mage/cards/c/ChimericMass.java index 9774cf47941..76aabe80a40 100644 --- a/Mage.Sets/src/mage/cards/c/ChimericMass.java +++ b/Mage.Sets/src/mage/cards/c/ChimericMass.java @@ -34,7 +34,7 @@ public final class ChimericMass extends CardImpl { new CreatureToken(0, 0, "Construct artifact creature with \"This creature's power and toughness are each equal to the number of charge counters on it.\"") .withType(CardType.ARTIFACT) .withSubType(SubType.CONSTRUCT) - .withAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SetBasePowerToughnessSourceEffect(count, count, Duration.WhileOnBattlefield, SubLayer.SetPT_7b))), + .withAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SetBasePowerToughnessSourceEffect(count, Duration.WhileOnBattlefield))), CardType.ARTIFACT, Duration.EndOfTurn).withDurationRuleAtStart(true), new GenericManaCost(1))); } diff --git a/Mage.Sets/src/mage/cards/d/DruidClass.java b/Mage.Sets/src/mage/cards/d/DruidClass.java index 04c24492394..48a54994abf 100644 --- a/Mage.Sets/src/mage/cards/d/DruidClass.java +++ b/Mage.Sets/src/mage/cards/d/DruidClass.java @@ -78,7 +78,7 @@ class DruidClassToken extends TokenImpl { this.addAbility(HasteAbility.getInstance()); this.addAbility(new SimpleStaticAbility(new SetBasePowerToughnessSourceEffect( - LandsYouControlCount.instance, LandsYouControlCount.instance, Duration.EndOfGame, SubLayer.SetPT_7b + LandsYouControlCount.instance, Duration.EndOfGame ).setText("this creature's power and toughness are each equal to the number of lands you control"))); } diff --git a/Mage.Sets/src/mage/cards/e/EntropicSpecter.java b/Mage.Sets/src/mage/cards/e/EntropicSpecter.java index 8814a842773..747ea0ef1c6 100644 --- a/Mage.Sets/src/mage/cards/e/EntropicSpecter.java +++ b/Mage.Sets/src/mage/cards/e/EntropicSpecter.java @@ -1,4 +1,3 @@ - package mage.cards.e; import mage.MageInt; @@ -42,9 +41,7 @@ public final class EntropicSpecter extends CardImpl { // Entropic Specter's power and toughness are each equal to the number of cards in the chosen player's hand. this.addAbility(new SimpleStaticAbility(Zone.ALL, // back to the graveyard or if the chosen player left the game it's again a 0/0 - new SetBasePowerToughnessSourceEffect(CardsInTargetPlayerHandCount.instance, CardsInTargetPlayerHandCount.instance, - Duration.WhileOnBattlefield, SubLayer.SetPT_7b) - .setText("{this}'s power and toughness are each equal to the number of cards in the chosen player's hand"))); + new SetBasePowerToughnessSourceEffect(CardsInTargetPlayerHandCount.instance, Duration.WhileOnBattlefield))); // Whenever Entropic Specter deals damage to a player, that player discards a card. this.addAbility(new DealsDamageToAPlayerTriggeredAbility(new DiscardTargetEffect(1, false), false, true)); diff --git a/Mage.Sets/src/mage/cards/g/Gigantoplasm.java b/Mage.Sets/src/mage/cards/g/Gigantoplasm.java index 485f95d4f93..c7e57502f06 100644 --- a/Mage.Sets/src/mage/cards/g/Gigantoplasm.java +++ b/Mage.Sets/src/mage/cards/g/Gigantoplasm.java @@ -1,4 +1,3 @@ - package mage.cards.g; import java.util.UUID; @@ -8,7 +7,6 @@ import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.ManacostVariableValue; import mage.abilities.effects.Effect; import mage.abilities.effects.common.CopyPermanentEffect; @@ -18,7 +16,6 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Duration; -import mage.constants.SubLayer; import mage.constants.Zone; import mage.filter.StaticFilters; import mage.game.Game; @@ -56,8 +53,7 @@ class GigantoplasmCopyApplier extends CopyApplier { @Override public boolean apply(Game game, MageObject blueprint, Ability source, UUID copyToObjectId) { - DynamicValue variableMana = ManacostVariableValue.REGULAR; - Effect effect = new SetBasePowerToughnessSourceEffect(variableMana, variableMana, Duration.WhileOnBattlefield, SubLayer.SetPT_7b); + Effect effect = new SetBasePowerToughnessSourceEffect(ManacostVariableValue.REGULAR, Duration.WhileOnBattlefield); effect.setText("This creature has base power and toughness X/X"); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{X}")); blueprint.getAbilities().add(ability); diff --git a/Mage.Sets/src/mage/cards/m/MinionOfTheWastes.java b/Mage.Sets/src/mage/cards/m/MinionOfTheWastes.java index 1f621495cb3..159d5b78b4d 100644 --- a/Mage.Sets/src/mage/cards/m/MinionOfTheWastes.java +++ b/Mage.Sets/src/mage/cards/m/MinionOfTheWastes.java @@ -35,7 +35,7 @@ public final class MinionOfTheWastes extends CardImpl { // Trample this.addAbility(TrampleAbility.getInstance()); - // As Minion of the Wastes enters the battlefield, pay any amount of life. The amount you pay can't be more than the total number of white nontoken permanents your opponents control plus the total number of white cards in their graveyards. + // As Minion of the Wastes enters the battlefield, pay any amount of life. this.addAbility(new AsEntersBattlefieldAbility(new MinionOfTheWastesEffect())); // Minion of the Wastes's power and toughness are each equal to the life paid as it entered the battlefield. diff --git a/Mage.Sets/src/mage/cards/m/MythRealized.java b/Mage.Sets/src/mage/cards/m/MythRealized.java index c87dd76f304..430e3df8fa4 100644 --- a/Mage.Sets/src/mage/cards/m/MythRealized.java +++ b/Mage.Sets/src/mage/cards/m/MythRealized.java @@ -40,7 +40,8 @@ public final class MythRealized extends CardImpl { // {W}: Until end of turn, Myth Realized becomes a Monk Avatar creature in addition to its other types and gains "This creature's power and toughness are each equal to the number of lore counters on it." Effect effect = new BecomesCreatureSourceEffect(new MythRealizedToken(), CardType.ENCHANTMENT, Duration.EndOfTurn).withDurationRuleAtStart(true); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{W}")); - ability.addEffect(new SetBasePowerToughnessSourceEffect(loreCounterCount, loreCounterCount, Duration.EndOfTurn, SubLayer.SetPT_7b).setText("and gains \"This creature's power and toughness are each equal to the number of lore counters on it.\"")); + ability.addEffect(new SetBasePowerToughnessSourceEffect(loreCounterCount, Duration.EndOfTurn) + .setText("and gains \"This creature's power and toughness are each equal to the number of lore counters on it.\"")); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SvogthosTheRestlessTomb.java b/Mage.Sets/src/mage/cards/s/SvogthosTheRestlessTomb.java index 59d9ca960d2..7d369e51159 100644 --- a/Mage.Sets/src/mage/cards/s/SvogthosTheRestlessTomb.java +++ b/Mage.Sets/src/mage/cards/s/SvogthosTheRestlessTomb.java @@ -55,7 +55,7 @@ class SvogthosToken extends TokenImpl { power = new MageInt(0); toughness = new MageInt(0); CardsInControllerGraveyardCount count = new CardsInControllerGraveyardCount(new FilterCreatureCard("creature cards")); - this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetBasePowerToughnessSourceEffect(count, count, Duration.WhileOnBattlefield, SubLayer.SetPT_7b))); + this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetBasePowerToughnessSourceEffect(count, Duration.WhileOnBattlefield))); } public SvogthosToken(final SvogthosToken token) { super(token); diff --git a/Mage.Sets/src/mage/cards/t/TestamentOfFaith.java b/Mage.Sets/src/mage/cards/t/TestamentOfFaith.java index 38010f817b0..e51181c82e0 100644 --- a/Mage.Sets/src/mage/cards/t/TestamentOfFaith.java +++ b/Mage.Sets/src/mage/cards/t/TestamentOfFaith.java @@ -27,7 +27,7 @@ public final class TestamentOfFaith extends CardImpl { // {X}: Testament of Faith becomes an X/X Wall creature with defender in addition to its other types until end of turn. Ability ability = new SimpleActivatedAbility(new SetBasePowerToughnessSourceEffect( - ManacostVariableValue.REGULAR, ManacostVariableValue.REGULAR, Duration.EndOfTurn, SubLayer.SetPT_7b + ManacostVariableValue.REGULAR, Duration.EndOfTurn ).setText("{this} becomes an X/X"), new VariableManaCost(VariableCostType.NORMAL)); ability.addEffect(new TestamentOfFaithEffect()); ability.addEffect(new GainAbilitySourceEffect( 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 b11a81cddde..72eed3ff1a8 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 @@ -20,11 +20,11 @@ public class SetBasePowerToughnessSourceEffect extends ContinuousEffectImpl { private final DynamicValue toughness; /** - * Note: Need to set text manually if calling this constructor directly. - *

- * It is possible to have power or toughness to null, in which case only the other is modified. + * This constructor is called by the other more specific constructors which set text for appropriate usages. + * @param power can be null, if only toughness is to be modified + * @param toughness can be null, if only power is to be modified */ - public SetBasePowerToughnessSourceEffect(DynamicValue power, DynamicValue toughness, Duration duration, SubLayer subLayer) { + protected SetBasePowerToughnessSourceEffect(DynamicValue power, DynamicValue toughness, Duration duration, SubLayer subLayer) { super(duration, Layer.PTChangingEffects_7, subLayer, Outcome.BoostCreature); setCharacterDefining(subLayer == SubLayer.CharacteristicDefining_7a); this.power = power; @@ -39,6 +39,19 @@ public class SetBasePowerToughnessSourceEffect extends ContinuousEffectImpl { this.staticText = "{this}'s power and toughness are each equal to the number of " + amount.getMessage(); } + /** + * @param amount Power and toughness to set in layer 7b + * @param duration Duration for the effect + */ + public SetBasePowerToughnessSourceEffect(DynamicValue amount, Duration duration) { + this(amount, amount, duration, SubLayer.SetPT_7b); + if (duration.toString().isEmpty()) { + staticText = "{this}'s power and toughness are each equal to the number of " + amount.getMessage(); + } else { + staticText = "{this} has base power and toughness each equal to the number of " + amount.getMessage() + " " + duration; + } + } + 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(); From 76eb8882b0c1485b8c91e122cb509ec4cb81bb01 Mon Sep 17 00:00:00 2001 From: xenohedron Date: Sun, 27 Aug 2023 00:06:13 -0400 Subject: [PATCH 06/36] fix some Duration.WhileOnBattlefield -> Duration.Custom --- Mage.Sets/src/mage/cards/a/AscendantSpirit.java | 2 +- Mage.Sets/src/mage/cards/e/ElvishImpersonators.java | 2 +- Mage.Sets/src/mage/cards/g/Gigantoplasm.java | 2 +- Mage.Sets/src/mage/cards/r/RiptideMangler.java | 2 +- Mage.Sets/src/mage/cards/s/Sentinel.java | 2 +- Mage.Sets/src/mage/cards/w/WallOfTombstones.java | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Mage.Sets/src/mage/cards/a/AscendantSpirit.java b/Mage.Sets/src/mage/cards/a/AscendantSpirit.java index c70ec869315..1276c73dbf7 100644 --- a/Mage.Sets/src/mage/cards/a/AscendantSpirit.java +++ b/Mage.Sets/src/mage/cards/a/AscendantSpirit.java @@ -39,7 +39,7 @@ public final class AscendantSpirit extends CardImpl { ability.addEffect(new SetBasePowerToughnessSourceEffect( 2, 3, - Duration.WhileOnBattlefield + Duration.Custom ).setText("with base power and toughness 2/3")); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/e/ElvishImpersonators.java b/Mage.Sets/src/mage/cards/e/ElvishImpersonators.java index 7270a5e6b39..1d86986889f 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), source); + game.addEffect(new SetBasePowerToughnessSourceEffect(firstRoll, secondRoll, Duration.Custom), source); return true; } } diff --git a/Mage.Sets/src/mage/cards/g/Gigantoplasm.java b/Mage.Sets/src/mage/cards/g/Gigantoplasm.java index c7e57502f06..185895b6cfc 100644 --- a/Mage.Sets/src/mage/cards/g/Gigantoplasm.java +++ b/Mage.Sets/src/mage/cards/g/Gigantoplasm.java @@ -53,7 +53,7 @@ class GigantoplasmCopyApplier extends CopyApplier { @Override public boolean apply(Game game, MageObject blueprint, Ability source, UUID copyToObjectId) { - Effect effect = new SetBasePowerToughnessSourceEffect(ManacostVariableValue.REGULAR, Duration.WhileOnBattlefield); + Effect effect = new SetBasePowerToughnessSourceEffect(ManacostVariableValue.REGULAR, Duration.Custom); effect.setText("This creature has base power and toughness X/X"); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl<>("{X}")); blueprint.getAbilities().add(ability); diff --git a/Mage.Sets/src/mage/cards/r/RiptideMangler.java b/Mage.Sets/src/mage/cards/r/RiptideMangler.java index 9e3164389d8..943f2c3046f 100644 --- a/Mage.Sets/src/mage/cards/r/RiptideMangler.java +++ b/Mage.Sets/src/mage/cards/r/RiptideMangler.java @@ -69,7 +69,7 @@ class RiptideManglerEffect extends OneShotEffect { if (permanent == null) { return false; } - game.addEffect(new SetBasePowerSourceEffect(permanent.getPower().getValue(), Duration.WhileOnBattlefield), source); + game.addEffect(new SetBasePowerSourceEffect(permanent.getPower().getValue(), Duration.Custom), source); return true; } } diff --git a/Mage.Sets/src/mage/cards/s/Sentinel.java b/Mage.Sets/src/mage/cards/s/Sentinel.java index a76c0cdb24b..7d4bb421f18 100644 --- a/Mage.Sets/src/mage/cards/s/Sentinel.java +++ b/Mage.Sets/src/mage/cards/s/Sentinel.java @@ -76,7 +76,7 @@ class SentinelEffect extends OneShotEffect { Permanent targetPermanent = getTargetPointer().getFirstTargetPermanentOrLKI(game, source); if (controller != null && targetPermanent != null) { int newToughness = CardUtil.overflowInc(targetPermanent.getPower().getValue(), 1); - game.addEffect(new SetBaseToughnessSourceEffect(newToughness, Duration.WhileOnBattlefield), source); + game.addEffect(new SetBaseToughnessSourceEffect(newToughness, Duration.Custom), source); return true; } return false; diff --git a/Mage.Sets/src/mage/cards/w/WallOfTombstones.java b/Mage.Sets/src/mage/cards/w/WallOfTombstones.java index 51ab1d0c411..865ba548cc1 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfTombstones.java +++ b/Mage.Sets/src/mage/cards/w/WallOfTombstones.java @@ -64,7 +64,7 @@ class WallOfTombstonesEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { int newToughness = CardUtil.overflowInc(1, new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_CREATURE).calculate(game, source, this)); - game.addEffect(new SetBaseToughnessSourceEffect(newToughness, Duration.WhileOnBattlefield), source); + game.addEffect(new SetBaseToughnessSourceEffect(newToughness, Duration.Custom), source); return true; } } From f72f88cb3502e9c7d757d4d6c7dde0a2ab232282 Mon Sep 17 00:00:00 2001 From: xenohedron Date: Sun, 23 Jul 2023 19:09:14 -0400 Subject: [PATCH 07/36] tests for Primal Clay and friends (current implementation is workaround) --- .../entersBattlefield/PrimalClayTest.java | 287 ++++++++++++++++++ 1 file changed, 287 insertions(+) create mode 100644 Mage.Tests/src/test/java/org/mage/test/cards/replacement/entersBattlefield/PrimalClayTest.java diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/replacement/entersBattlefield/PrimalClayTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/replacement/entersBattlefield/PrimalClayTest.java new file mode 100644 index 00000000000..5a7851df73e --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/replacement/entersBattlefield/PrimalClayTest.java @@ -0,0 +1,287 @@ +package org.mage.test.cards.replacement.entersBattlefield; + +import mage.abilities.keyword.DefenderAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.HasteAbility; +import mage.constants.PhaseStep; +import mage.constants.SubType; +import mage.constants.Zone; +import org.junit.Ignore; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * @author xenohedron + */ +public class PrimalClayTest extends CardTestPlayerBase { + + private static final String clay = "Primal Clay"; + // As Primal Clay enters the battlefield, it becomes your choice of a 3/3 artifact creature, a 2/2 artifact creature + // with flying, or a 1/6 Wall artifact creature with defender in addition to its other types. + private static final String plasma = "Primal Plasma"; + // As Primal Plasma enters the battlefield, it becomes your choice of a 3/3 creature, a 2/2 creature with flying, + // or a 1/6 creature with defender. + private static final String sentry = "Molten Sentry"; + // As Molten Sentry enters the battlefield, flip a coin. If the coin comes up heads, Molten Sentry enters the battlefield + // as a 5/2 creature with haste. If it comes up tails, Molten Sentry enters the battlefield as a 2/5 creature with defender. + private static final String aquamorph = "Aquamorph Entity"; + // As Aquamorph Entity enters the battlefield or is turned face up, it becomes your choice of 5/1 or 1/5. + private static final String tunnel = "Tunnel"; + // Destroy target Wall. It can't be regenerated. + private static final String clone = "Clone"; + // You may have Clone enter the battlefield as a copy of any creature on the battlefield. + private static final String cryptoplasm = "Cryptoplasm"; + // At the beginning of your upkeep, you may have Cryptoplasm become a copy of another target creature, except it has this ability. + private static final String cloudshift = "Cloudshift"; + // Exile target creature you control, then return that card to the battlefield under your control. + + @Test + public void testClayPTSet() { + addCard(Zone.HAND, playerA, clay); + addCard(Zone.BATTLEFIELD, playerA, "Island", 4); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, clay); + setChoice(playerA, "a 3/3 artifact creature"); + + setStrictChooseMode(true); + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertPowerToughness(playerA, clay, 3, 3); + } + + @Test + public void testClayAbilityGained() { + addCard(Zone.HAND, playerA, clay); + addCard(Zone.BATTLEFIELD, playerA, "Island", 4); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, clay); + setChoice(playerA, "a 2/2 artifact creature with flying"); + + setStrictChooseMode(true); + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertPowerToughness(playerA, clay, 2, 2); + assertAbility(playerA, clay, FlyingAbility.getInstance(), true); + } + + @Test + @Ignore("current workaround implementation doesn't account for this") + public void testClaySubtypeGained() { + addCard(Zone.HAND, playerA, clay); + addCard(Zone.BATTLEFIELD, playerA, "Island", 4); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, clay); + setChoice(playerA, "a 1/6 Wall artifact creature with defender"); + + setStrictChooseMode(true); + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertPowerToughness(playerA, clay, 1, 6); + assertAbility(playerA, clay, DefenderAbility.getInstance(), true); + assertSubtype(clay, SubType.WALL); + } + + @Test + public void testClayCopyPTOnBattlefield() { + addCard(Zone.HAND, playerA, clay); + addCard(Zone.HAND, playerA, cryptoplasm); + addCard(Zone.BATTLEFIELD, playerA, "Island", 7); + addCard(Zone.BATTLEFIELD, playerB, "Plains", 3); + addCard(Zone.HAND, playerB, "The Battle of Bywater", 1); + // Destroy all creatures with power 3 or greater. Then create a Food token for each creature you control. + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, clay); + setChoice(playerA, "a 3/3 artifact creature"); + waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN); + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, cryptoplasm); + + // cryptoplasm trigger at next upkeep + setChoice(playerA, true); // whether to copy + addTarget(playerA, clay); // what to copy + + castSpell(4, PhaseStep.PRECOMBAT_MAIN, playerB, "The Battle of Bywater"); + // since cryptoplasm now a 3/3, both are destroyed + + setStrictChooseMode(true); + setStopAt(4, PhaseStep.POSTCOMBAT_MAIN); + execute(); + + assertGraveyardCount(playerA, clay, 1); + assertGraveyardCount(playerA, cryptoplasm, 1); + } + + @Ignore("Chosen characteristics of Primal Clay should be copiable values") + @Test + public void testClayCopySubtypeOnBattlefield() { + addCard(Zone.HAND, playerA, clay); + addCard(Zone.HAND, playerA, cryptoplasm); + addCard(Zone.BATTLEFIELD, playerA, "Island", 7); + addCard(Zone.HAND, playerB, tunnel, 2); + addCard(Zone.BATTLEFIELD, playerB, "Mountain", 2); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, clay); + setChoice(playerA, "a 1/6 Wall artifact creature with defender"); + waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN); + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, cryptoplasm); + + // cryptoplasm trigger at next upkeep + setChoice(playerA, true); // whether to copy + addTarget(playerA, clay); // what to copy + + castSpell(3, PhaseStep.PRECOMBAT_MAIN, playerB, tunnel, clay); + waitStackResolved(3, PhaseStep.PRECOMBAT_MAIN); + castSpell(3, PhaseStep.PRECOMBAT_MAIN, playerB, tunnel, clay); + + setStrictChooseMode(true); + setStopAt(3, PhaseStep.BEGIN_COMBAT); + execute(); + + assertGraveyardCount(playerA, clay, 1); + assertGraveyardCount(playerA, cryptoplasm, 1); + } + + @Test + public void testPlasmaClone() { + addCard(Zone.HAND, playerA, plasma); + addCard(Zone.BATTLEFIELD, playerA, "Island", 4); + addCard(Zone.HAND, playerB, clone); + addCard(Zone.BATTLEFIELD, playerB, "Island", 4); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, plasma); + setChoice(playerA, "a 1/6 creature with defender"); + + castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, clone); + setChoice(playerB, true); // whether to copy + setChoice(playerB, plasma); // what to copy + setChoice(playerB, "a 2/2 creature with flying"); // new choice as ETB + + setStrictChooseMode(true); + setStopAt(2, PhaseStep.BEGIN_COMBAT); + execute(); + + assertPowerToughness(playerA, plasma, 1, 6); + assertPowerToughness(playerB, plasma, 2, 2); + assertAbility(playerB, plasma, FlyingAbility.getInstance(), true); + //assertAbility(playerB, plasma, DefenderAbility.getInstance(), true); TODO: this is a copiable value + } + + @Test + public void testMoltenSentryClone() { + addCard(Zone.HAND, playerA, sentry); + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 4); + addCard(Zone.HAND, playerB, clone); + addCard(Zone.BATTLEFIELD, playerB, "Island", 4); + + setFlipCoinResult(playerA, true); + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, sentry); + + castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, clone); + setChoice(playerB, true); // whether to copy + setFlipCoinResult(playerB, false); + setChoice(playerB, sentry); // what to copy + + setStrictChooseMode(true); + setStopAt(2, PhaseStep.BEGIN_COMBAT); + execute(); + + assertPowerToughness(playerA, sentry, 5, 2); + assertAbility(playerA, sentry, HasteAbility.getInstance(), true); + assertPowerToughness(playerB, sentry, 2, 5); + assertAbility(playerB, sentry, DefenderAbility.getInstance(), true); + } + + @Test + public void testAquamorphEntityETB() { + addCard(Zone.HAND, playerA, aquamorph); + addCard(Zone.BATTLEFIELD, playerA, "Island", 4); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, aquamorph); + setChoice(playerA, false); // not using morph + setChoice(playerA, "a 5/1 creature"); + + setStrictChooseMode(true); + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertPowerToughness(playerA, aquamorph, 5, 1); + } + + @Test + public void testAquamorphEntityUnmorph() { + addCard(Zone.HAND, playerA, aquamorph); + addCard(Zone.BATTLEFIELD, playerA, "Forest", 6); + addCard(Zone.HAND, playerA, "Island"); + addCard(Zone.HAND, playerA, "Savage Swipe", 1); + // Target creature you control gets +2/+2 until end of turn if its power is 2. Then it fights target creature you don’t control. + addCard(Zone.BATTLEFIELD, playerB, "Siege Mastodon", 1); // 3/5 creature for fighting + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, aquamorph); + setChoice(playerA, true); // cast facedown as 2/2 + waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN); + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Savage Swipe"); + addTarget(playerA, ""); // morph + addTarget(playerA, "Siege Mastodon"); + // 2/2 becomes 4/4, fights 3/5, neither dies + waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN); + playLand(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Island"); + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{2}{U}: Turn"); // unmorph + setChoice(playerA, "a 1/5 creature"); + + setStrictChooseMode(true); + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertPowerToughness(playerA, aquamorph, 1 + 2, 5 + 2); + assertDamageReceived(playerA, aquamorph, 3); + assertDamageReceived(playerB, "Siege Mastodon", 4); + } + + @Test + public void testClayFlicker() { + addCard(Zone.HAND, playerA, clay); + addCard(Zone.HAND, playerA, cloudshift); + addCard(Zone.BATTLEFIELD, playerA, "Waterkin Shaman"); + // 2/1; Whenever a creature with flying enters the battlefield under your control, Waterkin Shaman gets +1/+1 until end of turn. + addCard(Zone.BATTLEFIELD, playerA, "Plains", 5); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, clay); + setChoice(playerA, "a 2/2 artifact creature with flying"); + waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, cloudshift, clay); + setChoice(playerA, "a 3/3 artifact creature"); + + setStrictChooseMode(true); + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertPowerToughness(playerA, clay, 3, 3); + assertPowerToughness(playerA, "Waterkin Shaman", 2 + 1, 1 + 1); + assertAbility(playerA, clay, FlyingAbility.getInstance(), false); + } + + @Test + public void testClayFlickerWall() { + addCard(Zone.HAND, playerA, clay); + addCard(Zone.HAND, playerA, cloudshift); + addCard(Zone.BATTLEFIELD, playerA, "Plains", 5); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, clay); + setChoice(playerA, "a 1/6 artifact creature with defender"); + waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, cloudshift, clay); + setChoice(playerA, "a 3/3 artifact creature"); + + setStrictChooseMode(true); + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertPowerToughness(playerA, clay, 3, 3); + assertNotSubtype(clay, SubType.WALL); + } + +} From 476136b7661b6f57dfc9203ddc3e4a21d0d4fd92 Mon Sep 17 00:00:00 2001 From: xenohedron Date: Sun, 27 Aug 2023 00:28:37 -0400 Subject: [PATCH 08/36] add logic to check zcc --- .../continuous/SetBasePowerToughnessSourceEffect.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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 72eed3ff1a8..24970e7b122 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 @@ -72,13 +72,14 @@ public class SetBasePowerToughnessSourceEffect extends ContinuousEffectImpl { public boolean apply(Game game, Ability source) { MageObject mageObject = game.getPermanentEntering(source.getSourceId()); if (mageObject == null) { - if (duration == Duration.Custom || isTemporary()) { - mageObject = game.getPermanent(source.getSourceId()); - } else { + if (this.characterDefining || this.duration == Duration.WhileOnBattlefield) { + // Duration is a workaround for Primal Clay and similar which are incorrectly implemented mageObject = game.getObject(source); + } else { + mageObject = source.getSourcePermanentIfItStillExists(game); } } - if (mageObject == null || (power == null && toughness == null)) { + if (mageObject == null) { discard(); return false; } From a427406d5fc5c0927b48ce6761ceb14e0181381f Mon Sep 17 00:00:00 2001 From: xenohedron Date: Tue, 29 Aug 2023 23:33:59 -0400 Subject: [PATCH 09/36] fix Sutured Ghoul --- Mage.Sets/src/mage/cards/s/SuturedGhoul.java | 19 ++++++++----------- .../SetBasePowerToughnessSourceEffect.java | 16 ++++++++++++++++ 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/Mage.Sets/src/mage/cards/s/SuturedGhoul.java b/Mage.Sets/src/mage/cards/s/SuturedGhoul.java index a910577a8f8..888c9eb249b 100644 --- a/Mage.Sets/src/mage/cards/s/SuturedGhoul.java +++ b/Mage.Sets/src/mage/cards/s/SuturedGhoul.java @@ -8,7 +8,7 @@ import mage.abilities.common.SimpleStaticAbility; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; -import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.effects.common.continuous.SetBasePowerToughnessSourceEffect; import mage.abilities.keyword.TrampleAbility; import mage.cards.Card; import mage.cards.CardImpl; @@ -27,13 +27,10 @@ import mage.players.Player; import mage.target.common.TargetCardInYourGraveyard; /** - * @author nantuko + * @author nantuko, xenohedron */ public final class SuturedGhoul extends CardImpl { - private static final String staticText = "exile any number of creature cards from your graveyard"; - private static final String staticText2 = "Sutured Ghoul's power is equal to the total power of the exiled cards and its toughness is equal to their total toughness"; - public SuturedGhoul(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}{B}{B}"); this.subtype.add(SubType.ZOMBIE); @@ -44,12 +41,12 @@ public final class SuturedGhoul extends CardImpl { this.addAbility(TrampleAbility.getInstance()); // As Sutured Ghoul enters the battlefield, exile any number of creature cards from your graveyard. - this.addAbility(new AsEntersBattlefieldAbility(new SuturedGhoulEffect(), staticText)); + this.addAbility(new AsEntersBattlefieldAbility(new SuturedGhoulEffect())); // Sutured Ghoul's power is equal to the total power of the exiled cards and its toughness is equal to their total toughness. - BoostSourceEffect effect = new BoostSourceEffect(SuturedGhoulPowerCount.instance, SuturedGhoulToughnessCount.instance, Duration.WhileOnBattlefield); - effect.setText(staticText2); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect)); + this.addAbility(new SimpleStaticAbility(new SetBasePowerToughnessSourceEffect( + SuturedGhoulPowerCount.instance, SuturedGhoulToughnessCount.instance, Duration.WhileOnBattlefield, + "{this}'s power is equal to the total power of the exiled cards and its toughness is equal to their total toughness"))); } private SuturedGhoul(final SuturedGhoul card) { @@ -64,12 +61,12 @@ public final class SuturedGhoul extends CardImpl { class SuturedGhoulEffect extends OneShotEffect { - public SuturedGhoulEffect() { + SuturedGhoulEffect() { super(Outcome.Benefit); staticText = "exile any number of creature cards from your graveyard"; } - public SuturedGhoulEffect(SuturedGhoulEffect effect) { + private SuturedGhoulEffect(final SuturedGhoulEffect effect) { super(effect); } 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 24970e7b122..b6e2803ac1f 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 @@ -52,6 +52,22 @@ public class SetBasePowerToughnessSourceEffect extends ContinuousEffectImpl { } } + /** + * @param power set in layer 7b + * @param toughness set in layer 7b + * @param duration Duration for the effect + * @param text Text to set as staticText + */ + public SetBasePowerToughnessSourceEffect(DynamicValue power, DynamicValue toughness, Duration duration, String text) { + this(power, toughness, duration, SubLayer.SetPT_7b); + this.staticText = text; + } + + /** + * @param power set in layer 7b + * @param toughness set in layer 7b + * @param duration Duration for the effect + */ 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(); From fe165f1fd01c6070e64b96a0778597f8d668fa4a Mon Sep 17 00:00:00 2001 From: Susucre <34709007+Susucre@users.noreply.github.com> Date: Thu, 31 Aug 2023 01:15:47 +0200 Subject: [PATCH 10/36] Fix Adventures exiling themselves before applying their effects (#10793) * Rework adventures to exiles themself after applying other effects * fix duelist * finalize all adventures * apply review * add card name to error * fix remaining adventures * finalize the last adventures. --- Mage.Sets/src/mage/cards/a/AltarOfBhaal.java | 2 + .../src/mage/cards/a/AmethystDragon.java | 2 + .../src/mage/cards/a/AnimatingFaerie.java | 2 + .../src/mage/cards/a/AquaticAlchemist.java | 2 + .../src/mage/cards/a/ArdenvaleTactician.java | 2 + .../src/mage/cards/b/BeanstalkGiant.java | 2 + Mage.Sets/src/mage/cards/b/BeanstalkWurm.java | 2 + .../src/mage/cards/b/BellowingBruiser.java | 2 + .../src/mage/cards/b/BelunaGrandsquall.java | 2 + .../src/mage/cards/b/BelunasGatekeeper.java | 2 + .../src/mage/cards/b/BesottedKnight.java | 2 + .../src/mage/cards/b/BlessedHippogriff.java | 2 + .../src/mage/cards/b/BonecrusherGiant.java | 2 + .../src/mage/cards/b/BrambleFamiliar.java | 2 + .../src/mage/cards/b/BrazenBorrower.java | 2 + .../src/mage/cards/c/CallousSellSword.java | 2 + .../src/mage/cards/c/CheekyHouseMouse.java | 2 + .../src/mage/cards/c/ColossalBadger.java | 2 + .../src/mage/cards/c/ConceitedWitch.java | 2 + .../src/mage/cards/c/CruelSomnophage.java | 2 + Mage.Sets/src/mage/cards/c/CrystalDragon.java | 2 + Mage.Sets/src/mage/cards/c/CuriousPair.java | 2 + .../src/mage/cards/d/DecadentDragon.java | 2 + .../src/mage/cards/d/DevouringSugarmaw.java | 2 + Mage.Sets/src/mage/cards/d/DreadLinnorm.java | 2 + Mage.Sets/src/mage/cards/e/ElusiveOtter.java | 2 + .../mage/cards/e/EmberethShieldbreaker.java | 2 + Mage.Sets/src/mage/cards/e/EmeraldDragon.java | 2 + Mage.Sets/src/mage/cards/e/Ettercap.java | 2 + Mage.Sets/src/mage/cards/f/FaeOfWishes.java | 3 +- .../src/mage/cards/f/FaerieGuidemother.java | 2 + Mage.Sets/src/mage/cards/f/FangDragon.java | 2 + Mage.Sets/src/mage/cards/f/FellHorseman.java | 1 + .../src/mage/cards/f/FerociousWerefox.java | 2 + .../src/mage/cards/f/FlaxenIntruder.java | 2 + .../src/mage/cards/f/FoulmireKnight.java | 2 + .../src/mage/cards/f/FrolickingFamiliar.java | 2 + Mage.Sets/src/mage/cards/g/GalvanicGiant.java | 13 ++-- .../src/mage/cards/g/GarenbrigCarver.java | 2 + Mage.Sets/src/mage/cards/g/GhostLantern.java | 8 ++- Mage.Sets/src/mage/cards/g/GiantKiller.java | 2 + .../src/mage/cards/g/GingerbreadHunter.java | 2 + Mage.Sets/src/mage/cards/g/GrabbyGiant.java | 2 + Mage.Sets/src/mage/cards/g/GraySlaad.java | 2 + Mage.Sets/src/mage/cards/g/GuardianNaga.java | 2 + .../src/mage/cards/g/GumdropPoisoner.java | 2 + .../src/mage/cards/h/HeartflameDuelist.java | 4 +- .../src/mage/cards/h/HearthElemental.java | 2 + .../src/mage/cards/h/HollowScavenger.java | 2 + .../src/mage/cards/h/HornOfValhalla.java | 8 ++- .../src/mage/cards/h/HornedLochWhale.java | 2 + .../src/mage/cards/h/HypnoticSprite.java | 2 + .../src/mage/cards/i/ImodanesRecruiter.java | 2 + .../mage/cards/i/IntrepidTrufflesnout.java | 4 +- .../src/mage/cards/k/KellanTheFaeBlooded.java | 2 + .../src/mage/cards/l/LonesomeUnicorn.java | 2 + .../src/mage/cards/l/LovestruckBeast.java | 2 + .../src/mage/cards/m/MerchantOfTheVale.java | 2 + .../src/mage/cards/m/MerfolkSecretkeeper.java | 2 + .../src/mage/cards/m/MinecartDaredevil.java | 2 + Mage.Sets/src/mage/cards/m/MonsterManual.java | 2 + Mage.Sets/src/mage/cards/m/MoonshaePixie.java | 2 + .../src/mage/cards/m/MosswoodDreadknight.java | 2 + .../src/mage/cards/m/MurderousRider.java | 5 +- Mage.Sets/src/mage/cards/o/OakhameRanger.java | 2 + .../src/mage/cards/o/ObyrasAttendants.java | 2 + .../src/mage/cards/o/OrderOfMidnight.java | 2 + .../src/mage/cards/p/PegasusGuardian.java | 2 + .../src/mage/cards/p/PicklockPrankster.java | 2 + Mage.Sets/src/mage/cards/p/PicnicRuiner.java | 2 + .../src/mage/cards/p/PollenShieldHare.java | 2 + Mage.Sets/src/mage/cards/q/QueenOfIce.java | 2 + Mage.Sets/src/mage/cards/q/QuestingDruid.java | 2 + .../src/mage/cards/r/RatcatcherTrainee.java | 2 + .../src/mage/cards/r/RealmCloakedGiant.java | 2 + Mage.Sets/src/mage/cards/r/ReaperOfNight.java | 2 + Mage.Sets/src/mage/cards/r/RimrockKnight.java | 2 + .../src/mage/cards/r/RosethornAcolyte.java | 2 + .../src/mage/cards/s/SapphireDragon.java | 2 + Mage.Sets/src/mage/cards/s/ScaldingViper.java | 2 + Mage.Sets/src/mage/cards/s/SeaHag.java | 2 + .../src/mage/cards/s/ShepherdOfTheFlock.java | 2 + .../src/mage/cards/s/ShroudedShepherd.java | 2 + .../src/mage/cards/s/SilverflameSquire.java | 2 + .../src/mage/cards/s/SmittenSwordmaster.java | 2 + .../src/mage/cards/s/SpellscornCoven.java | 2 + .../src/mage/cards/s/StormkeldVanguard.java | 2 + .../src/mage/cards/s/SwordCoastSerpent.java | 2 + Mage.Sets/src/mage/cards/t/TempestHart.java | 2 + .../src/mage/cards/t/ThreadbindClique.java | 2 + Mage.Sets/src/mage/cards/t/TopazDragon.java | 2 + .../src/mage/cards/t/TuinvaleTreefolk.java | 2 + Mage.Sets/src/mage/cards/t/TwiningTwins.java | 2 + Mage.Sets/src/mage/cards/t/TwoHandedAxe.java | 2 + .../src/mage/cards/t/TwoHeadedHunter.java | 2 + .../src/mage/cards/v/VantressTransmuter.java | 2 + .../src/mage/cards/v/VirtueOfCourage.java | 2 + .../src/mage/cards/v/VirtueOfKnowledge.java | 2 + .../src/mage/cards/v/VirtueOfLoyalty.java | 2 + .../src/mage/cards/v/VirtueOfPersistence.java | 2 + .../src/mage/cards/v/VirtueOfStrength.java | 2 + .../src/mage/cards/w/WoodlandAcolyte.java | 2 + .../src/mage/cards/y/YoungBlueDragon.java | 2 + .../src/mage/cards/y/YoungRedDragon.java | 2 + .../single/woe/HeartflameDuelistTest.java | 67 +++++++++++++++++++ .../main/java/mage/cards/AdventureCard.java | 4 ++ .../java/mage/cards/AdventureCardSpell.java | 2 + .../mage/cards/AdventureCardSpellImpl.java | 29 +++++++- 108 files changed, 322 insertions(+), 18 deletions(-) create mode 100644 Mage.Tests/src/test/java/org/mage/test/cards/single/woe/HeartflameDuelistTest.java diff --git a/Mage.Sets/src/mage/cards/a/AltarOfBhaal.java b/Mage.Sets/src/mage/cards/a/AltarOfBhaal.java index 377da435a53..a2c9fa83abe 100644 --- a/Mage.Sets/src/mage/cards/a/AltarOfBhaal.java +++ b/Mage.Sets/src/mage/cards/a/AltarOfBhaal.java @@ -37,6 +37,8 @@ public final class AltarOfBhaal extends AdventureCard { // Bone Offering // Create a tapped 4/1 black Skeleton creature token with menace. this.getSpellCard().getSpellAbility().addEffect(new CreateTokenEffect(new SkeletonMenaceToken(), 1, true, false)); + + this.finalizeAdventure(); } private AltarOfBhaal(final AltarOfBhaal card) { diff --git a/Mage.Sets/src/mage/cards/a/AmethystDragon.java b/Mage.Sets/src/mage/cards/a/AmethystDragon.java index b0a66012935..426a3878ac4 100644 --- a/Mage.Sets/src/mage/cards/a/AmethystDragon.java +++ b/Mage.Sets/src/mage/cards/a/AmethystDragon.java @@ -34,6 +34,8 @@ public final class AmethystDragon extends AdventureCard { // Explosive Crystal deals 4 damage divided as you choose among any number of targets. this.getSpellCard().getSpellAbility().addEffect(new DamageMultiEffect(4)); this.getSpellCard().getSpellAbility().addTarget(new TargetAnyTargetAmount(4)); + + this.finalizeAdventure(); } private AmethystDragon(final AmethystDragon card) { diff --git a/Mage.Sets/src/mage/cards/a/AnimatingFaerie.java b/Mage.Sets/src/mage/cards/a/AnimatingFaerie.java index 26818be72fb..1a50cd38af6 100644 --- a/Mage.Sets/src/mage/cards/a/AnimatingFaerie.java +++ b/Mage.Sets/src/mage/cards/a/AnimatingFaerie.java @@ -52,6 +52,8 @@ public final class AnimatingFaerie extends AdventureCard { CounterType.P1P1.createInstance(4) ).setText(" ")); this.getSpellCard().getSpellAbility().addTarget(new TargetPermanent(filter)); + + this.finalizeAdventure(); } private AnimatingFaerie(final AnimatingFaerie card) { diff --git a/Mage.Sets/src/mage/cards/a/AquaticAlchemist.java b/Mage.Sets/src/mage/cards/a/AquaticAlchemist.java index cac0f970e9f..f2287053a34 100644 --- a/Mage.Sets/src/mage/cards/a/AquaticAlchemist.java +++ b/Mage.Sets/src/mage/cards/a/AquaticAlchemist.java @@ -42,6 +42,8 @@ public final class AquaticAlchemist extends AdventureCard { this.getSpellCard().getSpellAbility().addTarget(new TargetCardInYourGraveyard( StaticFilters.FILTER_CARD_INSTANT_OR_SORCERY_FROM_YOUR_GRAVEYARD )); + + this.finalizeAdventure(); } private AquaticAlchemist(final AquaticAlchemist card) { diff --git a/Mage.Sets/src/mage/cards/a/ArdenvaleTactician.java b/Mage.Sets/src/mage/cards/a/ArdenvaleTactician.java index bc14efe0b1a..741b20f3cb3 100644 --- a/Mage.Sets/src/mage/cards/a/ArdenvaleTactician.java +++ b/Mage.Sets/src/mage/cards/a/ArdenvaleTactician.java @@ -31,6 +31,8 @@ public final class ArdenvaleTactician extends AdventureCard { // Tap up to two target creatures. this.getSpellCard().getSpellAbility().addEffect(new TapTargetEffect()); this.getSpellCard().getSpellAbility().addTarget(new TargetCreaturePermanent(0, 2)); + + this.finalizeAdventure(); } private ArdenvaleTactician(final ArdenvaleTactician card) { diff --git a/Mage.Sets/src/mage/cards/b/BeanstalkGiant.java b/Mage.Sets/src/mage/cards/b/BeanstalkGiant.java index bc7d80c65c4..9288a9b05ab 100644 --- a/Mage.Sets/src/mage/cards/b/BeanstalkGiant.java +++ b/Mage.Sets/src/mage/cards/b/BeanstalkGiant.java @@ -39,6 +39,8 @@ public final class BeanstalkGiant extends AdventureCard { this.getSpellCard().getSpellAbility().addEffect( new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_CARD_BASIC_LAND)) ); + + this.finalizeAdventure(); } private BeanstalkGiant(final BeanstalkGiant card) { diff --git a/Mage.Sets/src/mage/cards/b/BeanstalkWurm.java b/Mage.Sets/src/mage/cards/b/BeanstalkWurm.java index a923d148c5a..b2d75c0bdee 100644 --- a/Mage.Sets/src/mage/cards/b/BeanstalkWurm.java +++ b/Mage.Sets/src/mage/cards/b/BeanstalkWurm.java @@ -30,6 +30,8 @@ public final class BeanstalkWurm extends AdventureCard { // Plant Beans // You may play an additional land this turn. this.getSpellCard().getSpellAbility().addEffect(new PlayAdditionalLandsControllerEffect(1, Duration.EndOfTurn)); + + this.finalizeAdventure(); } private BeanstalkWurm(final BeanstalkWurm card) { diff --git a/Mage.Sets/src/mage/cards/b/BellowingBruiser.java b/Mage.Sets/src/mage/cards/b/BellowingBruiser.java index 32ea3d751fd..4734e3d0fe4 100644 --- a/Mage.Sets/src/mage/cards/b/BellowingBruiser.java +++ b/Mage.Sets/src/mage/cards/b/BellowingBruiser.java @@ -31,6 +31,8 @@ public final class BellowingBruiser extends AdventureCard { // Up to two target creatures can't block this turn. this.getSpellCard().getSpellAbility().addEffect(new CantBlockTargetEffect(Duration.EndOfTurn)); this.getSpellCard().getSpellAbility().addTarget(new TargetCreaturePermanent(0, 2)); + + this.finalizeAdventure(); } private BellowingBruiser(final BellowingBruiser card) { diff --git a/Mage.Sets/src/mage/cards/b/BelunaGrandsquall.java b/Mage.Sets/src/mage/cards/b/BelunaGrandsquall.java index 2034292c245..e2ffdc20f08 100644 --- a/Mage.Sets/src/mage/cards/b/BelunaGrandsquall.java +++ b/Mage.Sets/src/mage/cards/b/BelunaGrandsquall.java @@ -49,6 +49,8 @@ public final class BelunaGrandsquall extends AdventureCard { // Seek Thrills // Mill seven cards. Then put all cards that have an Adventure from among the milled cards into your hand. this.getSpellCard().getSpellAbility().addEffect(new SeekThrillsEffect()); + + this.finalizeAdventure(); } private BelunaGrandsquall(final BelunaGrandsquall card) { diff --git a/Mage.Sets/src/mage/cards/b/BelunasGatekeeper.java b/Mage.Sets/src/mage/cards/b/BelunasGatekeeper.java index 11d309f2c8f..fd50aad393d 100644 --- a/Mage.Sets/src/mage/cards/b/BelunasGatekeeper.java +++ b/Mage.Sets/src/mage/cards/b/BelunasGatekeeper.java @@ -40,6 +40,8 @@ public final class BelunasGatekeeper extends AdventureCard { // Return target creature you don't control with mana value 3 or less to its owner's hand. this.getSpellCard().getSpellAbility().addEffect(new ReturnToHandTargetEffect()); this.getSpellCard().getSpellAbility().addTarget(new TargetPermanent(filter)); + + this.finalizeAdventure(); } private BelunasGatekeeper(final BelunasGatekeeper card) { diff --git a/Mage.Sets/src/mage/cards/b/BesottedKnight.java b/Mage.Sets/src/mage/cards/b/BesottedKnight.java index 094d8f5cfe6..52d6c621ff0 100644 --- a/Mage.Sets/src/mage/cards/b/BesottedKnight.java +++ b/Mage.Sets/src/mage/cards/b/BesottedKnight.java @@ -28,6 +28,8 @@ public final class BesottedKnight extends AdventureCard { // Create a Royal Role token attached to target creature you control. this.getSpellCard().getSpellAbility().addEffect(new CreateRoleAttachedTargetEffect(RoleType.ROYAL)); this.getSpellCard().getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); + + this.finalizeAdventure(); } private BesottedKnight(final BesottedKnight card) { diff --git a/Mage.Sets/src/mage/cards/b/BlessedHippogriff.java b/Mage.Sets/src/mage/cards/b/BlessedHippogriff.java index 1d480e78679..43e60595004 100644 --- a/Mage.Sets/src/mage/cards/b/BlessedHippogriff.java +++ b/Mage.Sets/src/mage/cards/b/BlessedHippogriff.java @@ -49,6 +49,8 @@ public final class BlessedHippogriff extends AdventureCard { // Target creature gains indestructible until end of turn. this.getSpellCard().getSpellAbility().addEffect(new GainAbilityTargetEffect(IndestructibleAbility.getInstance())); this.getSpellCard().getSpellAbility().addTarget(new TargetCreaturePermanent()); + + this.finalizeAdventure(); } private BlessedHippogriff(final BlessedHippogriff card) { diff --git a/Mage.Sets/src/mage/cards/b/BonecrusherGiant.java b/Mage.Sets/src/mage/cards/b/BonecrusherGiant.java index bd673354f7b..33c743ba440 100644 --- a/Mage.Sets/src/mage/cards/b/BonecrusherGiant.java +++ b/Mage.Sets/src/mage/cards/b/BonecrusherGiant.java @@ -39,6 +39,8 @@ public final class BonecrusherGiant extends AdventureCard { this.getSpellCard().getSpellAbility().addEffect(new DamageCantBePreventedEffect(Duration.EndOfTurn, "Damage can't be prevented this turn")); this.getSpellCard().getSpellAbility().addEffect(new DamageTargetEffect(2)); this.getSpellCard().getSpellAbility().addTarget(new TargetAnyTarget()); + + this.finalizeAdventure(); } private BonecrusherGiant(final BonecrusherGiant card) { diff --git a/Mage.Sets/src/mage/cards/b/BrambleFamiliar.java b/Mage.Sets/src/mage/cards/b/BrambleFamiliar.java index cd4350ba815..7188cdab4ea 100644 --- a/Mage.Sets/src/mage/cards/b/BrambleFamiliar.java +++ b/Mage.Sets/src/mage/cards/b/BrambleFamiliar.java @@ -56,6 +56,8 @@ public final class BrambleFamiliar extends AdventureCard { // Fetch Quest // Mill seven cards, then put a creature, enchantment, or land card from among cards milled this way onto the battlefield. this.getSpellCard().getSpellAbility().addEffect(new FetchQuestEffect()); + + this.finalizeAdventure(); } private BrambleFamiliar(final BrambleFamiliar card) { diff --git a/Mage.Sets/src/mage/cards/b/BrazenBorrower.java b/Mage.Sets/src/mage/cards/b/BrazenBorrower.java index 97fedec7d90..dc7931f2bdc 100644 --- a/Mage.Sets/src/mage/cards/b/BrazenBorrower.java +++ b/Mage.Sets/src/mage/cards/b/BrazenBorrower.java @@ -49,6 +49,8 @@ public final class BrazenBorrower extends AdventureCard { // Return target nonland permanent an opponent controls to its owner's hand. this.getSpellCard().getSpellAbility().addEffect(new ReturnToHandTargetEffect()); this.getSpellCard().getSpellAbility().addTarget(new TargetPermanent(filter)); + + this.finalizeAdventure(); } private BrazenBorrower(final BrazenBorrower card) { diff --git a/Mage.Sets/src/mage/cards/c/CallousSellSword.java b/Mage.Sets/src/mage/cards/c/CallousSellSword.java index 2a6da8ea1a8..ced7dc1aa8e 100644 --- a/Mage.Sets/src/mage/cards/c/CallousSellSword.java +++ b/Mage.Sets/src/mage/cards/c/CallousSellSword.java @@ -58,6 +58,8 @@ public final class CallousSellSword extends AdventureCard { this.getSpellCard().getSpellAbility().addTarget(new TargetControlledCreaturePermanent().setTargetTag(1)); this.getSpellCard().getSpellAbility().addTarget(new TargetAnyTarget(1, 1, filterSecondTarget).setTargetTag(2)); this.getSpellCard().getSpellAbility().addEffect(new CallousSellSwordSacrificeFirstTargetEffect().concatBy("Then")); + + this.finalizeAdventure(); } private CallousSellSword(final CallousSellSword card) { diff --git a/Mage.Sets/src/mage/cards/c/CheekyHouseMouse.java b/Mage.Sets/src/mage/cards/c/CheekyHouseMouse.java index 3e01da005b8..2f01552d890 100644 --- a/Mage.Sets/src/mage/cards/c/CheekyHouseMouse.java +++ b/Mage.Sets/src/mage/cards/c/CheekyHouseMouse.java @@ -40,6 +40,8 @@ public final class CheekyHouseMouse extends AdventureCard { this.getSpellCard().getSpellAbility().addEffect(new CantBeBlockedTargetEffect(filter, Duration.EndOfTurn) .setText("it can't be blocked by creatures with power 3 or greater this turn")); this.getSpellCard().getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); + + this.finalizeAdventure(); } private CheekyHouseMouse(final CheekyHouseMouse card) { diff --git a/Mage.Sets/src/mage/cards/c/ColossalBadger.java b/Mage.Sets/src/mage/cards/c/ColossalBadger.java index 21226fe126d..4f6345926ce 100644 --- a/Mage.Sets/src/mage/cards/c/ColossalBadger.java +++ b/Mage.Sets/src/mage/cards/c/ColossalBadger.java @@ -38,6 +38,8 @@ public final class ColossalBadger extends AdventureCard { // Choose target creature. Mill four cards, then put a +1/+1 counter on that creature for each creature card milled this way. this.getSpellCard().getSpellAbility().addEffect(new ColossalBadgerEffect()); this.getSpellCard().getSpellAbility().addTarget(new TargetCreaturePermanent()); + + this.finalizeAdventure(); } private ColossalBadger(final ColossalBadger card) { diff --git a/Mage.Sets/src/mage/cards/c/ConceitedWitch.java b/Mage.Sets/src/mage/cards/c/ConceitedWitch.java index 2dcd4062ccb..ad3d4681af5 100644 --- a/Mage.Sets/src/mage/cards/c/ConceitedWitch.java +++ b/Mage.Sets/src/mage/cards/c/ConceitedWitch.java @@ -32,6 +32,8 @@ public final class ConceitedWitch extends AdventureCard { // Create a Wicked Role token attached to target creature you control. this.getSpellCard().getSpellAbility().addEffect(new CreateRoleAttachedTargetEffect(RoleType.WICKED)); this.getSpellCard().getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); + + this.finalizeAdventure(); } private ConceitedWitch(final ConceitedWitch card) { diff --git a/Mage.Sets/src/mage/cards/c/CruelSomnophage.java b/Mage.Sets/src/mage/cards/c/CruelSomnophage.java index 3c72746ee0f..271b64dd184 100644 --- a/Mage.Sets/src/mage/cards/c/CruelSomnophage.java +++ b/Mage.Sets/src/mage/cards/c/CruelSomnophage.java @@ -37,6 +37,8 @@ public final class CruelSomnophage extends AdventureCard { // Target player mills four cards. this.getSpellCard().getSpellAbility().addEffect(new MillCardsTargetEffect(4)); this.getSpellCard().getSpellAbility().addTarget(new TargetPlayer()); + + this.finalizeAdventure(); } private CruelSomnophage(final CruelSomnophage card) { diff --git a/Mage.Sets/src/mage/cards/c/CrystalDragon.java b/Mage.Sets/src/mage/cards/c/CrystalDragon.java index 3afe611e52f..f288cf2b4e6 100644 --- a/Mage.Sets/src/mage/cards/c/CrystalDragon.java +++ b/Mage.Sets/src/mage/cards/c/CrystalDragon.java @@ -48,6 +48,8 @@ public final class CrystalDragon extends AdventureCard { // Return target artifact, enchantment, or legendary card from your graveyard to your hand. this.getSpellCard().getSpellAbility().addEffect(new ReturnFromGraveyardToHandTargetEffect()); this.getSpellCard().getSpellAbility().addTarget(new TargetCardInYourGraveyard(filter)); + + this.finalizeAdventure(); } private CrystalDragon(final CrystalDragon card) { diff --git a/Mage.Sets/src/mage/cards/c/CuriousPair.java b/Mage.Sets/src/mage/cards/c/CuriousPair.java index febc9db70ed..23e1b2105cf 100644 --- a/Mage.Sets/src/mage/cards/c/CuriousPair.java +++ b/Mage.Sets/src/mage/cards/c/CuriousPair.java @@ -26,6 +26,8 @@ public final class CuriousPair extends AdventureCard { // Treats to Share // Create a Food token. this.getSpellCard().getSpellAbility().addEffect(new CreateTokenEffect(new FoodToken())); + + this.finalizeAdventure(); } private CuriousPair(final CuriousPair card) { diff --git a/Mage.Sets/src/mage/cards/d/DecadentDragon.java b/Mage.Sets/src/mage/cards/d/DecadentDragon.java index 8b299a57983..d152fdbaf41 100644 --- a/Mage.Sets/src/mage/cards/d/DecadentDragon.java +++ b/Mage.Sets/src/mage/cards/d/DecadentDragon.java @@ -51,6 +51,8 @@ public final class DecadentDragon extends AdventureCard { // Exile the top two cards of target opponent's library face down. You may look at and play those cards for as long as they remain exiled. this.getSpellCard().getSpellAbility().addEffect(new ExpensiveTasteEffect()); this.getSpellCard().getSpellAbility().addTarget(new TargetOpponent()); + + this.finalizeAdventure(); } private DecadentDragon(final DecadentDragon card) { diff --git a/Mage.Sets/src/mage/cards/d/DevouringSugarmaw.java b/Mage.Sets/src/mage/cards/d/DevouringSugarmaw.java index 4e6bb012ad4..85d472f4152 100644 --- a/Mage.Sets/src/mage/cards/d/DevouringSugarmaw.java +++ b/Mage.Sets/src/mage/cards/d/DevouringSugarmaw.java @@ -67,6 +67,8 @@ public final class DevouringSugarmaw extends AdventureCard { this.getSpellCard().getSpellAbility().addEffect(new CreateTokenEffect(new HumanToken())); this.getSpellCard().getSpellAbility().addEffect(new CreateTokenEffect(new FoodToken()) .setText("and a Food token")); + + this.finalizeAdventure(); } private DevouringSugarmaw(final DevouringSugarmaw card) { diff --git a/Mage.Sets/src/mage/cards/d/DreadLinnorm.java b/Mage.Sets/src/mage/cards/d/DreadLinnorm.java index 3d5e287efbe..45ccfbb1b4a 100644 --- a/Mage.Sets/src/mage/cards/d/DreadLinnorm.java +++ b/Mage.Sets/src/mage/cards/d/DreadLinnorm.java @@ -48,6 +48,8 @@ public final class DreadLinnorm extends AdventureCard { this.getSpellCard().getSpellAbility().addEffect(new UntapTargetEffect().setText("and untap it")); this.getSpellCard().getSpellAbility().addEffect(new GainAbilityTargetEffect(HexproofAbility.getInstance()).setText("It gains hexproof until end of turn")); this.getSpellCard().getSpellAbility().addTarget(new TargetCreaturePermanent()); + + this.finalizeAdventure(); } private DreadLinnorm(final DreadLinnorm card) { diff --git a/Mage.Sets/src/mage/cards/e/ElusiveOtter.java b/Mage.Sets/src/mage/cards/e/ElusiveOtter.java index 0449e668a37..64d7fb88435 100644 --- a/Mage.Sets/src/mage/cards/e/ElusiveOtter.java +++ b/Mage.Sets/src/mage/cards/e/ElusiveOtter.java @@ -45,6 +45,8 @@ public final class ElusiveOtter extends AdventureCard { target.setMinNumberOfTargets(0); target.setMaxNumberOfTargets(Integer.MAX_VALUE); this.getSpellCard().getSpellAbility().addTarget(target); + + this.finalizeAdventure(); } private ElusiveOtter(final ElusiveOtter card) { diff --git a/Mage.Sets/src/mage/cards/e/EmberethShieldbreaker.java b/Mage.Sets/src/mage/cards/e/EmberethShieldbreaker.java index fe781fc842c..606d5bf7980 100644 --- a/Mage.Sets/src/mage/cards/e/EmberethShieldbreaker.java +++ b/Mage.Sets/src/mage/cards/e/EmberethShieldbreaker.java @@ -27,6 +27,8 @@ public final class EmberethShieldbreaker extends AdventureCard { // Destroy target artifact. this.getSpellCard().getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellCard().getSpellAbility().addTarget(new TargetArtifactPermanent()); + + this.finalizeAdventure(); } private EmberethShieldbreaker(final EmberethShieldbreaker card) { diff --git a/Mage.Sets/src/mage/cards/e/EmeraldDragon.java b/Mage.Sets/src/mage/cards/e/EmeraldDragon.java index 0bdb352c23d..70df8e3a339 100644 --- a/Mage.Sets/src/mage/cards/e/EmeraldDragon.java +++ b/Mage.Sets/src/mage/cards/e/EmeraldDragon.java @@ -46,6 +46,8 @@ public final class EmeraldDragon extends AdventureCard { // Counter target activated or triggered ability from a noncreature source. this.getSpellCard().getSpellAbility().addEffect(new CounterTargetEffect()); this.getSpellCard().getSpellAbility().addTarget(new TargetActivatedOrTriggeredAbility(filter)); + + this.finalizeAdventure(); } private EmeraldDragon(final EmeraldDragon card) { diff --git a/Mage.Sets/src/mage/cards/e/Ettercap.java b/Mage.Sets/src/mage/cards/e/Ettercap.java index c3ca78b99d5..dfc21a00fdd 100644 --- a/Mage.Sets/src/mage/cards/e/Ettercap.java +++ b/Mage.Sets/src/mage/cards/e/Ettercap.java @@ -41,6 +41,8 @@ public final class Ettercap extends AdventureCard { // Destroy target creature with flying. this.getSpellCard().getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellCard().getSpellAbility().addTarget(new TargetPermanent(filter)); + + this.finalizeAdventure(); } private Ettercap(final Ettercap card) { diff --git a/Mage.Sets/src/mage/cards/f/FaeOfWishes.java b/Mage.Sets/src/mage/cards/f/FaeOfWishes.java index aedcc214f64..a2961205b9d 100644 --- a/Mage.Sets/src/mage/cards/f/FaeOfWishes.java +++ b/Mage.Sets/src/mage/cards/f/FaeOfWishes.java @@ -13,7 +13,6 @@ import mage.cards.AdventureCard; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.filter.FilterCard; import mage.filter.StaticFilters; import mage.target.common.TargetCardInHand; @@ -46,6 +45,8 @@ public final class FaeOfWishes extends AdventureCard { // You may reveal a noncreature card you own from outside the game and put it into your hand. this.getSpellCard().getSpellAbility().addEffect(new WishEffect(StaticFilters.FILTER_CARD_A_NON_CREATURE)); this.getSpellCard().getSpellAbility().addHint(OpenSideboardHint.instance); + + this.finalizeAdventure(); } private FaeOfWishes(final FaeOfWishes card) { diff --git a/Mage.Sets/src/mage/cards/f/FaerieGuidemother.java b/Mage.Sets/src/mage/cards/f/FaerieGuidemother.java index 24425fc8f13..77a6f7a01d9 100644 --- a/Mage.Sets/src/mage/cards/f/FaerieGuidemother.java +++ b/Mage.Sets/src/mage/cards/f/FaerieGuidemother.java @@ -37,6 +37,8 @@ public final class FaerieGuidemother extends AdventureCard { FlyingAbility.getInstance(), Duration.EndOfTurn ).setText("and gains flying until end of turn")); this.getSpellCard().getSpellAbility().addTarget(new TargetCreaturePermanent()); + + this.finalizeAdventure(); } private FaerieGuidemother(final FaerieGuidemother card) { diff --git a/Mage.Sets/src/mage/cards/f/FangDragon.java b/Mage.Sets/src/mage/cards/f/FangDragon.java index 16db6e29b2d..ba21bbd892b 100644 --- a/Mage.Sets/src/mage/cards/f/FangDragon.java +++ b/Mage.Sets/src/mage/cards/f/FangDragon.java @@ -30,6 +30,8 @@ public final class FangDragon extends AdventureCard { this.getSpellCard().getSpellAbility().addEffect(new DamageAllEffect( 1, StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL )); + + this.finalizeAdventure(); } private FangDragon(final FangDragon card) { diff --git a/Mage.Sets/src/mage/cards/f/FellHorseman.java b/Mage.Sets/src/mage/cards/f/FellHorseman.java index 749a1dc7a41..fd0eb3f327a 100644 --- a/Mage.Sets/src/mage/cards/f/FellHorseman.java +++ b/Mage.Sets/src/mage/cards/f/FellHorseman.java @@ -36,6 +36,7 @@ public final class FellHorseman extends AdventureCard { this.getSpellCard().getSpellAbility().addEffect(new ReturnFromGraveyardToHandTargetEffect()); this.getSpellCard().getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD)); + this.finalizeAdventure(); } private FellHorseman(final FellHorseman card) { diff --git a/Mage.Sets/src/mage/cards/f/FerociousWerefox.java b/Mage.Sets/src/mage/cards/f/FerociousWerefox.java index 447944da929..2a8282771ec 100644 --- a/Mage.Sets/src/mage/cards/f/FerociousWerefox.java +++ b/Mage.Sets/src/mage/cards/f/FerociousWerefox.java @@ -33,6 +33,8 @@ public final class FerociousWerefox extends AdventureCard { // Create a Monster Role token attached to target creature you control. this.getSpellCard().getSpellAbility().addEffect(new CreateRoleAttachedTargetEffect(RoleType.MONSTER)); this.getSpellCard().getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); + + this.finalizeAdventure(); } private FerociousWerefox(final FerociousWerefox card) { diff --git a/Mage.Sets/src/mage/cards/f/FlaxenIntruder.java b/Mage.Sets/src/mage/cards/f/FlaxenIntruder.java index 549e8853edf..67f2af3cf32 100644 --- a/Mage.Sets/src/mage/cards/f/FlaxenIntruder.java +++ b/Mage.Sets/src/mage/cards/f/FlaxenIntruder.java @@ -45,6 +45,8 @@ public final class FlaxenIntruder extends AdventureCard { // Welcome Home // Create three 2/2 green Bear creature tokens. this.getSpellCard().getSpellAbility().addEffect(new CreateTokenEffect(new BearToken(), 3)); + + this.finalizeAdventure(); } private FlaxenIntruder(final FlaxenIntruder card) { diff --git a/Mage.Sets/src/mage/cards/f/FoulmireKnight.java b/Mage.Sets/src/mage/cards/f/FoulmireKnight.java index ed1879a13c0..11df26d2c4f 100644 --- a/Mage.Sets/src/mage/cards/f/FoulmireKnight.java +++ b/Mage.Sets/src/mage/cards/f/FoulmireKnight.java @@ -31,6 +31,8 @@ public final class FoulmireKnight extends AdventureCard { // You draw a card and you lose 1 life. this.getSpellCard().getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1).setText("You draw a card")); this.getSpellCard().getSpellAbility().addEffect(new LoseLifeSourceControllerEffect(1).concatBy("and")); + + this.finalizeAdventure(); } private FoulmireKnight(final FoulmireKnight card) { diff --git a/Mage.Sets/src/mage/cards/f/FrolickingFamiliar.java b/Mage.Sets/src/mage/cards/f/FrolickingFamiliar.java index fa8a596e236..ed5daa98502 100644 --- a/Mage.Sets/src/mage/cards/f/FrolickingFamiliar.java +++ b/Mage.Sets/src/mage/cards/f/FrolickingFamiliar.java @@ -41,6 +41,8 @@ public final class FrolickingFamiliar extends AdventureCard { // Blow Off Steam deals 1 damage to any target. this.getSpellCard().getSpellAbility().addEffect(new DamageTargetEffect(1)); this.getSpellCard().getSpellAbility().addTarget(new TargetAnyTarget()); + + this.finalizeAdventure(); } private FrolickingFamiliar(final FrolickingFamiliar card) { diff --git a/Mage.Sets/src/mage/cards/g/GalvanicGiant.java b/Mage.Sets/src/mage/cards/g/GalvanicGiant.java index f647ab51b2e..67c56fe64b1 100644 --- a/Mage.Sets/src/mage/cards/g/GalvanicGiant.java +++ b/Mage.Sets/src/mage/cards/g/GalvanicGiant.java @@ -1,21 +1,22 @@ package mage.cards.g; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SpellCastControllerTriggeredAbility; import mage.abilities.effects.common.DrawDiscardControllerEffect; import mage.abilities.effects.common.TapTargetEffect; import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.cards.AdventureCard; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.ComparisonType; import mage.constants.SubType; import mage.counters.CounterType; import mage.filter.FilterSpell; import mage.filter.predicate.mageobject.ManaValuePredicate; import mage.target.common.TargetOpponentsCreaturePermanent; -import mage.cards.AdventureCard; -import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.ComparisonType; + +import java.util.UUID; /** * @@ -46,6 +47,8 @@ public final class GalvanicGiant extends AdventureCard { // Storm Reading // Draw four cards, then discard two cards. this.getSpellCard().getSpellAbility().addEffect(new DrawDiscardControllerEffect(4, 2)); + + this.finalizeAdventure(); } private GalvanicGiant(final GalvanicGiant card) { diff --git a/Mage.Sets/src/mage/cards/g/GarenbrigCarver.java b/Mage.Sets/src/mage/cards/g/GarenbrigCarver.java index 403e453f53e..e3c5190e19a 100644 --- a/Mage.Sets/src/mage/cards/g/GarenbrigCarver.java +++ b/Mage.Sets/src/mage/cards/g/GarenbrigCarver.java @@ -28,6 +28,8 @@ public final class GarenbrigCarver extends AdventureCard { // Target creature gets +2/+2 until end of turn. this.getSpellCard().getSpellAbility().addEffect(new BoostTargetEffect(2, 2, Duration.EndOfTurn)); this.getSpellCard().getSpellAbility().addTarget(new TargetCreaturePermanent()); + + this.finalizeAdventure(); } private GarenbrigCarver(final GarenbrigCarver card) { diff --git a/Mage.Sets/src/mage/cards/g/GhostLantern.java b/Mage.Sets/src/mage/cards/g/GhostLantern.java index a1172922d36..f5b6e142f4e 100644 --- a/Mage.Sets/src/mage/cards/g/GhostLantern.java +++ b/Mage.Sets/src/mage/cards/g/GhostLantern.java @@ -1,21 +1,21 @@ package mage.cards.g; import mage.abilities.common.DiesCreatureTriggeredAbility; +import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect; import mage.abilities.effects.common.counter.AddCountersAttachedEffect; import mage.abilities.keyword.EquipAbility; import mage.cards.AdventureCard; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.Outcome; import mage.constants.SubType; import mage.counters.CounterType; import mage.filter.StaticFilters; import mage.target.common.TargetCardInYourGraveyard; +import mage.target.common.TargetControlledCreaturePermanent; import java.util.UUID; -import mage.abilities.costs.mana.GenericManaCost; -import mage.constants.Outcome; -import mage.target.common.TargetControlledCreaturePermanent; /** * @author TheElk801 @@ -39,6 +39,8 @@ public final class GhostLantern extends AdventureCard { // Return target creature card from your graveyard to your hand. this.getSpellCard().getSpellAbility().addEffect(new ReturnFromGraveyardToHandTargetEffect()); this.getSpellCard().getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD)); + + this.finalizeAdventure(); } private GhostLantern(final GhostLantern card) { diff --git a/Mage.Sets/src/mage/cards/g/GiantKiller.java b/Mage.Sets/src/mage/cards/g/GiantKiller.java index f0d9b71c74b..366388556b1 100644 --- a/Mage.Sets/src/mage/cards/g/GiantKiller.java +++ b/Mage.Sets/src/mage/cards/g/GiantKiller.java @@ -49,6 +49,8 @@ public final class GiantKiller extends AdventureCard { // Destroy target creature with power 4 or greater. this.getSpellCard().getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellCard().getSpellAbility().addTarget(new TargetPermanent(filter)); + + this.finalizeAdventure(); } private GiantKiller(final GiantKiller card) { diff --git a/Mage.Sets/src/mage/cards/g/GingerbreadHunter.java b/Mage.Sets/src/mage/cards/g/GingerbreadHunter.java index b4e4099310a..361d500303a 100644 --- a/Mage.Sets/src/mage/cards/g/GingerbreadHunter.java +++ b/Mage.Sets/src/mage/cards/g/GingerbreadHunter.java @@ -32,6 +32,8 @@ public final class GingerbreadHunter extends AdventureCard { // Target creature gets -2/-2 until end of turn. this.getSpellCard().getSpellAbility().addEffect(new BoostTargetEffect(-2, -2)); this.getSpellCard().getSpellAbility().addTarget(new TargetCreaturePermanent()); + + this.finalizeAdventure(); } private GingerbreadHunter(final GingerbreadHunter card) { diff --git a/Mage.Sets/src/mage/cards/g/GrabbyGiant.java b/Mage.Sets/src/mage/cards/g/GrabbyGiant.java index 18e2ed327e6..4b17d9d5501 100644 --- a/Mage.Sets/src/mage/cards/g/GrabbyGiant.java +++ b/Mage.Sets/src/mage/cards/g/GrabbyGiant.java @@ -52,6 +52,8 @@ public final class GrabbyGiant extends AdventureCard { // That's Mine // Create a Treasure token. this.getSpellCard().getSpellAbility().addEffect(new CreateTokenEffect(new TreasureToken())); + + this.finalizeAdventure(); } private GrabbyGiant(final GrabbyGiant card) { diff --git a/Mage.Sets/src/mage/cards/g/GraySlaad.java b/Mage.Sets/src/mage/cards/g/GraySlaad.java index beb85c625c2..65142df611b 100644 --- a/Mage.Sets/src/mage/cards/g/GraySlaad.java +++ b/Mage.Sets/src/mage/cards/g/GraySlaad.java @@ -48,6 +48,8 @@ public final class GraySlaad extends AdventureCard { // Entropic Decay // Mill four cards. this.getSpellCard().getSpellAbility().addEffect(new MillCardsControllerEffect(4)); + + this.finalizeAdventure(); } private GraySlaad(final GraySlaad card) { diff --git a/Mage.Sets/src/mage/cards/g/GuardianNaga.java b/Mage.Sets/src/mage/cards/g/GuardianNaga.java index 5e90709c6fd..45b4996c22b 100644 --- a/Mage.Sets/src/mage/cards/g/GuardianNaga.java +++ b/Mage.Sets/src/mage/cards/g/GuardianNaga.java @@ -42,6 +42,8 @@ public final class GuardianNaga extends AdventureCard { // Exile target artifact or enchantment. this.getSpellCard().getSpellAbility().addEffect(new ExileTargetEffect()); this.getSpellCard().getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); + + this.finalizeAdventure(); } private GuardianNaga(final GuardianNaga card) { diff --git a/Mage.Sets/src/mage/cards/g/GumdropPoisoner.java b/Mage.Sets/src/mage/cards/g/GumdropPoisoner.java index e12310909b6..8fb5f9e9e32 100644 --- a/Mage.Sets/src/mage/cards/g/GumdropPoisoner.java +++ b/Mage.Sets/src/mage/cards/g/GumdropPoisoner.java @@ -46,6 +46,8 @@ public final class GumdropPoisoner extends AdventureCard { // Tempt with Treats // Create a Food token. this.getSpellCard().getSpellAbility().addEffect(new CreateTokenEffect(new FoodToken())); + + this.finalizeAdventure(); } private GumdropPoisoner(final GumdropPoisoner card) { diff --git a/Mage.Sets/src/mage/cards/h/HeartflameDuelist.java b/Mage.Sets/src/mage/cards/h/HeartflameDuelist.java index 40705d60d53..0569158ee33 100644 --- a/Mage.Sets/src/mage/cards/h/HeartflameDuelist.java +++ b/Mage.Sets/src/mage/cards/h/HeartflameDuelist.java @@ -44,6 +44,8 @@ public final class HeartflameDuelist extends AdventureCard { // Heartflame Slash deals 3 damage to any target. this.getSpellCard().getSpellAbility().addEffect(new DamageTargetEffect(3)); this.getSpellCard().getSpellAbility().addTarget(new TargetAnyTarget()); + + this.finalizeAdventure(); } private HeartflameDuelist(final HeartflameDuelist card) { @@ -54,4 +56,4 @@ public final class HeartflameDuelist extends AdventureCard { public HeartflameDuelist copy() { return new HeartflameDuelist(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/h/HearthElemental.java b/Mage.Sets/src/mage/cards/h/HearthElemental.java index b9ef6557b25..8852c97cec2 100644 --- a/Mage.Sets/src/mage/cards/h/HearthElemental.java +++ b/Mage.Sets/src/mage/cards/h/HearthElemental.java @@ -59,6 +59,8 @@ public final class HearthElemental extends AdventureCard { this.getSpellCard().getSpellAbility().addEffect(new DiscardHandControllerEffect()); this.getSpellCard().getSpellAbility().addEffect(new DrawCardSourceControllerEffect(2) .concatBy(", then")); + + this.finalizeAdventure(); } private HearthElemental(final HearthElemental card) { diff --git a/Mage.Sets/src/mage/cards/h/HollowScavenger.java b/Mage.Sets/src/mage/cards/h/HollowScavenger.java index cdb8e161875..7b2df808ad8 100644 --- a/Mage.Sets/src/mage/cards/h/HollowScavenger.java +++ b/Mage.Sets/src/mage/cards/h/HollowScavenger.java @@ -39,6 +39,8 @@ public final class HollowScavenger extends AdventureCard { // Bakery Raid // Create a Food token. this.getSpellCard().getSpellAbility().addEffect(new CreateTokenEffect(new FoodToken())); + + this.finalizeAdventure(); } private HollowScavenger(final HollowScavenger card) { diff --git a/Mage.Sets/src/mage/cards/h/HornOfValhalla.java b/Mage.Sets/src/mage/cards/h/HornOfValhalla.java index 52573c3bd1e..ff6a69d2d16 100644 --- a/Mage.Sets/src/mage/cards/h/HornOfValhalla.java +++ b/Mage.Sets/src/mage/cards/h/HornOfValhalla.java @@ -1,6 +1,7 @@ package mage.cards.h; import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.dynamicvalue.common.CreaturesYouControlCount; import mage.abilities.dynamicvalue.common.ManacostVariableValue; import mage.abilities.effects.common.CreateTokenEffect; @@ -10,13 +11,12 @@ import mage.abilities.keyword.EquipAbility; import mage.cards.AdventureCard; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.Outcome; import mage.constants.SubType; import mage.game.permanent.token.SoldierToken; +import mage.target.common.TargetControlledCreaturePermanent; import java.util.UUID; -import mage.abilities.costs.mana.GenericManaCost; -import mage.constants.Outcome; -import mage.target.common.TargetControlledCreaturePermanent; /** * @author TheElk801 @@ -41,6 +41,8 @@ public final class HornOfValhalla extends AdventureCard { this.getSpellCard().getSpellAbility().addEffect(new CreateTokenEffect( new SoldierToken(), ManacostVariableValue.REGULAR )); + + this.finalizeAdventure(); } private HornOfValhalla(final HornOfValhalla card) { diff --git a/Mage.Sets/src/mage/cards/h/HornedLochWhale.java b/Mage.Sets/src/mage/cards/h/HornedLochWhale.java index 5faba9c245c..b8557446860 100644 --- a/Mage.Sets/src/mage/cards/h/HornedLochWhale.java +++ b/Mage.Sets/src/mage/cards/h/HornedLochWhale.java @@ -54,6 +54,8 @@ public final class HornedLochWhale extends AdventureCard { // The owner of target attacking creature you don't control puts it on the top or bottom of their library. this.getSpellCard().getSpellAbility().addEffect(new PutOnTopOrBottomLibraryTargetEffect()); this.getSpellCard().getSpellAbility().addTarget(new TargetPermanent(filter)); + + this.finalizeAdventure(); } private HornedLochWhale(final HornedLochWhale card) { diff --git a/Mage.Sets/src/mage/cards/h/HypnoticSprite.java b/Mage.Sets/src/mage/cards/h/HypnoticSprite.java index 205199389c8..517d949625b 100644 --- a/Mage.Sets/src/mage/cards/h/HypnoticSprite.java +++ b/Mage.Sets/src/mage/cards/h/HypnoticSprite.java @@ -39,6 +39,8 @@ public final class HypnoticSprite extends AdventureCard { // Counter target spell with converted mana cost 3 or less. this.getSpellCard().getSpellAbility().addEffect(new CounterTargetEffect()); this.getSpellCard().getSpellAbility().addTarget(new TargetSpell(filter)); + + this.finalizeAdventure(); } private HypnoticSprite(final HypnoticSprite card) { diff --git a/Mage.Sets/src/mage/cards/i/ImodanesRecruiter.java b/Mage.Sets/src/mage/cards/i/ImodanesRecruiter.java index cbc8aae072b..e6cb4070ffa 100644 --- a/Mage.Sets/src/mage/cards/i/ImodanesRecruiter.java +++ b/Mage.Sets/src/mage/cards/i/ImodanesRecruiter.java @@ -44,6 +44,8 @@ public final class ImodanesRecruiter extends AdventureCard { // Train Troops // Create two 2/2 white Knight creature tokens with vigilance. this.getSpellCard().getSpellAbility().addEffect(new CreateTokenEffect(new KnightToken(), 2)); + + this.finalizeAdventure(); } private ImodanesRecruiter(final ImodanesRecruiter card) { diff --git a/Mage.Sets/src/mage/cards/i/IntrepidTrufflesnout.java b/Mage.Sets/src/mage/cards/i/IntrepidTrufflesnout.java index 2e9acbba457..397eb1f3b63 100644 --- a/Mage.Sets/src/mage/cards/i/IntrepidTrufflesnout.java +++ b/Mage.Sets/src/mage/cards/i/IntrepidTrufflesnout.java @@ -21,7 +21,7 @@ public final class IntrepidTrufflesnout extends AdventureCard { public IntrepidTrufflesnout(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, new CardType[]{CardType.INSTANT}, "{1}{G}", "Go Hog Wild", "{1}{G}"); - + this.subtype.add(SubType.BOAR); this.power = new MageInt(3); this.toughness = new MageInt(1); @@ -32,6 +32,8 @@ public final class IntrepidTrufflesnout extends AdventureCard { // Target creature gets +2/+2 until end of turn. this.getSpellCard().getSpellAbility().addEffect(new BoostTargetEffect(2, 2, Duration.EndOfTurn)); this.getSpellCard().getSpellAbility().addTarget(new TargetCreaturePermanent()); + + this.finalizeAdventure(); } private IntrepidTrufflesnout(final IntrepidTrufflesnout card) { diff --git a/Mage.Sets/src/mage/cards/k/KellanTheFaeBlooded.java b/Mage.Sets/src/mage/cards/k/KellanTheFaeBlooded.java index 3879f9458d0..02b416e69e9 100644 --- a/Mage.Sets/src/mage/cards/k/KellanTheFaeBlooded.java +++ b/Mage.Sets/src/mage/cards/k/KellanTheFaeBlooded.java @@ -58,6 +58,8 @@ public final class KellanTheFaeBlooded extends AdventureCard { // Birthright Boon // Search your library for an Aura or Equipment card, reveal it, put it into your hand, then shuffle. this.getSpellCard().getSpellAbility().addEffect(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(auraOrEquipmentCard), true)); + + this.finalizeAdventure(); } private KellanTheFaeBlooded(final KellanTheFaeBlooded card) { diff --git a/Mage.Sets/src/mage/cards/l/LonesomeUnicorn.java b/Mage.Sets/src/mage/cards/l/LonesomeUnicorn.java index fefbe07474b..06839e8b9d8 100644 --- a/Mage.Sets/src/mage/cards/l/LonesomeUnicorn.java +++ b/Mage.Sets/src/mage/cards/l/LonesomeUnicorn.java @@ -29,6 +29,8 @@ public final class LonesomeUnicorn extends AdventureCard { // Rider in Need // Create a 2/2 white Knight creature token with vigilance. this.getSpellCard().getSpellAbility().addEffect(new CreateTokenEffect(new KnightToken())); + + this.finalizeAdventure(); } private LonesomeUnicorn(final LonesomeUnicorn card) { diff --git a/Mage.Sets/src/mage/cards/l/LovestruckBeast.java b/Mage.Sets/src/mage/cards/l/LovestruckBeast.java index 8c4904ccfb0..753286c5573 100644 --- a/Mage.Sets/src/mage/cards/l/LovestruckBeast.java +++ b/Mage.Sets/src/mage/cards/l/LovestruckBeast.java @@ -40,6 +40,8 @@ public final class LovestruckBeast extends AdventureCard { // Heart's Desire // Create a 1/1 white Human creature token. this.getSpellCard().getSpellAbility().addEffect(new CreateTokenEffect(new HumanToken())); + + this.finalizeAdventure(); } private LovestruckBeast(final LovestruckBeast card) { diff --git a/Mage.Sets/src/mage/cards/m/MerchantOfTheVale.java b/Mage.Sets/src/mage/cards/m/MerchantOfTheVale.java index 0a82b50f9ca..3081351d15d 100644 --- a/Mage.Sets/src/mage/cards/m/MerchantOfTheVale.java +++ b/Mage.Sets/src/mage/cards/m/MerchantOfTheVale.java @@ -39,6 +39,8 @@ public final class MerchantOfTheVale extends AdventureCard { this.getSpellCard().getSpellAbility().addEffect(new DoIfCostPaid( new DrawCardSourceControllerEffect(1), new DiscardCardCost() )); + + this.finalizeAdventure(); } private MerchantOfTheVale(final MerchantOfTheVale card) { diff --git a/Mage.Sets/src/mage/cards/m/MerfolkSecretkeeper.java b/Mage.Sets/src/mage/cards/m/MerfolkSecretkeeper.java index c767db74dcd..2bc600035ad 100644 --- a/Mage.Sets/src/mage/cards/m/MerfolkSecretkeeper.java +++ b/Mage.Sets/src/mage/cards/m/MerfolkSecretkeeper.java @@ -27,6 +27,8 @@ public final class MerfolkSecretkeeper extends AdventureCard { // Target player puts the top four cards of their library into their graveyard. this.getSpellCard().getSpellAbility().addEffect(new MillCardsTargetEffect(4)); this.getSpellCard().getSpellAbility().addTarget(new TargetPlayer()); + + this.finalizeAdventure(); } private MerfolkSecretkeeper(final MerfolkSecretkeeper card) { diff --git a/Mage.Sets/src/mage/cards/m/MinecartDaredevil.java b/Mage.Sets/src/mage/cards/m/MinecartDaredevil.java index 14a36924c26..8c3c00e3e84 100644 --- a/Mage.Sets/src/mage/cards/m/MinecartDaredevil.java +++ b/Mage.Sets/src/mage/cards/m/MinecartDaredevil.java @@ -27,6 +27,8 @@ public final class MinecartDaredevil extends AdventureCard { // Target creature gets +2/+1 until end of turn. this.getSpellCard().getSpellAbility().addEffect(new BoostTargetEffect(2, 1)); this.getSpellCard().getSpellAbility().addTarget(new TargetCreaturePermanent()); + + this.finalizeAdventure(); } private MinecartDaredevil(final MinecartDaredevil card) { diff --git a/Mage.Sets/src/mage/cards/m/MonsterManual.java b/Mage.Sets/src/mage/cards/m/MonsterManual.java index be2cb0c7c4a..a1a17bff4b1 100644 --- a/Mage.Sets/src/mage/cards/m/MonsterManual.java +++ b/Mage.Sets/src/mage/cards/m/MonsterManual.java @@ -36,6 +36,8 @@ public final class MonsterManual extends AdventureCard { // Zoological Study // Mill five cards, then return a creature card milled this way to your hand. this.getSpellCard().getSpellAbility().addEffect(new ZoologicalStudyEffect()); + + this.finalizeAdventure(); } private MonsterManual(final MonsterManual card) { diff --git a/Mage.Sets/src/mage/cards/m/MoonshaePixie.java b/Mage.Sets/src/mage/cards/m/MoonshaePixie.java index 77f02135983..c89492d6430 100644 --- a/Mage.Sets/src/mage/cards/m/MoonshaePixie.java +++ b/Mage.Sets/src/mage/cards/m/MoonshaePixie.java @@ -55,6 +55,8 @@ public final class MoonshaePixie extends AdventureCard { this.getSpellCard().getSpellAbility().addTarget(new TargetPermanent( 0, 3, StaticFilters.FILTER_PERMANENT_CREATURES )); + + this.finalizeAdventure(); } private MoonshaePixie(final MoonshaePixie card) { diff --git a/Mage.Sets/src/mage/cards/m/MosswoodDreadknight.java b/Mage.Sets/src/mage/cards/m/MosswoodDreadknight.java index 597c16d2bce..af7a162b883 100644 --- a/Mage.Sets/src/mage/cards/m/MosswoodDreadknight.java +++ b/Mage.Sets/src/mage/cards/m/MosswoodDreadknight.java @@ -39,6 +39,8 @@ public final class MosswoodDreadknight extends AdventureCard { // You draw a card and you lose 1 life. this.getSpellCard().getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); this.getSpellCard().getSpellAbility().addEffect(new LoseLifeSourceControllerEffect(1).concatBy("and")); + + this.finalizeAdventure(); } private MosswoodDreadknight(final MosswoodDreadknight card) { diff --git a/Mage.Sets/src/mage/cards/m/MurderousRider.java b/Mage.Sets/src/mage/cards/m/MurderousRider.java index cc42e69eaa1..845ac4904e4 100644 --- a/Mage.Sets/src/mage/cards/m/MurderousRider.java +++ b/Mage.Sets/src/mage/cards/m/MurderousRider.java @@ -4,14 +4,15 @@ import mage.MageInt; import mage.abilities.common.DiesSourceTriggeredAbility; import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.LoseLifeSourceControllerEffect; +import mage.abilities.effects.common.PutOnLibrarySourceEffect; import mage.abilities.keyword.LifelinkAbility; import mage.cards.AdventureCard; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.target.common.TargetCreatureOrPlaneswalker; + import java.util.UUID; -import mage.abilities.effects.common.PutOnLibrarySourceEffect; /** * @author TheElk801 @@ -41,6 +42,8 @@ public final class MurderousRider extends AdventureCard { new LoseLifeSourceControllerEffect(2).setText("You lose 2 life.") ); this.getSpellCard().getSpellAbility().addTarget(new TargetCreatureOrPlaneswalker()); + + this.finalizeAdventure(); } private MurderousRider(final MurderousRider card) { diff --git a/Mage.Sets/src/mage/cards/o/OakhameRanger.java b/Mage.Sets/src/mage/cards/o/OakhameRanger.java index 2402b9eedaf..4f3500f0fff 100644 --- a/Mage.Sets/src/mage/cards/o/OakhameRanger.java +++ b/Mage.Sets/src/mage/cards/o/OakhameRanger.java @@ -36,6 +36,8 @@ public final class OakhameRanger extends AdventureCard { // Bring Back // Create two 1/1 white Human creature tokens. this.getSpellCard().getSpellAbility().addEffect(new CreateTokenEffect(new HumanToken(), 2)); + + this.finalizeAdventure(); } private OakhameRanger(final OakhameRanger card) { diff --git a/Mage.Sets/src/mage/cards/o/ObyrasAttendants.java b/Mage.Sets/src/mage/cards/o/ObyrasAttendants.java index 766f220abd2..2346b76826f 100644 --- a/Mage.Sets/src/mage/cards/o/ObyrasAttendants.java +++ b/Mage.Sets/src/mage/cards/o/ObyrasAttendants.java @@ -31,6 +31,8 @@ public final class ObyrasAttendants extends AdventureCard { // Target creature gets -4/-0 until end of turn. this.getSpellCard().getSpellAbility().addEffect(new BoostTargetEffect(-4, 0)); this.getSpellCard().getSpellAbility().addTarget(new TargetCreaturePermanent()); + + this.finalizeAdventure(); } private ObyrasAttendants(final ObyrasAttendants card) { diff --git a/Mage.Sets/src/mage/cards/o/OrderOfMidnight.java b/Mage.Sets/src/mage/cards/o/OrderOfMidnight.java index 9829efb2a30..7b1d3a339c3 100644 --- a/Mage.Sets/src/mage/cards/o/OrderOfMidnight.java +++ b/Mage.Sets/src/mage/cards/o/OrderOfMidnight.java @@ -36,6 +36,8 @@ public final class OrderOfMidnight extends AdventureCard { // Return target creature card from your graveyard to your hand. this.getSpellCard().getSpellAbility().addEffect(new ReturnFromGraveyardToHandTargetEffect()); this.getSpellCard().getSpellAbility().addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD)); + + this.finalizeAdventure(); } private OrderOfMidnight(final OrderOfMidnight card) { diff --git a/Mage.Sets/src/mage/cards/p/PegasusGuardian.java b/Mage.Sets/src/mage/cards/p/PegasusGuardian.java index 683623c2a5f..3bd677590dc 100644 --- a/Mage.Sets/src/mage/cards/p/PegasusGuardian.java +++ b/Mage.Sets/src/mage/cards/p/PegasusGuardian.java @@ -42,6 +42,8 @@ public final class PegasusGuardian extends AdventureCard { // Exile target creature you control, then return that card to the battlefield under its owner's control. this.getSpellCard().getSpellAbility().addEffect(new ExileThenReturnTargetEffect(false, true)); this.getSpellCard().getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); + + this.finalizeAdventure(); } private PegasusGuardian(final PegasusGuardian card) { diff --git a/Mage.Sets/src/mage/cards/p/PicklockPrankster.java b/Mage.Sets/src/mage/cards/p/PicklockPrankster.java index aa6d576adf9..546bb8780d6 100644 --- a/Mage.Sets/src/mage/cards/p/PicklockPrankster.java +++ b/Mage.Sets/src/mage/cards/p/PicklockPrankster.java @@ -45,6 +45,8 @@ public final class PicklockPrankster extends AdventureCard { // Free the Fae // Mill four cards. Then put an instant, sorcery, or Faerie card from among the milled cards into your hand. this.getSpellCard().getSpellAbility().addEffect(new MillThenPutInHandEffect(4, filter)); + + this.finalizeAdventure(); } private PicklockPrankster(final PicklockPrankster card) { diff --git a/Mage.Sets/src/mage/cards/p/PicnicRuiner.java b/Mage.Sets/src/mage/cards/p/PicnicRuiner.java index ea53cb989e0..d7eeb6c0ab7 100644 --- a/Mage.Sets/src/mage/cards/p/PicnicRuiner.java +++ b/Mage.Sets/src/mage/cards/p/PicnicRuiner.java @@ -49,6 +49,8 @@ public final class PicnicRuiner extends AdventureCard { this.getSpellCard().getSpellAbility().addTarget( new TargetCreaturePermanentAmount(3, StaticFilters.FILTER_CONTROLLED_CREATURES) ); + + this.finalizeAdventure(); } private PicnicRuiner(final PicnicRuiner card) { diff --git a/Mage.Sets/src/mage/cards/p/PollenShieldHare.java b/Mage.Sets/src/mage/cards/p/PollenShieldHare.java index e587ab301d6..ca5d47e011e 100644 --- a/Mage.Sets/src/mage/cards/p/PollenShieldHare.java +++ b/Mage.Sets/src/mage/cards/p/PollenShieldHare.java @@ -48,6 +48,8 @@ public final class PollenShieldHare extends AdventureCard { ); this.getSpellCard().getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); this.getSpellCard().getSpellAbility().addHint(CreaturesYouControlHint.instance); + + this.finalizeAdventure(); } private PollenShieldHare(final PollenShieldHare card) { diff --git a/Mage.Sets/src/mage/cards/q/QueenOfIce.java b/Mage.Sets/src/mage/cards/q/QueenOfIce.java index 4680279dc98..586a4e5062b 100644 --- a/Mage.Sets/src/mage/cards/q/QueenOfIce.java +++ b/Mage.Sets/src/mage/cards/q/QueenOfIce.java @@ -43,6 +43,8 @@ public final class QueenOfIce extends AdventureCard { this.getSpellCard().getSpellAbility().addEffect(new DontUntapInControllersNextUntapStepTargetEffect() .setText("It doesn't untap during its controller's next untap step")); this.getSpellCard().getSpellAbility().addTarget(new TargetCreaturePermanent()); + + this.finalizeAdventure(); } private QueenOfIce(final QueenOfIce card) { diff --git a/Mage.Sets/src/mage/cards/q/QuestingDruid.java b/Mage.Sets/src/mage/cards/q/QuestingDruid.java index f3f93b62b9d..fae71344abd 100644 --- a/Mage.Sets/src/mage/cards/q/QuestingDruid.java +++ b/Mage.Sets/src/mage/cards/q/QuestingDruid.java @@ -51,6 +51,8 @@ public final class QuestingDruid extends AdventureCard { this.getSpellCard().getSpellAbility().addEffect( new ExileTopXMayPlayUntilEndOfTurnEffect(2, false, Duration.UntilYourNextEndStep) ); + + this.finalizeAdventure(); } private QuestingDruid(final QuestingDruid card) { diff --git a/Mage.Sets/src/mage/cards/r/RatcatcherTrainee.java b/Mage.Sets/src/mage/cards/r/RatcatcherTrainee.java index c601b54edf2..026a80259da 100644 --- a/Mage.Sets/src/mage/cards/r/RatcatcherTrainee.java +++ b/Mage.Sets/src/mage/cards/r/RatcatcherTrainee.java @@ -39,6 +39,8 @@ public final class RatcatcherTrainee extends AdventureCard { // Pest Problem // Create two 1/1 black Rat creature tokens with "This creature can’t block." this.getSpellCard().getSpellAbility().addEffect(new CreateTokenEffect(new RatCantBlockToken(), 2)); + + this.finalizeAdventure(); } private RatcatcherTrainee(final RatcatcherTrainee card) { diff --git a/Mage.Sets/src/mage/cards/r/RealmCloakedGiant.java b/Mage.Sets/src/mage/cards/r/RealmCloakedGiant.java index 3357497396b..368baaad9aa 100644 --- a/Mage.Sets/src/mage/cards/r/RealmCloakedGiant.java +++ b/Mage.Sets/src/mage/cards/r/RealmCloakedGiant.java @@ -37,6 +37,8 @@ public final class RealmCloakedGiant extends AdventureCard { // Cast Off // Destroy all non-Giant creatures. this.getSpellCard().getSpellAbility().addEffect(new DestroyAllEffect(filter)); + + this.finalizeAdventure(); } private RealmCloakedGiant(final RealmCloakedGiant card) { diff --git a/Mage.Sets/src/mage/cards/r/ReaperOfNight.java b/Mage.Sets/src/mage/cards/r/ReaperOfNight.java index 580020f7741..c65a5f356a9 100644 --- a/Mage.Sets/src/mage/cards/r/ReaperOfNight.java +++ b/Mage.Sets/src/mage/cards/r/ReaperOfNight.java @@ -43,6 +43,8 @@ public final class ReaperOfNight extends AdventureCard { // Target opponent discards two cards. this.getSpellCard().getSpellAbility().addEffect(new DiscardTargetEffect(2)); this.getSpellCard().getSpellAbility().addTarget(new TargetOpponent()); + + this.finalizeAdventure(); } private ReaperOfNight(final ReaperOfNight card) { diff --git a/Mage.Sets/src/mage/cards/r/RimrockKnight.java b/Mage.Sets/src/mage/cards/r/RimrockKnight.java index da237fdba34..78142cd1019 100644 --- a/Mage.Sets/src/mage/cards/r/RimrockKnight.java +++ b/Mage.Sets/src/mage/cards/r/RimrockKnight.java @@ -32,6 +32,8 @@ public final class RimrockKnight extends AdventureCard { // Target creature gets +2/+0 until end of turn. this.getSpellCard().getSpellAbility().addEffect(new BoostTargetEffect(2, 0, Duration.EndOfTurn)); this.getSpellCard().getSpellAbility().addTarget(new TargetCreaturePermanent()); + + this.finalizeAdventure(); } private RimrockKnight(final RimrockKnight card) { diff --git a/Mage.Sets/src/mage/cards/r/RosethornAcolyte.java b/Mage.Sets/src/mage/cards/r/RosethornAcolyte.java index 354131f372f..85a0e393fbc 100644 --- a/Mage.Sets/src/mage/cards/r/RosethornAcolyte.java +++ b/Mage.Sets/src/mage/cards/r/RosethornAcolyte.java @@ -29,6 +29,8 @@ public final class RosethornAcolyte extends AdventureCard { // Seasonal Ritual // Add one mana of any color. this.getSpellCard().getSpellAbility().addEffect(new AddManaOfAnyColorEffect()); + + this.finalizeAdventure(); } private RosethornAcolyte(final RosethornAcolyte card) { diff --git a/Mage.Sets/src/mage/cards/s/SapphireDragon.java b/Mage.Sets/src/mage/cards/s/SapphireDragon.java index 7205adf6626..171fa833aff 100644 --- a/Mage.Sets/src/mage/cards/s/SapphireDragon.java +++ b/Mage.Sets/src/mage/cards/s/SapphireDragon.java @@ -36,6 +36,8 @@ public final class SapphireDragon extends AdventureCard { // Counter target noncreature spell. this.getSpellCard().getSpellAbility().addEffect(new CounterTargetEffect()); this.getSpellCard().getSpellAbility().addTarget(new TargetSpell(StaticFilters.FILTER_SPELL_NON_CREATURE)); + + this.finalizeAdventure(); } private SapphireDragon(final SapphireDragon card) { diff --git a/Mage.Sets/src/mage/cards/s/ScaldingViper.java b/Mage.Sets/src/mage/cards/s/ScaldingViper.java index 6c2ef5d5f06..f0e17f5f7fc 100644 --- a/Mage.Sets/src/mage/cards/s/ScaldingViper.java +++ b/Mage.Sets/src/mage/cards/s/ScaldingViper.java @@ -42,6 +42,8 @@ public final class ScaldingViper extends AdventureCard { // Return target nonland permanent to its owner's hand. this.getSpellCard().getSpellAbility().addEffect(new ReturnToHandTargetEffect()); this.getSpellCard().getSpellAbility().addTarget(new TargetNonlandPermanent()); + + this.finalizeAdventure(); } private ScaldingViper(final ScaldingViper card) { diff --git a/Mage.Sets/src/mage/cards/s/SeaHag.java b/Mage.Sets/src/mage/cards/s/SeaHag.java index c6d6d00726e..83195cfcbd4 100644 --- a/Mage.Sets/src/mage/cards/s/SeaHag.java +++ b/Mage.Sets/src/mage/cards/s/SeaHag.java @@ -38,6 +38,8 @@ public final class SeaHag extends AdventureCard { this.getSpellCard().getSpellAbility().addEffect(new BoostTargetEffect(1, 0).setText("up to two target creatures each get +1/+0 until end of turn")); this.getSpellCard().getSpellAbility().addEffect(new CantBeBlockedTargetEffect().setText("and can't be blocked this turn")); this.getSpellCard().getSpellAbility().addTarget(new TargetCreaturePermanent(0, 2)); + + this.finalizeAdventure(); } private SeaHag(final SeaHag card) { diff --git a/Mage.Sets/src/mage/cards/s/ShepherdOfTheFlock.java b/Mage.Sets/src/mage/cards/s/ShepherdOfTheFlock.java index 2d08c676f9b..36bc710f50f 100644 --- a/Mage.Sets/src/mage/cards/s/ShepherdOfTheFlock.java +++ b/Mage.Sets/src/mage/cards/s/ShepherdOfTheFlock.java @@ -27,6 +27,8 @@ public final class ShepherdOfTheFlock extends AdventureCard { // Return target permanent you control to its owner’s hand. this.getSpellCard().getSpellAbility().addEffect(new ReturnToHandTargetEffect()); this.getSpellCard().getSpellAbility().addTarget(new TargetControlledPermanent()); + + this.finalizeAdventure(); } private ShepherdOfTheFlock(final ShepherdOfTheFlock card) { diff --git a/Mage.Sets/src/mage/cards/s/ShroudedShepherd.java b/Mage.Sets/src/mage/cards/s/ShroudedShepherd.java index ed38ddbaa2e..5bec1e9c473 100644 --- a/Mage.Sets/src/mage/cards/s/ShroudedShepherd.java +++ b/Mage.Sets/src/mage/cards/s/ShroudedShepherd.java @@ -39,6 +39,8 @@ public final class ShroudedShepherd extends AdventureCard { -1, -1, Duration.EndOfTurn, StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURES, false )); + + this.finalizeAdventure(); } private ShroudedShepherd(final ShroudedShepherd card) { diff --git a/Mage.Sets/src/mage/cards/s/SilverflameSquire.java b/Mage.Sets/src/mage/cards/s/SilverflameSquire.java index 6f0f0b7e8ce..e793aaa9943 100644 --- a/Mage.Sets/src/mage/cards/s/SilverflameSquire.java +++ b/Mage.Sets/src/mage/cards/s/SilverflameSquire.java @@ -30,6 +30,8 @@ public final class SilverflameSquire extends AdventureCard { this.getSpellCard().getSpellAbility().addEffect(new BoostTargetEffect(2, 2, Duration.EndOfTurn)); this.getSpellCard().getSpellAbility().addEffect(new UntapTargetEffect().setText("Untap it")); this.getSpellCard().getSpellAbility().addTarget(new TargetCreaturePermanent()); + + this.finalizeAdventure(); } private SilverflameSquire(final SilverflameSquire card) { diff --git a/Mage.Sets/src/mage/cards/s/SmittenSwordmaster.java b/Mage.Sets/src/mage/cards/s/SmittenSwordmaster.java index 673f947b493..d8fc7d58c18 100644 --- a/Mage.Sets/src/mage/cards/s/SmittenSwordmaster.java +++ b/Mage.Sets/src/mage/cards/s/SmittenSwordmaster.java @@ -34,6 +34,8 @@ public final class SmittenSwordmaster extends AdventureCard { // Curry Favor // You gain X life and each opponent loses X life, where X is the number of Knights you control. this.getSpellCard().getSpellAbility().addEffect(new CurryFavorEffect()); + + this.finalizeAdventure(); } private SmittenSwordmaster(final SmittenSwordmaster card) { diff --git a/Mage.Sets/src/mage/cards/s/SpellscornCoven.java b/Mage.Sets/src/mage/cards/s/SpellscornCoven.java index e6284d78be1..db2111635bc 100644 --- a/Mage.Sets/src/mage/cards/s/SpellscornCoven.java +++ b/Mage.Sets/src/mage/cards/s/SpellscornCoven.java @@ -37,6 +37,8 @@ public final class SpellscornCoven extends AdventureCard { // Return target spell to its owner's hand. this.getSpellCard().getSpellAbility().addEffect(new ReturnToHandTargetEffect()); this.getSpellCard().getSpellAbility().addTarget(new TargetSpell()); + + this.finalizeAdventure(); } private SpellscornCoven(final SpellscornCoven card) { diff --git a/Mage.Sets/src/mage/cards/s/StormkeldVanguard.java b/Mage.Sets/src/mage/cards/s/StormkeldVanguard.java index 41173a7c381..7d07adb4961 100644 --- a/Mage.Sets/src/mage/cards/s/StormkeldVanguard.java +++ b/Mage.Sets/src/mage/cards/s/StormkeldVanguard.java @@ -32,6 +32,8 @@ public final class StormkeldVanguard extends AdventureCard { // Destroy target artifact or enchantment. this.getSpellCard().getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellCard().getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); + + this.finalizeAdventure(); } private StormkeldVanguard(final StormkeldVanguard card) { diff --git a/Mage.Sets/src/mage/cards/s/SwordCoastSerpent.java b/Mage.Sets/src/mage/cards/s/SwordCoastSerpent.java index 699a6d0dba4..1a12aa1277a 100644 --- a/Mage.Sets/src/mage/cards/s/SwordCoastSerpent.java +++ b/Mage.Sets/src/mage/cards/s/SwordCoastSerpent.java @@ -43,6 +43,8 @@ public final class SwordCoastSerpent extends AdventureCard { // Return target creature to its owner's hand. this.getSpellCard().getSpellAbility().addEffect(new ReturnToHandTargetEffect()); this.getSpellCard().getSpellAbility().addTarget(new TargetCreaturePermanent()); + + this.finalizeAdventure(); } private SwordCoastSerpent(final SwordCoastSerpent card) { diff --git a/Mage.Sets/src/mage/cards/t/TempestHart.java b/Mage.Sets/src/mage/cards/t/TempestHart.java index aeede346fd3..eb7275e9151 100644 --- a/Mage.Sets/src/mage/cards/t/TempestHart.java +++ b/Mage.Sets/src/mage/cards/t/TempestHart.java @@ -46,6 +46,8 @@ public final class TempestHart extends AdventureCard { // Scan the Clouds // Draw two cards, then discard two cards. this.getSpellCard().getSpellAbility().addEffect(new DrawDiscardControllerEffect(2, 2)); + + this.finalizeAdventure(); } private TempestHart(final TempestHart card) { diff --git a/Mage.Sets/src/mage/cards/t/ThreadbindClique.java b/Mage.Sets/src/mage/cards/t/ThreadbindClique.java index 66a1e6161a4..be9d1580212 100644 --- a/Mage.Sets/src/mage/cards/t/ThreadbindClique.java +++ b/Mage.Sets/src/mage/cards/t/ThreadbindClique.java @@ -39,6 +39,8 @@ public final class ThreadbindClique extends AdventureCard { // Destroy target tapped creature. this.getSpellCard().getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellCard().getSpellAbility().addTarget(new TargetPermanent(filter)); + + this.finalizeAdventure(); } private ThreadbindClique(final ThreadbindClique card) { diff --git a/Mage.Sets/src/mage/cards/t/TopazDragon.java b/Mage.Sets/src/mage/cards/t/TopazDragon.java index c86ddc1e025..a22459a0453 100644 --- a/Mage.Sets/src/mage/cards/t/TopazDragon.java +++ b/Mage.Sets/src/mage/cards/t/TopazDragon.java @@ -37,6 +37,8 @@ public final class TopazDragon extends AdventureCard { DeathtouchAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_CONTROLLED_CREATURES )); + + this.finalizeAdventure(); } private TopazDragon(final TopazDragon card) { diff --git a/Mage.Sets/src/mage/cards/t/TuinvaleTreefolk.java b/Mage.Sets/src/mage/cards/t/TuinvaleTreefolk.java index ba0d79dc7be..af756d0ef43 100644 --- a/Mage.Sets/src/mage/cards/t/TuinvaleTreefolk.java +++ b/Mage.Sets/src/mage/cards/t/TuinvaleTreefolk.java @@ -28,6 +28,8 @@ public final class TuinvaleTreefolk extends AdventureCard { // Put two +1/+1 counters on target creature. this.getSpellCard().getSpellAbility().addEffect(new AddCountersTargetEffect(CounterType.P1P1.createInstance(2))); this.getSpellCard().getSpellAbility().addTarget(new TargetCreaturePermanent()); + + this.finalizeAdventure(); } private TuinvaleTreefolk(final TuinvaleTreefolk card) { diff --git a/Mage.Sets/src/mage/cards/t/TwiningTwins.java b/Mage.Sets/src/mage/cards/t/TwiningTwins.java index 4df5cfcbe58..6d0f5b5a8ce 100644 --- a/Mage.Sets/src/mage/cards/t/TwiningTwins.java +++ b/Mage.Sets/src/mage/cards/t/TwiningTwins.java @@ -51,6 +51,8 @@ public final class TwiningTwins extends AdventureCard { // Exile target nontoken creature. Return it to the battlefield under its owner’s control at the beginning of the next end step. this.getSpellCard().getSpellAbility().addEffect(new TwiningTwinsEffect()); this.getSpellCard().getSpellAbility().addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_CREATURE_NON_TOKEN)); + + this.finalizeAdventure(); } private TwiningTwins(final TwiningTwins card) { diff --git a/Mage.Sets/src/mage/cards/t/TwoHandedAxe.java b/Mage.Sets/src/mage/cards/t/TwoHandedAxe.java index 8831602e875..c85ddb11e74 100644 --- a/Mage.Sets/src/mage/cards/t/TwoHandedAxe.java +++ b/Mage.Sets/src/mage/cards/t/TwoHandedAxe.java @@ -40,6 +40,8 @@ public final class TwoHandedAxe extends AdventureCard { // Target creature you control gains double strike until end of turn. this.getSpellCard().getSpellAbility().addEffect(new GainAbilityTargetEffect(DoubleStrikeAbility.getInstance())); this.getSpellCard().getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); + + this.finalizeAdventure(); } private TwoHandedAxe(final TwoHandedAxe card) { diff --git a/Mage.Sets/src/mage/cards/t/TwoHeadedHunter.java b/Mage.Sets/src/mage/cards/t/TwoHeadedHunter.java index 11a05ff4ded..276bbd86d6d 100644 --- a/Mage.Sets/src/mage/cards/t/TwoHeadedHunter.java +++ b/Mage.Sets/src/mage/cards/t/TwoHeadedHunter.java @@ -31,6 +31,8 @@ public final class TwoHeadedHunter extends AdventureCard { // Target creature gains double strike until end of turn. this.getSpellCard().getSpellAbility().addEffect(new GainAbilityTargetEffect(DoubleStrikeAbility.getInstance())); this.getSpellCard().getSpellAbility().addTarget(new TargetCreaturePermanent()); + + this.finalizeAdventure(); } private TwoHeadedHunter(final TwoHeadedHunter card) { diff --git a/Mage.Sets/src/mage/cards/v/VantressTransmuter.java b/Mage.Sets/src/mage/cards/v/VantressTransmuter.java index 15be8954c72..891d5517c47 100644 --- a/Mage.Sets/src/mage/cards/v/VantressTransmuter.java +++ b/Mage.Sets/src/mage/cards/v/VantressTransmuter.java @@ -32,6 +32,8 @@ public final class VantressTransmuter extends AdventureCard { this.getSpellCard().getSpellAbility().addEffect(new CreateRoleAttachedTargetEffect(RoleType.CURSED) .setText("create a Cursed Role token attached to it")); this.getSpellCard().getSpellAbility().addTarget(new TargetCreaturePermanent()); + + this.finalizeAdventure(); } private VantressTransmuter(final VantressTransmuter card) { diff --git a/Mage.Sets/src/mage/cards/v/VirtueOfCourage.java b/Mage.Sets/src/mage/cards/v/VirtueOfCourage.java index f685f3fc207..250cf653aaa 100644 --- a/Mage.Sets/src/mage/cards/v/VirtueOfCourage.java +++ b/Mage.Sets/src/mage/cards/v/VirtueOfCourage.java @@ -29,6 +29,8 @@ public final class VirtueOfCourage extends AdventureCard { // Embereth Blaze deals 2 damage to any target. this.getSpellCard().getSpellAbility().addEffect(new DamageTargetEffect(2)); this.getSpellCard().getSpellAbility().addTarget(new TargetAnyTarget()); + + this.finalizeAdventure(); } private VirtueOfCourage(final VirtueOfCourage card) { diff --git a/Mage.Sets/src/mage/cards/v/VirtueOfKnowledge.java b/Mage.Sets/src/mage/cards/v/VirtueOfKnowledge.java index beaba06d0cc..14a450b82e0 100644 --- a/Mage.Sets/src/mage/cards/v/VirtueOfKnowledge.java +++ b/Mage.Sets/src/mage/cards/v/VirtueOfKnowledge.java @@ -34,6 +34,8 @@ public final class VirtueOfKnowledge extends AdventureCard { // Copy target activated or triggered ability you control. You may choose new targets for the copy. this.getSpellCard().getSpellAbility().addEffect(new CopyTargetStackAbilityEffect()); this.getSpellCard().getSpellAbility().addTarget(new TargetActivatedOrTriggeredAbility(filter)); + + this.finalizeAdventure(); } private VirtueOfKnowledge(final VirtueOfKnowledge card) { diff --git a/Mage.Sets/src/mage/cards/v/VirtueOfLoyalty.java b/Mage.Sets/src/mage/cards/v/VirtueOfLoyalty.java index 4c074802599..ad177c01478 100644 --- a/Mage.Sets/src/mage/cards/v/VirtueOfLoyalty.java +++ b/Mage.Sets/src/mage/cards/v/VirtueOfLoyalty.java @@ -33,6 +33,8 @@ public final class VirtueOfLoyalty extends AdventureCard { // Ardenvale Fealty // Create a 2/2 white Knight creature token with vigilance. this.getSpellCard().getSpellAbility().addEffect(new CreateTokenEffect(new KnightToken())); + + this.finalizeAdventure(); } private VirtueOfLoyalty(final VirtueOfLoyalty card) { diff --git a/Mage.Sets/src/mage/cards/v/VirtueOfPersistence.java b/Mage.Sets/src/mage/cards/v/VirtueOfPersistence.java index c2fcb021ad2..b2d0edccc40 100644 --- a/Mage.Sets/src/mage/cards/v/VirtueOfPersistence.java +++ b/Mage.Sets/src/mage/cards/v/VirtueOfPersistence.java @@ -39,6 +39,8 @@ public final class VirtueOfPersistence extends AdventureCard { this.getSpellCard().getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellCard().getSpellAbility().addEffect(new BoostTargetEffect(-3, -3, Duration.EndOfTurn)); this.getSpellCard().getSpellAbility().addEffect(new GainLifeEffect(2)); + + this.finalizeAdventure(); } private VirtueOfPersistence(final VirtueOfPersistence card) { diff --git a/Mage.Sets/src/mage/cards/v/VirtueOfStrength.java b/Mage.Sets/src/mage/cards/v/VirtueOfStrength.java index 942cad0a89b..ab1dad65d67 100644 --- a/Mage.Sets/src/mage/cards/v/VirtueOfStrength.java +++ b/Mage.Sets/src/mage/cards/v/VirtueOfStrength.java @@ -46,6 +46,8 @@ public final class VirtueOfStrength extends AdventureCard { // Return target creature or land card from your graveyard to your hand. this.getSpellCard().getSpellAbility().addEffect(new ReturnFromGraveyardToHandTargetEffect()); this.getSpellCard().getSpellAbility().addTarget(new TargetCardInYourGraveyard(filter)); + + this.finalizeAdventure(); } private VirtueOfStrength(final VirtueOfStrength card) { diff --git a/Mage.Sets/src/mage/cards/w/WoodlandAcolyte.java b/Mage.Sets/src/mage/cards/w/WoodlandAcolyte.java index 8063e0e1fd7..f41b4250ec2 100644 --- a/Mage.Sets/src/mage/cards/w/WoodlandAcolyte.java +++ b/Mage.Sets/src/mage/cards/w/WoodlandAcolyte.java @@ -36,6 +36,8 @@ public final class WoodlandAcolyte extends AdventureCard { // Put target permanent card from your graveyard on top of your library. this.getSpellCard().getSpellAbility().addEffect(new PutOnLibraryTargetEffect(true)); this.getSpellCard().getSpellAbility().addTarget(new TargetCardInYourGraveyard(filter)); + + this.finalizeAdventure(); } private WoodlandAcolyte(final WoodlandAcolyte card) { diff --git a/Mage.Sets/src/mage/cards/y/YoungBlueDragon.java b/Mage.Sets/src/mage/cards/y/YoungBlueDragon.java index 1520a028131..941e3cf2ae1 100644 --- a/Mage.Sets/src/mage/cards/y/YoungBlueDragon.java +++ b/Mage.Sets/src/mage/cards/y/YoungBlueDragon.java @@ -30,6 +30,8 @@ public final class YoungBlueDragon extends AdventureCard { // Scry 1, then draw a card. this.getSpellCard().getSpellAbility().addEffect(new ScryEffect(1, false)); this.getSpellCard().getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1).concatBy(", then")); + + this.finalizeAdventure(); } private YoungBlueDragon(final YoungBlueDragon card) { diff --git a/Mage.Sets/src/mage/cards/y/YoungRedDragon.java b/Mage.Sets/src/mage/cards/y/YoungRedDragon.java index 4c5d6389095..3cf109b0206 100644 --- a/Mage.Sets/src/mage/cards/y/YoungRedDragon.java +++ b/Mage.Sets/src/mage/cards/y/YoungRedDragon.java @@ -33,6 +33,8 @@ public final class YoungRedDragon extends AdventureCard { // Bathe in Gold // Create a Treasure token. this.getSpellCard().getSpellAbility().addEffect(new CreateTokenEffect(new TreasureToken())); + + this.finalizeAdventure(); } private YoungRedDragon(final YoungRedDragon card) { diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/single/woe/HeartflameDuelistTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/single/woe/HeartflameDuelistTest.java new file mode 100644 index 00000000000..277316c2598 --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/single/woe/HeartflameDuelistTest.java @@ -0,0 +1,67 @@ + +package org.mage.test.cards.single.woe; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * @author Susucr + */ +public class HeartflameDuelistTest extends CardTestPlayerBase { + + /** + * Heartflame Duelist {1}{W} + * Creature — Human Knight + * Instant and sorcery spells you control have lifelink. + * 3/1 + *

+ * // + * Heartflame Slash {2}{R} + * Instant — Adventure + * Heartflame Slash deals 3 damage to any target. + */ + private final String duelist = "Heartflame Duelist"; + + @Test + public void lifelinkOnPlayer() { + setStrictChooseMode(true); + + addCard(Zone.BATTLEFIELD, playerA, duelist, 1); + addCard(Zone.HAND, playerA, duelist, 1); + + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 3); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Heartflame Slash", playerB); + + setStopAt(2, PhaseStep.BEGIN_COMBAT); + execute(); + + assertLife(playerA, 20 + 3); + assertLife(playerB, 20 - 3); + assertPermanentCount(playerA, duelist, 1); + assertExileCount(playerA, duelist, 1); + } + + @Test + public void lifelinkOnPermanent() { + setStrictChooseMode(true); + + addCard(Zone.BATTLEFIELD, playerA, duelist, 1); + addCard(Zone.HAND, playerA, duelist, 1); + + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 3); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Heartflame Slash", duelist); + + setStopAt(2, PhaseStep.BEGIN_COMBAT); + execute(); + + assertLife(playerA, 20 + 3); + assertLife(playerB, 20); + assertPermanentCount(playerA, duelist, 0); + assertExileCount(playerA, duelist, 1); + assertGraveyardCount(playerA, duelist, 1); + } +} \ No newline at end of file diff --git a/Mage/src/main/java/mage/cards/AdventureCard.java b/Mage/src/main/java/mage/cards/AdventureCard.java index 3f556598b9d..c35257b159b 100644 --- a/Mage/src/main/java/mage/cards/AdventureCard.java +++ b/Mage/src/main/java/mage/cards/AdventureCard.java @@ -26,6 +26,10 @@ public abstract class AdventureCard extends CardImpl { this.spellCard = new AdventureCardSpellImpl(ownerId, setInfo, adventureName, typesSpell, costsSpell, this); } + public void finalizeAdventure() { + spellCard.finalizeAdventure(); + } + public AdventureCard(AdventureCard card) { super(card); this.spellCard = card.getSpellCard().copy(); diff --git a/Mage/src/main/java/mage/cards/AdventureCardSpell.java b/Mage/src/main/java/mage/cards/AdventureCardSpell.java index c274c54aa9a..27f14c5493a 100644 --- a/Mage/src/main/java/mage/cards/AdventureCardSpell.java +++ b/Mage/src/main/java/mage/cards/AdventureCardSpell.java @@ -7,4 +7,6 @@ public interface AdventureCardSpell extends SubCard { @Override AdventureCardSpell copy(); + + void finalizeAdventure(); } diff --git a/Mage/src/main/java/mage/cards/AdventureCardSpellImpl.java b/Mage/src/main/java/mage/cards/AdventureCardSpellImpl.java index d5f78346b38..47a01b819f6 100644 --- a/Mage/src/main/java/mage/cards/AdventureCardSpellImpl.java +++ b/Mage/src/main/java/mage/cards/AdventureCardSpellImpl.java @@ -35,6 +35,12 @@ public class AdventureCardSpellImpl extends CardImpl implements AdventureCardSpe this.adventureCardParent = adventureCardParent; } + public void finalizeAdventure() { + if (spellAbility instanceof AdventureCardSpellAbility) { + ((AdventureCardSpellAbility) spellAbility).finalizeAdventure(); + } + } + protected AdventureCardSpellImpl(final AdventureCardSpellImpl card) { super(card); this.adventureCardParent = card.adventureCardParent; @@ -100,18 +106,35 @@ public class AdventureCardSpellImpl extends CardImpl implements AdventureCardSpe class AdventureCardSpellAbility extends SpellAbility { - String nameFull; + private String nameFull; + private boolean finalized = false; public AdventureCardSpellAbility(final SpellAbility baseSpellAbility, String adventureName, CardType[] cardTypes, String costs) { super(baseSpellAbility); this.setName(cardTypes, adventureName, costs); - this.addEffect(ExileAdventureSpellEffect.getInstance()); this.setCardName(adventureName); } + // The exile effect needs to be added last. + public void finalizeAdventure() { + if (finalized) { + throw new IllegalStateException("Wrong code usage. " + + "Adventure (" + cardName + ") " + + "need to call finalizeAdventure() exactly once."); + } + this.addEffect(ExileAdventureSpellEffect.getInstance()); + this.finalized = true; + } + protected AdventureCardSpellAbility(final AdventureCardSpellAbility ability) { super(ability); this.nameFull = ability.nameFull; + if (!ability.finalized) { + throw new IllegalStateException("Wrong code usage. " + + "Adventure (" + cardName + ") " + + "need to call finalizeAdventure() at the very end of the card's constructor."); + } + this.finalized = true; } @Override @@ -155,7 +178,7 @@ class AdventureCardSpellAbility extends SpellAbility { } @Override - public SpellAbility copy() { + public AdventureCardSpellAbility copy() { return new AdventureCardSpellAbility(this); } } \ No newline at end of file From 2a5dd4103c111b102a57c87bbda98cf842754b09 Mon Sep 17 00:00:00 2001 From: Susucre <34709007+Susucre@users.noreply.github.com> Date: Thu, 31 Aug 2023 01:15:56 +0200 Subject: [PATCH 11/36] [WOE] Implement Ashiok, Wicked Manipulator (#10909) * [WOE] Implement Ashiok, Wicket Manipulator * Add Ashiok's abilities * basic pay life replacement tests * many tests later * add warning on token expecting watcher * apply review * rework text generation --- .../mage/cards/a/AshiokWickedManipulator.java | 119 +++++++ Mage.Sets/src/mage/cards/o/OblivionSower.java | 2 +- .../src/mage/cards/r/RavenGuildMaster.java | 2 +- .../src/mage/cards/s/SireOfStagnation.java | 2 +- .../src/mage/cards/t/ThoughtHarvester.java | 2 +- Mage.Sets/src/mage/sets/WildsOfEldraine.java | 1 + .../woe/AshiokWickedManipulatorTest.java | 308 ++++++++++++++++++ .../WasCardExiledThisTurnCondition.java | 30 ++ .../TotalCardsExiledOwnedManaValue.java | 52 +++ ...xileCardsFromTopOfLibraryTargetEffect.java | 36 +- Mage/src/main/java/mage/game/Exile.java | 2 +- .../main/java/mage/game/events/GameEvent.java | 2 +- ...AshiokWickedManipulatorNightmareToken.java | 52 +++ Mage/src/main/java/mage/util/CardUtil.java | 5 + .../common/CardsExiledThisTurnWatcher.java | 38 +++ 15 files changed, 634 insertions(+), 19 deletions(-) create mode 100644 Mage.Sets/src/mage/cards/a/AshiokWickedManipulator.java create mode 100644 Mage.Tests/src/test/java/org/mage/test/cards/single/woe/AshiokWickedManipulatorTest.java create mode 100644 Mage/src/main/java/mage/abilities/condition/common/WasCardExiledThisTurnCondition.java create mode 100644 Mage/src/main/java/mage/abilities/dynamicvalue/common/TotalCardsExiledOwnedManaValue.java create mode 100644 Mage/src/main/java/mage/game/permanent/token/AshiokWickedManipulatorNightmareToken.java create mode 100644 Mage/src/main/java/mage/watchers/common/CardsExiledThisTurnWatcher.java diff --git a/Mage.Sets/src/mage/cards/a/AshiokWickedManipulator.java b/Mage.Sets/src/mage/cards/a/AshiokWickedManipulator.java new file mode 100644 index 00000000000..963a11f24f4 --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AshiokWickedManipulator.java @@ -0,0 +1,119 @@ +package mage.cards.a; + +import mage.abilities.Ability; +import mage.abilities.LoyaltyAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.common.TotalCardsExiledOwnedManaValue; +import mage.abilities.effects.ReplacementEffectImpl; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.ExileCardsFromTopOfLibraryTargetEffect; +import mage.abilities.effects.common.LookLibraryAndPickControllerEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.token.AshiokWickedManipulatorNightmareToken; +import mage.players.Player; +import mage.target.TargetPlayer; +import mage.watchers.common.CardsExiledThisTurnWatcher; + +import java.util.Set; +import java.util.UUID; + +/** + * @author Susucr + */ +public final class AshiokWickedManipulator extends CardImpl { + + public AshiokWickedManipulator(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{3}{B}{B}"); + + this.supertype.add(SuperType.LEGENDARY); + this.subtype.add(SubType.ASHIOK); + this.setStartingLoyalty(5); + + // If you would pay life while your library has at least that many cards in it, exile that many cards from the top of your library instead. + this.addAbility(new SimpleStaticAbility(new AshiokWickedManipulatorReplacementEffect())); + + // +1: Look at the top two cards of your library. Exile one of them and put the other into your hand. + this.addAbility(new LoyaltyAbility( + new LookLibraryAndPickControllerEffect(2, 1, PutCards.EXILED, PutCards.HAND), + 1 + )); + + // -2: Create two 1/1 black Nightmare creature tokens with "At the beginning of combat on your turn, if a card was put into exile this turn, put a +1/+1 counter on this creature." + this.addAbility(new LoyaltyAbility( + new CreateTokenEffect(new AshiokWickedManipulatorNightmareToken(), 2), + -2 + ), new CardsExiledThisTurnWatcher()); + + // -7: Target player exiles the top X cards of their library, where X is the total mana value of cards you own in exile. + Ability ability = new LoyaltyAbility( + new ExileCardsFromTopOfLibraryTargetEffect(TotalCardsExiledOwnedManaValue.instance) + .setText("target player exiles the top X cards of their library, " + + "where X is the total mana value of cards you own in exile"), + -7 + ); + ability.addTarget(new TargetPlayer()); + ability.addHint(TotalCardsExiledOwnedManaValue.getHint()); + this.addAbility(ability); + } + + private AshiokWickedManipulator(final AshiokWickedManipulator card) { + super(card); + } + + @Override + public AshiokWickedManipulator copy() { + return new AshiokWickedManipulator(this); + } +} + +class AshiokWickedManipulatorReplacementEffect extends ReplacementEffectImpl { + + AshiokWickedManipulatorReplacementEffect() { + super(Duration.WhileOnBattlefield, Outcome.Benefit); + staticText = "If you would pay life while your library has at least that many cards in it, " + + "exile that many cards from the top of your library instead."; + } + + private AshiokWickedManipulatorReplacementEffect(final AshiokWickedManipulatorReplacementEffect effect) { + super(effect); + } + + @Override + public AshiokWickedManipulatorReplacementEffect copy() { + return new AshiokWickedManipulatorReplacementEffect(this); + } + + @Override + public boolean replaceEvent(GameEvent event, Ability source, Game game) { + Player player = game.getPlayer(source.getControllerId()); + if (player == null) { + return false; + } + + Set cards = player.getLibrary().getTopCards(game, event.getAmount()); + player.moveCardsToExile(cards, source, game, false, null, ""); + + return true; + } + + @Override + public boolean checksEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.PAY_LIFE; + } + + @Override + public boolean applies(GameEvent event, Ability source, Game game) { + UUID playerId = source.getControllerId(); + if (!event.getPlayerId().equals(playerId)) { + return false; + } + + Player player = game.getPlayer(playerId); + return player != null && player.getLibrary().size() >= event.getAmount(); + } +} diff --git a/Mage.Sets/src/mage/cards/o/OblivionSower.java b/Mage.Sets/src/mage/cards/o/OblivionSower.java index cbab579cfba..9b25fdfea27 100644 --- a/Mage.Sets/src/mage/cards/o/OblivionSower.java +++ b/Mage.Sets/src/mage/cards/o/OblivionSower.java @@ -38,7 +38,7 @@ public final class OblivionSower extends CardImpl { this.toughness = new MageInt(8); // When you cast Oblivion Sower, target opponent exiles the top four cards of their library, then you may put any number of land cards that player owns from exile onto the battlefield under your control. - Ability ability = new CastSourceTriggeredAbility(new ExileCardsFromTopOfLibraryTargetEffect(4, "target opponent"), false); + Ability ability = new CastSourceTriggeredAbility(new ExileCardsFromTopOfLibraryTargetEffect(4), false); ability.addEffect(new OblivionSowerEffect()); ability.addTarget(new TargetOpponent()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/r/RavenGuildMaster.java b/Mage.Sets/src/mage/cards/r/RavenGuildMaster.java index 7789d5eb018..bc30ea28a14 100644 --- a/Mage.Sets/src/mage/cards/r/RavenGuildMaster.java +++ b/Mage.Sets/src/mage/cards/r/RavenGuildMaster.java @@ -27,7 +27,7 @@ public final class RavenGuildMaster extends CardImpl { this.toughness = new MageInt(1); // Whenever Raven Guild Master deals combat damage to a player, that player exiles the top ten cards of their library. - this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new ExileCardsFromTopOfLibraryTargetEffect(10, "that player"), false, true)); + this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new ExileCardsFromTopOfLibraryTargetEffect(10), false, true)); // Morph {2}{U}{U} this.addAbility(new MorphAbility(new ManaCostsImpl<>("{2}{U}{U}"))); diff --git a/Mage.Sets/src/mage/cards/s/SireOfStagnation.java b/Mage.Sets/src/mage/cards/s/SireOfStagnation.java index ec554483911..434096236a6 100644 --- a/Mage.Sets/src/mage/cards/s/SireOfStagnation.java +++ b/Mage.Sets/src/mage/cards/s/SireOfStagnation.java @@ -41,7 +41,7 @@ public final class SireOfStagnation extends CardImpl { // Whenever a land enters the battlefield under an opponent's control, that player exiles the top two cards of their library and you draw two cards. Ability ability = new EntersBattlefieldAllTriggeredAbility(Zone.BATTLEFIELD, - new ExileCardsFromTopOfLibraryTargetEffect(2, "that player"), filter, false, SetTargetPointer.PLAYER, rule, false); + new ExileCardsFromTopOfLibraryTargetEffect(2), filter, false, SetTargetPointer.PLAYER, rule, false); ability.addEffect(new DrawCardSourceControllerEffect(2)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/t/ThoughtHarvester.java b/Mage.Sets/src/mage/cards/t/ThoughtHarvester.java index 21decfc3b96..58c13ed9e98 100644 --- a/Mage.Sets/src/mage/cards/t/ThoughtHarvester.java +++ b/Mage.Sets/src/mage/cards/t/ThoughtHarvester.java @@ -42,7 +42,7 @@ public final class ThoughtHarvester extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // Whenever you cast a colorless spell, target opponent exiles the top card of their library. - Ability ability = new SpellCastControllerTriggeredAbility(new ExileCardsFromTopOfLibraryTargetEffect(1, "target opponent"), filter, false); + Ability ability = new SpellCastControllerTriggeredAbility(new ExileCardsFromTopOfLibraryTargetEffect(1), filter, false); ability.addTarget(new TargetOpponent()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/WildsOfEldraine.java b/Mage.Sets/src/mage/sets/WildsOfEldraine.java index be658c2fbc3..201b3ec1a8a 100644 --- a/Mage.Sets/src/mage/sets/WildsOfEldraine.java +++ b/Mage.Sets/src/mage/sets/WildsOfEldraine.java @@ -31,6 +31,7 @@ public final class WildsOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Armory Mice", 3, Rarity.COMMON, mage.cards.a.ArmoryMice.class)); cards.add(new SetCardInfo("Ash, Party Crasher", 201, Rarity.UNCOMMON, mage.cards.a.AshPartyCrasher.class)); cards.add(new SetCardInfo("Ashiok's Reaper", 79, Rarity.UNCOMMON, mage.cards.a.AshioksReaper.class)); + cards.add(new SetCardInfo("Ashiok, Wicked Manipulator", 78, Rarity.MYTHIC, mage.cards.a.AshiokWickedManipulator.class)); cards.add(new SetCardInfo("Asinine Antics", 42, Rarity.MYTHIC, mage.cards.a.AsinineAntics.class)); cards.add(new SetCardInfo("Back for Seconds", 80, Rarity.UNCOMMON, mage.cards.b.BackForSeconds.class)); cards.add(new SetCardInfo("Barrow Naughty", 81, Rarity.COMMON, mage.cards.b.BarrowNaughty.class)); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/single/woe/AshiokWickedManipulatorTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/single/woe/AshiokWickedManipulatorTest.java new file mode 100644 index 00000000000..d20993bf27b --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/single/woe/AshiokWickedManipulatorTest.java @@ -0,0 +1,308 @@ +package org.mage.test.cards.single.woe; + +import mage.cards.Card; +import mage.constants.PhaseStep; +import mage.constants.Zone; +import mage.players.Player; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +import java.util.Set; + +/** + * @author Susucr + */ +public class AshiokWickedManipulatorTest extends CardTestPlayerBase { + + /** + * Ashiok, Wicked Manipulator + * {3}{B}{B} + * Legendary Planeswalker — Ashiok + *

+ * If you would pay life while your library has at least that many cards in it, exile that many cards from the top of your library instead. + * +1: Look at the top two cards of your library. Exile one of them and put the other into your hand. + * −2: Create two 1/1 black Nightmare creature tokens with "At the beginning of combat on your turn, if a card was put into exile this turn, put a +1/+1 counter on this creature." + * −7: Target player exiles the top X cards of their library, where X is the total mana value of cards you own in exile. + *

+ * Loyalty: 5 + */ + private static final String ashiok = "Ashiok, Wicked Manipulator"; + + /** + * Final Payment + * {W}{B} + * Instant + *

+ * As an additional cost to cast this spell, pay 5 life or sacrifice a creature or enchantment. + *

+ * Destroy target creature. + */ + private static final String finalPayment = "Final Payment"; + + /** + * Well sometimes you do need a 2/2 vanilla with mana value 2. + */ + private static final String lion = "Silvercoat Lion"; + + /** + * Bolas's Citadel + * {3}{B}{B}{B} + * Legendary Artifact + *

+ * You may look at the top card of your library any time. + *

+ * You may play lands and cast spells from the top of your library. If you cast a spell this way, pay life equal to its mana value rather than pay its mana cost. + *

+ * {T}, Sacrifice ten nonland permanents: Each opponent loses 10 life. + */ + private static final String citadel = "Bolas's Citadel"; + + /** + * Lurking Evil + * {B}{B}{B} + * Enchantment + *

+ * Pay half your life, rounded up: Lurking Evil becomes a 4/4 Phyrexian Horror creature with flying. + */ + private static final String lurking = "Lurking Evil"; + + /** + * Arrogant Poet + * {1}{B} + * Creature — Human Warlock + *

+ * Whenever Arrogant Poet attacks, you may pay 2 life. If you do, it gains flying until end of turn. + */ + private static final String poet = "Arrogant Poet"; + + @Test + public void emptyALibrary() { + setStrictChooseMode(true); + + skipInitShuffling(); + removeAllCardsFromLibrary(playerA); + addCard(Zone.LIBRARY, playerA, lion, 10); + + setStopAt(1, PhaseStep.UPKEEP); + execute(); + + assertExileCount(playerA, 0); + assertLibraryCount(playerA, 10); + assertLibraryCount(playerA, lion, 10); + } + + private void finalPaymentTest(int lionInLibrary, boolean replaced) { + setStrictChooseMode(true); + + skipInitShuffling(); + removeAllCardsFromLibrary(playerA); + addCard(Zone.LIBRARY, playerA, lion, lionInLibrary); + + addCard(Zone.BATTLEFIELD, playerA, ashiok); + addCard(Zone.BATTLEFIELD, playerB, lion); + addCard(Zone.HAND, playerA, finalPayment); + addCard(Zone.BATTLEFIELD, playerA, "Scrubland", 2); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, finalPayment, lion); + setStopAt(1, PhaseStep.PRECOMBAT_MAIN); + execute(); + + assertLife(playerA, 20 - (replaced ? 0 : 5)); + assertPermanentCount(playerB, lion, 0); + assertExileCount(playerA, replaced ? 5 : 0); + assertLibraryCount(playerA, lionInLibrary - (replaced ? 5 : 0)); + assertGraveyardCount(playerB, lion, 1); // Lion + assertGraveyardCount(playerA, finalPayment, 1); + } + + @Test + public void finalPayment_0() { + finalPaymentTest(0, false); + } + + @Test + public void finalPayment_4() { + finalPaymentTest(4, false); + } + + @Test + public void finalPayment_5() { + finalPaymentTest(5, true); + } + + @Test + public void finalPayment_10() { + finalPaymentTest(10, true); + } + + @Test + public void ReplacementCitadel() { + setStrictChooseMode(true); + + skipInitShuffling(); + removeAllCardsFromLibrary(playerA); + addCard(Zone.LIBRARY, playerA, lion, 10); + + addCard(Zone.BATTLEFIELD, playerA, ashiok); + addCard(Zone.BATTLEFIELD, playerA, citadel); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, lion); + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertLife(playerA, 20); + assertPermanentCount(playerA, lion, 1); + assertExileCount(playerA, 2); + assertLibraryCount(playerA, 10 - 2 - 1); // Lion was cast from there, and 2 cards were exiled as payment. + } + + @Test + public void ReplacementLurkingEvil() { + setStrictChooseMode(true); + + skipInitShuffling(); + removeAllCardsFromLibrary(playerA); + int libraryCount = 18; + int exileCount = 0; + int lifeCount = 20; + addCard(Zone.LIBRARY, playerA, lion, libraryCount); + + addCard(Zone.BATTLEFIELD, playerA, ashiok); + addCard(Zone.BATTLEFIELD, playerA, lurking); + + activateAbility(1, PhaseStep.UPKEEP, playerA, "Pay half your life, rounded up:"); + libraryCount -= 10; + exileCount += 10; + + setStopAt(1, PhaseStep.PRECOMBAT_MAIN); + execute(); + + assertLife(playerA, lifeCount); + assertExileCount(playerA, exileCount); + assertLibraryCount(playerA, libraryCount); + + activateAbility(1, PhaseStep.BEGIN_COMBAT, playerA, "Pay half your life, rounded up:"); + lifeCount -= 10; + + setStopAt(1, PhaseStep.POSTCOMBAT_MAIN); + execute(); + + assertLife(playerA, lifeCount); + assertExileCount(playerA, exileCount); + assertLibraryCount(playerA, libraryCount); + + activateAbility(1, PhaseStep.END_TURN, playerA, "Pay half your life, rounded up:"); + libraryCount -= 5; + exileCount += 5; + + setStopAt(2, PhaseStep.UPKEEP); + execute(); + + assertLife(playerA, lifeCount); + assertExileCount(playerA, exileCount); + assertLibraryCount(playerA, libraryCount); + } + + @Test + public void ReplacementPoet() { + setStrictChooseMode(true); + + skipInitShuffling(); + removeAllCardsFromLibrary(playerA); + addCard(Zone.LIBRARY, playerA, lion, 10); + + addCard(Zone.BATTLEFIELD, playerA, ashiok); + addCard(Zone.BATTLEFIELD, playerA, poet); + + attack(1, playerA, poet); + setChoice(playerA, true);// Yes to pay 2 life, those are replaced by cards exiled. + + setStopAt(1, PhaseStep.POSTCOMBAT_MAIN); + execute(); + + assertLife(playerA, 20); + assertExileCount(playerA, 2); + } + + @Test + public void TokensTrigger() { + setStrictChooseMode(true); + + skipInitShuffling(); + removeAllCardsFromLibrary(playerA); + for (int i = 0; i < 10; ++i) { + // Alternating, so choices are possible on Ashiok's +1 + addCard(Zone.LIBRARY, playerA, lion); + addCard(Zone.LIBRARY, playerA, poet); + } + + addCard(Zone.BATTLEFIELD, playerA, ashiok); + addCard(Zone.BATTLEFIELD, playerA, poet); + + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "-2:"); + + setStopAt(1, PhaseStep.POSTCOMBAT_MAIN); + execute(); + + assertPowerToughness(playerA, "Nightmare Token", 1, 1); + + activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "+1:"); + addTarget(playerA, poet); + // 2 tokens, so stacking trigger. + setChoice(playerA, "At the beginning of combat on your turn, if a card was put " + + "into exile this turn, put a +1/+1 counter on this creature."); + + setStopAt(3, PhaseStep.POSTCOMBAT_MAIN); + execute(); + + assertPowerToughness(playerA, "Nightmare Token", 2, 2); + + activateAbility(5, PhaseStep.PRECOMBAT_MAIN, playerA, "+1:"); + addTarget(playerA, lion); + // 2 tokens, so stacking trigger. + setChoice(playerA, "At the beginning of combat on your turn, if a card was put " + + "into exile this turn, put a +1/+1 counter on this creature."); + + setStopAt(5, PhaseStep.POSTCOMBAT_MAIN); + execute(); + + assertPowerToughness(playerA, "Nightmare Token", 3, 3); + + setStopAt(7, PhaseStep.POSTCOMBAT_MAIN); + execute(); + + assertPowerToughness(playerA, "Nightmare Token", 3, 3); + } + + @Test + public void Ultimate() { + setStrictChooseMode(true); + + skipInitShuffling(); + removeAllCardsFromLibrary(playerA); + for (int i = 0; i < 10; ++i) { + // Alternating, so choices are possible on Ashiok's +1 + addCard(Zone.LIBRARY, playerA, lion); + addCard(Zone.LIBRARY, playerA, lurking); + } + + addCard(Zone.BATTLEFIELD, playerA, ashiok); + addCard(Zone.BATTLEFIELD, playerA, poet); + + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "+1:"); + addTarget(playerA, lion); + + activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "+1:"); + addTarget(playerA, lurking); + + activateAbility(5, PhaseStep.PRECOMBAT_MAIN, playerA, "+1:"); + addTarget(playerA, lurking); + + activateAbility(7, PhaseStep.PRECOMBAT_MAIN, playerA, "-7:", playerB); + + setStopAt(7, PhaseStep.POSTCOMBAT_MAIN); + execute(); + + assertExileCount(playerB, 2 + 3 + 3); + } +} \ No newline at end of file diff --git a/Mage/src/main/java/mage/abilities/condition/common/WasCardExiledThisTurnCondition.java b/Mage/src/main/java/mage/abilities/condition/common/WasCardExiledThisTurnCondition.java new file mode 100644 index 00000000000..1d76e9bf40f --- /dev/null +++ b/Mage/src/main/java/mage/abilities/condition/common/WasCardExiledThisTurnCondition.java @@ -0,0 +1,30 @@ +package mage.abilities.condition.common; + +import mage.abilities.Ability; +import mage.abilities.condition.Condition; +import mage.game.Game; +import mage.watchers.common.CardsExiledThisTurnWatcher; + +/** + * Checks if at least one card was put into exile this turn. + *

+ * /!\ Need the CardsExiledThisTurnWatcher to be set up. + * + * @author Susucr + */ +public enum WasCardExiledThisTurnCondition implements Condition { + + instance; + + @Override + public boolean apply(Game game, Ability source) { + CardsExiledThisTurnWatcher watcher = game.getState().getWatcher(CardsExiledThisTurnWatcher.class); + return watcher != null && watcher.getCountCardsExiledThisTurn() > 0; + } + + @Override + public String toString() { + return "a card was put into exile this turn"; + } + +} diff --git a/Mage/src/main/java/mage/abilities/dynamicvalue/common/TotalCardsExiledOwnedManaValue.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/TotalCardsExiledOwnedManaValue.java new file mode 100644 index 00000000000..400155b7708 --- /dev/null +++ b/Mage/src/main/java/mage/abilities/dynamicvalue/common/TotalCardsExiledOwnedManaValue.java @@ -0,0 +1,52 @@ +package mage.abilities.dynamicvalue.common; + +import mage.abilities.Ability; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.effects.Effect; +import mage.abilities.hint.Hint; +import mage.abilities.hint.ValueHint; +import mage.cards.Card; +import mage.game.Game; + +import java.util.List; + +public enum TotalCardsExiledOwnedManaValue implements DynamicValue { + instance; + + private static final Hint hint = new ValueHint("Total mana value of cards you own in exile", instance); + + private TotalCardsExiledOwnedManaValue() { + } + + @Override + public TotalCardsExiledOwnedManaValue copy() { + return this; + } + + @Override + public int calculate(Game game, Ability sourceAbility, Effect effect) { + int totalCMC = 0; + List cards = game.getExile().getAllCards( + game, + sourceAbility.getControllerId() + ); + for (Card card : cards) { + totalCMC += card.getManaValue(); + } + return totalCMC; + } + + @Override + public String getMessage() { + return "the total mana value of cards you own in exile"; + } + + @Override + public String toString() { + return "X"; + } + + public static Hint getHint() { + return hint; + } +} diff --git a/Mage/src/main/java/mage/abilities/effects/common/ExileCardsFromTopOfLibraryTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ExileCardsFromTopOfLibraryTargetEffect.java index e59e5defd0f..34948234ec5 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/ExileCardsFromTopOfLibraryTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/ExileCardsFromTopOfLibraryTargetEffect.java @@ -1,6 +1,9 @@ package mage.abilities.effects.common; import mage.abilities.Ability; +import mage.abilities.Mode; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.StaticValue; import mage.abilities.effects.OneShotEffect; import mage.cards.Cards; import mage.cards.CardsImpl; @@ -11,29 +14,24 @@ import mage.players.Player; import mage.util.CardUtil; /** - * @author LevelX2 + * @author LevelX2, Susucr */ public class ExileCardsFromTopOfLibraryTargetEffect extends OneShotEffect { - int amount; - String targetName; + private final DynamicValue amount; public ExileCardsFromTopOfLibraryTargetEffect(int amount) { - this(amount, null); + this(StaticValue.get(amount)); } - public ExileCardsFromTopOfLibraryTargetEffect(int amount, String targetName) { + public ExileCardsFromTopOfLibraryTargetEffect(DynamicValue amount) { super(Outcome.Exile); - this.amount = amount; - this.staticText = (targetName == null ? "that player" : targetName) + " exiles the top " - + CardUtil.numberToText(amount, "") - + (amount == 1 ? "card" : " cards") + " of their library"; + this.amount = amount.copy(); } protected ExileCardsFromTopOfLibraryTargetEffect(final ExileCardsFromTopOfLibraryTargetEffect effect) { super(effect); - this.amount = effect.amount; - + this.amount = effect.amount.copy(); } @Override @@ -43,12 +41,24 @@ public class ExileCardsFromTopOfLibraryTargetEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { + int milled = amount.calculate(game, source, this); Player targetPlayer = game.getPlayer(getTargetPointer().getFirst(game, source)); - if (targetPlayer != null) { + if (milled > 0 && targetPlayer != null) { Cards cards = new CardsImpl(); - cards.addAllCards(targetPlayer.getLibrary().getTopCards(game, amount)); + cards.addAllCards(targetPlayer.getLibrary().getTopCards(game, milled)); return targetPlayer.moveCards(cards, Zone.EXILED, source, game); } return false; } + + @Override + public String getText(Mode mode) { + if (staticText != null && !staticText.isEmpty()) { + return staticText; + } + return getTargetPointer().describeTargets(mode.getTargets(), "that player") + + " exiles the top " + + (amount.toString().equals("1") ? "card" : CardUtil.numberToText(amount.toString(), "a") + " cards") + + " of their library"; + } } diff --git a/Mage/src/main/java/mage/game/Exile.java b/Mage/src/main/java/mage/game/Exile.java index 3ef16b60f41..5d729bfa537 100644 --- a/Mage/src/main/java/mage/game/Exile.java +++ b/Mage/src/main/java/mage/game/Exile.java @@ -76,7 +76,7 @@ public class Exile implements Serializable, Copyable { } /** - * Return exiled cards from specific player. Use it in effects to find all cards in range. + * Return exiled cards owned by a specific player. Use it in effects to find all cards in range. * * @param game * @param fromPlayerId diff --git a/Mage/src/main/java/mage/game/events/GameEvent.java b/Mage/src/main/java/mage/game/events/GameEvent.java index 572b93cf243..bb51faeaba0 100644 --- a/Mage/src/main/java/mage/game/events/GameEvent.java +++ b/Mage/src/main/java/mage/game/events/GameEvent.java @@ -331,7 +331,7 @@ public class GameEvent implements Serializable { PLANESWALK, PLANESWALKED, PAID_CUMULATIVE_UPKEEP, DIDNT_PAY_CUMULATIVE_UPKEEP, - LIFE_PAID, + PAY_LIFE, LIFE_PAID, CASCADE_LAND, LEARN, //permanent events diff --git a/Mage/src/main/java/mage/game/permanent/token/AshiokWickedManipulatorNightmareToken.java b/Mage/src/main/java/mage/game/permanent/token/AshiokWickedManipulatorNightmareToken.java new file mode 100644 index 00000000000..842eb877d58 --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/AshiokWickedManipulatorNightmareToken.java @@ -0,0 +1,52 @@ +package mage.game.permanent.token; + +import mage.MageInt; +import mage.abilities.common.BeginningOfCombatTriggeredAbility; +import mage.abilities.condition.common.WasCardExiledThisTurnCondition; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.hint.ConditionHint; +import mage.abilities.hint.Hint; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.counters.CounterType; + +/** + * @author Susucr + */ +public final class AshiokWickedManipulatorNightmareToken extends TokenImpl { + + private static final Hint hint = new ConditionHint(WasCardExiledThisTurnCondition.instance); + + /** + * /!\ You need to add CardsExiledThisTurnWatcher to any card using this token + */ + public AshiokWickedManipulatorNightmareToken() { + super("Nightmare Token", "1/1 black Nightmare creature tokens with \"At the beginning of combat on your turn, if a card was put into exile this turn, put a +1/+1 counter on this creature.\""); + cardType.add(CardType.CREATURE); + color.setBlack(true); + subtype.add(SubType.NIGHTMARE); + power = new MageInt(1); + toughness = new MageInt(1); + + this.addAbility(new ConditionalInterveningIfTriggeredAbility( + new BeginningOfCombatTriggeredAbility( + new AddCountersSourceEffect(CounterType.P1P1.createInstance()), + TargetController.YOU, + false + ), + WasCardExiledThisTurnCondition.instance, + "At the beginning of combat on your turn, if a card was put into exile " + + "this turn, put a +1/+1 counter on this creature." + ).addHint(hint)); + } + + private AshiokWickedManipulatorNightmareToken(final AshiokWickedManipulatorNightmareToken token) { + super(token); + } + + public AshiokWickedManipulatorNightmareToken copy() { + return new AshiokWickedManipulatorNightmareToken(this); + } +} diff --git a/Mage/src/main/java/mage/util/CardUtil.java b/Mage/src/main/java/mage/util/CardUtil.java index fa6a5c61052..a83d8327ae9 100644 --- a/Mage/src/main/java/mage/util/CardUtil.java +++ b/Mage/src/main/java/mage/util/CardUtil.java @@ -1496,6 +1496,11 @@ public final class CardUtil { return false; } + if (game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.PAY_LIFE, player.getId(), source, player.getId(), lifeToPay))) { + // 2023-08-20: For now, Cost being replaced are paid. + // Waiting on actual ruling of Ashiok, Wicked Manipulator. + return true; + } if (player.loseLife(lifeToPay, game, source, false) >= lifeToPay) { game.fireEvent(GameEvent.getEvent(GameEvent.EventType.LIFE_PAID, player.getId(), source, player.getId(), lifeToPay)); return true; diff --git a/Mage/src/main/java/mage/watchers/common/CardsExiledThisTurnWatcher.java b/Mage/src/main/java/mage/watchers/common/CardsExiledThisTurnWatcher.java new file mode 100644 index 00000000000..783eb3bf0c0 --- /dev/null +++ b/Mage/src/main/java/mage/watchers/common/CardsExiledThisTurnWatcher.java @@ -0,0 +1,38 @@ +package mage.watchers.common; + +import mage.constants.WatcherScope; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.events.ZoneChangeEvent; +import mage.watchers.Watcher; + +/** + * @author Susucr + */ +public class CardsExiledThisTurnWatcher extends Watcher { + + private int countExiled = 0; + + public CardsExiledThisTurnWatcher() { + super(WatcherScope.GAME); + } + + @Override + public void watch(GameEvent event, Game game) { + if (event.getType() == GameEvent.EventType.ZONE_CHANGE + && ((ZoneChangeEvent) event).getToZone() == Zone.EXILED) { + countExiled++; + } + } + + public int getCountCardsExiledThisTurn() { + return countExiled; + } + + @Override + public void reset() { + super.reset(); + countExiled = 0; + } +} From 2d9599fbbd1b1b8a92607b40bdc891bdd40becbc Mon Sep 17 00:00:00 2001 From: Susucre <34709007+Susucre@users.noreply.github.com> Date: Thu, 31 Aug 2023 01:16:08 +0200 Subject: [PATCH 12/36] [WOE] Implement Faerie Slumber Party (#10949) --- .../src/mage/cards/f/FaerieSlumberParty.java | 88 +++++++++++++++++++ Mage.Sets/src/mage/sets/WildsOfEldraine.java | 1 + 2 files changed, 89 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/f/FaerieSlumberParty.java diff --git a/Mage.Sets/src/mage/cards/f/FaerieSlumberParty.java b/Mage.Sets/src/mage/cards/f/FaerieSlumberParty.java new file mode 100644 index 00000000000..54b3ff08450 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FaerieSlumberParty.java @@ -0,0 +1,88 @@ +package mage.cards.f; + +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.ReturnToHandFromBattlefieldAllEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.filter.StaticFilters; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.game.permanent.token.FaerieBlockFliersToken; +import mage.game.permanent.token.Token; + +import java.util.Objects; +import java.util.Set; +import java.util.UUID; + +/** + * + * @author Susucr + */ +public final class FaerieSlumberParty extends CardImpl { + + public FaerieSlumberParty(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{U}{U}"); + + // Return all creatures to their owners' hands. For each opponent who controlled a creature returned this way, you create two 1/1 blue Faerie creature tokens with flying and "This creature can block only creatures with flying." + this.getSpellAbility().addEffect(new FaerieSlumberPartyEffect()); + } + + private FaerieSlumberParty(final FaerieSlumberParty card) { + super(card); + } + + @Override + public FaerieSlumberParty copy() { + return new FaerieSlumberParty(this); + } +} + +class FaerieSlumberPartyEffect extends OneShotEffect { + + FaerieSlumberPartyEffect() { + super(Outcome.Benefit); + this.staticText = "Return all creatures to their owners' hands. For each opponent who controlled a creature " + + "returned this way, you create two 1/1 blue Faerie creature tokens with flying and " + + "\"This creature can block only creatures with flying.\""; + } + + private FaerieSlumberPartyEffect(final FaerieSlumberPartyEffect effect) { + super(effect); + } + + @Override + public FaerieSlumberPartyEffect copy() { + return new FaerieSlumberPartyEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Set opponents = game.getOpponents(source.getControllerId()); + int count = game.getBattlefield() + .getActivePermanents(StaticFilters.FILTER_PERMANENT_CREATURE, source.getControllerId(), game) + .stream() + .filter(Objects::nonNull) + .map(Permanent::getControllerId) + .distinct() + .filter(opponents::contains) + .mapToInt(id -> 1) + .sum(); + + if(!new ReturnToHandFromBattlefieldAllEffect(StaticFilters.FILTER_PERMANENT_CREATURE) + .apply(game, source)) { + return false; + } + + if(count > 0) { + Token token = new FaerieBlockFliersToken(); + token.putOntoBattlefield(2 * count, game, source, source.getControllerId()); + } + + return true; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/WildsOfEldraine.java b/Mage.Sets/src/mage/sets/WildsOfEldraine.java index 201b3ec1a8a..6ed327e8e6b 100644 --- a/Mage.Sets/src/mage/sets/WildsOfEldraine.java +++ b/Mage.Sets/src/mage/sets/WildsOfEldraine.java @@ -90,6 +90,7 @@ public final class WildsOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Extraordinary Journey", 48, Rarity.RARE, mage.cards.e.ExtraordinaryJourney.class)); cards.add(new SetCardInfo("Faerie Dreamthief", 89, Rarity.UNCOMMON, mage.cards.f.FaerieDreamthief.class)); cards.add(new SetCardInfo("Faerie Fencing", 90, Rarity.UNCOMMON, mage.cards.f.FaerieFencing.class)); + cards.add(new SetCardInfo("Faerie Slumber Party", 371, Rarity.RARE, mage.cards.f.FaerieSlumberParty.class)); cards.add(new SetCardInfo("Farsight Ritual", 49, Rarity.RARE, mage.cards.f.FarsightRitual.class)); cards.add(new SetCardInfo("Faunsbane Troll", 203, Rarity.RARE, mage.cards.f.FaunsbaneTroll.class)); cards.add(new SetCardInfo("Feed the Cauldron", 91, Rarity.COMMON, mage.cards.f.FeedTheCauldron.class)); From fab00d2f27787bae1934aedae3cb1417e05aabdc Mon Sep 17 00:00:00 2001 From: Susucre <34709007+Susucre@users.noreply.github.com> Date: Thu, 31 Aug 2023 01:16:22 +0200 Subject: [PATCH 13/36] [WOE] Implement Curse of the Werefox (#11009) * [WOE] Implement Curse of the Werefox * apply review * Fix aura (and equipment?) tokens not checking for protection on target * fix targetting of reflexive trigger, by creating a custom fight effect. * fix reflexive ability target. --- .../src/mage/cards/c/CurseOfTheWerefox.java | 118 ++++++++++++++++++ Mage.Sets/src/mage/sets/WildsOfEldraine.java | 1 + .../single/woe/CurseOfTheWerefoxTest.java | 88 +++++++++++++ .../CreateRoleAttachedTargetEffect.java | 6 +- .../abilities/keyword/ProtectionAbility.java | 6 + 5 files changed, 217 insertions(+), 2 deletions(-) create mode 100644 Mage.Sets/src/mage/cards/c/CurseOfTheWerefox.java create mode 100644 Mage.Tests/src/test/java/org/mage/test/cards/single/woe/CurseOfTheWerefoxTest.java diff --git a/Mage.Sets/src/mage/cards/c/CurseOfTheWerefox.java b/Mage.Sets/src/mage/cards/c/CurseOfTheWerefox.java new file mode 100644 index 00000000000..007341d08ef --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CurseOfTheWerefox.java @@ -0,0 +1,118 @@ +package mage.cards.c; + +import mage.abilities.Ability; +import mage.abilities.common.delayed.ReflexiveTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateRoleAttachedTargetEffect; +import mage.abilities.effects.common.FightTargetsEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.RoleType; +import mage.filter.StaticFilters; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; +import mage.target.common.TargetOpponentsCreaturePermanent; +import mage.target.targetpointer.FixedTarget; +import mage.util.GameLog; + +import java.util.UUID; + +/** + * @author Susucr + */ +public final class CurseOfTheWerefox extends CardImpl { + + public CurseOfTheWerefox(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{G}"); + + // Create a Monster Role token attached to target creature you control. When you do, that creature fights up to one target creature you don't control. + this.getSpellAbility().addEffect(new CurseOfTheWerefoxEffect()); + this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent()); + } + + private CurseOfTheWerefox(final CurseOfTheWerefox card) { + super(card); + } + + @Override + public CurseOfTheWerefox copy() { + return new CurseOfTheWerefox(this); + } +} + +class CurseOfTheWerefoxEffect extends OneShotEffect { + + CurseOfTheWerefoxEffect() { + super(Outcome.Benefit); + staticText = "create a Monster Role token attached to target creature you control. " + + "When you do, that creature fights up to one target creature you don't control"; + } + + private CurseOfTheWerefoxEffect(final CurseOfTheWerefoxEffect effect) { + super(effect); + } + + @Override + public CurseOfTheWerefoxEffect copy() { + return new CurseOfTheWerefoxEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent target = game.getPermanent(source.getFirstTarget()); + if (target == null) { + return false; + } + + boolean didCreate = + new CreateRoleAttachedTargetEffect(RoleType.MONSTER) + .setTargetPointer(new FixedTarget(target, game)) + .apply(game, source); + if (!didCreate) { + return false; + } + + ReflexiveTriggeredAbility ability = new ReflexiveTriggeredAbility( + new CurseOfTheWerefoxFightEffect(), false, + "that creature fights up to one target creature you don't control" + ); + ability.getEffects().setTargetPointer(new FixedTarget(target.getId(), game)); + ability.addTarget(new TargetCreaturePermanent(0, 1, StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL, false)); + game.fireReflexiveTriggeredAbility(ability, source); + return true; + } +} + + +class CurseOfTheWerefoxFightEffect extends OneShotEffect { + + CurseOfTheWerefoxFightEffect() { + super(Outcome.Damage); + } + + private CurseOfTheWerefoxFightEffect(final CurseOfTheWerefoxFightEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent triggeredCreature = game.getPermanent(this.targetPointer.getFirst(game, source)); + Permanent target = game.getPermanent(source.getFirstTarget()); + if (triggeredCreature != null + && target != null + && triggeredCreature.isCreature(game) + && target.isCreature(game)) { + return triggeredCreature.fight(target, source, game); + } + return false; + } + + @Override + public CurseOfTheWerefoxFightEffect copy() { + return new CurseOfTheWerefoxFightEffect(this); + } +} diff --git a/Mage.Sets/src/mage/sets/WildsOfEldraine.java b/Mage.Sets/src/mage/sets/WildsOfEldraine.java index 6ed327e8e6b..992f111d406 100644 --- a/Mage.Sets/src/mage/sets/WildsOfEldraine.java +++ b/Mage.Sets/src/mage/sets/WildsOfEldraine.java @@ -65,6 +65,7 @@ public final class WildsOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Cooped Up", 8, Rarity.COMMON, mage.cards.c.CoopedUp.class)); cards.add(new SetCardInfo("Cruel Somnophage", 222, Rarity.RARE, mage.cards.c.CruelSomnophage.class)); cards.add(new SetCardInfo("Crystal Grotto", 254, Rarity.COMMON, mage.cards.c.CrystalGrotto.class)); + cards.add(new SetCardInfo("Curse of the Werefox", 167, Rarity.COMMON, mage.cards.c.CurseOfTheWerefox.class)); cards.add(new SetCardInfo("Cursed Courtier", 9, Rarity.UNCOMMON, mage.cards.c.CursedCourtier.class)); cards.add(new SetCardInfo("Cut In", 125, Rarity.COMMON, mage.cards.c.CutIn.class)); cards.add(new SetCardInfo("Decadent Dragon", 223, Rarity.RARE, mage.cards.d.DecadentDragon.class)); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/single/woe/CurseOfTheWerefoxTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/single/woe/CurseOfTheWerefoxTest.java new file mode 100644 index 00000000000..6095dcc866a --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/single/woe/CurseOfTheWerefoxTest.java @@ -0,0 +1,88 @@ +package org.mage.test.cards.single.woe; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * @author Susucr + */ +public class CurseOfTheWerefoxTest extends CardTestPlayerBase { + + /** + * Curse of the Werefox + * {2}{G} + * Sorcery + *

+ * Create a Monster Role token attached to target creature you control. When you do, that creature fights up to one target creature you don’t control. + */ + private static final String curseWerefox = "Curse of the Werefox"; + + /** + * Nexus Wardens + * Creature — Satyr Archer + *

+ * Reach + * Constellation — Whenever an enchantment enters the battlefield under your control, you gain 2 life. + *

+ * 1/4 + */ + private static final String wardens = "Nexus Wardens"; + + /** + * Azorius First-Wing + * {W}{U} + * Creature — Griffin + *

+ * Flying, protection from enchantments + *

+ * 2/2 + */ + private static final String azoriusFirstWing = "Azorius First-Wing"; + + // Checks that the "When you do" part of the ability does not trigger. + @Test + public void noTokenCreated() { + setStrictChooseMode(true); + + addCard(Zone.HAND, playerA, curseWerefox); + addCard(Zone.BATTLEFIELD, playerA, "Forest", 3); + addCard(Zone.BATTLEFIELD, playerA, wardens); + addCard(Zone.BATTLEFIELD, playerA, azoriusFirstWing); + addCard(Zone.BATTLEFIELD, playerB, wardens); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, curseWerefox, azoriusFirstWing); + setStopAt(1, PhaseStep.END_COMBAT); + execute(); + + assertLife(playerA, 20); // no Constellation trigger. + assertDamageReceived(playerA, wardens, 0); + assertDamageReceived(playerA, azoriusFirstWing, 0); + assertDamageReceived(playerB, wardens, 0); + assertPermanentCount(playerA, "Monster", 0); + } + + @Test + public void usualBehavior() { + setStrictChooseMode(true); + + addCard(Zone.HAND, playerA, curseWerefox); + addCard(Zone.BATTLEFIELD, playerA, "Forest", 3); + addCard(Zone.BATTLEFIELD, playerA, wardens); + addCard(Zone.BATTLEFIELD, playerB, wardens); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, curseWerefox, wardens); + setChoice(playerA, "Constellation"); + addTarget(playerA, wardens); // Choosing second target for the fight. + setStopAt(1, PhaseStep.END_COMBAT); + execute(); + + assertLife(playerA, 20 + 2); // Constellation Trigger. + assertPermanentCount(playerA, wardens, 1); + assertPermanentCount(playerB, wardens, 1); + assertDamageReceived(playerA, wardens, 1); + assertDamageReceived(playerB, wardens, 2); + assertPermanentCount(playerA, "Monster", 1); + } +} \ No newline at end of file diff --git a/Mage/src/main/java/mage/abilities/effects/common/CreateRoleAttachedTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/CreateRoleAttachedTargetEffect.java index ff5652ea894..cc964203c26 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/CreateRoleAttachedTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/CreateRoleAttachedTargetEffect.java @@ -7,6 +7,7 @@ import mage.constants.Outcome; import mage.constants.RoleType; import mage.game.Game; import mage.game.permanent.Permanent; +import mage.game.permanent.token.Token; /** * @author TheElk801 @@ -36,8 +37,9 @@ public class CreateRoleAttachedTargetEffect extends OneShotEffect { if (permanent == null) { return false; } - roleType.createToken(permanent, game, source); - return true; + Token token = roleType.createToken(permanent, game, source); + // The token may not be created, for instance if the creature has protection from enchantments. + return token.getLastAddedTokenIds().size() > 0; } @Override diff --git a/Mage/src/main/java/mage/abilities/keyword/ProtectionAbility.java b/Mage/src/main/java/mage/abilities/keyword/ProtectionAbility.java index f47c2801a7d..a7bdf2f330b 100644 --- a/Mage/src/main/java/mage/abilities/keyword/ProtectionAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/ProtectionAbility.java @@ -10,6 +10,8 @@ import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; import mage.game.Game; import mage.game.permanent.Permanent; +import mage.game.permanent.PermanentToken; +import mage.game.permanent.token.Token; import mage.game.stack.Spell; import mage.players.Player; import mage.util.CardUtil; @@ -89,6 +91,10 @@ public class ProtectionAbility extends StaticAbility { return !((FilterCard) filter).match((Card) source, ((Permanent) source).getControllerId(), this, game); } else if (source instanceof Card) { return !((FilterCard) filter).match((Card) source, ((Card) source).getOwnerId(), this, game); + } else if (source instanceof Token) { + // Fake a permanent with the Token info. + PermanentToken token = new PermanentToken((Token) source, null, game); + return !((FilterCard) filter).match((Card) token, game); } return true; } From 9abe115c683ab66195038969922aaaef90ba602d Mon Sep 17 00:00:00 2001 From: Susucre <34709007+Susucre@users.noreply.github.com> Date: Thu, 31 Aug 2023 01:17:05 +0200 Subject: [PATCH 14/36] more cleanup of copy method/constructor (#11056) --- .../src/mage/cards/a/AkimTheSoaringWind.java | 7 +++--- Mage.Sets/src/mage/cards/c/ChaosLord.java | 20 +++++---------- Mage.Sets/src/mage/cards/c/CivicSaber.java | 25 ++++++++----------- .../src/mage/cards/d/DeathsApproach.java | 17 ++++++------- .../src/mage/cards/g/GhastlyRemains.java | 9 ++++--- Mage.Sets/src/mage/cards/g/Gigapede.java | 13 +++++----- .../src/mage/cards/g/GleamOfAuthority.java | 9 ++++--- .../src/mage/cards/g/GolemSkinGauntlets.java | 17 ++++++------- Mage.Sets/src/mage/cards/i/Ichorid.java | 6 ++--- Mage.Sets/src/mage/cards/j/JumboImp.java | 19 ++++++-------- .../src/mage/cards/l/LightningStorm.java | 6 ++--- Mage.Sets/src/mage/cards/m/MindsDilation.java | 11 ++++---- .../mage/cards/p/ParnesseTheSubtleBrush.java | 3 +-- Mage.Sets/src/mage/cards/p/PrizedAmalgam.java | 9 ++++--- .../src/mage/cards/s/ShareTheSpoils.java | 15 +++++------ .../src/mage/cards/t/TamiyoTheMoonSage.java | 10 +++++--- Mage.Sets/src/mage/cards/t/Tephraderm.java | 16 ++++++------ .../src/mage/cards/v/VaziKeenNegotiator.java | 5 +--- .../mage/cards/v/VivienMonstersAdvocate.java | 3 +-- .../src/mage/cards/w/WelcomeToTheFold.java | 10 ++++---- .../src/mage/cards/z/ZaxaraTheExemplary.java | 5 ++-- .../mana/DoUnlessAnyPlayerPaysManaEffect.java | 2 +- .../token/OminousRoostBirdToken.java | 2 +- 23 files changed, 110 insertions(+), 129 deletions(-) diff --git a/Mage.Sets/src/mage/cards/a/AkimTheSoaringWind.java b/Mage.Sets/src/mage/cards/a/AkimTheSoaringWind.java index 9b37a04b4f8..4c1e4740358 100644 --- a/Mage.Sets/src/mage/cards/a/AkimTheSoaringWind.java +++ b/Mage.Sets/src/mage/cards/a/AkimTheSoaringWind.java @@ -2,7 +2,6 @@ package mage.cards.a; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.TriggeredAbility; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.condition.Condition; @@ -100,11 +99,11 @@ enum AkimTheSoaringWindCondition implements Condition { class AkimTheSoaringTokenAbility extends TriggeredAbilityImpl { - public AkimTheSoaringTokenAbility() { + AkimTheSoaringTokenAbility() { super(Zone.BATTLEFIELD, new CreateTokenEffect(new BirdToken(), 1), false); } - public AkimTheSoaringTokenAbility(final AkimTheSoaringTokenAbility ability) { + private AkimTheSoaringTokenAbility(final AkimTheSoaringTokenAbility ability) { super(ability); } @@ -124,7 +123,7 @@ class AkimTheSoaringTokenAbility extends TriggeredAbilityImpl { } @Override - public TriggeredAbility copy() { + public AkimTheSoaringTokenAbility copy() { return new AkimTheSoaringTokenAbility(this); } diff --git a/Mage.Sets/src/mage/cards/c/ChaosLord.java b/Mage.Sets/src/mage/cards/c/ChaosLord.java index d7207e677ad..910976053bc 100644 --- a/Mage.Sets/src/mage/cards/c/ChaosLord.java +++ b/Mage.Sets/src/mage/cards/c/ChaosLord.java @@ -1,6 +1,5 @@ package mage.cards.c; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; @@ -9,25 +8,18 @@ import mage.abilities.condition.Condition; import mage.abilities.condition.common.ControlsPermanentsComparedToOpponentsCondition; import mage.abilities.effects.AsThoughEffectImpl; import mage.abilities.effects.ContinuousEffectImpl; -import mage.constants.SubType; import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.AsThoughEffectType; -import mage.constants.CardType; -import mage.constants.ComparisonType; -import mage.constants.Duration; -import mage.constants.Layer; -import mage.constants.Outcome; -import mage.constants.SubLayer; -import mage.constants.TargetController; -import mage.constants.Zone; +import mage.constants.*; import mage.filter.FilterPermanent; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.common.TargetOpponent; +import java.util.UUID; + /** * * @author jeffwadsworth @@ -68,19 +60,19 @@ public final class ChaosLord extends CardImpl { class ChaosLordTriggeredAbility extends BeginningOfUpkeepTriggeredAbility { - public ChaosLordTriggeredAbility() { + ChaosLordTriggeredAbility() { super(Zone.BATTLEFIELD, new GainControlSourceEffect(), TargetController.YOU, false); } - public ChaosLordTriggeredAbility(ChaosLordTriggeredAbility ability) { + private ChaosLordTriggeredAbility(final ChaosLordTriggeredAbility ability) { super(ability); } @Override - public BeginningOfUpkeepTriggeredAbility copy() { + public ChaosLordTriggeredAbility copy() { return new ChaosLordTriggeredAbility(this); } diff --git a/Mage.Sets/src/mage/cards/c/CivicSaber.java b/Mage.Sets/src/mage/cards/c/CivicSaber.java index 945cc37eabd..a8c7976c0de 100644 --- a/Mage.Sets/src/mage/cards/c/CivicSaber.java +++ b/Mage.Sets/src/mage/cards/c/CivicSaber.java @@ -1,7 +1,6 @@ package mage.cards.c; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.mana.GenericManaCost; @@ -12,14 +11,12 @@ import mage.abilities.effects.common.continuous.BoostEquippedEffect; import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.SubType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.Zone; +import mage.constants.*; import mage.game.Game; import mage.game.permanent.Permanent; import mage.target.common.TargetControlledCreaturePermanent; + +import java.util.UUID; /** * @@ -47,15 +44,15 @@ public final class CivicSaber extends CardImpl { return new CivicSaber(this); } } - + class CivicSaberColorCount implements DynamicValue { - - public CivicSaberColorCount() { + + CivicSaberColorCount() { } - - public CivicSaberColorCount(final CivicSaberColorCount dynamicValue) { + + private CivicSaberColorCount(final CivicSaberColorCount dynamicValue) { } - + @Override public int calculate(Game game, Ability sourceAbility, Effect effect) { int count = 0; @@ -68,9 +65,9 @@ class CivicSaberColorCount implements DynamicValue { } return count; } - + @Override - public DynamicValue copy() { + public CivicSaberColorCount copy() { return new CivicSaberColorCount(this); } diff --git a/Mage.Sets/src/mage/cards/d/DeathsApproach.java b/Mage.Sets/src/mage/cards/d/DeathsApproach.java index 6754b87ffb8..9543a3d5f5d 100644 --- a/Mage.Sets/src/mage/cards/d/DeathsApproach.java +++ b/Mage.Sets/src/mage/cards/d/DeathsApproach.java @@ -1,7 +1,6 @@ package mage.cards.d; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.dynamicvalue.DynamicValue; @@ -12,11 +11,7 @@ import mage.abilities.effects.common.continuous.BoostEnchantedEffect; import mage.abilities.keyword.EnchantAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.SubType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.Zone; +import mage.constants.*; import mage.filter.FilterCard; import mage.filter.common.FilterCreatureCard; import mage.game.Game; @@ -25,6 +20,8 @@ import mage.players.Player; import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -62,13 +59,13 @@ public final class DeathsApproach extends CardImpl { class CardsInEnchantedCreaturesControllerGraveyardCount implements DynamicValue { - private FilterCard filter; + private final FilterCard filter; - public CardsInEnchantedCreaturesControllerGraveyardCount(FilterCard filter) { + CardsInEnchantedCreaturesControllerGraveyardCount(FilterCard filter) { this.filter = filter; } - public CardsInEnchantedCreaturesControllerGraveyardCount(final CardsInEnchantedCreaturesControllerGraveyardCount dynamicValue) { + private CardsInEnchantedCreaturesControllerGraveyardCount(final CardsInEnchantedCreaturesControllerGraveyardCount dynamicValue) { this.filter = dynamicValue.filter; } @@ -89,7 +86,7 @@ class CardsInEnchantedCreaturesControllerGraveyardCount implements DynamicValue } @Override - public DynamicValue copy() { + public CardsInEnchantedCreaturesControllerGraveyardCount copy() { return new CardsInEnchantedCreaturesControllerGraveyardCount(this); } diff --git a/Mage.Sets/src/mage/cards/g/GhastlyRemains.java b/Mage.Sets/src/mage/cards/g/GhastlyRemains.java index ba52266dd9a..37c54ce36b1 100644 --- a/Mage.Sets/src/mage/cards/g/GhastlyRemains.java +++ b/Mage.Sets/src/mage/cards/g/GhastlyRemains.java @@ -1,7 +1,6 @@ package mage.cards.g; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.costs.mana.ManaCostsImpl; @@ -18,6 +17,8 @@ import mage.constants.Zone; import mage.game.Game; import mage.players.Player; +import java.util.UUID; + /** * * @author TheElk801 @@ -51,16 +52,16 @@ public final class GhastlyRemains extends CardImpl { class GhastlyRemainsTriggeredAbility extends BeginningOfUpkeepTriggeredAbility { - public GhastlyRemainsTriggeredAbility() { + GhastlyRemainsTriggeredAbility() { super(Zone.GRAVEYARD, new DoIfCostPaid(new ReturnSourceFromGraveyardToHandEffect(), new ManaCostsImpl<>("{B}{B}{B}")), TargetController.YOU, false); } - public GhastlyRemainsTriggeredAbility(GhastlyRemainsTriggeredAbility ability) { + private GhastlyRemainsTriggeredAbility(final GhastlyRemainsTriggeredAbility ability) { super(ability); } @Override - public BeginningOfUpkeepTriggeredAbility copy() { + public GhastlyRemainsTriggeredAbility copy() { return new GhastlyRemainsTriggeredAbility(this); } diff --git a/Mage.Sets/src/mage/cards/g/Gigapede.java b/Mage.Sets/src/mage/cards/g/Gigapede.java index 1aa4217bb65..c3f916a25cb 100644 --- a/Mage.Sets/src/mage/cards/g/Gigapede.java +++ b/Mage.Sets/src/mage/cards/g/Gigapede.java @@ -1,7 +1,6 @@ package mage.cards.g; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.costs.common.DiscardCardCost; @@ -17,6 +16,8 @@ import mage.constants.Zone; import mage.game.Game; import mage.players.Player; +import java.util.UUID; + /** * * @author Plopman @@ -47,18 +48,18 @@ public final class Gigapede extends CardImpl { } -class GigapedeTriggerdAbility extends BeginningOfUpkeepTriggeredAbility{ - - public GigapedeTriggerdAbility(){ +class GigapedeTriggerdAbility extends BeginningOfUpkeepTriggeredAbility { + + GigapedeTriggerdAbility() { super(Zone.GRAVEYARD, new DoIfCostPaid(new ReturnSourceFromGraveyardToHandEffect(), new DiscardCardCost()), TargetController.YOU, false); } - public GigapedeTriggerdAbility(GigapedeTriggerdAbility ability) { + private GigapedeTriggerdAbility(final GigapedeTriggerdAbility ability) { super(ability); } @Override - public BeginningOfUpkeepTriggeredAbility copy() { + public GigapedeTriggerdAbility copy() { return new GigapedeTriggerdAbility(this); } diff --git a/Mage.Sets/src/mage/cards/g/GleamOfAuthority.java b/Mage.Sets/src/mage/cards/g/GleamOfAuthority.java index 65693ecd15e..96265eff9e0 100644 --- a/Mage.Sets/src/mage/cards/g/GleamOfAuthority.java +++ b/Mage.Sets/src/mage/cards/g/GleamOfAuthority.java @@ -1,7 +1,6 @@ package mage.cards.g; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleStaticAbility; @@ -25,6 +24,8 @@ import mage.game.permanent.Permanent; import mage.target.TargetPermanent; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** * * @author LevelX2 @@ -70,10 +71,10 @@ class CountersOnControlledCount implements DynamicValue { static FilterCreaturePermanent filter = new FilterCreaturePermanent(); - public CountersOnControlledCount() { + CountersOnControlledCount() { } - public CountersOnControlledCount(final CountersOnControlledCount dynamicValue) { + private CountersOnControlledCount(final CountersOnControlledCount dynamicValue) { super(); } @@ -90,7 +91,7 @@ class CountersOnControlledCount implements DynamicValue { } @Override - public DynamicValue copy() { + public CountersOnControlledCount copy() { return new CountersOnControlledCount(this); } diff --git a/Mage.Sets/src/mage/cards/g/GolemSkinGauntlets.java b/Mage.Sets/src/mage/cards/g/GolemSkinGauntlets.java index c2fbf1b9534..f47d2fc4c78 100644 --- a/Mage.Sets/src/mage/cards/g/GolemSkinGauntlets.java +++ b/Mage.Sets/src/mage/cards/g/GolemSkinGauntlets.java @@ -1,8 +1,6 @@ package mage.cards.g; -import java.util.List; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.mana.GenericManaCost; @@ -13,14 +11,13 @@ import mage.abilities.effects.common.continuous.BoostEquippedEffect; import mage.abilities.keyword.EquipAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.SubType; -import mage.constants.Duration; -import mage.constants.Outcome; -import mage.constants.Zone; +import mage.constants.*; import mage.game.Game; import mage.game.permanent.Permanent; +import java.util.List; +import java.util.UUID; + /** * * @author North @@ -51,10 +48,10 @@ public final class GolemSkinGauntlets extends CardImpl { // compare to Goblin Gaveleer class GolemSkinGauntletsAttachedCount implements DynamicValue { - public GolemSkinGauntletsAttachedCount() { + GolemSkinGauntletsAttachedCount() { } - public GolemSkinGauntletsAttachedCount(final GolemSkinGauntletsAttachedCount dynamicValue) { + private GolemSkinGauntletsAttachedCount(final GolemSkinGauntletsAttachedCount dynamicValue) { } @Override @@ -78,7 +75,7 @@ class GolemSkinGauntletsAttachedCount implements DynamicValue { } @Override - public DynamicValue copy() { + public GolemSkinGauntletsAttachedCount copy() { return new GolemSkinGauntletsAttachedCount(this); } diff --git a/Mage.Sets/src/mage/cards/i/Ichorid.java b/Mage.Sets/src/mage/cards/i/Ichorid.java index da61c6ff2f7..32300ca63b1 100644 --- a/Mage.Sets/src/mage/cards/i/Ichorid.java +++ b/Mage.Sets/src/mage/cards/i/Ichorid.java @@ -66,19 +66,19 @@ class IchoridTriggerdAbility extends BeginningOfUpkeepTriggeredAbility { filter.add(new ColorPredicate(ObjectColor.BLACK)); } - public IchoridTriggerdAbility() { + IchoridTriggerdAbility() { super(Zone.GRAVEYARD, new DoIfCostPaid( new ReturnSourceFromGraveyardToBattlefieldEffect(), new ExileFromGraveCost(new TargetCardInYourGraveyard(filter)) ), TargetController.YOU, false); } - public IchoridTriggerdAbility(IchoridTriggerdAbility ability) { + private IchoridTriggerdAbility(IchoridTriggerdAbility ability) { super(ability); } @Override - public BeginningOfUpkeepTriggeredAbility copy() { + public IchoridTriggerdAbility copy() { return new IchoridTriggerdAbility(this); } diff --git a/Mage.Sets/src/mage/cards/j/JumboImp.java b/Mage.Sets/src/mage/cards/j/JumboImp.java index 2cf061d908d..0a6f757cd4f 100644 --- a/Mage.Sets/src/mage/cards/j/JumboImp.java +++ b/Mage.Sets/src/mage/cards/j/JumboImp.java @@ -1,9 +1,6 @@ package mage.cards.j; -import java.util.ArrayList; -import java.util.List; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.BeginningOfEndStepTriggeredAbility; @@ -14,17 +11,17 @@ import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.SubType; -import mage.constants.TargetController; -import mage.constants.Zone; +import mage.constants.*; import mage.counters.Counter; import mage.counters.CounterType; import mage.game.Game; import mage.game.permanent.Permanent; import mage.players.Player; +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; + /** * * @author spjspj @@ -65,11 +62,11 @@ public final class JumboImp extends CardImpl { class JumboImpEffect extends EntersBattlefieldWithXCountersEffect { - public JumboImpEffect(Counter counter) { + JumboImpEffect(Counter counter) { super(counter); } - public JumboImpEffect(EntersBattlefieldWithXCountersEffect effect) { + private JumboImpEffect(JumboImpEffect effect) { super(effect); } @@ -87,7 +84,7 @@ class JumboImpEffect extends EntersBattlefieldWithXCountersEffect { } @Override - public EntersBattlefieldWithXCountersEffect copy() { + public JumboImpEffect copy() { return new JumboImpEffect(this); } diff --git a/Mage.Sets/src/mage/cards/l/LightningStorm.java b/Mage.Sets/src/mage/cards/l/LightningStorm.java index 1693ad4cac5..345cf2d500d 100644 --- a/Mage.Sets/src/mage/cards/l/LightningStorm.java +++ b/Mage.Sets/src/mage/cards/l/LightningStorm.java @@ -61,11 +61,11 @@ class LightningStormCountCondition implements DynamicValue { private final CounterType counter; - public LightningStormCountCondition(CounterType counter) { + LightningStormCountCondition(CounterType counter) { this.counter = counter; } - public LightningStormCountCondition(final LightningStormCountCondition countersCount) { + private LightningStormCountCondition(final LightningStormCountCondition countersCount) { this.counter = countersCount.counter; } @@ -79,7 +79,7 @@ class LightningStormCountCondition implements DynamicValue { } @Override - public DynamicValue copy() { + public LightningStormCountCondition copy() { return new LightningStormCountCondition(this); } diff --git a/Mage.Sets/src/mage/cards/m/MindsDilation.java b/Mage.Sets/src/mage/cards/m/MindsDilation.java index cb5b0b19e63..484beb86636 100644 --- a/Mage.Sets/src/mage/cards/m/MindsDilation.java +++ b/Mage.Sets/src/mage/cards/m/MindsDilation.java @@ -1,7 +1,5 @@ package mage.cards.m; -import java.util.List; -import java.util.UUID; import mage.ApprovingObject; import mage.MageObject; import mage.abilities.Ability; @@ -22,6 +20,9 @@ import mage.players.Player; import mage.target.targetpointer.FixedTarget; import mage.watchers.common.SpellsCastWatcher; +import java.util.List; +import java.util.UUID; + /** * * @author fireshoes @@ -50,16 +51,16 @@ public final class MindsDilation extends CardImpl { class MindsDilationTriggeredAbility extends SpellCastOpponentTriggeredAbility { - public MindsDilationTriggeredAbility(Effect effect, boolean optional) { + MindsDilationTriggeredAbility(Effect effect, boolean optional) { super(Zone.BATTLEFIELD, effect, StaticFilters.FILTER_SPELL, optional); } - public MindsDilationTriggeredAbility(SpellCastOpponentTriggeredAbility ability) { + private MindsDilationTriggeredAbility(MindsDilationTriggeredAbility ability) { super(ability); } @Override - public SpellCastOpponentTriggeredAbility copy() { + public MindsDilationTriggeredAbility copy() { return new MindsDilationTriggeredAbility(this); } diff --git a/Mage.Sets/src/mage/cards/p/ParnesseTheSubtleBrush.java b/Mage.Sets/src/mage/cards/p/ParnesseTheSubtleBrush.java index bd474ecaf48..6e8267d3d5e 100644 --- a/Mage.Sets/src/mage/cards/p/ParnesseTheSubtleBrush.java +++ b/Mage.Sets/src/mage/cards/p/ParnesseTheSubtleBrush.java @@ -2,7 +2,6 @@ package mage.cards.p; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.TriggeredAbility; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.TargetOfOpponentsSpellOrAbilityTriggeredAbility; import mage.abilities.costs.common.PayLifeCost; @@ -111,7 +110,7 @@ class ParnesseTheSubtleBrushCopySpellTriggeredAbility extends TriggeredAbilityIm } @Override - public TriggeredAbility copy() { + public ParnesseTheSubtleBrushCopySpellTriggeredAbility copy() { return new ParnesseTheSubtleBrushCopySpellTriggeredAbility(this); } } diff --git a/Mage.Sets/src/mage/cards/p/PrizedAmalgam.java b/Mage.Sets/src/mage/cards/p/PrizedAmalgam.java index afddc63413a..22bd5243d42 100644 --- a/Mage.Sets/src/mage/cards/p/PrizedAmalgam.java +++ b/Mage.Sets/src/mage/cards/p/PrizedAmalgam.java @@ -1,7 +1,6 @@ package mage.cards.p; -import java.util.UUID; import mage.MageInt; import mage.abilities.common.EntersBattlefieldAllTriggeredAbility; import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility; @@ -22,6 +21,8 @@ import mage.game.events.GameEvent; import mage.target.targetpointer.FixedTarget; import mage.watchers.common.CastFromGraveyardWatcher; +import java.util.UUID; + /** * * @author LevelX2 @@ -60,16 +61,16 @@ public final class PrizedAmalgam extends CardImpl { class PrizedAmalgamTriggerdAbility extends EntersBattlefieldAllTriggeredAbility { - public PrizedAmalgamTriggerdAbility(Effect effect, FilterPermanent filter) { + PrizedAmalgamTriggerdAbility(Effect effect, FilterPermanent filter) { super(Zone.GRAVEYARD, effect, filter, false); } - public PrizedAmalgamTriggerdAbility(EntersBattlefieldAllTriggeredAbility ability) { + private PrizedAmalgamTriggerdAbility(PrizedAmalgamTriggerdAbility ability) { super(ability); } @Override - public EntersBattlefieldAllTriggeredAbility copy() { + public PrizedAmalgamTriggerdAbility copy() { return new PrizedAmalgamTriggerdAbility(this); } diff --git a/Mage.Sets/src/mage/cards/s/ShareTheSpoils.java b/Mage.Sets/src/mage/cards/s/ShareTheSpoils.java index b6dc06542b4..48799a21db0 100644 --- a/Mage.Sets/src/mage/cards/s/ShareTheSpoils.java +++ b/Mage.Sets/src/mage/cards/s/ShareTheSpoils.java @@ -2,11 +2,14 @@ package mage.cards.s; import mage.MageIdentifier; import mage.abilities.Ability; -import mage.abilities.TriggeredAbility; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.*; -import mage.cards.*; +import mage.abilities.effects.AsThoughEffectImpl; +import mage.abilities.effects.AsThoughManaEffect; +import mage.abilities.effects.OneShotEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; import mage.constants.*; import mage.game.ExileZone; import mage.game.Game; @@ -18,8 +21,6 @@ import mage.target.targetpointer.FixedTarget; import mage.util.CardUtil; import mage.watchers.Watcher; -import java.util.HashSet; -import java.util.Set; import java.util.UUID; /** @@ -85,7 +86,7 @@ class ShareTheSpoilsExileETBAndPlayerLossAbility extends TriggeredAbilityImpl { } @Override - public TriggeredAbility copy() { + public ShareTheSpoilsExileETBAndPlayerLossAbility copy() { return new ShareTheSpoilsExileETBAndPlayerLossAbility(this); } @@ -286,7 +287,7 @@ class ShareTheSpoilsExileCardWhenPlayACardAbility extends TriggeredAbilityImpl { } @Override - public TriggeredAbility copy() { + public ShareTheSpoilsExileCardWhenPlayACardAbility copy() { return new ShareTheSpoilsExileCardWhenPlayACardAbility(this); } diff --git a/Mage.Sets/src/mage/cards/t/TamiyoTheMoonSage.java b/Mage.Sets/src/mage/cards/t/TamiyoTheMoonSage.java index ed9e1242d56..8cccf31da79 100644 --- a/Mage.Sets/src/mage/cards/t/TamiyoTheMoonSage.java +++ b/Mage.Sets/src/mage/cards/t/TamiyoTheMoonSage.java @@ -1,7 +1,6 @@ package mage.cards.t; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.LoyaltyAbility; import mage.abilities.dynamicvalue.DynamicValue; @@ -23,6 +22,8 @@ import mage.target.Target; import mage.target.TargetPermanent; import mage.target.TargetPlayer; +import java.util.UUID; + /** * * @author North, noxx @@ -44,7 +45,7 @@ public final class TamiyoTheMoonSage extends CardImpl { this.addAbility(ability); // -2: Draw a card for each tapped creature target player controls. - ability = new LoyaltyAbility(new DrawCardSourceControllerEffect(new TappedCreaturesControlledByTargetCount()), -2); + ability = new LoyaltyAbility(new DrawCardSourceControllerEffect(TappedCreaturesControlledByTargetCount.instance), -2); ability.addTarget(new TargetPlayer()); this.addAbility(ability); @@ -62,7 +63,8 @@ public final class TamiyoTheMoonSage extends CardImpl { } } -class TappedCreaturesControlledByTargetCount implements DynamicValue { +enum TappedCreaturesControlledByTargetCount implements DynamicValue { + instance; private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(); @@ -77,7 +79,7 @@ class TappedCreaturesControlledByTargetCount implements DynamicValue { @Override public TappedCreaturesControlledByTargetCount copy() { - return new TappedCreaturesControlledByTargetCount(); + return this; } @Override diff --git a/Mage.Sets/src/mage/cards/t/Tephraderm.java b/Mage.Sets/src/mage/cards/t/Tephraderm.java index 5c642c96b0a..19cf51a11cf 100644 --- a/Mage.Sets/src/mage/cards/t/Tephraderm.java +++ b/Mage.Sets/src/mage/cards/t/Tephraderm.java @@ -1,8 +1,6 @@ package mage.cards.t; -import java.util.UUID; import mage.MageInt; -import mage.abilities.TriggeredAbility; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.dynamicvalue.common.StaticValue; import mage.abilities.effects.Effect; @@ -20,6 +18,8 @@ import mage.game.permanent.Permanent; import mage.game.stack.StackObject; import mage.target.targetpointer.FixedTarget; +import java.util.UUID; + /** * * @author Quercitron @@ -53,11 +53,11 @@ class TephradermCreatureDamageTriggeredAbility extends TriggeredAbilityImpl { private static final FilterCreaturePermanent FILTER_CREATURE = new FilterCreaturePermanent(); - public TephradermCreatureDamageTriggeredAbility() { + TephradermCreatureDamageTriggeredAbility() { super(Zone.BATTLEFIELD, new DamageTargetEffect(0)); } - public TephradermCreatureDamageTriggeredAbility(final TephradermCreatureDamageTriggeredAbility ability) { + private TephradermCreatureDamageTriggeredAbility(final TephradermCreatureDamageTriggeredAbility ability) { super(ability); } @@ -88,7 +88,7 @@ class TephradermCreatureDamageTriggeredAbility extends TriggeredAbilityImpl { } @Override - public TriggeredAbility copy() { + public TephradermCreatureDamageTriggeredAbility copy() { return new TephradermCreatureDamageTriggeredAbility(this); } @@ -100,11 +100,11 @@ class TephradermCreatureDamageTriggeredAbility extends TriggeredAbilityImpl { class TephradermSpellDamageTriggeredAbility extends TriggeredAbilityImpl { - public TephradermSpellDamageTriggeredAbility() { + TephradermSpellDamageTriggeredAbility() { super(Zone.BATTLEFIELD, new DamageTargetEffect(0)); } - public TephradermSpellDamageTriggeredAbility(final TephradermSpellDamageTriggeredAbility ability) { + private TephradermSpellDamageTriggeredAbility(final TephradermSpellDamageTriggeredAbility ability) { super(ability); } @@ -134,7 +134,7 @@ class TephradermSpellDamageTriggeredAbility extends TriggeredAbilityImpl { } @Override - public TriggeredAbility copy() { + public TephradermSpellDamageTriggeredAbility copy() { return new TephradermSpellDamageTriggeredAbility(this); } diff --git a/Mage.Sets/src/mage/cards/v/VaziKeenNegotiator.java b/Mage.Sets/src/mage/cards/v/VaziKeenNegotiator.java index 626bc166184..b8a478acf98 100644 --- a/Mage.Sets/src/mage/cards/v/VaziKeenNegotiator.java +++ b/Mage.Sets/src/mage/cards/v/VaziKeenNegotiator.java @@ -2,7 +2,6 @@ package mage.cards.v; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.TriggeredAbility; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.condition.common.TreasureSpentToCastCondition; @@ -23,13 +22,11 @@ import mage.counters.CounterType; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.token.TreasureToken; -import mage.game.stack.StackObject; import mage.players.Player; import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetOpponent; import mage.watchers.common.CreatedTokenWatcher; -import java.util.Optional; import java.util.UUID; /** @@ -106,7 +103,7 @@ class VaziKeenNegotiatorOpponentCastsOrActivatesTriggeredAbility extends Trigger } @Override - public TriggeredAbility copy() { + public VaziKeenNegotiatorOpponentCastsOrActivatesTriggeredAbility copy() { return new VaziKeenNegotiatorOpponentCastsOrActivatesTriggeredAbility(this); } } diff --git a/Mage.Sets/src/mage/cards/v/VivienMonstersAdvocate.java b/Mage.Sets/src/mage/cards/v/VivienMonstersAdvocate.java index 16269fe6e09..164bef33b1b 100644 --- a/Mage.Sets/src/mage/cards/v/VivienMonstersAdvocate.java +++ b/Mage.Sets/src/mage/cards/v/VivienMonstersAdvocate.java @@ -28,7 +28,6 @@ import mage.players.Player; import mage.target.common.TargetCardInLibrary; import java.util.*; -import java.util.stream.Collectors; /** * @author TheElk801 @@ -150,7 +149,7 @@ class VivienMonstersAdvocateTriggeredAbility extends DelayedTriggeredAbility { } @Override - public DelayedTriggeredAbility copy() { + public VivienMonstersAdvocateTriggeredAbility copy() { return new VivienMonstersAdvocateTriggeredAbility(this); } diff --git a/Mage.Sets/src/mage/cards/w/WelcomeToTheFold.java b/Mage.Sets/src/mage/cards/w/WelcomeToTheFold.java index bb6c0ac6be0..2e1ee520630 100644 --- a/Mage.Sets/src/mage/cards/w/WelcomeToTheFold.java +++ b/Mage.Sets/src/mage/cards/w/WelcomeToTheFold.java @@ -1,7 +1,6 @@ package mage.cards.w; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.costs.mana.ManaCosts; import mage.abilities.costs.mana.ManaCostsImpl; @@ -16,14 +15,15 @@ import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** - * * @author LevelX2 */ public final class WelcomeToTheFold extends CardImpl { public WelcomeToTheFold(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{U}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{U}{U}"); // Madness {X}{U}{U} (If you discard this card // discard it into exile. When you do @@ -55,7 +55,7 @@ class WelcomeToTheFoldEffect extends GainControlTargetEffect { staticText = "Gain control of target creature if its toughness is 2 or less. If Welcome to the Fold's madness cost was paid, instead gain control of that creature if its toughness is X or less"; } - public WelcomeToTheFoldEffect(GainControlTargetEffect effect) { + private WelcomeToTheFoldEffect(final WelcomeToTheFoldEffect effect) { super(effect); } @@ -78,7 +78,7 @@ class WelcomeToTheFoldEffect extends GainControlTargetEffect { } @Override - public GainControlTargetEffect copy() { + public WelcomeToTheFoldEffect copy() { return new WelcomeToTheFoldEffect(this); } diff --git a/Mage.Sets/src/mage/cards/z/ZaxaraTheExemplary.java b/Mage.Sets/src/mage/cards/z/ZaxaraTheExemplary.java index bc70d225913..71d03fb769d 100644 --- a/Mage.Sets/src/mage/cards/z/ZaxaraTheExemplary.java +++ b/Mage.Sets/src/mage/cards/z/ZaxaraTheExemplary.java @@ -2,7 +2,6 @@ package mage.cards.z; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.TriggeredAbility; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.effects.OneShotEffect; @@ -67,7 +66,7 @@ class ZaxaraTheExemplaryHydraTokenAbility extends TriggeredAbilityImpl { setTriggerPhrase("Whenever you cast a spell with {X} in its mana cost"); } - public ZaxaraTheExemplaryHydraTokenAbility(final ZaxaraTheExemplaryHydraTokenAbility ability) { + private ZaxaraTheExemplaryHydraTokenAbility(final ZaxaraTheExemplaryHydraTokenAbility ability) { super(ability); } @@ -90,7 +89,7 @@ class ZaxaraTheExemplaryHydraTokenAbility extends TriggeredAbilityImpl { } @Override - public TriggeredAbility copy() { + public ZaxaraTheExemplaryHydraTokenAbility copy() { return new ZaxaraTheExemplaryHydraTokenAbility(this); } } diff --git a/Mage/src/main/java/mage/abilities/effects/mana/DoUnlessAnyPlayerPaysManaEffect.java b/Mage/src/main/java/mage/abilities/effects/mana/DoUnlessAnyPlayerPaysManaEffect.java index deb3f3a0a0d..ce20bbc720c 100644 --- a/Mage/src/main/java/mage/abilities/effects/mana/DoUnlessAnyPlayerPaysManaEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/mana/DoUnlessAnyPlayerPaysManaEffect.java @@ -74,7 +74,7 @@ public class DoUnlessAnyPlayerPaysManaEffect extends ManaEffect { } @Override - public ManaEffect copy() { + public DoUnlessAnyPlayerPaysManaEffect copy() { return new DoUnlessAnyPlayerPaysManaEffect(this); } diff --git a/Mage/src/main/java/mage/game/permanent/token/OminousRoostBirdToken.java b/Mage/src/main/java/mage/game/permanent/token/OminousRoostBirdToken.java index 73051ea20d0..b9c1ad2b869 100644 --- a/Mage/src/main/java/mage/game/permanent/token/OminousRoostBirdToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/OminousRoostBirdToken.java @@ -25,7 +25,7 @@ public class OminousRoostBirdToken extends TokenImpl { } @Override - public Token copy() { + public OminousRoostBirdToken copy() { return new OminousRoostBirdToken(this); } } From aafc4cb76b50a1f78e8cd843d81694e54a43b037 Mon Sep 17 00:00:00 2001 From: Vivian Greenslade Date: Wed, 30 Aug 2023 20:47:15 -0230 Subject: [PATCH 15/36] [WOC] Implement Brenard, Ginger Sculptor (#11062) * [WOC] Implement Brenard, Ginger Sculptor * updated with new FoodAbility --- .../mage/cards/b/BrenardGingerSculptor.java | 119 ++++++++++++++++++ .../mage/sets/WildsOfEldraineCommander.java | 1 + 2 files changed, 120 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/b/BrenardGingerSculptor.java diff --git a/Mage.Sets/src/mage/cards/b/BrenardGingerSculptor.java b/Mage.Sets/src/mage/cards/b/BrenardGingerSculptor.java new file mode 100644 index 00000000000..97e0f5fd115 --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BrenardGingerSculptor.java @@ -0,0 +1,119 @@ +package mage.cards.b; + +import java.util.UUID; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DiesCreatureTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.abilities.effects.common.continuous.GainAbilityAllEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.abilities.token.FoodAbility; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.AnotherPredicate; +import mage.filter.predicate.permanent.TokenPredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.targetpointer.FixedTarget; + +/** + * + * @author Xanderhall + */ +public final class BrenardGingerSculptor extends CardImpl { + + private static final FilterCreaturePermanent foodOrGolemCreature = new FilterCreaturePermanent("a Food or a Golem creature"); + private static final FilterPermanent nontokenCreature = new FilterControlledCreaturePermanent("another nontoken creature you control"); + + static { + foodOrGolemCreature.add(Predicates.or(SubType.FOOD.getPredicate(), SubType.GOLEM.getPredicate())); + + nontokenCreature.add(TokenPredicate.FALSE); + nontokenCreature.add(AnotherPredicate.instance); + } + + public BrenardGingerSculptor(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{W}{U}"); + + this.supertype.add(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Each creature you control that's a Food or a Golem gets +2/+2 and has trample. + Ability ability = new SimpleStaticAbility(new BoostControlledEffect(2, 2, Duration.WhileOnBattlefield, foodOrGolemCreature) + .setText("each creature you control that's a Food or a Golem gets +2/+2")); + ability.addEffect(new GainAbilityAllEffect(TrampleAbility.getInstance(), Duration.WhileOnBattlefield, foodOrGolemCreature).setText("and has trample.")); + this.addAbility(ability); + + // Whenever another nontoken creature you control dies, you may exile it. If you do, create a token that's a copy of that creature, except it's a 1/1 Food Golem artifact creature in addition to its other types and it has "2, {T}, Sacrifice this artifact: You gain 3 life." + this.addAbility(new DiesCreatureTriggeredAbility(new BrenardGingerSculptorEffect(), true, nontokenCreature, true)); + + } + + private BrenardGingerSculptor(final BrenardGingerSculptor card) { + super(card); + } + + @Override + public BrenardGingerSculptor copy() { + return new BrenardGingerSculptor(this); + } +} + +class BrenardGingerSculptorEffect extends OneShotEffect { + + BrenardGingerSculptorEffect() { + super(Outcome.Copy); + this.staticText = "you may exile it. If you do, create a token that's a copy of that creature, except it's a 1/1 Food Golem artifact creature in "+ + "addition to its other types and it has \"2, {T}, Sacrifice this artifact: You gain 3 life.\""; + } + + private BrenardGingerSculptorEffect(final BrenardGingerSculptorEffect effect) { + super(effect); + } + + public BrenardGingerSculptorEffect copy() { + return new BrenardGingerSculptorEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + Card card = game.getCard(getTargetPointer().getFirst(game, source)); + if (player == null || card == null) { + return false; + } + CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect( + source.getControllerId(), CardType.CREATURE, false, 1, false, + false, null, 1, 1, false + ); + effect.setTargetPointer(new FixedTarget(card.getId(), card.getZoneChangeCounter(game) + 1)); + effect.setBecomesArtifact(true); + effect.setAdditionalSubType(SubType.FOOD); + effect.setAdditionalSubType(SubType.GOLEM); + effect.addAdditionalAbilities(new FoodAbility(false)); + + player.moveCards(card, Zone.EXILED, source, game); + effect.apply(game, source); + return true; + } + + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/WildsOfEldraineCommander.java b/Mage.Sets/src/mage/sets/WildsOfEldraineCommander.java index 18e67756fa4..883c7e8ecf4 100644 --- a/Mage.Sets/src/mage/sets/WildsOfEldraineCommander.java +++ b/Mage.Sets/src/mage/sets/WildsOfEldraineCommander.java @@ -32,6 +32,7 @@ public final class WildsOfEldraineCommander extends ExpansionSet { cards.add(new SetCardInfo("Bear Umbra", 121, Rarity.RARE, mage.cards.b.BearUmbra.class)); cards.add(new SetCardInfo("Bojuka Bog", 152, Rarity.COMMON, mage.cards.b.BojukaBog.class)); cards.add(new SetCardInfo("Brazen Borrower", 85, Rarity.MYTHIC, mage.cards.b.BrazenBorrower.class)); + cards.add(new SetCardInfo("Brenard, Ginger Sculptor", 27, Rarity.MYTHIC, mage.cards.b.BrenardGingerSculptor.class)); cards.add(new SetCardInfo("Canopy Vista", 153, Rarity.RARE, mage.cards.c.CanopyVista.class)); cards.add(new SetCardInfo("Careful Cultivation", 122, Rarity.COMMON, mage.cards.c.CarefulCultivation.class)); cards.add(new SetCardInfo("Castle Ardenvale", 154, Rarity.RARE, mage.cards.c.CastleArdenvale.class)); From 5b01cf51bdc180525a219677be13308f4276c4a4 Mon Sep 17 00:00:00 2001 From: Susucre <34709007+Susucre@users.noreply.github.com> Date: Thu, 31 Aug 2023 01:17:30 +0200 Subject: [PATCH 16/36] Fix Lord Skitter- filter missing SubType.RAT (#11071) --- Mage.Sets/src/mage/cards/l/LordSkitterSewerKing.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/cards/l/LordSkitterSewerKing.java b/Mage.Sets/src/mage/cards/l/LordSkitterSewerKing.java index 273427aeeca..9f2b0a0a614 100644 --- a/Mage.Sets/src/mage/cards/l/LordSkitterSewerKing.java +++ b/Mage.Sets/src/mage/cards/l/LordSkitterSewerKing.java @@ -26,7 +26,7 @@ import java.util.UUID; */ public final class LordSkitterSewerKing extends CardImpl { - private static final FilterControlledPermanent filter = new FilterControlledPermanent("another Rat"); + private static final FilterControlledPermanent filter = new FilterControlledPermanent(SubType.RAT, "another Rat"); private static final FilterCard filterCard = new FilterCard("card from an opponent's graveyard"); static { From 5ddb69e1ba6a71a2ad9df12133b990e2f58f0d39 Mon Sep 17 00:00:00 2001 From: Vivian Greenslade Date: Wed, 30 Aug 2023 21:17:52 -0230 Subject: [PATCH 17/36] Rework DealCombatDamageControlled to allow a creature filter (#11037) * Added filter to ability * wip * updated logic for trigger to use new event * updated classes using trigger to account for constructor changes * condensed constructors, added total damage dealt as value, added exception for SetTargetPointer * fixed set value * fixed optional flag on cards * fixed filter --- .../src/mage/cards/d/DescendantsFury.java | 4 +- .../src/mage/cards/f/FeywildVisitor.java | 60 +------------ .../src/mage/cards/k/KaitoDancingShadow.java | 2 +- .../src/mage/cards/k/KeeperOfFables.java | 71 +++------------ Mage.Sets/src/mage/cards/n/NaturesWill.java | 4 +- .../src/mage/cards/p/ProsperousThief.java | 73 +++------------- .../src/mage/cards/p/PyrewildShaman.java | 5 +- .../src/mage/cards/s/StrongholdArena.java | 6 +- .../src/mage/cards/t/ThopterSpyNetwork.java | 60 ++----------- .../src/mage/cards/t/ThunderbladeCharge.java | 12 ++- ...ombatDamageControlledTriggeredAbility.java | 87 +++++++++---------- .../emblems/LolthSpiderQueenEmblem.java | 4 +- 12 files changed, 98 insertions(+), 290 deletions(-) diff --git a/Mage.Sets/src/mage/cards/d/DescendantsFury.java b/Mage.Sets/src/mage/cards/d/DescendantsFury.java index 3ec8c6e2f33..b2442d0845e 100644 --- a/Mage.Sets/src/mage/cards/d/DescendantsFury.java +++ b/Mage.Sets/src/mage/cards/d/DescendantsFury.java @@ -10,6 +10,7 @@ import mage.abilities.effects.common.DoIfCostPaid; import mage.cards.*; import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.SetTargetPointer; import mage.constants.Zone; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.permanent.PermanentReferenceInCollectionPredicate; @@ -32,12 +33,11 @@ public final class DescendantsFury extends CardImpl { // Whenever one or more creatures you control deal combat damage to a player, you may sacrifice one of them. If you do, reveal cards from the top of your library until you reveal a creature card that shares a creature type with the sacrificed creature. Put that card onto the battlefield and the rest on the bottom of your library in a random order. Ability ability = new DealCombatDamageControlledTriggeredAbility( - Zone.BATTLEFIELD, new DoIfCostPaid( new DescendantsFuryEffect(), new DescendantsFurySacrificeCost() ), - true + SetTargetPointer.PLAYER ); ability.addWatcher(new DamagedPlayerThisCombatWatcher()); diff --git a/Mage.Sets/src/mage/cards/f/FeywildVisitor.java b/Mage.Sets/src/mage/cards/f/FeywildVisitor.java index 3c4b24014a1..ca3742eb141 100644 --- a/Mage.Sets/src/mage/cards/f/FeywildVisitor.java +++ b/Mage.Sets/src/mage/cards/f/FeywildVisitor.java @@ -1,6 +1,6 @@ package mage.cards.f; -import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.DealCombatDamageControlledTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.continuous.GainAbilityAllEffect; @@ -8,15 +8,8 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.*; import mage.filter.StaticFilters; -import mage.game.Game; -import mage.game.events.DamagedPlayerEvent; -import mage.game.events.GameEvent; -import mage.game.permanent.Permanent; -import mage.game.permanent.PermanentToken; import mage.game.permanent.token.FaerieDragonToken; -import java.util.ArrayList; -import java.util.List; import java.util.UUID; /** @@ -32,7 +25,8 @@ public final class FeywildVisitor extends CardImpl { // Commander creatures you own have "Whenever one or more nontoken creatures you control deal combat damage to a player, you create a 1/1 blue Faerie Dragon creature token with flying." this.addAbility(new SimpleStaticAbility(new GainAbilityAllEffect( - new FeywildVisitorAbility(), Duration.WhileOnBattlefield, + new DealCombatDamageControlledTriggeredAbility(new CreateTokenEffect(new FaerieDragonToken()), StaticFilters.FILTER_CREATURE_NON_TOKEN), + Duration.WhileOnBattlefield, StaticFilters.FILTER_CREATURES_OWNED_COMMANDER ))); } @@ -45,50 +39,4 @@ public final class FeywildVisitor extends CardImpl { public FeywildVisitor copy() { return new FeywildVisitor(this); } -} - -class FeywildVisitorAbility extends TriggeredAbilityImpl { - - private final List damagedPlayerIds = new ArrayList<>(); - - FeywildVisitorAbility() { - super(Zone.BATTLEFIELD, new CreateTokenEffect(new FaerieDragonToken()), false); - setTriggerPhrase("Whenever one or more nontoken creatures you control deal combat damage to a player, you "); - } - - private FeywildVisitorAbility(final FeywildVisitorAbility ability) { - super(ability); - } - - @Override - public FeywildVisitorAbility copy() { - return new FeywildVisitorAbility(this); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == GameEvent.EventType.DAMAGED_PLAYER - || event.getType() == GameEvent.EventType.COMBAT_DAMAGE_STEP_POST; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - if (event.getType() == GameEvent.EventType.COMBAT_DAMAGE_STEP_POST) { - damagedPlayerIds.clear(); - return false; - } - if (event.getType() != GameEvent.EventType.DAMAGED_PLAYER - || !((DamagedPlayerEvent) event).isCombatDamage()) { - return false; - } - Permanent creature = game.getPermanent(event.getSourceId()); - if (creature == null - || !creature.isControlledBy(getControllerId()) - || creature instanceof PermanentToken - || damagedPlayerIds.contains(event.getTargetId())) { - return false; - } - damagedPlayerIds.add(event.getTargetId()); - return true; - } -} +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/k/KaitoDancingShadow.java b/Mage.Sets/src/mage/cards/k/KaitoDancingShadow.java index 96aa035fc3a..a1567c99bef 100644 --- a/Mage.Sets/src/mage/cards/k/KaitoDancingShadow.java +++ b/Mage.Sets/src/mage/cards/k/KaitoDancingShadow.java @@ -39,7 +39,7 @@ public final class KaitoDancingShadow extends CardImpl { this.setStartingLoyalty(3); // Whenever one or more creatures you control deal combat damage to a player, you may return one of them to its owner's hand. If you do, you may activate loyalty abilities of Kaito twice this turn rather than only once. - Ability ability = new DealCombatDamageControlledTriggeredAbility(Zone.BATTLEFIELD, new KaitoDancingShadowEffect(), true); + Ability ability = new DealCombatDamageControlledTriggeredAbility(new KaitoDancingShadowEffect(), SetTargetPointer.PLAYER); ability.addWatcher(new DamagedPlayerThisCombatWatcher()); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/k/KeeperOfFables.java b/Mage.Sets/src/mage/cards/k/KeeperOfFables.java index 097f560cffd..a0e8ba955ee 100644 --- a/Mage.Sets/src/mage/cards/k/KeeperOfFables.java +++ b/Mage.Sets/src/mage/cards/k/KeeperOfFables.java @@ -1,20 +1,14 @@ package mage.cards.k; import mage.MageInt; -import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.DealCombatDamageControlledTriggeredAbility; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.constants.Zone; -import mage.game.Game; -import mage.game.events.DamagedPlayerEvent; -import mage.game.events.GameEvent; -import mage.game.permanent.Permanent; - -import java.util.ArrayList; -import java.util.List; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; import java.util.UUID; /** @@ -22,6 +16,12 @@ import java.util.UUID; */ public final class KeeperOfFables extends CardImpl { + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("non-Human creatures"); + + static { + filter.add(Predicates.not(SubType.HUMAN.getPredicate())); + } + public KeeperOfFables(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{G}"); @@ -30,7 +30,7 @@ public final class KeeperOfFables extends CardImpl { this.toughness = new MageInt(5); // Whenever one or more non-Human creatures you control deal combat damage to a player, draw a card. - this.addAbility(new KeeperOfFablesTriggeredAbility()); + this.addAbility(new DealCombatDamageControlledTriggeredAbility(new DrawCardSourceControllerEffect(1), filter)); } private KeeperOfFables(final KeeperOfFables card) { @@ -41,53 +41,4 @@ public final class KeeperOfFables extends CardImpl { public KeeperOfFables copy() { return new KeeperOfFables(this); } -} - -class KeeperOfFablesTriggeredAbility extends TriggeredAbilityImpl { - - private final List damagedPlayerIds = new ArrayList<>(); - - KeeperOfFablesTriggeredAbility() { - super(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), false); - } - - private KeeperOfFablesTriggeredAbility(final KeeperOfFablesTriggeredAbility ability) { - super(ability); - } - - @Override - public KeeperOfFablesTriggeredAbility copy() { - return new KeeperOfFablesTriggeredAbility(this); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == GameEvent.EventType.DAMAGED_PLAYER - || event.getType() == GameEvent.EventType.COMBAT_DAMAGE_STEP_POST; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - if (event.getType() == GameEvent.EventType.DAMAGED_PLAYER) { - if (((DamagedPlayerEvent) event).isCombatDamage()) { - Permanent creature = game.getPermanent(event.getSourceId()); - if (creature != null - && creature.isControlledBy(controllerId) - && !creature.hasSubtype(SubType.HUMAN, game) - && !damagedPlayerIds.contains(event.getTargetId())) { - damagedPlayerIds.add(event.getTargetId()); - return true; - } - } - } - if (event.getType() == GameEvent.EventType.COMBAT_DAMAGE_STEP_POST) { - damagedPlayerIds.clear(); - } - return false; - } - - @Override - public String getRule() { - return "Whenever one or more non-Human creatures you control deal combat damage to a player, draw a card."; - } -} +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/n/NaturesWill.java b/Mage.Sets/src/mage/cards/n/NaturesWill.java index c16573e9c86..78e922d58b6 100644 --- a/Mage.Sets/src/mage/cards/n/NaturesWill.java +++ b/Mage.Sets/src/mage/cards/n/NaturesWill.java @@ -10,7 +10,7 @@ import mage.abilities.effects.common.UntapAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.Zone; +import mage.constants.SetTargetPointer; import mage.filter.StaticFilters; /** @@ -25,7 +25,7 @@ public final class NaturesWill extends CardImpl { // Whenever one or more creatures you control deal combat damage to a player, tap all lands that player controls and untap all lands you control. Effect tapAllEffect = new TapAllTargetPlayerControlsEffect(StaticFilters.FILTER_LANDS); tapAllEffect.setText("tap all lands that player controls"); - Ability ability = new DealCombatDamageControlledTriggeredAbility(Zone.BATTLEFIELD, tapAllEffect, true); + Ability ability = new DealCombatDamageControlledTriggeredAbility(tapAllEffect, SetTargetPointer.PLAYER); ability.addEffect(new UntapAllEffect(StaticFilters.FILTER_CONTROLLED_PERMANENT_LANDS).concatBy("and")); addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/p/ProsperousThief.java b/Mage.Sets/src/mage/cards/p/ProsperousThief.java index 075be9d3f52..c1ffc842f26 100644 --- a/Mage.Sets/src/mage/cards/p/ProsperousThief.java +++ b/Mage.Sets/src/mage/cards/p/ProsperousThief.java @@ -1,22 +1,17 @@ package mage.cards.p; import mage.MageInt; -import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.DealCombatDamageControlledTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.keyword.NinjutsuAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; -import mage.constants.Zone; -import mage.game.Game; -import mage.game.events.DamagedPlayerEvent; -import mage.game.events.GameEvent; -import mage.game.permanent.Permanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; import mage.game.permanent.token.TreasureToken; -import java.util.ArrayList; -import java.util.List; import java.util.UUID; /** @@ -24,6 +19,12 @@ import java.util.UUID; */ public final class ProsperousThief extends CardImpl { + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Ninja or Rogue creatures"); + + static { + filter.add(Predicates.or(SubType.NINJA.getPredicate(), SubType.ROGUE.getPredicate())); + } + public ProsperousThief(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); @@ -36,7 +37,7 @@ public final class ProsperousThief extends CardImpl { this.addAbility(new NinjutsuAbility("{1}{U}")); // Whenever one or more Ninja or Rogue creatures you control deal combat damage to a player, create a Treasure token. - this.addAbility(new ProsperousThiefTriggeredAbility()); + this.addAbility(new DealCombatDamageControlledTriggeredAbility(new CreateTokenEffect(new TreasureToken()), filter)); } private ProsperousThief(final ProsperousThief card) { @@ -47,56 +48,4 @@ public final class ProsperousThief extends CardImpl { public ProsperousThief copy() { return new ProsperousThief(this); } -} - -class ProsperousThiefTriggeredAbility extends TriggeredAbilityImpl { - - private final List damagedPlayerIds = new ArrayList<>(); - - ProsperousThiefTriggeredAbility() { - super(Zone.BATTLEFIELD, new CreateTokenEffect(new TreasureToken()), false); - } - - private ProsperousThiefTriggeredAbility(final ProsperousThiefTriggeredAbility ability) { - super(ability); - } - - @Override - public ProsperousThiefTriggeredAbility copy() { - return new ProsperousThiefTriggeredAbility(this); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == GameEvent.EventType.DAMAGED_PLAYER - || event.getType() == GameEvent.EventType.COMBAT_DAMAGE_STEP_POST; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - if (event.getType() == GameEvent.EventType.COMBAT_DAMAGE_STEP_POST) { - damagedPlayerIds.clear(); - return false; - } - if (event.getType() != GameEvent.EventType.DAMAGED_PLAYER - || !((DamagedPlayerEvent) event).isCombatDamage() - || damagedPlayerIds.contains(event.getTargetId())) { - return false; - } - Permanent creature = game.getPermanent(event.getSourceId()); - if (creature == null - || !isControlledBy(creature.getControllerId()) - || (!creature.hasSubtype(SubType.NINJA, game) - && !creature.hasSubtype(SubType.ROGUE, game))) { - return false; - } - damagedPlayerIds.add(event.getTargetId()); - return true; - } - - @Override - public String getRule() { - return "Whenever one or more Ninja or Rogue creatures you control " + - "deal combat damage to a player, create a Treasure token."; - } -} +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/p/PyrewildShaman.java b/Mage.Sets/src/mage/cards/p/PyrewildShaman.java index 2b593c1b06b..443344c0747 100644 --- a/Mage.Sets/src/mage/cards/p/PyrewildShaman.java +++ b/Mage.Sets/src/mage/cards/p/PyrewildShaman.java @@ -13,8 +13,10 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.SetTargetPointer; import mage.constants.SubType; import mage.constants.Zone; +import mage.filter.StaticFilters; public final class PyrewildShaman extends CardImpl { @@ -32,7 +34,8 @@ public final class PyrewildShaman extends CardImpl { // Whenever one or more creatures you control deal combat damage to a player, if Pyrewild Shaman is in your graveyard, you may pay {3}. If you do, return Pyrewild Shaman to your hand. this.addAbility(new DealCombatDamageControlledTriggeredAbility(Zone.GRAVEYARD, new DoIfCostPaid(new ReturnToHandSourceEffect(), new ManaCostsImpl<>("{3}")) - .setText("if {this} is in your graveyard, you may pay {3}. If you do, return {this} to your hand"))); + .setText("if {this} is in your graveyard, you may pay {3}. If you do, return {this} to your hand"), + StaticFilters.FILTER_PERMANENT_CREATURES, SetTargetPointer.NONE, false)); } diff --git a/Mage.Sets/src/mage/cards/s/StrongholdArena.java b/Mage.Sets/src/mage/cards/s/StrongholdArena.java index 75cec25506b..db436225982 100644 --- a/Mage.Sets/src/mage/cards/s/StrongholdArena.java +++ b/Mage.Sets/src/mage/cards/s/StrongholdArena.java @@ -13,7 +13,9 @@ import mage.cards.CardSetInfo; import mage.cards.CardsImpl; import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.SetTargetPointer; import mage.constants.Zone; +import mage.filter.StaticFilters; import mage.game.Game; import mage.players.Player; @@ -36,9 +38,7 @@ public final class StrongholdArena extends CardImpl { // Whenever one or more creatures you control deal combat damage to a player, you may reveal the top card of your library and put it into your hand. // If you do, you lose life equal to its mana value. - this.addAbility(new DealCombatDamageControlledTriggeredAbility( - Zone.BATTLEFIELD, new StrongholdArenaDrawEffect(), false, false, true - )); + this.addAbility(new DealCombatDamageControlledTriggeredAbility(Zone.BATTLEFIELD, new StrongholdArenaDrawEffect(), StaticFilters.FILTER_PERMANENT_CREATURES, SetTargetPointer.NONE, true)); } private StrongholdArena(final StrongholdArena card) { diff --git a/Mage.Sets/src/mage/cards/t/ThopterSpyNetwork.java b/Mage.Sets/src/mage/cards/t/ThopterSpyNetwork.java index feb59d0f8e1..7f75c371c35 100644 --- a/Mage.Sets/src/mage/cards/t/ThopterSpyNetwork.java +++ b/Mage.Sets/src/mage/cards/t/ThopterSpyNetwork.java @@ -2,21 +2,20 @@ package mage.cards.t; import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.DealCombatDamageControlledTriggeredAbility; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Zone; +import mage.filter.common.FilterArtifactCreaturePermanent; import mage.filter.common.FilterArtifactPermanent; +import mage.filter.common.FilterCreaturePermanent; import mage.game.Game; -import mage.game.events.DamagedPlayerEvent; import mage.game.events.GameEvent; -import mage.game.permanent.Permanent; import mage.game.permanent.token.ThopterColorlessToken; -import java.util.ArrayList; -import java.util.List; import java.util.UUID; /** @@ -24,6 +23,8 @@ import java.util.UUID; */ public final class ThopterSpyNetwork extends CardImpl { + private static final FilterCreaturePermanent filter = new FilterArtifactCreaturePermanent("artifact creatures"); + public ThopterSpyNetwork(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}{U}"); @@ -31,7 +32,7 @@ public final class ThopterSpyNetwork extends CardImpl { this.addAbility(new ThopterSpyNetworkUpkeepTriggeredAbility()); // Whenever one or more artifact creatures you control deals combat damage to a player, draw a card. - this.addAbility(new ThopterSpyNetworkDamageTriggeredAbility()); + this.addAbility(new DealCombatDamageControlledTriggeredAbility(new DrawCardSourceControllerEffect(1), filter)); } private ThopterSpyNetwork(final ThopterSpyNetwork card) { @@ -78,51 +79,4 @@ class ThopterSpyNetworkUpkeepTriggeredAbility extends TriggeredAbilityImpl { public String getRule() { return "At the beginning of your upkeep, if you control an artifact, create a 1/1 colorless Thopter artifact creature token with flying."; } -} - -class ThopterSpyNetworkDamageTriggeredAbility extends TriggeredAbilityImpl { - - private final List damagedPlayerIds = new ArrayList<>(); - - ThopterSpyNetworkDamageTriggeredAbility() { - super(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), false); - } - - private ThopterSpyNetworkDamageTriggeredAbility(final ThopterSpyNetworkDamageTriggeredAbility ability) { - super(ability); - } - - @Override - public ThopterSpyNetworkDamageTriggeredAbility copy() { - return new ThopterSpyNetworkDamageTriggeredAbility(this); - } - - @Override - public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == GameEvent.EventType.DAMAGED_PLAYER - || event.getType() == GameEvent.EventType.COMBAT_DAMAGE_STEP_POST; - } - - @Override - public boolean checkTrigger(GameEvent event, Game game) { - if (event.getType() == GameEvent.EventType.DAMAGED_PLAYER) { - if (((DamagedPlayerEvent) event).isCombatDamage()) { - Permanent creature = game.getPermanent(event.getSourceId()); - if (creature != null && creature.isControlledBy(controllerId) - && creature.isArtifact(game) && !damagedPlayerIds.contains(event.getTargetId())) { - damagedPlayerIds.add(event.getTargetId()); - return true; - } - } - } - if (event.getType() == GameEvent.EventType.COMBAT_DAMAGE_STEP_POST) { - damagedPlayerIds.clear(); - } - return false; - } - - @Override - public String getRule() { - return "Whenever one or more artifact creatures you control deal combat damage to a player, draw a card."; - } -} +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/t/ThunderbladeCharge.java b/Mage.Sets/src/mage/cards/t/ThunderbladeCharge.java index 29e05a79427..54f23daae81 100644 --- a/Mage.Sets/src/mage/cards/t/ThunderbladeCharge.java +++ b/Mage.Sets/src/mage/cards/t/ThunderbladeCharge.java @@ -13,7 +13,9 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; +import mage.constants.SetTargetPointer; import mage.constants.Zone; +import mage.filter.StaticFilters; import mage.game.Game; import mage.players.Player; import mage.target.common.TargetAnyTarget; @@ -34,10 +36,12 @@ public final class ThunderbladeCharge extends CardImpl { // Whenever one or more creatures you control deal combat damage to a player, // if Thunderblade Charge is in your graveyard, you may pay {2}{R}{R}{R}. // If you do, you may cast it without paying its mana cost. - this.addAbility(new DealCombatDamageControlledTriggeredAbility(Zone.GRAVEYARD, - new DoIfCostPaid(new ThunderbladeChargeCastEffect(), new ManaCostsImpl<>("{2}{R}{R}{R}")) - .setText("if {this} is in your graveyard, you may pay {2}{R}{R}{R}. " - + "If you do, you may cast it without paying its mana cost"))); + this.addAbility(new DealCombatDamageControlledTriggeredAbility( + Zone.GRAVEYARD, + new DoIfCostPaid(new ThunderbladeChargeCastEffect(), new ManaCostsImpl<>("{2}{R}{R}{R}")) + .setText("if {this} is in your graveyard, you may pay {2}{R}{R}{R}. If you do, you may cast it without paying its mana cost"), + StaticFilters.FILTER_PERMANENT_CREATURES, SetTargetPointer.NONE, false) + ); } private ThunderbladeCharge(final ThunderbladeCharge card) { diff --git a/Mage/src/main/java/mage/abilities/common/DealCombatDamageControlledTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/DealCombatDamageControlledTriggeredAbility.java index ef7f262b49f..fc9fa040414 100644 --- a/Mage/src/main/java/mage/abilities/common/DealCombatDamageControlledTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/common/DealCombatDamageControlledTriggeredAbility.java @@ -2,55 +2,50 @@ package mage.abilities.common; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.effects.Effect; +import mage.constants.SetTargetPointer; import mage.constants.Zone; +import mage.filter.StaticFilters; +import mage.filter.common.FilterCreaturePermanent; import mage.game.Game; -import mage.game.events.DamagedPlayerEvent; +import mage.game.events.DamagedBatchEvent; +import mage.game.events.DamagedEvent; import mage.game.events.GameEvent; -import mage.game.events.GameEvent.EventType; import mage.game.permanent.Permanent; import mage.target.targetpointer.FixedTarget; - -import java.util.HashSet; -import java.util.Set; -import java.util.UUID; +import java.util.List; +import java.util.stream.Collectors; /** * @author LevelX2 */ public class DealCombatDamageControlledTriggeredAbility extends TriggeredAbilityImpl { - private final Set damagedPlayerIds = new HashSet<>(); - private final boolean setTargetPointer; - private final boolean onlyOpponents; + private final SetTargetPointer setTargetPointer; + private final FilterCreaturePermanent filter; public DealCombatDamageControlledTriggeredAbility(Effect effect) { - this(Zone.BATTLEFIELD, effect); + this(effect, SetTargetPointer.NONE); } - public DealCombatDamageControlledTriggeredAbility(Zone zone, Effect effect) { - this(zone, effect, false); + public DealCombatDamageControlledTriggeredAbility(Effect effect, FilterCreaturePermanent filter) { + this(Zone.BATTLEFIELD, effect, filter, SetTargetPointer.NONE, false); } - public DealCombatDamageControlledTriggeredAbility(Zone zone, Effect effect, boolean setTargetPointer) { - this(zone, effect, setTargetPointer, false); + public DealCombatDamageControlledTriggeredAbility(Effect effect, SetTargetPointer setTargetPointer) { + this(Zone.BATTLEFIELD, effect, StaticFilters.FILTER_PERMANENT_CREATURES, setTargetPointer, false); } - public DealCombatDamageControlledTriggeredAbility(Zone zone, Effect effect, boolean setTargetPointer, boolean onlyOpponents) { - this(zone, effect, setTargetPointer, onlyOpponents, false); - } - - public DealCombatDamageControlledTriggeredAbility(Zone zone, Effect effect, boolean setTargetPointer, boolean onlyOpponents, boolean optional) { + public DealCombatDamageControlledTriggeredAbility(Zone zone, Effect effect, FilterCreaturePermanent filter, SetTargetPointer setTargetPointer, boolean optional) { super(zone, effect, optional); this.setTargetPointer = setTargetPointer; - this.onlyOpponents = onlyOpponents; - setTriggerPhrase("Whenever one or more creatures you control deal combat damage to " - + (onlyOpponents ? "an opponent" : "a player") + ", "); + this.filter = filter; + setTriggerPhrase("Whenever one or more " + filter.getMessage() + " you control deal combat damage to a player, "); } protected DealCombatDamageControlledTriggeredAbility(final DealCombatDamageControlledTriggeredAbility ability) { super(ability); this.setTargetPointer = ability.setTargetPointer; - this.onlyOpponents = ability.onlyOpponents; + this.filter = ability.filter; } @Override @@ -60,34 +55,36 @@ public class DealCombatDamageControlledTriggeredAbility extends TriggeredAbility @Override public boolean checkEventType(GameEvent event, Game game) { - return event.getType() == GameEvent.EventType.DAMAGED_PLAYER - || event.getType() == GameEvent.EventType.COMBAT_DAMAGE_STEP_PRIORITY - || event.getType() == GameEvent.EventType.ZONE_CHANGE; + return event.getType() == GameEvent.EventType.DAMAGED_PLAYER_BATCH_ONE_PLAYER; } @Override public boolean checkTrigger(GameEvent event, Game game) { - if (event.getType() == GameEvent.EventType.COMBAT_DAMAGE_STEP_PRIORITY || - (event.getType() == GameEvent.EventType.ZONE_CHANGE && event.getTargetId().equals(getSourceId()))) { - damagedPlayerIds.clear(); + List events = ((DamagedBatchEvent) event).getEvents().stream() + .filter(DamagedEvent::isCombatDamage) + .filter(e -> { + Permanent permanent = game.getPermanentOrLKIBattlefield(e.getSourceId()); + return permanent != null + && filter.match(permanent, game) + && permanent.isControlledBy(this.getControllerId()); + }) + .collect(Collectors.toList()); + + if (events.isEmpty()) { return false; } - if (event.getType() != EventType.DAMAGED_PLAYER) { - return false; - } - DamagedPlayerEvent damageEvent = (DamagedPlayerEvent) event; - Permanent p = game.getPermanent(event.getSourceId()); - if (!damageEvent.isCombatDamage() - || p == null - || !p.isControlledBy(this.getControllerId()) - || damagedPlayerIds.contains(event.getPlayerId()) - || (onlyOpponents && !game.getOpponents(getControllerId()).contains(event.getPlayerId()))) { - return false; - } - damagedPlayerIds.add(event.getPlayerId()); - if (setTargetPointer) { - this.getEffects().setTargetPointer(new FixedTarget(event.getPlayerId())); + + this.getEffects().setValue("damage", events.stream().mapToInt(DamagedEvent::getAmount).sum()); + switch (setTargetPointer) { + case PLAYER: + this.getEffects().setTargetPointer(new FixedTarget(event.getPlayerId())); + break; + case NONE: + break; + default: + throw new IllegalArgumentException("Invalid SetTargetPointer option"); } + return true; } -} +} \ No newline at end of file diff --git a/Mage/src/main/java/mage/game/command/emblems/LolthSpiderQueenEmblem.java b/Mage/src/main/java/mage/game/command/emblems/LolthSpiderQueenEmblem.java index 91f0704df40..50c625e009d 100644 --- a/Mage/src/main/java/mage/game/command/emblems/LolthSpiderQueenEmblem.java +++ b/Mage/src/main/java/mage/game/command/emblems/LolthSpiderQueenEmblem.java @@ -7,7 +7,9 @@ import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; import mage.constants.Outcome; +import mage.constants.SetTargetPointer; import mage.constants.Zone; +import mage.filter.StaticFilters; import mage.game.Game; import mage.game.command.Emblem; import mage.players.Player; @@ -25,7 +27,7 @@ public final class LolthSpiderQueenEmblem extends Emblem { super("Emblem Lolth"); this.getAbilities().add(new ConditionalInterveningIfTriggeredAbility( new DealCombatDamageControlledTriggeredAbility( - Zone.COMMAND, new LolthSpiderQueenEmblemEffect(), true, true + Zone.COMMAND, new LolthSpiderQueenEmblemEffect(), StaticFilters.FILTER_PERMANENT_CREATURES, SetTargetPointer.PLAYER, false ), LolthSpiderQueenEmblemCondition.instance, "Whenever an opponent " + "is dealt combat damage by one or more creatures you control, " + "if that player lost less than 8 life this turn, they lose life equal to the difference." From 96a2c277b20809ab4d53c66bf38dc6f53f3bf3ed Mon Sep 17 00:00:00 2001 From: Susucre <34709007+Susucre@users.noreply.github.com> Date: Thu, 31 Aug 2023 01:48:03 +0200 Subject: [PATCH 18/36] clean some of the most frequent copy constructor / copy method (#11053) --- Mage.Sets/src/mage/cards/b/BogbrewWitch.java | 5 ++-- Mage.Sets/src/mage/cards/g/GuidedPassage.java | 13 ++++----- Mage.Sets/src/mage/cards/l/LostHours.java | 6 ++-- Mage.Sets/src/mage/cards/r/Repercussion.java | 5 ++-- .../src/mage/cards/v/VileManifestation.java | 7 +++-- .../src/mage/cards/w/WightOfPrecinctSix.java | 29 ++++++++++--------- .../java/mage/abilities/LoyaltyAbility.java | 2 +- .../java/mage/abilities/PlayLandAbility.java | 2 +- .../java/mage/abilities/StaticAbility.java | 2 +- .../abilities/abilityword/StriveAbility.java | 2 +- .../ActivateIfConditionActivatedAbility.java | 2 +- .../AttacksEachCombatStaticAbility.java | 2 +- ...ThisOrAnotherCreatureTriggeredAbility.java | 2 +- ...PutIntoGraveFromAnywhereSourceAbility.java | 2 +- .../common/SimpleEvasionAbility.java | 2 +- .../abilities/common/SimpleStaticAbility.java | 2 +- .../abilities/costs/AlternativeCostImpl.java | 2 +- .../java/mage/abilities/costs/CostsImpl.java | 4 +-- .../abilities/costs/mana/ManaCostImpl.java | 3 ++ .../abilities/costs/mana/ManaCostsImpl.java | 2 +- .../decorator/ConditionalOneShotEffect.java | 2 +- .../dynamicvalue/AdditiveDynamicValue.java | 9 +++--- .../common/HighestManaValueCount.java | 2 +- .../mage/abilities/effects/SearchEffect.java | 2 +- .../common/SkipNextPlayerUntapStepEffect.java | 2 +- .../keyword/AffinityForArtifactsAbility.java | 2 +- .../keyword/AffinityForLandTypeAbility.java | 2 +- .../abilities/keyword/BloodthirstAbility.java | 10 +++---- .../keyword/CumulativeUpkeepAbility.java | 2 +- .../abilities/keyword/EscalateAbility.java | 2 +- .../mage/abilities/keyword/ExertAbility.java | 8 ++--- .../mage/abilities/keyword/FadingAbility.java | 2 +- .../abilities/keyword/ReinforceAbility.java | 2 +- .../abilities/keyword/SoulshiftAbility.java | 2 +- .../mage/abilities/keyword/SpliceAbility.java | 5 ++-- .../abilities/keyword/SplitSecondAbility.java | 6 ++-- .../abilities/keyword/SunburstAbility.java | 2 +- .../abilities/keyword/TransformAbility.java | 2 +- .../abilities/keyword/TransmuteAbility.java | 4 +-- .../abilities/keyword/TributeAbility.java | 6 ++-- .../abilities/keyword/UndauntedAbility.java | 2 +- .../abilities/keyword/UndyingAbility.java | 2 +- .../keyword/VanishingUpkeepAbility.java | 2 +- .../mage/abilities/mana/BasicManaAbility.java | 2 +- .../mage/abilities/mana/BlackManaAbility.java | 2 +- .../mage/abilities/mana/BlueManaAbility.java | 2 +- .../abilities/mana/ColorlessManaAbility.java | 2 +- .../mage/abilities/mana/GreenManaAbility.java | 2 +- .../mage/abilities/mana/RedManaAbility.java | 2 +- .../mage/abilities/mana/WhiteManaAbility.java | 2 +- .../main/java/mage/cards/AdventureCard.java | 2 +- .../mage/cards/AdventureCardSpellImpl.java | 2 +- .../src/main/java/mage/cards/LevelerCard.java | 2 +- .../java/mage/cards/SplitCardHalfImpl.java | 2 +- .../java/mage/cards/basiclands/BasicLand.java | 10 +++---- .../java/mage/cards/basiclands/Forest.java | 10 +++---- .../java/mage/cards/basiclands/Island.java | 9 +++--- .../java/mage/cards/basiclands/Mountain.java | 9 +++--- .../java/mage/cards/basiclands/Plains.java | 9 +++--- .../java/mage/cards/basiclands/Swamp.java | 9 +++--- .../main/java/mage/filter/FilterAbility.java | 2 +- .../src/main/java/mage/filter/FilterCard.java | 2 +- .../src/main/java/mage/filter/FilterImpl.java | 2 +- .../main/java/mage/filter/FilterObject.java | 2 +- .../mage/game/permanent/token/WolfToken.java | 2 +- .../targetpointer/NthTargetPointer.java | 2 +- 66 files changed, 132 insertions(+), 134 deletions(-) diff --git a/Mage.Sets/src/mage/cards/b/BogbrewWitch.java b/Mage.Sets/src/mage/cards/b/BogbrewWitch.java index 8e23848bfc6..86851a11d9e 100644 --- a/Mage.Sets/src/mage/cards/b/BogbrewWitch.java +++ b/Mage.Sets/src/mage/cards/b/BogbrewWitch.java @@ -1,7 +1,6 @@ package mage.cards.b; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; @@ -18,6 +17,8 @@ import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.NamePredicate; import mage.target.common.TargetCardInLibrary; +import java.util.UUID; + /** * * @author LevelX2 @@ -37,7 +38,7 @@ public final class BogbrewWitch extends CardImpl { this.toughness = new MageInt(3); // {2}, {T}: Search your library for a card named Festering Newt or Bubbling Cauldron, put it onto the battlefield tapped, then shuffle your library. - TargetCardInLibrary target = new TargetCardInLibrary(1, 1, new FilterCard(filter)); + TargetCardInLibrary target = new TargetCardInLibrary(1, 1, filter); Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SearchLibraryPutInPlayEffect(target, true), new ManaCostsImpl<>("{2}")); diff --git a/Mage.Sets/src/mage/cards/g/GuidedPassage.java b/Mage.Sets/src/mage/cards/g/GuidedPassage.java index 710b931be59..b94dc3f2750 100644 --- a/Mage.Sets/src/mage/cards/g/GuidedPassage.java +++ b/Mage.Sets/src/mage/cards/g/GuidedPassage.java @@ -1,15 +1,9 @@ package mage.cards.g; -import java.util.Set; -import java.util.UUID; import mage.MageObject; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; -import mage.cards.Card; -import mage.cards.CardImpl; -import mage.cards.CardSetInfo; -import mage.cards.Cards; -import mage.cards.CardsImpl; +import mage.cards.*; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; @@ -22,6 +16,9 @@ import mage.target.Target; import mage.target.TargetCard; import mage.target.common.TargetOpponent; +import java.util.Set; +import java.util.UUID; + /** * * @author TheElk801 @@ -95,7 +92,7 @@ class GuidedPassageEffect extends OneShotEffect { } TargetCard target1 = new TargetCard(1, Zone.LIBRARY, StaticFilters.FILTER_CARD_CREATURE); TargetCard target2 = new TargetCard(1, Zone.LIBRARY, StaticFilters.FILTER_CARD_LAND); - TargetCard target3 = new TargetCard(1, Zone.LIBRARY, new FilterCard(filter)); + TargetCard target3 = new TargetCard(1, Zone.LIBRARY, filter); opponent.chooseTarget(Outcome.Detriment, cards, target1, source, game); opponent.chooseTarget(Outcome.Detriment, cards, target2, source, game); opponent.chooseTarget(Outcome.Detriment, cards, target3, source, game); diff --git a/Mage.Sets/src/mage/cards/l/LostHours.java b/Mage.Sets/src/mage/cards/l/LostHours.java index 172b1c5f543..886a2748477 100644 --- a/Mage.Sets/src/mage/cards/l/LostHours.java +++ b/Mage.Sets/src/mage/cards/l/LostHours.java @@ -1,7 +1,6 @@ package mage.cards.l; -import java.util.UUID; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.cards.Card; @@ -10,13 +9,14 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Outcome; import mage.constants.Zone; -import mage.filter.FilterCard; import mage.filter.StaticFilters; import mage.game.Game; import mage.players.Player; import mage.target.TargetCard; import mage.target.TargetPlayer; +import java.util.UUID; + /** * * @author L_J @@ -64,7 +64,7 @@ class LostHoursEffect extends OneShotEffect { if (targetPlayer != null && controller != null) { targetPlayer.revealCards(source, targetPlayer.getHand(), game); if (targetPlayer.getHand().size() > 0) { - TargetCard target = new TargetCard(Zone.HAND, new FilterCard(StaticFilters.FILTER_CARD_A_NON_LAND)); + TargetCard target = new TargetCard(Zone.HAND, StaticFilters.FILTER_CARD_A_NON_LAND); if (controller.choose(Outcome.Discard, targetPlayer.getHand(), target, source, game)) { Card card = game.getCard(target.getFirstTarget()); if (card != null) { diff --git a/Mage.Sets/src/mage/cards/r/Repercussion.java b/Mage.Sets/src/mage/cards/r/Repercussion.java index 38372a6d030..16d073cc375 100644 --- a/Mage.Sets/src/mage/cards/r/Repercussion.java +++ b/Mage.Sets/src/mage/cards/r/Repercussion.java @@ -2,7 +2,6 @@ package mage.cards.r; import mage.MageObjectReference; import mage.abilities.Ability; -import mage.abilities.TriggeredAbility; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; @@ -49,7 +48,7 @@ class RepercussionTriggeredAbility extends TriggeredAbilityImpl { super(Zone.BATTLEFIELD, effect); } - public RepercussionTriggeredAbility(final RepercussionTriggeredAbility ability) { + private RepercussionTriggeredAbility(final RepercussionTriggeredAbility ability) { super(ability); } @@ -75,7 +74,7 @@ class RepercussionTriggeredAbility extends TriggeredAbilityImpl { } @Override - public TriggeredAbility copy() { + public RepercussionTriggeredAbility copy() { return new RepercussionTriggeredAbility(this); } } diff --git a/Mage.Sets/src/mage/cards/v/VileManifestation.java b/Mage.Sets/src/mage/cards/v/VileManifestation.java index 3d70f29c7bc..754ba504731 100644 --- a/Mage.Sets/src/mage/cards/v/VileManifestation.java +++ b/Mage.Sets/src/mage/cards/v/VileManifestation.java @@ -1,6 +1,5 @@ package mage.cards.v; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; @@ -15,12 +14,14 @@ import mage.abilities.keyword.CyclingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.SubType; import mage.constants.Duration; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.predicate.mageobject.AbilityPredicate; +import java.util.UUID; + /** * * @author spjspj @@ -43,7 +44,7 @@ public final class VileManifestation extends CardImpl { this.toughness = new MageInt(4); // Vile Manifestation gets +1/+0 for each card with cycling in your graveyard. - DynamicValue amount = new CardsInControllerGraveyardCount(new FilterCard(filter)); + DynamicValue amount = new CardsInControllerGraveyardCount(filter); Effect effect = new BoostSourceEffect(amount, StaticValue.get(0), Duration.WhileOnBattlefield); effect.setText("Vile Manifestation gets +1/+0 for each card with cycling in your graveyard."); Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, effect); diff --git a/Mage.Sets/src/mage/cards/w/WightOfPrecinctSix.java b/Mage.Sets/src/mage/cards/w/WightOfPrecinctSix.java index 09f92fd5e21..1db1781e8f3 100644 --- a/Mage.Sets/src/mage/cards/w/WightOfPrecinctSix.java +++ b/Mage.Sets/src/mage/cards/w/WightOfPrecinctSix.java @@ -1,7 +1,6 @@ package mage.cards.w; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; @@ -11,14 +10,16 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.SubType; import mage.constants.Duration; +import mage.constants.SubType; import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.common.FilterCreatureCard; import mage.game.Game; import mage.players.Player; +import java.util.UUID; + /** * * @author LevelX2 @@ -54,32 +55,32 @@ class CardsInOpponentGraveyardsCount implements DynamicValue { private FilterCard filter; public CardsInOpponentGraveyardsCount() { - this(new FilterCard()); + this(new FilterCard()); } public CardsInOpponentGraveyardsCount(FilterCard filter) { - this.filter = filter; + this.filter = filter; } - private CardsInOpponentGraveyardsCount(CardsInOpponentGraveyardsCount dynamicValue) { - this.filter = dynamicValue.filter; + private CardsInOpponentGraveyardsCount(final CardsInOpponentGraveyardsCount dynamicValue) { + this.filter = dynamicValue.filter; } @Override public int calculate(Game game, Ability sourceAbility, Effect effect) { - int amount = 0; - for (UUID playerUUID : game.getOpponents(sourceAbility.getControllerId())) { - Player player = game.getPlayer(playerUUID); - if (player != null) { - amount += player.getGraveyard().count(filter, sourceAbility.getControllerId(), sourceAbility, game); - } + int amount = 0; + for (UUID playerUUID : game.getOpponents(sourceAbility.getControllerId())) { + Player player = game.getPlayer(playerUUID); + if (player != null) { + amount += player.getGraveyard().count(filter, sourceAbility.getControllerId(), sourceAbility, game); + } } return amount; } @Override - public DynamicValue copy() { - return new CardsInOpponentGraveyardsCount(this); + public CardsInOpponentGraveyardsCount copy() { + return new CardsInOpponentGraveyardsCount(this); } @Override diff --git a/Mage/src/main/java/mage/abilities/LoyaltyAbility.java b/Mage/src/main/java/mage/abilities/LoyaltyAbility.java index c0930d7ae83..7210c3d8a8b 100644 --- a/Mage/src/main/java/mage/abilities/LoyaltyAbility.java +++ b/Mage/src/main/java/mage/abilities/LoyaltyAbility.java @@ -33,7 +33,7 @@ public class LoyaltyAbility extends ActivatedAbilityImpl { this.timing = TimingRule.SORCERY; } - public LoyaltyAbility(LoyaltyAbility ability) { + protected LoyaltyAbility(final LoyaltyAbility ability) { super(ability); } diff --git a/Mage/src/main/java/mage/abilities/PlayLandAbility.java b/Mage/src/main/java/mage/abilities/PlayLandAbility.java index 750ba6dc543..8ad0044caca 100644 --- a/Mage/src/main/java/mage/abilities/PlayLandAbility.java +++ b/Mage/src/main/java/mage/abilities/PlayLandAbility.java @@ -19,7 +19,7 @@ public class PlayLandAbility extends ActivatedAbilityImpl { this.name = "Play " + cardName; } - public PlayLandAbility(PlayLandAbility ability) { + protected PlayLandAbility(final PlayLandAbility ability) { super(ability); } diff --git a/Mage/src/main/java/mage/abilities/StaticAbility.java b/Mage/src/main/java/mage/abilities/StaticAbility.java index c8788ad4c09..71ff35ca21f 100644 --- a/Mage/src/main/java/mage/abilities/StaticAbility.java +++ b/Mage/src/main/java/mage/abilities/StaticAbility.java @@ -36,7 +36,7 @@ public abstract class StaticAbility extends AbilityImpl { return super.isInUseableZone(game, source, event); } - public StaticAbility(StaticAbility ability) { + protected StaticAbility(final StaticAbility ability) { super(ability); } } diff --git a/Mage/src/main/java/mage/abilities/abilityword/StriveAbility.java b/Mage/src/main/java/mage/abilities/abilityword/StriveAbility.java index 71b498d26a9..f6a8f836839 100644 --- a/Mage/src/main/java/mage/abilities/abilityword/StriveAbility.java +++ b/Mage/src/main/java/mage/abilities/abilityword/StriveAbility.java @@ -31,7 +31,7 @@ public class StriveAbility extends SimpleStaticAbility { } @Override - public SimpleStaticAbility copy() { + public StriveAbility copy() { return new StriveAbility(this); } diff --git a/Mage/src/main/java/mage/abilities/common/ActivateIfConditionActivatedAbility.java b/Mage/src/main/java/mage/abilities/common/ActivateIfConditionActivatedAbility.java index 37697a4675a..35243e7218f 100644 --- a/Mage/src/main/java/mage/abilities/common/ActivateIfConditionActivatedAbility.java +++ b/Mage/src/main/java/mage/abilities/common/ActivateIfConditionActivatedAbility.java @@ -19,7 +19,7 @@ public class ActivateIfConditionActivatedAbility extends ActivatedAbilityImpl { this.condition = condition; } - public ActivateIfConditionActivatedAbility(ActivateIfConditionActivatedAbility ability) { + protected ActivateIfConditionActivatedAbility(final ActivateIfConditionActivatedAbility ability) { super(ability); } diff --git a/Mage/src/main/java/mage/abilities/common/AttacksEachCombatStaticAbility.java b/Mage/src/main/java/mage/abilities/common/AttacksEachCombatStaticAbility.java index eba1a419f86..e8e8f23ddbf 100644 --- a/Mage/src/main/java/mage/abilities/common/AttacksEachCombatStaticAbility.java +++ b/Mage/src/main/java/mage/abilities/common/AttacksEachCombatStaticAbility.java @@ -15,7 +15,7 @@ public class AttacksEachCombatStaticAbility extends StaticAbility { super(Zone.BATTLEFIELD, new AttacksIfAbleSourceEffect(Duration.WhileOnBattlefield, true)); } - public AttacksEachCombatStaticAbility(AttacksEachCombatStaticAbility ability) { + protected AttacksEachCombatStaticAbility(AttacksEachCombatStaticAbility ability) { super(ability); } diff --git a/Mage/src/main/java/mage/abilities/common/DiesThisOrAnotherCreatureTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/DiesThisOrAnotherCreatureTriggeredAbility.java index 958934236b1..eb33922e871 100644 --- a/Mage/src/main/java/mage/abilities/common/DiesThisOrAnotherCreatureTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/common/DiesThisOrAnotherCreatureTriggeredAbility.java @@ -28,7 +28,7 @@ public class DiesThisOrAnotherCreatureTriggeredAbility extends TriggeredAbilityI setTriggerPhrase("Whenever {this} or another " + filter.getMessage() + " dies, "); } - public DiesThisOrAnotherCreatureTriggeredAbility(DiesThisOrAnotherCreatureTriggeredAbility ability) { + protected DiesThisOrAnotherCreatureTriggeredAbility(final DiesThisOrAnotherCreatureTriggeredAbility ability) { super(ability); this.filter = ability.filter; this.applyFilterOnSource = ability.applyFilterOnSource; diff --git a/Mage/src/main/java/mage/abilities/common/PutIntoGraveFromAnywhereSourceAbility.java b/Mage/src/main/java/mage/abilities/common/PutIntoGraveFromAnywhereSourceAbility.java index f7ee00c554f..f80321ccfbc 100644 --- a/Mage/src/main/java/mage/abilities/common/PutIntoGraveFromAnywhereSourceAbility.java +++ b/Mage/src/main/java/mage/abilities/common/PutIntoGraveFromAnywhereSourceAbility.java @@ -36,7 +36,7 @@ public class PutIntoGraveFromAnywhereSourceAbility extends SimpleStaticAbility { } @Override - public SimpleStaticAbility copy() { + public PutIntoGraveFromAnywhereSourceAbility copy() { return new PutIntoGraveFromAnywhereSourceAbility(this); } diff --git a/Mage/src/main/java/mage/abilities/common/SimpleEvasionAbility.java b/Mage/src/main/java/mage/abilities/common/SimpleEvasionAbility.java index 22961492d7f..2eb1033f1ba 100644 --- a/Mage/src/main/java/mage/abilities/common/SimpleEvasionAbility.java +++ b/Mage/src/main/java/mage/abilities/common/SimpleEvasionAbility.java @@ -20,7 +20,7 @@ public class SimpleEvasionAbility extends EvasionAbility { } } - public SimpleEvasionAbility(SimpleEvasionAbility ability) { + protected SimpleEvasionAbility(final SimpleEvasionAbility ability) { super(ability); } diff --git a/Mage/src/main/java/mage/abilities/common/SimpleStaticAbility.java b/Mage/src/main/java/mage/abilities/common/SimpleStaticAbility.java index b71bf85dae7..785e48f45d1 100644 --- a/Mage/src/main/java/mage/abilities/common/SimpleStaticAbility.java +++ b/Mage/src/main/java/mage/abilities/common/SimpleStaticAbility.java @@ -19,7 +19,7 @@ public class SimpleStaticAbility extends StaticAbility { super(zone, effect); } - public SimpleStaticAbility(SimpleStaticAbility ability) { + protected SimpleStaticAbility(final SimpleStaticAbility ability) { super(ability); } diff --git a/Mage/src/main/java/mage/abilities/costs/AlternativeCostImpl.java b/Mage/src/main/java/mage/abilities/costs/AlternativeCostImpl.java index 81068b37e9f..1bccc0d6348 100644 --- a/Mage/src/main/java/mage/abilities/costs/AlternativeCostImpl.java +++ b/Mage/src/main/java/mage/abilities/costs/AlternativeCostImpl.java @@ -26,7 +26,7 @@ public class AlternativeCostImpl> extends Costs this.add(cost); } - public AlternativeCostImpl(final AlternativeCostImpl cost) { + protected AlternativeCostImpl(final AlternativeCostImpl cost) { super(cost); this.name = cost.name; this.reminderText = cost.reminderText; diff --git a/Mage/src/main/java/mage/abilities/costs/CostsImpl.java b/Mage/src/main/java/mage/abilities/costs/CostsImpl.java index de1a5a0a526..01ab8e6545d 100644 --- a/Mage/src/main/java/mage/abilities/costs/CostsImpl.java +++ b/Mage/src/main/java/mage/abilities/costs/CostsImpl.java @@ -21,7 +21,7 @@ public class CostsImpl extends ArrayList implements Costs public CostsImpl() { } - public CostsImpl(final CostsImpl costs) { + protected CostsImpl(final CostsImpl costs) { this.ensureCapacity(costs.size()); for (Cost cost : costs) { this.add((T) cost.copy()); @@ -167,7 +167,7 @@ public class CostsImpl extends ArrayList implements Costs } @Override - public Costs copy() { + public CostsImpl copy() { return new CostsImpl(this); } } diff --git a/Mage/src/main/java/mage/abilities/costs/mana/ManaCostImpl.java b/Mage/src/main/java/mage/abilities/costs/mana/ManaCostImpl.java index 359a3d1c2b9..cde1c26715c 100644 --- a/Mage/src/main/java/mage/abilities/costs/mana/ManaCostImpl.java +++ b/Mage/src/main/java/mage/abilities/costs/mana/ManaCostImpl.java @@ -45,6 +45,9 @@ public abstract class ManaCostImpl extends CostImpl implements ManaCost { this.phyrexian = manaCost.phyrexian; } + @Override + abstract public ManaCostImpl copy(); + @Override public Mana getPayment() { return payment; diff --git a/Mage/src/main/java/mage/abilities/costs/mana/ManaCostsImpl.java b/Mage/src/main/java/mage/abilities/costs/mana/ManaCostsImpl.java index d5a13f3e1e4..7c56ecd9381 100644 --- a/Mage/src/main/java/mage/abilities/costs/mana/ManaCostsImpl.java +++ b/Mage/src/main/java/mage/abilities/costs/mana/ManaCostsImpl.java @@ -608,7 +608,7 @@ public class ManaCostsImpl extends ArrayList implements M } @Override - public ManaCosts copy() { + public ManaCostsImpl copy() { return new ManaCostsImpl<>(this); } diff --git a/Mage/src/main/java/mage/abilities/decorator/ConditionalOneShotEffect.java b/Mage/src/main/java/mage/abilities/decorator/ConditionalOneShotEffect.java index f3cd39c4e6c..eab591fb5eb 100644 --- a/Mage/src/main/java/mage/abilities/decorator/ConditionalOneShotEffect.java +++ b/Mage/src/main/java/mage/abilities/decorator/ConditionalOneShotEffect.java @@ -39,7 +39,7 @@ public class ConditionalOneShotEffect extends OneShotEffect { this.staticText = text; } - public ConditionalOneShotEffect(ConditionalOneShotEffect effect) { + protected ConditionalOneShotEffect(final ConditionalOneShotEffect effect) { super(effect); this.effects.addAll(effect.effects.copy()); this.otherwiseEffects.addAll(effect.otherwiseEffects.copy()); diff --git a/Mage/src/main/java/mage/abilities/dynamicvalue/AdditiveDynamicValue.java b/Mage/src/main/java/mage/abilities/dynamicvalue/AdditiveDynamicValue.java index bd488c7cf5a..5c30bdeae8e 100644 --- a/Mage/src/main/java/mage/abilities/dynamicvalue/AdditiveDynamicValue.java +++ b/Mage/src/main/java/mage/abilities/dynamicvalue/AdditiveDynamicValue.java @@ -1,11 +1,12 @@ package mage.abilities.dynamicvalue; +import mage.abilities.Ability; +import mage.abilities.effects.Effect; +import mage.game.Game; + import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; -import mage.abilities.Ability; -import mage.abilities.effects.Effect; -import mage.game.Game; public class AdditiveDynamicValue implements DynamicValue { @@ -37,7 +38,7 @@ public class AdditiveDynamicValue implements DynamicValue { } @Override - public DynamicValue copy() { + public AdditiveDynamicValue copy() { return new AdditiveDynamicValue(this.dynamicValues); } diff --git a/Mage/src/main/java/mage/abilities/dynamicvalue/common/HighestManaValueCount.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/HighestManaValueCount.java index 9087be132ae..af92813ce48 100644 --- a/Mage/src/main/java/mage/abilities/dynamicvalue/common/HighestManaValueCount.java +++ b/Mage/src/main/java/mage/abilities/dynamicvalue/common/HighestManaValueCount.java @@ -44,7 +44,7 @@ public class HighestManaValueCount implements DynamicValue { } @Override - public DynamicValue copy() { + public HighestManaValueCount copy() { return new HighestManaValueCount(this); } diff --git a/Mage/src/main/java/mage/abilities/effects/SearchEffect.java b/Mage/src/main/java/mage/abilities/effects/SearchEffect.java index 1b234d8fe6e..b00ce8bba6e 100644 --- a/Mage/src/main/java/mage/abilities/effects/SearchEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/SearchEffect.java @@ -19,7 +19,7 @@ public abstract class SearchEffect extends OneShotEffect { this.target = target; } - public SearchEffect(SearchEffect effect) { + protected SearchEffect(final SearchEffect effect) { super(effect); this.target = effect.target.copy(); } diff --git a/Mage/src/main/java/mage/abilities/effects/common/SkipNextPlayerUntapStepEffect.java b/Mage/src/main/java/mage/abilities/effects/common/SkipNextPlayerUntapStepEffect.java index fface948f97..b5c279e4a7c 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/SkipNextPlayerUntapStepEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/SkipNextPlayerUntapStepEffect.java @@ -25,7 +25,7 @@ public class SkipNextPlayerUntapStepEffect extends OneShotEffect { : text + " skips their next untap step"; } - public SkipNextPlayerUntapStepEffect(SkipNextPlayerUntapStepEffect effect) { + protected SkipNextPlayerUntapStepEffect(final SkipNextPlayerUntapStepEffect effect) { super(effect); } diff --git a/Mage/src/main/java/mage/abilities/keyword/AffinityForArtifactsAbility.java b/Mage/src/main/java/mage/abilities/keyword/AffinityForArtifactsAbility.java index 21b46820d84..d5e5d5b203a 100644 --- a/Mage/src/main/java/mage/abilities/keyword/AffinityForArtifactsAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/AffinityForArtifactsAbility.java @@ -23,7 +23,7 @@ public class AffinityForArtifactsAbility extends SimpleStaticAbility { } @Override - public SimpleStaticAbility copy() { + public AffinityForArtifactsAbility copy() { return new AffinityForArtifactsAbility(this); } diff --git a/Mage/src/main/java/mage/abilities/keyword/AffinityForLandTypeAbility.java b/Mage/src/main/java/mage/abilities/keyword/AffinityForLandTypeAbility.java index 4842e688fd9..cc63bd9249d 100644 --- a/Mage/src/main/java/mage/abilities/keyword/AffinityForLandTypeAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/AffinityForLandTypeAbility.java @@ -31,7 +31,7 @@ public class AffinityForLandTypeAbility extends SimpleStaticAbility { } @Override - public SimpleStaticAbility copy() { + public AffinityForLandTypeAbility copy() { return new AffinityForLandTypeAbility(this); } diff --git a/Mage/src/main/java/mage/abilities/keyword/BloodthirstAbility.java b/Mage/src/main/java/mage/abilities/keyword/BloodthirstAbility.java index 964a7114913..8b3a527e958 100644 --- a/Mage/src/main/java/mage/abilities/keyword/BloodthirstAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/BloodthirstAbility.java @@ -1,9 +1,5 @@ package mage.abilities.keyword; -import java.util.ArrayList; -import java.util.List; -import java.util.UUID; - import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.effects.OneShotEffect; @@ -15,6 +11,10 @@ import mage.players.Player; import mage.util.CardUtil; import mage.watchers.common.BloodthirstWatcher; +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; + /** * @author Loki */ @@ -33,7 +33,7 @@ public class BloodthirstAbility extends EntersBattlefieldAbility { } @Override - public EntersBattlefieldAbility copy() { + public BloodthirstAbility copy() { return new BloodthirstAbility(this); } diff --git a/Mage/src/main/java/mage/abilities/keyword/CumulativeUpkeepAbility.java b/Mage/src/main/java/mage/abilities/keyword/CumulativeUpkeepAbility.java index ab31a74849c..6cbb2b88141 100644 --- a/Mage/src/main/java/mage/abilities/keyword/CumulativeUpkeepAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/CumulativeUpkeepAbility.java @@ -39,7 +39,7 @@ public class CumulativeUpkeepAbility extends BeginningOfUpkeepTriggeredAbility { } @Override - public BeginningOfUpkeepTriggeredAbility copy() { + public CumulativeUpkeepAbility copy() { return new CumulativeUpkeepAbility(this); } diff --git a/Mage/src/main/java/mage/abilities/keyword/EscalateAbility.java b/Mage/src/main/java/mage/abilities/keyword/EscalateAbility.java index 0ce0a51df63..38db09dc2a0 100644 --- a/Mage/src/main/java/mage/abilities/keyword/EscalateAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/EscalateAbility.java @@ -42,7 +42,7 @@ class EscalateEffect extends CostModificationEffectImpl { this.staticText = "Escalate " + cost.getText() + " (Pay this cost for each mode chosen beyond the first.)"; } - EscalateEffect(final EscalateEffect effect) { + private EscalateEffect(final EscalateEffect effect) { super(effect); this.cost = effect.cost.copy(); } diff --git a/Mage/src/main/java/mage/abilities/keyword/ExertAbility.java b/Mage/src/main/java/mage/abilities/keyword/ExertAbility.java index a38b498b8da..db0a80aba3b 100644 --- a/Mage/src/main/java/mage/abilities/keyword/ExertAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/ExertAbility.java @@ -1,9 +1,6 @@ package mage.abilities.keyword; -import java.util.HashSet; -import java.util.Set; - import mage.MageObjectReference; import mage.abilities.Ability; import mage.abilities.Mode; @@ -23,6 +20,9 @@ import mage.players.Player; import mage.target.targetpointer.FixedTarget; import mage.watchers.Watcher; +import java.util.HashSet; +import java.util.Set; + /** * @author LevelX2 */ @@ -81,7 +81,7 @@ class ExertReplacementEffect extends ReplacementEffectImpl { this.exertOnlyOncePerTurn = exertOnlyOncePerTurn; } - public ExertReplacementEffect(ExertReplacementEffect effect) { + private ExertReplacementEffect(ExertReplacementEffect effect) { super(effect); this.exertOnlyOncePerTurn = effect.exertOnlyOncePerTurn; } diff --git a/Mage/src/main/java/mage/abilities/keyword/FadingAbility.java b/Mage/src/main/java/mage/abilities/keyword/FadingAbility.java index 728e431234e..139178b4b48 100644 --- a/Mage/src/main/java/mage/abilities/keyword/FadingAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/FadingAbility.java @@ -55,7 +55,7 @@ public class FadingAbility extends EntersBattlefieldAbility { } @Override - public EntersBattlefieldAbility copy() { + public FadingAbility copy() { return new FadingAbility(this); } diff --git a/Mage/src/main/java/mage/abilities/keyword/ReinforceAbility.java b/Mage/src/main/java/mage/abilities/keyword/ReinforceAbility.java index 91094bc762a..a475494c3ad 100644 --- a/Mage/src/main/java/mage/abilities/keyword/ReinforceAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/ReinforceAbility.java @@ -36,7 +36,7 @@ public class ReinforceAbility extends SimpleActivatedAbility { } @Override - public SimpleActivatedAbility copy() { + public ReinforceAbility copy() { return new ReinforceAbility(this); } diff --git a/Mage/src/main/java/mage/abilities/keyword/SoulshiftAbility.java b/Mage/src/main/java/mage/abilities/keyword/SoulshiftAbility.java index 361f1dc3c64..a4d72d2ee41 100644 --- a/Mage/src/main/java/mage/abilities/keyword/SoulshiftAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/SoulshiftAbility.java @@ -57,7 +57,7 @@ public class SoulshiftAbility extends DiesSourceTriggeredAbility { } @Override - public DiesSourceTriggeredAbility copy() { + public SoulshiftAbility copy() { return new SoulshiftAbility(this); } diff --git a/Mage/src/main/java/mage/abilities/keyword/SpliceAbility.java b/Mage/src/main/java/mage/abilities/keyword/SpliceAbility.java index f5bc3845d97..45823e8d7c9 100644 --- a/Mage/src/main/java/mage/abilities/keyword/SpliceAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/SpliceAbility.java @@ -1,6 +1,5 @@ package mage.abilities.keyword; -import java.util.Iterator; import mage.abilities.Ability; import mage.abilities.SpellAbility; import mage.abilities.common.SimpleStaticAbility; @@ -19,6 +18,8 @@ import mage.game.Game; import mage.game.stack.Spell; import mage.players.Player; +import java.util.Iterator; + /** * 702.45. Splice * @@ -116,7 +117,7 @@ public class SpliceAbility extends SimpleStaticAbility { } @Override - public SimpleStaticAbility copy() { + public SpliceAbility copy() { return new SpliceAbility(this); } diff --git a/Mage/src/main/java/mage/abilities/keyword/SplitSecondAbility.java b/Mage/src/main/java/mage/abilities/keyword/SplitSecondAbility.java index 55e5823ea5a..de3a7c95e63 100644 --- a/Mage/src/main/java/mage/abilities/keyword/SplitSecondAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/SplitSecondAbility.java @@ -30,13 +30,13 @@ public class SplitSecondAbility extends SimpleStaticAbility { return "Split second (As long as this spell is on the stack, players can't cast spells or activate abilities that aren't mana abilities.)"; } - public SplitSecondAbility(SplitSecondAbility ability) { + protected SplitSecondAbility(final SplitSecondAbility ability) { super(ability); } @Override - public SimpleStaticAbility copy() { - return new SplitSecondAbility(this); + public SplitSecondAbility copy() { + return new SplitSecondAbility(this); } } diff --git a/Mage/src/main/java/mage/abilities/keyword/SunburstAbility.java b/Mage/src/main/java/mage/abilities/keyword/SunburstAbility.java index 4237f482429..d3a0f87fa83 100644 --- a/Mage/src/main/java/mage/abilities/keyword/SunburstAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/SunburstAbility.java @@ -37,7 +37,7 @@ public class SunburstAbility extends EntersBattlefieldAbility { } @Override - public EntersBattlefieldAbility copy() { + public SunburstAbility copy() { return new SunburstAbility(this); } diff --git a/Mage/src/main/java/mage/abilities/keyword/TransformAbility.java b/Mage/src/main/java/mage/abilities/keyword/TransformAbility.java index 2063054984c..ff3de87c56b 100644 --- a/Mage/src/main/java/mage/abilities/keyword/TransformAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/TransformAbility.java @@ -31,7 +31,7 @@ public class TransformAbility extends SimpleStaticAbility { } @Override - public SimpleStaticAbility copy() { + public TransformAbility copy() { return new TransformAbility(this); } diff --git a/Mage/src/main/java/mage/abilities/keyword/TransmuteAbility.java b/Mage/src/main/java/mage/abilities/keyword/TransmuteAbility.java index fe8a1c01564..a1fbb0400ea 100644 --- a/Mage/src/main/java/mage/abilities/keyword/TransmuteAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/TransmuteAbility.java @@ -48,7 +48,7 @@ public class TransmuteAbility extends SimpleActivatedAbility { } @Override - public SimpleActivatedAbility copy() { + public TransmuteAbility copy() { return new TransmuteAbility(this); } @@ -67,7 +67,7 @@ class TransmuteEffect extends OneShotEffect { staticText = "Transmute"; } - TransmuteEffect(final TransmuteEffect effect) { + private TransmuteEffect(final TransmuteEffect effect) { super(effect); } diff --git a/Mage/src/main/java/mage/abilities/keyword/TributeAbility.java b/Mage/src/main/java/mage/abilities/keyword/TributeAbility.java index 06bb04d158d..2375c171f17 100644 --- a/Mage/src/main/java/mage/abilities/keyword/TributeAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/TributeAbility.java @@ -1,8 +1,6 @@ package mage.abilities.keyword; -import java.util.UUID; - import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldAbility; import mage.abilities.effects.OneShotEffect; @@ -15,6 +13,8 @@ import mage.target.Target; import mage.target.common.TargetOpponent; import mage.util.CardUtil; +import java.util.UUID; + /** * @author LevelX2 */ @@ -33,7 +33,7 @@ public class TributeAbility extends EntersBattlefieldAbility { } @Override - public EntersBattlefieldAbility copy() { + public TributeAbility copy() { return new TributeAbility(this); } diff --git a/Mage/src/main/java/mage/abilities/keyword/UndauntedAbility.java b/Mage/src/main/java/mage/abilities/keyword/UndauntedAbility.java index 7f352f72ac2..e05784e5189 100644 --- a/Mage/src/main/java/mage/abilities/keyword/UndauntedAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/UndauntedAbility.java @@ -20,7 +20,7 @@ public class UndauntedAbility extends SimpleStaticAbility { } @Override - public SimpleStaticAbility copy() { + public UndauntedAbility copy() { return new UndauntedAbility(this); } diff --git a/Mage/src/main/java/mage/abilities/keyword/UndyingAbility.java b/Mage/src/main/java/mage/abilities/keyword/UndyingAbility.java index e2ac302a316..777b3340ad9 100644 --- a/Mage/src/main/java/mage/abilities/keyword/UndyingAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/UndyingAbility.java @@ -27,7 +27,7 @@ public class UndyingAbility extends DiesSourceTriggeredAbility { } @Override - public DiesSourceTriggeredAbility copy() { + public UndyingAbility copy() { return new UndyingAbility(this); } diff --git a/Mage/src/main/java/mage/abilities/keyword/VanishingUpkeepAbility.java b/Mage/src/main/java/mage/abilities/keyword/VanishingUpkeepAbility.java index e6097184fb3..969ddd2e887 100644 --- a/Mage/src/main/java/mage/abilities/keyword/VanishingUpkeepAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/VanishingUpkeepAbility.java @@ -34,7 +34,7 @@ public class VanishingUpkeepAbility extends BeginningOfUpkeepTriggeredAbility { } @Override - public BeginningOfUpkeepTriggeredAbility copy() { + public VanishingUpkeepAbility copy() { return new VanishingUpkeepAbility(this); } diff --git a/Mage/src/main/java/mage/abilities/mana/BasicManaAbility.java b/Mage/src/main/java/mage/abilities/mana/BasicManaAbility.java index e74ac006dfe..01e2a8cd5a7 100644 --- a/Mage/src/main/java/mage/abilities/mana/BasicManaAbility.java +++ b/Mage/src/main/java/mage/abilities/mana/BasicManaAbility.java @@ -13,7 +13,7 @@ public abstract class BasicManaAbility extends ActivatedManaAbilityImpl { super(Zone.BATTLEFIELD, effect, new TapSourceCost()); } - public BasicManaAbility(BasicManaAbility ability) { + protected BasicManaAbility(final BasicManaAbility ability) { super(ability); } } diff --git a/Mage/src/main/java/mage/abilities/mana/BlackManaAbility.java b/Mage/src/main/java/mage/abilities/mana/BlackManaAbility.java index 3c7f2193163..93d08a9dd19 100644 --- a/Mage/src/main/java/mage/abilities/mana/BlackManaAbility.java +++ b/Mage/src/main/java/mage/abilities/mana/BlackManaAbility.java @@ -17,7 +17,7 @@ public class BlackManaAbility extends BasicManaAbility { this.netMana.add(new Mana(ColoredManaSymbol.B)); } - public BlackManaAbility(BlackManaAbility ability) { + private BlackManaAbility(final BlackManaAbility ability) { super(ability); } diff --git a/Mage/src/main/java/mage/abilities/mana/BlueManaAbility.java b/Mage/src/main/java/mage/abilities/mana/BlueManaAbility.java index 54569a99e73..d6dbbd1c01b 100644 --- a/Mage/src/main/java/mage/abilities/mana/BlueManaAbility.java +++ b/Mage/src/main/java/mage/abilities/mana/BlueManaAbility.java @@ -17,7 +17,7 @@ public class BlueManaAbility extends BasicManaAbility { this.netMana.add(new Mana(ColoredManaSymbol.U)); } - public BlueManaAbility(BlueManaAbility ability) { + private BlueManaAbility(final BlueManaAbility ability) { super(ability); } diff --git a/Mage/src/main/java/mage/abilities/mana/ColorlessManaAbility.java b/Mage/src/main/java/mage/abilities/mana/ColorlessManaAbility.java index 344d56b9261..8398e8d7fe7 100644 --- a/Mage/src/main/java/mage/abilities/mana/ColorlessManaAbility.java +++ b/Mage/src/main/java/mage/abilities/mana/ColorlessManaAbility.java @@ -15,7 +15,7 @@ public class ColorlessManaAbility extends BasicManaAbility { this.netMana.add(Mana.ColorlessMana(1)); } - public ColorlessManaAbility(ColorlessManaAbility ability) { + private ColorlessManaAbility(final ColorlessManaAbility ability) { super(ability); } diff --git a/Mage/src/main/java/mage/abilities/mana/GreenManaAbility.java b/Mage/src/main/java/mage/abilities/mana/GreenManaAbility.java index 2fc20ad4bd1..6f997240818 100644 --- a/Mage/src/main/java/mage/abilities/mana/GreenManaAbility.java +++ b/Mage/src/main/java/mage/abilities/mana/GreenManaAbility.java @@ -17,7 +17,7 @@ public class GreenManaAbility extends BasicManaAbility { this.netMana.add(new Mana(ColoredManaSymbol.G)); } - public GreenManaAbility(GreenManaAbility ability) { + private GreenManaAbility(final GreenManaAbility ability) { super(ability); } diff --git a/Mage/src/main/java/mage/abilities/mana/RedManaAbility.java b/Mage/src/main/java/mage/abilities/mana/RedManaAbility.java index 1dc02c75fc0..cce7adbcc29 100644 --- a/Mage/src/main/java/mage/abilities/mana/RedManaAbility.java +++ b/Mage/src/main/java/mage/abilities/mana/RedManaAbility.java @@ -17,7 +17,7 @@ public class RedManaAbility extends BasicManaAbility { this.netMana.add(new Mana(ColoredManaSymbol.R)); } - public RedManaAbility(RedManaAbility ability) { + private RedManaAbility(final RedManaAbility ability) { super(ability); } diff --git a/Mage/src/main/java/mage/abilities/mana/WhiteManaAbility.java b/Mage/src/main/java/mage/abilities/mana/WhiteManaAbility.java index 1d67c4b2227..8d80737800a 100644 --- a/Mage/src/main/java/mage/abilities/mana/WhiteManaAbility.java +++ b/Mage/src/main/java/mage/abilities/mana/WhiteManaAbility.java @@ -17,7 +17,7 @@ public class WhiteManaAbility extends BasicManaAbility { this.netMana.add(new Mana(ColoredManaSymbol.W)); } - public WhiteManaAbility(WhiteManaAbility ability) { + private WhiteManaAbility(final WhiteManaAbility ability) { super(ability); } diff --git a/Mage/src/main/java/mage/cards/AdventureCard.java b/Mage/src/main/java/mage/cards/AdventureCard.java index c35257b159b..875e1095233 100644 --- a/Mage/src/main/java/mage/cards/AdventureCard.java +++ b/Mage/src/main/java/mage/cards/AdventureCard.java @@ -30,7 +30,7 @@ public abstract class AdventureCard extends CardImpl { spellCard.finalizeAdventure(); } - public AdventureCard(AdventureCard card) { + protected AdventureCard(final AdventureCard card) { super(card); this.spellCard = card.getSpellCard().copy(); this.spellCard.setParentCard(this); diff --git a/Mage/src/main/java/mage/cards/AdventureCardSpellImpl.java b/Mage/src/main/java/mage/cards/AdventureCardSpellImpl.java index 47a01b819f6..414fe262aa7 100644 --- a/Mage/src/main/java/mage/cards/AdventureCardSpellImpl.java +++ b/Mage/src/main/java/mage/cards/AdventureCardSpellImpl.java @@ -83,7 +83,7 @@ public class AdventureCardSpellImpl extends CardImpl implements AdventureCardSpe } @Override - public AdventureCardSpell copy() { + public AdventureCardSpellImpl copy() { return new AdventureCardSpellImpl(this); } diff --git a/Mage/src/main/java/mage/cards/LevelerCard.java b/Mage/src/main/java/mage/cards/LevelerCard.java index a17ab793f95..bfd5f37709d 100644 --- a/Mage/src/main/java/mage/cards/LevelerCard.java +++ b/Mage/src/main/java/mage/cards/LevelerCard.java @@ -19,7 +19,7 @@ public abstract class LevelerCard extends CardImpl { super(ownerId, setInfo, cardTypes, costs); } - public LevelerCard(LevelerCard card) { + protected LevelerCard(final LevelerCard card) { super(card); this.maxLevelCounters = card.maxLevelCounters; } diff --git a/Mage/src/main/java/mage/cards/SplitCardHalfImpl.java b/Mage/src/main/java/mage/cards/SplitCardHalfImpl.java index f1d309e4491..21b2f910ead 100644 --- a/Mage/src/main/java/mage/cards/SplitCardHalfImpl.java +++ b/Mage/src/main/java/mage/cards/SplitCardHalfImpl.java @@ -69,7 +69,7 @@ public class SplitCardHalfImpl extends CardImpl implements SplitCardHalf { } @Override - public SplitCardHalf copy() { + public SplitCardHalfImpl copy() { return new SplitCardHalfImpl(this); } diff --git a/Mage/src/main/java/mage/cards/basiclands/BasicLand.java b/Mage/src/main/java/mage/cards/basiclands/BasicLand.java index 3a7923c3cab..3bd5c769d87 100644 --- a/Mage/src/main/java/mage/cards/basiclands/BasicLand.java +++ b/Mage/src/main/java/mage/cards/basiclands/BasicLand.java @@ -1,15 +1,15 @@ package mage.cards.basiclands; -import java.util.UUID; - -import mage.cards.CardSetInfo; -import mage.constants.CardType; import mage.abilities.mana.ActivatedManaAbilityImpl; import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; import mage.constants.SubType; import mage.constants.SuperType; +import java.util.UUID; + /** * @author BetaSteward_at_googlemail.com */ @@ -22,7 +22,7 @@ public abstract class BasicLand extends CardImpl { this.addAbility(mana); } - public BasicLand(BasicLand land) { + protected BasicLand(final BasicLand land) { super(land); } diff --git a/Mage/src/main/java/mage/cards/basiclands/Forest.java b/Mage/src/main/java/mage/cards/basiclands/Forest.java index 4bdb249831c..f13573655d9 100644 --- a/Mage/src/main/java/mage/cards/basiclands/Forest.java +++ b/Mage/src/main/java/mage/cards/basiclands/Forest.java @@ -2,13 +2,11 @@ package mage.cards.basiclands; -import java.util.UUID; - -import mage.ObjectColor; import mage.abilities.mana.GreenManaAbility; -import mage.cards.Card; import mage.cards.CardSetInfo; +import java.util.UUID; + /** * @author BetaSteward_at_googlemail.com */ @@ -18,12 +16,12 @@ public class Forest extends BasicLand { this.frameColor.setGreen(true); } - protected Forest(final Forest land) { + private Forest(final Forest land) { super(land); } @Override - public Card copy() { + public Forest copy() { return new Forest(this); } } diff --git a/Mage/src/main/java/mage/cards/basiclands/Island.java b/Mage/src/main/java/mage/cards/basiclands/Island.java index d0ecb8d8ec9..f0f76b8bd4f 100644 --- a/Mage/src/main/java/mage/cards/basiclands/Island.java +++ b/Mage/src/main/java/mage/cards/basiclands/Island.java @@ -2,12 +2,11 @@ package mage.cards.basiclands; -import java.util.UUID; -import mage.ObjectColor; import mage.abilities.mana.BlueManaAbility; -import mage.cards.Card; import mage.cards.CardSetInfo; +import java.util.UUID; + /** * * @author BetaSteward_at_googlemail.com @@ -18,12 +17,12 @@ public class Island extends BasicLand { this.frameColor.setBlue(true); } - public Island(Island land) { + private Island(final Island land) { super(land); } @Override - public Card copy() { + public Island copy() { return new Island(this); } } diff --git a/Mage/src/main/java/mage/cards/basiclands/Mountain.java b/Mage/src/main/java/mage/cards/basiclands/Mountain.java index e16c4ac34aa..4c16d19ea74 100644 --- a/Mage/src/main/java/mage/cards/basiclands/Mountain.java +++ b/Mage/src/main/java/mage/cards/basiclands/Mountain.java @@ -2,12 +2,11 @@ package mage.cards.basiclands; -import java.util.UUID; -import mage.ObjectColor; import mage.abilities.mana.RedManaAbility; -import mage.cards.Card; import mage.cards.CardSetInfo; +import java.util.UUID; + /** * * @author BetaSteward_at_googlemail.com @@ -18,12 +17,12 @@ public class Mountain extends BasicLand { this.frameColor.setRed(true); } - public Mountain(Mountain land) { + private Mountain(final Mountain land) { super(land); } @Override - public Card copy() { + public Mountain copy() { return new Mountain(this); } } diff --git a/Mage/src/main/java/mage/cards/basiclands/Plains.java b/Mage/src/main/java/mage/cards/basiclands/Plains.java index 4f4151e71bd..7a7d46408fb 100644 --- a/Mage/src/main/java/mage/cards/basiclands/Plains.java +++ b/Mage/src/main/java/mage/cards/basiclands/Plains.java @@ -2,12 +2,11 @@ package mage.cards.basiclands; -import java.util.UUID; -import mage.ObjectColor; import mage.abilities.mana.WhiteManaAbility; -import mage.cards.Card; import mage.cards.CardSetInfo; +import java.util.UUID; + /** * * @author BetaSteward_at_googlemail.com @@ -18,12 +17,12 @@ public class Plains extends BasicLand { this.frameColor.setWhite(true); } - public Plains(Plains land) { + private Plains(final Plains land) { super(land); } @Override - public Card copy() { + public Plains copy() { return new Plains(this); } } diff --git a/Mage/src/main/java/mage/cards/basiclands/Swamp.java b/Mage/src/main/java/mage/cards/basiclands/Swamp.java index 5e866c99d6b..82c212263b7 100644 --- a/Mage/src/main/java/mage/cards/basiclands/Swamp.java +++ b/Mage/src/main/java/mage/cards/basiclands/Swamp.java @@ -2,12 +2,11 @@ package mage.cards.basiclands; -import java.util.UUID; -import mage.ObjectColor; import mage.abilities.mana.BlackManaAbility; -import mage.cards.Card; import mage.cards.CardSetInfo; +import java.util.UUID; + /** * * @author BetaSteward_at_googlemail.com @@ -18,12 +17,12 @@ public class Swamp extends BasicLand { this.frameColor.setBlack(true); } - public Swamp(Swamp land) { + private Swamp(final Swamp land) { super(land); } @Override - public Card copy() { + public Swamp copy() { return new Swamp(this); } } diff --git a/Mage/src/main/java/mage/filter/FilterAbility.java b/Mage/src/main/java/mage/filter/FilterAbility.java index eaedf47903b..887d3b3eb65 100644 --- a/Mage/src/main/java/mage/filter/FilterAbility.java +++ b/Mage/src/main/java/mage/filter/FilterAbility.java @@ -21,7 +21,7 @@ public class FilterAbility extends FilterImpl { super(name); } - public FilterAbility(FilterAbility filter) { + protected FilterAbility(final FilterAbility filter) { super(filter); } diff --git a/Mage/src/main/java/mage/filter/FilterCard.java b/Mage/src/main/java/mage/filter/FilterCard.java index 0718eb2d682..d9b2f18d142 100644 --- a/Mage/src/main/java/mage/filter/FilterCard.java +++ b/Mage/src/main/java/mage/filter/FilterCard.java @@ -34,7 +34,7 @@ public class FilterCard extends FilterObject { super(name); } - public FilterCard(FilterCard filter) { + protected FilterCard(final FilterCard filter) { super(filter); this.extraPredicates.addAll(filter.extraPredicates); } diff --git a/Mage/src/main/java/mage/filter/FilterImpl.java b/Mage/src/main/java/mage/filter/FilterImpl.java index f7e9fe68aed..428610eabbb 100644 --- a/Mage/src/main/java/mage/filter/FilterImpl.java +++ b/Mage/src/main/java/mage/filter/FilterImpl.java @@ -26,7 +26,7 @@ public abstract class FilterImpl implements Filter { this.lockedFilter = false; } - public FilterImpl(final FilterImpl filter) { + protected FilterImpl(final FilterImpl filter) { this.message = filter.message; this.predicates = new ArrayList<>(filter.predicates); this.lockedFilter = false;// After copying a filter it's allowed to modify diff --git a/Mage/src/main/java/mage/filter/FilterObject.java b/Mage/src/main/java/mage/filter/FilterObject.java index e752f5bce7f..6795d65b76d 100644 --- a/Mage/src/main/java/mage/filter/FilterObject.java +++ b/Mage/src/main/java/mage/filter/FilterObject.java @@ -24,7 +24,7 @@ public class FilterObject extends FilterImpl { super(name); } - public FilterObject(FilterObject filter) { + protected FilterObject(final FilterObject filter) { super(filter); } } diff --git a/Mage/src/main/java/mage/game/permanent/token/WolfToken.java b/Mage/src/main/java/mage/game/permanent/token/WolfToken.java index b68d9908524..bee3e8dadfa 100644 --- a/Mage/src/main/java/mage/game/permanent/token/WolfToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/WolfToken.java @@ -24,7 +24,7 @@ public final class WolfToken extends TokenImpl { } @Override - public Token copy() { + public WolfToken copy() { return new WolfToken(this); } } diff --git a/Mage/src/main/java/mage/target/targetpointer/NthTargetPointer.java b/Mage/src/main/java/mage/target/targetpointer/NthTargetPointer.java index b1f0e4691c4..a4f2726e404 100644 --- a/Mage/src/main/java/mage/target/targetpointer/NthTargetPointer.java +++ b/Mage/src/main/java/mage/target/targetpointer/NthTargetPointer.java @@ -26,7 +26,7 @@ public abstract class NthTargetPointer extends TargetPointerImpl { this.targetNumber = targetNumber; } - public NthTargetPointer(final NthTargetPointer nthTargetPointer) { + protected NthTargetPointer(final NthTargetPointer nthTargetPointer) { super(nthTargetPointer); this.targetNumber = nthTargetPointer.targetNumber; From 236860795a1f6834603d88e858eeb67ac18eea66 Mon Sep 17 00:00:00 2001 From: Susucre <34709007+Susucre@users.noreply.github.com> Date: Thu, 31 Aug 2023 01:48:13 +0200 Subject: [PATCH 19/36] clean all copy constructors in cards starting W-X-Y-Z (#11067) --- Mage.Sets/src/mage/cards/w/WaitingInTheWeeds.java | 2 +- Mage.Sets/src/mage/cards/w/WakeTheDead.java | 2 +- Mage.Sets/src/mage/cards/w/WakeThrasher.java | 2 +- Mage.Sets/src/mage/cards/w/WakingNightmare.java | 2 +- Mage.Sets/src/mage/cards/w/WalkingDesecration.java | 2 +- Mage.Sets/src/mage/cards/w/WallOfCaltrops.java | 2 +- Mage.Sets/src/mage/cards/w/WallOfDeceit.java | 2 +- Mage.Sets/src/mage/cards/w/WallOfDenial.java | 2 +- Mage.Sets/src/mage/cards/w/WallOfDust.java | 2 +- Mage.Sets/src/mage/cards/w/WallOfEssence.java | 4 ++-- Mage.Sets/src/mage/cards/w/WallOfHope.java | 4 ++-- Mage.Sets/src/mage/cards/w/WallOfReverence.java | 2 +- Mage.Sets/src/mage/cards/w/WallOfShields.java | 2 +- Mage.Sets/src/mage/cards/w/WallOfSouls.java | 2 +- Mage.Sets/src/mage/cards/w/WallOfStolenIdentity.java | 2 +- Mage.Sets/src/mage/cards/w/WallOfTanglecord.java | 2 +- Mage.Sets/src/mage/cards/w/WallOfTombstones.java | 2 +- Mage.Sets/src/mage/cards/w/WallOfVipers.java | 2 +- Mage.Sets/src/mage/cards/w/WandOfDenial.java | 2 +- Mage.Sets/src/mage/cards/w/WandOfIth.java | 2 +- Mage.Sets/src/mage/cards/w/WanderingFumarole.java | 2 +- Mage.Sets/src/mage/cards/w/WanderingMage.java | 2 +- Mage.Sets/src/mage/cards/w/WanderingOnes.java | 2 +- Mage.Sets/src/mage/cards/w/WarElemental.java | 4 ++-- Mage.Sets/src/mage/cards/w/WarElephant.java | 2 +- Mage.Sets/src/mage/cards/w/WarFalcon.java | 2 +- Mage.Sets/src/mage/cards/w/WarReport.java | 2 +- Mage.Sets/src/mage/cards/w/WarRoomStarWars.java | 2 +- Mage.Sets/src/mage/cards/w/WardOfBones.java | 2 +- Mage.Sets/src/mage/cards/w/WardOfPiety.java | 2 +- Mage.Sets/src/mage/cards/w/WardSliver.java | 2 +- Mage.Sets/src/mage/cards/w/WardenOfTheWall.java | 2 +- Mage.Sets/src/mage/cards/w/WardscaleDragon.java | 2 +- Mage.Sets/src/mage/cards/w/WarmongersChariot.java | 2 +- Mage.Sets/src/mage/cards/w/WarpWorld.java | 2 +- Mage.Sets/src/mage/cards/w/WarpedDevotion.java | 2 +- Mage.Sets/src/mage/cards/w/WarrenPilferers.java | 2 +- Mage.Sets/src/mage/cards/w/WarsToll.java | 4 ++-- Mage.Sets/src/mage/cards/w/WarstormSurge.java | 4 ++-- Mage.Sets/src/mage/cards/w/WashOut.java | 2 +- Mage.Sets/src/mage/cards/w/WasitoraNekoruQueen.java | 2 +- Mage.Sets/src/mage/cards/w/Watchdog.java | 2 +- Mage.Sets/src/mage/cards/w/WatchersOfTheDead.java | 2 +- Mage.Sets/src/mage/cards/w/Watchwolf.java | 2 +- Mage.Sets/src/mage/cards/w/WaveOfReckoning.java | 2 +- Mage.Sets/src/mage/cards/w/WaveOfVitriol.java | 2 +- Mage.Sets/src/mage/cards/w/WaveskimmerAven.java | 2 +- Mage.Sets/src/mage/cards/w/Waylay.java | 2 +- Mage.Sets/src/mage/cards/w/WebOfInertia.java | 4 ++-- Mage.Sets/src/mage/cards/w/WeedStrangle.java | 2 +- Mage.Sets/src/mage/cards/w/WeirdHarvest.java | 2 +- Mage.Sets/src/mage/cards/w/WeldingJar.java | 2 +- Mage.Sets/src/mage/cards/w/WelkinTern.java | 2 +- Mage.Sets/src/mage/cards/w/WellLaidPlans.java | 2 +- Mage.Sets/src/mage/cards/w/WellOfKnowledge.java | 4 ++-- Mage.Sets/src/mage/cards/w/WellOfLostDreams.java | 2 +- Mage.Sets/src/mage/cards/w/WheelOfSunAndMoon.java | 2 +- Mage.Sets/src/mage/cards/w/WhenFluffyBunniesAttack.java | 2 +- Mage.Sets/src/mage/cards/w/WhimsOfTheFates.java | 2 +- Mage.Sets/src/mage/cards/w/Whipkeeper.java | 2 +- Mage.Sets/src/mage/cards/w/WhiptongueHydra.java | 2 +- Mage.Sets/src/mage/cards/w/WhirlpoolWarrior.java | 2 +- Mage.Sets/src/mage/cards/w/WhirlpoolWhelm.java | 2 +- Mage.Sets/src/mage/cards/w/WhisperingSnitch.java | 2 +- Mage.Sets/src/mage/cards/w/WhiteSunsZenith.java | 2 +- Mage.Sets/src/mage/cards/w/WhitesunsPassage.java | 2 +- Mage.Sets/src/mage/cards/w/WickedReward.java | 2 +- Mage.Sets/src/mage/cards/w/WidespreadPanic.java | 4 ++-- Mage.Sets/src/mage/cards/w/WildDefiance.java | 2 +- Mage.Sets/src/mage/cards/w/WildDogs.java | 2 +- Mage.Sets/src/mage/cards/w/WildEvocation.java | 2 +- Mage.Sets/src/mage/cards/w/WildMagicSorcerer.java | 2 +- Mage.Sets/src/mage/cards/w/WildMammoth.java | 2 +- Mage.Sets/src/mage/cards/w/WildPair.java | 2 +- Mage.Sets/src/mage/cards/w/WildSwing.java | 2 +- Mage.Sets/src/mage/cards/w/WildWurm.java | 2 +- Mage.Sets/src/mage/cards/w/Wildcall.java | 2 +- Mage.Sets/src/mage/cards/w/WildfieldBorderpost.java | 2 +- Mage.Sets/src/mage/cards/w/WildwoodEscort.java | 2 +- Mage.Sets/src/mage/cards/w/WillingTestSubject.java | 2 +- Mage.Sets/src/mage/cards/w/WindZendikon.java | 2 +- Mage.Sets/src/mage/cards/w/WindreaderSphinx.java | 2 +- Mage.Sets/src/mage/cards/w/WindriderEel.java | 2 +- Mage.Sets/src/mage/cards/w/WindsOfChange.java | 2 +- Mage.Sets/src/mage/cards/w/WingPuncture.java | 2 +- Mage.Sets/src/mage/cards/w/WingStorm.java | 2 +- Mage.Sets/src/mage/cards/w/WingedCoatl.java | 2 +- Mage.Sets/src/mage/cards/w/WingedTempleOfOrazca.java | 2 +- Mage.Sets/src/mage/cards/w/WingsOfHubris.java | 2 +- Mage.Sets/src/mage/cards/w/Winnow.java | 2 +- Mage.Sets/src/mage/cards/w/WinterOrb.java | 2 +- Mage.Sets/src/mage/cards/w/WinterSky.java | 2 +- Mage.Sets/src/mage/cards/w/WireSurgeons.java | 2 +- Mage.Sets/src/mage/cards/w/Wirecat.java | 2 +- Mage.Sets/src/mage/cards/w/WishfulMerfolk.java | 2 +- Mage.Sets/src/mage/cards/w/Wishmonger.java | 4 ++-- Mage.Sets/src/mage/cards/w/WistfulSelkie.java | 2 +- Mage.Sets/src/mage/cards/w/WitchEngine.java | 2 +- Mage.Sets/src/mage/cards/w/WitchHunt.java | 2 +- Mage.Sets/src/mage/cards/w/WitchMawNephilim.java | 2 +- Mage.Sets/src/mage/cards/w/WitchbaneOrb.java | 2 +- Mage.Sets/src/mage/cards/w/Witchstalker.java | 2 +- Mage.Sets/src/mage/cards/w/WithengarUnbound.java | 2 +- Mage.Sets/src/mage/cards/w/WitheringGaze.java | 2 +- Mage.Sets/src/mage/cards/w/WitheringWisps.java | 2 +- Mage.Sets/src/mage/cards/w/WoebringerDemon.java | 2 +- Mage.Sets/src/mage/cards/w/WojekApothecary.java | 2 +- Mage.Sets/src/mage/cards/w/WojekSiren.java | 2 +- Mage.Sets/src/mage/cards/w/WolfcallersHowl.java | 2 +- Mage.Sets/src/mage/cards/w/WoodElemental.java | 2 +- Mage.Sets/src/mage/cards/w/WoodSage.java | 2 +- Mage.Sets/src/mage/cards/w/WoodenSphere.java | 2 +- Mage.Sets/src/mage/cards/w/WoodenStake.java | 2 +- Mage.Sets/src/mage/cards/w/WoodlandSleuth.java | 2 +- Mage.Sets/src/mage/cards/w/WoodlotCrawler.java | 2 +- Mage.Sets/src/mage/cards/w/WoodvineElemental.java | 2 +- Mage.Sets/src/mage/cards/w/WoodwraithCorrupter.java | 2 +- Mage.Sets/src/mage/cards/w/WordOfCommand.java | 6 +++--- Mage.Sets/src/mage/cards/w/WordOfUndoing.java | 2 +- Mage.Sets/src/mage/cards/w/Wordmail.java | 2 +- Mage.Sets/src/mage/cards/w/WordsOfWaste.java | 2 +- Mage.Sets/src/mage/cards/w/WordsOfWilding.java | 2 +- Mage.Sets/src/mage/cards/w/WordsOfWind.java | 2 +- Mage.Sets/src/mage/cards/w/WordsOfWisdom.java | 2 +- Mage.Sets/src/mage/cards/w/WorldAtWar.java | 6 +++--- Mage.Sets/src/mage/cards/w/WorldBottlingKit.java | 2 +- Mage.Sets/src/mage/cards/w/WorldQueller.java | 2 +- Mage.Sets/src/mage/cards/w/WorldShaper.java | 2 +- Mage.Sets/src/mage/cards/w/Worldfire.java | 2 +- Mage.Sets/src/mage/cards/w/WorldgorgerDragon.java | 4 ++-- Mage.Sets/src/mage/cards/w/WorldheartPhoenix.java | 4 ++-- Mage.Sets/src/mage/cards/w/WorldlyCounsel.java | 2 +- Mage.Sets/src/mage/cards/w/Worldpurge.java | 2 +- Mage.Sets/src/mage/cards/w/Worldslayer.java | 2 +- Mage.Sets/src/mage/cards/w/WormfangCrab.java | 2 +- Mage.Sets/src/mage/cards/w/WormsOfTheEarth.java | 6 +++--- Mage.Sets/src/mage/cards/w/Worship.java | 2 +- Mage.Sets/src/mage/cards/w/WortTheRaidmother.java | 2 +- Mage.Sets/src/mage/cards/w/WoundReflection.java | 2 +- Mage.Sets/src/mage/cards/w/WrackWithMadness.java | 2 +- Mage.Sets/src/mage/cards/w/WretchedBanquet.java | 2 +- Mage.Sets/src/mage/cards/w/WritOfPassage.java | 2 +- Mage.Sets/src/mage/cards/w/WriteIntoBeing.java | 2 +- Mage.Sets/src/mage/cards/w/Wurmcalling.java | 2 +- Mage.Sets/src/mage/cards/w/Wurmquake.java | 2 +- Mage.Sets/src/mage/cards/w/WurmsTooth.java | 2 +- Mage.Sets/src/mage/cards/x/XanatharGuildKingpin.java | 2 +- Mage.Sets/src/mage/cards/x/XanthicStatue.java | 2 +- Mage.Sets/src/mage/cards/x/XantidSwarm.java | 4 ++-- Mage.Sets/src/mage/cards/x/XathridDemon.java | 2 +- Mage.Sets/src/mage/cards/x/XathridGorgon.java | 2 +- Mage.Sets/src/mage/cards/x/XenagosTheReveler.java | 4 ++-- Mage.Sets/src/mage/cards/x/XenicPoltergeist.java | 2 +- Mage.Sets/src/mage/cards/x/Xenograft.java | 2 +- Mage.Sets/src/mage/cards/x/XyrisTheWrithingStorm.java | 2 +- Mage.Sets/src/mage/cards/x/XystonStarDestroyer.java | 2 +- Mage.Sets/src/mage/cards/y/YasharnImplacableEarth.java | 2 +- Mage.Sets/src/mage/cards/y/YavimayaDryad.java | 2 +- Mage.Sets/src/mage/cards/y/YawgmothDemon.java | 2 +- Mage.Sets/src/mage/cards/y/YawgmothsVileOffering.java | 2 +- Mage.Sets/src/mage/cards/y/YawgmothsWill.java | 4 ++-- Mage.Sets/src/mage/cards/y/YdwenEfreet.java | 2 +- Mage.Sets/src/mage/cards/y/YedoraGraveGardener.java | 2 +- Mage.Sets/src/mage/cards/y/YennettCrypticSovereign.java | 2 +- Mage.Sets/src/mage/cards/y/YidrisMaelstromWielder.java | 2 +- Mage.Sets/src/mage/cards/y/YisanTheWandererBard.java | 2 +- Mage.Sets/src/mage/cards/y/YodaJediMaster.java | 2 +- Mage.Sets/src/mage/cards/y/YokedPlowbeast.java | 2 +- Mage.Sets/src/mage/cards/y/YoseiTheMorningStar.java | 2 +- Mage.Sets/src/mage/cards/y/YouLookUponTheTarrasque.java | 2 +- Mage.Sets/src/mage/cards/y/YukoraThePrisoner.java | 2 +- Mage.Sets/src/mage/cards/y/YurikoTheTigersShadow.java | 2 +- Mage.Sets/src/mage/cards/z/ZamWesell.java | 2 +- Mage.Sets/src/mage/cards/z/ZameckGuildmage.java | 2 +- Mage.Sets/src/mage/cards/z/ZedruuTheGreathearted.java | 2 +- Mage.Sets/src/mage/cards/z/ZirilanOfTheClaw.java | 2 +- Mage.Sets/src/mage/cards/z/ZombieApocalypse.java | 2 +- Mage.Sets/src/mage/cards/z/ZombieCannibal.java | 2 +- Mage.Sets/src/mage/cards/z/ZombieMob.java | 2 +- Mage.Sets/src/mage/cards/z/Zoologist.java | 2 +- Mage.Sets/src/mage/cards/z/ZoriiBliss.java | 2 +- Mage.Sets/src/mage/cards/z/ZurEternalSchemer.java | 2 +- Mage.Sets/src/mage/cards/z/ZzzyxassAbyss.java | 2 +- 183 files changed, 203 insertions(+), 203 deletions(-) diff --git a/Mage.Sets/src/mage/cards/w/WaitingInTheWeeds.java b/Mage.Sets/src/mage/cards/w/WaitingInTheWeeds.java index 27a2db0549f..2e926c70ccd 100644 --- a/Mage.Sets/src/mage/cards/w/WaitingInTheWeeds.java +++ b/Mage.Sets/src/mage/cards/w/WaitingInTheWeeds.java @@ -53,7 +53,7 @@ class WaitingInTheWeedsEffect extends OneShotEffect { staticText = "Each player creates a 1/1 green Cat creature token for each untapped Forest they control"; } - public WaitingInTheWeedsEffect(final WaitingInTheWeedsEffect effect) { + private WaitingInTheWeedsEffect(final WaitingInTheWeedsEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WakeTheDead.java b/Mage.Sets/src/mage/cards/w/WakeTheDead.java index 2826698f6d8..47bf83b089e 100644 --- a/Mage.Sets/src/mage/cards/w/WakeTheDead.java +++ b/Mage.Sets/src/mage/cards/w/WakeTheDead.java @@ -72,7 +72,7 @@ class WakeTheDeadReturnFromGraveyardToBattlefieldTargetEffect extends OneShotEff this.staticText = "Return X target creature cards from your graveyard to the battlefield. Sacrifice those creatures at the beginning of the next end step"; } - public WakeTheDeadReturnFromGraveyardToBattlefieldTargetEffect(final WakeTheDeadReturnFromGraveyardToBattlefieldTargetEffect effect) { + private WakeTheDeadReturnFromGraveyardToBattlefieldTargetEffect(final WakeTheDeadReturnFromGraveyardToBattlefieldTargetEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WakeThrasher.java b/Mage.Sets/src/mage/cards/w/WakeThrasher.java index a1a94c6ebcc..2074d033023 100644 --- a/Mage.Sets/src/mage/cards/w/WakeThrasher.java +++ b/Mage.Sets/src/mage/cards/w/WakeThrasher.java @@ -52,7 +52,7 @@ class BecomesUntappedControlledPermanentTriggeredAbility extends TriggeredAbilit setTriggerPhrase("Whenever a permanent you control becomes untapped, "); } - public BecomesUntappedControlledPermanentTriggeredAbility(final BecomesUntappedControlledPermanentTriggeredAbility ability) { + private BecomesUntappedControlledPermanentTriggeredAbility(final BecomesUntappedControlledPermanentTriggeredAbility ability) { super(ability); } diff --git a/Mage.Sets/src/mage/cards/w/WakingNightmare.java b/Mage.Sets/src/mage/cards/w/WakingNightmare.java index 5f3c0f2f5ee..115f5ab52a8 100644 --- a/Mage.Sets/src/mage/cards/w/WakingNightmare.java +++ b/Mage.Sets/src/mage/cards/w/WakingNightmare.java @@ -25,7 +25,7 @@ public final class WakingNightmare extends CardImpl { this.getSpellAbility().addTarget(new TargetPlayer()); } - public WakingNightmare (final WakingNightmare card) { + private WakingNightmare(final WakingNightmare card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/w/WalkingDesecration.java b/Mage.Sets/src/mage/cards/w/WalkingDesecration.java index ab8b969052d..836427eb3b9 100644 --- a/Mage.Sets/src/mage/cards/w/WalkingDesecration.java +++ b/Mage.Sets/src/mage/cards/w/WalkingDesecration.java @@ -55,7 +55,7 @@ class WalkingDesecrationEffect extends OneShotEffect { staticText = "Creatures of the creature type of your choice attack this turn if able"; } - public WalkingDesecrationEffect(final WalkingDesecrationEffect effect) { + private WalkingDesecrationEffect(final WalkingDesecrationEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WallOfCaltrops.java b/Mage.Sets/src/mage/cards/w/WallOfCaltrops.java index 10376b4f3b5..f1cc5944354 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfCaltrops.java +++ b/Mage.Sets/src/mage/cards/w/WallOfCaltrops.java @@ -59,7 +59,7 @@ class WallOfCaltropsAbility extends BlocksCreatureTriggeredAbility { super(new GainAbilitySourceEffect(BandingAbility.getInstance(), Duration.EndOfTurn)); } - public WallOfCaltropsAbility(WallOfCaltropsAbility ability) { + private WallOfCaltropsAbility(final WallOfCaltropsAbility ability) { super(ability); } diff --git a/Mage.Sets/src/mage/cards/w/WallOfDeceit.java b/Mage.Sets/src/mage/cards/w/WallOfDeceit.java index 0ae5c583553..92cfa24f77f 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfDeceit.java +++ b/Mage.Sets/src/mage/cards/w/WallOfDeceit.java @@ -57,7 +57,7 @@ class WallOfDeceitEffect extends OneShotEffect { this.staticText = "Turn {this} face down"; } - public WallOfDeceitEffect(final WallOfDeceitEffect effect) { + private WallOfDeceitEffect(final WallOfDeceitEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WallOfDenial.java b/Mage.Sets/src/mage/cards/w/WallOfDenial.java index 883107ece0f..96a842c871a 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfDenial.java +++ b/Mage.Sets/src/mage/cards/w/WallOfDenial.java @@ -30,7 +30,7 @@ public final class WallOfDenial extends CardImpl { this.addAbility(ShroudAbility.getInstance()); } - public WallOfDenial (final WallOfDenial card) { + private WallOfDenial(final WallOfDenial card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/w/WallOfDust.java b/Mage.Sets/src/mage/cards/w/WallOfDust.java index 62a2b33cbab..9d21af84a46 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfDust.java +++ b/Mage.Sets/src/mage/cards/w/WallOfDust.java @@ -54,7 +54,7 @@ class WallOfDustRestrictionEffect extends RestrictionEffect { staticText = "that creature can't attack during its controller's next turn"; } - public WallOfDustRestrictionEffect(final WallOfDustRestrictionEffect effect) { + private WallOfDustRestrictionEffect(final WallOfDustRestrictionEffect effect) { super(effect); this.targetPermanentReference = effect.targetPermanentReference; } diff --git a/Mage.Sets/src/mage/cards/w/WallOfEssence.java b/Mage.Sets/src/mage/cards/w/WallOfEssence.java index 4dbb3dc4212..3d130735087 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfEssence.java +++ b/Mage.Sets/src/mage/cards/w/WallOfEssence.java @@ -55,7 +55,7 @@ class WallOfEssenceTriggeredAbility extends TriggeredAbilityImpl { setTriggerPhrase("Whenever {this} is dealt combat damage, "); } - public WallOfEssenceTriggeredAbility(final WallOfEssenceTriggeredAbility effect) { + private WallOfEssenceTriggeredAbility(final WallOfEssenceTriggeredAbility effect) { super(effect); } @@ -91,7 +91,7 @@ class PiousWarriorGainLifeEffect extends OneShotEffect { staticText = "you gain that much life"; } - public PiousWarriorGainLifeEffect(final PiousWarriorGainLifeEffect effect) { + private PiousWarriorGainLifeEffect(final PiousWarriorGainLifeEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WallOfHope.java b/Mage.Sets/src/mage/cards/w/WallOfHope.java index 9a65c8fbad7..fc8c713a371 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfHope.java +++ b/Mage.Sets/src/mage/cards/w/WallOfHope.java @@ -54,7 +54,7 @@ class WallOfHopeTriggeredAbility extends TriggeredAbilityImpl { setTriggerPhrase("Whenever {this} is dealt damage, "); } - public WallOfHopeTriggeredAbility(final WallOfHopeTriggeredAbility effect) { + private WallOfHopeTriggeredAbility(final WallOfHopeTriggeredAbility effect) { super(effect); } @@ -85,7 +85,7 @@ class WallOfHopeGainLifeEffect extends OneShotEffect { staticText = "you gain that much life"; } - public WallOfHopeGainLifeEffect(final WallOfHopeGainLifeEffect effect) { + private WallOfHopeGainLifeEffect(final WallOfHopeGainLifeEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WallOfReverence.java b/Mage.Sets/src/mage/cards/w/WallOfReverence.java index 35d7b07cd82..10dc9a5346b 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfReverence.java +++ b/Mage.Sets/src/mage/cards/w/WallOfReverence.java @@ -39,7 +39,7 @@ public final class WallOfReverence extends CardImpl { this.addAbility(ability); } - public WallOfReverence (final WallOfReverence card) { + private WallOfReverence(final WallOfReverence card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/w/WallOfShields.java b/Mage.Sets/src/mage/cards/w/WallOfShields.java index 3b2ebc4c391..8f6a3ecec74 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfShields.java +++ b/Mage.Sets/src/mage/cards/w/WallOfShields.java @@ -31,7 +31,7 @@ public final class WallOfShields extends CardImpl { this.addAbility(BandingAbility.getInstance()); } - public WallOfShields (final WallOfShields card) { + private WallOfShields(final WallOfShields card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/w/WallOfSouls.java b/Mage.Sets/src/mage/cards/w/WallOfSouls.java index c554849fb31..6a063a058a3 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfSouls.java +++ b/Mage.Sets/src/mage/cards/w/WallOfSouls.java @@ -55,7 +55,7 @@ class WallOfSoulsTriggeredAbility extends TriggeredAbilityImpl { setTriggerPhrase("Whenever {this} is dealt combat damage, "); } - public WallOfSoulsTriggeredAbility(final WallOfSoulsTriggeredAbility effect) { + private WallOfSoulsTriggeredAbility(final WallOfSoulsTriggeredAbility effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WallOfStolenIdentity.java b/Mage.Sets/src/mage/cards/w/WallOfStolenIdentity.java index f2604e1d4a3..4793b9c534e 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfStolenIdentity.java +++ b/Mage.Sets/src/mage/cards/w/WallOfStolenIdentity.java @@ -71,7 +71,7 @@ class WallOfStolenIdentityCopyEffect extends OneShotEffect { staticText = rule2; } - public WallOfStolenIdentityCopyEffect(final WallOfStolenIdentityCopyEffect effect) { + private WallOfStolenIdentityCopyEffect(final WallOfStolenIdentityCopyEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WallOfTanglecord.java b/Mage.Sets/src/mage/cards/w/WallOfTanglecord.java index 06de1efbba7..a4deca6ed15 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfTanglecord.java +++ b/Mage.Sets/src/mage/cards/w/WallOfTanglecord.java @@ -33,7 +33,7 @@ public final class WallOfTanglecord extends CardImpl { new ManaCostsImpl<>("{G}"))); } - public WallOfTanglecord (final WallOfTanglecord card) { + private WallOfTanglecord(final WallOfTanglecord card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/w/WallOfTombstones.java b/Mage.Sets/src/mage/cards/w/WallOfTombstones.java index 2114624b09a..42fa81908d9 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfTombstones.java +++ b/Mage.Sets/src/mage/cards/w/WallOfTombstones.java @@ -53,7 +53,7 @@ class WallOfTombstonesEffect extends OneShotEffect { this.staticText = "change {this}'s base toughness to 1 plus the number of creature cards in your graveyard"; } - public WallOfTombstonesEffect(final WallOfTombstonesEffect effect) { + private WallOfTombstonesEffect(final WallOfTombstonesEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WallOfVipers.java b/Mage.Sets/src/mage/cards/w/WallOfVipers.java index 9ade8eb21f1..2c4b1ee7863 100644 --- a/Mage.Sets/src/mage/cards/w/WallOfVipers.java +++ b/Mage.Sets/src/mage/cards/w/WallOfVipers.java @@ -63,7 +63,7 @@ class WallOfVipersFilter extends FilterCreaturePermanent { super("creature {this} is blocking"); } - public WallOfVipersFilter(final WallOfVipersFilter filter) { + private WallOfVipersFilter(final WallOfVipersFilter filter) { super(filter); } diff --git a/Mage.Sets/src/mage/cards/w/WandOfDenial.java b/Mage.Sets/src/mage/cards/w/WandOfDenial.java index 2e59b5fd9fe..1254f306dcc 100644 --- a/Mage.Sets/src/mage/cards/w/WandOfDenial.java +++ b/Mage.Sets/src/mage/cards/w/WandOfDenial.java @@ -50,7 +50,7 @@ class WandOfDenialEffect extends OneShotEffect { this.staticText = "Look at the top card of target player's library. If it's a nonland card, you may pay 2 life. If you do, put it into that player's graveyard."; } - public WandOfDenialEffect(final WandOfDenialEffect effect) { + private WandOfDenialEffect(final WandOfDenialEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WandOfIth.java b/Mage.Sets/src/mage/cards/w/WandOfIth.java index e62f17ed4ba..a0d2f7ddcc8 100644 --- a/Mage.Sets/src/mage/cards/w/WandOfIth.java +++ b/Mage.Sets/src/mage/cards/w/WandOfIth.java @@ -52,7 +52,7 @@ class WandOfIthEffect extends OneShotEffect { staticText = "Target player reveals a card at random from their hand. If it's a land card, that player discards it unless they pay 1 life. If it isn't a land card, the player discards it unless they pay life equal to its mana value"; } - public WandOfIthEffect(final WandOfIthEffect effect) { + private WandOfIthEffect(final WandOfIthEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WanderingFumarole.java b/Mage.Sets/src/mage/cards/w/WanderingFumarole.java index 02a2dfb9e25..88793caf0d7 100644 --- a/Mage.Sets/src/mage/cards/w/WanderingFumarole.java +++ b/Mage.Sets/src/mage/cards/w/WanderingFumarole.java @@ -64,7 +64,7 @@ class WanderingFumaroleToken extends TokenImpl { toughness = new MageInt(4); addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new SwitchPowerToughnessSourceEffect(Duration.EndOfTurn), new ManaCostsImpl<>("{0}"))); } - public WanderingFumaroleToken(final WanderingFumaroleToken token) { + private WanderingFumaroleToken(final WanderingFumaroleToken token) { super(token); } diff --git a/Mage.Sets/src/mage/cards/w/WanderingMage.java b/Mage.Sets/src/mage/cards/w/WanderingMage.java index 316a9062003..f4d326e38e7 100644 --- a/Mage.Sets/src/mage/cards/w/WanderingMage.java +++ b/Mage.Sets/src/mage/cards/w/WanderingMage.java @@ -88,7 +88,7 @@ class WanderingMageCost extends CostImpl { this.text = "Put a -1/-1 counter on a creature you control"; } - public WanderingMageCost(WanderingMageCost cost) { + private WanderingMageCost(final WanderingMageCost cost) { super(cost); } diff --git a/Mage.Sets/src/mage/cards/w/WanderingOnes.java b/Mage.Sets/src/mage/cards/w/WanderingOnes.java index b1416a9c1e4..94a32016432 100644 --- a/Mage.Sets/src/mage/cards/w/WanderingOnes.java +++ b/Mage.Sets/src/mage/cards/w/WanderingOnes.java @@ -23,7 +23,7 @@ public final class WanderingOnes extends CardImpl { this.toughness = new MageInt(1); } - public WanderingOnes (final WanderingOnes card) { + private WanderingOnes(final WanderingOnes card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/w/WarElemental.java b/Mage.Sets/src/mage/cards/w/WarElemental.java index 63d5ea8fed2..54e2bafd49b 100644 --- a/Mage.Sets/src/mage/cards/w/WarElemental.java +++ b/Mage.Sets/src/mage/cards/w/WarElemental.java @@ -59,7 +59,7 @@ class WarElementalTriggeredAbility extends TriggeredAbilityImpl { super(Zone.BATTLEFIELD, new WarElementalEffect(), false); } - public WarElementalTriggeredAbility(final WarElementalTriggeredAbility ability) { + private WarElementalTriggeredAbility(final WarElementalTriggeredAbility ability) { super(ability); } @@ -94,7 +94,7 @@ class WarElementalEffect extends OneShotEffect { super(Outcome.Benefit); } - public WarElementalEffect(final WarElementalEffect effect) { + private WarElementalEffect(final WarElementalEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WarElephant.java b/Mage.Sets/src/mage/cards/w/WarElephant.java index 22b4c78a522..72ac6fa9bce 100644 --- a/Mage.Sets/src/mage/cards/w/WarElephant.java +++ b/Mage.Sets/src/mage/cards/w/WarElephant.java @@ -31,7 +31,7 @@ public final class WarElephant extends CardImpl { this.addAbility(BandingAbility.getInstance()); } - public WarElephant (final WarElephant card) { + private WarElephant(final WarElephant card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/w/WarFalcon.java b/Mage.Sets/src/mage/cards/w/WarFalcon.java index 7de86e2be19..75b28494de4 100644 --- a/Mage.Sets/src/mage/cards/w/WarFalcon.java +++ b/Mage.Sets/src/mage/cards/w/WarFalcon.java @@ -62,7 +62,7 @@ class WarFalconEffect extends RestrictionEffect { staticText = "{this} can't attack unless you control a Knight or a Soldier"; } - public WarFalconEffect(final WarFalconEffect effect) { + private WarFalconEffect(final WarFalconEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WarReport.java b/Mage.Sets/src/mage/cards/w/WarReport.java index d876bdf850f..b8c972f4a80 100644 --- a/Mage.Sets/src/mage/cards/w/WarReport.java +++ b/Mage.Sets/src/mage/cards/w/WarReport.java @@ -42,7 +42,7 @@ class WarReportEffect extends OneShotEffect { staticText = "You gain life equal to the number of creatures on the battlefield plus the number of artifacts on the battlefield"; } - public WarReportEffect(final WarReportEffect effect) { + private WarReportEffect(final WarReportEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WarRoomStarWars.java b/Mage.Sets/src/mage/cards/w/WarRoomStarWars.java index 603d6f12d13..b029a7d3236 100644 --- a/Mage.Sets/src/mage/cards/w/WarRoomStarWars.java +++ b/Mage.Sets/src/mage/cards/w/WarRoomStarWars.java @@ -48,7 +48,7 @@ public class WarRoomStarWars extends CardImpl { this.addAbility(limitedTimesPerTurnActivatedAbility, new AttackedOrBlockedThisCombatWatcher()); } - public WarRoomStarWars(final WarRoomStarWars card) { + private WarRoomStarWars(final WarRoomStarWars card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/w/WardOfBones.java b/Mage.Sets/src/mage/cards/w/WardOfBones.java index 71b3050d7ef..982dd234aad 100644 --- a/Mage.Sets/src/mage/cards/w/WardOfBones.java +++ b/Mage.Sets/src/mage/cards/w/WardOfBones.java @@ -55,7 +55,7 @@ class WardOfBonesEffect extends ContinuousRuleModifyingEffectImpl { + "Each opponent who controls more lands than you can't play lands."; } - public WardOfBonesEffect(final WardOfBonesEffect effect) { + private WardOfBonesEffect(final WardOfBonesEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WardOfPiety.java b/Mage.Sets/src/mage/cards/w/WardOfPiety.java index 793871a502d..0a9edea6901 100644 --- a/Mage.Sets/src/mage/cards/w/WardOfPiety.java +++ b/Mage.Sets/src/mage/cards/w/WardOfPiety.java @@ -65,7 +65,7 @@ class WardOfPietyPreventDamageTargetEffect extends RedirectionEffect { staticText = "The next 1 damage that would be dealt to enchanted creature this turn is dealt to any target instead"; } - public WardOfPietyPreventDamageTargetEffect(final WardOfPietyPreventDamageTargetEffect effect) { + private WardOfPietyPreventDamageTargetEffect(final WardOfPietyPreventDamageTargetEffect effect) { super(effect); this.redirectToObject = effect.redirectToObject; } diff --git a/Mage.Sets/src/mage/cards/w/WardSliver.java b/Mage.Sets/src/mage/cards/w/WardSliver.java index 24ffcae3d34..8354967ef26 100644 --- a/Mage.Sets/src/mage/cards/w/WardSliver.java +++ b/Mage.Sets/src/mage/cards/w/WardSliver.java @@ -66,7 +66,7 @@ class WardSliverGainAbilityControlledEffect extends ContinuousEffectImpl { staticText = "all Slivers have protection from the chosen color"; } - public WardSliverGainAbilityControlledEffect(final WardSliverGainAbilityControlledEffect effect) { + private WardSliverGainAbilityControlledEffect(final WardSliverGainAbilityControlledEffect effect) { super(effect); protectionFilter = effect.protectionFilter; } diff --git a/Mage.Sets/src/mage/cards/w/WardenOfTheWall.java b/Mage.Sets/src/mage/cards/w/WardenOfTheWall.java index 0b895a326b7..39f10205568 100644 --- a/Mage.Sets/src/mage/cards/w/WardenOfTheWall.java +++ b/Mage.Sets/src/mage/cards/w/WardenOfTheWall.java @@ -63,7 +63,7 @@ class GargoyleToken extends TokenImpl { addAbility(FlyingAbility.getInstance()); } - public GargoyleToken(final GargoyleToken token) { + private GargoyleToken(final GargoyleToken token) { super(token); } diff --git a/Mage.Sets/src/mage/cards/w/WardscaleDragon.java b/Mage.Sets/src/mage/cards/w/WardscaleDragon.java index 9125e77825e..ff965f0ca6d 100644 --- a/Mage.Sets/src/mage/cards/w/WardscaleDragon.java +++ b/Mage.Sets/src/mage/cards/w/WardscaleDragon.java @@ -55,7 +55,7 @@ class WardscaleDragonRuleEffect extends ContinuousRuleModifyingEffectImpl { staticText = "As long as {this} is attacking, defending player can't cast spells"; } - public WardscaleDragonRuleEffect(final WardscaleDragonRuleEffect effect) { + private WardscaleDragonRuleEffect(final WardscaleDragonRuleEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WarmongersChariot.java b/Mage.Sets/src/mage/cards/w/WarmongersChariot.java index 0b0a6f5c9d7..63a4c0a5ed6 100644 --- a/Mage.Sets/src/mage/cards/w/WarmongersChariot.java +++ b/Mage.Sets/src/mage/cards/w/WarmongersChariot.java @@ -51,7 +51,7 @@ class WarmongersChariotEffect extends AsThoughEffectImpl { staticText = "As long as equipped creature has defender, it can attack as though it didn't have defender"; } - public WarmongersChariotEffect(final WarmongersChariotEffect effect) { + private WarmongersChariotEffect(final WarmongersChariotEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WarpWorld.java b/Mage.Sets/src/mage/cards/w/WarpWorld.java index 0b6247112f9..8789519859c 100644 --- a/Mage.Sets/src/mage/cards/w/WarpWorld.java +++ b/Mage.Sets/src/mage/cards/w/WarpWorld.java @@ -52,7 +52,7 @@ class WarpWorldEffect extends OneShotEffect { this.staticText = "Each player shuffles all permanents they own into their library, then reveals that many cards from the top of their library. Each player puts all artifact, creature, and land cards revealed this way onto the battlefield, then does the same for enchantment cards, then puts all cards revealed this way that weren't put onto the battlefield on the bottom of their library"; } - public WarpWorldEffect(final WarpWorldEffect effect) { + private WarpWorldEffect(final WarpWorldEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WarpedDevotion.java b/Mage.Sets/src/mage/cards/w/WarpedDevotion.java index 223e6ba8b4c..3cb4b5509d7 100644 --- a/Mage.Sets/src/mage/cards/w/WarpedDevotion.java +++ b/Mage.Sets/src/mage/cards/w/WarpedDevotion.java @@ -43,7 +43,7 @@ class WarpedDevotionTriggeredAbility extends TriggeredAbilityImpl { super(Zone.BATTLEFIELD, new DiscardTargetEffect(1), false); } - public WarpedDevotionTriggeredAbility(final WarpedDevotionTriggeredAbility ability) { + private WarpedDevotionTriggeredAbility(final WarpedDevotionTriggeredAbility ability) { super(ability); } diff --git a/Mage.Sets/src/mage/cards/w/WarrenPilferers.java b/Mage.Sets/src/mage/cards/w/WarrenPilferers.java index f803464c094..3ab1e9f20b6 100644 --- a/Mage.Sets/src/mage/cards/w/WarrenPilferers.java +++ b/Mage.Sets/src/mage/cards/w/WarrenPilferers.java @@ -53,7 +53,7 @@ class WarrenPilferersReturnEffect extends OneShotEffect { staticText = "return target creature card from your graveyard to your hand. If that card is a Goblin card, Warren Pilferers gains haste until end of turn"; } - public WarrenPilferersReturnEffect(final WarrenPilferersReturnEffect effect) { + private WarrenPilferersReturnEffect(final WarrenPilferersReturnEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WarsToll.java b/Mage.Sets/src/mage/cards/w/WarsToll.java index 234e999ebbc..6703886e8f8 100644 --- a/Mage.Sets/src/mage/cards/w/WarsToll.java +++ b/Mage.Sets/src/mage/cards/w/WarsToll.java @@ -53,7 +53,7 @@ class WarsTollTapEffect extends OneShotEffect { staticText = "tap all lands that player controls"; } - public WarsTollTapEffect(final WarsTollTapEffect effect) { + private WarsTollTapEffect(final WarsTollTapEffect effect) { super(effect); } @@ -81,7 +81,7 @@ class WarsTollAttackRestrictionEffect extends RestrictionEffect { staticText = "If a creature an opponent controls attacks, all creatures that opponent controls attack if able"; } - public WarsTollAttackRestrictionEffect(final WarsTollAttackRestrictionEffect effect) { + private WarsTollAttackRestrictionEffect(final WarsTollAttackRestrictionEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WarstormSurge.java b/Mage.Sets/src/mage/cards/w/WarstormSurge.java index 0b0b39d62ef..31fd24fb3f8 100644 --- a/Mage.Sets/src/mage/cards/w/WarstormSurge.java +++ b/Mage.Sets/src/mage/cards/w/WarstormSurge.java @@ -47,7 +47,7 @@ class WarstormSurgeTriggeredAbility extends TriggeredAbilityImpl { super(Zone.BATTLEFIELD, new WarstormSurgeEffect(), false); } - public WarstormSurgeTriggeredAbility(WarstormSurgeTriggeredAbility ability) { + private WarstormSurgeTriggeredAbility(final WarstormSurgeTriggeredAbility ability) { super(ability); } @@ -87,7 +87,7 @@ class WarstormSurgeEffect extends OneShotEffect { staticText = "it deals damage equal to its power to any target"; } - public WarstormSurgeEffect(final WarstormSurgeEffect effect) { + private WarstormSurgeEffect(final WarstormSurgeEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WashOut.java b/Mage.Sets/src/mage/cards/w/WashOut.java index b0a3261c9da..0567ea8a7bb 100644 --- a/Mage.Sets/src/mage/cards/w/WashOut.java +++ b/Mage.Sets/src/mage/cards/w/WashOut.java @@ -49,7 +49,7 @@ class WashOutEffect extends OneShotEffect { staticText = "Return all permanents of the color of your choice to their owners' hands"; } - public WashOutEffect(final WashOutEffect effect) { + private WashOutEffect(final WashOutEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WasitoraNekoruQueen.java b/Mage.Sets/src/mage/cards/w/WasitoraNekoruQueen.java index a929993cf13..93433328965 100644 --- a/Mage.Sets/src/mage/cards/w/WasitoraNekoruQueen.java +++ b/Mage.Sets/src/mage/cards/w/WasitoraNekoruQueen.java @@ -64,7 +64,7 @@ class WasitoraNekoruQueenEffect extends OneShotEffect { staticText = "that player sacrifices a creature. If the player can't, you create a 3/3 black, red, and green Cat Dragon creature token with flying"; } - public WasitoraNekoruQueenEffect(final WasitoraNekoruQueenEffect effect) { + private WasitoraNekoruQueenEffect(final WasitoraNekoruQueenEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/Watchdog.java b/Mage.Sets/src/mage/cards/w/Watchdog.java index 677527204fe..311d1f2c90c 100644 --- a/Mage.Sets/src/mage/cards/w/Watchdog.java +++ b/Mage.Sets/src/mage/cards/w/Watchdog.java @@ -55,7 +55,7 @@ class WatchdogFilter extends FilterAttackingCreature { super("creatures attacking you"); } - public WatchdogFilter(final WatchdogFilter filter) { + private WatchdogFilter(final WatchdogFilter filter) { super(filter); } diff --git a/Mage.Sets/src/mage/cards/w/WatchersOfTheDead.java b/Mage.Sets/src/mage/cards/w/WatchersOfTheDead.java index 9a4586c9bf1..40eb16d14a4 100644 --- a/Mage.Sets/src/mage/cards/w/WatchersOfTheDead.java +++ b/Mage.Sets/src/mage/cards/w/WatchersOfTheDead.java @@ -54,7 +54,7 @@ class WatchersOfTheDeadEffect extends OneShotEffect { this.staticText = "Each opponent chooses 2 cards in their graveyard and exiles the rest"; } - public WatchersOfTheDeadEffect(final WatchersOfTheDeadEffect effect) { + private WatchersOfTheDeadEffect(final WatchersOfTheDeadEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/Watchwolf.java b/Mage.Sets/src/mage/cards/w/Watchwolf.java index fb5f058fdd7..9178b47fff9 100644 --- a/Mage.Sets/src/mage/cards/w/Watchwolf.java +++ b/Mage.Sets/src/mage/cards/w/Watchwolf.java @@ -24,7 +24,7 @@ public final class Watchwolf extends CardImpl { this.toughness = new MageInt(3); } - public Watchwolf (final Watchwolf card) { + private Watchwolf(final Watchwolf card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/w/WaveOfReckoning.java b/Mage.Sets/src/mage/cards/w/WaveOfReckoning.java index f45bc486d92..7f6e00252e4 100644 --- a/Mage.Sets/src/mage/cards/w/WaveOfReckoning.java +++ b/Mage.Sets/src/mage/cards/w/WaveOfReckoning.java @@ -43,7 +43,7 @@ class WaveOfReckoningDamageEffect extends OneShotEffect { staticText = "each creature deals damage to itself equal to its power"; } - public WaveOfReckoningDamageEffect(final WaveOfReckoningDamageEffect effect) { + private WaveOfReckoningDamageEffect(final WaveOfReckoningDamageEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WaveOfVitriol.java b/Mage.Sets/src/mage/cards/w/WaveOfVitriol.java index 219ae76705c..2837db73495 100644 --- a/Mage.Sets/src/mage/cards/w/WaveOfVitriol.java +++ b/Mage.Sets/src/mage/cards/w/WaveOfVitriol.java @@ -64,7 +64,7 @@ class WaveOfVitriolEffect extends OneShotEffect { this.staticText = "Each player sacrifices all artifacts, enchantments, and nonbasic lands they control. For each land sacrificed this way, its controller may search their library for a basic land card and put it onto the battlefield tapped. Then each player who searched their library this way shuffles"; } - public WaveOfVitriolEffect(final WaveOfVitriolEffect effect) { + private WaveOfVitriolEffect(final WaveOfVitriolEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WaveskimmerAven.java b/Mage.Sets/src/mage/cards/w/WaveskimmerAven.java index ebc1dd7e2c3..c81780e7384 100644 --- a/Mage.Sets/src/mage/cards/w/WaveskimmerAven.java +++ b/Mage.Sets/src/mage/cards/w/WaveskimmerAven.java @@ -29,7 +29,7 @@ public final class WaveskimmerAven extends CardImpl { this.addAbility(new ExaltedAbility()); } - public WaveskimmerAven (final WaveskimmerAven card) { + private WaveskimmerAven(final WaveskimmerAven card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/w/Waylay.java b/Mage.Sets/src/mage/cards/w/Waylay.java index 51d6d520fc4..25d9805c57e 100644 --- a/Mage.Sets/src/mage/cards/w/Waylay.java +++ b/Mage.Sets/src/mage/cards/w/Waylay.java @@ -49,7 +49,7 @@ class WaylayEffect extends OneShotEffect { this.staticText = "Create three 2/2 white Knight creature tokens. Exile them at the beginning of the next cleanup step."; } - public WaylayEffect(final WaylayEffect effect) { + private WaylayEffect(final WaylayEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WebOfInertia.java b/Mage.Sets/src/mage/cards/w/WebOfInertia.java index d0dd80430bc..9b2e8f62484 100644 --- a/Mage.Sets/src/mage/cards/w/WebOfInertia.java +++ b/Mage.Sets/src/mage/cards/w/WebOfInertia.java @@ -47,7 +47,7 @@ class WebOfInertiaEffect extends OneShotEffect { this.staticText = "that player may exile a card from their graveyard. If the player doesn't, creatures they control can't attack you this turn"; } - public WebOfInertiaEffect(final WebOfInertiaEffect effect) { + private WebOfInertiaEffect(final WebOfInertiaEffect effect) { super(effect); } @@ -87,7 +87,7 @@ class WebOfInertiaRestrictionEffect extends RestrictionEffect { this.attackerID = attackerID; } - public WebOfInertiaRestrictionEffect(final WebOfInertiaRestrictionEffect effect) { + private WebOfInertiaRestrictionEffect(final WebOfInertiaRestrictionEffect effect) { super(effect); this.attackerID = effect.attackerID; } diff --git a/Mage.Sets/src/mage/cards/w/WeedStrangle.java b/Mage.Sets/src/mage/cards/w/WeedStrangle.java index 3d2e7c43ce8..fa61008a4bd 100644 --- a/Mage.Sets/src/mage/cards/w/WeedStrangle.java +++ b/Mage.Sets/src/mage/cards/w/WeedStrangle.java @@ -47,7 +47,7 @@ class WeedStrangleEffect extends OneShotEffect { this.staticText = "Destroy target creature. Clash with an opponent. If you win, you gain life equal to that creature's toughness"; } - public WeedStrangleEffect(final WeedStrangleEffect effect) { + private WeedStrangleEffect(final WeedStrangleEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WeirdHarvest.java b/Mage.Sets/src/mage/cards/w/WeirdHarvest.java index 7ff1551ccbe..c3eff7e4acc 100644 --- a/Mage.Sets/src/mage/cards/w/WeirdHarvest.java +++ b/Mage.Sets/src/mage/cards/w/WeirdHarvest.java @@ -48,7 +48,7 @@ class WeirdHarvestEffect extends OneShotEffect { this.staticText = "each player may search their library for up to X creature cards, reveal those cards, put them into their hand, then shuffle"; } - public WeirdHarvestEffect(final WeirdHarvestEffect effect) { + private WeirdHarvestEffect(final WeirdHarvestEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WeldingJar.java b/Mage.Sets/src/mage/cards/w/WeldingJar.java index f23178381b8..24afa2530f3 100644 --- a/Mage.Sets/src/mage/cards/w/WeldingJar.java +++ b/Mage.Sets/src/mage/cards/w/WeldingJar.java @@ -26,7 +26,7 @@ public final class WeldingJar extends CardImpl { this.addAbility(ability); } - public WeldingJar (final WeldingJar card) { + private WeldingJar(final WeldingJar card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/w/WelkinTern.java b/Mage.Sets/src/mage/cards/w/WelkinTern.java index 122dff35b7e..050912c81ad 100644 --- a/Mage.Sets/src/mage/cards/w/WelkinTern.java +++ b/Mage.Sets/src/mage/cards/w/WelkinTern.java @@ -29,7 +29,7 @@ public final class WelkinTern extends CardImpl { this.addAbility(new CanBlockOnlyFlyingAbility()); } - public WelkinTern (final WelkinTern card) { + private WelkinTern(final WelkinTern card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/w/WellLaidPlans.java b/Mage.Sets/src/mage/cards/w/WellLaidPlans.java index 49272aa539f..c7cad59d9f5 100644 --- a/Mage.Sets/src/mage/cards/w/WellLaidPlans.java +++ b/Mage.Sets/src/mage/cards/w/WellLaidPlans.java @@ -44,7 +44,7 @@ class WellLaidPlansPreventionEffect extends PreventionEffectImpl { this.staticText = "Prevent all damage that would be dealt to a creature by another creature if they share a color"; } - public WellLaidPlansPreventionEffect(final WellLaidPlansPreventionEffect effect) { + private WellLaidPlansPreventionEffect(final WellLaidPlansPreventionEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WellOfKnowledge.java b/Mage.Sets/src/mage/cards/w/WellOfKnowledge.java index 2b2e9334c78..a371089fbf8 100644 --- a/Mage.Sets/src/mage/cards/w/WellOfKnowledge.java +++ b/Mage.Sets/src/mage/cards/w/WellOfKnowledge.java @@ -44,7 +44,7 @@ class WellOfKnowledgeConditionalActivatedAbility extends ActivatedAbilityImpl { condition = new IsStepCondition(PhaseStep.DRAW, false); } - public WellOfKnowledgeConditionalActivatedAbility(final WellOfKnowledgeConditionalActivatedAbility ability) { + private WellOfKnowledgeConditionalActivatedAbility(final WellOfKnowledgeConditionalActivatedAbility ability) { super(ability); this.condition = ability.condition; } @@ -86,7 +86,7 @@ class WellOfKnowledgeEffect extends OneShotEffect { super(Outcome.DrawCard); } - public WellOfKnowledgeEffect(final WellOfKnowledgeEffect effect) { + private WellOfKnowledgeEffect(final WellOfKnowledgeEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WellOfLostDreams.java b/Mage.Sets/src/mage/cards/w/WellOfLostDreams.java index f9abd993752..ea1e5d5b023 100644 --- a/Mage.Sets/src/mage/cards/w/WellOfLostDreams.java +++ b/Mage.Sets/src/mage/cards/w/WellOfLostDreams.java @@ -43,7 +43,7 @@ class WellOfLostDreamsEffect extends OneShotEffect { this.staticText = "you may pay {X}, where X is less than or equal to the amount of life you gained. If you do, draw X cards"; } - public WellOfLostDreamsEffect(final WellOfLostDreamsEffect effect) { + private WellOfLostDreamsEffect(final WellOfLostDreamsEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WheelOfSunAndMoon.java b/Mage.Sets/src/mage/cards/w/WheelOfSunAndMoon.java index 20c738d718b..7394a6238d4 100644 --- a/Mage.Sets/src/mage/cards/w/WheelOfSunAndMoon.java +++ b/Mage.Sets/src/mage/cards/w/WheelOfSunAndMoon.java @@ -63,7 +63,7 @@ class WheelOfSunAndMoonEffect extends ReplacementEffectImpl { staticText = "If a card would be put into enchanted player's graveyard from anywhere, instead that card is revealed and put on the bottom of that player's library"; } - public WheelOfSunAndMoonEffect(final WheelOfSunAndMoonEffect effect) { + private WheelOfSunAndMoonEffect(final WheelOfSunAndMoonEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WhenFluffyBunniesAttack.java b/Mage.Sets/src/mage/cards/w/WhenFluffyBunniesAttack.java index 94c2bb74bbd..7e77f08df07 100644 --- a/Mage.Sets/src/mage/cards/w/WhenFluffyBunniesAttack.java +++ b/Mage.Sets/src/mage/cards/w/WhenFluffyBunniesAttack.java @@ -52,7 +52,7 @@ class WhenFluffyBunniesAttackEffect extends OneShotEffect { staticText = "Target creature gets -X/-X until end of turn, where X is the number of times the letter of your choice appears in that creature's name"; } - public WhenFluffyBunniesAttackEffect(final WhenFluffyBunniesAttackEffect effect) { + private WhenFluffyBunniesAttackEffect(final WhenFluffyBunniesAttackEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WhimsOfTheFates.java b/Mage.Sets/src/mage/cards/w/WhimsOfTheFates.java index d90bd674863..cc25e7a3703 100644 --- a/Mage.Sets/src/mage/cards/w/WhimsOfTheFates.java +++ b/Mage.Sets/src/mage/cards/w/WhimsOfTheFates.java @@ -50,7 +50,7 @@ class WhimsOfTheFateEffect extends OneShotEffect { this.staticText = "Starting with you, each player separates all permanents they control into three piles. Then each player chooses one of their piles at random and sacrifices those permanents."; } - public WhimsOfTheFateEffect(final WhimsOfTheFateEffect effect) { + private WhimsOfTheFateEffect(final WhimsOfTheFateEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/Whipkeeper.java b/Mage.Sets/src/mage/cards/w/Whipkeeper.java index b13c0848985..76b4183ff21 100644 --- a/Mage.Sets/src/mage/cards/w/Whipkeeper.java +++ b/Mage.Sets/src/mage/cards/w/Whipkeeper.java @@ -53,7 +53,7 @@ class WhipkeeperEffect extends OneShotEffect { super(Outcome.Damage); staticText = "{this} deals damage to target creature equal to the damage already dealt to it this turn."; } - public WhipkeeperEffect(final WhipkeeperEffect effect) { + private WhipkeeperEffect(final WhipkeeperEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WhiptongueHydra.java b/Mage.Sets/src/mage/cards/w/WhiptongueHydra.java index 5a60b9c7838..6eba508e3e5 100644 --- a/Mage.Sets/src/mage/cards/w/WhiptongueHydra.java +++ b/Mage.Sets/src/mage/cards/w/WhiptongueHydra.java @@ -63,7 +63,7 @@ class WhiptongueHydraEffect extends OneShotEffect { + "Put a +1/+1 counter on {this} for each creature destroyed this way"; } - public WhiptongueHydraEffect(final WhiptongueHydraEffect effect) { + private WhiptongueHydraEffect(final WhiptongueHydraEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WhirlpoolWarrior.java b/Mage.Sets/src/mage/cards/w/WhirlpoolWarrior.java index 3e7adde49ea..84f41b3a6cf 100644 --- a/Mage.Sets/src/mage/cards/w/WhirlpoolWarrior.java +++ b/Mage.Sets/src/mage/cards/w/WhirlpoolWarrior.java @@ -62,7 +62,7 @@ class WhirlpoolWarriorActivatedEffect extends OneShotEffect { this.staticText = "Each player shuffles the cards from their hand into their library, then draws that many cards"; } - public WhirlpoolWarriorActivatedEffect(final WhirlpoolWarriorActivatedEffect effect) { + private WhirlpoolWarriorActivatedEffect(final WhirlpoolWarriorActivatedEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WhirlpoolWhelm.java b/Mage.Sets/src/mage/cards/w/WhirlpoolWhelm.java index c67ab70363a..ab3882673d7 100644 --- a/Mage.Sets/src/mage/cards/w/WhirlpoolWhelm.java +++ b/Mage.Sets/src/mage/cards/w/WhirlpoolWhelm.java @@ -46,7 +46,7 @@ class WhirlpoolWhelmEffect extends OneShotEffect { this.staticText = "Clash with an opponent, then return target creature to its owner's hand. If you win, you may put that creature on top of its owner's library instead"; } - public WhirlpoolWhelmEffect(final WhirlpoolWhelmEffect effect) { + private WhirlpoolWhelmEffect(final WhirlpoolWhelmEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WhisperingSnitch.java b/Mage.Sets/src/mage/cards/w/WhisperingSnitch.java index 20ac53b435e..78e282bd068 100644 --- a/Mage.Sets/src/mage/cards/w/WhisperingSnitch.java +++ b/Mage.Sets/src/mage/cards/w/WhisperingSnitch.java @@ -54,7 +54,7 @@ class WhisperingSnitchTriggeredAbility extends TriggeredAbilityImpl { this.addWatcher(new WhisperingSnitchWatcher()); } - public WhisperingSnitchTriggeredAbility(final WhisperingSnitchTriggeredAbility ability) { + private WhisperingSnitchTriggeredAbility(final WhisperingSnitchTriggeredAbility ability) { super(ability); } diff --git a/Mage.Sets/src/mage/cards/w/WhiteSunsZenith.java b/Mage.Sets/src/mage/cards/w/WhiteSunsZenith.java index 9619e086d9c..799950a54a5 100644 --- a/Mage.Sets/src/mage/cards/w/WhiteSunsZenith.java +++ b/Mage.Sets/src/mage/cards/w/WhiteSunsZenith.java @@ -24,7 +24,7 @@ public final class WhiteSunsZenith extends CardImpl { this.getSpellAbility().addEffect(ShuffleSpellEffect.getInstance()); } - public WhiteSunsZenith (final WhiteSunsZenith card) { + private WhiteSunsZenith(final WhiteSunsZenith card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/w/WhitesunsPassage.java b/Mage.Sets/src/mage/cards/w/WhitesunsPassage.java index 583a9f428cf..5bfda51d15a 100644 --- a/Mage.Sets/src/mage/cards/w/WhitesunsPassage.java +++ b/Mage.Sets/src/mage/cards/w/WhitesunsPassage.java @@ -20,7 +20,7 @@ public final class WhitesunsPassage extends CardImpl { this.getSpellAbility().addEffect(new GainLifeEffect(5)); } - public WhitesunsPassage (final WhitesunsPassage card) { + private WhitesunsPassage(final WhitesunsPassage card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/w/WickedReward.java b/Mage.Sets/src/mage/cards/w/WickedReward.java index 90fee8428d8..7b1e4091d4e 100644 --- a/Mage.Sets/src/mage/cards/w/WickedReward.java +++ b/Mage.Sets/src/mage/cards/w/WickedReward.java @@ -24,7 +24,7 @@ public final class WickedReward extends CardImpl { this.getSpellAbility().addTarget(new TargetCreaturePermanent()); } - public WickedReward(WickedReward other) { + private WickedReward(final WickedReward other) { super(other); } diff --git a/Mage.Sets/src/mage/cards/w/WidespreadPanic.java b/Mage.Sets/src/mage/cards/w/WidespreadPanic.java index 925e1f26d9a..43641bf6f58 100644 --- a/Mage.Sets/src/mage/cards/w/WidespreadPanic.java +++ b/Mage.Sets/src/mage/cards/w/WidespreadPanic.java @@ -48,7 +48,7 @@ class WidespreadPanicTriggeredAbility extends TriggeredAbilityImpl { setTriggerPhrase("Whenever a spell or ability causes its controller to shuffle their library, "); } - public WidespreadPanicTriggeredAbility(final WidespreadPanicTriggeredAbility ability) { + private WidespreadPanicTriggeredAbility(final WidespreadPanicTriggeredAbility ability) { super(ability); } @@ -82,7 +82,7 @@ class WidespreadPanicEffect extends OneShotEffect { this.staticText = "that player puts a card from their hand on top of their library"; } - public WidespreadPanicEffect(final WidespreadPanicEffect effect) { + private WidespreadPanicEffect(final WidespreadPanicEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WildDefiance.java b/Mage.Sets/src/mage/cards/w/WildDefiance.java index 472b3a60e16..ee74a5bba37 100644 --- a/Mage.Sets/src/mage/cards/w/WildDefiance.java +++ b/Mage.Sets/src/mage/cards/w/WildDefiance.java @@ -45,7 +45,7 @@ class CreaturesYouControlBecomesTargetTriggeredAbility extends TriggeredAbilityI super(Zone.BATTLEFIELD, effect); } - public CreaturesYouControlBecomesTargetTriggeredAbility(final CreaturesYouControlBecomesTargetTriggeredAbility ability) { + private CreaturesYouControlBecomesTargetTriggeredAbility(final CreaturesYouControlBecomesTargetTriggeredAbility ability) { super(ability); } diff --git a/Mage.Sets/src/mage/cards/w/WildDogs.java b/Mage.Sets/src/mage/cards/w/WildDogs.java index fa40fdf7c85..2521fb0fcdd 100644 --- a/Mage.Sets/src/mage/cards/w/WildDogs.java +++ b/Mage.Sets/src/mage/cards/w/WildDogs.java @@ -58,7 +58,7 @@ class WildDogsEffect extends OneShotEffect { this.staticText = "the player with the most life gains control of {this}"; } - public WildDogsEffect(final WildDogsEffect effect) { + private WildDogsEffect(final WildDogsEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WildEvocation.java b/Mage.Sets/src/mage/cards/w/WildEvocation.java index f774f0a2cb7..5a3d001a8eb 100644 --- a/Mage.Sets/src/mage/cards/w/WildEvocation.java +++ b/Mage.Sets/src/mage/cards/w/WildEvocation.java @@ -55,7 +55,7 @@ class WildEvocationEffect extends OneShotEffect { + "Otherwise, the player casts it without paying its mana cost if able"; } - public WildEvocationEffect(final WildEvocationEffect effect) { + private WildEvocationEffect(final WildEvocationEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WildMagicSorcerer.java b/Mage.Sets/src/mage/cards/w/WildMagicSorcerer.java index fef3851fe43..897b3af4b51 100644 --- a/Mage.Sets/src/mage/cards/w/WildMagicSorcerer.java +++ b/Mage.Sets/src/mage/cards/w/WildMagicSorcerer.java @@ -58,7 +58,7 @@ class WildMagicSorcererGainCascadeFirstSpellCastFromExileEffect extends Continuo staticText = "The first spell you cast from exile each turn has cascade"; } - public WildMagicSorcererGainCascadeFirstSpellCastFromExileEffect(final WildMagicSorcererGainCascadeFirstSpellCastFromExileEffect effect) { + private WildMagicSorcererGainCascadeFirstSpellCastFromExileEffect(final WildMagicSorcererGainCascadeFirstSpellCastFromExileEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WildMammoth.java b/Mage.Sets/src/mage/cards/w/WildMammoth.java index e50b9e4f2d4..a5bb2fb734c 100644 --- a/Mage.Sets/src/mage/cards/w/WildMammoth.java +++ b/Mage.Sets/src/mage/cards/w/WildMammoth.java @@ -54,7 +54,7 @@ class WildMammothEffect extends OneShotEffect { this.staticText = "if a player controls more creatures than each other player, the player who controls the most creatures gains control of {this}"; } - public WildMammothEffect(final WildMammothEffect effect) { + private WildMammothEffect(final WildMammothEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WildPair.java b/Mage.Sets/src/mage/cards/w/WildPair.java index fbe2263c8d5..ad26d2b1d48 100644 --- a/Mage.Sets/src/mage/cards/w/WildPair.java +++ b/Mage.Sets/src/mage/cards/w/WildPair.java @@ -63,7 +63,7 @@ class WildPairEffect extends OneShotEffect { this.staticText = "search your library for a creature card with the same total power and toughness and put it onto the battlefield"; } - public WildPairEffect(final WildPairEffect effect) { + private WildPairEffect(final WildPairEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WildSwing.java b/Mage.Sets/src/mage/cards/w/WildSwing.java index f8cfa65e42d..98c3d2abb38 100644 --- a/Mage.Sets/src/mage/cards/w/WildSwing.java +++ b/Mage.Sets/src/mage/cards/w/WildSwing.java @@ -55,7 +55,7 @@ class WildSwingEffect extends OneShotEffect { this.staticText = "Choose three target nonenchantment permanents. Destroy one of them at random"; } - public WildSwingEffect(final WildSwingEffect effect) { + private WildSwingEffect(final WildSwingEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WildWurm.java b/Mage.Sets/src/mage/cards/w/WildWurm.java index 73fe1bd50a3..4659cc7dc6b 100644 --- a/Mage.Sets/src/mage/cards/w/WildWurm.java +++ b/Mage.Sets/src/mage/cards/w/WildWurm.java @@ -49,7 +49,7 @@ class WildWurmEffect extends OneShotEffect { staticText = "flip a coin. If you lose the flip, return {this} to its owner's hand"; } - public WildWurmEffect(WildWurmEffect effect) { + private WildWurmEffect(final WildWurmEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/Wildcall.java b/Mage.Sets/src/mage/cards/w/Wildcall.java index fa1f1feb4d3..26a11c87b5f 100644 --- a/Mage.Sets/src/mage/cards/w/Wildcall.java +++ b/Mage.Sets/src/mage/cards/w/Wildcall.java @@ -48,7 +48,7 @@ class WildcallEffect extends OneShotEffect { this.staticText = "Manifest the top card of your library, then put X +1/+1 counters on it"; } - public WildcallEffect(final WildcallEffect effect) { + private WildcallEffect(final WildcallEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WildfieldBorderpost.java b/Mage.Sets/src/mage/cards/w/WildfieldBorderpost.java index a23d635079a..8cd606aab4c 100644 --- a/Mage.Sets/src/mage/cards/w/WildfieldBorderpost.java +++ b/Mage.Sets/src/mage/cards/w/WildfieldBorderpost.java @@ -48,7 +48,7 @@ public final class WildfieldBorderpost extends CardImpl { this.addAbility(new WhiteManaAbility()); } - public WildfieldBorderpost (final WildfieldBorderpost card) { + private WildfieldBorderpost(final WildfieldBorderpost card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/w/WildwoodEscort.java b/Mage.Sets/src/mage/cards/w/WildwoodEscort.java index 6b768baee22..822012843a6 100644 --- a/Mage.Sets/src/mage/cards/w/WildwoodEscort.java +++ b/Mage.Sets/src/mage/cards/w/WildwoodEscort.java @@ -66,7 +66,7 @@ class WildwoodEscortEffect extends ReplacementEffectImpl { staticText = "if {this} would die, exile it instead"; } - public WildwoodEscortEffect(final WildwoodEscortEffect effect) { + private WildwoodEscortEffect(final WildwoodEscortEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WillingTestSubject.java b/Mage.Sets/src/mage/cards/w/WillingTestSubject.java index ee4127a083e..1913a8e8334 100644 --- a/Mage.Sets/src/mage/cards/w/WillingTestSubject.java +++ b/Mage.Sets/src/mage/cards/w/WillingTestSubject.java @@ -62,7 +62,7 @@ class WillingTestSubjectTriggeredAbility extends TriggeredAbilityImpl { super(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance())); } - public WillingTestSubjectTriggeredAbility(final WillingTestSubjectTriggeredAbility ability) { + private WillingTestSubjectTriggeredAbility(final WillingTestSubjectTriggeredAbility ability) { super(ability); } diff --git a/Mage.Sets/src/mage/cards/w/WindZendikon.java b/Mage.Sets/src/mage/cards/w/WindZendikon.java index af39a9fbe55..57ac77d6a60 100644 --- a/Mage.Sets/src/mage/cards/w/WindZendikon.java +++ b/Mage.Sets/src/mage/cards/w/WindZendikon.java @@ -67,7 +67,7 @@ public final class WindZendikon extends CardImpl { toughness = new MageInt(2); addAbility(FlyingAbility.getInstance()); } - public WindZendikonElementalToken(final WindZendikonElementalToken token) { + private WindZendikonElementalToken(final WindZendikonElementalToken token) { super(token); } diff --git a/Mage.Sets/src/mage/cards/w/WindreaderSphinx.java b/Mage.Sets/src/mage/cards/w/WindreaderSphinx.java index ceef278b6d6..8dc2ed82249 100644 --- a/Mage.Sets/src/mage/cards/w/WindreaderSphinx.java +++ b/Mage.Sets/src/mage/cards/w/WindreaderSphinx.java @@ -59,7 +59,7 @@ class WindreaderSphinxTriggeredAbility extends TriggeredAbilityImpl { setTriggerPhrase("Whenever a creature with flying attacks, "); } - public WindreaderSphinxTriggeredAbility(final WindreaderSphinxTriggeredAbility ability) { + private WindreaderSphinxTriggeredAbility(final WindreaderSphinxTriggeredAbility ability) { super(ability); } diff --git a/Mage.Sets/src/mage/cards/w/WindriderEel.java b/Mage.Sets/src/mage/cards/w/WindriderEel.java index 48449852ce0..f9fecd59f3a 100644 --- a/Mage.Sets/src/mage/cards/w/WindriderEel.java +++ b/Mage.Sets/src/mage/cards/w/WindriderEel.java @@ -29,7 +29,7 @@ public final class WindriderEel extends CardImpl { this.addAbility(new LandfallAbility(new BoostSourceEffect(2, 2, Duration.EndOfTurn), false)); } - public WindriderEel (final WindriderEel card) { + private WindriderEel(final WindriderEel card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/w/WindsOfChange.java b/Mage.Sets/src/mage/cards/w/WindsOfChange.java index fc316862e1f..9424ea4a6e5 100644 --- a/Mage.Sets/src/mage/cards/w/WindsOfChange.java +++ b/Mage.Sets/src/mage/cards/w/WindsOfChange.java @@ -44,7 +44,7 @@ class WindsOfChangeEffect extends OneShotEffect { this.staticText = "Each player shuffles the cards from their hand into their library, then draws that many cards"; } - public WindsOfChangeEffect(final WindsOfChangeEffect effect) { + private WindsOfChangeEffect(final WindsOfChangeEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WingPuncture.java b/Mage.Sets/src/mage/cards/w/WingPuncture.java index ec9c649b64d..57ac9739ee4 100644 --- a/Mage.Sets/src/mage/cards/w/WingPuncture.java +++ b/Mage.Sets/src/mage/cards/w/WingPuncture.java @@ -55,7 +55,7 @@ class WingPunctureEffect extends OneShotEffect { staticText = "Target creature you control deals damage equal to its power to target creature with flying"; } - public WingPunctureEffect(final WingPunctureEffect effect) { + private WingPunctureEffect(final WingPunctureEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WingStorm.java b/Mage.Sets/src/mage/cards/w/WingStorm.java index 02d1636d468..a279b6a37fe 100644 --- a/Mage.Sets/src/mage/cards/w/WingStorm.java +++ b/Mage.Sets/src/mage/cards/w/WingStorm.java @@ -49,7 +49,7 @@ class WingStormEffect extends OneShotEffect { this.staticText = "{this} deals damage to each player equal to twice the number of creatures with flying that player controls"; } - public WingStormEffect(final WingStormEffect effect) { + private WingStormEffect(final WingStormEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WingedCoatl.java b/Mage.Sets/src/mage/cards/w/WingedCoatl.java index d35fd972990..8a7bb311ca0 100644 --- a/Mage.Sets/src/mage/cards/w/WingedCoatl.java +++ b/Mage.Sets/src/mage/cards/w/WingedCoatl.java @@ -30,7 +30,7 @@ public final class WingedCoatl extends CardImpl { this.addAbility(DeathtouchAbility.getInstance()); } - public WingedCoatl (final WingedCoatl card) { + private WingedCoatl(final WingedCoatl card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/w/WingedTempleOfOrazca.java b/Mage.Sets/src/mage/cards/w/WingedTempleOfOrazca.java index 9305624f8b2..9b581a85922 100644 --- a/Mage.Sets/src/mage/cards/w/WingedTempleOfOrazca.java +++ b/Mage.Sets/src/mage/cards/w/WingedTempleOfOrazca.java @@ -68,7 +68,7 @@ class WingedTempleOfOrazcaEffect extends OneShotEffect { this.staticText = "target creature you control gains flying and gets +X/+X until end of turn, where X is its power"; } - public WingedTempleOfOrazcaEffect(final WingedTempleOfOrazcaEffect effect) { + private WingedTempleOfOrazcaEffect(final WingedTempleOfOrazcaEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WingsOfHubris.java b/Mage.Sets/src/mage/cards/w/WingsOfHubris.java index ba20b051359..150536dd2ec 100644 --- a/Mage.Sets/src/mage/cards/w/WingsOfHubris.java +++ b/Mage.Sets/src/mage/cards/w/WingsOfHubris.java @@ -66,7 +66,7 @@ class WingsOfHubrisEffect extends OneShotEffect { this.staticText = "Equipped creature can't be blocked this turn. Sacrifice it at the beginning of the next end step"; } - public WingsOfHubrisEffect(final WingsOfHubrisEffect effect) { + private WingsOfHubrisEffect(final WingsOfHubrisEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/Winnow.java b/Mage.Sets/src/mage/cards/w/Winnow.java index 96fc6ba6507..4699d5f25da 100644 --- a/Mage.Sets/src/mage/cards/w/Winnow.java +++ b/Mage.Sets/src/mage/cards/w/Winnow.java @@ -48,7 +48,7 @@ class WinnowEffect extends DestroyTargetEffect { staticText = "Destroy target nonland permanent if another permanent with the same name is on the battlefield"; } - public WinnowEffect(final WinnowEffect effect) { + private WinnowEffect(final WinnowEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WinterOrb.java b/Mage.Sets/src/mage/cards/w/WinterOrb.java index cfc88d1cd6e..d9a4d766a2c 100644 --- a/Mage.Sets/src/mage/cards/w/WinterOrb.java +++ b/Mage.Sets/src/mage/cards/w/WinterOrb.java @@ -50,7 +50,7 @@ class WinterOrbEffect extends RestrictionUntapNotMoreThanEffect { staticText = "As long as Winter Orb is untapped, players can't untap more than one land during their untap steps"; } - public WinterOrbEffect(final WinterOrbEffect effect) { + private WinterOrbEffect(final WinterOrbEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WinterSky.java b/Mage.Sets/src/mage/cards/w/WinterSky.java index 788391f9e14..72044a5687d 100644 --- a/Mage.Sets/src/mage/cards/w/WinterSky.java +++ b/Mage.Sets/src/mage/cards/w/WinterSky.java @@ -43,7 +43,7 @@ class WinterSkyEffect extends OneShotEffect { staticText = "Flip a coin. If you win the flip, {this} deals 1 damage to each creature and each player. If you lose the flip, each player draws a card"; } - public WinterSkyEffect(WinterSkyEffect effect) { + private WinterSkyEffect(final WinterSkyEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WireSurgeons.java b/Mage.Sets/src/mage/cards/w/WireSurgeons.java index c73da5bd007..c067b2d351d 100644 --- a/Mage.Sets/src/mage/cards/w/WireSurgeons.java +++ b/Mage.Sets/src/mage/cards/w/WireSurgeons.java @@ -58,7 +58,7 @@ class WireSurgeonsEffect extends ContinuousEffectImpl { "Its encore cost is equal to its mana cost."; } - public WireSurgeonsEffect(final WireSurgeonsEffect effect) { + private WireSurgeonsEffect(final WireSurgeonsEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/Wirecat.java b/Mage.Sets/src/mage/cards/w/Wirecat.java index 41e2d4317ea..de63dd23ed0 100644 --- a/Mage.Sets/src/mage/cards/w/Wirecat.java +++ b/Mage.Sets/src/mage/cards/w/Wirecat.java @@ -47,7 +47,7 @@ public final class Wirecat extends CardImpl { staticText = "{this} can't attack or block if an enchantment is on the battlefield"; } - public WirecatEffect(final WirecatEffect effect) { + private WirecatEffect(final WirecatEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WishfulMerfolk.java b/Mage.Sets/src/mage/cards/w/WishfulMerfolk.java index 3c6d34502d1..2e99467004a 100644 --- a/Mage.Sets/src/mage/cards/w/WishfulMerfolk.java +++ b/Mage.Sets/src/mage/cards/w/WishfulMerfolk.java @@ -51,7 +51,7 @@ class WishfulMerfolkEffect extends ContinuousEffectImpl { staticText = "{this} loses defender and becomes a Human until end of turn"; } - public WishfulMerfolkEffect(final WishfulMerfolkEffect effect) { + private WishfulMerfolkEffect(final WishfulMerfolkEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/Wishmonger.java b/Mage.Sets/src/mage/cards/w/Wishmonger.java index e0c85ebb808..74667930a0c 100644 --- a/Mage.Sets/src/mage/cards/w/Wishmonger.java +++ b/Mage.Sets/src/mage/cards/w/Wishmonger.java @@ -69,7 +69,7 @@ class WishmongerEffect extends OneShotEffect { staticText = "Target creature gains protection from the color of its controller's choice until end of turn"; } - public WishmongerEffect(final WishmongerEffect effect) { + private WishmongerEffect(final WishmongerEffect effect) { super(effect); } @@ -112,7 +112,7 @@ class ProtectionChosenColorTargetEffect extends ContinuousEffectImpl { super(Duration.EndOfTurn, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.AddAbility); } - public ProtectionChosenColorTargetEffect(final ProtectionChosenColorTargetEffect effect) { + private ProtectionChosenColorTargetEffect(final ProtectionChosenColorTargetEffect effect) { super(effect); if (effect.chosenColor != null) { this.chosenColor = effect.chosenColor.copy(); diff --git a/Mage.Sets/src/mage/cards/w/WistfulSelkie.java b/Mage.Sets/src/mage/cards/w/WistfulSelkie.java index 8e056f17505..b62373bece8 100644 --- a/Mage.Sets/src/mage/cards/w/WistfulSelkie.java +++ b/Mage.Sets/src/mage/cards/w/WistfulSelkie.java @@ -28,7 +28,7 @@ public final class WistfulSelkie extends CardImpl { this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1))); } - public WistfulSelkie (final WistfulSelkie card) { + private WistfulSelkie(final WistfulSelkie card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/w/WitchEngine.java b/Mage.Sets/src/mage/cards/w/WitchEngine.java index 4a1efef9304..767d722d95b 100644 --- a/Mage.Sets/src/mage/cards/w/WitchEngine.java +++ b/Mage.Sets/src/mage/cards/w/WitchEngine.java @@ -62,7 +62,7 @@ class WitchEngineEffect extends ContinuousEffectImpl { staticText = "target opponent gains control of {this}"; } - public WitchEngineEffect(final WitchEngineEffect effect) { + private WitchEngineEffect(final WitchEngineEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WitchHunt.java b/Mage.Sets/src/mage/cards/w/WitchHunt.java index f8422aae6c8..8691c3fb1f5 100644 --- a/Mage.Sets/src/mage/cards/w/WitchHunt.java +++ b/Mage.Sets/src/mage/cards/w/WitchHunt.java @@ -61,7 +61,7 @@ class WitchHuntEffect extends ContinuousEffectImpl { staticText = "target opponent chosen at random gains control of {this}"; } - public WitchHuntEffect(final WitchHuntEffect effect) { + private WitchHuntEffect(final WitchHuntEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WitchMawNephilim.java b/Mage.Sets/src/mage/cards/w/WitchMawNephilim.java index 8a5dea425a9..a88419c2949 100644 --- a/Mage.Sets/src/mage/cards/w/WitchMawNephilim.java +++ b/Mage.Sets/src/mage/cards/w/WitchMawNephilim.java @@ -56,7 +56,7 @@ class WitchMawNephilimEffect extends OneShotEffect { this.staticText = "it gains trample until end of turn if its power is 10 or greater"; } - public WitchMawNephilimEffect(final WitchMawNephilimEffect effect) { + private WitchMawNephilimEffect(final WitchMawNephilimEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WitchbaneOrb.java b/Mage.Sets/src/mage/cards/w/WitchbaneOrb.java index 2e1b2bfab81..44a4747fe04 100644 --- a/Mage.Sets/src/mage/cards/w/WitchbaneOrb.java +++ b/Mage.Sets/src/mage/cards/w/WitchbaneOrb.java @@ -55,7 +55,7 @@ class WitchbaneOrbEffect extends OneShotEffect { staticText = "destroy all Curses attached to you"; } - public WitchbaneOrbEffect(final WitchbaneOrbEffect effect) { + private WitchbaneOrbEffect(final WitchbaneOrbEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/Witchstalker.java b/Mage.Sets/src/mage/cards/w/Witchstalker.java index 3328d3e74fd..0e0cfdb9f10 100644 --- a/Mage.Sets/src/mage/cards/w/Witchstalker.java +++ b/Mage.Sets/src/mage/cards/w/Witchstalker.java @@ -63,7 +63,7 @@ class WitchstalkerTriggeredAbility extends TriggeredAbilityImpl { super(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false); } - public WitchstalkerTriggeredAbility(final WitchstalkerTriggeredAbility ability) { + private WitchstalkerTriggeredAbility(final WitchstalkerTriggeredAbility ability) { super(ability); } diff --git a/Mage.Sets/src/mage/cards/w/WithengarUnbound.java b/Mage.Sets/src/mage/cards/w/WithengarUnbound.java index 39e5370be0a..dfc2c30b8de 100644 --- a/Mage.Sets/src/mage/cards/w/WithengarUnbound.java +++ b/Mage.Sets/src/mage/cards/w/WithengarUnbound.java @@ -60,7 +60,7 @@ class WithengarUnboundTriggeredAbility extends TriggeredAbilityImpl { super(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance(13)), false); } - public WithengarUnboundTriggeredAbility(final WithengarUnboundTriggeredAbility ability) { + private WithengarUnboundTriggeredAbility(final WithengarUnboundTriggeredAbility ability) { super(ability); } diff --git a/Mage.Sets/src/mage/cards/w/WitheringGaze.java b/Mage.Sets/src/mage/cards/w/WitheringGaze.java index b62f68f95d6..69e63bac1bd 100644 --- a/Mage.Sets/src/mage/cards/w/WitheringGaze.java +++ b/Mage.Sets/src/mage/cards/w/WitheringGaze.java @@ -76,7 +76,7 @@ class WitheringGazeEffect extends OneShotEffect { return false; } - public WitheringGazeEffect(final WitheringGazeEffect effect) { + private WitheringGazeEffect(final WitheringGazeEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WitheringWisps.java b/Mage.Sets/src/mage/cards/w/WitheringWisps.java index a0cad332c39..ec0ef84406a 100644 --- a/Mage.Sets/src/mage/cards/w/WitheringWisps.java +++ b/Mage.Sets/src/mage/cards/w/WitheringWisps.java @@ -70,7 +70,7 @@ class WitheringWispsActivatedAbility extends ActivatedAbilityImpl { } - public WitheringWispsActivatedAbility(final WitheringWispsActivatedAbility ability) { + private WitheringWispsActivatedAbility(final WitheringWispsActivatedAbility ability) { super(ability); } diff --git a/Mage.Sets/src/mage/cards/w/WoebringerDemon.java b/Mage.Sets/src/mage/cards/w/WoebringerDemon.java index 16a418ac65e..81584563723 100644 --- a/Mage.Sets/src/mage/cards/w/WoebringerDemon.java +++ b/Mage.Sets/src/mage/cards/w/WoebringerDemon.java @@ -58,7 +58,7 @@ class WoebringerDemonEffect extends OneShotEffect { this.staticText = "that player sacrifices a creature. If the player can't, sacrifice {this}"; } - public WoebringerDemonEffect(final WoebringerDemonEffect effect) { + private WoebringerDemonEffect(final WoebringerDemonEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WojekApothecary.java b/Mage.Sets/src/mage/cards/w/WojekApothecary.java index a02e2e48d07..b4b6d8a139d 100644 --- a/Mage.Sets/src/mage/cards/w/WojekApothecary.java +++ b/Mage.Sets/src/mage/cards/w/WojekApothecary.java @@ -64,7 +64,7 @@ class WojekApothecaryEffect extends OneShotEffect { this.staticText = "Prevent the next 1 damage that would be dealt to target creature and each other creature that shares a color with it this turn"; } - public WojekApothecaryEffect(final WojekApothecaryEffect effect) { + private WojekApothecaryEffect(final WojekApothecaryEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WojekSiren.java b/Mage.Sets/src/mage/cards/w/WojekSiren.java index 7b12d852118..fd6bf01af71 100644 --- a/Mage.Sets/src/mage/cards/w/WojekSiren.java +++ b/Mage.Sets/src/mage/cards/w/WojekSiren.java @@ -46,7 +46,7 @@ class WojekSirenBoostEffect extends ContinuousEffectImpl { staticText = "Target creature and each other creature that shares a color with it get +1/+1 until end of turn"; } - public WojekSirenBoostEffect(final WojekSirenBoostEffect effect) { + private WojekSirenBoostEffect(final WojekSirenBoostEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WolfcallersHowl.java b/Mage.Sets/src/mage/cards/w/WolfcallersHowl.java index d6485568c55..70777f4f42d 100644 --- a/Mage.Sets/src/mage/cards/w/WolfcallersHowl.java +++ b/Mage.Sets/src/mage/cards/w/WolfcallersHowl.java @@ -47,7 +47,7 @@ class WolfcallersHowlEffect extends OneShotEffect { this.staticText = "create X 2/2 green Wolf creature tokens, where X is the number of your opponents with four or more cards in hand"; } - public WolfcallersHowlEffect(final WolfcallersHowlEffect effect) { + private WolfcallersHowlEffect(final WolfcallersHowlEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WoodElemental.java b/Mage.Sets/src/mage/cards/w/WoodElemental.java index abfa7bf1e98..5381a4d0708 100644 --- a/Mage.Sets/src/mage/cards/w/WoodElemental.java +++ b/Mage.Sets/src/mage/cards/w/WoodElemental.java @@ -69,7 +69,7 @@ class WoodElementalEffect extends OneShotEffect { staticText = "sacrifice any number of untapped Forests"; } - public WoodElementalEffect(final WoodElementalEffect effect) { + private WoodElementalEffect(final WoodElementalEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WoodSage.java b/Mage.Sets/src/mage/cards/w/WoodSage.java index 144febc0b29..765947c4ea0 100644 --- a/Mage.Sets/src/mage/cards/w/WoodSage.java +++ b/Mage.Sets/src/mage/cards/w/WoodSage.java @@ -55,7 +55,7 @@ class WoodSageEffect extends OneShotEffect { "and put all of them with that name into your hand. Put the rest into your graveyard"; } - public WoodSageEffect(final WoodSageEffect effect) { + private WoodSageEffect(final WoodSageEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WoodenSphere.java b/Mage.Sets/src/mage/cards/w/WoodenSphere.java index c3f2d4825d7..d9d80216461 100644 --- a/Mage.Sets/src/mage/cards/w/WoodenSphere.java +++ b/Mage.Sets/src/mage/cards/w/WoodenSphere.java @@ -45,7 +45,7 @@ class WoodenSphereAbility extends TriggeredAbilityImpl { super(Zone.BATTLEFIELD, new DoIfCostPaid(new GainLifeEffect(1), new GenericManaCost(1)), false); } - public WoodenSphereAbility(final WoodenSphereAbility ability) { + private WoodenSphereAbility(final WoodenSphereAbility ability) { super(ability); } diff --git a/Mage.Sets/src/mage/cards/w/WoodenStake.java b/Mage.Sets/src/mage/cards/w/WoodenStake.java index 816d4c696ce..f106ee0397f 100644 --- a/Mage.Sets/src/mage/cards/w/WoodenStake.java +++ b/Mage.Sets/src/mage/cards/w/WoodenStake.java @@ -55,7 +55,7 @@ class WoodenStakeBlocksOrBecomesBlockedTriggeredAbility extends TriggeredAbility super(Zone.BATTLEFIELD, new DestroyTargetEffect(true), false); } - public WoodenStakeBlocksOrBecomesBlockedTriggeredAbility(final WoodenStakeBlocksOrBecomesBlockedTriggeredAbility ability) { + private WoodenStakeBlocksOrBecomesBlockedTriggeredAbility(final WoodenStakeBlocksOrBecomesBlockedTriggeredAbility ability) { super(ability); } diff --git a/Mage.Sets/src/mage/cards/w/WoodlandSleuth.java b/Mage.Sets/src/mage/cards/w/WoodlandSleuth.java index c11d2d11e9c..f3cfdde9d64 100644 --- a/Mage.Sets/src/mage/cards/w/WoodlandSleuth.java +++ b/Mage.Sets/src/mage/cards/w/WoodlandSleuth.java @@ -60,7 +60,7 @@ class WoodlandSleuthEffect extends OneShotEffect { this.staticText = "return a creature card at random from your graveyard to your hand"; } - public WoodlandSleuthEffect(final WoodlandSleuthEffect effect) { + private WoodlandSleuthEffect(final WoodlandSleuthEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WoodlotCrawler.java b/Mage.Sets/src/mage/cards/w/WoodlotCrawler.java index 1f44d49160d..9e71d970107 100644 --- a/Mage.Sets/src/mage/cards/w/WoodlotCrawler.java +++ b/Mage.Sets/src/mage/cards/w/WoodlotCrawler.java @@ -32,7 +32,7 @@ public final class WoodlotCrawler extends CardImpl { } - public WoodlotCrawler (final WoodlotCrawler card) { + private WoodlotCrawler(final WoodlotCrawler card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/w/WoodvineElemental.java b/Mage.Sets/src/mage/cards/w/WoodvineElemental.java index 7ece01e6d31..2a5e8dbdd73 100644 --- a/Mage.Sets/src/mage/cards/w/WoodvineElemental.java +++ b/Mage.Sets/src/mage/cards/w/WoodvineElemental.java @@ -63,7 +63,7 @@ class WoodvineElementalEffect extends OneShotEffect { super(Outcome.Benefit); } - public WoodvineElementalEffect(final WoodvineElementalEffect effect) { + private WoodvineElementalEffect(final WoodvineElementalEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WoodwraithCorrupter.java b/Mage.Sets/src/mage/cards/w/WoodwraithCorrupter.java index 52e87f3d59a..88212c762c1 100644 --- a/Mage.Sets/src/mage/cards/w/WoodwraithCorrupter.java +++ b/Mage.Sets/src/mage/cards/w/WoodwraithCorrupter.java @@ -71,7 +71,7 @@ class WoodwraithCorrupterToken extends TokenImpl { power = new MageInt(4); toughness = new MageInt(4); } - public WoodwraithCorrupterToken(final WoodwraithCorrupterToken token) { + private WoodwraithCorrupterToken(final WoodwraithCorrupterToken token) { super(token); } diff --git a/Mage.Sets/src/mage/cards/w/WordOfCommand.java b/Mage.Sets/src/mage/cards/w/WordOfCommand.java index b65a5343b43..9c20cbd775a 100644 --- a/Mage.Sets/src/mage/cards/w/WordOfCommand.java +++ b/Mage.Sets/src/mage/cards/w/WordOfCommand.java @@ -61,7 +61,7 @@ class WordOfCommandEffect extends OneShotEffect { this.staticText = "Look at target opponent's hand and choose a card from it. You control that player until {this} finishes resolving. The player plays that card if able. While doing so, the player can activate mana abilities only if they're from lands that player controls and only if mana they produce is spent to activate other mana abilities of lands the player controls and/or to play that card. If the chosen card is cast as a spell, you control the player while that spell is resolving"; } - public WordOfCommandEffect(final WordOfCommandEffect effect) { + private WordOfCommandEffect(final WordOfCommandEffect effect) { super(effect); } @@ -196,7 +196,7 @@ class WordOfCommandCantActivateEffect extends RestrictionEffect { super(Duration.EndOfTurn); } - public WordOfCommandCantActivateEffect(final WordOfCommandCantActivateEffect effect) { + private WordOfCommandCantActivateEffect(final WordOfCommandCantActivateEffect effect) { super(effect); } @@ -222,7 +222,7 @@ class WordOfCommandTestFlashEffect extends AsThoughEffectImpl { super(AsThoughEffectType.CAST_AS_INSTANT, Duration.EndOfTurn, Outcome.Benefit); } - public WordOfCommandTestFlashEffect(final WordOfCommandTestFlashEffect effect) { + private WordOfCommandTestFlashEffect(final WordOfCommandTestFlashEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WordOfUndoing.java b/Mage.Sets/src/mage/cards/w/WordOfUndoing.java index d993a456fea..91a41f8db1a 100644 --- a/Mage.Sets/src/mage/cards/w/WordOfUndoing.java +++ b/Mage.Sets/src/mage/cards/w/WordOfUndoing.java @@ -50,7 +50,7 @@ class WordOfUndoingReturnToHandEffect extends OneShotEffect { this.staticText = "Return target creature and all white Auras you own attached to it to their owners' hands."; } - public WordOfUndoingReturnToHandEffect(final WordOfUndoingReturnToHandEffect effect) { + private WordOfUndoingReturnToHandEffect(final WordOfUndoingReturnToHandEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/Wordmail.java b/Mage.Sets/src/mage/cards/w/Wordmail.java index 0b95c8f2437..c9dd600220e 100644 --- a/Mage.Sets/src/mage/cards/w/Wordmail.java +++ b/Mage.Sets/src/mage/cards/w/Wordmail.java @@ -58,7 +58,7 @@ class WordmailCount implements DynamicValue { public WordmailCount() { } - public WordmailCount(final WordmailCount dynamicValue) { + private WordmailCount(final WordmailCount dynamicValue) { } @Override diff --git a/Mage.Sets/src/mage/cards/w/WordsOfWaste.java b/Mage.Sets/src/mage/cards/w/WordsOfWaste.java index 8a98962f877..2880b62ce4c 100644 --- a/Mage.Sets/src/mage/cards/w/WordsOfWaste.java +++ b/Mage.Sets/src/mage/cards/w/WordsOfWaste.java @@ -48,7 +48,7 @@ class WordsOfWasteEffect extends ReplacementEffectImpl { staticText = "The next time you would draw a card this turn, each opponent discards a card instead"; } - public WordsOfWasteEffect(final WordsOfWasteEffect effect) { + private WordsOfWasteEffect(final WordsOfWasteEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WordsOfWilding.java b/Mage.Sets/src/mage/cards/w/WordsOfWilding.java index 61d3c648ba9..01247a42f5a 100644 --- a/Mage.Sets/src/mage/cards/w/WordsOfWilding.java +++ b/Mage.Sets/src/mage/cards/w/WordsOfWilding.java @@ -48,7 +48,7 @@ class WordsOfWildingEffect extends ReplacementEffectImpl { staticText = "The next time you would draw a card this turn, create a 2/2 green Bear creature token instead"; } - public WordsOfWildingEffect(final WordsOfWildingEffect effect) { + private WordsOfWildingEffect(final WordsOfWildingEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WordsOfWind.java b/Mage.Sets/src/mage/cards/w/WordsOfWind.java index 2b35430d107..8e721320ff5 100644 --- a/Mage.Sets/src/mage/cards/w/WordsOfWind.java +++ b/Mage.Sets/src/mage/cards/w/WordsOfWind.java @@ -50,7 +50,7 @@ class WordsOfWindEffect extends ReplacementEffectImpl { staticText = "The next time you would draw a card this turn, each player returns a permanent they control to its owner's hand instead"; } - public WordsOfWindEffect(final WordsOfWindEffect effect) { + private WordsOfWindEffect(final WordsOfWindEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WordsOfWisdom.java b/Mage.Sets/src/mage/cards/w/WordsOfWisdom.java index 91729b89777..3ec283e2364 100644 --- a/Mage.Sets/src/mage/cards/w/WordsOfWisdom.java +++ b/Mage.Sets/src/mage/cards/w/WordsOfWisdom.java @@ -45,7 +45,7 @@ class WordsOfWisdomEffect extends OneShotEffect { this.staticText = ", then each other player draws a card"; } - public WordsOfWisdomEffect(final WordsOfWisdomEffect effect) { + private WordsOfWisdomEffect(final WordsOfWisdomEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WorldAtWar.java b/Mage.Sets/src/mage/cards/w/WorldAtWar.java index 54d71546d15..5dfbbd898d5 100644 --- a/Mage.Sets/src/mage/cards/w/WorldAtWar.java +++ b/Mage.Sets/src/mage/cards/w/WorldAtWar.java @@ -52,7 +52,7 @@ class WorldAtWarEffect extends OneShotEffect { staticText = "After the first postcombat main phase this turn, there's an additional combat phase followed by an additional main phase. At the beginning of that combat, untap all creatures that attacked this turn"; } - public WorldAtWarEffect(final WorldAtWarEffect effect) { + private WorldAtWarEffect(final WorldAtWarEffect effect) { super(effect); } @@ -83,7 +83,7 @@ class UntapDelayedTriggeredAbility extends DelayedTriggeredAbility { super(new UntapAttackingThisTurnEffect()); } - public UntapDelayedTriggeredAbility(UntapDelayedTriggeredAbility ability) { + private UntapDelayedTriggeredAbility(final UntapDelayedTriggeredAbility ability) { super(ability); this.connectedTurnMod = ability.connectedTurnMod; this.enabled = ability.enabled; @@ -130,7 +130,7 @@ class UntapAttackingThisTurnEffect extends OneShotEffect { super(Outcome.Benefit); } - public UntapAttackingThisTurnEffect(final UntapAttackingThisTurnEffect effect) { + private UntapAttackingThisTurnEffect(final UntapAttackingThisTurnEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WorldBottlingKit.java b/Mage.Sets/src/mage/cards/w/WorldBottlingKit.java index 2339845694a..f13f98b87cb 100644 --- a/Mage.Sets/src/mage/cards/w/WorldBottlingKit.java +++ b/Mage.Sets/src/mage/cards/w/WorldBottlingKit.java @@ -52,7 +52,7 @@ class WorldBottlingKitEffect extends OneShotEffect { this.staticText = "Choose a Magic set. Exile all permanents with that set's expansion symbol except for basic lands"; } - public WorldBottlingKitEffect(final WorldBottlingKitEffect effect) { + private WorldBottlingKitEffect(final WorldBottlingKitEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WorldQueller.java b/Mage.Sets/src/mage/cards/w/WorldQueller.java index 22545f16538..90288aed81d 100644 --- a/Mage.Sets/src/mage/cards/w/WorldQueller.java +++ b/Mage.Sets/src/mage/cards/w/WorldQueller.java @@ -70,7 +70,7 @@ class WorldQuellerEffect extends OneShotEffect { staticText = "you may choose a card type. If you do, each player sacrifices a permanent of that type"; } - public WorldQuellerEffect(final WorldQuellerEffect effect) { + private WorldQuellerEffect(final WorldQuellerEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WorldShaper.java b/Mage.Sets/src/mage/cards/w/WorldShaper.java index 109acb83ef3..4098db7d61a 100644 --- a/Mage.Sets/src/mage/cards/w/WorldShaper.java +++ b/Mage.Sets/src/mage/cards/w/WorldShaper.java @@ -56,7 +56,7 @@ class WorldShaperEffect extends OneShotEffect { this.staticText = "return all land cards from your graveyard to the battlefield tapped"; } - public WorldShaperEffect(final WorldShaperEffect effect) { + private WorldShaperEffect(final WorldShaperEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/Worldfire.java b/Mage.Sets/src/mage/cards/w/Worldfire.java index bf3e26a9a2e..c306d1d9016 100644 --- a/Mage.Sets/src/mage/cards/w/Worldfire.java +++ b/Mage.Sets/src/mage/cards/w/Worldfire.java @@ -46,7 +46,7 @@ class WorldfireEffect extends OneShotEffect { staticText = "Exile all permanents. Exile all cards from all hands and graveyards. Each player's life total becomes 1"; } - public WorldfireEffect(final WorldfireEffect effect) { + private WorldfireEffect(final WorldfireEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WorldgorgerDragon.java b/Mage.Sets/src/mage/cards/w/WorldgorgerDragon.java index a595c3ede52..70f94e101c8 100644 --- a/Mage.Sets/src/mage/cards/w/WorldgorgerDragon.java +++ b/Mage.Sets/src/mage/cards/w/WorldgorgerDragon.java @@ -77,7 +77,7 @@ class WorldgorgerDragonEntersEffect extends OneShotEffect { staticText = "exile all other permanents you control"; } - public WorldgorgerDragonEntersEffect(final WorldgorgerDragonEntersEffect effect) { + private WorldgorgerDragonEntersEffect(final WorldgorgerDragonEntersEffect effect) { super(effect); } @@ -110,7 +110,7 @@ class WorldgorgerDragonLeavesEffect extends OneShotEffect { staticText = "return the exiled cards to the battlefield under their owners' control"; } - public WorldgorgerDragonLeavesEffect(final WorldgorgerDragonLeavesEffect effect) { + private WorldgorgerDragonLeavesEffect(final WorldgorgerDragonLeavesEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WorldheartPhoenix.java b/Mage.Sets/src/mage/cards/w/WorldheartPhoenix.java index f14b0581205..4f9d6a156bb 100644 --- a/Mage.Sets/src/mage/cards/w/WorldheartPhoenix.java +++ b/Mage.Sets/src/mage/cards/w/WorldheartPhoenix.java @@ -64,7 +64,7 @@ public final class WorldheartPhoenix extends CardImpl { staticText = "You may cast {this} from your graveyard by paying {W}{U}{B}{R}{G} rather than paying its mana cost"; } - public WorldheartPhoenixPlayEffect(final WorldheartPhoenixPlayEffect effect) { + private WorldheartPhoenixPlayEffect(final WorldheartPhoenixPlayEffect effect) { super(effect); } @@ -102,7 +102,7 @@ public final class WorldheartPhoenix extends CardImpl { staticText = "If you do, it enters the battlefield with two +1/+1 counters on it"; } - public WorldheartPhoenixEntersBattlefieldEffect(final WorldheartPhoenixEntersBattlefieldEffect effect) { + private WorldheartPhoenixEntersBattlefieldEffect(final WorldheartPhoenixEntersBattlefieldEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WorldlyCounsel.java b/Mage.Sets/src/mage/cards/w/WorldlyCounsel.java index c240f715716..1fd654ce5c1 100644 --- a/Mage.Sets/src/mage/cards/w/WorldlyCounsel.java +++ b/Mage.Sets/src/mage/cards/w/WorldlyCounsel.java @@ -50,7 +50,7 @@ class WorldlyCounselEffect extends OneShotEffect { this.staticText = "Domain — Look at the top X cards of your library, where X is the number of basic land types among lands you control. Put one of those cards into your hand and the rest on the bottom of your library in any order"; } - public WorldlyCounselEffect(final WorldlyCounselEffect effect) { + private WorldlyCounselEffect(final WorldlyCounselEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/Worldpurge.java b/Mage.Sets/src/mage/cards/w/Worldpurge.java index d2f119de674..94d232b3df3 100644 --- a/Mage.Sets/src/mage/cards/w/Worldpurge.java +++ b/Mage.Sets/src/mage/cards/w/Worldpurge.java @@ -51,7 +51,7 @@ class WorldpurgeEffect extends OneShotEffect { this.staticText = "Return all permanents to their owners' hands. Each player chooses up to seven cards in their hand, then shuffles the rest into their library. Each player loses all unspent mana"; } - public WorldpurgeEffect(final WorldpurgeEffect effect) { + private WorldpurgeEffect(final WorldpurgeEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/Worldslayer.java b/Mage.Sets/src/mage/cards/w/Worldslayer.java index 7d4b11b807a..cba15dfd885 100644 --- a/Mage.Sets/src/mage/cards/w/Worldslayer.java +++ b/Mage.Sets/src/mage/cards/w/Worldslayer.java @@ -88,7 +88,7 @@ class WorldslayerEffect extends OneShotEffect { staticText = "destroy all permanents other than {this}"; } - public WorldslayerEffect(final WorldslayerEffect effect) { + private WorldslayerEffect(final WorldslayerEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WormfangCrab.java b/Mage.Sets/src/mage/cards/w/WormfangCrab.java index 829e1b88b87..61ea73909b3 100644 --- a/Mage.Sets/src/mage/cards/w/WormfangCrab.java +++ b/Mage.Sets/src/mage/cards/w/WormfangCrab.java @@ -63,7 +63,7 @@ class WormfangCrabExileEffect extends OneShotEffect { this.staticText = "an opponent chooses a permanent you control other than {this} and exiles it"; } - public WormfangCrabExileEffect(final WormfangCrabExileEffect effect) { + private WormfangCrabExileEffect(final WormfangCrabExileEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WormsOfTheEarth.java b/Mage.Sets/src/mage/cards/w/WormsOfTheEarth.java index e028e74b0a8..2646e0d23f6 100644 --- a/Mage.Sets/src/mage/cards/w/WormsOfTheEarth.java +++ b/Mage.Sets/src/mage/cards/w/WormsOfTheEarth.java @@ -56,7 +56,7 @@ class WormsOfTheEarthPlayEffect extends ContinuousRuleModifyingEffectImpl { this.staticText = "Players can't play lands"; } - public WormsOfTheEarthPlayEffect(final WormsOfTheEarthPlayEffect effect) { + private WormsOfTheEarthPlayEffect(final WormsOfTheEarthPlayEffect effect) { super(effect); } @@ -88,7 +88,7 @@ class WormsOfTheEarthEnterEffect extends ContinuousRuleModifyingEffectImpl { staticText = "Lands can't enter the battlefield"; } - public WormsOfTheEarthEnterEffect(final WormsOfTheEarthEnterEffect effect) { + private WormsOfTheEarthEnterEffect(final WormsOfTheEarthEnterEffect effect) { super(effect); } @@ -120,7 +120,7 @@ class WormsOfTheEarthDestroyEffect extends OneShotEffect { this.staticText = "any player may sacrifice two lands or have {this} deal 5 damage to that player. If a player does either, destroy {this}"; } - public WormsOfTheEarthDestroyEffect(final WormsOfTheEarthDestroyEffect effect) { + private WormsOfTheEarthDestroyEffect(final WormsOfTheEarthDestroyEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/Worship.java b/Mage.Sets/src/mage/cards/w/Worship.java index 9189e3d6e32..b678b992e9f 100644 --- a/Mage.Sets/src/mage/cards/w/Worship.java +++ b/Mage.Sets/src/mage/cards/w/Worship.java @@ -42,7 +42,7 @@ class WorshipReplacementEffect extends ReplacementEffectImpl { staticText = "If you control a creature, damage that would reduce your life total to less than 1 reduces it to 1 instead"; } - public WorshipReplacementEffect(final WorshipReplacementEffect effect) { + private WorshipReplacementEffect(final WorshipReplacementEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WortTheRaidmother.java b/Mage.Sets/src/mage/cards/w/WortTheRaidmother.java index 6055b0fc59f..7a79b01593e 100644 --- a/Mage.Sets/src/mage/cards/w/WortTheRaidmother.java +++ b/Mage.Sets/src/mage/cards/w/WortTheRaidmother.java @@ -69,7 +69,7 @@ class WortGainConspireEffect extends ContinuousEffectImpl { this.conspireAbility = new ConspireAbility(ConspireAbility.ConspireTargets.MORE); } - public WortGainConspireEffect(final WortGainConspireEffect effect) { + private WortGainConspireEffect(final WortGainConspireEffect effect) { super(effect); this.conspireAbility = effect.conspireAbility; } diff --git a/Mage.Sets/src/mage/cards/w/WoundReflection.java b/Mage.Sets/src/mage/cards/w/WoundReflection.java index 70596972f87..58867a99742 100644 --- a/Mage.Sets/src/mage/cards/w/WoundReflection.java +++ b/Mage.Sets/src/mage/cards/w/WoundReflection.java @@ -45,7 +45,7 @@ class WoundReflectionEffect extends OneShotEffect { this.staticText = "each opponent loses life equal to the life they lost this turn"; } - public WoundReflectionEffect(final WoundReflectionEffect effect) { + private WoundReflectionEffect(final WoundReflectionEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WrackWithMadness.java b/Mage.Sets/src/mage/cards/w/WrackWithMadness.java index 113e74708dd..18d8be7f2fa 100644 --- a/Mage.Sets/src/mage/cards/w/WrackWithMadness.java +++ b/Mage.Sets/src/mage/cards/w/WrackWithMadness.java @@ -44,7 +44,7 @@ class WrackWithMadnessEffect extends OneShotEffect { this.staticText = "Target creature deals damage to itself equal to its power"; } - public WrackWithMadnessEffect(final WrackWithMadnessEffect effect) { + private WrackWithMadnessEffect(final WrackWithMadnessEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WretchedBanquet.java b/Mage.Sets/src/mage/cards/w/WretchedBanquet.java index b6221a53ece..18b02b96b0a 100644 --- a/Mage.Sets/src/mage/cards/w/WretchedBanquet.java +++ b/Mage.Sets/src/mage/cards/w/WretchedBanquet.java @@ -45,7 +45,7 @@ class WretchedBanquetEffect extends OneShotEffect { this.staticText = "Destroy target creature if it has the least power or is tied for least power among creatures on the battlefield"; } - public WretchedBanquetEffect(final WretchedBanquetEffect effect) { + private WretchedBanquetEffect(final WretchedBanquetEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WritOfPassage.java b/Mage.Sets/src/mage/cards/w/WritOfPassage.java index dec34daa7ec..7ca5f2fa2cf 100644 --- a/Mage.Sets/src/mage/cards/w/WritOfPassage.java +++ b/Mage.Sets/src/mage/cards/w/WritOfPassage.java @@ -72,7 +72,7 @@ class WritOfPassageAttachedEffect extends RestrictionEffect { this.staticText = attachmentType.verb() + " creature can't be blocked"; } - public WritOfPassageAttachedEffect(WritOfPassageAttachedEffect effect) { + private WritOfPassageAttachedEffect(final WritOfPassageAttachedEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WriteIntoBeing.java b/Mage.Sets/src/mage/cards/w/WriteIntoBeing.java index 5e0c8e4c3a4..8494c6a492d 100644 --- a/Mage.Sets/src/mage/cards/w/WriteIntoBeing.java +++ b/Mage.Sets/src/mage/cards/w/WriteIntoBeing.java @@ -49,7 +49,7 @@ class WriteIntoBeingEffect extends OneShotEffect { + "(To manifest a card, put it onto the battlefield face down as a 2/2 creature. Turn it face up any time for its mana cost if it's a creature card.)"; } - public WriteIntoBeingEffect(final WriteIntoBeingEffect effect) { + private WriteIntoBeingEffect(final WriteIntoBeingEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/Wurmcalling.java b/Mage.Sets/src/mage/cards/w/Wurmcalling.java index 6a492aa7295..167f22b88e9 100644 --- a/Mage.Sets/src/mage/cards/w/Wurmcalling.java +++ b/Mage.Sets/src/mage/cards/w/Wurmcalling.java @@ -44,7 +44,7 @@ class WurmcallingEffect extends OneShotEffect { staticText = "Create an X/X green Wurm creature token"; } - public WurmcallingEffect(WurmcallingEffect ability) { + private WurmcallingEffect(final WurmcallingEffect ability) { super(ability); } diff --git a/Mage.Sets/src/mage/cards/w/Wurmquake.java b/Mage.Sets/src/mage/cards/w/Wurmquake.java index c454c302e48..b751da4ab09 100644 --- a/Mage.Sets/src/mage/cards/w/Wurmquake.java +++ b/Mage.Sets/src/mage/cards/w/Wurmquake.java @@ -52,7 +52,7 @@ class WurmquakeEffect extends OneShotEffect { this.staticText = AbilityWord.CORRUPTED.formatWord() + "Create an X/X green Phyrexian Wurm creature token with trample and toxic 1, where X is the amount of mana spent to cast this spell. Then for each opponent with three or more poison counters, you create another one of those tokens."; } - public WurmquakeEffect(final WurmquakeEffect effect) { + private WurmquakeEffect(final WurmquakeEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/w/WurmsTooth.java b/Mage.Sets/src/mage/cards/w/WurmsTooth.java index aafd9d65fd8..1ecc9761664 100644 --- a/Mage.Sets/src/mage/cards/w/WurmsTooth.java +++ b/Mage.Sets/src/mage/cards/w/WurmsTooth.java @@ -42,7 +42,7 @@ class WurmsToothAbility extends TriggeredAbilityImpl { super(Zone.BATTLEFIELD, new GainLifeEffect(1), true); } - public WurmsToothAbility(final WurmsToothAbility ability) { + private WurmsToothAbility(final WurmsToothAbility ability) { super(ability); } diff --git a/Mage.Sets/src/mage/cards/x/XanatharGuildKingpin.java b/Mage.Sets/src/mage/cards/x/XanatharGuildKingpin.java index fe64e8b7eb8..c62c5ece0d3 100644 --- a/Mage.Sets/src/mage/cards/x/XanatharGuildKingpin.java +++ b/Mage.Sets/src/mage/cards/x/XanatharGuildKingpin.java @@ -142,7 +142,7 @@ class SpendManaAsAnyColorToCastTopOfLibraryTargetEffect extends AsThoughEffectIm super(AsThoughEffectType.SPEND_OTHER_MANA, Duration.EndOfTurn, Outcome.Benefit); } - public SpendManaAsAnyColorToCastTopOfLibraryTargetEffect(final SpendManaAsAnyColorToCastTopOfLibraryTargetEffect effect) { + private SpendManaAsAnyColorToCastTopOfLibraryTargetEffect(final SpendManaAsAnyColorToCastTopOfLibraryTargetEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/x/XanthicStatue.java b/Mage.Sets/src/mage/cards/x/XanthicStatue.java index cd489e5e039..3f435169fe5 100644 --- a/Mage.Sets/src/mage/cards/x/XanthicStatue.java +++ b/Mage.Sets/src/mage/cards/x/XanthicStatue.java @@ -50,7 +50,7 @@ class XanthicStatueCreature extends TokenImpl { this.addAbility(TrampleAbility.getInstance()); } - public XanthicStatueCreature(final XanthicStatueCreature token) { + private XanthicStatueCreature(final XanthicStatueCreature token) { super(token); } diff --git a/Mage.Sets/src/mage/cards/x/XantidSwarm.java b/Mage.Sets/src/mage/cards/x/XantidSwarm.java index 99c4077d2e2..7dda88c653f 100644 --- a/Mage.Sets/src/mage/cards/x/XantidSwarm.java +++ b/Mage.Sets/src/mage/cards/x/XantidSwarm.java @@ -58,7 +58,7 @@ class XantidSwarmTriggeredAbility extends TriggeredAbilityImpl { setTriggerPhrase("Whenever {this} attacks, "); } - public XantidSwarmTriggeredAbility(final XantidSwarmTriggeredAbility ability) { + private XantidSwarmTriggeredAbility(final XantidSwarmTriggeredAbility ability) { super(ability); } @@ -90,7 +90,7 @@ class XantidSwarmReplacementEffect extends ContinuousRuleModifyingEffectImpl { staticText = "defending player can't cast spells this turn"; } - public XantidSwarmReplacementEffect(final XantidSwarmReplacementEffect effect) { + private XantidSwarmReplacementEffect(final XantidSwarmReplacementEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/x/XathridDemon.java b/Mage.Sets/src/mage/cards/x/XathridDemon.java index bf58c988959..37bbf66fe73 100644 --- a/Mage.Sets/src/mage/cards/x/XathridDemon.java +++ b/Mage.Sets/src/mage/cards/x/XathridDemon.java @@ -60,7 +60,7 @@ class XathridDemonEffect extends OneShotEffect { this.staticText = "sacrifice a creature other than {this}, then each opponent loses life equal to the sacrificed creature's power. If you can't sacrifice a creature, tap {this} and you lose 7 life"; } - public XathridDemonEffect(final XathridDemonEffect effect) { + private XathridDemonEffect(final XathridDemonEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/x/XathridGorgon.java b/Mage.Sets/src/mage/cards/x/XathridGorgon.java index 1aaa2862d38..c45f4595e41 100644 --- a/Mage.Sets/src/mage/cards/x/XathridGorgon.java +++ b/Mage.Sets/src/mage/cards/x/XathridGorgon.java @@ -75,7 +75,7 @@ class XathridGorgonCantActivateEffect extends RestrictionEffect { staticText = "Its activated abilities can't be activated"; } - public XathridGorgonCantActivateEffect(final XathridGorgonCantActivateEffect effect) { + private XathridGorgonCantActivateEffect(final XathridGorgonCantActivateEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/x/XenagosTheReveler.java b/Mage.Sets/src/mage/cards/x/XenagosTheReveler.java index a32f13125e6..863179c638e 100644 --- a/Mage.Sets/src/mage/cards/x/XenagosTheReveler.java +++ b/Mage.Sets/src/mage/cards/x/XenagosTheReveler.java @@ -62,7 +62,7 @@ class XenagosManaEffect extends OneShotEffect { this.staticText = "Add X mana in any combination of {R} and/or {G}, where X is the number of creatures you control"; } - public XenagosManaEffect(final XenagosManaEffect effect) { + private XenagosManaEffect(final XenagosManaEffect effect) { super(effect); } @@ -101,7 +101,7 @@ class XenagosExileEffect extends OneShotEffect { this.staticText = "Exile the top seven cards of your library. You may put any number of creature and/or land cards from among them onto the battlefield"; } - public XenagosExileEffect(final XenagosExileEffect effect) { + private XenagosExileEffect(final XenagosExileEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/x/XenicPoltergeist.java b/Mage.Sets/src/mage/cards/x/XenicPoltergeist.java index ffd570effab..87b520e1b87 100644 --- a/Mage.Sets/src/mage/cards/x/XenicPoltergeist.java +++ b/Mage.Sets/src/mage/cards/x/XenicPoltergeist.java @@ -71,7 +71,7 @@ class XenicPoltergeistEffect extends ContinuousEffectImpl { staticText = "Until your next upkeep, target noncreature artifact becomes an artifact creature with power and toughness each equal to its mana value"; } - public XenicPoltergeistEffect(final XenicPoltergeistEffect effect) { + private XenicPoltergeistEffect(final XenicPoltergeistEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/x/Xenograft.java b/Mage.Sets/src/mage/cards/x/Xenograft.java index 316ca0c7292..bc3ec691a89 100644 --- a/Mage.Sets/src/mage/cards/x/Xenograft.java +++ b/Mage.Sets/src/mage/cards/x/Xenograft.java @@ -47,7 +47,7 @@ class XenograftAddSubtypeEffect extends ContinuousEffectImpl { staticText = "Each creature you control is the chosen type in addition to its other types"; } - public XenograftAddSubtypeEffect(final XenograftAddSubtypeEffect effect) { + private XenograftAddSubtypeEffect(final XenograftAddSubtypeEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/x/XyrisTheWrithingStorm.java b/Mage.Sets/src/mage/cards/x/XyrisTheWrithingStorm.java index bd00551c157..626667b97ea 100644 --- a/Mage.Sets/src/mage/cards/x/XyrisTheWrithingStorm.java +++ b/Mage.Sets/src/mage/cards/x/XyrisTheWrithingStorm.java @@ -58,7 +58,7 @@ class XyrisTheWrithingStormCombatDamageEffect extends OneShotEffect { this.staticText = "you and that player each draw that many cards."; } - public XyrisTheWrithingStormCombatDamageEffect(final XyrisTheWrithingStormCombatDamageEffect effect) { + private XyrisTheWrithingStormCombatDamageEffect(final XyrisTheWrithingStormCombatDamageEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/x/XystonStarDestroyer.java b/Mage.Sets/src/mage/cards/x/XystonStarDestroyer.java index 39c6ec290a9..eabb8b398d8 100644 --- a/Mage.Sets/src/mage/cards/x/XystonStarDestroyer.java +++ b/Mage.Sets/src/mage/cards/x/XystonStarDestroyer.java @@ -32,7 +32,7 @@ public class XystonStarDestroyer extends CardImpl { this.addAbility(ability); } - public XystonStarDestroyer(final XystonStarDestroyer card) { + private XystonStarDestroyer(final XystonStarDestroyer card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/y/YasharnImplacableEarth.java b/Mage.Sets/src/mage/cards/y/YasharnImplacableEarth.java index 52e7ae8410b..cffb44e5198 100644 --- a/Mage.Sets/src/mage/cards/y/YasharnImplacableEarth.java +++ b/Mage.Sets/src/mage/cards/y/YasharnImplacableEarth.java @@ -119,7 +119,7 @@ class YasharnImplacableEarthEffect extends ContinuousRuleModifyingEffectImpl { staticText = "Players can't pay life or sacrifice nonland permanents to cast spells or activate abilities"; } - public YasharnImplacableEarthEffect(final YasharnImplacableEarthEffect effect) { + private YasharnImplacableEarthEffect(final YasharnImplacableEarthEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/y/YavimayaDryad.java b/Mage.Sets/src/mage/cards/y/YavimayaDryad.java index 427b2bbf30a..7dc68a16195 100644 --- a/Mage.Sets/src/mage/cards/y/YavimayaDryad.java +++ b/Mage.Sets/src/mage/cards/y/YavimayaDryad.java @@ -63,7 +63,7 @@ class YavimayaDryadEffect extends SearchEffect { staticText = "you may search your library for a Forest card, put it onto the battlefield tapped under target player's control, then shuffle"; } - public YavimayaDryadEffect(final YavimayaDryadEffect effect) { + private YavimayaDryadEffect(final YavimayaDryadEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/y/YawgmothDemon.java b/Mage.Sets/src/mage/cards/y/YawgmothDemon.java index 9da4abb03cf..7b6f1633315 100644 --- a/Mage.Sets/src/mage/cards/y/YawgmothDemon.java +++ b/Mage.Sets/src/mage/cards/y/YawgmothDemon.java @@ -55,7 +55,7 @@ class YawgmothDemonEffect extends OneShotEffect { this.staticText = "you may sacrifice an artifact. If you don't, tap {this} and it deals 2 damage to you"; } - public YawgmothDemonEffect(final YawgmothDemonEffect effect) { + private YawgmothDemonEffect(final YawgmothDemonEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/y/YawgmothsVileOffering.java b/Mage.Sets/src/mage/cards/y/YawgmothsVileOffering.java index 8f9da8c3b83..e2b458804e1 100644 --- a/Mage.Sets/src/mage/cards/y/YawgmothsVileOffering.java +++ b/Mage.Sets/src/mage/cards/y/YawgmothsVileOffering.java @@ -68,7 +68,7 @@ class YawgmothsVileOfferingEffect extends OneShotEffect { this.staticText = "Put up to one target creature or planeswalker card from a graveyard onto the battlefield under your control. Destroy up to one target creature or planeswalker"; } - public YawgmothsVileOfferingEffect(final YawgmothsVileOfferingEffect effect) { + private YawgmothsVileOfferingEffect(final YawgmothsVileOfferingEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/y/YawgmothsWill.java b/Mage.Sets/src/mage/cards/y/YawgmothsWill.java index 4a0dd7b0a93..2d68943f1c2 100644 --- a/Mage.Sets/src/mage/cards/y/YawgmothsWill.java +++ b/Mage.Sets/src/mage/cards/y/YawgmothsWill.java @@ -59,7 +59,7 @@ class CanPlayCardsFromGraveyardEffect extends ContinuousEffectImpl { staticText = "Until end of turn, you may play cards from your graveyard"; } - public CanPlayCardsFromGraveyardEffect(final CanPlayCardsFromGraveyardEffect effect) { + private CanPlayCardsFromGraveyardEffect(final CanPlayCardsFromGraveyardEffect effect) { super(effect); } @@ -87,7 +87,7 @@ class YawgmothsWillReplacementEffect extends ReplacementEffectImpl { this.staticText = "If a card would be put into your graveyard from anywhere this turn, exile that card instead"; } - public YawgmothsWillReplacementEffect(final YawgmothsWillReplacementEffect effect) { + private YawgmothsWillReplacementEffect(final YawgmothsWillReplacementEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/y/YdwenEfreet.java b/Mage.Sets/src/mage/cards/y/YdwenEfreet.java index b44737cadd2..127fbbdce64 100644 --- a/Mage.Sets/src/mage/cards/y/YdwenEfreet.java +++ b/Mage.Sets/src/mage/cards/y/YdwenEfreet.java @@ -51,7 +51,7 @@ class YdwenEfreetEffect extends OneShotEffect { staticText = "flip a coin. If you lose the flip, remove {this} from combat and it can't block. Creatures it was blocking that had become blocked by only {this} this combat become unblocked"; } - public YdwenEfreetEffect(YdwenEfreetEffect effect) { + private YdwenEfreetEffect(final YdwenEfreetEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/y/YedoraGraveGardener.java b/Mage.Sets/src/mage/cards/y/YedoraGraveGardener.java index 6556bab8655..ab458efa189 100644 --- a/Mage.Sets/src/mage/cards/y/YedoraGraveGardener.java +++ b/Mage.Sets/src/mage/cards/y/YedoraGraveGardener.java @@ -100,7 +100,7 @@ class YedoraGraveGardenerContinuousEffect extends ContinuousEffectImpl { super(Duration.Custom, Layer.CopyEffects_1, SubLayer.FaceDownEffects_1b, Outcome.Neutral); } - public YedoraGraveGardenerContinuousEffect(final YedoraGraveGardenerContinuousEffect effect) { + private YedoraGraveGardenerContinuousEffect(final YedoraGraveGardenerContinuousEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/y/YennettCrypticSovereign.java b/Mage.Sets/src/mage/cards/y/YennettCrypticSovereign.java index fd008418f8b..31f69618d81 100644 --- a/Mage.Sets/src/mage/cards/y/YennettCrypticSovereign.java +++ b/Mage.Sets/src/mage/cards/y/YennettCrypticSovereign.java @@ -70,7 +70,7 @@ class YennettCrypticSovereignEffect extends OneShotEffect { "If you don't cast it, draw a card."; } - public YennettCrypticSovereignEffect(final YennettCrypticSovereignEffect effect) { + private YennettCrypticSovereignEffect(final YennettCrypticSovereignEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/y/YidrisMaelstromWielder.java b/Mage.Sets/src/mage/cards/y/YidrisMaelstromWielder.java index 7ba39dd45c3..783cccf1f03 100644 --- a/Mage.Sets/src/mage/cards/y/YidrisMaelstromWielder.java +++ b/Mage.Sets/src/mage/cards/y/YidrisMaelstromWielder.java @@ -56,7 +56,7 @@ class YidrisMaelstromWielderGainCascadeEffect extends ContinuousEffectImpl { staticText = "as you cast spells from your hand this turn, they gain cascade"; } - public YidrisMaelstromWielderGainCascadeEffect(final YidrisMaelstromWielderGainCascadeEffect effect) { + private YidrisMaelstromWielderGainCascadeEffect(final YidrisMaelstromWielderGainCascadeEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/y/YisanTheWandererBard.java b/Mage.Sets/src/mage/cards/y/YisanTheWandererBard.java index 02d107684b8..f813ee7c0c7 100644 --- a/Mage.Sets/src/mage/cards/y/YisanTheWandererBard.java +++ b/Mage.Sets/src/mage/cards/y/YisanTheWandererBard.java @@ -66,7 +66,7 @@ class YisanTheWandererBardEffect extends OneShotEffect { this.staticText = "Search your library for a creature card with mana value equal to the number of verse counters on {this}, put it onto the battlefield, then shuffle"; } - public YisanTheWandererBardEffect(final YisanTheWandererBardEffect effect) { + private YisanTheWandererBardEffect(final YisanTheWandererBardEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/y/YodaJediMaster.java b/Mage.Sets/src/mage/cards/y/YodaJediMaster.java index decd02e935f..ff55ee419da 100644 --- a/Mage.Sets/src/mage/cards/y/YodaJediMaster.java +++ b/Mage.Sets/src/mage/cards/y/YodaJediMaster.java @@ -70,7 +70,7 @@ class YodaJediMasterEffect extends OneShotEffect { staticText = "Exile another target permanent you own. Return that card to the battlefield under your control at the beginning of your next end step"; } - public YodaJediMasterEffect(final YodaJediMasterEffect effect) { + private YodaJediMasterEffect(final YodaJediMasterEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/y/YokedPlowbeast.java b/Mage.Sets/src/mage/cards/y/YokedPlowbeast.java index 2d73f6216b1..7bf664707ed 100644 --- a/Mage.Sets/src/mage/cards/y/YokedPlowbeast.java +++ b/Mage.Sets/src/mage/cards/y/YokedPlowbeast.java @@ -26,7 +26,7 @@ public final class YokedPlowbeast extends CardImpl { this.addAbility(new CyclingAbility(new ManaCostsImpl<>("{2}"))); } - public YokedPlowbeast (final YokedPlowbeast card) { + private YokedPlowbeast(final YokedPlowbeast card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/y/YoseiTheMorningStar.java b/Mage.Sets/src/mage/cards/y/YoseiTheMorningStar.java index d457725a0ae..dab9297934f 100644 --- a/Mage.Sets/src/mage/cards/y/YoseiTheMorningStar.java +++ b/Mage.Sets/src/mage/cards/y/YoseiTheMorningStar.java @@ -64,7 +64,7 @@ class YoseiTheMorningStarTarget extends TargetPermanent { super(0, 5, filterTemplate, false); } - public YoseiTheMorningStarTarget(final YoseiTheMorningStarTarget target) { + private YoseiTheMorningStarTarget(final YoseiTheMorningStarTarget target) { super(target); } diff --git a/Mage.Sets/src/mage/cards/y/YouLookUponTheTarrasque.java b/Mage.Sets/src/mage/cards/y/YouLookUponTheTarrasque.java index e74b0146881..7eca7c76feb 100644 --- a/Mage.Sets/src/mage/cards/y/YouLookUponTheTarrasque.java +++ b/Mage.Sets/src/mage/cards/y/YouLookUponTheTarrasque.java @@ -70,7 +70,7 @@ class YouLookUponTheTarrasqueEffect extends RequirementEffect { staticText = "All creatures your opponents control able to block that creature this turn do so"; } - public YouLookUponTheTarrasqueEffect(final YouLookUponTheTarrasqueEffect effect) { + private YouLookUponTheTarrasqueEffect(final YouLookUponTheTarrasqueEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/y/YukoraThePrisoner.java b/Mage.Sets/src/mage/cards/y/YukoraThePrisoner.java index ec73dd42b23..2541b77da34 100644 --- a/Mage.Sets/src/mage/cards/y/YukoraThePrisoner.java +++ b/Mage.Sets/src/mage/cards/y/YukoraThePrisoner.java @@ -67,7 +67,7 @@ class YukoraThePrisonerEffect extends OneShotEffect { this.staticText = "sacrifice all non-Ogre creatures you control"; } - public YukoraThePrisonerEffect(final YukoraThePrisonerEffect effect) { + private YukoraThePrisonerEffect(final YukoraThePrisonerEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/y/YurikoTheTigersShadow.java b/Mage.Sets/src/mage/cards/y/YurikoTheTigersShadow.java index 7441b36062a..ec11cfdc173 100644 --- a/Mage.Sets/src/mage/cards/y/YurikoTheTigersShadow.java +++ b/Mage.Sets/src/mage/cards/y/YurikoTheTigersShadow.java @@ -74,7 +74,7 @@ class YurikoTheTigersShadowEffect extends OneShotEffect { + "equal to that card's mana value"; } - public YurikoTheTigersShadowEffect(final YurikoTheTigersShadowEffect effect) { + private YurikoTheTigersShadowEffect(final YurikoTheTigersShadowEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/z/ZamWesell.java b/Mage.Sets/src/mage/cards/z/ZamWesell.java index 9f584b4408f..ff4c4652fc0 100644 --- a/Mage.Sets/src/mage/cards/z/ZamWesell.java +++ b/Mage.Sets/src/mage/cards/z/ZamWesell.java @@ -56,7 +56,7 @@ class ZamWesselEffect extends OneShotEffect { this.staticText = ""; } - public ZamWesselEffect(final ZamWesselEffect effect) { + private ZamWesselEffect(final ZamWesselEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/z/ZameckGuildmage.java b/Mage.Sets/src/mage/cards/z/ZameckGuildmage.java index c5e84991ce9..1cd69ee648d 100644 --- a/Mage.Sets/src/mage/cards/z/ZameckGuildmage.java +++ b/Mage.Sets/src/mage/cards/z/ZameckGuildmage.java @@ -57,7 +57,7 @@ class ZameckGuildmageEntersBattlefieldEffect extends ReplacementEffectImpl { this.staticText = "This turn, each creature you control enters the battlefield with an additional +1/+1 counter on it"; } - public ZameckGuildmageEntersBattlefieldEffect(ZameckGuildmageEntersBattlefieldEffect effect) { + private ZameckGuildmageEntersBattlefieldEffect(final ZameckGuildmageEntersBattlefieldEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/z/ZedruuTheGreathearted.java b/Mage.Sets/src/mage/cards/z/ZedruuTheGreathearted.java index 9c8c4375b57..d432142f053 100644 --- a/Mage.Sets/src/mage/cards/z/ZedruuTheGreathearted.java +++ b/Mage.Sets/src/mage/cards/z/ZedruuTheGreathearted.java @@ -68,7 +68,7 @@ public final class ZedruuTheGreathearted extends CardImpl { this.staticText = "Target opponent gains control of target permanent you control"; } - public ZedruuTheGreatheartedEffect(final ZedruuTheGreatheartedEffect effect) { + private ZedruuTheGreatheartedEffect(final ZedruuTheGreatheartedEffect effect) { super(effect); this.targetPermanentReference = effect.targetPermanentReference; } diff --git a/Mage.Sets/src/mage/cards/z/ZirilanOfTheClaw.java b/Mage.Sets/src/mage/cards/z/ZirilanOfTheClaw.java index b3c90eb9b35..24ab468bdfd 100644 --- a/Mage.Sets/src/mage/cards/z/ZirilanOfTheClaw.java +++ b/Mage.Sets/src/mage/cards/z/ZirilanOfTheClaw.java @@ -63,7 +63,7 @@ class ZirilanOfTheClawEffect extends OneShotEffect { + " That Dragon gains haste until end of turn. Exile it at the beginning of the next end step"; } - public ZirilanOfTheClawEffect(final ZirilanOfTheClawEffect effect) { + private ZirilanOfTheClawEffect(final ZirilanOfTheClawEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/z/ZombieApocalypse.java b/Mage.Sets/src/mage/cards/z/ZombieApocalypse.java index c30bdffcfae..f742ea7ed26 100644 --- a/Mage.Sets/src/mage/cards/z/ZombieApocalypse.java +++ b/Mage.Sets/src/mage/cards/z/ZombieApocalypse.java @@ -52,7 +52,7 @@ class ZombieApocalypseEffect extends OneShotEffect { this.staticText = "Return all Zombie creature cards from your graveyard to the battlefield tapped, then destroy all Humans."; } - public ZombieApocalypseEffect(final ZombieApocalypseEffect effect) { + private ZombieApocalypseEffect(final ZombieApocalypseEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/z/ZombieCannibal.java b/Mage.Sets/src/mage/cards/z/ZombieCannibal.java index d63ee87cd86..50066edead1 100644 --- a/Mage.Sets/src/mage/cards/z/ZombieCannibal.java +++ b/Mage.Sets/src/mage/cards/z/ZombieCannibal.java @@ -50,7 +50,7 @@ class ZombieCannibalTriggeredAbility extends TriggeredAbilityImpl { super(Zone.BATTLEFIELD, new ExileTargetEffect(null, "", Zone.GRAVEYARD), true); } - public ZombieCannibalTriggeredAbility(final ZombieCannibalTriggeredAbility ability) { + private ZombieCannibalTriggeredAbility(final ZombieCannibalTriggeredAbility ability) { super(ability); } diff --git a/Mage.Sets/src/mage/cards/z/ZombieMob.java b/Mage.Sets/src/mage/cards/z/ZombieMob.java index 2b55a6876f3..b7b33d4c9b8 100644 --- a/Mage.Sets/src/mage/cards/z/ZombieMob.java +++ b/Mage.Sets/src/mage/cards/z/ZombieMob.java @@ -58,7 +58,7 @@ class ZombieMobEffect extends OneShotEffect { staticText = "{this} enters the battlefield with a +1/+1 counter on it for each creature card in your graveyard. When {this} enters the battlefield, exile all creature cards from your graveyard."; } - public ZombieMobEffect(final ZombieMobEffect effect) { + private ZombieMobEffect(final ZombieMobEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/z/Zoologist.java b/Mage.Sets/src/mage/cards/z/Zoologist.java index 73e0ee9e604..ac8ab438e9c 100644 --- a/Mage.Sets/src/mage/cards/z/Zoologist.java +++ b/Mage.Sets/src/mage/cards/z/Zoologist.java @@ -56,7 +56,7 @@ class ZoologistEffect extends OneShotEffect { this.staticText = "Reveal the top card of your library. If it's a creature card, put it onto the battlefield. Otherwise, put it into your graveyard"; } - public ZoologistEffect(final ZoologistEffect effect) { + private ZoologistEffect(final ZoologistEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/z/ZoriiBliss.java b/Mage.Sets/src/mage/cards/z/ZoriiBliss.java index bc9a12511b9..c770eb02b9c 100644 --- a/Mage.Sets/src/mage/cards/z/ZoriiBliss.java +++ b/Mage.Sets/src/mage/cards/z/ZoriiBliss.java @@ -39,7 +39,7 @@ public class ZoriiBliss extends CardImpl { this.addAbility(attacksTriggeredAbility); } - public ZoriiBliss(final ZoriiBliss card) { + private ZoriiBliss(final ZoriiBliss card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/z/ZurEternalSchemer.java b/Mage.Sets/src/mage/cards/z/ZurEternalSchemer.java index 81cb4ddf467..ee2c992f36a 100644 --- a/Mage.Sets/src/mage/cards/z/ZurEternalSchemer.java +++ b/Mage.Sets/src/mage/cards/z/ZurEternalSchemer.java @@ -81,7 +81,7 @@ class ZurEternalSchemerEffect extends ContinuousEffectImpl { "and has base power and base toughness each equal to its mana value."; } - public ZurEternalSchemerEffect(final ZurEternalSchemerEffect effect) { + private ZurEternalSchemerEffect(final ZurEternalSchemerEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/z/ZzzyxassAbyss.java b/Mage.Sets/src/mage/cards/z/ZzzyxassAbyss.java index 241ae8e00b8..2a004512e7d 100644 --- a/Mage.Sets/src/mage/cards/z/ZzzyxassAbyss.java +++ b/Mage.Sets/src/mage/cards/z/ZzzyxassAbyss.java @@ -52,7 +52,7 @@ class ZzzyxassAbyssEffect extends OneShotEffect { this.staticText = "destroy all nonland permanents with the first name alphabetically among nonland permanents"; } - public ZzzyxassAbyssEffect(final ZzzyxassAbyssEffect effect) { + private ZzzyxassAbyssEffect(final ZzzyxassAbyssEffect effect) { super(effect); } From 3d91971e686b689352033e38379b2774ac4c1879 Mon Sep 17 00:00:00 2001 From: Susucre <34709007+Susucre@users.noreply.github.com> Date: Thu, 31 Aug 2023 01:48:21 +0200 Subject: [PATCH 20/36] clean all copy constructors in cards starting U-V (#11066) --- Mage.Sets/src/mage/cards/u/UbaMask.java | 2 +- Mage.Sets/src/mage/cards/u/UginTheSpiritDragon.java | 4 ++-- Mage.Sets/src/mage/cards/u/UginsInsight.java | 2 +- Mage.Sets/src/mage/cards/u/UginsNexus.java | 4 ++-- Mage.Sets/src/mage/cards/u/UglukOfTheWhiteHand.java | 2 +- Mage.Sets/src/mage/cards/u/UlamogTheCeaselessHunger.java | 4 ++-- Mage.Sets/src/mage/cards/u/UlamogsCrusher.java | 2 +- Mage.Sets/src/mage/cards/u/UlamogsDespoiler.java | 2 +- Mage.Sets/src/mage/cards/u/UlamogsNullifier.java | 2 +- Mage.Sets/src/mage/cards/u/UlvenwaldMysteries.java | 2 +- Mage.Sets/src/mage/cards/u/Umbilicus.java | 2 +- Mage.Sets/src/mage/cards/u/UnbenderTine.java | 2 +- Mage.Sets/src/mage/cards/u/UnbreathingHorde.java | 2 +- Mage.Sets/src/mage/cards/u/UncageTheMenagerie.java | 2 +- Mage.Sets/src/mage/cards/u/UncheckedGrowth.java | 2 +- Mage.Sets/src/mage/cards/u/UnconventionalTactics.java | 2 +- Mage.Sets/src/mage/cards/u/UndeadAlchemist.java | 2 +- Mage.Sets/src/mage/cards/u/UndercityInformer.java | 2 +- Mage.Sets/src/mage/cards/u/UnderrealmLich.java | 2 +- Mage.Sets/src/mage/cards/u/Undertow.java | 2 +- Mage.Sets/src/mage/cards/u/UnderworldConnections.java | 2 +- Mage.Sets/src/mage/cards/u/UnderworldSlums.java | 2 +- Mage.Sets/src/mage/cards/u/UndiscoveredParadise.java | 4 ++-- Mage.Sets/src/mage/cards/u/UndyingBeast.java | 2 +- Mage.Sets/src/mage/cards/u/UndyingFlames.java | 2 +- Mage.Sets/src/mage/cards/u/UnexpectedResults.java | 2 +- Mage.Sets/src/mage/cards/u/UnexpectedlyAbsent.java | 2 +- Mage.Sets/src/mage/cards/u/UnholyIndenture.java | 2 +- Mage.Sets/src/mage/cards/u/UnifiedWill.java | 2 +- Mage.Sets/src/mage/cards/u/UnifyingTheory.java | 2 +- Mage.Sets/src/mage/cards/u/Unmake.java | 2 +- Mage.Sets/src/mage/cards/u/UnmarkedGrave.java | 2 +- Mage.Sets/src/mage/cards/u/UnmooredEgo.java | 2 +- Mage.Sets/src/mage/cards/u/UnnaturalPredation.java | 2 +- Mage.Sets/src/mage/cards/u/UnnaturalSpeed.java | 2 +- Mage.Sets/src/mage/cards/u/UnpleasantDiscovery.java | 2 +- Mage.Sets/src/mage/cards/u/UnscytheKillerOfKings.java | 4 ++-- Mage.Sets/src/mage/cards/u/UnstableFooting.java | 2 +- Mage.Sets/src/mage/cards/u/UnstableShapeshifter.java | 2 +- Mage.Sets/src/mage/cards/u/UnwindingClock.java | 2 +- Mage.Sets/src/mage/cards/u/Upwelling.java | 2 +- Mage.Sets/src/mage/cards/u/UrDrago.java | 2 +- Mage.Sets/src/mage/cards/u/UrbanBurgeoning.java | 2 +- Mage.Sets/src/mage/cards/u/UrgeToFeed.java | 2 +- Mage.Sets/src/mage/cards/u/UrgorosTheEmptyOne.java | 2 +- Mage.Sets/src/mage/cards/u/UrzaAcademyHeadmaster.java | 6 +++--- Mage.Sets/src/mage/cards/u/UrzaLordHighArtificer.java | 2 +- Mage.Sets/src/mage/cards/u/UrzaPlaneswalker.java | 2 +- Mage.Sets/src/mage/cards/u/UrzasArmor.java | 2 +- Mage.Sets/src/mage/cards/u/UrzasAvenger.java | 2 +- Mage.Sets/src/mage/cards/u/UrzasBauble.java | 2 +- Mage.Sets/src/mage/cards/u/UrzasChalice.java | 2 +- Mage.Sets/src/mage/cards/u/UrzasEngine.java | 4 ++-- Mage.Sets/src/mage/cards/u/UrzasHotTub.java | 2 +- Mage.Sets/src/mage/cards/u/UrzasScienceFairProject.java | 2 +- Mage.Sets/src/mage/cards/u/UrzasTome.java | 2 +- Mage.Sets/src/mage/cards/v/VaevictisAsmadiTheDire.java | 4 ++-- Mage.Sets/src/mage/cards/v/ValdukKeeperOfTheFlame.java | 2 +- Mage.Sets/src/mage/cards/v/ValeronWardens.java | 2 +- Mage.Sets/src/mage/cards/v/ValkiGodOfLies.java | 8 ++++---- Mage.Sets/src/mage/cards/v/ValorOfTheWorthy.java | 2 +- Mage.Sets/src/mage/cards/v/VampireNocturnus.java | 2 +- Mage.Sets/src/mage/cards/v/VampireRevenant.java | 2 +- Mage.Sets/src/mage/cards/v/Vampirism.java | 2 +- Mage.Sets/src/mage/cards/v/VancesBlastingCannons.java | 6 +++--- Mage.Sets/src/mage/cards/v/VanguardsShield.java | 2 +- Mage.Sets/src/mage/cards/v/VanishIntoMemory.java | 6 +++--- Mage.Sets/src/mage/cards/v/VanquishersBanner.java | 2 +- Mage.Sets/src/mage/cards/v/VaporousDjinn.java | 2 +- Mage.Sets/src/mage/cards/v/VarchildsWarRiders.java | 2 +- Mage.Sets/src/mage/cards/v/VarinaLichQueen.java | 2 +- Mage.Sets/src/mage/cards/v/VassalsDuty.java | 2 +- Mage.Sets/src/mage/cards/v/VastwoodAnimist.java | 4 ++-- Mage.Sets/src/mage/cards/v/VastwoodHydra.java | 2 +- Mage.Sets/src/mage/cards/v/VaultOfWhispers.java | 2 +- Mage.Sets/src/mage/cards/v/VaultSkyward.java | 2 +- Mage.Sets/src/mage/cards/v/VectisDominator.java | 2 +- Mage.Sets/src/mage/cards/v/VectisSilencers.java | 2 +- Mage.Sets/src/mage/cards/v/VectorAsp.java | 2 +- Mage.Sets/src/mage/cards/v/VedalkenEngineer.java | 2 +- Mage.Sets/src/mage/cards/v/VedalkenInfuser.java | 2 +- Mage.Sets/src/mage/cards/v/VeilOfBirds.java | 2 +- Mage.Sets/src/mage/cards/v/VeiledApparition.java | 2 +- Mage.Sets/src/mage/cards/v/VeiledCrocodile.java | 4 ++-- Mage.Sets/src/mage/cards/v/VeiledSentry.java | 2 +- Mage.Sets/src/mage/cards/v/VeiledSerpent.java | 2 +- Mage.Sets/src/mage/cards/v/VeilingOddity.java | 2 +- Mage.Sets/src/mage/cards/v/VeilstoneAmulet.java | 2 +- Mage.Sets/src/mage/cards/v/VeinfireBorderpost.java | 2 +- Mage.Sets/src/mage/cards/v/VenarianGlimmer.java | 2 +- Mage.Sets/src/mage/cards/v/Vendetta.java | 2 +- Mage.Sets/src/mage/cards/v/VeneratedTeacher.java | 2 +- Mage.Sets/src/mage/cards/v/VengefulArchon.java | 2 +- Mage.Sets/src/mage/cards/v/VengefulPharaoh.java | 4 ++-- Mage.Sets/src/mage/cards/v/VengefulRebirth.java | 2 +- Mage.Sets/src/mage/cards/v/Vengevine.java | 2 +- Mage.Sets/src/mage/cards/v/VenomousBreath.java | 4 ++-- Mage.Sets/src/mage/cards/v/VensersDiffusion.java | 2 +- Mage.Sets/src/mage/cards/v/VerdantSuccession.java | 2 +- Mage.Sets/src/mage/cards/v/VerdantSunsAvatar.java | 4 ++-- Mage.Sets/src/mage/cards/v/VergeRangers.java | 2 +- Mage.Sets/src/mage/cards/v/VesuvanDoppelganger.java | 2 +- Mage.Sets/src/mage/cards/v/VeteranBrawlers.java | 2 +- Mage.Sets/src/mage/cards/v/VeteranExplorer.java | 2 +- Mage.Sets/src/mage/cards/v/VeteransReflexes.java | 2 +- Mage.Sets/src/mage/cards/v/Vex.java | 2 +- Mage.Sets/src/mage/cards/v/VexingArcanix.java | 2 +- Mage.Sets/src/mage/cards/v/VexingShusher.java | 2 +- Mage.Sets/src/mage/cards/v/Vexis.java | 2 +- Mage.Sets/src/mage/cards/v/VhatiIlDal.java | 2 +- Mage.Sets/src/mage/cards/v/VialSmasherTheFierce.java | 2 +- Mage.Sets/src/mage/cards/v/ViashinoBey.java | 2 +- Mage.Sets/src/mage/cards/v/ViashinoHeretic.java | 2 +- Mage.Sets/src/mage/cards/v/ViashinoSandswimmer.java | 2 +- Mage.Sets/src/mage/cards/v/ViashivanDragon.java | 2 +- Mage.Sets/src/mage/cards/v/VictoryChimes.java | 2 +- Mage.Sets/src/mage/cards/v/VictorysHerald.java | 2 +- Mage.Sets/src/mage/cards/v/VigeanHydropon.java | 2 +- Mage.Sets/src/mage/cards/v/VigeanIntuition.java | 2 +- Mage.Sets/src/mage/cards/v/Vigilance.java | 2 +- Mage.Sets/src/mage/cards/v/VigorousCharge.java | 2 +- Mage.Sets/src/mage/cards/v/VildinPackAlpha.java | 2 +- Mage.Sets/src/mage/cards/v/VileRedeemer.java | 2 +- Mage.Sets/src/mage/cards/v/VillageCannibals.java | 2 +- Mage.Sets/src/mage/cards/v/VillainousWealth.java | 2 +- Mage.Sets/src/mage/cards/v/Vindicate.java | 2 +- Mage.Sets/src/mage/cards/v/VindictiveVampire.java | 2 +- Mage.Sets/src/mage/cards/v/ViolentUltimatum.java | 2 +- Mage.Sets/src/mage/cards/v/ViridescentWisps.java | 2 +- Mage.Sets/src/mage/cards/v/ViridianClaw.java | 2 +- Mage.Sets/src/mage/cards/v/ViridianCorrupter.java | 2 +- Mage.Sets/src/mage/cards/v/ViridianRevel.java | 2 +- Mage.Sets/src/mage/cards/v/Viseling.java | 2 +- Mage.Sets/src/mage/cards/v/VisionsOfBeyond.java | 2 +- Mage.Sets/src/mage/cards/v/VisionsOfBrutality.java | 2 +- Mage.Sets/src/mage/cards/v/VithianRenegades.java | 2 +- Mage.Sets/src/mage/cards/v/VizierOfDeferment.java | 2 +- Mage.Sets/src/mage/cards/v/VizierOfRemedies.java | 2 +- Mage.Sets/src/mage/cards/v/VizierOfTheAnointed.java | 2 +- Mage.Sets/src/mage/cards/v/VizierOfTheMenagerie.java | 2 +- Mage.Sets/src/mage/cards/v/VizierOfTheTrue.java | 2 +- Mage.Sets/src/mage/cards/v/VizkopaConfessor.java | 2 +- Mage.Sets/src/mage/cards/v/VizkopaGuildmage.java | 4 ++-- Mage.Sets/src/mage/cards/v/VodalianWarMachine.java | 2 +- Mage.Sets/src/mage/cards/v/VoidMaw.java | 4 ++-- Mage.Sets/src/mage/cards/v/VoidWinnower.java | 4 ++-- Mage.Sets/src/mage/cards/v/VoidstoneGargoyle.java | 4 ++-- Mage.Sets/src/mage/cards/v/Voidwalk.java | 2 +- Mage.Sets/src/mage/cards/v/VolcanicEruption.java | 2 +- Mage.Sets/src/mage/cards/v/VolcanicVision.java | 2 +- Mage.Sets/src/mage/cards/v/VolcanoHellion.java | 2 +- Mage.Sets/src/mage/cards/v/VolitionReins.java | 2 +- Mage.Sets/src/mage/cards/v/VolrathsCurse.java | 8 ++++---- Mage.Sets/src/mage/cards/v/VolrathsDungeon.java | 2 +- Mage.Sets/src/mage/cards/v/VolrathsShapeshifter.java | 2 +- Mage.Sets/src/mage/cards/v/VolunteerReserves.java | 2 +- Mage.Sets/src/mage/cards/v/VonasHunger.java | 2 +- Mage.Sets/src/mage/cards/v/VorelOfTheHullClade.java | 2 +- Mage.Sets/src/mage/cards/v/VorracBattlehorns.java | 2 +- Mage.Sets/src/mage/cards/v/VortexElemental.java | 2 +- Mage.Sets/src/mage/cards/v/VotaryOfTheConclave.java | 2 +- Mage.Sets/src/mage/cards/v/VoyagerStaff.java | 2 +- Mage.Sets/src/mage/cards/v/VraskaRegalGorgon.java | 2 +- Mage.Sets/src/mage/cards/v/VraskaRelicSeeker.java | 2 +- Mage.Sets/src/mage/cards/v/VraskaSwarmsEminence.java | 2 +- Mage.Sets/src/mage/cards/v/VraskaTheUnseen.java | 4 ++-- Mage.Sets/src/mage/cards/v/VraskasStoneglare.java | 2 +- Mage.Sets/src/mage/cards/v/VulshokBattlegear.java | 2 +- Mage.Sets/src/mage/cards/v/VulshokBattlemaster.java | 2 +- Mage.Sets/src/mage/cards/v/VulshokGauntlets.java | 2 +- Mage.Sets/src/mage/cards/v/VulshokHeartstoker.java | 2 +- 171 files changed, 200 insertions(+), 200 deletions(-) diff --git a/Mage.Sets/src/mage/cards/u/UbaMask.java b/Mage.Sets/src/mage/cards/u/UbaMask.java index 99b0222b6cf..21b90d08720 100644 --- a/Mage.Sets/src/mage/cards/u/UbaMask.java +++ b/Mage.Sets/src/mage/cards/u/UbaMask.java @@ -95,7 +95,7 @@ class UbaMaskPlayEffect extends AsThoughEffectImpl { staticText = "Each player may play lands and cast spells from among cards they exiled with {this} this turn"; } - public UbaMaskPlayEffect(final UbaMaskPlayEffect effect) { + private UbaMaskPlayEffect(final UbaMaskPlayEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/u/UginTheSpiritDragon.java b/Mage.Sets/src/mage/cards/u/UginTheSpiritDragon.java index e3bb75c8b33..1ab8217f9fc 100644 --- a/Mage.Sets/src/mage/cards/u/UginTheSpiritDragon.java +++ b/Mage.Sets/src/mage/cards/u/UginTheSpiritDragon.java @@ -74,7 +74,7 @@ class UginTheSpiritDragonEffect2 extends OneShotEffect { this.staticText = "exile each permanent with mana value X or less that's one or more colors"; } - public UginTheSpiritDragonEffect2(final UginTheSpiritDragonEffect2 effect) { + private UginTheSpiritDragonEffect2(final UginTheSpiritDragonEffect2 effect) { super(effect); } @@ -114,7 +114,7 @@ class UginTheSpiritDragonEffect3 extends OneShotEffect { this.staticText = "You gain 7 life, draw seven cards, then put up to seven permanent cards from your hand onto the battlefield"; } - public UginTheSpiritDragonEffect3(final UginTheSpiritDragonEffect3 effect) { + private UginTheSpiritDragonEffect3(final UginTheSpiritDragonEffect3 effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/u/UginsInsight.java b/Mage.Sets/src/mage/cards/u/UginsInsight.java index e506edba62a..9c33b38a328 100644 --- a/Mage.Sets/src/mage/cards/u/UginsInsight.java +++ b/Mage.Sets/src/mage/cards/u/UginsInsight.java @@ -42,7 +42,7 @@ class UginsInsightEffect extends OneShotEffect { this.staticText = "Scry X, where X is the highest mana value among permanents you control, then draw three cards"; } - public UginsInsightEffect(final UginsInsightEffect effect) { + private UginsInsightEffect(final UginsInsightEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/u/UginsNexus.java b/Mage.Sets/src/mage/cards/u/UginsNexus.java index abe9e16c92d..bf4c0d054c8 100644 --- a/Mage.Sets/src/mage/cards/u/UginsNexus.java +++ b/Mage.Sets/src/mage/cards/u/UginsNexus.java @@ -51,7 +51,7 @@ class UginsNexusSkipExtraTurnsEffect extends ReplacementEffectImpl { staticText = "If a player would begin an extra turn, that player skips that turn instead"; } - public UginsNexusSkipExtraTurnsEffect(final UginsNexusSkipExtraTurnsEffect effect) { + private UginsNexusSkipExtraTurnsEffect(final UginsNexusSkipExtraTurnsEffect effect) { super(effect); } @@ -89,7 +89,7 @@ class UginsNexusExileEffect extends ReplacementEffectImpl { staticText = "If {this} would be put into a graveyard from the battlefield, instead exile it and take an extra turn after this one"; } - public UginsNexusExileEffect(final UginsNexusExileEffect effect) { + private UginsNexusExileEffect(final UginsNexusExileEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/u/UglukOfTheWhiteHand.java b/Mage.Sets/src/mage/cards/u/UglukOfTheWhiteHand.java index 48a9283a315..9e8ff01ba6d 100644 --- a/Mage.Sets/src/mage/cards/u/UglukOfTheWhiteHand.java +++ b/Mage.Sets/src/mage/cards/u/UglukOfTheWhiteHand.java @@ -74,7 +74,7 @@ class UglukOfTheWhiteHandEffect extends OneShotEffect { "If that creature was a Goblin or Orc, put two +1/+1 counters on Ugluk instead."; } - public UglukOfTheWhiteHandEffect(final UglukOfTheWhiteHandEffect effect) { + private UglukOfTheWhiteHandEffect(final UglukOfTheWhiteHandEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/u/UlamogTheCeaselessHunger.java b/Mage.Sets/src/mage/cards/u/UlamogTheCeaselessHunger.java index bf6b04fea7f..2f35ff0c624 100644 --- a/Mage.Sets/src/mage/cards/u/UlamogTheCeaselessHunger.java +++ b/Mage.Sets/src/mage/cards/u/UlamogTheCeaselessHunger.java @@ -97,7 +97,7 @@ class UlamogAttackTriggeredAbility extends TriggeredAbilityImpl { setTriggerPhrase("Whenever {this} attacks, "); } - public UlamogAttackTriggeredAbility(final UlamogAttackTriggeredAbility ability) { + private UlamogAttackTriggeredAbility(final UlamogAttackTriggeredAbility ability) { super(ability); } @@ -132,7 +132,7 @@ class UlamogExileLibraryEffect extends OneShotEffect { this.staticText = "defending player exiles the top twenty cards of their library"; } - public UlamogExileLibraryEffect(final UlamogExileLibraryEffect effect) { + private UlamogExileLibraryEffect(final UlamogExileLibraryEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/u/UlamogsCrusher.java b/Mage.Sets/src/mage/cards/u/UlamogsCrusher.java index 4a1a6cf71f3..745ec48e6d3 100644 --- a/Mage.Sets/src/mage/cards/u/UlamogsCrusher.java +++ b/Mage.Sets/src/mage/cards/u/UlamogsCrusher.java @@ -26,7 +26,7 @@ public final class UlamogsCrusher extends CardImpl { this.addAbility(new AttacksEachCombatStaticAbility()); } - public UlamogsCrusher (final UlamogsCrusher card) { + private UlamogsCrusher(final UlamogsCrusher card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/u/UlamogsDespoiler.java b/Mage.Sets/src/mage/cards/u/UlamogsDespoiler.java index c8d7288e638..e59df2b6a91 100644 --- a/Mage.Sets/src/mage/cards/u/UlamogsDespoiler.java +++ b/Mage.Sets/src/mage/cards/u/UlamogsDespoiler.java @@ -64,7 +64,7 @@ class UlamogsDespoilerEffect extends OneShotEffect { this.staticText = "you may put two cards your opponents own from exile into their owners' graveyards. If you do, {this} enters the battlefield with four +1/+1 counters on it"; } - public UlamogsDespoilerEffect(final UlamogsDespoilerEffect effect) { + private UlamogsDespoilerEffect(final UlamogsDespoilerEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/u/UlamogsNullifier.java b/Mage.Sets/src/mage/cards/u/UlamogsNullifier.java index 5c2d36a9ecd..6681a5b321a 100644 --- a/Mage.Sets/src/mage/cards/u/UlamogsNullifier.java +++ b/Mage.Sets/src/mage/cards/u/UlamogsNullifier.java @@ -78,7 +78,7 @@ class UlamogsNullifierEffect extends OneShotEffect { this.staticText = "you may put two cards your opponents own from exile into their owners' graveyards. If you do, counter target spell."; } - public UlamogsNullifierEffect(final UlamogsNullifierEffect effect) { + private UlamogsNullifierEffect(final UlamogsNullifierEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/u/UlvenwaldMysteries.java b/Mage.Sets/src/mage/cards/u/UlvenwaldMysteries.java index 84ef4a3ce49..d0eb4729e4b 100644 --- a/Mage.Sets/src/mage/cards/u/UlvenwaldMysteries.java +++ b/Mage.Sets/src/mage/cards/u/UlvenwaldMysteries.java @@ -60,7 +60,7 @@ class UlvenwaldMysteriesTriggeredAbility extends TriggeredAbilityImpl { setTriggerPhrase("Whenever you sacrifice a Clue, "); } - public UlvenwaldMysteriesTriggeredAbility(final UlvenwaldMysteriesTriggeredAbility ability) { + private UlvenwaldMysteriesTriggeredAbility(final UlvenwaldMysteriesTriggeredAbility ability) { super(ability); } diff --git a/Mage.Sets/src/mage/cards/u/Umbilicus.java b/Mage.Sets/src/mage/cards/u/Umbilicus.java index b1765f341b9..006a6da9ac2 100644 --- a/Mage.Sets/src/mage/cards/u/Umbilicus.java +++ b/Mage.Sets/src/mage/cards/u/Umbilicus.java @@ -47,7 +47,7 @@ class BloodClockEffect extends OneShotEffect { this.staticText = "that player returns a permanent they control to its owner's hand unless they pay 2 life"; } - public BloodClockEffect(final BloodClockEffect effect) { + private BloodClockEffect(final BloodClockEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/u/UnbenderTine.java b/Mage.Sets/src/mage/cards/u/UnbenderTine.java index 1e8b4484aa8..a457df10476 100644 --- a/Mage.Sets/src/mage/cards/u/UnbenderTine.java +++ b/Mage.Sets/src/mage/cards/u/UnbenderTine.java @@ -58,7 +58,7 @@ class UnbenderTineEffect extends OneShotEffect { this.staticText = "Untap another target permanent"; } - public UnbenderTineEffect(final UnbenderTineEffect effect) { + private UnbenderTineEffect(final UnbenderTineEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/u/UnbreathingHorde.java b/Mage.Sets/src/mage/cards/u/UnbreathingHorde.java index 41b5d56b227..733e9124824 100644 --- a/Mage.Sets/src/mage/cards/u/UnbreathingHorde.java +++ b/Mage.Sets/src/mage/cards/u/UnbreathingHorde.java @@ -63,7 +63,7 @@ class UnbreathingHordeEntersEffect extends OneShotEffect { staticText = "{this} enters the battlefield with a +1/+1 counter on it for each other Zombie you control and each Zombie card in your graveyard"; } - public UnbreathingHordeEntersEffect(final UnbreathingHordeEntersEffect effect) { + private UnbreathingHordeEntersEffect(final UnbreathingHordeEntersEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/u/UncageTheMenagerie.java b/Mage.Sets/src/mage/cards/u/UncageTheMenagerie.java index a4e985b8a71..bff1d78b6ab 100644 --- a/Mage.Sets/src/mage/cards/u/UncageTheMenagerie.java +++ b/Mage.Sets/src/mage/cards/u/UncageTheMenagerie.java @@ -46,7 +46,7 @@ class UncageTheMenagerieEffect extends OneShotEffect { "that each have mana value X, reveal them, put them into your hand, then shuffle."; } - public UncageTheMenagerieEffect(final UncageTheMenagerieEffect effect) { + private UncageTheMenagerieEffect(final UncageTheMenagerieEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/u/UncheckedGrowth.java b/Mage.Sets/src/mage/cards/u/UncheckedGrowth.java index bc1ba40811c..3ac4c86d41c 100644 --- a/Mage.Sets/src/mage/cards/u/UncheckedGrowth.java +++ b/Mage.Sets/src/mage/cards/u/UncheckedGrowth.java @@ -48,7 +48,7 @@ public final class UncheckedGrowth extends CardImpl { staticText = "If it's a Spirit, it gains trample until end of turn"; } - public UncheckedGrowthTrampleEffect(final UncheckedGrowthTrampleEffect effect) { + private UncheckedGrowthTrampleEffect(final UncheckedGrowthTrampleEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/u/UnconventionalTactics.java b/Mage.Sets/src/mage/cards/u/UnconventionalTactics.java index 5dd0f448154..e855d21e4de 100644 --- a/Mage.Sets/src/mage/cards/u/UnconventionalTactics.java +++ b/Mage.Sets/src/mage/cards/u/UnconventionalTactics.java @@ -71,7 +71,7 @@ class UnconventionalTacticsTriggeredAbility extends TriggeredAbilityImpl { super(Zone.GRAVEYARD, new DoIfCostPaid(new ReturnToHandSourceEffect(), new ManaCostsImpl<>("{W}")), false); } - public UnconventionalTacticsTriggeredAbility(final UnconventionalTacticsTriggeredAbility ability) { + private UnconventionalTacticsTriggeredAbility(final UnconventionalTacticsTriggeredAbility ability) { super(ability); } diff --git a/Mage.Sets/src/mage/cards/u/UndeadAlchemist.java b/Mage.Sets/src/mage/cards/u/UndeadAlchemist.java index 9a8e25dad79..9a184a183a5 100644 --- a/Mage.Sets/src/mage/cards/u/UndeadAlchemist.java +++ b/Mage.Sets/src/mage/cards/u/UndeadAlchemist.java @@ -59,7 +59,7 @@ class UndeadAlchemistTriggeredAbility extends TriggeredAbilityImpl { this.addEffect(new CreateTokenEffect(new ZombieToken())); } - public UndeadAlchemistTriggeredAbility(final UndeadAlchemistTriggeredAbility ability) { + private UndeadAlchemistTriggeredAbility(final UndeadAlchemistTriggeredAbility ability) { super(ability); } diff --git a/Mage.Sets/src/mage/cards/u/UndercityInformer.java b/Mage.Sets/src/mage/cards/u/UndercityInformer.java index b974277ac36..5aefe924bc1 100644 --- a/Mage.Sets/src/mage/cards/u/UndercityInformer.java +++ b/Mage.Sets/src/mage/cards/u/UndercityInformer.java @@ -61,7 +61,7 @@ class UndercityInformerEffect extends OneShotEffect { this.staticText = "Target player reveals the top card of their library until they reveal a land card, then puts those cards into their graveyard"; } - public UndercityInformerEffect(final UndercityInformerEffect effect) { + private UndercityInformerEffect(final UndercityInformerEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/u/UnderrealmLich.java b/Mage.Sets/src/mage/cards/u/UnderrealmLich.java index 4ef262a38d3..fa0e2ecc7dc 100644 --- a/Mage.Sets/src/mage/cards/u/UnderrealmLich.java +++ b/Mage.Sets/src/mage/cards/u/UnderrealmLich.java @@ -69,7 +69,7 @@ class UnderrealmLichReplacementEffect extends ReplacementEffectImpl { + "and the rest into your graveyard."; } - public UnderrealmLichReplacementEffect(final UnderrealmLichReplacementEffect effect) { + private UnderrealmLichReplacementEffect(final UnderrealmLichReplacementEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/u/Undertow.java b/Mage.Sets/src/mage/cards/u/Undertow.java index b98c55d8595..3da048c3fa7 100644 --- a/Mage.Sets/src/mage/cards/u/Undertow.java +++ b/Mage.Sets/src/mage/cards/u/Undertow.java @@ -44,7 +44,7 @@ class UndertowEffect extends AsThoughEffectImpl { staticText = "Creatures with islandwalk can be blocked as though they didn't have islandwalk"; } - public UndertowEffect(final UndertowEffect effect) { + private UndertowEffect(final UndertowEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/u/UnderworldConnections.java b/Mage.Sets/src/mage/cards/u/UnderworldConnections.java index 770c6df6d8d..ce3b1a2e722 100644 --- a/Mage.Sets/src/mage/cards/u/UnderworldConnections.java +++ b/Mage.Sets/src/mage/cards/u/UnderworldConnections.java @@ -49,7 +49,7 @@ public final class UnderworldConnections extends CardImpl { this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(gainedAbility, AttachmentType.AURA, Duration.WhileOnBattlefield, rule))); } - public UnderworldConnections (final UnderworldConnections card) { + private UnderworldConnections(final UnderworldConnections card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/u/UnderworldSlums.java b/Mage.Sets/src/mage/cards/u/UnderworldSlums.java index 1bc8eb97812..93066d62bd6 100644 --- a/Mage.Sets/src/mage/cards/u/UnderworldSlums.java +++ b/Mage.Sets/src/mage/cards/u/UnderworldSlums.java @@ -47,7 +47,7 @@ public final class UnderworldSlums extends CardImpl { public static class UnderworldSlumsAbility extends ActivatedAbilityImpl { - public UnderworldSlumsAbility(UnderworldSlumsAbility ability) { + private UnderworldSlumsAbility(final UnderworldSlumsAbility ability) { super(ability); } diff --git a/Mage.Sets/src/mage/cards/u/UndiscoveredParadise.java b/Mage.Sets/src/mage/cards/u/UndiscoveredParadise.java index e599e7512ae..e0a66949940 100644 --- a/Mage.Sets/src/mage/cards/u/UndiscoveredParadise.java +++ b/Mage.Sets/src/mage/cards/u/UndiscoveredParadise.java @@ -49,7 +49,7 @@ class UndiscoveredParadiseEffect extends OneShotEffect { staticText = "During your next untap step, as you untap your permanents, return {this} to its owner's hand"; } - public UndiscoveredParadiseEffect(final UndiscoveredParadiseEffect effect) { + private UndiscoveredParadiseEffect(final UndiscoveredParadiseEffect effect) { super(effect); } @@ -78,7 +78,7 @@ class AtBeginningOfUntapDelayedTriggeredAbility extends DelayedTriggeredAbility this.usesStack = false; } - public AtBeginningOfUntapDelayedTriggeredAbility(AtBeginningOfUntapDelayedTriggeredAbility ability) { + private AtBeginningOfUntapDelayedTriggeredAbility(final AtBeginningOfUntapDelayedTriggeredAbility ability) { super(ability); } diff --git a/Mage.Sets/src/mage/cards/u/UndyingBeast.java b/Mage.Sets/src/mage/cards/u/UndyingBeast.java index 720aaf3f93c..7200c0a4030 100644 --- a/Mage.Sets/src/mage/cards/u/UndyingBeast.java +++ b/Mage.Sets/src/mage/cards/u/UndyingBeast.java @@ -49,7 +49,7 @@ class UndyingBeastEffect extends OneShotEffect { staticText = "put it on top of its owner's library"; } - public UndyingBeastEffect(final UndyingBeastEffect effect) { + private UndyingBeastEffect(final UndyingBeastEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/u/UndyingFlames.java b/Mage.Sets/src/mage/cards/u/UndyingFlames.java index 0fe67e37b9e..d8c4b29d8eb 100644 --- a/Mage.Sets/src/mage/cards/u/UndyingFlames.java +++ b/Mage.Sets/src/mage/cards/u/UndyingFlames.java @@ -50,7 +50,7 @@ class UndyingFlamesEffect extends OneShotEffect { staticText = "Exile cards from the top of your library until you exile a nonland card. {this} deals damage to any target equal to that card's mana value"; } - public UndyingFlamesEffect(final UndyingFlamesEffect effect) { + private UndyingFlamesEffect(final UndyingFlamesEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/u/UnexpectedResults.java b/Mage.Sets/src/mage/cards/u/UnexpectedResults.java index da2cd3b82e1..8ccd5785a59 100644 --- a/Mage.Sets/src/mage/cards/u/UnexpectedResults.java +++ b/Mage.Sets/src/mage/cards/u/UnexpectedResults.java @@ -73,7 +73,7 @@ class UnexpectedResultEffect extends OneShotEffect { + "and return {this} to its owner's hand"; } - public UnexpectedResultEffect(final UnexpectedResultEffect effect) { + private UnexpectedResultEffect(final UnexpectedResultEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/u/UnexpectedlyAbsent.java b/Mage.Sets/src/mage/cards/u/UnexpectedlyAbsent.java index 285a928ecbb..32c4b167ae8 100644 --- a/Mage.Sets/src/mage/cards/u/UnexpectedlyAbsent.java +++ b/Mage.Sets/src/mage/cards/u/UnexpectedlyAbsent.java @@ -45,7 +45,7 @@ class UnexpectedlyAbsentEffect extends OneShotEffect { this.staticText = "Put target nonland permanent into its owner's library just beneath the top X cards of that library"; } - public UnexpectedlyAbsentEffect(final UnexpectedlyAbsentEffect effect) { + private UnexpectedlyAbsentEffect(final UnexpectedlyAbsentEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/u/UnholyIndenture.java b/Mage.Sets/src/mage/cards/u/UnholyIndenture.java index ba308218be3..6982ec2a65d 100644 --- a/Mage.Sets/src/mage/cards/u/UnholyIndenture.java +++ b/Mage.Sets/src/mage/cards/u/UnholyIndenture.java @@ -60,7 +60,7 @@ class UnholyIndentureReturnEffect extends OneShotEffect { staticText = "return that card to the battlefield under your control with a +1/+1 counter on it"; } - public UnholyIndentureReturnEffect(final UnholyIndentureReturnEffect effect) { + private UnholyIndentureReturnEffect(final UnholyIndentureReturnEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/u/UnifiedWill.java b/Mage.Sets/src/mage/cards/u/UnifiedWill.java index b67fabadf30..9ad4c9c73d1 100644 --- a/Mage.Sets/src/mage/cards/u/UnifiedWill.java +++ b/Mage.Sets/src/mage/cards/u/UnifiedWill.java @@ -46,7 +46,7 @@ class UnifiedWillEffect extends OneShotEffect { staticText = "Counter target spell if you control more creatures than that spell's controller"; } - public UnifiedWillEffect(final UnifiedWillEffect effect) { + private UnifiedWillEffect(final UnifiedWillEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/u/UnifyingTheory.java b/Mage.Sets/src/mage/cards/u/UnifyingTheory.java index 389eb52472d..3a5c3c1a47c 100644 --- a/Mage.Sets/src/mage/cards/u/UnifyingTheory.java +++ b/Mage.Sets/src/mage/cards/u/UnifyingTheory.java @@ -49,7 +49,7 @@ class UnifyingTheoryEffect extends OneShotEffect { this.staticText = "that player may pay {2}. If the player does, they draw a card"; } - public UnifyingTheoryEffect(final UnifyingTheoryEffect effect) { + private UnifyingTheoryEffect(final UnifyingTheoryEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/u/Unmake.java b/Mage.Sets/src/mage/cards/u/Unmake.java index 554e945b6df..fb9388f3766 100644 --- a/Mage.Sets/src/mage/cards/u/Unmake.java +++ b/Mage.Sets/src/mage/cards/u/Unmake.java @@ -21,7 +21,7 @@ public final class Unmake extends CardImpl { this.getSpellAbility().addTarget(new TargetCreaturePermanent()); } - public Unmake (final Unmake card) { + private Unmake(final Unmake card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/u/UnmarkedGrave.java b/Mage.Sets/src/mage/cards/u/UnmarkedGrave.java index 07f93e420f8..f28abbecd50 100644 --- a/Mage.Sets/src/mage/cards/u/UnmarkedGrave.java +++ b/Mage.Sets/src/mage/cards/u/UnmarkedGrave.java @@ -51,7 +51,7 @@ class UnmarkedGraveEffect extends SearchEffect { staticText = "search your library for a nonlegendary card, put that card into your graveyard, then shuffle"; } - public UnmarkedGraveEffect(final UnmarkedGraveEffect effect) { + private UnmarkedGraveEffect(final UnmarkedGraveEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/u/UnmooredEgo.java b/Mage.Sets/src/mage/cards/u/UnmooredEgo.java index 4212da5b593..b942b7ea4af 100644 --- a/Mage.Sets/src/mage/cards/u/UnmooredEgo.java +++ b/Mage.Sets/src/mage/cards/u/UnmooredEgo.java @@ -51,7 +51,7 @@ class UnmooredEgoEffect extends OneShotEffect { this.staticText = "Search target opponent's graveyard, hand, and library for up to four cards with that name and exile them. That player shuffles, then draws a card for each card exiled from their hand this way"; } - public UnmooredEgoEffect(final UnmooredEgoEffect effect) { + private UnmooredEgoEffect(final UnmooredEgoEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/u/UnnaturalPredation.java b/Mage.Sets/src/mage/cards/u/UnnaturalPredation.java index a24deda427d..a440c0dd418 100644 --- a/Mage.Sets/src/mage/cards/u/UnnaturalPredation.java +++ b/Mage.Sets/src/mage/cards/u/UnnaturalPredation.java @@ -26,7 +26,7 @@ public final class UnnaturalPredation extends CardImpl { this.getSpellAbility().addTarget(new TargetCreaturePermanent()); } - public UnnaturalPredation (final UnnaturalPredation card) { + private UnnaturalPredation(final UnnaturalPredation card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/u/UnnaturalSpeed.java b/Mage.Sets/src/mage/cards/u/UnnaturalSpeed.java index 5d21a6b0bbf..b1dc3a9e579 100644 --- a/Mage.Sets/src/mage/cards/u/UnnaturalSpeed.java +++ b/Mage.Sets/src/mage/cards/u/UnnaturalSpeed.java @@ -27,7 +27,7 @@ public final class UnnaturalSpeed extends CardImpl { this.getSpellAbility().addTarget(new TargetCreaturePermanent()); } - public UnnaturalSpeed (final UnnaturalSpeed card) { + private UnnaturalSpeed(final UnnaturalSpeed card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/u/UnpleasantDiscovery.java b/Mage.Sets/src/mage/cards/u/UnpleasantDiscovery.java index 87e20899474..08cf81acc34 100644 --- a/Mage.Sets/src/mage/cards/u/UnpleasantDiscovery.java +++ b/Mage.Sets/src/mage/cards/u/UnpleasantDiscovery.java @@ -24,7 +24,7 @@ public class UnpleasantDiscovery extends CardImpl { .setText(" and mills two cards")); } - public UnpleasantDiscovery(final UnpleasantDiscovery card) { + private UnpleasantDiscovery(final UnpleasantDiscovery card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/u/UnscytheKillerOfKings.java b/Mage.Sets/src/mage/cards/u/UnscytheKillerOfKings.java index ca55de005f9..f27094e7a80 100644 --- a/Mage.Sets/src/mage/cards/u/UnscytheKillerOfKings.java +++ b/Mage.Sets/src/mage/cards/u/UnscytheKillerOfKings.java @@ -67,7 +67,7 @@ class UnscytheKillerOfKingsTriggeredAbility extends TriggeredAbilityImpl { setTriggerPhrase("Whenever a creature dealt damage by equipped creature this turn dies, "); } - public UnscytheKillerOfKingsTriggeredAbility(final UnscytheKillerOfKingsTriggeredAbility ability) { + private UnscytheKillerOfKingsTriggeredAbility(final UnscytheKillerOfKingsTriggeredAbility ability) { super(ability); } @@ -113,7 +113,7 @@ class UnscytheEffect extends OneShotEffect { this.staticText = "you may exile that card. If you do, create a 2/2 black Zombie creature token"; } - public UnscytheEffect(final UnscytheEffect effect) { + private UnscytheEffect(final UnscytheEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/u/UnstableFooting.java b/Mage.Sets/src/mage/cards/u/UnstableFooting.java index f8d7e15c28d..058ec876ac2 100644 --- a/Mage.Sets/src/mage/cards/u/UnstableFooting.java +++ b/Mage.Sets/src/mage/cards/u/UnstableFooting.java @@ -70,7 +70,7 @@ class UnstableFootingEffect extends ReplacementEffectImpl { staticText = "Damage can't be prevented this turn"; } - public UnstableFootingEffect(final UnstableFootingEffect effect) { + private UnstableFootingEffect(final UnstableFootingEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/u/UnstableShapeshifter.java b/Mage.Sets/src/mage/cards/u/UnstableShapeshifter.java index 9a6b24adad4..2e3974fe4e9 100644 --- a/Mage.Sets/src/mage/cards/u/UnstableShapeshifter.java +++ b/Mage.Sets/src/mage/cards/u/UnstableShapeshifter.java @@ -61,7 +61,7 @@ class UnstableShapeshifterEffect extends OneShotEffect { this.staticText = "{this} becomes a copy of that creature, except it has this ability"; } - public UnstableShapeshifterEffect(final UnstableShapeshifterEffect effect) { + private UnstableShapeshifterEffect(final UnstableShapeshifterEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/u/UnwindingClock.java b/Mage.Sets/src/mage/cards/u/UnwindingClock.java index 2061a5c0a81..9d694b6663b 100644 --- a/Mage.Sets/src/mage/cards/u/UnwindingClock.java +++ b/Mage.Sets/src/mage/cards/u/UnwindingClock.java @@ -44,7 +44,7 @@ class UnwindingClockEffect extends ContinuousEffectImpl { staticText = "Untap all artifacts you control during each other player's untap step"; } - public UnwindingClockEffect(final UnwindingClockEffect effect) { + private UnwindingClockEffect(final UnwindingClockEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/u/Upwelling.java b/Mage.Sets/src/mage/cards/u/Upwelling.java index 6f641c1886b..d7410aced6a 100644 --- a/Mage.Sets/src/mage/cards/u/Upwelling.java +++ b/Mage.Sets/src/mage/cards/u/Upwelling.java @@ -49,7 +49,7 @@ class UpwellingRuleEffect extends ContinuousEffectImpl { staticText = "Players don't lose unspent mana as steps and phases end"; } - public UpwellingRuleEffect(final UpwellingRuleEffect effect) { + private UpwellingRuleEffect(final UpwellingRuleEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/u/UrDrago.java b/Mage.Sets/src/mage/cards/u/UrDrago.java index a698b3780c1..e795d5e9eae 100644 --- a/Mage.Sets/src/mage/cards/u/UrDrago.java +++ b/Mage.Sets/src/mage/cards/u/UrDrago.java @@ -49,7 +49,7 @@ class UrDragoEffect extends AsThoughEffectImpl { staticText = "Creatures with swampwalk can be blocked as though they didn't have swampwalk"; } - public UrDragoEffect(final UrDragoEffect effect) { + private UrDragoEffect(final UrDragoEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/u/UrbanBurgeoning.java b/Mage.Sets/src/mage/cards/u/UrbanBurgeoning.java index c4fc31ac010..4bec80fcace 100644 --- a/Mage.Sets/src/mage/cards/u/UrbanBurgeoning.java +++ b/Mage.Sets/src/mage/cards/u/UrbanBurgeoning.java @@ -57,7 +57,7 @@ class UrbanBurgeoningUntapEffect extends ContinuousEffectImpl { staticText = "Untap this land during each other player's untap step"; } - public UrbanBurgeoningUntapEffect(final UrbanBurgeoningUntapEffect effect) { + private UrbanBurgeoningUntapEffect(final UrbanBurgeoningUntapEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/u/UrgeToFeed.java b/Mage.Sets/src/mage/cards/u/UrgeToFeed.java index cc018dc916e..bc572bc69ed 100644 --- a/Mage.Sets/src/mage/cards/u/UrgeToFeed.java +++ b/Mage.Sets/src/mage/cards/u/UrgeToFeed.java @@ -56,7 +56,7 @@ class UrgeToFeedEffect extends OneShotEffect { staticText = "You may tap any number of untapped Vampire creatures you control. If you do, put a +1/+1 counter on each of those Vampires"; } - public UrgeToFeedEffect(UrgeToFeedEffect effect) { + private UrgeToFeedEffect(final UrgeToFeedEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/u/UrgorosTheEmptyOne.java b/Mage.Sets/src/mage/cards/u/UrgorosTheEmptyOne.java index 6590d2cdc3c..02188b0d08f 100644 --- a/Mage.Sets/src/mage/cards/u/UrgorosTheEmptyOne.java +++ b/Mage.Sets/src/mage/cards/u/UrgorosTheEmptyOne.java @@ -54,7 +54,7 @@ class UrgorosTheEmptyOneEffect extends OneShotEffect { this.staticText = "that player discards a card at random. If the player can't, you draw a card"; } - public UrgorosTheEmptyOneEffect(final UrgorosTheEmptyOneEffect effect) { + private UrgorosTheEmptyOneEffect(final UrgorosTheEmptyOneEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/u/UrzaAcademyHeadmaster.java b/Mage.Sets/src/mage/cards/u/UrzaAcademyHeadmaster.java index ca085e00e77..e1ac4a3ceb5 100644 --- a/Mage.Sets/src/mage/cards/u/UrzaAcademyHeadmaster.java +++ b/Mage.Sets/src/mage/cards/u/UrzaAcademyHeadmaster.java @@ -113,7 +113,7 @@ class UrzaAcademyHeadmasterRandomEffect extends OneShotEffect { } } - public UrzaAcademyHeadmasterRandomEffect(final UrzaAcademyHeadmasterRandomEffect effect) { + private UrzaAcademyHeadmasterRandomEffect(final UrzaAcademyHeadmasterRandomEffect effect) { super(effect); this.selection = effect.selection; this.setInfo = effect.setInfo.copy(); @@ -472,7 +472,7 @@ class UrzaAcademyHeadmasterManaEffect extends OneShotEffect { super(Outcome.PutManaInPool); } - public UrzaAcademyHeadmasterManaEffect(final UrzaAcademyHeadmasterManaEffect effect) { + private UrzaAcademyHeadmasterManaEffect(final UrzaAcademyHeadmasterManaEffect effect) { super(effect); } @@ -536,7 +536,7 @@ class UrzaAcademyHeadmasterBrainstormEffect extends OneShotEffect { staticText = "draw three cards, then put a card from your hand on top of your library"; } - public UrzaAcademyHeadmasterBrainstormEffect(final UrzaAcademyHeadmasterBrainstormEffect effect) { + private UrzaAcademyHeadmasterBrainstormEffect(final UrzaAcademyHeadmasterBrainstormEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/u/UrzaLordHighArtificer.java b/Mage.Sets/src/mage/cards/u/UrzaLordHighArtificer.java index 2f52d5583c1..987c337718d 100644 --- a/Mage.Sets/src/mage/cards/u/UrzaLordHighArtificer.java +++ b/Mage.Sets/src/mage/cards/u/UrzaLordHighArtificer.java @@ -112,7 +112,7 @@ class UrzaLordHighArtificerManaEffect extends BasicManaEffect { this.filter = filter; } - public UrzaLordHighArtificerManaEffect(final UrzaLordHighArtificerManaEffect effect) { + private UrzaLordHighArtificerManaEffect(final UrzaLordHighArtificerManaEffect effect) { super(effect); this.filter = effect.filter.copy(); } diff --git a/Mage.Sets/src/mage/cards/u/UrzaPlaneswalker.java b/Mage.Sets/src/mage/cards/u/UrzaPlaneswalker.java index 994d3422be9..6c11b3354a5 100644 --- a/Mage.Sets/src/mage/cards/u/UrzaPlaneswalker.java +++ b/Mage.Sets/src/mage/cards/u/UrzaPlaneswalker.java @@ -100,7 +100,7 @@ class UrzaPlaneswalkerEffect extends ContinuousEffectImpl { staticText = "once during each of your turns, you may activate an additional loyalty ability of {this}"; } - public UrzaPlaneswalkerEffect(final UrzaPlaneswalkerEffect effect) { + private UrzaPlaneswalkerEffect(final UrzaPlaneswalkerEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/u/UrzasArmor.java b/Mage.Sets/src/mage/cards/u/UrzasArmor.java index 30dafd37dc8..9d2d8af1deb 100644 --- a/Mage.Sets/src/mage/cards/u/UrzasArmor.java +++ b/Mage.Sets/src/mage/cards/u/UrzasArmor.java @@ -43,7 +43,7 @@ class UrzasArmorEffect extends PreventionEffectImpl { this.staticText = "If a source would deal damage to you, prevent 1 of that damage"; } - public UrzasArmorEffect(UrzasArmorEffect effect) { + private UrzasArmorEffect(final UrzasArmorEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/u/UrzasAvenger.java b/Mage.Sets/src/mage/cards/u/UrzasAvenger.java index 342229d7d66..8199440857a 100644 --- a/Mage.Sets/src/mage/cards/u/UrzasAvenger.java +++ b/Mage.Sets/src/mage/cards/u/UrzasAvenger.java @@ -68,7 +68,7 @@ class UrzasAvengerEffect extends ContinuousEffectImpl { this.staticText = "{this} gets -1/-1 and gains your choice of banding, flying, first strike, or trample until end of turn"; } - public UrzasAvengerEffect(final UrzasAvengerEffect effect) { + private UrzasAvengerEffect(final UrzasAvengerEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/u/UrzasBauble.java b/Mage.Sets/src/mage/cards/u/UrzasBauble.java index 4360f9b830b..815cdc87d61 100644 --- a/Mage.Sets/src/mage/cards/u/UrzasBauble.java +++ b/Mage.Sets/src/mage/cards/u/UrzasBauble.java @@ -56,7 +56,7 @@ class LookAtRandomCardEffect extends OneShotEffect { this.staticText = "Look at a card at random in target player's hand"; } - public LookAtRandomCardEffect(final LookAtRandomCardEffect effect) { + private LookAtRandomCardEffect(final LookAtRandomCardEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/u/UrzasChalice.java b/Mage.Sets/src/mage/cards/u/UrzasChalice.java index a56c05acbb1..25083443f5c 100644 --- a/Mage.Sets/src/mage/cards/u/UrzasChalice.java +++ b/Mage.Sets/src/mage/cards/u/UrzasChalice.java @@ -42,7 +42,7 @@ class UrzasChaliceAbility extends TriggeredAbilityImpl { super(Zone.BATTLEFIELD, new DoIfCostPaid(new GainLifeEffect(1), new GenericManaCost(1)), false); } - public UrzasChaliceAbility(final UrzasChaliceAbility ability) { + private UrzasChaliceAbility(final UrzasChaliceAbility ability) { super(ability); } diff --git a/Mage.Sets/src/mage/cards/u/UrzasEngine.java b/Mage.Sets/src/mage/cards/u/UrzasEngine.java index 50c408df9fd..d339a457296 100644 --- a/Mage.Sets/src/mage/cards/u/UrzasEngine.java +++ b/Mage.Sets/src/mage/cards/u/UrzasEngine.java @@ -43,7 +43,7 @@ public final class UrzasEngine extends CardImpl { this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new UrzasEngineEffect(), new ManaCostsImpl<>("{3}"))); } - public UrzasEngine(final UrzasEngine card) { + private UrzasEngine(final UrzasEngine card) { super(card); } @@ -61,7 +61,7 @@ class UrzasEngineEffect extends OneShotEffect { this.staticText = "Attacking creatures banded with {this} gain trample until end of turn"; } - public UrzasEngineEffect(final UrzasEngineEffect effect) { + private UrzasEngineEffect(final UrzasEngineEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/u/UrzasHotTub.java b/Mage.Sets/src/mage/cards/u/UrzasHotTub.java index 431e1bde7d4..8b2c01aa28f 100644 --- a/Mage.Sets/src/mage/cards/u/UrzasHotTub.java +++ b/Mage.Sets/src/mage/cards/u/UrzasHotTub.java @@ -53,7 +53,7 @@ class UrzasHotTubEffect extends OneShotEffect { this.staticText = "Search your library for a card that shares a complete word in its name with the discarded card, reveal it, put it into your hand, then shuffle"; } - public UrzasHotTubEffect(final UrzasHotTubEffect effect) { + private UrzasHotTubEffect(final UrzasHotTubEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/u/UrzasScienceFairProject.java b/Mage.Sets/src/mage/cards/u/UrzasScienceFairProject.java index 29e314fbfee..d84744496e6 100644 --- a/Mage.Sets/src/mage/cards/u/UrzasScienceFairProject.java +++ b/Mage.Sets/src/mage/cards/u/UrzasScienceFairProject.java @@ -61,7 +61,7 @@ class UrzasScienceFairProjectEffect extends OneShotEffect { "
6 - It gets +2/+2 until end of turn"; } - public UrzasScienceFairProjectEffect(final UrzasScienceFairProjectEffect effect) { + private UrzasScienceFairProjectEffect(final UrzasScienceFairProjectEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/u/UrzasTome.java b/Mage.Sets/src/mage/cards/u/UrzasTome.java index c199883f366..88b262cc68a 100644 --- a/Mage.Sets/src/mage/cards/u/UrzasTome.java +++ b/Mage.Sets/src/mage/cards/u/UrzasTome.java @@ -51,7 +51,7 @@ class UrzasTomeEffect extends OneShotEffect { staticText = "Draw a card. Then discard a card unless you exile a historic card from your graveyard"; } - public UrzasTomeEffect(final UrzasTomeEffect effect) { + private UrzasTomeEffect(final UrzasTomeEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VaevictisAsmadiTheDire.java b/Mage.Sets/src/mage/cards/v/VaevictisAsmadiTheDire.java index b8ab3b44a94..6776c0f01a7 100644 --- a/Mage.Sets/src/mage/cards/v/VaevictisAsmadiTheDire.java +++ b/Mage.Sets/src/mage/cards/v/VaevictisAsmadiTheDire.java @@ -64,7 +64,7 @@ class VaevictisAsmadiTheDireTriggeredAbility extends TriggeredAbilityImpl { super(Zone.BATTLEFIELD, new VaevictisAsmadiTheDireEffect(), false); } - public VaevictisAsmadiTheDireTriggeredAbility(final VaevictisAsmadiTheDireTriggeredAbility ability) { + private VaevictisAsmadiTheDireTriggeredAbility(final VaevictisAsmadiTheDireTriggeredAbility ability) { super(ability); } @@ -117,7 +117,7 @@ class VaevictisAsmadiTheDireEffect extends OneShotEffect { + "then puts it onto the battlefield if it's a permanent card"; } - public VaevictisAsmadiTheDireEffect(final VaevictisAsmadiTheDireEffect effect) { + private VaevictisAsmadiTheDireEffect(final VaevictisAsmadiTheDireEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/ValdukKeeperOfTheFlame.java b/Mage.Sets/src/mage/cards/v/ValdukKeeperOfTheFlame.java index c3025201dac..76bff0ab9ef 100644 --- a/Mage.Sets/src/mage/cards/v/ValdukKeeperOfTheFlame.java +++ b/Mage.Sets/src/mage/cards/v/ValdukKeeperOfTheFlame.java @@ -56,7 +56,7 @@ class ValdukKeeperOfTheFlameEffect extends OneShotEffect { this.staticText = "for each Aura and Equipment attached to {this}, create a 3/1 red Elemental creature token with trample and haste. Exile those tokens at the beginning of the next end step"; } - public ValdukKeeperOfTheFlameEffect(final ValdukKeeperOfTheFlameEffect effect) { + private ValdukKeeperOfTheFlameEffect(final ValdukKeeperOfTheFlameEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/ValeronWardens.java b/Mage.Sets/src/mage/cards/v/ValeronWardens.java index 2be01f4c57b..056b021d1bb 100644 --- a/Mage.Sets/src/mage/cards/v/ValeronWardens.java +++ b/Mage.Sets/src/mage/cards/v/ValeronWardens.java @@ -52,7 +52,7 @@ class ValeronWardensTriggeredAbility extends TriggeredAbilityImpl { super(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), false); } - public ValeronWardensTriggeredAbility(final ValeronWardensTriggeredAbility ability) { + private ValeronWardensTriggeredAbility(final ValeronWardensTriggeredAbility ability) { super(ability); } diff --git a/Mage.Sets/src/mage/cards/v/ValkiGodOfLies.java b/Mage.Sets/src/mage/cards/v/ValkiGodOfLies.java index 112e223b680..97478084cde 100644 --- a/Mage.Sets/src/mage/cards/v/ValkiGodOfLies.java +++ b/Mage.Sets/src/mage/cards/v/ValkiGodOfLies.java @@ -150,7 +150,7 @@ class ValkiGodOfLiesCopyExiledEffect extends OneShotEffect { this.staticText = "Choose a creature card exiled with Valki with mana value X. Valki becomes a copy of that card."; } - public ValkiGodOfLiesCopyExiledEffect(final ValkiGodOfLiesCopyExiledEffect effect) { + private ValkiGodOfLiesCopyExiledEffect(final ValkiGodOfLiesCopyExiledEffect effect) { super(effect); } @@ -193,7 +193,7 @@ class ExileTopCardEachPlayersLibrary extends OneShotEffect { this.staticText = "Exile the top card of each player's library"; } - public ExileTopCardEachPlayersLibrary(final ExileTopCardEachPlayersLibrary effect) { + private ExileTopCardEachPlayersLibrary(final ExileTopCardEachPlayersLibrary effect) { super(effect); } @@ -234,7 +234,7 @@ class ExileTargetArtifactOrCreatureEffect extends OneShotEffect { this.staticText = "Exile target artifact or creature"; } - public ExileTargetArtifactOrCreatureEffect(final ExileTargetArtifactOrCreatureEffect effect) { + private ExileTargetArtifactOrCreatureEffect(final ExileTargetArtifactOrCreatureEffect effect) { super(effect); } @@ -267,7 +267,7 @@ class ExileAllCardsFromAllGraveyards extends OneShotEffect { this.staticText = "Exile all graveyards. Add {R}{R}{R}"; } - public ExileAllCardsFromAllGraveyards(final ExileAllCardsFromAllGraveyards effect) { + private ExileAllCardsFromAllGraveyards(final ExileAllCardsFromAllGraveyards effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/ValorOfTheWorthy.java b/Mage.Sets/src/mage/cards/v/ValorOfTheWorthy.java index df6df842e0c..d34eec16a03 100644 --- a/Mage.Sets/src/mage/cards/v/ValorOfTheWorthy.java +++ b/Mage.Sets/src/mage/cards/v/ValorOfTheWorthy.java @@ -63,7 +63,7 @@ class LeavesTheBattlefieldAttachedTriggeredAbility extends ZoneChangeTriggeredAb super(Zone.BATTLEFIELD, new CreateTokenEffect(new SpiritWhiteToken()), "When enchanted creature leaves the battlefield, ", Boolean.FALSE); } - public LeavesTheBattlefieldAttachedTriggeredAbility(final LeavesTheBattlefieldAttachedTriggeredAbility ability) { + private LeavesTheBattlefieldAttachedTriggeredAbility(final LeavesTheBattlefieldAttachedTriggeredAbility ability) { super(ability); } diff --git a/Mage.Sets/src/mage/cards/v/VampireNocturnus.java b/Mage.Sets/src/mage/cards/v/VampireNocturnus.java index 0841e1f95c7..fffa6f48b4a 100644 --- a/Mage.Sets/src/mage/cards/v/VampireNocturnus.java +++ b/Mage.Sets/src/mage/cards/v/VampireNocturnus.java @@ -76,7 +76,7 @@ class VampireNocturnusAbility extends StaticAbility { new VampireNocturnusCondition(), "")); } - public VampireNocturnusAbility(VampireNocturnusAbility ability) { + private VampireNocturnusAbility(final VampireNocturnusAbility ability) { super(ability); } diff --git a/Mage.Sets/src/mage/cards/v/VampireRevenant.java b/Mage.Sets/src/mage/cards/v/VampireRevenant.java index 984f9bf73a1..fcad2fbc15a 100644 --- a/Mage.Sets/src/mage/cards/v/VampireRevenant.java +++ b/Mage.Sets/src/mage/cards/v/VampireRevenant.java @@ -27,7 +27,7 @@ public final class VampireRevenant extends CardImpl { this.addAbility(FlyingAbility.getInstance()); } - public VampireRevenant (final VampireRevenant card) { + private VampireRevenant(final VampireRevenant card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/v/Vampirism.java b/Mage.Sets/src/mage/cards/v/Vampirism.java index d246e31c698..b24ba81960e 100644 --- a/Mage.Sets/src/mage/cards/v/Vampirism.java +++ b/Mage.Sets/src/mage/cards/v/Vampirism.java @@ -69,7 +69,7 @@ class VampirismBoostEnchantedEffect extends ContinuousEffectImpl { staticText = "Enchanted creature gets +1/+1 for each other creature you control"; } - public VampirismBoostEnchantedEffect(final VampirismBoostEnchantedEffect effect) { + private VampirismBoostEnchantedEffect(final VampirismBoostEnchantedEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VancesBlastingCannons.java b/Mage.Sets/src/mage/cards/v/VancesBlastingCannons.java index 2b4db2d8074..19cefafbc3f 100644 --- a/Mage.Sets/src/mage/cards/v/VancesBlastingCannons.java +++ b/Mage.Sets/src/mage/cards/v/VancesBlastingCannons.java @@ -64,7 +64,7 @@ class VancesBlastingCannonsExileEffect extends OneShotEffect { this.staticText = "exile the top card of your library. If it's a nonland card, you may cast that card this turn"; } - public VancesBlastingCannonsExileEffect(final VancesBlastingCannonsExileEffect effect) { + private VancesBlastingCannonsExileEffect(final VancesBlastingCannonsExileEffect effect) { super(effect); } @@ -101,7 +101,7 @@ class CastFromNonHandZoneTargetEffect extends AsThoughEffectImpl { staticText = "If it's a nonland card, you may cast that card this turn"; } - public CastFromNonHandZoneTargetEffect(final CastFromNonHandZoneTargetEffect effect) { + private CastFromNonHandZoneTargetEffect(final CastFromNonHandZoneTargetEffect effect) { super(effect); } @@ -134,7 +134,7 @@ class VancesBlastingCannonsFlipTrigger extends TriggeredAbilityImpl { super(Zone.BATTLEFIELD, new TransformSourceEffect(), true); } - public VancesBlastingCannonsFlipTrigger(final VancesBlastingCannonsFlipTrigger ability) { + private VancesBlastingCannonsFlipTrigger(final VancesBlastingCannonsFlipTrigger ability) { super(ability); } diff --git a/Mage.Sets/src/mage/cards/v/VanguardsShield.java b/Mage.Sets/src/mage/cards/v/VanguardsShield.java index 7512b1c98eb..c333d3d5081 100644 --- a/Mage.Sets/src/mage/cards/v/VanguardsShield.java +++ b/Mage.Sets/src/mage/cards/v/VanguardsShield.java @@ -57,7 +57,7 @@ class VanguardsShieldEffect extends ContinuousEffectImpl { staticText = "Equipped creature can block an additional creature each combat"; } - public VanguardsShieldEffect(final VanguardsShieldEffect effect) { + private VanguardsShieldEffect(final VanguardsShieldEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VanishIntoMemory.java b/Mage.Sets/src/mage/cards/v/VanishIntoMemory.java index cc36c1e5411..fce0cc86b68 100644 --- a/Mage.Sets/src/mage/cards/v/VanishIntoMemory.java +++ b/Mage.Sets/src/mage/cards/v/VanishIntoMemory.java @@ -61,7 +61,7 @@ class VanishIntoMemoryEffect extends OneShotEffect { staticText = "Exile target creature. You draw cards equal to that creature's power. At the beginning of your next upkeep, return that card to the battlefield under its owner's control. If you do, discard cards equal to that creature's toughness"; } - public VanishIntoMemoryEffect(final VanishIntoMemoryEffect effect) { + private VanishIntoMemoryEffect(final VanishIntoMemoryEffect effect) { super(effect); } @@ -100,7 +100,7 @@ class VanishIntoMemoryReturnFromExileEffect extends OneShotEffect { staticText = "return that card to the battlefield under its owner's control"; } - public VanishIntoMemoryReturnFromExileEffect(final VanishIntoMemoryReturnFromExileEffect effect) { + private VanishIntoMemoryReturnFromExileEffect(final VanishIntoMemoryReturnFromExileEffect effect) { super(effect); } @@ -133,7 +133,7 @@ class VanishIntoMemoryEntersBattlefieldEffect extends ReplacementEffectImpl { staticText = "discard cards equal to that creature's toughness."; } - public VanishIntoMemoryEntersBattlefieldEffect(VanishIntoMemoryEntersBattlefieldEffect effect) { + private VanishIntoMemoryEntersBattlefieldEffect(final VanishIntoMemoryEntersBattlefieldEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VanquishersBanner.java b/Mage.Sets/src/mage/cards/v/VanquishersBanner.java index 931ecc60095..be008e6500f 100644 --- a/Mage.Sets/src/mage/cards/v/VanquishersBanner.java +++ b/Mage.Sets/src/mage/cards/v/VanquishersBanner.java @@ -63,7 +63,7 @@ class DrawCardIfCreatureTypeAbility extends TriggeredAbilityImpl { super(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), false); } - public DrawCardIfCreatureTypeAbility(final DrawCardIfCreatureTypeAbility ability) { + private DrawCardIfCreatureTypeAbility(final DrawCardIfCreatureTypeAbility ability) { super(ability); } diff --git a/Mage.Sets/src/mage/cards/v/VaporousDjinn.java b/Mage.Sets/src/mage/cards/v/VaporousDjinn.java index e4de6142f18..bdeb32c7267 100644 --- a/Mage.Sets/src/mage/cards/v/VaporousDjinn.java +++ b/Mage.Sets/src/mage/cards/v/VaporousDjinn.java @@ -55,7 +55,7 @@ class VaporousDjinnEffect extends OneShotEffect { this.staticText = "{this} phases out unless you pay {U}{U}"; } - public VaporousDjinnEffect(final VaporousDjinnEffect effect) { + private VaporousDjinnEffect(final VaporousDjinnEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VarchildsWarRiders.java b/Mage.Sets/src/mage/cards/v/VarchildsWarRiders.java index 8ea37690b4e..3ac0b1dcb6d 100644 --- a/Mage.Sets/src/mage/cards/v/VarchildsWarRiders.java +++ b/Mage.Sets/src/mage/cards/v/VarchildsWarRiders.java @@ -59,7 +59,7 @@ class OpponentCreateSurvivorTokenCost extends CostImpl { this.text = "Have an opponent create a 1/1 red Survivor creature token"; } - public OpponentCreateSurvivorTokenCost(OpponentCreateSurvivorTokenCost cost) { + private OpponentCreateSurvivorTokenCost(final OpponentCreateSurvivorTokenCost cost) { super(cost); } diff --git a/Mage.Sets/src/mage/cards/v/VarinaLichQueen.java b/Mage.Sets/src/mage/cards/v/VarinaLichQueen.java index eb5ac1f1314..3b953b4dea9 100644 --- a/Mage.Sets/src/mage/cards/v/VarinaLichQueen.java +++ b/Mage.Sets/src/mage/cards/v/VarinaLichQueen.java @@ -72,7 +72,7 @@ class VarinaLichQueenTriggeredAbility extends TriggeredAbilityImpl { super(Zone.BATTLEFIELD, null, false); } - public VarinaLichQueenTriggeredAbility(final VarinaLichQueenTriggeredAbility ability) { + private VarinaLichQueenTriggeredAbility(final VarinaLichQueenTriggeredAbility ability) { super(ability); } diff --git a/Mage.Sets/src/mage/cards/v/VassalsDuty.java b/Mage.Sets/src/mage/cards/v/VassalsDuty.java index 19e97adb25d..632c0623967 100644 --- a/Mage.Sets/src/mage/cards/v/VassalsDuty.java +++ b/Mage.Sets/src/mage/cards/v/VassalsDuty.java @@ -56,7 +56,7 @@ class VassalsDutyPreventDamageTargetEffect extends RedirectionEffect { staticText = "The next " + amount + " damage that would be dealt to target legendary creature you control this turn is dealt to you instead"; } - public VassalsDutyPreventDamageTargetEffect(final VassalsDutyPreventDamageTargetEffect effect) { + private VassalsDutyPreventDamageTargetEffect(final VassalsDutyPreventDamageTargetEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VastwoodAnimist.java b/Mage.Sets/src/mage/cards/v/VastwoodAnimist.java index cbfc9cd0a2d..8223589591d 100644 --- a/Mage.Sets/src/mage/cards/v/VastwoodAnimist.java +++ b/Mage.Sets/src/mage/cards/v/VastwoodAnimist.java @@ -63,7 +63,7 @@ class VastwoodAnimistEffect extends OneShotEffect { this.staticText = "Target land you control becomes an X/X Elemental creature until end of turn, where X is the number of Allies you control. It's still a land."; } - public VastwoodAnimistEffect(final VastwoodAnimistEffect effect) { + private VastwoodAnimistEffect(final VastwoodAnimistEffect effect) { super(effect); } @@ -91,7 +91,7 @@ class VastwoodAnimistElementalToken extends TokenImpl { power = new MageInt(amount); toughness = new MageInt(amount); } - public VastwoodAnimistElementalToken(final VastwoodAnimistElementalToken token) { + private VastwoodAnimistElementalToken(final VastwoodAnimistElementalToken token) { super(token); } diff --git a/Mage.Sets/src/mage/cards/v/VastwoodHydra.java b/Mage.Sets/src/mage/cards/v/VastwoodHydra.java index 4fe2911bd24..cef0107e134 100644 --- a/Mage.Sets/src/mage/cards/v/VastwoodHydra.java +++ b/Mage.Sets/src/mage/cards/v/VastwoodHydra.java @@ -67,7 +67,7 @@ class VastwoodHydraDistributeEffect extends OneShotEffect { this.staticText = "distribute a number of +1/+1 counters equal to the number of +1/+1 counters on {this} among any number of creatures you control"; } - public VastwoodHydraDistributeEffect(final VastwoodHydraDistributeEffect effect) { + private VastwoodHydraDistributeEffect(final VastwoodHydraDistributeEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VaultOfWhispers.java b/Mage.Sets/src/mage/cards/v/VaultOfWhispers.java index b4cbe48fddf..f42407b13e5 100644 --- a/Mage.Sets/src/mage/cards/v/VaultOfWhispers.java +++ b/Mage.Sets/src/mage/cards/v/VaultOfWhispers.java @@ -19,7 +19,7 @@ public final class VaultOfWhispers extends CardImpl { this.addAbility(new BlackManaAbility()); } - public VaultOfWhispers (final VaultOfWhispers card) { + private VaultOfWhispers(final VaultOfWhispers card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/v/VaultSkyward.java b/Mage.Sets/src/mage/cards/v/VaultSkyward.java index 59df4ea7e0c..35b2c2e6f45 100644 --- a/Mage.Sets/src/mage/cards/v/VaultSkyward.java +++ b/Mage.Sets/src/mage/cards/v/VaultSkyward.java @@ -26,7 +26,7 @@ public final class VaultSkyward extends CardImpl { this.getSpellAbility().addTarget(new TargetCreaturePermanent()); } - public VaultSkyward (final VaultSkyward card) { + private VaultSkyward(final VaultSkyward card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/v/VectisDominator.java b/Mage.Sets/src/mage/cards/v/VectisDominator.java index f9989434552..f4121d2c494 100644 --- a/Mage.Sets/src/mage/cards/v/VectisDominator.java +++ b/Mage.Sets/src/mage/cards/v/VectisDominator.java @@ -60,7 +60,7 @@ class VectisDominatorEffect extends OneShotEffect { this.cost = cost; } - public VectisDominatorEffect(final VectisDominatorEffect effect) { + private VectisDominatorEffect(final VectisDominatorEffect effect) { super(effect); this.cost = effect.cost.copy(); } diff --git a/Mage.Sets/src/mage/cards/v/VectisSilencers.java b/Mage.Sets/src/mage/cards/v/VectisSilencers.java index f2b8b232614..9367db36753 100644 --- a/Mage.Sets/src/mage/cards/v/VectisSilencers.java +++ b/Mage.Sets/src/mage/cards/v/VectisSilencers.java @@ -31,7 +31,7 @@ public final class VectisSilencers extends CardImpl { this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(DeathtouchAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl<>("{2}{B}"))); } - public VectisSilencers (final VectisSilencers card) { + private VectisSilencers(final VectisSilencers card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/v/VectorAsp.java b/Mage.Sets/src/mage/cards/v/VectorAsp.java index 13b2e4b92eb..7c36da1b53f 100644 --- a/Mage.Sets/src/mage/cards/v/VectorAsp.java +++ b/Mage.Sets/src/mage/cards/v/VectorAsp.java @@ -30,7 +30,7 @@ public final class VectorAsp extends CardImpl { this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(InfectAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl<>("{B}"))); } - public VectorAsp (final VectorAsp card) { + private VectorAsp(final VectorAsp card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/v/VedalkenEngineer.java b/Mage.Sets/src/mage/cards/v/VedalkenEngineer.java index 2af48a67544..ff744912656 100644 --- a/Mage.Sets/src/mage/cards/v/VedalkenEngineer.java +++ b/Mage.Sets/src/mage/cards/v/VedalkenEngineer.java @@ -94,7 +94,7 @@ class VedalkenEngineerEffect extends ManaEffect { staticText = "Add " + CardUtil.numberToText(amount) + " mana of any one color. " + manaBuilder.getRule(); } - public VedalkenEngineerEffect(final VedalkenEngineerEffect effect) { + private VedalkenEngineerEffect(final VedalkenEngineerEffect effect) { super(effect); this.amount = effect.amount; this.manaBuilder = effect.manaBuilder; diff --git a/Mage.Sets/src/mage/cards/v/VedalkenInfuser.java b/Mage.Sets/src/mage/cards/v/VedalkenInfuser.java index 619fc0b8af7..c99749878de 100644 --- a/Mage.Sets/src/mage/cards/v/VedalkenInfuser.java +++ b/Mage.Sets/src/mage/cards/v/VedalkenInfuser.java @@ -35,7 +35,7 @@ public final class VedalkenInfuser extends CardImpl { this.addAbility(ability); } - public VedalkenInfuser (final VedalkenInfuser card) { + private VedalkenInfuser(final VedalkenInfuser card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/v/VeilOfBirds.java b/Mage.Sets/src/mage/cards/v/VeilOfBirds.java index e476933c02f..765e6569ee1 100644 --- a/Mage.Sets/src/mage/cards/v/VeilOfBirds.java +++ b/Mage.Sets/src/mage/cards/v/VeilOfBirds.java @@ -56,7 +56,7 @@ class VeilOfBirdsToken extends TokenImpl { this.addAbility(FlyingAbility.getInstance()); } - public VeilOfBirdsToken(final VeilOfBirdsToken token) { + private VeilOfBirdsToken(final VeilOfBirdsToken token) { super(token); } diff --git a/Mage.Sets/src/mage/cards/v/VeiledApparition.java b/Mage.Sets/src/mage/cards/v/VeiledApparition.java index 02b7b1ab397..2d5d062ef1b 100644 --- a/Mage.Sets/src/mage/cards/v/VeiledApparition.java +++ b/Mage.Sets/src/mage/cards/v/VeiledApparition.java @@ -64,7 +64,7 @@ class VeilApparitionToken extends TokenImpl { this.addAbility(ability); } - public VeilApparitionToken(final VeilApparitionToken token) { + private VeilApparitionToken(final VeilApparitionToken token) { super(token); } diff --git a/Mage.Sets/src/mage/cards/v/VeiledCrocodile.java b/Mage.Sets/src/mage/cards/v/VeiledCrocodile.java index 4bf21a00734..4027007844f 100644 --- a/Mage.Sets/src/mage/cards/v/VeiledCrocodile.java +++ b/Mage.Sets/src/mage/cards/v/VeiledCrocodile.java @@ -46,7 +46,7 @@ class VeiledCrocodileStateTriggeredAbility extends StateTriggeredAbility { setTriggerPhrase("When a player has no cards in hand, if {this} is an enchantment, "); } - public VeiledCrocodileStateTriggeredAbility(final VeiledCrocodileStateTriggeredAbility ability) { + private VeiledCrocodileStateTriggeredAbility(final VeiledCrocodileStateTriggeredAbility ability) { super(ability); } @@ -112,7 +112,7 @@ class VeilCrocodileToken extends TokenImpl { toughness = new MageInt(4); } - public VeilCrocodileToken(final VeilCrocodileToken token) { + private VeilCrocodileToken(final VeilCrocodileToken token) { super(token); } diff --git a/Mage.Sets/src/mage/cards/v/VeiledSentry.java b/Mage.Sets/src/mage/cards/v/VeiledSentry.java index c9aaf0e0913..134182b7075 100644 --- a/Mage.Sets/src/mage/cards/v/VeiledSentry.java +++ b/Mage.Sets/src/mage/cards/v/VeiledSentry.java @@ -53,7 +53,7 @@ class VeiledSentryEffect extends ContinuousEffectImpl { staticText = "{this} becomes an Illusion creature with power and toughness equal to that spell's mana value"; } - public VeiledSentryEffect(final VeiledSentryEffect effect) { + private VeiledSentryEffect(final VeiledSentryEffect effect) { super(effect); this.spellMV = effect.spellMV; } diff --git a/Mage.Sets/src/mage/cards/v/VeiledSerpent.java b/Mage.Sets/src/mage/cards/v/VeiledSerpent.java index 3ec366c075d..f0a7335de66 100644 --- a/Mage.Sets/src/mage/cards/v/VeiledSerpent.java +++ b/Mage.Sets/src/mage/cards/v/VeiledSerpent.java @@ -65,7 +65,7 @@ class VeiledSerpentToken extends TokenImpl { new FilterLandPermanent(SubType.ISLAND, "an Island")))); } - public VeiledSerpentToken(final VeiledSerpentToken token) { + private VeiledSerpentToken(final VeiledSerpentToken token) { super(token); } diff --git a/Mage.Sets/src/mage/cards/v/VeilingOddity.java b/Mage.Sets/src/mage/cards/v/VeilingOddity.java index d618f7e5ca1..9d2d762aff1 100644 --- a/Mage.Sets/src/mage/cards/v/VeilingOddity.java +++ b/Mage.Sets/src/mage/cards/v/VeilingOddity.java @@ -55,7 +55,7 @@ class VeilingOddityTriggeredAbility extends TriggeredAbilityImpl { setTriggerPhrase("When the last time counter is removed from {this} while it's exiled, "); } - public VeilingOddityTriggeredAbility(final VeilingOddityTriggeredAbility ability) { + private VeilingOddityTriggeredAbility(final VeilingOddityTriggeredAbility ability) { super(ability); } diff --git a/Mage.Sets/src/mage/cards/v/VeilstoneAmulet.java b/Mage.Sets/src/mage/cards/v/VeilstoneAmulet.java index 16773c101f6..ac1a21578cc 100644 --- a/Mage.Sets/src/mage/cards/v/VeilstoneAmulet.java +++ b/Mage.Sets/src/mage/cards/v/VeilstoneAmulet.java @@ -47,7 +47,7 @@ class VeilstoneAmuletEffect extends ContinuousRuleModifyingEffectImpl { staticText = "creatures you control can't be the targets of spells or abilities your opponents control this turn"; } - public VeilstoneAmuletEffect(final VeilstoneAmuletEffect effect) { + private VeilstoneAmuletEffect(final VeilstoneAmuletEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VeinfireBorderpost.java b/Mage.Sets/src/mage/cards/v/VeinfireBorderpost.java index 1500ca5eb29..25cbeca9f5e 100644 --- a/Mage.Sets/src/mage/cards/v/VeinfireBorderpost.java +++ b/Mage.Sets/src/mage/cards/v/VeinfireBorderpost.java @@ -48,7 +48,7 @@ public final class VeinfireBorderpost extends CardImpl { this.addAbility(new RedManaAbility()); } - public VeinfireBorderpost (final VeinfireBorderpost card) { + private VeinfireBorderpost(final VeinfireBorderpost card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/v/VenarianGlimmer.java b/Mage.Sets/src/mage/cards/v/VenarianGlimmer.java index 171d5fd0133..c449ce108b3 100644 --- a/Mage.Sets/src/mage/cards/v/VenarianGlimmer.java +++ b/Mage.Sets/src/mage/cards/v/VenarianGlimmer.java @@ -49,7 +49,7 @@ class VenarianGlimmerEffect extends OneShotEffect { this.staticText = "Target player reveals their hand. You choose a nonland card with mana value X or less from it. That player discards that card"; } - public VenarianGlimmerEffect(final VenarianGlimmerEffect effect) { + private VenarianGlimmerEffect(final VenarianGlimmerEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/Vendetta.java b/Mage.Sets/src/mage/cards/v/Vendetta.java index cc2b4e2ae1f..62093f995fa 100644 --- a/Mage.Sets/src/mage/cards/v/Vendetta.java +++ b/Mage.Sets/src/mage/cards/v/Vendetta.java @@ -46,7 +46,7 @@ class VendettaEffect extends OneShotEffect { staticText = "You lose life equal to that creature's toughness"; } - public VendettaEffect(final VendettaEffect effect) { + private VendettaEffect(final VendettaEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VeneratedTeacher.java b/Mage.Sets/src/mage/cards/v/VeneratedTeacher.java index 2790b994444..0bdd61a9250 100644 --- a/Mage.Sets/src/mage/cards/v/VeneratedTeacher.java +++ b/Mage.Sets/src/mage/cards/v/VeneratedTeacher.java @@ -53,7 +53,7 @@ class VeneratedTeacherEffect extends OneShotEffect { staticText = "put two level counters on each creature you control with level up"; } - public VeneratedTeacherEffect(final VeneratedTeacherEffect effect) { + private VeneratedTeacherEffect(final VeneratedTeacherEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VengefulArchon.java b/Mage.Sets/src/mage/cards/v/VengefulArchon.java index 46478be64de..4ff5c65551e 100644 --- a/Mage.Sets/src/mage/cards/v/VengefulArchon.java +++ b/Mage.Sets/src/mage/cards/v/VengefulArchon.java @@ -60,7 +60,7 @@ class VengefulArchonEffect extends PreventDamageToControllerEffect { staticText = "Prevent the next X damage that would be dealt to you this turn. If damage is prevented this way, {this} deals that much damage to target player or planeswalker"; } - public VengefulArchonEffect(final VengefulArchonEffect effect) { + private VengefulArchonEffect(final VengefulArchonEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VengefulPharaoh.java b/Mage.Sets/src/mage/cards/v/VengefulPharaoh.java index 6c6571943e2..b0a7641a28c 100644 --- a/Mage.Sets/src/mage/cards/v/VengefulPharaoh.java +++ b/Mage.Sets/src/mage/cards/v/VengefulPharaoh.java @@ -66,7 +66,7 @@ class VengefulPharaohTriggeredAbility extends TriggeredAbilityImpl { this.addTarget(new TargetAttackingCreature()); } - public VengefulPharaohTriggeredAbility(final VengefulPharaohTriggeredAbility ability) { + private VengefulPharaohTriggeredAbility(final VengefulPharaohTriggeredAbility ability) { super(ability); this.stepTriggeredPlansewalker = ability.stepTriggeredPlansewalker; this.turnTriggeredPlaneswalker = ability.turnTriggeredPlaneswalker; @@ -133,7 +133,7 @@ class VengefulPharaohEffect extends OneShotEffect { this.staticText = "destroy target attacking creature, then put {this} on top of your library"; } - public VengefulPharaohEffect(final VengefulPharaohEffect effect) { + private VengefulPharaohEffect(final VengefulPharaohEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VengefulRebirth.java b/Mage.Sets/src/mage/cards/v/VengefulRebirth.java index 5d26d76951e..03f662b05b3 100644 --- a/Mage.Sets/src/mage/cards/v/VengefulRebirth.java +++ b/Mage.Sets/src/mage/cards/v/VengefulRebirth.java @@ -53,7 +53,7 @@ class VengefulRebirthEffect extends OneShotEffect { "{this} deals damage equal to that card's mana value to any target"; } - public VengefulRebirthEffect(final VengefulRebirthEffect effect) { + private VengefulRebirthEffect(final VengefulRebirthEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/Vengevine.java b/Mage.Sets/src/mage/cards/v/Vengevine.java index 1f34216ae2b..1a94be7439d 100644 --- a/Mage.Sets/src/mage/cards/v/Vengevine.java +++ b/Mage.Sets/src/mage/cards/v/Vengevine.java @@ -52,7 +52,7 @@ class VengevineAbility extends TriggeredAbilityImpl { super(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToBattlefieldEffect(), true); } - public VengevineAbility(final VengevineAbility ability) { + private VengevineAbility(final VengevineAbility ability) { super(ability); } diff --git a/Mage.Sets/src/mage/cards/v/VenomousBreath.java b/Mage.Sets/src/mage/cards/v/VenomousBreath.java index 8dd6a4fac4c..71b557587fd 100644 --- a/Mage.Sets/src/mage/cards/v/VenomousBreath.java +++ b/Mage.Sets/src/mage/cards/v/VenomousBreath.java @@ -53,7 +53,7 @@ class VenomousBreathCreateDelayedTriggeredAbilityEffect extends OneShotEffect { this.staticText = "At this turn's next end of combat, destroy all creatures that blocked or were blocked by it this turn"; } - public VenomousBreathCreateDelayedTriggeredAbilityEffect(final VenomousBreathCreateDelayedTriggeredAbilityEffect effect) { + private VenomousBreathCreateDelayedTriggeredAbilityEffect(final VenomousBreathCreateDelayedTriggeredAbilityEffect effect) { super(effect); } @@ -83,7 +83,7 @@ class VenomousBreathEffect extends OneShotEffect { this.targetCreature = targetCreature; } - public VenomousBreathEffect(final VenomousBreathEffect effect) { + private VenomousBreathEffect(final VenomousBreathEffect effect) { super(effect); targetCreature = effect.targetCreature; } diff --git a/Mage.Sets/src/mage/cards/v/VensersDiffusion.java b/Mage.Sets/src/mage/cards/v/VensersDiffusion.java index fe9b7b4b8f9..c6a3f80d454 100644 --- a/Mage.Sets/src/mage/cards/v/VensersDiffusion.java +++ b/Mage.Sets/src/mage/cards/v/VensersDiffusion.java @@ -31,7 +31,7 @@ public final class VensersDiffusion extends CardImpl { this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); } - public VensersDiffusion (final VensersDiffusion card) { + private VensersDiffusion(final VensersDiffusion card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/v/VerdantSuccession.java b/Mage.Sets/src/mage/cards/v/VerdantSuccession.java index b9b251ccc31..eff00907e2a 100644 --- a/Mage.Sets/src/mage/cards/v/VerdantSuccession.java +++ b/Mage.Sets/src/mage/cards/v/VerdantSuccession.java @@ -63,7 +63,7 @@ class VerdantSuccessionTriggeredAbility extends TriggeredAbilityImpl { this.optional = true; } - public VerdantSuccessionTriggeredAbility(final VerdantSuccessionTriggeredAbility ability) { + private VerdantSuccessionTriggeredAbility(final VerdantSuccessionTriggeredAbility ability) { super(ability); } diff --git a/Mage.Sets/src/mage/cards/v/VerdantSunsAvatar.java b/Mage.Sets/src/mage/cards/v/VerdantSunsAvatar.java index 92e324270e5..16e7705527f 100644 --- a/Mage.Sets/src/mage/cards/v/VerdantSunsAvatar.java +++ b/Mage.Sets/src/mage/cards/v/VerdantSunsAvatar.java @@ -53,7 +53,7 @@ class VerdantSunsAvatarTriggeredAbility extends TriggeredAbilityImpl { setTriggerPhrase("Whenever {this} or another creature enters the battlefield under your control, "); } - public VerdantSunsAvatarTriggeredAbility(VerdantSunsAvatarTriggeredAbility ability) { + private VerdantSunsAvatarTriggeredAbility(final VerdantSunsAvatarTriggeredAbility ability) { super(ability); } @@ -91,7 +91,7 @@ class VerdantSunsAvatarEffect extends OneShotEffect { staticText = "you gain life equal to that creature's toughness"; } - public VerdantSunsAvatarEffect(final VerdantSunsAvatarEffect effect) { + private VerdantSunsAvatarEffect(final VerdantSunsAvatarEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VergeRangers.java b/Mage.Sets/src/mage/cards/v/VergeRangers.java index b1026649ec6..09ddb5644ff 100644 --- a/Mage.Sets/src/mage/cards/v/VergeRangers.java +++ b/Mage.Sets/src/mage/cards/v/VergeRangers.java @@ -63,7 +63,7 @@ class VergeRangersEffect extends PlayTheTopCardEffect { staticText = "As long as an opponent controls more lands than you, you may play lands from the top of your library"; } - public VergeRangersEffect(final VergeRangersEffect effect) { + private VergeRangersEffect(final VergeRangersEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VesuvanDoppelganger.java b/Mage.Sets/src/mage/cards/v/VesuvanDoppelganger.java index 1c72b7ea6e1..8e7ae3abf76 100644 --- a/Mage.Sets/src/mage/cards/v/VesuvanDoppelganger.java +++ b/Mage.Sets/src/mage/cards/v/VesuvanDoppelganger.java @@ -62,7 +62,7 @@ class VesuvanDoppelgangerCopyEffect extends OneShotEffect { super(Outcome.Copy); } - public VesuvanDoppelgangerCopyEffect(final VesuvanDoppelgangerCopyEffect effect) { + private VesuvanDoppelgangerCopyEffect(final VesuvanDoppelgangerCopyEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VeteranBrawlers.java b/Mage.Sets/src/mage/cards/v/VeteranBrawlers.java index a55ff32d49b..6c5cfc20727 100644 --- a/Mage.Sets/src/mage/cards/v/VeteranBrawlers.java +++ b/Mage.Sets/src/mage/cards/v/VeteranBrawlers.java @@ -65,7 +65,7 @@ class VeteranBrawlersCantBlockEffect extends RestrictionEffect { staticText = "{this} can't block if you control " + filter.getMessage(); } - public VeteranBrawlersCantBlockEffect(final VeteranBrawlersCantBlockEffect effect) { + private VeteranBrawlersCantBlockEffect(final VeteranBrawlersCantBlockEffect effect) { super(effect); this.filter = effect.filter; } diff --git a/Mage.Sets/src/mage/cards/v/VeteranExplorer.java b/Mage.Sets/src/mage/cards/v/VeteranExplorer.java index 0f6eca57efe..0469d746ec2 100644 --- a/Mage.Sets/src/mage/cards/v/VeteranExplorer.java +++ b/Mage.Sets/src/mage/cards/v/VeteranExplorer.java @@ -59,7 +59,7 @@ class VeteranExplorerEffect extends OneShotEffect { "put them onto the battlefield, then shuffle"; } - public VeteranExplorerEffect(final VeteranExplorerEffect effect) { + private VeteranExplorerEffect(final VeteranExplorerEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VeteransReflexes.java b/Mage.Sets/src/mage/cards/v/VeteransReflexes.java index 3c8279ec231..21bf1bc6cd5 100644 --- a/Mage.Sets/src/mage/cards/v/VeteransReflexes.java +++ b/Mage.Sets/src/mage/cards/v/VeteransReflexes.java @@ -25,7 +25,7 @@ public final class VeteransReflexes extends CardImpl { this.getSpellAbility().addTarget(new TargetCreaturePermanent()); } - public VeteransReflexes (final VeteransReflexes card) { + private VeteransReflexes(final VeteransReflexes card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/v/Vex.java b/Mage.Sets/src/mage/cards/v/Vex.java index 0bff7722920..c7f54a9c47f 100644 --- a/Mage.Sets/src/mage/cards/v/Vex.java +++ b/Mage.Sets/src/mage/cards/v/Vex.java @@ -43,7 +43,7 @@ class VexEffect extends OneShotEffect { this.staticText = "Counter target spell. That spell's controller may draw a card"; } - public VexEffect(final VexEffect effect) { + private VexEffect(final VexEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VexingArcanix.java b/Mage.Sets/src/mage/cards/v/VexingArcanix.java index 3d656f09f85..2863a369cc7 100644 --- a/Mage.Sets/src/mage/cards/v/VexingArcanix.java +++ b/Mage.Sets/src/mage/cards/v/VexingArcanix.java @@ -53,7 +53,7 @@ class VexingArcanixEffect extends OneShotEffect { "the player puts it into their graveyard and {this} deals 2 damage to them"; } - public VexingArcanixEffect(final VexingArcanixEffect effect) { + private VexingArcanixEffect(final VexingArcanixEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VexingShusher.java b/Mage.Sets/src/mage/cards/v/VexingShusher.java index 3579fe52228..4aa0c5825e1 100644 --- a/Mage.Sets/src/mage/cards/v/VexingShusher.java +++ b/Mage.Sets/src/mage/cards/v/VexingShusher.java @@ -60,7 +60,7 @@ class VexingShusherCantCounterTargetEffect extends ContinuousRuleModifyingEffect staticText = "Target spell can't be countered"; } - public VexingShusherCantCounterTargetEffect(final VexingShusherCantCounterTargetEffect effect) { + private VexingShusherCantCounterTargetEffect(final VexingShusherCantCounterTargetEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/Vexis.java b/Mage.Sets/src/mage/cards/v/Vexis.java index 1791d0ddfc8..b13104e915d 100644 --- a/Mage.Sets/src/mage/cards/v/Vexis.java +++ b/Mage.Sets/src/mage/cards/v/Vexis.java @@ -41,7 +41,7 @@ public class Vexis extends CardImpl { VigilanceAbility.getInstance(), Duration.EndOfTurn), false, CounterType.P1P1)); } - public Vexis(final Vexis card) { + private Vexis(final Vexis card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/v/VhatiIlDal.java b/Mage.Sets/src/mage/cards/v/VhatiIlDal.java index 2f5f27e81b8..28b722dfb5d 100644 --- a/Mage.Sets/src/mage/cards/v/VhatiIlDal.java +++ b/Mage.Sets/src/mage/cards/v/VhatiIlDal.java @@ -55,7 +55,7 @@ class VhatiIlDalEffect extends OneShotEffect { this.staticText = "Until end of turn, target creature has base power 1 or base toughness 1"; } - public VhatiIlDalEffect(final VhatiIlDalEffect effect) { + private VhatiIlDalEffect(final VhatiIlDalEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VialSmasherTheFierce.java b/Mage.Sets/src/mage/cards/v/VialSmasherTheFierce.java index 244a493e6fa..eddd8608348 100644 --- a/Mage.Sets/src/mage/cards/v/VialSmasherTheFierce.java +++ b/Mage.Sets/src/mage/cards/v/VialSmasherTheFierce.java @@ -105,7 +105,7 @@ class VialSmasherTheFierceEffect extends OneShotEffect { this.staticText = "{this} choose an opponent at random. {this} deals damage equal to that spell's mana value to that player or a planeswalker that player controls"; } - public VialSmasherTheFierceEffect(final VialSmasherTheFierceEffect effect) { + private VialSmasherTheFierceEffect(final VialSmasherTheFierceEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/ViashinoBey.java b/Mage.Sets/src/mage/cards/v/ViashinoBey.java index 09c115906fb..2ac5310f41e 100644 --- a/Mage.Sets/src/mage/cards/v/ViashinoBey.java +++ b/Mage.Sets/src/mage/cards/v/ViashinoBey.java @@ -63,7 +63,7 @@ class ViashinoBeyEffect extends OneShotEffect { super(Outcome.Benefit); } - public ViashinoBeyEffect(final ViashinoBeyEffect effect) { + private ViashinoBeyEffect(final ViashinoBeyEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/ViashinoHeretic.java b/Mage.Sets/src/mage/cards/v/ViashinoHeretic.java index de885b68b42..5c16ec15f5c 100644 --- a/Mage.Sets/src/mage/cards/v/ViashinoHeretic.java +++ b/Mage.Sets/src/mage/cards/v/ViashinoHeretic.java @@ -57,7 +57,7 @@ class ViashinoHereticEffect extends OneShotEffect { this.staticText = "Destroy target artifact. Viashino Heretic deals damage to that artifact's controller equal to the artifact's mana value"; } - public ViashinoHereticEffect(final ViashinoHereticEffect effect) { + private ViashinoHereticEffect(final ViashinoHereticEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/ViashinoSandswimmer.java b/Mage.Sets/src/mage/cards/v/ViashinoSandswimmer.java index 7bcf7422c87..2c20ba10ff0 100644 --- a/Mage.Sets/src/mage/cards/v/ViashinoSandswimmer.java +++ b/Mage.Sets/src/mage/cards/v/ViashinoSandswimmer.java @@ -52,7 +52,7 @@ class ViashinoSandswimmerEffect extends OneShotEffect { staticText = "Flip a coin. If you win the flip, return {this} to its owner's hand. If you lose the flip, sacrifice {this}"; } - public ViashinoSandswimmerEffect(ViashinoSandswimmerEffect effect) { + private ViashinoSandswimmerEffect(final ViashinoSandswimmerEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/ViashivanDragon.java b/Mage.Sets/src/mage/cards/v/ViashivanDragon.java index 0bcff76e79e..944423b7d81 100644 --- a/Mage.Sets/src/mage/cards/v/ViashivanDragon.java +++ b/Mage.Sets/src/mage/cards/v/ViashivanDragon.java @@ -34,7 +34,7 @@ public final class ViashivanDragon extends CardImpl { } - public ViashivanDragon(ViashivanDragon other){ + private ViashivanDragon(final ViashivanDragon other){ super(other); } diff --git a/Mage.Sets/src/mage/cards/v/VictoryChimes.java b/Mage.Sets/src/mage/cards/v/VictoryChimes.java index 9d13720cd01..62b73f7fd33 100644 --- a/Mage.Sets/src/mage/cards/v/VictoryChimes.java +++ b/Mage.Sets/src/mage/cards/v/VictoryChimes.java @@ -55,7 +55,7 @@ class VictoryChimesManaEffect extends ManaEffect { this.staticText = "a player of your choice adds {C}"; } - public VictoryChimesManaEffect(final VictoryChimesManaEffect effect) { + private VictoryChimesManaEffect(final VictoryChimesManaEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VictorysHerald.java b/Mage.Sets/src/mage/cards/v/VictorysHerald.java index b9c60c00bd4..455924931ea 100644 --- a/Mage.Sets/src/mage/cards/v/VictorysHerald.java +++ b/Mage.Sets/src/mage/cards/v/VictorysHerald.java @@ -36,7 +36,7 @@ public final class VictorysHerald extends CardImpl { this.addAbility(ability); } - public VictorysHerald (final VictorysHerald card) { + private VictorysHerald(final VictorysHerald card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/v/VigeanHydropon.java b/Mage.Sets/src/mage/cards/v/VigeanHydropon.java index 771233e2216..c2e73efccde 100644 --- a/Mage.Sets/src/mage/cards/v/VigeanHydropon.java +++ b/Mage.Sets/src/mage/cards/v/VigeanHydropon.java @@ -52,7 +52,7 @@ class VigeanHydroponEffect extends RestrictionEffect { staticText = "{this} can't attack or block"; } - public VigeanHydroponEffect(final VigeanHydroponEffect effect) { + private VigeanHydroponEffect(final VigeanHydroponEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VigeanIntuition.java b/Mage.Sets/src/mage/cards/v/VigeanIntuition.java index 8a2a76b6532..fff50470d47 100644 --- a/Mage.Sets/src/mage/cards/v/VigeanIntuition.java +++ b/Mage.Sets/src/mage/cards/v/VigeanIntuition.java @@ -60,7 +60,7 @@ class VigeanIntuitionEffect extends OneShotEffect { staticText = "Choose a card type, then reveal the top four cards of your library. Put all cards of the chosen type revealed this way into your hand and the rest into your graveyard"; } - public VigeanIntuitionEffect(final VigeanIntuitionEffect effect) { + private VigeanIntuitionEffect(final VigeanIntuitionEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/Vigilance.java b/Mage.Sets/src/mage/cards/v/Vigilance.java index 5ce03bdf827..a4cae6bbb00 100644 --- a/Mage.Sets/src/mage/cards/v/Vigilance.java +++ b/Mage.Sets/src/mage/cards/v/Vigilance.java @@ -29,7 +29,7 @@ public final class Vigilance extends CardImpl { this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(VigilanceAbility.getInstance(), AttachmentType.AURA))); } - public Vigilance (final Vigilance card) { + private Vigilance(final Vigilance card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/v/VigorousCharge.java b/Mage.Sets/src/mage/cards/v/VigorousCharge.java index ed512b7d561..80bb1236221 100644 --- a/Mage.Sets/src/mage/cards/v/VigorousCharge.java +++ b/Mage.Sets/src/mage/cards/v/VigorousCharge.java @@ -58,7 +58,7 @@ class VigorousChargeTriggeredAbility extends TriggeredAbilityImpl { super(Zone.BATTLEFIELD, null); } - public VigorousChargeTriggeredAbility(final VigorousChargeTriggeredAbility ability) { + private VigorousChargeTriggeredAbility(final VigorousChargeTriggeredAbility ability) { super(ability); } diff --git a/Mage.Sets/src/mage/cards/v/VildinPackAlpha.java b/Mage.Sets/src/mage/cards/v/VildinPackAlpha.java index 37bbb7367be..e6dcbe0842e 100644 --- a/Mage.Sets/src/mage/cards/v/VildinPackAlpha.java +++ b/Mage.Sets/src/mage/cards/v/VildinPackAlpha.java @@ -59,7 +59,7 @@ class VildinPackAlphaEffect extends OneShotEffect { this.staticText = "you may transform it"; } - public VildinPackAlphaEffect(final VildinPackAlphaEffect effect) { + private VildinPackAlphaEffect(final VildinPackAlphaEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VileRedeemer.java b/Mage.Sets/src/mage/cards/v/VileRedeemer.java index e22e703d170..85af4d40622 100644 --- a/Mage.Sets/src/mage/cards/v/VileRedeemer.java +++ b/Mage.Sets/src/mage/cards/v/VileRedeemer.java @@ -66,7 +66,7 @@ class VileRedeemerEffect extends OneShotEffect { this.staticText = "create a 1/1 colorless Eldrazi Scion creature token for each nontoken creature that died under your control this turn. They have \"Sacrifice this creature: Add {C}"; } - public VileRedeemerEffect(final VileRedeemerEffect effect) { + private VileRedeemerEffect(final VileRedeemerEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VillageCannibals.java b/Mage.Sets/src/mage/cards/v/VillageCannibals.java index 1ffc36bc05d..f3d9aaec997 100644 --- a/Mage.Sets/src/mage/cards/v/VillageCannibals.java +++ b/Mage.Sets/src/mage/cards/v/VillageCannibals.java @@ -50,7 +50,7 @@ class VillageCannibalsTriggeredAbility extends TriggeredAbilityImpl { setTriggerPhrase("Whenever another Human creature dies, "); } - public VillageCannibalsTriggeredAbility(final VillageCannibalsTriggeredAbility ability) { + private VillageCannibalsTriggeredAbility(final VillageCannibalsTriggeredAbility ability) { super(ability); } diff --git a/Mage.Sets/src/mage/cards/v/VillainousWealth.java b/Mage.Sets/src/mage/cards/v/VillainousWealth.java index 0425449da67..213d40a3fe7 100644 --- a/Mage.Sets/src/mage/cards/v/VillainousWealth.java +++ b/Mage.Sets/src/mage/cards/v/VillainousWealth.java @@ -52,7 +52,7 @@ class VillainousWealthEffect extends OneShotEffect { + "or less from among them without paying their mana costs"; } - public VillainousWealthEffect(final VillainousWealthEffect effect) { + private VillainousWealthEffect(final VillainousWealthEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/Vindicate.java b/Mage.Sets/src/mage/cards/v/Vindicate.java index c1aefa6d70d..fec21170b03 100644 --- a/Mage.Sets/src/mage/cards/v/Vindicate.java +++ b/Mage.Sets/src/mage/cards/v/Vindicate.java @@ -23,7 +23,7 @@ public final class Vindicate extends CardImpl { this.getSpellAbility().addTarget(new TargetPermanent()); } - public Vindicate (final Vindicate card) { + private Vindicate(final Vindicate card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/v/VindictiveVampire.java b/Mage.Sets/src/mage/cards/v/VindictiveVampire.java index 5f55feb1043..89c82ab21cf 100644 --- a/Mage.Sets/src/mage/cards/v/VindictiveVampire.java +++ b/Mage.Sets/src/mage/cards/v/VindictiveVampire.java @@ -59,7 +59,7 @@ class VindictiveVampireTriggeredAbility extends TriggeredAbilityImpl { setTriggerPhrase("Whenever another creature you control dies, "); } - public VindictiveVampireTriggeredAbility(final VindictiveVampireTriggeredAbility ability) { + private VindictiveVampireTriggeredAbility(final VindictiveVampireTriggeredAbility ability) { super(ability); } diff --git a/Mage.Sets/src/mage/cards/v/ViolentUltimatum.java b/Mage.Sets/src/mage/cards/v/ViolentUltimatum.java index ffc29e16556..3925429a98b 100644 --- a/Mage.Sets/src/mage/cards/v/ViolentUltimatum.java +++ b/Mage.Sets/src/mage/cards/v/ViolentUltimatum.java @@ -22,7 +22,7 @@ public final class ViolentUltimatum extends CardImpl { this.getSpellAbility().addTarget(new TargetPermanent(3, StaticFilters.FILTER_PERMANENTS)); } - public ViolentUltimatum(final ViolentUltimatum card) { + private ViolentUltimatum(final ViolentUltimatum card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/v/ViridescentWisps.java b/Mage.Sets/src/mage/cards/v/ViridescentWisps.java index bbefe907961..60bb0820ceb 100644 --- a/Mage.Sets/src/mage/cards/v/ViridescentWisps.java +++ b/Mage.Sets/src/mage/cards/v/ViridescentWisps.java @@ -33,7 +33,7 @@ public final class ViridescentWisps extends CardImpl { this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1).concatBy("
")); } - public ViridescentWisps(final ViridescentWisps card) { + private ViridescentWisps(final ViridescentWisps card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/v/ViridianClaw.java b/Mage.Sets/src/mage/cards/v/ViridianClaw.java index 8e67257f69d..a2f62ef132c 100644 --- a/Mage.Sets/src/mage/cards/v/ViridianClaw.java +++ b/Mage.Sets/src/mage/cards/v/ViridianClaw.java @@ -39,7 +39,7 @@ public final class ViridianClaw extends CardImpl { this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(1), false)); } - public ViridianClaw (final ViridianClaw card) { + private ViridianClaw(final ViridianClaw card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/v/ViridianCorrupter.java b/Mage.Sets/src/mage/cards/v/ViridianCorrupter.java index 1a73219ba97..a4bf99f9b2d 100644 --- a/Mage.Sets/src/mage/cards/v/ViridianCorrupter.java +++ b/Mage.Sets/src/mage/cards/v/ViridianCorrupter.java @@ -35,7 +35,7 @@ public final class ViridianCorrupter extends CardImpl { this.addAbility(ability); } - public ViridianCorrupter (final ViridianCorrupter card) { + private ViridianCorrupter(final ViridianCorrupter card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/v/ViridianRevel.java b/Mage.Sets/src/mage/cards/v/ViridianRevel.java index dc1b74cacab..6763d925cb7 100644 --- a/Mage.Sets/src/mage/cards/v/ViridianRevel.java +++ b/Mage.Sets/src/mage/cards/v/ViridianRevel.java @@ -29,7 +29,7 @@ public final class ViridianRevel extends CardImpl { this.addAbility(new ViridianRevelTriggeredAbility()); } - public ViridianRevel (final ViridianRevel card) { + private ViridianRevel(final ViridianRevel card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/v/Viseling.java b/Mage.Sets/src/mage/cards/v/Viseling.java index b48d058b83b..30631fc1b5f 100644 --- a/Mage.Sets/src/mage/cards/v/Viseling.java +++ b/Mage.Sets/src/mage/cards/v/Viseling.java @@ -50,7 +50,7 @@ class ViselingEffect extends OneShotEffect { this.staticText = "{this} deals X damage to that player, where X is the number of cards in their hand minus 4"; } - public ViselingEffect(final ViselingEffect effect) { + private ViselingEffect(final ViselingEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VisionsOfBeyond.java b/Mage.Sets/src/mage/cards/v/VisionsOfBeyond.java index 46269be0381..a5570d6701a 100644 --- a/Mage.Sets/src/mage/cards/v/VisionsOfBeyond.java +++ b/Mage.Sets/src/mage/cards/v/VisionsOfBeyond.java @@ -42,7 +42,7 @@ class VisionsOfBeyondEffect extends OneShotEffect { staticText = "Draw a card. If a graveyard has twenty or more cards in it, draw three cards instead"; } - public VisionsOfBeyondEffect(VisionsOfBeyondEffect effect) { + private VisionsOfBeyondEffect(final VisionsOfBeyondEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VisionsOfBrutality.java b/Mage.Sets/src/mage/cards/v/VisionsOfBrutality.java index dffb8be6c5a..9f49b2330e3 100644 --- a/Mage.Sets/src/mage/cards/v/VisionsOfBrutality.java +++ b/Mage.Sets/src/mage/cards/v/VisionsOfBrutality.java @@ -65,7 +65,7 @@ class VisionsOfBrutalityEffect extends OneShotEffect { this.staticText = "its controller loses that much life"; } - public VisionsOfBrutalityEffect(final VisionsOfBrutalityEffect effect) { + private VisionsOfBrutalityEffect(final VisionsOfBrutalityEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VithianRenegades.java b/Mage.Sets/src/mage/cards/v/VithianRenegades.java index b3c589fbf03..1ebf3e14338 100644 --- a/Mage.Sets/src/mage/cards/v/VithianRenegades.java +++ b/Mage.Sets/src/mage/cards/v/VithianRenegades.java @@ -32,7 +32,7 @@ public final class VithianRenegades extends CardImpl { this.addAbility(ability); } - public VithianRenegades (final VithianRenegades card) { + private VithianRenegades(final VithianRenegades card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/v/VizierOfDeferment.java b/Mage.Sets/src/mage/cards/v/VizierOfDeferment.java index 9ae9a0508ce..9b6c5910cb5 100644 --- a/Mage.Sets/src/mage/cards/v/VizierOfDeferment.java +++ b/Mage.Sets/src/mage/cards/v/VizierOfDeferment.java @@ -66,7 +66,7 @@ class VizierOfDefermentEffect extends OneShotEffect { "Return that card to the battlefield under its owner's control at the beginning of the next end step"; } - public VizierOfDefermentEffect(final VizierOfDefermentEffect effect) { + private VizierOfDefermentEffect(final VizierOfDefermentEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VizierOfRemedies.java b/Mage.Sets/src/mage/cards/v/VizierOfRemedies.java index 2bc3f946c80..55a8859b0d2 100644 --- a/Mage.Sets/src/mage/cards/v/VizierOfRemedies.java +++ b/Mage.Sets/src/mage/cards/v/VizierOfRemedies.java @@ -49,7 +49,7 @@ class VizierOfRemediesReplacementEffect extends ReplacementEffectImpl { staticText = "If one or more -1/-1 counters would be put on a creature you control, that many -1/-1 counters minus one are put on it instead"; } - public VizierOfRemediesReplacementEffect(final VizierOfRemediesReplacementEffect effect) { + private VizierOfRemediesReplacementEffect(final VizierOfRemediesReplacementEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VizierOfTheAnointed.java b/Mage.Sets/src/mage/cards/v/VizierOfTheAnointed.java index c72bfbaf33f..7d6926991c2 100644 --- a/Mage.Sets/src/mage/cards/v/VizierOfTheAnointed.java +++ b/Mage.Sets/src/mage/cards/v/VizierOfTheAnointed.java @@ -136,7 +136,7 @@ class SearchLibraryPutInGraveyard extends SearchEffect { staticText = "search your library for a creature card with eternalize or embalm, put that card into your graveyard, then shuffle."; } - public SearchLibraryPutInGraveyard(final SearchLibraryPutInGraveyard effect) { + private SearchLibraryPutInGraveyard(final SearchLibraryPutInGraveyard effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VizierOfTheMenagerie.java b/Mage.Sets/src/mage/cards/v/VizierOfTheMenagerie.java index 7a7d471edcf..52c6f708348 100644 --- a/Mage.Sets/src/mage/cards/v/VizierOfTheMenagerie.java +++ b/Mage.Sets/src/mage/cards/v/VizierOfTheMenagerie.java @@ -62,7 +62,7 @@ class VizierOfTheMenagerieManaEffect extends AsThoughEffectImpl implements AsTho staticText = "You may spend mana as though it were mana of any type to cast creature spells"; } - public VizierOfTheMenagerieManaEffect(final VizierOfTheMenagerieManaEffect effect) { + private VizierOfTheMenagerieManaEffect(final VizierOfTheMenagerieManaEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VizierOfTheTrue.java b/Mage.Sets/src/mage/cards/v/VizierOfTheTrue.java index cc08c426867..a1090d86cb1 100644 --- a/Mage.Sets/src/mage/cards/v/VizierOfTheTrue.java +++ b/Mage.Sets/src/mage/cards/v/VizierOfTheTrue.java @@ -54,7 +54,7 @@ class VizierOfTheTrueAbility extends TriggeredAbilityImpl { addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE)); } - public VizierOfTheTrueAbility(final VizierOfTheTrueAbility ability) { + private VizierOfTheTrueAbility(final VizierOfTheTrueAbility ability) { super(ability); } diff --git a/Mage.Sets/src/mage/cards/v/VizkopaConfessor.java b/Mage.Sets/src/mage/cards/v/VizkopaConfessor.java index ea2d968031b..5f796b9c80d 100644 --- a/Mage.Sets/src/mage/cards/v/VizkopaConfessor.java +++ b/Mage.Sets/src/mage/cards/v/VizkopaConfessor.java @@ -64,7 +64,7 @@ class VizkopaConfessorEffect extends OneShotEffect { this.staticText = "pay any amount of life. Target opponent reveals that many cards from their hand. You choose one of them and exile it"; } - public VizkopaConfessorEffect(final VizkopaConfessorEffect effect) { + private VizkopaConfessorEffect(final VizkopaConfessorEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VizkopaGuildmage.java b/Mage.Sets/src/mage/cards/v/VizkopaGuildmage.java index 5f024ed2865..973931b30a9 100644 --- a/Mage.Sets/src/mage/cards/v/VizkopaGuildmage.java +++ b/Mage.Sets/src/mage/cards/v/VizkopaGuildmage.java @@ -70,7 +70,7 @@ class VizkopaGuildmageDelayedTriggeredAbility extends DelayedTriggeredAbility { super(new OpponentsLoseLifeEffect(), Duration.EndOfTurn, false); } - public VizkopaGuildmageDelayedTriggeredAbility(VizkopaGuildmageDelayedTriggeredAbility ability) { + private VizkopaGuildmageDelayedTriggeredAbility(final VizkopaGuildmageDelayedTriggeredAbility ability) { super(ability); } @@ -105,7 +105,7 @@ class OpponentsLoseLifeEffect extends OneShotEffect { super(Outcome.Damage); } - public OpponentsLoseLifeEffect(final OpponentsLoseLifeEffect effect) { + private OpponentsLoseLifeEffect(final OpponentsLoseLifeEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VodalianWarMachine.java b/Mage.Sets/src/mage/cards/v/VodalianWarMachine.java index 67849e1cdca..f0264399c5f 100644 --- a/Mage.Sets/src/mage/cards/v/VodalianWarMachine.java +++ b/Mage.Sets/src/mage/cards/v/VodalianWarMachine.java @@ -82,7 +82,7 @@ class VodalianWarMachineEffect extends OneShotEffect { staticText = "destroy all " + filter.getMessage(); } - public VodalianWarMachineEffect(final VodalianWarMachineEffect effect) { + private VodalianWarMachineEffect(final VodalianWarMachineEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VoidMaw.java b/Mage.Sets/src/mage/cards/v/VoidMaw.java index 5fd786e7681..bf19a3a1c1d 100644 --- a/Mage.Sets/src/mage/cards/v/VoidMaw.java +++ b/Mage.Sets/src/mage/cards/v/VoidMaw.java @@ -64,7 +64,7 @@ class VoidMawEffect extends ReplacementEffectImpl { staticText = "If another creature would die, exile it instead"; } - public VoidMawEffect(final VoidMawEffect effect) { + private VoidMawEffect(final VoidMawEffect effect) { super(effect); } @@ -127,7 +127,7 @@ class VoidMawCost extends CostImpl { this.text = "Put a card exiled with {this} into its owner's graveyard"; } - public VoidMawCost(VoidMawCost cost) { + private VoidMawCost(final VoidMawCost cost) { super(cost); } diff --git a/Mage.Sets/src/mage/cards/v/VoidWinnower.java b/Mage.Sets/src/mage/cards/v/VoidWinnower.java index dd73b9f2b70..f20caec720a 100644 --- a/Mage.Sets/src/mage/cards/v/VoidWinnower.java +++ b/Mage.Sets/src/mage/cards/v/VoidWinnower.java @@ -52,7 +52,7 @@ class VoidWinnowerCantCastEffect extends ContinuousRuleModifyingEffectImpl { staticText = "Your opponents can't cast spells with even mana values. (Zero is even.)"; } - public VoidWinnowerCantCastEffect(final VoidWinnowerCantCastEffect effect) { + private VoidWinnowerCantCastEffect(final VoidWinnowerCantCastEffect effect) { super(effect); } @@ -100,7 +100,7 @@ class VoidWinnowerCantBlockEffect extends RestrictionEffect { staticText = "Your opponents can't block with creatures with even mana values"; } - public VoidWinnowerCantBlockEffect(final VoidWinnowerCantBlockEffect effect) { + private VoidWinnowerCantBlockEffect(final VoidWinnowerCantBlockEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VoidstoneGargoyle.java b/Mage.Sets/src/mage/cards/v/VoidstoneGargoyle.java index 34bf91bd86e..753a33899fb 100644 --- a/Mage.Sets/src/mage/cards/v/VoidstoneGargoyle.java +++ b/Mage.Sets/src/mage/cards/v/VoidstoneGargoyle.java @@ -57,7 +57,7 @@ class VoidstoneGargoyleReplacementEffect1 extends ContinuousRuleModifyingEffectI staticText = "Spells with the chosen name can't be cast"; } - public VoidstoneGargoyleReplacementEffect1(final VoidstoneGargoyleReplacementEffect1 effect) { + private VoidstoneGargoyleReplacementEffect1(final VoidstoneGargoyleReplacementEffect1 effect) { super(effect); } @@ -99,7 +99,7 @@ class VoidstoneGargoyleRuleModifyingEffect2 extends ContinuousRuleModifyingEffec staticText = "Activated abilities of sources with the chosen name can't be activated"; } - public VoidstoneGargoyleRuleModifyingEffect2(final VoidstoneGargoyleRuleModifyingEffect2 effect) { + private VoidstoneGargoyleRuleModifyingEffect2(final VoidstoneGargoyleRuleModifyingEffect2 effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/Voidwalk.java b/Mage.Sets/src/mage/cards/v/Voidwalk.java index 4e533d37de7..01896df48a0 100644 --- a/Mage.Sets/src/mage/cards/v/Voidwalk.java +++ b/Mage.Sets/src/mage/cards/v/Voidwalk.java @@ -53,7 +53,7 @@ class VoidwalkEffect extends OneShotEffect { staticText = "Exile target creature. Return it to the battlefield under its owner's control at the beginning of the next end step"; } - public VoidwalkEffect(final VoidwalkEffect effect) { + private VoidwalkEffect(final VoidwalkEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VolcanicEruption.java b/Mage.Sets/src/mage/cards/v/VolcanicEruption.java index 10cf4519143..499b2301cca 100644 --- a/Mage.Sets/src/mage/cards/v/VolcanicEruption.java +++ b/Mage.Sets/src/mage/cards/v/VolcanicEruption.java @@ -62,7 +62,7 @@ class VolcanicEruptionEffect extends OneShotEffect { this.staticText = "Destroy X target Mountains. {this} deals damage to each creature and each player equal to the number of Mountains put into a graveyard this way."; } - public VolcanicEruptionEffect(final VolcanicEruptionEffect effect) { + private VolcanicEruptionEffect(final VolcanicEruptionEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VolcanicVision.java b/Mage.Sets/src/mage/cards/v/VolcanicVision.java index 996b712a6b7..cb8264efa39 100644 --- a/Mage.Sets/src/mage/cards/v/VolcanicVision.java +++ b/Mage.Sets/src/mage/cards/v/VolcanicVision.java @@ -57,7 +57,7 @@ class VolcanicVisionReturnToHandTargetEffect extends OneShotEffect { staticText = "Return target instant or sorcery card from your graveyard to your hand. {this} deals damage equal to that card's mana value to each creature your opponents control"; } - public VolcanicVisionReturnToHandTargetEffect(final VolcanicVisionReturnToHandTargetEffect effect) { + private VolcanicVisionReturnToHandTargetEffect(final VolcanicVisionReturnToHandTargetEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VolcanoHellion.java b/Mage.Sets/src/mage/cards/v/VolcanoHellion.java index c1f828f3ef1..2c654098793 100644 --- a/Mage.Sets/src/mage/cards/v/VolcanoHellion.java +++ b/Mage.Sets/src/mage/cards/v/VolcanoHellion.java @@ -57,7 +57,7 @@ class VolcanoHellionEffect extends OneShotEffect { this.staticText = "it deals an amount of damage of your choice to you and target creature. The damage can't be prevented"; } - public VolcanoHellionEffect(final VolcanoHellionEffect effect) { + private VolcanoHellionEffect(final VolcanoHellionEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VolitionReins.java b/Mage.Sets/src/mage/cards/v/VolitionReins.java index 8d17413c100..95462115853 100644 --- a/Mage.Sets/src/mage/cards/v/VolitionReins.java +++ b/Mage.Sets/src/mage/cards/v/VolitionReins.java @@ -57,7 +57,7 @@ public final class VolitionReins extends CardImpl { staticText = "if enchanted permanent is tapped, untap it"; } - public UntapVolitionReinsEffect(final UntapVolitionReinsEffect effect) { + private UntapVolitionReinsEffect(final UntapVolitionReinsEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VolrathsCurse.java b/Mage.Sets/src/mage/cards/v/VolrathsCurse.java index ab6a8a5322b..6e3ce68eada 100644 --- a/Mage.Sets/src/mage/cards/v/VolrathsCurse.java +++ b/Mage.Sets/src/mage/cards/v/VolrathsCurse.java @@ -73,7 +73,7 @@ class VolrathsCurseRestrictionEffect extends RestrictionEffect { this.staticText = "Enchanted creature can't attack or block"; } - public VolrathsCurseRestrictionEffect(final VolrathsCurseRestrictionEffect effect) { + private VolrathsCurseRestrictionEffect(final VolrathsCurseRestrictionEffect effect) { super(effect); } @@ -111,7 +111,7 @@ class VolrathsCurseCantActivateAbilitiesEffect extends ContinuousRuleModifyingEf staticText = ", and its activated abilities can't be activated"; } - public VolrathsCurseCantActivateAbilitiesEffect(final VolrathsCurseCantActivateAbilitiesEffect effect) { + private VolrathsCurseCantActivateAbilitiesEffect(final VolrathsCurseCantActivateAbilitiesEffect effect) { super(effect); } @@ -155,7 +155,7 @@ class VolrathsCurseSpecialAction extends SpecialAction { this.setMayActivate(TargetController.CONTROLLER_ATTACHED_TO); } - public VolrathsCurseSpecialAction(final VolrathsCurseSpecialAction ability) { + private VolrathsCurseSpecialAction(final VolrathsCurseSpecialAction ability) { super(ability); } @@ -172,7 +172,7 @@ class VolrathsCurseIgnoreEffect extends OneShotEffect { this.staticText = "That creature's controller may sacrifice a permanent for that player to ignore this effect until end of turn"; } - public VolrathsCurseIgnoreEffect(final VolrathsCurseIgnoreEffect effect) { + private VolrathsCurseIgnoreEffect(final VolrathsCurseIgnoreEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VolrathsDungeon.java b/Mage.Sets/src/mage/cards/v/VolrathsDungeon.java index a19a25a8fcc..4ea1ac39206 100644 --- a/Mage.Sets/src/mage/cards/v/VolrathsDungeon.java +++ b/Mage.Sets/src/mage/cards/v/VolrathsDungeon.java @@ -61,7 +61,7 @@ class VolrathsDungeonEffect extends OneShotEffect { this.staticText = "Target player puts a card from their hand on top of their library"; } - public VolrathsDungeonEffect(final VolrathsDungeonEffect effect) { + private VolrathsDungeonEffect(final VolrathsDungeonEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VolrathsShapeshifter.java b/Mage.Sets/src/mage/cards/v/VolrathsShapeshifter.java index 94b35103692..14794acb568 100644 --- a/Mage.Sets/src/mage/cards/v/VolrathsShapeshifter.java +++ b/Mage.Sets/src/mage/cards/v/VolrathsShapeshifter.java @@ -54,7 +54,7 @@ class VolrathsShapeshifterEffect extends ContinuousEffectImpl { + "({this} has that card's name, mana cost, color, types, abilities, power, and toughness.) "; } - public VolrathsShapeshifterEffect(final VolrathsShapeshifterEffect effect) { + private VolrathsShapeshifterEffect(final VolrathsShapeshifterEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VolunteerReserves.java b/Mage.Sets/src/mage/cards/v/VolunteerReserves.java index fff277353ce..2f1f322fbc5 100644 --- a/Mage.Sets/src/mage/cards/v/VolunteerReserves.java +++ b/Mage.Sets/src/mage/cards/v/VolunteerReserves.java @@ -33,7 +33,7 @@ public final class VolunteerReserves extends CardImpl { this.addAbility(new CumulativeUpkeepAbility(new ManaCostsImpl<>("{1}"))); } - public VolunteerReserves (final VolunteerReserves card) { + private VolunteerReserves(final VolunteerReserves card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/v/VonasHunger.java b/Mage.Sets/src/mage/cards/v/VonasHunger.java index 113d8a9d3b7..1cf757136d5 100644 --- a/Mage.Sets/src/mage/cards/v/VonasHunger.java +++ b/Mage.Sets/src/mage/cards/v/VonasHunger.java @@ -64,7 +64,7 @@ class VonasHungerEffect extends OneShotEffect { super(Outcome.Sacrifice); } - public VonasHungerEffect(final VonasHungerEffect effect) { + private VonasHungerEffect(final VonasHungerEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VorelOfTheHullClade.java b/Mage.Sets/src/mage/cards/v/VorelOfTheHullClade.java index 8cc4ddbf489..5c47115f886 100644 --- a/Mage.Sets/src/mage/cards/v/VorelOfTheHullClade.java +++ b/Mage.Sets/src/mage/cards/v/VorelOfTheHullClade.java @@ -71,7 +71,7 @@ class VorelOfTheHullCladeEffect extends OneShotEffect { staticText = "double the number of each kind of counter on target artifact, creature, or land"; } - public VorelOfTheHullCladeEffect(VorelOfTheHullCladeEffect effect) { + private VorelOfTheHullCladeEffect(final VorelOfTheHullCladeEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VorracBattlehorns.java b/Mage.Sets/src/mage/cards/v/VorracBattlehorns.java index 2039232ed78..63dbd0bdabf 100644 --- a/Mage.Sets/src/mage/cards/v/VorracBattlehorns.java +++ b/Mage.Sets/src/mage/cards/v/VorracBattlehorns.java @@ -71,7 +71,7 @@ class CantBeBlockedByMoreThanOneAttachedEffect extends ContinuousEffectImpl { staticText = attachmentType.verb() + " creature can't be blocked by more than " + CardUtil.numberToText(amount) + " creature" + (amount==1 ?"":"s"); } - public CantBeBlockedByMoreThanOneAttachedEffect(final CantBeBlockedByMoreThanOneAttachedEffect effect) { + private CantBeBlockedByMoreThanOneAttachedEffect(final CantBeBlockedByMoreThanOneAttachedEffect effect) { super(effect); this.amount = effect.amount; this.attachmentType = effect.attachmentType; diff --git a/Mage.Sets/src/mage/cards/v/VortexElemental.java b/Mage.Sets/src/mage/cards/v/VortexElemental.java index 2ce1dbc643a..381d62067ed 100644 --- a/Mage.Sets/src/mage/cards/v/VortexElemental.java +++ b/Mage.Sets/src/mage/cards/v/VortexElemental.java @@ -63,7 +63,7 @@ class VortexElementalEffect extends OneShotEffect { this.staticText = "Put {this} and each creature blocking or blocked by it on top of their owners' libraries, then those players shuffle"; } - public VortexElementalEffect(final VortexElementalEffect effect) { + private VortexElementalEffect(final VortexElementalEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VotaryOfTheConclave.java b/Mage.Sets/src/mage/cards/v/VotaryOfTheConclave.java index d021cc454aa..0e12fdba678 100644 --- a/Mage.Sets/src/mage/cards/v/VotaryOfTheConclave.java +++ b/Mage.Sets/src/mage/cards/v/VotaryOfTheConclave.java @@ -29,7 +29,7 @@ public final class VotaryOfTheConclave extends CardImpl { this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ManaCostsImpl<>("{2}{G}"))); } - public VotaryOfTheConclave (final VotaryOfTheConclave card) { + private VotaryOfTheConclave(final VotaryOfTheConclave card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/v/VoyagerStaff.java b/Mage.Sets/src/mage/cards/v/VoyagerStaff.java index d6a71dbd45b..47c75c97ca5 100644 --- a/Mage.Sets/src/mage/cards/v/VoyagerStaff.java +++ b/Mage.Sets/src/mage/cards/v/VoyagerStaff.java @@ -53,7 +53,7 @@ class VoyagerStaffEffect extends OneShotEffect { staticText = "exile target creature. Return the exiled card to the battlefield under its owner's control at the beginning of the next end step"; } - public VoyagerStaffEffect(final VoyagerStaffEffect effect) { + private VoyagerStaffEffect(final VoyagerStaffEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VraskaRegalGorgon.java b/Mage.Sets/src/mage/cards/v/VraskaRegalGorgon.java index 0ef5c7e498b..88408cc4995 100644 --- a/Mage.Sets/src/mage/cards/v/VraskaRegalGorgon.java +++ b/Mage.Sets/src/mage/cards/v/VraskaRegalGorgon.java @@ -72,7 +72,7 @@ class VraskaRegalGorgonEffect extends OneShotEffect { + "put a +1/+1 counter on each creature you control."; } - public VraskaRegalGorgonEffect(final VraskaRegalGorgonEffect effect) { + private VraskaRegalGorgonEffect(final VraskaRegalGorgonEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VraskaRelicSeeker.java b/Mage.Sets/src/mage/cards/v/VraskaRelicSeeker.java index a95fc81d541..5c738477a2a 100644 --- a/Mage.Sets/src/mage/cards/v/VraskaRelicSeeker.java +++ b/Mage.Sets/src/mage/cards/v/VraskaRelicSeeker.java @@ -66,7 +66,7 @@ class VraskaRelicSeekerLifeTotalEffect extends OneShotEffect { staticText = "Target player's life total becomes 1"; } - public VraskaRelicSeekerLifeTotalEffect(VraskaRelicSeekerLifeTotalEffect effect) { + private VraskaRelicSeekerLifeTotalEffect(final VraskaRelicSeekerLifeTotalEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VraskaSwarmsEminence.java b/Mage.Sets/src/mage/cards/v/VraskaSwarmsEminence.java index 95e971be084..40db4401fe8 100644 --- a/Mage.Sets/src/mage/cards/v/VraskaSwarmsEminence.java +++ b/Mage.Sets/src/mage/cards/v/VraskaSwarmsEminence.java @@ -69,7 +69,7 @@ class VraskaSwarmsEminenceTriggeredAbility extends TriggeredAbilityImpl { setTriggerPhrase("Whenever a creature you control with deathtouch deals damage to a player or planeswalker, "); } - public VraskaSwarmsEminenceTriggeredAbility(final VraskaSwarmsEminenceTriggeredAbility ability) { + private VraskaSwarmsEminenceTriggeredAbility(final VraskaSwarmsEminenceTriggeredAbility ability) { super(ability); } diff --git a/Mage.Sets/src/mage/cards/v/VraskaTheUnseen.java b/Mage.Sets/src/mage/cards/v/VraskaTheUnseen.java index f7200047e4f..030927e658f 100644 --- a/Mage.Sets/src/mage/cards/v/VraskaTheUnseen.java +++ b/Mage.Sets/src/mage/cards/v/VraskaTheUnseen.java @@ -70,7 +70,7 @@ class VraskaTheUnseenGainAbilityEffect extends ContinuousEffectImpl { staticText = "Until your next turn, whenever a creature deals combat damage to {this}, destroy that creature"; } - public VraskaTheUnseenGainAbilityEffect(final VraskaTheUnseenGainAbilityEffect effect) { + private VraskaTheUnseenGainAbilityEffect(final VraskaTheUnseenGainAbilityEffect effect) { super(effect); this.ability = effect.ability.copy(); } @@ -102,7 +102,7 @@ class VraskaTheUnseenTriggeredAbility extends TriggeredAbilityImpl { super(Zone.BATTLEFIELD, new DestroyTargetEffect()); } - public VraskaTheUnseenTriggeredAbility(final VraskaTheUnseenTriggeredAbility ability) { + private VraskaTheUnseenTriggeredAbility(final VraskaTheUnseenTriggeredAbility ability) { super(ability); } diff --git a/Mage.Sets/src/mage/cards/v/VraskasStoneglare.java b/Mage.Sets/src/mage/cards/v/VraskasStoneglare.java index 3e7a6d9e93e..65e6c97d887 100644 --- a/Mage.Sets/src/mage/cards/v/VraskasStoneglare.java +++ b/Mage.Sets/src/mage/cards/v/VraskasStoneglare.java @@ -56,7 +56,7 @@ class VraskasStoneglareEffect extends OneShotEffect { + "You gain life equal to its toughness"; } - public VraskasStoneglareEffect(final VraskasStoneglareEffect effect) { + private VraskasStoneglareEffect(final VraskasStoneglareEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VulshokBattlegear.java b/Mage.Sets/src/mage/cards/v/VulshokBattlegear.java index 5c1eb65c814..3eec213315f 100644 --- a/Mage.Sets/src/mage/cards/v/VulshokBattlegear.java +++ b/Mage.Sets/src/mage/cards/v/VulshokBattlegear.java @@ -27,7 +27,7 @@ public final class VulshokBattlegear extends CardImpl { this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(3, 3))); } - public VulshokBattlegear (final VulshokBattlegear card) { + private VulshokBattlegear(final VulshokBattlegear card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/v/VulshokBattlemaster.java b/Mage.Sets/src/mage/cards/v/VulshokBattlemaster.java index f82bd774c03..ff63b0753b8 100644 --- a/Mage.Sets/src/mage/cards/v/VulshokBattlemaster.java +++ b/Mage.Sets/src/mage/cards/v/VulshokBattlemaster.java @@ -50,7 +50,7 @@ public final class VulshokBattlemaster extends CardImpl { this.staticText = "attach all Equipment on the battlefield to it"; } - public VulshokBattlemasterEffect(final VulshokBattlemasterEffect effect) { + private VulshokBattlemasterEffect(final VulshokBattlemasterEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VulshokGauntlets.java b/Mage.Sets/src/mage/cards/v/VulshokGauntlets.java index f562e4a992f..34df214061b 100644 --- a/Mage.Sets/src/mage/cards/v/VulshokGauntlets.java +++ b/Mage.Sets/src/mage/cards/v/VulshokGauntlets.java @@ -61,7 +61,7 @@ class VulshokGauntletsEffect extends ReplacementEffectImpl { staticText = "Equipped creature doesn't untap during its controller's untap step"; } - public VulshokGauntletsEffect(final VulshokGauntletsEffect effect) { + private VulshokGauntletsEffect(final VulshokGauntletsEffect effect) { super(effect); } diff --git a/Mage.Sets/src/mage/cards/v/VulshokHeartstoker.java b/Mage.Sets/src/mage/cards/v/VulshokHeartstoker.java index 5a294efd8b2..a96b35050be 100644 --- a/Mage.Sets/src/mage/cards/v/VulshokHeartstoker.java +++ b/Mage.Sets/src/mage/cards/v/VulshokHeartstoker.java @@ -32,7 +32,7 @@ public final class VulshokHeartstoker extends CardImpl { this.addAbility(ability); } - public VulshokHeartstoker (final VulshokHeartstoker card) { + private VulshokHeartstoker(final VulshokHeartstoker card) { super(card); } From a7a4299c7f6d955cb2ade30bd6f6f99434a062c7 Mon Sep 17 00:00:00 2001 From: Vivian Greenslade Date: Wed, 30 Aug 2023 21:18:33 -0230 Subject: [PATCH 21/36] [WOC] Implement Knickknack Ouphe (#11070) --- .../src/mage/cards/k/KnickknackOuphe.java | 122 ++++++++++++++++++ .../mage/sets/WildsOfEldraineCommander.java | 1 + 2 files changed, 123 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/k/KnickknackOuphe.java diff --git a/Mage.Sets/src/mage/cards/k/KnickknackOuphe.java b/Mage.Sets/src/mage/cards/k/KnickknackOuphe.java new file mode 100644 index 00000000000..d954836c697 --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KnickknackOuphe.java @@ -0,0 +1,122 @@ +package mage.cards.k; + +import java.util.UUID; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.dynamicvalue.common.ManacostVariableValue; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.ComparisonType; +import mage.constants.Outcome; +import mage.constants.PutCards; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.filter.FilterCard; +import mage.filter.common.FilterEnchantmentCard; +import mage.filter.predicate.mageobject.ManaValuePredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.TargetCard; + +/** + * + * @author Xanderhall + */ +public final class KnickknackOuphe extends CardImpl { + + public KnickknackOuphe(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{X}{G}"); + + this.subtype.add(SubType.OUPHE); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // Knickknack Ouphe enters the battlefield with X +1/+1 counters on it. + this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.P1P1.createInstance()))); + + // When Knickknack Ouphe enters the battlefield, reveal the top X cards of your library. You may put any number of Aura cards with mana value X or less from among them onto the battlefield. Then put all cards revealed this way that weren't put onto the battlefield on the bottom of your library in a random order. + this.addAbility(new EntersBattlefieldAbility(new KnickknackOuphePutOntoBattlefieldEffect())); + + } + + private KnickknackOuphe(final KnickknackOuphe card) { + super(card); + } + + @Override + public KnickknackOuphe copy() { + return new KnickknackOuphe(this); + } +} + +class KnickknackOuphePutOntoBattlefieldEffect extends OneShotEffect { + + public KnickknackOuphePutOntoBattlefieldEffect() { + super(Outcome.PutCardInPlay); + staticText = "reveal the top X cards of your library. " + + "You may put any number of Aura cards with mana value X or less from among them onto the battlefield. " + + "Then put all cards revealed this way that weren't put onto the battlefield on the bottom of your library in a random order"; + } + + public KnickknackOuphePutOntoBattlefieldEffect(final KnickknackOuphePutOntoBattlefieldEffect effect) { + super(effect); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + int count = ManacostVariableValue.ETB.calculate(game, source, null); + if (count > 0) { + Cards cards = new CardsImpl(controller.getLibrary().getTopCards(game, count)); + controller.revealCards(source, cards, game); + + FilterCard filter = new FilterEnchantmentCard("Aura cards with mana value " + count + " or less to put onto the battlefield"); + filter.add(SubType.AURA.getPredicate()); + filter.add(new ManaValuePredicate(ComparisonType.OR_LESS, count)); + + if (cards.count(filter, controller.getId(), source, game) > 0) { + TargetCard targetAuras = new TargetCard(0, count, Zone.LIBRARY, filter); + targetAuras.setRequired(false); + + if (controller.choose(Outcome.PutCardInPlay, cards, targetAuras, source, game)) { + targetAuras.getTargets().stream().forEach(t -> { + Card card = cards.get(t, game); + if (card != null) { + cards.remove(card); + controller.moveCards(card, Zone.BATTLEFIELD, source, game); + } + }); + + targetAuras.clearChosen(); + } else { + game.informPlayers(controller.getLogName() + " didn't choose anything"); + } + } else { + game.informPlayers("No Aura cards with mana value " + count + " or less to choose."); + } + + if (!cards.isEmpty()) { + PutCards.BOTTOM_RANDOM.moveCards(controller, cards, source, game); + } + } + return true; + } + return false; + } + + @Override + public KnickknackOuphePutOntoBattlefieldEffect copy() { + return new KnickknackOuphePutOntoBattlefieldEffect(this); + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/WildsOfEldraineCommander.java b/Mage.Sets/src/mage/sets/WildsOfEldraineCommander.java index 883c7e8ecf4..eb4f4a8e95b 100644 --- a/Mage.Sets/src/mage/sets/WildsOfEldraineCommander.java +++ b/Mage.Sets/src/mage/sets/WildsOfEldraineCommander.java @@ -77,6 +77,7 @@ public final class WildsOfEldraineCommander extends ExpansionSet { cards.add(new SetCardInfo("Keep Watch", 98, Rarity.COMMON, mage.cards.k.KeepWatch.class)); cards.add(new SetCardInfo("Kenrith's Transformation", 128, Rarity.UNCOMMON, mage.cards.k.KenrithsTransformation.class)); cards.add(new SetCardInfo("Kindred Dominance", 113, Rarity.RARE, mage.cards.k.KindredDominance.class)); + cards.add(new SetCardInfo("Knickknack Ouphe", 18, Rarity.RARE, mage.cards.k.KnickknackOuphe.class)); cards.add(new SetCardInfo("Kor Spiritdancer", 69, Rarity.RARE, mage.cards.k.KorSpiritdancer.class)); cards.add(new SetCardInfo("Krosan Verge", 163, Rarity.UNCOMMON, mage.cards.k.KrosanVerge.class)); cards.add(new SetCardInfo("Loamcrafter Faun", 19, Rarity.RARE, mage.cards.l.LoamcrafterFaun.class)); From c45bc1e884080be170cd81a18cd6cfadaf538bc5 Mon Sep 17 00:00:00 2001 From: Vivian Greenslade Date: Wed, 30 Aug 2023 21:18:40 -0230 Subject: [PATCH 22/36] [WOC] Implement Malleable Impostor (#11074) --- .../src/mage/cards/m/MalleableImpostor.java | 66 +++++++++++++++++++ .../mage/sets/WildsOfEldraineCommander.java | 1 + 2 files changed, 67 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/m/MalleableImpostor.java diff --git a/Mage.Sets/src/mage/cards/m/MalleableImpostor.java b/Mage.Sets/src/mage/cards/m/MalleableImpostor.java new file mode 100644 index 00000000000..5a729211544 --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MalleableImpostor.java @@ -0,0 +1,66 @@ +package mage.cards.m; + +import java.util.UUID; +import mage.MageInt; +import mage.MageObject; +import mage.constants.SubType; +import mage.filter.StaticFilters; +import mage.game.Game; +import mage.util.functions.CopyApplier; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.effects.common.CopyPermanentEffect; +import mage.abilities.keyword.FlashAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author Xanderhall + */ +public final class MalleableImpostor extends CardImpl { + + public MalleableImpostor(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}"); + + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.SHAPESHIFTER); + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + // Flash, Flying + this.addAbility(FlashAbility.getInstance()); + this.addAbility(FlyingAbility.getInstance()); + + // You may have Malleable Impostor enter the battlefield as a copy of a creature an opponent controls, except it's a Faerie Shapeshifter in addition to its other types and it has flying. + this.addAbility(new EntersBattlefieldAbility( + new CopyPermanentEffect(StaticFilters.FILTER_OPPONENTS_PERMANENT_A_CREATURE, new MalleableImpostorCopyApplier()), + true, null, + "you may have {this} enter the battlefield as a copy of a creature an opponent controls, "+ + "except it's a Faerie Shapeshifter in addition to its other types and it has flying.", "" + )); + + } + + private MalleableImpostor(final MalleableImpostor card) { + super(card); + } + + @Override + public MalleableImpostor copy() { + return new MalleableImpostor(this); + } +} + +class MalleableImpostorCopyApplier extends CopyApplier { + + @Override + public boolean apply(Game game, MageObject blueprint, Ability source, UUID targetObjectId) { + blueprint.addSubType(SubType.FAERIE, SubType.SHAPESHIFTER); + blueprint.getAbilities().add(FlyingAbility.getInstance()); + return true; + } + +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/WildsOfEldraineCommander.java b/Mage.Sets/src/mage/sets/WildsOfEldraineCommander.java index eb4f4a8e95b..a8e7e0662ab 100644 --- a/Mage.Sets/src/mage/sets/WildsOfEldraineCommander.java +++ b/Mage.Sets/src/mage/sets/WildsOfEldraineCommander.java @@ -81,6 +81,7 @@ public final class WildsOfEldraineCommander extends ExpansionSet { cards.add(new SetCardInfo("Kor Spiritdancer", 69, Rarity.RARE, mage.cards.k.KorSpiritdancer.class)); cards.add(new SetCardInfo("Krosan Verge", 163, Rarity.UNCOMMON, mage.cards.k.KrosanVerge.class)); cards.add(new SetCardInfo("Loamcrafter Faun", 19, Rarity.RARE, mage.cards.l.LoamcrafterFaun.class)); + cards.add(new SetCardInfo("Malleable Impostor", 10, Rarity.RARE, mage.cards.m.MalleableImpostor.class)); cards.add(new SetCardInfo("Mantle of the Ancients", 70, Rarity.RARE, mage.cards.m.MantleOfTheAncients.class)); cards.add(new SetCardInfo("Midnight Clock", 99, Rarity.RARE, mage.cards.m.MidnightClock.class)); cards.add(new SetCardInfo("Mind Stone", 148, Rarity.COMMON, mage.cards.m.MindStone.class)); From 3f25b93e9162231ba180c11892361e97f547e716 Mon Sep 17 00:00:00 2001 From: xenohedron Date: Wed, 30 Aug 2023 20:15:41 -0400 Subject: [PATCH 23/36] [WOE] enable booster generation --- Mage.Sets/src/mage/sets/WildsOfEldraine.java | 41 +++++++++++++++++++- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/Mage.Sets/src/mage/sets/WildsOfEldraine.java b/Mage.Sets/src/mage/sets/WildsOfEldraine.java index 992f111d406..ff07f89fce5 100644 --- a/Mage.Sets/src/mage/sets/WildsOfEldraine.java +++ b/Mage.Sets/src/mage/sets/WildsOfEldraine.java @@ -1,8 +1,12 @@ package mage.sets; +import mage.cards.Card; import mage.cards.ExpansionSet; import mage.constants.Rarity; import mage.constants.SetType; +import mage.util.RandomUtil; + +import java.util.List; /** * @author TheElk801 @@ -18,7 +22,15 @@ public final class WildsOfEldraine extends ExpansionSet { private WildsOfEldraine() { super("Wilds of Eldraine", "WOE", ExpansionSet.buildDate(2023, 9, 8), SetType.EXPANSION); this.blockName = "Wilds of Eldraine"; - this.hasBoosters = false; // temporary + this.hasBoosters = true; + this.hasBasicLands = true; + this.numBoosterLands = 1; + this.numBoosterCommon = 9; + this.numBoosterUncommon = 3; + this.numBoosterRare = 1; + this.ratioBoosterMythic = 7; + this.numBoosterSpecial = 1; // WOT: Enchanting Tales + this.maxCardNumberInBooster = 276; cards.add(new SetCardInfo("A Tale for the Ages", 34, Rarity.RARE, mage.cards.a.ATaleForTheAges.class)); cards.add(new SetCardInfo("Agatha of the Vile Cauldron", 199, Rarity.MYTHIC, mage.cards.a.AgathaOfTheVileCauldron.class)); @@ -100,8 +112,10 @@ public final class WildsOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Ferocious Werefox", 170, Rarity.COMMON, mage.cards.f.FerociousWerefox.class)); cards.add(new SetCardInfo("Flick a Coin", 128, Rarity.COMMON, mage.cards.f.FlickACoin.class)); cards.add(new SetCardInfo("Food Coma", 308, Rarity.UNCOMMON, mage.cards.f.FoodComa.class)); - cards.add(new SetCardInfo("Food Fight", 346, Rarity.RARE, mage.cards.f.FoodFight.class)); + cards.add(new SetCardInfo("Food Fight", 129, Rarity.RARE, mage.cards.f.FoodFight.class)); cards.add(new SetCardInfo("Forest", 266, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Forest", 275, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Forest", 276, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Frantic Firebolt", 130, Rarity.COMMON, mage.cards.f.FranticFirebolt.class)); cards.add(new SetCardInfo("Freeze in Place", 50, Rarity.COMMON, mage.cards.f.FreezeInPlace.class)); cards.add(new SetCardInfo("Frolicking Familiar", 226, Rarity.UNCOMMON, mage.cards.f.FrolickingFamiliar.class)); @@ -140,6 +154,8 @@ public final class WildsOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Into the Fae Court", 57, Rarity.COMMON, mage.cards.i.IntoTheFaeCourt.class)); cards.add(new SetCardInfo("Intrepid Trufflesnout", 320, Rarity.UNCOMMON, mage.cards.i.IntrepidTrufflesnout.class)); cards.add(new SetCardInfo("Island", 263, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Island", 269, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Island", 270, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Johann's Stopgap", 58, Rarity.COMMON, mage.cards.j.JohannsStopgap.class)); cards.add(new SetCardInfo("Johann, Apprentice Sorcerer", 207, Rarity.UNCOMMON, mage.cards.j.JohannApprenticeSorcerer.class)); cards.add(new SetCardInfo("Kellan's Lightblades", 18, Rarity.COMMON, mage.cards.k.KellansLightblades.class)); @@ -167,6 +183,8 @@ public final class WildsOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Moonshaker Cavalry", 21, Rarity.MYTHIC, mage.cards.m.MoonshakerCavalry.class)); cards.add(new SetCardInfo("Mosswood Dreadknight", 231, Rarity.RARE, mage.cards.m.MosswoodDreadknight.class)); cards.add(new SetCardInfo("Mountain", 265, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Mountain", 273, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Mountain", 274, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Neva, Stalked by Nightmares", 209, Rarity.UNCOMMON, mage.cards.n.NevaStalkedByNightmares.class)); cards.add(new SetCardInfo("Night of the Sweets' Revenge", 178, Rarity.UNCOMMON, mage.cards.n.NightOfTheSweetsRevenge.class)); cards.add(new SetCardInfo("Not Dead After All", 101, Rarity.COMMON, mage.cards.n.NotDeadAfterAll.class)); @@ -178,6 +196,8 @@ public final class WildsOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Picklock Prankster", 64, Rarity.UNCOMMON, mage.cards.p.PicklockPrankster.class)); cards.add(new SetCardInfo("Picnic Ruiner", 232, Rarity.UNCOMMON, mage.cards.p.PicnicRuiner.class)); cards.add(new SetCardInfo("Plains", 262, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Plains", 267, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Plains", 268, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Plunge into Winter", 22, Rarity.COMMON, mage.cards.p.PlungeIntoWinter.class)); cards.add(new SetCardInfo("Pollen-Shield Hare", 233, Rarity.RARE, mage.cards.p.PollenShieldHare.class)); cards.add(new SetCardInfo("Prophetic Prism", 249, Rarity.COMMON, mage.cards.p.PropheticPrism.class)); @@ -244,6 +264,8 @@ public final class WildsOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Succumb to the Cold", 72, Rarity.UNCOMMON, mage.cards.s.SuccumbToTheCold.class)); cards.add(new SetCardInfo("Sugar Rush", 110, Rarity.COMMON, mage.cards.s.SugarRush.class)); cards.add(new SetCardInfo("Swamp", 264, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Swamp", 271, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Swamp", 272, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Sweettooth Witch", 111, Rarity.COMMON, mage.cards.s.SweettoothWitch.class)); cards.add(new SetCardInfo("Syr Armont, the Redeemer", 214, Rarity.UNCOMMON, mage.cards.s.SyrArmontTheRedeemer.class)); cards.add(new SetCardInfo("Syr Ginger, the Meal Ender", 252, Rarity.RARE, mage.cards.s.SyrGingerTheMealEnder.class)); @@ -303,6 +325,21 @@ public final class WildsOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Yenna, Redtooth Regent", 219, Rarity.RARE, mage.cards.y.YennaRedtoothRegent.class)); } + @Override + protected void addSpecialCards(List booster, int number) { + // Boosters have one card from WOT, odds are 2/3 for uncommon, 4/15 for rare, 1/15 for mythic + Rarity rarity; + int rarityKey = RandomUtil.nextInt(15); + if (rarityKey == 14) { + rarity = Rarity.MYTHIC; + } else if (rarityKey >= 10) { + rarity = Rarity.RARE; + } else { + rarity = Rarity.UNCOMMON; + } + addToBooster(booster, WildsOfEldraineEnchantingTales.getInstance().getCardsByRarity(rarity)); + } + // @Override // public BoosterCollator createCollator() { // return new WildsOfEldraineCollator(); From a65c2204ce4cdc53389c48385bff35ed21e0bd42 Mon Sep 17 00:00:00 2001 From: Vivian Greenslade Date: Wed, 30 Aug 2023 21:46:14 -0230 Subject: [PATCH 24/36] Rework CombatDamageByToughness effects (#11068) * split effect into three classes for convenience * added static filter * refactored cards using effect * fixed issues as per PR comments * changed predicate and fixed text * added unit test, fixed text issues with Baldin * set static text * changed outcome * added stop to test * fixs issues as per PR comments --- .../src/mage/cards/a/AncientLumberknot.java | 8 +- .../mage/cards/a/ArcadesTheStrategist.java | 19 ++--- .../src/mage/cards/a/AssaultFormation.java | 4 +- .../mage/cards/b/BaldinCenturyHerdmaster.java | 12 +-- .../mage/cards/b/BelligerentBrontodon.java | 5 +- Mage.Sets/src/mage/cards/b/BillThePony.java | 43 +---------- .../src/mage/cards/d/DoranTheSiegeTower.java | 9 ++- Mage.Sets/src/mage/cards/h/HighAlert.java | 9 +-- .../src/mage/cards/h/HuatliTheSunsHeart.java | 6 +- .../src/mage/cards/r/RasaadYnBashir.java | 6 +- .../mage/cards/s/StreetwiseNegotiator.java | 33 ++------- .../src/mage/cards/w/WalkingBulwark.java | 47 ++---------- .../cards/abilities/keywords/BackupTest.java | 18 +++++ .../CombatDamageByToughnessAllEffect.java | 48 ++++++++++++ .../CombatDamageByToughnessEffect.java | 73 ------------------- .../CombatDamageByToughnessSourceEffect.java | 46 ++++++++++++ .../CombatDamageByToughnessTargetEffect.java | 55 ++++++++++++++ .../main/java/mage/filter/StaticFilters.java | 7 ++ 18 files changed, 223 insertions(+), 225 deletions(-) create mode 100644 Mage/src/main/java/mage/abilities/effects/common/ruleModifying/CombatDamageByToughnessAllEffect.java delete mode 100644 Mage/src/main/java/mage/abilities/effects/common/ruleModifying/CombatDamageByToughnessEffect.java create mode 100644 Mage/src/main/java/mage/abilities/effects/common/ruleModifying/CombatDamageByToughnessSourceEffect.java create mode 100644 Mage/src/main/java/mage/abilities/effects/common/ruleModifying/CombatDamageByToughnessTargetEffect.java diff --git a/Mage.Sets/src/mage/cards/a/AncientLumberknot.java b/Mage.Sets/src/mage/cards/a/AncientLumberknot.java index cd944672aac..31507014fc7 100644 --- a/Mage.Sets/src/mage/cards/a/AncientLumberknot.java +++ b/Mage.Sets/src/mage/cards/a/AncientLumberknot.java @@ -2,11 +2,12 @@ package mage.cards.a; import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.common.ruleModifying.CombatDamageByToughnessEffect; +import mage.abilities.effects.common.ruleModifying.CombatDamageByToughnessAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; +import mage.constants.TargetController; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicate; import mage.game.Game; @@ -20,10 +21,11 @@ import java.util.UUID; public final class AncientLumberknot extends CardImpl { private static final FilterCreaturePermanent filter - = new FilterCreaturePermanent("creature you control with toughness greater than its power"); + = new FilterCreaturePermanent("each creature you control with toughness greater than its power"); static { filter.add(AncientLumberknotPredicate.instance); + filter.add(TargetController.YOU.getControllerPredicate()); } public AncientLumberknot(UUID ownerId, CardSetInfo setInfo) { @@ -34,7 +36,7 @@ public final class AncientLumberknot extends CardImpl { this.toughness = new MageInt(4); // Each creature you control with toughness greater than its power assigns combat damage equal to its toughness rather than its power. - this.addAbility(new SimpleStaticAbility(new CombatDamageByToughnessEffect(filter, true))); + this.addAbility(new SimpleStaticAbility(new CombatDamageByToughnessAllEffect(filter))); } private AncientLumberknot(final AncientLumberknot card) { diff --git a/Mage.Sets/src/mage/cards/a/ArcadesTheStrategist.java b/Mage.Sets/src/mage/cards/a/ArcadesTheStrategist.java index d556929c763..1f5e3ee9625 100644 --- a/Mage.Sets/src/mage/cards/a/ArcadesTheStrategist.java +++ b/Mage.Sets/src/mage/cards/a/ArcadesTheStrategist.java @@ -6,7 +6,7 @@ import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.common.DrawCardSourceControllerEffect; import mage.abilities.effects.common.combat.CanAttackAsThoughItDidntHaveDefenderAllEffect; -import mage.abilities.effects.common.ruleModifying.CombatDamageByToughnessEffect; +import mage.abilities.effects.common.ruleModifying.CombatDamageByToughnessAllEffect; import mage.abilities.keyword.DefenderAbility; import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.VigilanceAbility; @@ -24,13 +24,14 @@ import java.util.UUID; */ public final class ArcadesTheStrategist extends CardImpl { - private static final FilterControlledCreaturePermanent filter - = new FilterControlledCreaturePermanent("a creature with defender"); - private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent(); + private static final FilterControlledCreaturePermanent defenderSingle = new FilterControlledCreaturePermanent("a creature with defender"); + private static final FilterCreaturePermanent defenderPlural = new FilterCreaturePermanent("Each creature you control with defender"); static { - filter.add(new AbilityPredicate(DefenderAbility.class)); - filter2.add(new AbilityPredicate(DefenderAbility.class)); + defenderSingle.add(new AbilityPredicate(DefenderAbility.class)); + + defenderPlural.add(TargetController.YOU.getControllerPredicate()); + defenderPlural.add(new AbilityPredicate(DefenderAbility.class)); } public ArcadesTheStrategist(UUID ownerId, CardSetInfo setInfo) { @@ -50,13 +51,13 @@ public final class ArcadesTheStrategist extends CardImpl { // Whenever a creature with defender enters the battlefield under your control, draw a card. this.addAbility(new EntersBattlefieldControlledTriggeredAbility( - new DrawCardSourceControllerEffect(1), filter + new DrawCardSourceControllerEffect(1), defenderSingle )); // Each creature you control with defender assigns combat damage equal to its toughness rather than its power and can attack as though it didn't have defender. - Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new CombatDamageByToughnessEffect(filter2, true).setText("Each creature you control with defender assigns combat damage equal to its toughness rather than its power")); + Ability ability = new SimpleStaticAbility(new CombatDamageByToughnessAllEffect(defenderPlural)); ability.addEffect(new CanAttackAsThoughItDidntHaveDefenderAllEffect( - Duration.WhileOnBattlefield, filter + Duration.WhileOnBattlefield, defenderSingle ).setText("and can attack as though it didn't have defender")); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/a/AssaultFormation.java b/Mage.Sets/src/mage/cards/a/AssaultFormation.java index 5cc6683eb95..1ece2730289 100644 --- a/Mage.Sets/src/mage/cards/a/AssaultFormation.java +++ b/Mage.Sets/src/mage/cards/a/AssaultFormation.java @@ -7,7 +7,7 @@ import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.combat.CanAttackAsThoughItDidntHaveDefenderTargetEffect; import mage.abilities.effects.common.continuous.BoostControlledEffect; -import mage.abilities.effects.common.ruleModifying.CombatDamageByToughnessEffect; +import mage.abilities.effects.common.ruleModifying.CombatDamageByToughnessAllEffect; import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -36,7 +36,7 @@ public final class AssaultFormation extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}"); // Each creature you control assigns combat damage equal to its toughness rather than its power. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CombatDamageByToughnessEffect(StaticFilters.FILTER_PERMANENT_CREATURE, true))); + this.addAbility(new SimpleStaticAbility(new CombatDamageByToughnessAllEffect(StaticFilters.FILTER_CONTROLLED_CREATURE_EACH))); // {G}: Target creature with defender can attack this turn as though it didn't have defender. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CanAttackAsThoughItDidntHaveDefenderTargetEffect(Duration.EndOfTurn), new ManaCostsImpl<>("{G}")); diff --git a/Mage.Sets/src/mage/cards/b/BaldinCenturyHerdmaster.java b/Mage.Sets/src/mage/cards/b/BaldinCenturyHerdmaster.java index 3a21f5108f0..57061918a18 100644 --- a/Mage.Sets/src/mage/cards/b/BaldinCenturyHerdmaster.java +++ b/Mage.Sets/src/mage/cards/b/BaldinCenturyHerdmaster.java @@ -9,7 +9,7 @@ import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.dynamicvalue.common.CardsInControllerHandCount; import mage.abilities.dynamicvalue.common.StaticValue; import mage.abilities.effects.common.continuous.BoostTargetEffect; -import mage.abilities.effects.common.ruleModifying.CombatDamageByToughnessEffect; +import mage.abilities.effects.common.ruleModifying.CombatDamageByToughnessAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -35,19 +35,19 @@ public final class BaldinCenturyHerdmaster extends CardImpl { this.power = new MageInt(0); this.toughness = new MageInt(7); - // Sumo Spirit—As long as it's your turn, each creature assigns combat damage equal to its toughness rather than its power. + // As long as it's your turn, each creature assigns combat damage equal to its toughness rather than its power. this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect( - new CombatDamageByToughnessEffect(StaticFilters.FILTER_PERMANENT_CREATURE, false), + new CombatDamageByToughnessAllEffect(StaticFilters.FILTER_PERMANENT_CREATURE), MyTurnCondition.instance, "as long as it's your turn, each creature " + "assigns combat damage equal to its toughness rather than its power" - )).withFlavorWord("Sumo Spirit")); + ))); - // Hundred Hand Slap—Whenever E. Honda, Sumo Champion attacks, up to one hundred target creatures each get +0/+X until end of turn, where X is the number of cards in your hand. + // Whenever Baldin, Century Herdmaster attacks, up to one hundred target creatures each get +0/+X until end of turn, where X is the number of cards in your hand. Ability ability = new AttacksTriggeredAbility(new BoostTargetEffect( StaticValue.get(0), CardsInControllerHandCount.instance, Duration.EndOfTurn ).setText("up to one hundred target creatures each get +0/+X until end of turn, where X is the number of cards in your hand")); ability.addTarget(new TargetCreaturePermanent(0, 100)); - this.addAbility(ability.withFlavorWord("Hundred Hand Slap")); + this.addAbility(ability); } private BaldinCenturyHerdmaster(final BaldinCenturyHerdmaster card) { diff --git a/Mage.Sets/src/mage/cards/b/BelligerentBrontodon.java b/Mage.Sets/src/mage/cards/b/BelligerentBrontodon.java index e6243b73c8c..f5342dff7f4 100644 --- a/Mage.Sets/src/mage/cards/b/BelligerentBrontodon.java +++ b/Mage.Sets/src/mage/cards/b/BelligerentBrontodon.java @@ -3,14 +3,13 @@ package mage.cards.b; import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.common.ruleModifying.CombatDamageByToughnessEffect; +import mage.abilities.effects.common.ruleModifying.CombatDamageByToughnessAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; import mage.filter.StaticFilters; - import java.util.UUID; /** @@ -26,7 +25,7 @@ public final class BelligerentBrontodon extends CardImpl { this.toughness = new MageInt(6); // Each creature you control assigns combat damage equal to its toughness rather than its power. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CombatDamageByToughnessEffect(StaticFilters.FILTER_PERMANENT_CREATURE, true))); + this.addAbility(new SimpleStaticAbility(new CombatDamageByToughnessAllEffect(StaticFilters.FILTER_CONTROLLED_CREATURE_EACH))); } private BelligerentBrontodon(final BelligerentBrontodon card) { diff --git a/Mage.Sets/src/mage/cards/b/BillThePony.java b/Mage.Sets/src/mage/cards/b/BillThePony.java index ddea33ae923..60d69e3a2d1 100644 --- a/Mage.Sets/src/mage/cards/b/BillThePony.java +++ b/Mage.Sets/src/mage/cards/b/BillThePony.java @@ -6,20 +6,12 @@ import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.SacrificeTargetCost; -import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.CreateTokenEffect; -import mage.abilities.effects.common.ruleModifying.CombatDamageByToughnessEffect; +import mage.abilities.effects.common.ruleModifying.CombatDamageByToughnessTargetEffect; import mage.constants.*; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.filter.FilterPermanent; import mage.filter.StaticFilters; -import mage.filter.common.FilterControlledCreaturePermanent; -import mage.filter.common.FilterControlledPermanent; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.mageobject.MageObjectReferencePredicate; -import mage.game.Game; -import mage.game.permanent.Permanent; import mage.game.permanent.token.FoodToken; import mage.target.TargetPermanent; import mage.target.common.TargetControlledPermanent; @@ -43,7 +35,7 @@ public final class BillThePony extends CardImpl { // Sacrifice a Food: Until end of turn, target creature you control assigns combat damage equal to its toughness rather than its power. Ability ability = new SimpleActivatedAbility( - new BillThePonyEffect(), + new CombatDamageByToughnessTargetEffect(Duration.EndOfTurn), new SacrificeTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_FOOD)) ); ability.addTarget(new TargetPermanent(StaticFilters.FILTER_CONTROLLED_CREATURE)); @@ -59,35 +51,4 @@ public final class BillThePony extends CardImpl { public BillThePony copy() { return new BillThePony(this); } -} - -class BillThePonyEffect extends OneShotEffect { - - BillThePonyEffect() { - super(Outcome.Benefit); - staticText = "Until end of turn, target creature you control assigns " + - "combat damage equal to its toughness rather than its power."; - } - - private BillThePonyEffect(final BillThePonyEffect effect) { - super(effect); - } - - @Override - public BillThePonyEffect copy() { - return new BillThePonyEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source)); - if (permanent == null) { - return false; - } - - FilterCreaturePermanent filter = new FilterCreaturePermanent(); - filter.add(new MageObjectReferencePredicate(permanent, game)); - game.addEffect(new CombatDamageByToughnessEffect(filter, false, Duration.EndOfTurn), source); - return true; - } } \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/d/DoranTheSiegeTower.java b/Mage.Sets/src/mage/cards/d/DoranTheSiegeTower.java index 7d4d5dd39c3..3997d83a03b 100644 --- a/Mage.Sets/src/mage/cards/d/DoranTheSiegeTower.java +++ b/Mage.Sets/src/mage/cards/d/DoranTheSiegeTower.java @@ -2,13 +2,14 @@ package mage.cards.d; import mage.MageInt; import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.common.ruleModifying.CombatDamageByToughnessEffect; +import mage.abilities.effects.common.ruleModifying.CombatDamageByToughnessAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.SuperType; import mage.filter.StaticFilters; +import mage.filter.common.FilterCreaturePermanent; import java.util.UUID; @@ -25,6 +26,8 @@ import java.util.UUID; */ public final class DoranTheSiegeTower extends CardImpl { + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("each creature"); + public DoranTheSiegeTower(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}{B}{G}"); this.supertype.add(SuperType.LEGENDARY); @@ -35,9 +38,7 @@ public final class DoranTheSiegeTower extends CardImpl { this.toughness = new MageInt(5); // Each creature assigns combat damage equal to its toughness rather than its power. - this.addAbility(new SimpleStaticAbility(new CombatDamageByToughnessEffect( - StaticFilters.FILTER_PERMANENT_CREATURE, false - ))); + this.addAbility(new SimpleStaticAbility(new CombatDamageByToughnessAllEffect(filter))); } private DoranTheSiegeTower(final DoranTheSiegeTower card) { diff --git a/Mage.Sets/src/mage/cards/h/HighAlert.java b/Mage.Sets/src/mage/cards/h/HighAlert.java index 4a397e082e7..cecefcc4408 100644 --- a/Mage.Sets/src/mage/cards/h/HighAlert.java +++ b/Mage.Sets/src/mage/cards/h/HighAlert.java @@ -6,7 +6,7 @@ import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.UntapTargetEffect; import mage.abilities.effects.common.combat.CanAttackAsThoughItDidntHaveDefenderAllEffect; -import mage.abilities.effects.common.ruleModifying.CombatDamageByToughnessEffect; +import mage.abilities.effects.common.ruleModifying.CombatDamageByToughnessAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -27,12 +27,7 @@ public final class HighAlert extends CardImpl { // Each creature you control assigns combat damage equal to its toughness rather than its power. - this.addAbility(new SimpleStaticAbility( - Zone.BATTLEFIELD, - new CombatDamageByToughnessEffect( - StaticFilters.FILTER_PERMANENT_CREATURE, true - ) - )); + this.addAbility(new SimpleStaticAbility(new CombatDamageByToughnessAllEffect(StaticFilters.FILTER_CONTROLLED_CREATURE_EACH))); // Creatures you control can attack as though they didn't have defender. this.addAbility(new SimpleStaticAbility( diff --git a/Mage.Sets/src/mage/cards/h/HuatliTheSunsHeart.java b/Mage.Sets/src/mage/cards/h/HuatliTheSunsHeart.java index 83ec5fabfb6..5d4ce5f4caa 100644 --- a/Mage.Sets/src/mage/cards/h/HuatliTheSunsHeart.java +++ b/Mage.Sets/src/mage/cards/h/HuatliTheSunsHeart.java @@ -4,7 +4,7 @@ import mage.abilities.LoyaltyAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.dynamicvalue.common.GreatestToughnessAmongControlledCreaturesValue; import mage.abilities.effects.common.GainLifeEffect; -import mage.abilities.effects.common.ruleModifying.CombatDamageByToughnessEffect; +import mage.abilities.effects.common.ruleModifying.CombatDamageByToughnessAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -27,9 +27,7 @@ public final class HuatliTheSunsHeart extends CardImpl { this.setStartingLoyalty(7); // Each creature you control assigns combat damage equal to its toughness rather than its power. - this.addAbility(new SimpleStaticAbility(new CombatDamageByToughnessEffect( - StaticFilters.FILTER_PERMANENT_CREATURE, true - ))); + this.addAbility(new SimpleStaticAbility(new CombatDamageByToughnessAllEffect(StaticFilters.FILTER_CONTROLLED_CREATURE_EACH))); // -3: You gain life equal to the greatest toughness among creatures you control. this.addAbility(new LoyaltyAbility(new GainLifeEffect( diff --git a/Mage.Sets/src/mage/cards/r/RasaadYnBashir.java b/Mage.Sets/src/mage/cards/r/RasaadYnBashir.java index 25c41f626c2..45ef52ba1d6 100644 --- a/Mage.Sets/src/mage/cards/r/RasaadYnBashir.java +++ b/Mage.Sets/src/mage/cards/r/RasaadYnBashir.java @@ -9,7 +9,7 @@ import mage.abilities.condition.common.HaveInitiativeCondition; import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.continuous.BoostTargetEffect; -import mage.abilities.effects.common.ruleModifying.CombatDamageByToughnessEffect; +import mage.abilities.effects.common.ruleModifying.CombatDamageByToughnessAllEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -38,9 +38,7 @@ public final class RasaadYnBashir extends CardImpl { this.toughness = new MageInt(3); // Each creature you control assigns combat damage equal to its toughness rather than its power. - this.addAbility(new SimpleStaticAbility(new CombatDamageByToughnessEffect( - StaticFilters.FILTER_PERMANENT_CREATURE, true - ))); + this.addAbility(new SimpleStaticAbility(new CombatDamageByToughnessAllEffect(StaticFilters.FILTER_CONTROLLED_CREATURE_EACH))); // Whenever Rasaad yn Bashir attacks, if you have the initiative, double the toughness of each creature you control until end of turn. this.addAbility(new ConditionalInterveningIfTriggeredAbility( diff --git a/Mage.Sets/src/mage/cards/s/StreetwiseNegotiator.java b/Mage.Sets/src/mage/cards/s/StreetwiseNegotiator.java index 653b278359b..b5efb00f82a 100644 --- a/Mage.Sets/src/mage/cards/s/StreetwiseNegotiator.java +++ b/Mage.Sets/src/mage/cards/s/StreetwiseNegotiator.java @@ -1,20 +1,14 @@ package mage.cards.s; import mage.MageInt; -import mage.MageObject; import mage.abilities.common.SimpleStaticAbility; -import mage.abilities.effects.common.ruleModifying.CombatDamageByToughnessEffect; +import mage.abilities.effects.common.ruleModifying.CombatDamageByToughnessSourceEffect; import mage.abilities.keyword.BackupAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.Duration; import mage.constants.SubType; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.ObjectSourcePlayer; -import mage.filter.predicate.ObjectSourcePlayerPredicate; -import mage.filter.predicate.mageobject.AnotherPredicate; -import mage.game.Game; - import java.util.UUID; /** @@ -22,12 +16,6 @@ import java.util.UUID; */ public final class StreetwiseNegotiator extends CardImpl { - private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(); - - static { - filter.add(StreetwiseNegotiatorPredicate.instance); - } - public StreetwiseNegotiator(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); @@ -38,11 +26,11 @@ public final class StreetwiseNegotiator extends CardImpl { // Backup 1 BackupAbility backupAbility = new BackupAbility(this, 1); - this.addAbility(backupAbility); - // This creature assigns combat damage equal to its toughness rather than its power. - backupAbility.addAbility(new SimpleStaticAbility(new CombatDamageByToughnessEffect(filter, false) - .setText("this creature assigns combat damage equal to its toughness rather than its power"))); + + backupAbility.addAbility(new SimpleStaticAbility(new CombatDamageByToughnessSourceEffect(Duration.EndOfTurn))); + + this.addAbility(backupAbility); } private StreetwiseNegotiator(final StreetwiseNegotiator card) { @@ -53,13 +41,4 @@ public final class StreetwiseNegotiator extends CardImpl { public StreetwiseNegotiator copy() { return new StreetwiseNegotiator(this); } -} - -enum StreetwiseNegotiatorPredicate implements ObjectSourcePlayerPredicate { - instance; - - @Override - public boolean apply(ObjectSourcePlayer input, Game game) { - return !AnotherPredicate.instance.apply(input, game); - } } \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/w/WalkingBulwark.java b/Mage.Sets/src/mage/cards/w/WalkingBulwark.java index 1b8c612d4fc..b386e0d6105 100644 --- a/Mage.Sets/src/mage/cards/w/WalkingBulwark.java +++ b/Mage.Sets/src/mage/cards/w/WalkingBulwark.java @@ -4,24 +4,19 @@ import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.ActivateAsSorceryActivatedAbility; import mage.abilities.costs.mana.GenericManaCost; -import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.combat.CanAttackAsThoughItDidntHaveDefenderTargetEffect; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; -import mage.abilities.effects.common.ruleModifying.CombatDamageByToughnessEffect; +import mage.abilities.effects.common.ruleModifying.CombatDamageByToughnessTargetEffect; import mage.abilities.keyword.DefenderAbility; import mage.abilities.keyword.HasteAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; -import mage.constants.Outcome; import mage.constants.SubType; import mage.filter.FilterPermanent; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.AbilityPredicate; -import mage.filter.predicate.mageobject.MageObjectReferencePredicate; -import mage.game.Game; -import mage.game.permanent.Permanent; import mage.target.TargetPermanent; import java.util.UUID; @@ -48,7 +43,9 @@ public final class WalkingBulwark extends CardImpl { this.addAbility(DefenderAbility.getInstance()); // {2}: Until end of turn, target creature with defender gains haste, can attack as though it didn't have defender, and assigns combat damage equal to its toughness rather than its power. Activate only as a sorcery. - Ability ability = new ActivateAsSorceryActivatedAbility(new WalkingBulwarkEffect(), new GenericManaCost(2)); + Ability ability = new ActivateAsSorceryActivatedAbility(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn), new GenericManaCost(2).setText("until end of turn, target creature with defender gains haste,")); + ability.addEffect(new CanAttackAsThoughItDidntHaveDefenderTargetEffect(Duration.EndOfTurn).setText("can attack as though it didn't have defender,")); + ability.addEffect(new CombatDamageByToughnessTargetEffect(Duration.EndOfTurn).setText("and assigns combat damage equal to its toughness rather than its power.")); ability.addTarget(new TargetPermanent(filter)); this.addAbility(ability); } @@ -61,38 +58,4 @@ public final class WalkingBulwark extends CardImpl { public WalkingBulwark copy() { return new WalkingBulwark(this); } -} - -class WalkingBulwarkEffect extends OneShotEffect { - - WalkingBulwarkEffect() { - super(Outcome.Benefit); - staticText = "until end of turn, " + - "target creature with defender gains haste, " + - "can attack as though it didn't have defender, " + - "and assigns combat damage equal to its toughness rather than its power"; - } - - private WalkingBulwarkEffect(final WalkingBulwarkEffect effect) { - super(effect); - } - - @Override - public WalkingBulwarkEffect copy() { - return new WalkingBulwarkEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source)); - if (permanent == null) { - return false; - } - game.addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn), source); - game.addEffect(new CanAttackAsThoughItDidntHaveDefenderTargetEffect(Duration.EndOfTurn), source); - FilterCreaturePermanent filter = new FilterCreaturePermanent(); - filter.add(new MageObjectReferencePredicate(permanent, game)); - game.addEffect(new CombatDamageByToughnessEffect(filter, false, Duration.EndOfTurn), source); - return true; - } -} +} \ No newline at end of file diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/BackupTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/BackupTest.java index ecaff8ce3e8..9b4f52de738 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/BackupTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/BackupTest.java @@ -137,4 +137,22 @@ public class BackupTest extends CardTestPlayerBase { execute(); assertPowerToughness(playerA, "Mirror-Shield Hoplite", 4, 4); } + + @Test + public void StreetwiseNegotiatorTest() { + addCard(Zone.BATTLEFIELD, playerA, "Aegis Turtle"); + addCard(Zone.BATTLEFIELD, playerA, "Forest", 2); + addCard(Zone.HAND, playerA, "Streetwise Negotiator", 1); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Streetwise Negotiator"); + addTarget(playerA, "Aegis Turtle"); + // Should deal 6 damage + attack(1, playerA, "Aegis Turtle"); + + setStopAt(1, PhaseStep.POSTCOMBAT_MAIN); + setStrictChooseMode(true); + execute(); + + assertLife(playerB, 14); + } } diff --git a/Mage/src/main/java/mage/abilities/effects/common/ruleModifying/CombatDamageByToughnessAllEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ruleModifying/CombatDamageByToughnessAllEffect.java new file mode 100644 index 00000000000..c262431ea82 --- /dev/null +++ b/Mage/src/main/java/mage/abilities/effects/common/ruleModifying/CombatDamageByToughnessAllEffect.java @@ -0,0 +1,48 @@ + +package mage.abilities.effects.common.ruleModifying; + +import mage.abilities.Ability; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.constants.Duration; +import mage.constants.Layer; +import mage.constants.Outcome; +import mage.constants.SubLayer; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.Game; + +/** + * @author TheElk801 + */ +public class CombatDamageByToughnessAllEffect extends ContinuousEffectImpl { + + private final FilterCreaturePermanent filter; + + + public CombatDamageByToughnessAllEffect(FilterCreaturePermanent filter) { + this(filter, Duration.WhileOnBattlefield); + } + + public CombatDamageByToughnessAllEffect(FilterCreaturePermanent filter, Duration duration) { + super(duration, Layer.RulesEffects, SubLayer.NA, Outcome.Neutral); + this.filter = filter; + this.staticText = filter.getMessage() + " assigns combat damage equal to its toughness rather than its power"; + } + + + private CombatDamageByToughnessAllEffect(final CombatDamageByToughnessAllEffect effect) { + super(effect); + this.filter = effect.filter; + } + + @Override + public CombatDamageByToughnessAllEffect copy() { + return new CombatDamageByToughnessAllEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + game.getCombat().setUseToughnessForDamage(true); + game.getCombat().addUseToughnessForDamageFilter(filter); + return true; + } +} diff --git a/Mage/src/main/java/mage/abilities/effects/common/ruleModifying/CombatDamageByToughnessEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ruleModifying/CombatDamageByToughnessEffect.java deleted file mode 100644 index 711ebf51f09..00000000000 --- a/Mage/src/main/java/mage/abilities/effects/common/ruleModifying/CombatDamageByToughnessEffect.java +++ /dev/null @@ -1,73 +0,0 @@ - -package mage.abilities.effects.common.ruleModifying; - -import mage.abilities.Ability; -import mage.abilities.Mode; -import mage.abilities.effects.ContinuousEffectImpl; -import mage.constants.Duration; -import mage.constants.Layer; -import mage.constants.Outcome; -import mage.constants.SubLayer; -import mage.filter.common.FilterCreaturePermanent; -import mage.filter.predicate.permanent.ControllerIdPredicate; -import mage.game.Game; - -/** - * @author TheElk801 - */ -public class CombatDamageByToughnessEffect extends ContinuousEffectImpl { - - private final FilterCreaturePermanent filter; - private final boolean onlyControlled; - - - public CombatDamageByToughnessEffect(FilterCreaturePermanent filter, boolean onlyControlled) { - this(filter, onlyControlled, Duration.WhileOnBattlefield); - } - - public CombatDamageByToughnessEffect(FilterCreaturePermanent filter, boolean onlyControlled, Duration duration) { - super(duration, Layer.RulesEffects, SubLayer.NA, Outcome.Detriment); - this.filter = filter; - this.onlyControlled = onlyControlled; - } - - - private CombatDamageByToughnessEffect(final CombatDamageByToughnessEffect effect) { - super(effect); - this.filter = effect.filter; - this.onlyControlled = effect.onlyControlled; - } - - @Override - public CombatDamageByToughnessEffect copy() { - return new CombatDamageByToughnessEffect(this); - } - - @Override - public boolean apply(Game game, Ability source) { - FilterCreaturePermanent filterPermanent; - if (onlyControlled) { - filterPermanent = filter.copy(); - filterPermanent.add(new ControllerIdPredicate(source.getControllerId())); - } else { - filterPermanent = filter; - } - game.getCombat().setUseToughnessForDamage(true); - game.getCombat().addUseToughnessForDamageFilter(filterPermanent); - return true; - } - - @Override - public String getText(Mode mode) { - if (staticText != null && !staticText.isEmpty()) { - return staticText; - } - StringBuilder sb = new StringBuilder("Each "); - sb.append(filter.getMessage()); - if (onlyControlled && !filter.getMessage().contains("you control")) { - sb.append(" you control"); - } - sb.append(" assigns combat damage equal to its toughness rather than its power"); - return sb.toString(); - } -} diff --git a/Mage/src/main/java/mage/abilities/effects/common/ruleModifying/CombatDamageByToughnessSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ruleModifying/CombatDamageByToughnessSourceEffect.java new file mode 100644 index 00000000000..3403370a19f --- /dev/null +++ b/Mage/src/main/java/mage/abilities/effects/common/ruleModifying/CombatDamageByToughnessSourceEffect.java @@ -0,0 +1,46 @@ +package mage.abilities.effects.common.ruleModifying; + +import mage.abilities.Ability; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.constants.Duration; +import mage.constants.Layer; +import mage.constants.Outcome; +import mage.constants.SubLayer; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.MageObjectReferencePredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; + +public class CombatDamageByToughnessSourceEffect extends ContinuousEffectImpl { + + public CombatDamageByToughnessSourceEffect(Duration duration) { + super(duration, Layer.RulesEffects, SubLayer.NA, Outcome.Neutral); + this.staticText = "{this} assigns combat damage equal to its toughness rather than its power"; + } + + private CombatDamageByToughnessSourceEffect(final CombatDamageByToughnessSourceEffect effect) { + super(effect); + } + + @Override + public CombatDamageByToughnessSourceEffect copy() { + return new CombatDamageByToughnessSourceEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = source.getSourcePermanentIfItStillExists(game); + if (permanent == null) { + discard(); + return false; + } + + FilterCreaturePermanent filter = new FilterCreaturePermanent(); + filter.add(new MageObjectReferencePredicate(permanent.getId(), game)); + game.getCombat().setUseToughnessForDamage(true); + game.getCombat().addUseToughnessForDamageFilter(filter); + + return true; + } + +} diff --git a/Mage/src/main/java/mage/abilities/effects/common/ruleModifying/CombatDamageByToughnessTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ruleModifying/CombatDamageByToughnessTargetEffect.java new file mode 100644 index 00000000000..6930daf61b5 --- /dev/null +++ b/Mage/src/main/java/mage/abilities/effects/common/ruleModifying/CombatDamageByToughnessTargetEffect.java @@ -0,0 +1,55 @@ +package mage.abilities.effects.common.ruleModifying; + +import java.util.Objects; +import java.util.Set; +import java.util.stream.Collectors; + +import mage.abilities.Ability; +import mage.abilities.Mode; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.constants.Duration; +import mage.constants.Layer; +import mage.constants.Outcome; +import mage.constants.SubLayer; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.PermanentReferenceInCollectionPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; + +public class CombatDamageByToughnessTargetEffect extends ContinuousEffectImpl { + + public CombatDamageByToughnessTargetEffect(Duration duration) { + super(duration, Layer.RulesEffects, SubLayer.NA, Outcome.Neutral); + } + + private CombatDamageByToughnessTargetEffect(final CombatDamageByToughnessTargetEffect effect) { + super(effect); + } + + @Override + public CombatDamageByToughnessTargetEffect copy() { + return new CombatDamageByToughnessTargetEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Set set = targetPointer.getTargets(game, source).stream() + .map(game::getPermanent) + .filter(Objects::isNull) + .collect(Collectors.toSet()); + + FilterCreaturePermanent filter = new FilterCreaturePermanent(); + filter.add(new PermanentReferenceInCollectionPredicate(set, game)); + game.getCombat().setUseToughnessForDamage(true); + game.getCombat().addUseToughnessForDamageFilter(filter); + + return true; + } + + @Override + public String getText(Mode mode) { + return getTargetPointer().describeTargets(mode.getTargets(), "that creature") + + " assigns combat damage equal to its toughness rather than its power"; + } + +} \ No newline at end of file diff --git a/Mage/src/main/java/mage/filter/StaticFilters.java b/Mage/src/main/java/mage/filter/StaticFilters.java index 01e3e8d550e..7c9e88388aa 100644 --- a/Mage/src/main/java/mage/filter/StaticFilters.java +++ b/Mage/src/main/java/mage/filter/StaticFilters.java @@ -1228,4 +1228,11 @@ public final class StaticFilters { static { FILTER_CONTROLLED_FOOD.setLockedFilter(true); } + + public static final FilterCreaturePermanent FILTER_CONTROLLED_CREATURE_EACH = new FilterCreaturePermanent("each creature you control"); + + static { + FILTER_CONTROLLED_CREATURE_EACH.add(TargetController.YOU.getPlayerPredicate()); + FILTER_CONTROLLED_CREATURE_EACH.setLockedFilter(true); + } } From 22961162ad4a365c49fdd7abf599cebff3601c32 Mon Sep 17 00:00:00 2001 From: xenohedron Date: Wed, 30 Aug 2023 20:54:27 -0400 Subject: [PATCH 25/36] text fixes related to recent updates --- Mage.Sets/src/mage/cards/a/AgathaOfTheVileCauldron.java | 4 ++-- Mage.Sets/src/mage/cards/b/BrenardGingerSculptor.java | 4 ++-- Mage.Sets/src/mage/cards/e/ExtraordinaryJourney.java | 8 +++----- Mage.Sets/src/mage/cards/f/FeywildVisitor.java | 5 +++-- Mage.Sets/src/mage/cards/g/GumdropPoisoner.java | 4 ++-- Mage.Sets/src/mage/cards/k/KnickknackOuphe.java | 5 +++-- Mage.Sets/src/mage/cards/m/MosswoodDreadknight.java | 2 +- Mage.Sets/src/mage/cards/s/StreetwiseNegotiator.java | 5 +++-- Mage.Sets/src/mage/cards/t/TheEleventhHour.java | 2 +- Mage.Sets/src/mage/cards/t/TrainingGrounds.java | 2 +- Mage.Sets/src/mage/cards/v/VirtueOfCourage.java | 2 +- Mage.Sets/src/mage/cards/w/WalkingBulwark.java | 8 ++++---- .../common/DiesThisOrAnotherCreatureTriggeredAbility.java | 6 +++++- .../effects/common/counter/DistributeCountersEffect.java | 7 ++++--- .../CombatDamageByToughnessTargetEffect.java | 8 ++++++-- 15 files changed, 41 insertions(+), 31 deletions(-) diff --git a/Mage.Sets/src/mage/cards/a/AgathaOfTheVileCauldron.java b/Mage.Sets/src/mage/cards/a/AgathaOfTheVileCauldron.java index e4063077098..fac5b91befc 100644 --- a/Mage.Sets/src/mage/cards/a/AgathaOfTheVileCauldron.java +++ b/Mage.Sets/src/mage/cards/a/AgathaOfTheVileCauldron.java @@ -68,11 +68,11 @@ public final class AgathaOfTheVileCauldron extends CardImpl { class AgathaOfTheVileCauldronEffect extends CostModificationEffectImpl { - private final static DynamicValue xValue = new SourcePermanentPowerCount(false); + private static final DynamicValue xValue = new SourcePermanentPowerCount(false); AgathaOfTheVileCauldronEffect() { super(Duration.WhileOnBattlefield, Outcome.Benefit, CostModificationType.REDUCE_COST); - staticText = "Activated abilities of creatures you control cost X less to activate, " + staticText = "Activated abilities of creatures you control cost {X} less to activate, " + "where X is {this}'s power. " + "This effect can't reduce the mana in that cost to less than one mana."; } diff --git a/Mage.Sets/src/mage/cards/b/BrenardGingerSculptor.java b/Mage.Sets/src/mage/cards/b/BrenardGingerSculptor.java index 97e0f5fd115..e84690f3bc5 100644 --- a/Mage.Sets/src/mage/cards/b/BrenardGingerSculptor.java +++ b/Mage.Sets/src/mage/cards/b/BrenardGingerSculptor.java @@ -82,7 +82,7 @@ class BrenardGingerSculptorEffect extends OneShotEffect { BrenardGingerSculptorEffect() { super(Outcome.Copy); this.staticText = "you may exile it. If you do, create a token that's a copy of that creature, except it's a 1/1 Food Golem artifact creature in "+ - "addition to its other types and it has \"2, {T}, Sacrifice this artifact: You gain 3 life.\""; + "addition to its other types and it has \"{2}, {T}, Sacrifice this artifact: You gain 3 life.\""; } private BrenardGingerSculptorEffect(final BrenardGingerSculptorEffect effect) { @@ -116,4 +116,4 @@ class BrenardGingerSculptorEffect extends OneShotEffect { } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/e/ExtraordinaryJourney.java b/Mage.Sets/src/mage/cards/e/ExtraordinaryJourney.java index 83f97714ac5..452ca0f985c 100644 --- a/Mage.Sets/src/mage/cards/e/ExtraordinaryJourney.java +++ b/Mage.Sets/src/mage/cards/e/ExtraordinaryJourney.java @@ -19,8 +19,6 @@ import mage.game.ExileZone; import mage.game.Game; import mage.game.events.EntersTheBattlefieldEvent; import mage.game.events.GameEvent; -import mage.game.events.ZoneChangeEvent; -import mage.game.events.ZoneChangeGroupEvent; import mage.game.permanent.Permanent; import mage.game.stack.Spell; import mage.players.Player; @@ -108,7 +106,7 @@ class ExtraordinaryJourneyEffect extends OneShotEffect { Set cards = permanents .stream() - .map(p -> p.getMainCard()) + .map(Card::getMainCard) .filter(Objects::nonNull) .filter(card -> game.getState().getZone(card.getId()) == Zone.EXILED) .collect(Collectors.toSet()); @@ -148,7 +146,7 @@ class ExtraordinaryJourneyEffect extends OneShotEffect { class ExtraordinaryJourneyTriggeredAbility extends TriggeredAbilityImpl { ExtraordinaryJourneyTriggeredAbility() { - super(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), false); + super(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1, "you"), false); setTriggerPhrase("Whenever one or more nontoken creatures enter the battlefield, " + "if one or more of them entered from exile or was cast from exile, "); setTriggersOnceEachTurn(true); @@ -197,4 +195,4 @@ class ExtraordinaryJourneyTriggeredAbility extends TriggeredAbilityImpl { return false; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/f/FeywildVisitor.java b/Mage.Sets/src/mage/cards/f/FeywildVisitor.java index ca3742eb141..2ae8b0c1b1b 100644 --- a/Mage.Sets/src/mage/cards/f/FeywildVisitor.java +++ b/Mage.Sets/src/mage/cards/f/FeywildVisitor.java @@ -25,7 +25,8 @@ public final class FeywildVisitor extends CardImpl { // Commander creatures you own have "Whenever one or more nontoken creatures you control deal combat damage to a player, you create a 1/1 blue Faerie Dragon creature token with flying." this.addAbility(new SimpleStaticAbility(new GainAbilityAllEffect( - new DealCombatDamageControlledTriggeredAbility(new CreateTokenEffect(new FaerieDragonToken()), StaticFilters.FILTER_CREATURE_NON_TOKEN), + new DealCombatDamageControlledTriggeredAbility(new CreateTokenEffect(new FaerieDragonToken()), StaticFilters.FILTER_CREATURE_NON_TOKEN) + .setTriggerPhrase("Whenever one or more nontoken creatures you control deal combat damage to a player, you "), Duration.WhileOnBattlefield, StaticFilters.FILTER_CREATURES_OWNED_COMMANDER ))); @@ -39,4 +40,4 @@ public final class FeywildVisitor extends CardImpl { public FeywildVisitor copy() { return new FeywildVisitor(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/g/GumdropPoisoner.java b/Mage.Sets/src/mage/cards/g/GumdropPoisoner.java index 8fb5f9e9e32..7c49ba9d679 100644 --- a/Mage.Sets/src/mage/cards/g/GumdropPoisoner.java +++ b/Mage.Sets/src/mage/cards/g/GumdropPoisoner.java @@ -37,10 +37,10 @@ public final class GumdropPoisoner extends AdventureCard { // Lifelink this.addAbility(LifelinkAbility.getInstance()); - // When Gumdrop Poisoner enters the battlefield, target creature gets -X/-X until end of turn, where X is the amount of life you gained this turn. + // When Gumdrop Poisoner enters the battlefield, up to one target creature gets -X/-X until end of turn, where X is the amount of life you gained this turn. Ability ability = new EntersBattlefieldTriggeredAbility(new BoostTargetEffect(xValue, xValue) .setText("target creature gets -X/-X until end of turn, where X is the amount of life you gained this turn")); - ability.addTarget(new TargetCreaturePermanent()); + ability.addTarget(new TargetCreaturePermanent(0, 1)); this.addAbility(ability.addHint(ControllerGainedLifeCount.getHint()), new PlayerGainedLifeWatcher()); // Tempt with Treats diff --git a/Mage.Sets/src/mage/cards/k/KnickknackOuphe.java b/Mage.Sets/src/mage/cards/k/KnickknackOuphe.java index d954836c697..def4afe8f2f 100644 --- a/Mage.Sets/src/mage/cards/k/KnickknackOuphe.java +++ b/Mage.Sets/src/mage/cards/k/KnickknackOuphe.java @@ -5,6 +5,7 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.dynamicvalue.common.ManacostVariableValue; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.EntersBattlefieldWithXCountersEffect; @@ -44,7 +45,7 @@ public final class KnickknackOuphe extends CardImpl { this.addAbility(new EntersBattlefieldAbility(new EntersBattlefieldWithXCountersEffect(CounterType.P1P1.createInstance()))); // When Knickknack Ouphe enters the battlefield, reveal the top X cards of your library. You may put any number of Aura cards with mana value X or less from among them onto the battlefield. Then put all cards revealed this way that weren't put onto the battlefield on the bottom of your library in a random order. - this.addAbility(new EntersBattlefieldAbility(new KnickknackOuphePutOntoBattlefieldEffect())); + this.addAbility(new EntersBattlefieldTriggeredAbility(new KnickknackOuphePutOntoBattlefieldEffect())); } @@ -119,4 +120,4 @@ class KnickknackOuphePutOntoBattlefieldEffect extends OneShotEffect { return new KnickknackOuphePutOntoBattlefieldEffect(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/m/MosswoodDreadknight.java b/Mage.Sets/src/mage/cards/m/MosswoodDreadknight.java index af7a162b883..79c894c699b 100644 --- a/Mage.Sets/src/mage/cards/m/MosswoodDreadknight.java +++ b/Mage.Sets/src/mage/cards/m/MosswoodDreadknight.java @@ -37,7 +37,7 @@ public final class MosswoodDreadknight extends AdventureCard { // Dread Whispers // You draw a card and you lose 1 life. - this.getSpellCard().getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1)); + this.getSpellCard().getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1, "you")); this.getSpellCard().getSpellAbility().addEffect(new LoseLifeSourceControllerEffect(1).concatBy("and")); this.finalizeAdventure(); diff --git a/Mage.Sets/src/mage/cards/s/StreetwiseNegotiator.java b/Mage.Sets/src/mage/cards/s/StreetwiseNegotiator.java index b5efb00f82a..22c12baa315 100644 --- a/Mage.Sets/src/mage/cards/s/StreetwiseNegotiator.java +++ b/Mage.Sets/src/mage/cards/s/StreetwiseNegotiator.java @@ -28,7 +28,8 @@ public final class StreetwiseNegotiator extends CardImpl { BackupAbility backupAbility = new BackupAbility(this, 1); // This creature assigns combat damage equal to its toughness rather than its power. - backupAbility.addAbility(new SimpleStaticAbility(new CombatDamageByToughnessSourceEffect(Duration.EndOfTurn))); + backupAbility.addAbility(new SimpleStaticAbility(new CombatDamageByToughnessSourceEffect(Duration.EndOfTurn) + .setText("this creature assigns combat damage equal to its toughness rather than its power"))); this.addAbility(backupAbility); } @@ -41,4 +42,4 @@ public final class StreetwiseNegotiator extends CardImpl { public StreetwiseNegotiator copy() { return new StreetwiseNegotiator(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/t/TheEleventhHour.java b/Mage.Sets/src/mage/cards/t/TheEleventhHour.java index 26c15c51c9a..27fecb4274f 100644 --- a/Mage.Sets/src/mage/cards/t/TheEleventhHour.java +++ b/Mage.Sets/src/mage/cards/t/TheEleventhHour.java @@ -49,7 +49,7 @@ public final class TheEleventhHour extends CardImpl { new CreateTokenEffect(new FoodToken()), new CreateTokenEffect(new TheEleventhHourToken()) .setText("and a 1/1 white Human creature token with " + - "\"Doctor spells you cast cost 1 less to cast.\"") + "\"Doctor spells you cast cost {1} less to cast.\"") ); // III -- Create a token that's a copy of target creature, except it's a legendary Alien named Prisoner Zero. diff --git a/Mage.Sets/src/mage/cards/t/TrainingGrounds.java b/Mage.Sets/src/mage/cards/t/TrainingGrounds.java index 9494bc98641..7abe0542577 100644 --- a/Mage.Sets/src/mage/cards/t/TrainingGrounds.java +++ b/Mage.Sets/src/mage/cards/t/TrainingGrounds.java @@ -42,7 +42,7 @@ public final class TrainingGrounds extends CardImpl { class TrainingGroundsEffect extends CostModificationEffectImpl { private static final String effectText = "Activated abilities of creatures you control " - + "cost up to {2} less to activate. " + + "cost {2} less to activate. " + "This effect can't reduce the mana in that cost to less than one mana"; TrainingGroundsEffect() { diff --git a/Mage.Sets/src/mage/cards/v/VirtueOfCourage.java b/Mage.Sets/src/mage/cards/v/VirtueOfCourage.java index 250cf653aaa..bc9d9eec075 100644 --- a/Mage.Sets/src/mage/cards/v/VirtueOfCourage.java +++ b/Mage.Sets/src/mage/cards/v/VirtueOfCourage.java @@ -80,6 +80,6 @@ class VirtueOfCourageTriggeredAbility extends TriggeredAbilityImpl { public String getRule() { return "whenever a source you control deals noncombat damage to an opponent, " + "you may exile that many cards from the top of your library. " - + "You may play those cards this turn"; + + "You may play those cards this turn."; } } diff --git a/Mage.Sets/src/mage/cards/w/WalkingBulwark.java b/Mage.Sets/src/mage/cards/w/WalkingBulwark.java index b386e0d6105..1cf85c5057f 100644 --- a/Mage.Sets/src/mage/cards/w/WalkingBulwark.java +++ b/Mage.Sets/src/mage/cards/w/WalkingBulwark.java @@ -43,9 +43,9 @@ public final class WalkingBulwark extends CardImpl { this.addAbility(DefenderAbility.getInstance()); // {2}: Until end of turn, target creature with defender gains haste, can attack as though it didn't have defender, and assigns combat damage equal to its toughness rather than its power. Activate only as a sorcery. - Ability ability = new ActivateAsSorceryActivatedAbility(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn), new GenericManaCost(2).setText("until end of turn, target creature with defender gains haste,")); - ability.addEffect(new CanAttackAsThoughItDidntHaveDefenderTargetEffect(Duration.EndOfTurn).setText("can attack as though it didn't have defender,")); - ability.addEffect(new CombatDamageByToughnessTargetEffect(Duration.EndOfTurn).setText("and assigns combat damage equal to its toughness rather than its power.")); + Ability ability = new ActivateAsSorceryActivatedAbility(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn).setText("until end of turn, target creature with defender gains haste"), new GenericManaCost(2)); + ability.addEffect(new CanAttackAsThoughItDidntHaveDefenderTargetEffect(Duration.EndOfTurn).setText(", can attack as though it didn't have defender")); + ability.addEffect(new CombatDamageByToughnessTargetEffect(Duration.EndOfTurn).setText(", and assigns combat damage equal to its toughness rather than its power")); ability.addTarget(new TargetPermanent(filter)); this.addAbility(ability); } @@ -58,4 +58,4 @@ public final class WalkingBulwark extends CardImpl { public WalkingBulwark copy() { return new WalkingBulwark(this); } -} \ No newline at end of file +} diff --git a/Mage/src/main/java/mage/abilities/common/DiesThisOrAnotherCreatureTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/DiesThisOrAnotherCreatureTriggeredAbility.java index eb33922e871..06b8645aac6 100644 --- a/Mage/src/main/java/mage/abilities/common/DiesThisOrAnotherCreatureTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/common/DiesThisOrAnotherCreatureTriggeredAbility.java @@ -25,7 +25,11 @@ public class DiesThisOrAnotherCreatureTriggeredAbility extends TriggeredAbilityI public DiesThisOrAnotherCreatureTriggeredAbility(Effect effect, boolean optional, FilterPermanent filter) { super(Zone.ALL, effect, optional); // Needs "ALL" if the source itself should trigger or multiple (incl. source go to grave) this.filter = filter; - setTriggerPhrase("Whenever {this} or another " + filter.getMessage() + " dies, "); + String filterMessage = filter.getMessage(); + if (filterMessage.startsWith("a ")) { + filterMessage = filterMessage.substring(2); + } + setTriggerPhrase("Whenever {this} or another " + filterMessage + " dies, "); } protected DiesThisOrAnotherCreatureTriggeredAbility(final DiesThisOrAnotherCreatureTriggeredAbility ability) { 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 adeaf5e7f2f..01c88dab08f 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 @@ -13,6 +13,7 @@ import mage.counters.CounterType; import mage.game.Game; import mage.game.permanent.Permanent; import mage.target.Target; +import mage.util.CardUtil; import java.util.UUID; @@ -80,12 +81,12 @@ public class DistributeCountersEffect extends OneShotEffect { @Override public String getText(Mode mode) { - if (!staticText.isEmpty()) { + if (staticText != null && !staticText.isEmpty()) { return staticText; } - String name = counterType.getName(); - String text = "distribute " + amount + ' ' + name + " counters among " + targetDescription; + String number = (amount instanceof StaticValue) ? CardUtil.numberToText(((StaticValue) amount).getValue()) : amount.toString(); + String text = "distribute " + number + ' ' + name + " counters among " + targetDescription; if (removeAtEndOfTurn) { text += " For each " + name + " counter you put on a creature this way, remove a " + name + " counter from that creature at the beginning of the next cleanup step."; diff --git a/Mage/src/main/java/mage/abilities/effects/common/ruleModifying/CombatDamageByToughnessTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ruleModifying/CombatDamageByToughnessTargetEffect.java index 6930daf61b5..7d7bc8de8cb 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/ruleModifying/CombatDamageByToughnessTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/ruleModifying/CombatDamageByToughnessTargetEffect.java @@ -48,8 +48,12 @@ public class CombatDamageByToughnessTargetEffect extends ContinuousEffectImpl { @Override public String getText(Mode mode) { - return getTargetPointer().describeTargets(mode.getTargets(), "that creature") + if (staticText != null && !staticText.isEmpty()) { + return staticText; + } + return (duration.toString().isEmpty() ? "" : duration.toString() + ", ") + + getTargetPointer().describeTargets(mode.getTargets(), "that creature") + " assigns combat damage equal to its toughness rather than its power"; } -} \ No newline at end of file +} From 6768184e185ef730fff462ea07974e504a8f099e Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Thu, 31 Aug 2023 06:06:47 +0400 Subject: [PATCH 26/36] typo fixed (related to #11068), added backup ability docs --- .../CombatDamageByToughnessTargetEffect.java | 2 +- .../mage/abilities/keyword/BackupAbility.java | 29 +++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/Mage/src/main/java/mage/abilities/effects/common/ruleModifying/CombatDamageByToughnessTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ruleModifying/CombatDamageByToughnessTargetEffect.java index 7d7bc8de8cb..36da6ea92d2 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/ruleModifying/CombatDamageByToughnessTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/ruleModifying/CombatDamageByToughnessTargetEffect.java @@ -35,7 +35,7 @@ public class CombatDamageByToughnessTargetEffect extends ContinuousEffectImpl { public boolean apply(Game game, Ability source) { Set set = targetPointer.getTargets(game, source).stream() .map(game::getPermanent) - .filter(Objects::isNull) + .filter(Objects::nonNull) .collect(Collectors.toSet()); FilterCreaturePermanent filter = new FilterCreaturePermanent(); diff --git a/Mage/src/main/java/mage/abilities/keyword/BackupAbility.java b/Mage/src/main/java/mage/abilities/keyword/BackupAbility.java index 3a22b6e58a2..d88691e9247 100644 --- a/Mage/src/main/java/mage/abilities/keyword/BackupAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/BackupAbility.java @@ -18,6 +18,25 @@ import java.util.ArrayList; import java.util.List; /** + * 702.165. Backup + *

+ * 702.165a Backup is a triggered ability. “Backup N” means “When this creature enters the battlefield, + * put N +1/+1 counters on target creature. If that’s another creature, it also gains the non-backup + * abilities of this creature printed below this one until end of turn.” Cards with backup have one or more + * abilities printed after the backup ability. (Some cards with backup also have abilities printed before + * the backup ability.) + *

+ * 702.165b If a permanent enters the battlefield as a copy of a permanent with a backup ability or a token + * is created that is a copy of that permanent, the order of abilities printed on it is maintained. + *

+ * 702.165c Only abilities printed on the object with backup are granted by its backup ability. Any abilities + * gained by a permanent, whether due to a copy effect, an effect that grants an ability to a permanent, or an + * effect that creates a token with certain abilities, are not granted by a backup ability. + *

+ * 702.165d The abilities that a backup ability grants are determined as the ability is put on the stack. + * They won’t change if the permanent with backup loses any abilities after the ability is put on the stack + * but before it resolves. + * * @author TheElk801 */ public class BackupAbility extends EntersBattlefieldTriggeredAbility { @@ -65,13 +84,23 @@ public class BackupAbility extends EntersBattlefieldTriggeredAbility { addAbility(ability, null, dontAddToCard); } + /** + * + * @param ability + * @param watcher + * @param dontAddToCard use it on multiple instances of backups (example: Conclave Sledge-Captain) + */ public void addAbility(Ability ability, Watcher watcher, boolean dontAddToCard) { if (watcher != null) { ability.addWatcher(watcher); } + + // parent card must have only 1 instance of ability if (!dontAddToCard) { card.addAbility(ability); } + + // target permanent can have multiple instances of ability abilitiesToAdd.add(ability); CardUtil.castStream(this.getEffects().stream(), BackupEffect.class) .forEach(backupEffect -> backupEffect.addAbility(ability)); From 1903f90b3a5b7ce520949e2908822f1debff0126 Mon Sep 17 00:00:00 2001 From: xenohedron Date: Wed, 30 Aug 2023 22:14:44 -0400 Subject: [PATCH 27/36] better text generation, a couple more individual fixes --- .../src/mage/cards/a/AshiokWickedManipulator.java | 3 ++- Mage.Sets/src/mage/cards/g/GumdropPoisoner.java | 2 +- Mage.Sets/src/mage/cards/p/Painsmith.java | 10 ++++++---- .../java/mage/abilities/TriggeredAbilityImpl.java | 14 +------------- 4 files changed, 10 insertions(+), 19 deletions(-) diff --git a/Mage.Sets/src/mage/cards/a/AshiokWickedManipulator.java b/Mage.Sets/src/mage/cards/a/AshiokWickedManipulator.java index 963a11f24f4..b8af22339c3 100644 --- a/Mage.Sets/src/mage/cards/a/AshiokWickedManipulator.java +++ b/Mage.Sets/src/mage/cards/a/AshiokWickedManipulator.java @@ -39,7 +39,8 @@ public final class AshiokWickedManipulator extends CardImpl { // +1: Look at the top two cards of your library. Exile one of them and put the other into your hand. this.addAbility(new LoyaltyAbility( - new LookLibraryAndPickControllerEffect(2, 1, PutCards.EXILED, PutCards.HAND), + new LookLibraryAndPickControllerEffect(2, 1, PutCards.EXILED, PutCards.HAND) + .setText("look at the top two cards of your library. Exile one of them and put the other into your hand"), 1 )); diff --git a/Mage.Sets/src/mage/cards/g/GumdropPoisoner.java b/Mage.Sets/src/mage/cards/g/GumdropPoisoner.java index 7c49ba9d679..47fea944ef3 100644 --- a/Mage.Sets/src/mage/cards/g/GumdropPoisoner.java +++ b/Mage.Sets/src/mage/cards/g/GumdropPoisoner.java @@ -39,7 +39,7 @@ public final class GumdropPoisoner extends AdventureCard { // When Gumdrop Poisoner enters the battlefield, up to one target creature gets -X/-X until end of turn, where X is the amount of life you gained this turn. Ability ability = new EntersBattlefieldTriggeredAbility(new BoostTargetEffect(xValue, xValue) - .setText("target creature gets -X/-X until end of turn, where X is the amount of life you gained this turn")); + .setText("up to one target creature gets -X/-X until end of turn, where X is the amount of life you gained this turn")); ability.addTarget(new TargetCreaturePermanent(0, 1)); this.addAbility(ability.addHint(ControllerGainedLifeCount.getHint()), new PlayerGainedLifeWatcher()); diff --git a/Mage.Sets/src/mage/cards/p/Painsmith.java b/Mage.Sets/src/mage/cards/p/Painsmith.java index e229557253c..9ae346fe168 100644 --- a/Mage.Sets/src/mage/cards/p/Painsmith.java +++ b/Mage.Sets/src/mage/cards/p/Painsmith.java @@ -1,9 +1,8 @@ - - package mage.cards.p; import java.util.UUID; import mage.MageInt; +import mage.abilities.Ability; import mage.abilities.common.SpellCastControllerTriggeredAbility; import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; @@ -29,8 +28,11 @@ public final class Painsmith extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(1); - SpellCastControllerTriggeredAbility ability = new SpellCastControllerTriggeredAbility(new BoostTargetEffect(2, 0, Duration.EndOfTurn), StaticFilters.FILTER_SPELL_AN_ARTIFACT, true); - ability.addEffect(new GainAbilityTargetEffect(DeathtouchAbility.getInstance(), Duration.EndOfTurn)); + // Whenever you cast an artifact spell, you may have target creature get +2/+0 and gain deathtouch until end of turn. + Ability ability = new SpellCastControllerTriggeredAbility(new BoostTargetEffect(2, 0, Duration.EndOfTurn) + .setText("target creature get +2/+0"), StaticFilters.FILTER_SPELL_AN_ARTIFACT, true); + ability.addEffect(new GainAbilityTargetEffect(DeathtouchAbility.getInstance(), Duration.EndOfTurn) + .setText("and gain deathtouch until end of turn")); ability.addTarget(new TargetCreaturePermanent()); this.addAbility(ability); } diff --git a/Mage/src/main/java/mage/abilities/TriggeredAbilityImpl.java b/Mage/src/main/java/mage/abilities/TriggeredAbilityImpl.java index 47599564c9b..09ea251c8eb 100644 --- a/Mage/src/main/java/mage/abilities/TriggeredAbilityImpl.java +++ b/Mage/src/main/java/mage/abilities/TriggeredAbilityImpl.java @@ -216,7 +216,7 @@ public abstract class TriggeredAbilityImpl extends AbilityImpl implements Trigge sb.append("you may "); } else if (!ruleLow.startsWith("its controller may")) { sb.append("you may have "); - superRule = ruleWithFixedVerbGrammar(superRule); + superRule = superRule.replaceFirst(" (become|block|deal|discard|gain|get|lose|mill|sacrifice)s? ", " $1 "); } } if (replaceRuleText @@ -266,18 +266,6 @@ public abstract class TriggeredAbilityImpl extends AbilityImpl implements Trigge || ruleLow.startsWith("untap"); } - private static String ruleWithFixedVerbGrammar(String rule) { - return rule.replace(" becomes ", " become ") - .replace(" blocks ", " block ") - .replace(" deals ", " deal ") - .replace(" discards ", " discard ") - .replace(" gains ", " gain ") - .replace(" gets ", " get ") - .replace(" loses ", " lose ") - .replace(" mills ", " mill ") - .replace(" sacrifices ", " sacrifice "); - } - @Override public boolean isInUseableZone(Game game, MageObject source, GameEvent event) { From 9085820605948c2172bd359c7189e017f2c9fef0 Mon Sep 17 00:00:00 2001 From: Vivian Greenslade Date: Thu, 31 Aug 2023 00:55:39 -0230 Subject: [PATCH 28/36] [WOC] Implement Faerie Bladecrafter (#11075) --- .../src/mage/cards/f/FaerieBladecrafter.java | 58 +++++++++++++++++++ .../mage/sets/WildsOfEldraineCommander.java | 1 + 2 files changed, 59 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/f/FaerieBladecrafter.java diff --git a/Mage.Sets/src/mage/cards/f/FaerieBladecrafter.java b/Mage.Sets/src/mage/cards/f/FaerieBladecrafter.java new file mode 100644 index 00000000000..a770bf671f2 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FaerieBladecrafter.java @@ -0,0 +1,58 @@ +package mage.cards.f; + +import java.util.UUID; +import mage.MageInt; +import mage.constants.SubType; +import mage.counters.CounterType; +import mage.filter.common.FilterCreaturePermanent; +import mage.abilities.Ability; +import mage.abilities.common.DealCombatDamageControlledTriggeredAbility; +import mage.abilities.common.DiesSourceTriggeredAbility; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.SourcePermanentPowerCount; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.LoseLifeOpponentsEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author Xanderhall + */ +public final class FaerieBladecrafter extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(SubType.FAERIE, "Faeries"); + private static final DynamicValue count = new SourcePermanentPowerCount(); + + public FaerieBladecrafter(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}"); + + this.subtype.add(SubType.FAERIE); + this.subtype.add(SubType.ROGUE); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Whenever one or more Faeries you control deal combat damage to a player, put a +1/+1 counter on Faerie Bladecrafter. + this.addAbility(new DealCombatDamageControlledTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), filter)); + + // When Faerie Bladecrafter dies, each opponent loses X life and you gain X life, where X is its power. + Ability ability = new DiesSourceTriggeredAbility(new LoseLifeOpponentsEffect(count).setText("each opponent loses X life")); + ability.addEffect(new GainLifeEffect(count).setText("and you gain X life, where X is its power")); + this.addAbility(ability); + } + + private FaerieBladecrafter(final FaerieBladecrafter card) { + super(card); + } + + @Override + public FaerieBladecrafter copy() { + return new FaerieBladecrafter(this); + } +} diff --git a/Mage.Sets/src/mage/sets/WildsOfEldraineCommander.java b/Mage.Sets/src/mage/sets/WildsOfEldraineCommander.java index a8e7e0662ab..e06b89b908d 100644 --- a/Mage.Sets/src/mage/sets/WildsOfEldraineCommander.java +++ b/Mage.Sets/src/mage/sets/WildsOfEldraineCommander.java @@ -57,6 +57,7 @@ public final class WildsOfEldraineCommander extends ExpansionSet { cards.add(new SetCardInfo("Ethereal Armor", 67, Rarity.COMMON, mage.cards.e.EtherealArmor.class)); cards.add(new SetCardInfo("Exotic Orchard", 159, Rarity.RARE, mage.cards.e.ExoticOrchard.class)); cards.add(new SetCardInfo("Fact or Fiction", 90, Rarity.UNCOMMON, mage.cards.f.FactOrFiction.class)); + cards.add(new SetCardInfo("Faerie Bladecrafter", 14, Rarity.RARE, mage.cards.f.FaerieBladecrafter.class)); cards.add(new SetCardInfo("Faerie Formation", 91, Rarity.RARE, mage.cards.f.FaerieFormation.class)); cards.add(new SetCardInfo("Faerie Seer", 92, Rarity.COMMON, mage.cards.f.FaerieSeer.class)); cards.add(new SetCardInfo("Fellwar Stone", 147, Rarity.UNCOMMON, mage.cards.f.FellwarStone.class)); From 060b8f9dc993661fd3a9db05578943766ee45526 Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Thu, 31 Aug 2023 07:27:59 +0400 Subject: [PATCH 29/36] backup ability: fixed wrong duration and discard in Streetwise Negotiator, added related tests and runtime/verify checks (related to #11068) --- .../mage/cards/s/StreetwiseNegotiator.java | 4 +-- .../cards/abilities/keywords/BackupTest.java | 33 ++++++++++++------- .../java/mage/verify/VerifyCardDataTest.java | 1 + .../CombatDamageByToughnessSourceEffect.java | 1 - .../mage/abilities/keyword/BackupAbility.java | 19 ++++++++++- 5 files changed, 43 insertions(+), 15 deletions(-) diff --git a/Mage.Sets/src/mage/cards/s/StreetwiseNegotiator.java b/Mage.Sets/src/mage/cards/s/StreetwiseNegotiator.java index 22c12baa315..bdbd0602960 100644 --- a/Mage.Sets/src/mage/cards/s/StreetwiseNegotiator.java +++ b/Mage.Sets/src/mage/cards/s/StreetwiseNegotiator.java @@ -26,9 +26,9 @@ public final class StreetwiseNegotiator extends CardImpl { // Backup 1 BackupAbility backupAbility = new BackupAbility(this, 1); - // This creature assigns combat damage equal to its toughness rather than its power. - backupAbility.addAbility(new SimpleStaticAbility(new CombatDamageByToughnessSourceEffect(Duration.EndOfTurn) + // This creature assigns combat damage equal to its toughness rather than its power. + backupAbility.addAbility(new SimpleStaticAbility(new CombatDamageByToughnessSourceEffect(Duration.EndOfGame) .setText("this creature assigns combat damage equal to its toughness rather than its power"))); this.addAbility(backupAbility); diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/BackupTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/BackupTest.java index 9b4f52de738..e542231ad9c 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/BackupTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/abilities/keywords/BackupTest.java @@ -22,7 +22,7 @@ public class BackupTest extends CardTestPlayerBase { addTarget(playerA, "Raging Goblin");//Now a 4/4 attack(1, playerA, "Raging Goblin"); - block(1,playerB,"Memnite","Raging Goblin"); + block(1, playerB, "Memnite", "Raging Goblin"); setStrictChooseMode(false); //auto-stack triggers setStopAt(1, PhaseStep.END_TURN); @@ -33,6 +33,7 @@ public class BackupTest extends CardTestPlayerBase { assertPermanentCount(playerA, "Conclave Sledge-Captain", 1); assertPowerToughness(playerA, "Conclave Sledge-Captain", 4, 4); } + @Test public void ConclaveSledgeCaptainSelfTest() { addCard(Zone.BATTLEFIELD, playerA, "Forest", 6); @@ -49,6 +50,7 @@ public class BackupTest extends CardTestPlayerBase { assertPermanentCount(playerA, "Conclave Sledge-Captain", 1); assertPowerToughness(playerA, "Conclave Sledge-Captain", 14, 14); } + @Test public void ConclaveSledgeCaptainSplitTest() { addCard(Zone.BATTLEFIELD, playerA, "Forest", 6); @@ -75,6 +77,7 @@ public class BackupTest extends CardTestPlayerBase { assertPowerToughness(playerA, "Raging Minotaur", 8, 8); assertPowerToughness(playerA, "Conclave Sledge-Captain", 4, 4); } + @Test public void MirrorShieldHopliteStrictTest() { addCard(Zone.BATTLEFIELD, playerA, "Mirror-Shield Hoplite"); @@ -83,7 +86,7 @@ public class BackupTest extends CardTestPlayerBase { castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Consuming Aetherborn"); addTarget(playerA, "Consuming Aetherborn"); - setChoice(playerA,true); + setChoice(playerA, true); addTarget(playerA, "Mirror-Shield Hoplite"); setStrictChooseMode(true); @@ -92,6 +95,7 @@ public class BackupTest extends CardTestPlayerBase { assertPowerToughness(playerA, "Mirror-Shield Hoplite", 3, 3); assertPowerToughness(playerA, "Consuming Aetherborn", 3, 3); } + @Test public void MirrorShieldHopliteTriggeredTest() { addCard(Zone.BATTLEFIELD, playerA, "Mirror-Shield Hoplite"); @@ -102,7 +106,7 @@ public class BackupTest extends CardTestPlayerBase { castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Enduring Bondwarden"); addTarget(playerA, "Mirror-Shield Hoplite"); - setChoice(playerA,false); //2 +1/+1 counters + setChoice(playerA, false); //2 +1/+1 counters waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN); castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Murder", "Mirror-Shield Hoplite"); @@ -113,6 +117,7 @@ public class BackupTest extends CardTestPlayerBase { execute(); assertPowerToughness(playerA, "Enduring Bondwarden", 4, 5); } + @Test public void MirrorShieldHopliteSourceTest() { addCard(Zone.BATTLEFIELD, playerA, "Mirror-Shield Hoplite"); @@ -123,7 +128,7 @@ public class BackupTest extends CardTestPlayerBase { castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Enduring Bondwarden"); addTarget(playerA, "Mirror-Shield Hoplite"); - setChoice(playerA,true); + setChoice(playerA, true); addTarget(playerA, "Enduring Bondwarden"); //The source of the copy is the same as the source of the original backup ability. //So the Bondwarden shouldn't gain the ability again @@ -140,19 +145,25 @@ public class BackupTest extends CardTestPlayerBase { @Test public void StreetwiseNegotiatorTest() { - addCard(Zone.BATTLEFIELD, playerA, "Aegis Turtle"); + addCard(Zone.BATTLEFIELD, playerA, "Air-Cult Elemental"); // 2/5 addCard(Zone.BATTLEFIELD, playerA, "Forest", 2); - addCard(Zone.HAND, playerA, "Streetwise Negotiator", 1); + addCard(Zone.HAND, playerA, "Streetwise Negotiator", 1); // 0/2 castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Streetwise Negotiator"); - addTarget(playerA, "Aegis Turtle"); - // Should deal 6 damage - attack(1, playerA, "Aegis Turtle"); + addTarget(playerA, "Air-Cult Elemental"); + + // turn 1 - counter + active backup + attack(1, playerA, "Air-Cult Elemental"); // deals 1 + 5 damage due backup + checkLife("after 1", 1, PhaseStep.POSTCOMBAT_MAIN, playerB, 20 - 1 - 5); + + // turn 3 - counter only + attack(3, playerA, "Air-Cult Elemental"); // deals 1 + 2 damage + attack(3, playerA, "Streetwise Negotiator"); // deals 2 damage due static ability - setStopAt(1, PhaseStep.POSTCOMBAT_MAIN); setStrictChooseMode(true); + setStopAt(3, PhaseStep.POSTCOMBAT_MAIN); execute(); - assertLife(playerB, 14); + assertLife(playerB, 20 - (1 + 5) - (1 + 2 + 2)); } } diff --git a/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java b/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java index d56bec26e1c..7d50fbee52d 100644 --- a/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java +++ b/Mage.Verify/src/test/java/mage/verify/VerifyCardDataTest.java @@ -2646,6 +2646,7 @@ public class VerifyCardDataTest { setInfo.getCardNumber(), setInfo.getRarity(), setInfo.getGraphicInfo())); if (card == null) { errorsList.add("Error: broken constructor " + setInfo.getCardClass()); + continue; } if (!card.getExpansionSetCode().equals(set.getCode())) { errorsList.add("Error: card constructor have custom expansionSetCode, must be removed " + setInfo.getCardClass()); diff --git a/Mage/src/main/java/mage/abilities/effects/common/ruleModifying/CombatDamageByToughnessSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/ruleModifying/CombatDamageByToughnessSourceEffect.java index 3403370a19f..ffbd8c9476a 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/ruleModifying/CombatDamageByToughnessSourceEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/ruleModifying/CombatDamageByToughnessSourceEffect.java @@ -31,7 +31,6 @@ public class CombatDamageByToughnessSourceEffect extends ContinuousEffectImpl { public boolean apply(Game game, Ability source) { Permanent permanent = source.getSourcePermanentIfItStillExists(game); if (permanent == null) { - discard(); return false; } diff --git a/Mage/src/main/java/mage/abilities/keyword/BackupAbility.java b/Mage/src/main/java/mage/abilities/keyword/BackupAbility.java index d88691e9247..78fda570d13 100644 --- a/Mage/src/main/java/mage/abilities/keyword/BackupAbility.java +++ b/Mage/src/main/java/mage/abilities/keyword/BackupAbility.java @@ -1,10 +1,14 @@ package mage.abilities.keyword; import mage.abilities.Ability; +import mage.abilities.StaticAbility; import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.Effect; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; import mage.cards.Card; +import mage.constants.Duration; import mage.constants.Outcome; import mage.counters.CounterType; import mage.game.Game; @@ -85,12 +89,25 @@ public class BackupAbility extends EntersBattlefieldTriggeredAbility { } /** - * * @param ability * @param watcher * @param dontAddToCard use it on multiple instances of backups (example: Conclave Sledge-Captain) */ public void addAbility(Ability ability, Watcher watcher, boolean dontAddToCard) { + // runtime/verify check: wrong duration in backup's static effects + if (ability instanceof StaticAbility) { + Effect wrongEffect = ability.getEffects().stream() + .filter(effect -> effect instanceof ContinuousEffect) + .map(effect -> (ContinuousEffect) effect) + .filter(effect -> effect.getDuration().equals(Duration.EndOfTurn)) + .findFirst() + .orElse(null); + if (wrongEffect != null) { + // how-to fix: add effect with Duration.EndOfGame (backup's abilities for permanent controls by GainAbility) + throw new IllegalArgumentException("Wrong code usage. Backup ability and source card must contains static effects. Wrong effect: " + wrongEffect.getClass().getName()); + } + } + if (watcher != null) { ability.addWatcher(watcher); } From d0d708ba52d5222ced41c8c504f834004faa07d0 Mon Sep 17 00:00:00 2001 From: xenohedron Date: Wed, 30 Aug 2023 19:52:44 -0400 Subject: [PATCH 30/36] Add tests --- .../cards/continuous/SetBasePTSourceTest.java | 161 ++++++++++++++++++ 1 file changed, 161 insertions(+) create mode 100644 Mage.Tests/src/test/java/org/mage/test/cards/continuous/SetBasePTSourceTest.java diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/continuous/SetBasePTSourceTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/continuous/SetBasePTSourceTest.java new file mode 100644 index 00000000000..49538f0ce72 --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/continuous/SetBasePTSourceTest.java @@ -0,0 +1,161 @@ +package org.mage.test.cards.continuous; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * Check that effects setting base power/toughness work properly, including CDA and 7b with duration + * + * @author xenohedron + */ +public class SetBasePTSourceTest extends CardTestPlayerBase { + + @Test + public void testCDAsetPT() { + String rootless = "Rootless Yew"; // 3GG 5/4 + // When Rootless Yew dies, search your library for a creature card with power or toughness 6 or greater, + // reveal it, put it into your hand, then shuffle. + String enigma = "Enigma Drake"; // 1UR */4 + // Enigma Drake's power is equal to the number of instant and sorcery cards in your graveyard. + String kami = "Traproot Kami"; // G 0/* + // Traproot Kami’s toughness is equal to the number of Forests on the battlefield. + + setStrictChooseMode(true); + addCard(Zone.LIBRARY, playerA, enigma); + addCard(Zone.GRAVEYARD, playerA, "Shock", 6); + addCard(Zone.BATTLEFIELD, playerA, rootless); + addCard(Zone.BATTLEFIELD, playerA, "Tarmogoyf"); + addCard(Zone.BATTLEFIELD, playerA, "Forest", 3); + addCard(Zone.BATTLEFIELD, playerA, kami); + addCard(Zone.BATTLEFIELD, playerA, "Visara the Dreadful"); + + // Activate Visara to trigger dies ability and search. CDA must apply in all zones. + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}: Destroy target", rootless); + addTarget(playerA, enigma); // power 6 due to 6 instants in graveyard + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertHandCount(playerA, enigma, 1); + assertGraveyardCount(playerA, rootless, 1); + assertPowerToughness(playerA, kami, 0, 3); // 3 forests + assertPowerToughness(playerA, "Tarmogoyf", 2, 3); // Instant and creature + } + + @Test + public void testLayer7b() { + String mimic = "Battlegate Mimic"; // {1}{R/W} 2/1 + // Whenever you cast a spell that’s both red and white, Battlegate Mimic has base power and toughness 4/2 + // until end of turn and gains first strike until end of turn. + String figure = "Figure of Destiny"; // {R/W} 1/1 + // {R/W}: Figure of Destiny becomes a Kithkin Spirit with base power and toughness 2/2. + // {R/W}{R/W}{R/W}: If Figure of Destiny is a Spirit, it becomes a Kithkin Spirit Warrior with base power and toughness 4/4. + // {R/W}{R/W}{R/W}{R/W}{R/W}{R/W}: If Figure of Destiny is a Warrior, it becomes a Kithkin Spirit Warrior Avatar + // with base power and toughness 8/8, flying, and first strike. + String cloudshift = "Cloudshift"; // {W} Instant + // Exile target creature you control, then return that card to the battlefield under your control. + + setStrictChooseMode(true); + addCard(Zone.BATTLEFIELD, playerA, "Plains", 10); + addCard(Zone.BATTLEFIELD, playerA, mimic); + addCard(Zone.HAND, playerA, figure); + addCard(Zone.HAND, playerA, cloudshift, 2); + addCard(Zone.HAND, playerA, "Double Cleave"); // {1}{R/W} Instant + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, figure); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertPowerToughness(playerA, mimic, 4, 2); + assertPowerToughness(playerA, figure,1, 1); + + activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{R/W}: "); + waitStackResolved(1, PhaseStep.POSTCOMBAT_MAIN); + activateAbility(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "{R/W}{R/W}{R/W}: "); + + setStopAt(1, PhaseStep.END_TURN); + execute(); + + assertPowerToughness(playerA, mimic, 4, 2); + assertPowerToughness(playerA, figure,4, 4); + + setStopAt(2, PhaseStep.UPKEEP); + execute(); + + assertPowerToughness(playerA, mimic, 2, 1); + assertPowerToughness(playerA, figure,4, 4); + + castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerA, "Double Cleave", mimic); + waitStackResolved(2, PhaseStep.PRECOMBAT_MAIN); + castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerA, cloudshift, figure); + + setStopAt(2, PhaseStep.BEGIN_COMBAT); + execute(); + + assertPowerToughness(playerA, mimic, 4, 2); + assertPowerToughness(playerA, figure, 1, 1); + + castSpell(2, PhaseStep.POSTCOMBAT_MAIN, playerA, cloudshift, mimic); + waitStackResolved(2, PhaseStep.POSTCOMBAT_MAIN); + activateAbility(2, PhaseStep.POSTCOMBAT_MAIN, playerA, "{R/W}: "); + + setStopAt(2, PhaseStep.END_TURN); + execute(); + + assertPowerToughness(playerA, mimic, 2, 1); + assertPowerToughness(playerA, figure, 2, 2); + } + + @Test + public void testSvogthos() { + String svogthos = "Svogthos, the Restless Tomb"; // Land + // {3}{B}{G}: Until end of turn, Svogthos, the Restless Tomb becomes a black and green Plant Zombie creature with + // "This creature’s power and toughness are each equal to the number of creature cards in your graveyard." It’s still a land. + + setStrictChooseMode(true); + addCard(Zone.GRAVEYARD, playerA, "Walking Corpse", 5); + addCard(Zone.BATTLEFIELD, playerA, svogthos); + addCard(Zone.BATTLEFIELD, playerA, "Bayou", 5); + + activateAbility(1, PhaseStep.PRECOMBAT_MAIN, playerA, "{3}{B}{G}: "); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertPowerToughness(playerA, svogthos, 5, 5); + } + + @Test + public void testSuturedGhoul() { + String ghoul = "Sutured Ghoul"; // 4BBB */* Trample + // As Sutured Ghoul enters the battlefield, exile any number of creature cards from your graveyard. + // Sutured Ghoul's power is equal to the total power of the exiled cards and its toughness is equal to their total toughness. + String tymaret = "Tymaret, Chosen from Death"; // BB 2/* + // Tymaret's toughness is equal to your devotion to black. + String corpse = "Walking Corpse"; // 1B 2/2 + String bogstomper = "Bogstomper"; // 4BB 6/5 + + setStrictChooseMode(true); + addCard(Zone.BATTLEFIELD, playerA, corpse); + addCard(Zone.GRAVEYARD, playerA, tymaret, 1); + addCard(Zone.GRAVEYARD, playerA, bogstomper, 1); + addCard(Zone.HAND, playerA, ghoul); + addCard(Zone.BATTLEFIELD, playerA, "Swamp", 7); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, ghoul); + addTarget(playerA, tymaret + "^" + bogstomper); + // Total devotion is 3 + 1 so Tymaret has toughness 4 in all zones + // Therefore Sutured Ghoul exiling Tymaret and Bogstomper should have power 2+6 and toughness 4+5 + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertExileCount(playerA, tymaret, 1); + assertExileCount(playerA, bogstomper, 1); + assertPowerToughness(playerA, ghoul, 8, 9); + + } + +} From 593451376b5eaad885e8063ad5cb8df5d0c71d51 Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Thu, 31 Aug 2023 08:16:38 +0400 Subject: [PATCH 31/36] merge fix --- Mage.Sets/src/mage/cards/s/StreetwiseNegotiator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/cards/s/StreetwiseNegotiator.java b/Mage.Sets/src/mage/cards/s/StreetwiseNegotiator.java index bdbd0602960..fb373a502d8 100644 --- a/Mage.Sets/src/mage/cards/s/StreetwiseNegotiator.java +++ b/Mage.Sets/src/mage/cards/s/StreetwiseNegotiator.java @@ -28,7 +28,7 @@ public final class StreetwiseNegotiator extends CardImpl { BackupAbility backupAbility = new BackupAbility(this, 1); // This creature assigns combat damage equal to its toughness rather than its power. - backupAbility.addAbility(new SimpleStaticAbility(new CombatDamageByToughnessSourceEffect(Duration.EndOfGame) + backupAbility.addAbility(new SimpleStaticAbility(new CombatDamageByToughnessSourceEffect(Duration.WhileOnBattlefield) .setText("this creature assigns combat damage equal to its toughness rather than its power"))); this.addAbility(backupAbility); From 1197925486d0afa4617c552e94bc9978e86770ba Mon Sep 17 00:00:00 2001 From: theelk801 Date: Thu, 31 Aug 2023 09:50:02 -0400 Subject: [PATCH 32/36] [WOE] add all printings --- Mage.Sets/src/mage/sets/WildsOfEldraine.java | 264 +++++++++++++------ 1 file changed, 177 insertions(+), 87 deletions(-) diff --git a/Mage.Sets/src/mage/sets/WildsOfEldraine.java b/Mage.Sets/src/mage/sets/WildsOfEldraine.java index ff07f89fce5..f5d58f719e9 100644 --- a/Mage.Sets/src/mage/sets/WildsOfEldraine.java +++ b/Mage.Sets/src/mage/sets/WildsOfEldraine.java @@ -32,35 +32,45 @@ public final class WildsOfEldraine extends ExpansionSet { this.numBoosterSpecial = 1; // WOT: Enchanting Tales this.maxCardNumberInBooster = 276; - cards.add(new SetCardInfo("A Tale for the Ages", 34, Rarity.RARE, mage.cards.a.ATaleForTheAges.class)); - cards.add(new SetCardInfo("Agatha of the Vile Cauldron", 199, Rarity.MYTHIC, mage.cards.a.AgathaOfTheVileCauldron.class)); + cards.add(new SetCardInfo("A Tale for the Ages", 328, Rarity.RARE, mage.cards.a.ATaleForTheAges.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("A Tale for the Ages", 34, Rarity.RARE, mage.cards.a.ATaleForTheAges.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Agatha of the Vile Cauldron", 199, Rarity.MYTHIC, mage.cards.a.AgathaOfTheVileCauldron.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Agatha of the Vile Cauldron", 360, Rarity.MYTHIC, mage.cards.a.AgathaOfTheVileCauldron.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Agatha's Champion", 160, Rarity.UNCOMMON, mage.cards.a.AgathasChampion.class)); - cards.add(new SetCardInfo("Agatha's Soul Cauldron", 242, Rarity.MYTHIC, mage.cards.a.AgathasSoulCauldron.class)); + cards.add(new SetCardInfo("Agatha's Soul Cauldron", 242, Rarity.MYTHIC, mage.cards.a.AgathasSoulCauldron.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Agatha's Soul Cauldron", 366, Rarity.MYTHIC, mage.cards.a.AgathasSoulCauldron.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Aquatic Alchemist", 40, Rarity.COMMON, mage.cards.a.AquaticAlchemist.class)); cards.add(new SetCardInfo("Archive Dragon", 41, Rarity.UNCOMMON, mage.cards.a.ArchiveDragon.class)); - cards.add(new SetCardInfo("Archon of the Wild Rose", 1, Rarity.RARE, mage.cards.a.ArchonOfTheWildRose.class)); + cards.add(new SetCardInfo("Archon of the Wild Rose", 1, Rarity.RARE, mage.cards.a.ArchonOfTheWildRose.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Archon of the Wild Rose", 323, Rarity.RARE, mage.cards.a.ArchonOfTheWildRose.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Archon's Glory", 2, Rarity.COMMON, mage.cards.a.ArchonsGlory.class)); cards.add(new SetCardInfo("Armory Mice", 3, Rarity.COMMON, mage.cards.a.ArmoryMice.class)); cards.add(new SetCardInfo("Ash, Party Crasher", 201, Rarity.UNCOMMON, mage.cards.a.AshPartyCrasher.class)); cards.add(new SetCardInfo("Ashiok's Reaper", 79, Rarity.UNCOMMON, mage.cards.a.AshioksReaper.class)); - cards.add(new SetCardInfo("Ashiok, Wicked Manipulator", 78, Rarity.MYTHIC, mage.cards.a.AshiokWickedManipulator.class)); - cards.add(new SetCardInfo("Asinine Antics", 42, Rarity.MYTHIC, mage.cards.a.AsinineAntics.class)); + cards.add(new SetCardInfo("Ashiok, Wicked Manipulator", 297, Rarity.MYTHIC, mage.cards.a.AshiokWickedManipulator.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Ashiok, Wicked Manipulator", 78, Rarity.MYTHIC, mage.cards.a.AshiokWickedManipulator.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Asinine Antics", 330, Rarity.MYTHIC, mage.cards.a.AsinineAntics.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Asinine Antics", 42, Rarity.MYTHIC, mage.cards.a.AsinineAntics.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Back for Seconds", 80, Rarity.UNCOMMON, mage.cards.b.BackForSeconds.class)); cards.add(new SetCardInfo("Barrow Naughty", 81, Rarity.COMMON, mage.cards.b.BarrowNaughty.class)); cards.add(new SetCardInfo("Beanstalk Wurm", 161, Rarity.COMMON, mage.cards.b.BeanstalkWurm.class)); cards.add(new SetCardInfo("Become Brutes", 317, Rarity.UNCOMMON, mage.cards.b.BecomeBrutes.class)); cards.add(new SetCardInfo("Belligerent of the Ball", 120, Rarity.UNCOMMON, mage.cards.b.BelligerentOfTheBall.class)); cards.add(new SetCardInfo("Bellowing Bruiser", 121, Rarity.COMMON, mage.cards.b.BellowingBruiser.class)); - cards.add(new SetCardInfo("Beluna Grandsquall", 220, Rarity.MYTHIC, mage.cards.b.BelunaGrandsquall.class)); + cards.add(new SetCardInfo("Beluna Grandsquall", 220, Rarity.MYTHIC, mage.cards.b.BelunaGrandsquall.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Beluna Grandsquall", 285, Rarity.MYTHIC, mage.cards.b.BelunaGrandsquall.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Beluna's Gatekeeper", 43, Rarity.COMMON, mage.cards.b.BelunasGatekeeper.class)); - cards.add(new SetCardInfo("Beseech the Mirror", 82, Rarity.MYTHIC, mage.cards.b.BeseechTheMirror.class)); + cards.add(new SetCardInfo("Beseech the Mirror", 336, Rarity.MYTHIC, mage.cards.b.BeseechTheMirror.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Beseech the Mirror", 82, Rarity.MYTHIC, mage.cards.b.BeseechTheMirror.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Besotted Knight", 4, Rarity.COMMON, mage.cards.b.BesottedKnight.class)); cards.add(new SetCardInfo("Bespoke Battlegarb", 122, Rarity.COMMON, mage.cards.b.BespokeBattlegarb.class)); cards.add(new SetCardInfo("Bestial Bloodline", 162, Rarity.COMMON, mage.cards.b.BestialBloodline.class)); cards.add(new SetCardInfo("Bitter Chill", 44, Rarity.UNCOMMON, mage.cards.b.BitterChill.class)); - cards.add(new SetCardInfo("Blossoming Tortoise", 163, Rarity.MYTHIC, mage.cards.b.BlossomingTortoise.class)); + cards.add(new SetCardInfo("Blossoming Tortoise", 163, Rarity.MYTHIC, mage.cards.b.BlossomingTortoise.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Blossoming Tortoise", 354, Rarity.MYTHIC, mage.cards.b.BlossomingTortoise.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Boundary Lands Ranger", 123, Rarity.UNCOMMON, mage.cards.b.BoundaryLandsRanger.class)); - cards.add(new SetCardInfo("Bramble Familiar", 164, Rarity.RARE, mage.cards.b.BrambleFamiliar.class)); + cards.add(new SetCardInfo("Bramble Familiar", 164, Rarity.RARE, mage.cards.b.BrambleFamiliar.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Bramble Familiar", 283, Rarity.RARE, mage.cards.b.BrambleFamiliar.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Brave the Wilds", 165, Rarity.COMMON, mage.cards.b.BraveTheWilds.class)); cards.add(new SetCardInfo("Break the Spell", 5, Rarity.COMMON, mage.cards.b.BreakTheSpell.class)); cards.add(new SetCardInfo("Callous Sell-Sword", 221, Rarity.UNCOMMON, mage.cards.c.CallousSellSword.class)); @@ -69,19 +79,23 @@ public final class WildsOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Chancellor of Tales", 45, Rarity.UNCOMMON, mage.cards.c.ChancellorOfTales.class)); cards.add(new SetCardInfo("Charging Hooligan", 318, Rarity.UNCOMMON, mage.cards.c.ChargingHooligan.class)); cards.add(new SetCardInfo("Charmed Clothier", 6, Rarity.COMMON, mage.cards.c.CharmedClothier.class)); - cards.add(new SetCardInfo("Charming Scoundrel", 124, Rarity.RARE, mage.cards.c.CharmingScoundrel.class)); + cards.add(new SetCardInfo("Charming Scoundrel", 124, Rarity.RARE, mage.cards.c.CharmingScoundrel.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Charming Scoundrel", 345, Rarity.RARE, mage.cards.c.CharmingScoundrel.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Cheeky House-Mouse", 7, Rarity.UNCOMMON, mage.cards.c.CheekyHouseMouse.class)); cards.add(new SetCardInfo("Collector's Vault", 244, Rarity.UNCOMMON, mage.cards.c.CollectorsVault.class)); cards.add(new SetCardInfo("Commune with Nature", 166, Rarity.COMMON, mage.cards.c.CommuneWithNature.class)); cards.add(new SetCardInfo("Conceited Witch", 84, Rarity.COMMON, mage.cards.c.ConceitedWitch.class)); cards.add(new SetCardInfo("Cooped Up", 8, Rarity.COMMON, mage.cards.c.CoopedUp.class)); - cards.add(new SetCardInfo("Cruel Somnophage", 222, Rarity.RARE, mage.cards.c.CruelSomnophage.class)); + cards.add(new SetCardInfo("Cruel Somnophage", 222, Rarity.RARE, mage.cards.c.CruelSomnophage.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Cruel Somnophage", 286, Rarity.RARE, mage.cards.c.CruelSomnophage.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Crystal Grotto", 254, Rarity.COMMON, mage.cards.c.CrystalGrotto.class)); cards.add(new SetCardInfo("Curse of the Werefox", 167, Rarity.COMMON, mage.cards.c.CurseOfTheWerefox.class)); cards.add(new SetCardInfo("Cursed Courtier", 9, Rarity.UNCOMMON, mage.cards.c.CursedCourtier.class)); cards.add(new SetCardInfo("Cut In", 125, Rarity.COMMON, mage.cards.c.CutIn.class)); - cards.add(new SetCardInfo("Decadent Dragon", 223, Rarity.RARE, mage.cards.d.DecadentDragon.class)); - cards.add(new SetCardInfo("Devouring Sugarmaw", 224, Rarity.RARE, mage.cards.d.DevouringSugarmaw.class)); + cards.add(new SetCardInfo("Decadent Dragon", 223, Rarity.RARE, mage.cards.d.DecadentDragon.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Decadent Dragon", 287, Rarity.RARE, mage.cards.d.DecadentDragon.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Devouring Sugarmaw", 224, Rarity.RARE, mage.cards.d.DevouringSugarmaw.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Devouring Sugarmaw", 288, Rarity.RARE, mage.cards.d.DevouringSugarmaw.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Diminisher Witch", 46, Rarity.COMMON, mage.cards.d.DiminisherWitch.class)); cards.add(new SetCardInfo("Discerning Financier", 10, Rarity.UNCOMMON, mage.cards.d.DiscerningFinancier.class)); cards.add(new SetCardInfo("Disdainful Stroke", 47, Rarity.UNCOMMON, mage.cards.d.DisdainfulStroke.class)); @@ -91,28 +105,40 @@ public final class WildsOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Edgewall Pack", 126, Rarity.COMMON, mage.cards.e.EdgewallPack.class)); cards.add(new SetCardInfo("Eerie Interference", 12, Rarity.UNCOMMON, mage.cards.e.EerieInterference.class)); cards.add(new SetCardInfo("Ego Drain", 86, Rarity.UNCOMMON, mage.cards.e.EgoDrain.class)); - cards.add(new SetCardInfo("Elusive Otter", 225, Rarity.RARE, mage.cards.e.ElusiveOtter.class)); - cards.add(new SetCardInfo("Elvish Archivist", 168, Rarity.RARE, mage.cards.e.ElvishArchivist.class)); + cards.add(new SetCardInfo("Elusive Otter", 225, Rarity.RARE, mage.cards.e.ElusiveOtter.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Elusive Otter", 289, Rarity.RARE, mage.cards.e.ElusiveOtter.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Elvish Archivist", 168, Rarity.RARE, mage.cards.e.ElvishArchivist.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Elvish Archivist", 355, Rarity.RARE, mage.cards.e.ElvishArchivist.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Embereth Veteran", 127, Rarity.UNCOMMON, mage.cards.e.EmberethVeteran.class)); - cards.add(new SetCardInfo("Eriette of the Charmed Apple", 202, Rarity.MYTHIC, mage.cards.e.ErietteOfTheCharmedApple.class)); + cards.add(new SetCardInfo("Eriette of the Charmed Apple", 202, Rarity.MYTHIC, mage.cards.e.ErietteOfTheCharmedApple.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Eriette of the Charmed Apple", 299, Rarity.MYTHIC, mage.cards.e.ErietteOfTheCharmedApple.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Eriette's Tempting Apple", 245, Rarity.UNCOMMON, mage.cards.e.EriettesTemptingApple.class)); cards.add(new SetCardInfo("Eriette's Whisper", 88, Rarity.COMMON, mage.cards.e.EriettesWhisper.class)); cards.add(new SetCardInfo("Evolving Wilds", 256, Rarity.COMMON, mage.cards.e.EvolvingWilds.class)); - cards.add(new SetCardInfo("Expel the Interlopers", 13, Rarity.RARE, mage.cards.e.ExpelTheInterlopers.class)); + cards.add(new SetCardInfo("Expel the Interlopers", 13, Rarity.RARE, mage.cards.e.ExpelTheInterlopers.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Expel the Interlopers", 324, Rarity.RARE, mage.cards.e.ExpelTheInterlopers.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Expel the Interlopers", 381, Rarity.RARE, mage.cards.e.ExpelTheInterlopers.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Experimental Confectioner", 314, Rarity.UNCOMMON, mage.cards.e.ExperimentalConfectioner.class)); - cards.add(new SetCardInfo("Extraordinary Journey", 48, Rarity.RARE, mage.cards.e.ExtraordinaryJourney.class)); - cards.add(new SetCardInfo("Faerie Dreamthief", 89, Rarity.UNCOMMON, mage.cards.f.FaerieDreamthief.class)); + cards.add(new SetCardInfo("Extraordinary Journey", 331, Rarity.RARE, mage.cards.e.ExtraordinaryJourney.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Extraordinary Journey", 48, Rarity.RARE, mage.cards.e.ExtraordinaryJourney.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Faerie Dreamthief", 377, Rarity.UNCOMMON, mage.cards.f.FaerieDreamthief.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Faerie Dreamthief", 89, Rarity.UNCOMMON, mage.cards.f.FaerieDreamthief.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Faerie Fencing", 90, Rarity.UNCOMMON, mage.cards.f.FaerieFencing.class)); - cards.add(new SetCardInfo("Faerie Slumber Party", 371, Rarity.RARE, mage.cards.f.FaerieSlumberParty.class)); - cards.add(new SetCardInfo("Farsight Ritual", 49, Rarity.RARE, mage.cards.f.FarsightRitual.class)); - cards.add(new SetCardInfo("Faunsbane Troll", 203, Rarity.RARE, mage.cards.f.FaunsbaneTroll.class)); + cards.add(new SetCardInfo("Faerie Slumber Party", 311, Rarity.RARE, mage.cards.f.FaerieSlumberParty.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Faerie Slumber Party", 371, Rarity.RARE, mage.cards.f.FaerieSlumberParty.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Farsight Ritual", 332, Rarity.RARE, mage.cards.f.FarsightRitual.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Farsight Ritual", 49, Rarity.RARE, mage.cards.f.FarsightRitual.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Faunsbane Troll", 203, Rarity.RARE, mage.cards.f.FaunsbaneTroll.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Faunsbane Troll", 361, Rarity.RARE, mage.cards.f.FaunsbaneTroll.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Feed the Cauldron", 91, Rarity.COMMON, mage.cards.f.FeedTheCauldron.class)); cards.add(new SetCardInfo("Fell Horseman", 92, Rarity.COMMON, mage.cards.f.FellHorseman.class)); - cards.add(new SetCardInfo("Feral Encounter", 169, Rarity.RARE, mage.cards.f.FeralEncounter.class)); + cards.add(new SetCardInfo("Feral Encounter", 169, Rarity.RARE, mage.cards.f.FeralEncounter.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Feral Encounter", 356, Rarity.RARE, mage.cards.f.FeralEncounter.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Ferocious Werefox", 170, Rarity.COMMON, mage.cards.f.FerociousWerefox.class)); cards.add(new SetCardInfo("Flick a Coin", 128, Rarity.COMMON, mage.cards.f.FlickACoin.class)); cards.add(new SetCardInfo("Food Coma", 308, Rarity.UNCOMMON, mage.cards.f.FoodComa.class)); - cards.add(new SetCardInfo("Food Fight", 129, Rarity.RARE, mage.cards.f.FoodFight.class)); + cards.add(new SetCardInfo("Food Fight", 129, Rarity.RARE, mage.cards.f.FoodFight.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Food Fight", 346, Rarity.RARE, mage.cards.f.FoodFight.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Forest", 266, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Forest", 275, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Forest", 276, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); @@ -127,30 +153,39 @@ public final class WildsOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Gingerbrute", 246, Rarity.COMMON, mage.cards.g.Gingerbrute.class)); cards.add(new SetCardInfo("Glass Casket", 16, Rarity.UNCOMMON, mage.cards.g.GlassCasket.class)); cards.add(new SetCardInfo("Gnawing Crescendo", 131, Rarity.COMMON, mage.cards.g.GnawingCrescendo.class)); - cards.add(new SetCardInfo("Goddric, Cloaked Reveler", 132, Rarity.RARE, mage.cards.g.GoddricCloakedReveler.class)); + cards.add(new SetCardInfo("Goddric, Cloaked Reveler", 132, Rarity.RARE, mage.cards.g.GoddricCloakedReveler.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Goddric, Cloaked Reveler", 347, Rarity.RARE, mage.cards.g.GoddricCloakedReveler.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Grabby Giant", 133, Rarity.COMMON, mage.cards.g.GrabbyGiant.class)); cards.add(new SetCardInfo("Graceful Takedown", 171, Rarity.UNCOMMON, mage.cards.g.GracefulTakedown.class)); cards.add(new SetCardInfo("Grand Ball Guest", 134, Rarity.COMMON, mage.cards.g.GrandBallGuest.class)); cards.add(new SetCardInfo("Greta, Sweettooth Scourge", 205, Rarity.UNCOMMON, mage.cards.g.GretaSweettoothScourge.class)); - cards.add(new SetCardInfo("Gruff Triplets", 172, Rarity.RARE, mage.cards.g.GruffTriplets.class)); - cards.add(new SetCardInfo("Gumdrop Poisoner", 93, Rarity.RARE, mage.cards.g.GumdropPoisoner.class)); + cards.add(new SetCardInfo("Gruff Triplets", 172, Rarity.RARE, mage.cards.g.GruffTriplets.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Gruff Triplets", 357, Rarity.RARE, mage.cards.g.GruffTriplets.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Gumdrop Poisoner", 280, Rarity.RARE, mage.cards.g.GumdropPoisoner.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Gumdrop Poisoner", 93, Rarity.RARE, mage.cards.g.GumdropPoisoner.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Hamlet Glutton", 173, Rarity.COMMON, mage.cards.h.HamletGlutton.class)); cards.add(new SetCardInfo("Harried Spearguard", 135, Rarity.COMMON, mage.cards.h.HarriedSpearguard.class)); - cards.add(new SetCardInfo("Heartflame Duelist", 228, Rarity.RARE, mage.cards.h.HeartflameDuelist.class)); + cards.add(new SetCardInfo("Heartflame Duelist", 228, Rarity.RARE, mage.cards.h.HeartflameDuelist.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Heartflame Duelist", 290, Rarity.RARE, mage.cards.h.HeartflameDuelist.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Hearth Elemental", 136, Rarity.UNCOMMON, mage.cards.h.HearthElemental.class)); cards.add(new SetCardInfo("High Fae Negotiator", 94, Rarity.UNCOMMON, mage.cards.h.HighFaeNegotiator.class)); cards.add(new SetCardInfo("Hollow Scavenger", 174, Rarity.COMMON, mage.cards.h.HollowScavenger.class)); cards.add(new SetCardInfo("Hopeful Vigil", 17, Rarity.COMMON, mage.cards.h.HopefulVigil.class)); cards.add(new SetCardInfo("Hopeless Nightmare", 95, Rarity.COMMON, mage.cards.h.HopelessNightmare.class)); - cards.add(new SetCardInfo("Horned Loch-Whale", 53, Rarity.RARE, mage.cards.h.HornedLochWhale.class)); + cards.add(new SetCardInfo("Horned Loch-Whale", 278, Rarity.RARE, mage.cards.h.HornedLochWhale.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Horned Loch-Whale", 53, Rarity.RARE, mage.cards.h.HornedLochWhale.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Howling Galefang", 175, Rarity.UNCOMMON, mage.cards.h.HowlingGalefang.class)); - cards.add(new SetCardInfo("Hylda of the Icy Crown", 206, Rarity.MYTHIC, mage.cards.h.HyldaOfTheIcyCrown.class)); - cards.add(new SetCardInfo("Hylda's Crown of Winter", 247, Rarity.RARE, mage.cards.h.HyldasCrownOfWinter.class)); + cards.add(new SetCardInfo("Hylda of the Icy Crown", 206, Rarity.MYTHIC, mage.cards.h.HyldaOfTheIcyCrown.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Hylda of the Icy Crown", 363, Rarity.MYTHIC, mage.cards.h.HyldaOfTheIcyCrown.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Hylda's Crown of Winter", 247, Rarity.RARE, mage.cards.h.HyldasCrownOfWinter.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Hylda's Crown of Winter", 367, Rarity.RARE, mage.cards.h.HyldasCrownOfWinter.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Ice Out", 54, Rarity.COMMON, mage.cards.i.IceOut.class)); cards.add(new SetCardInfo("Icewrought Sentry", 55, Rarity.UNCOMMON, mage.cards.i.IcewroughtSentry.class)); cards.add(new SetCardInfo("Imodane's Recruiter", 229, Rarity.UNCOMMON, mage.cards.i.ImodanesRecruiter.class)); - cards.add(new SetCardInfo("Imodane, the Pyrohammer", 137, Rarity.RARE, mage.cards.i.ImodaneThePyrohammer.class)); - cards.add(new SetCardInfo("Ingenious Prodigy", 56, Rarity.RARE, mage.cards.i.IngeniousProdigy.class)); + cards.add(new SetCardInfo("Imodane, the Pyrohammer", 137, Rarity.RARE, mage.cards.i.ImodaneThePyrohammer.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Imodane, the Pyrohammer", 348, Rarity.RARE, mage.cards.i.ImodaneThePyrohammer.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Ingenious Prodigy", 333, Rarity.RARE, mage.cards.i.IngeniousProdigy.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Ingenious Prodigy", 56, Rarity.RARE, mage.cards.i.IngeniousProdigy.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Into the Fae Court", 57, Rarity.COMMON, mage.cards.i.IntoTheFaeCourt.class)); cards.add(new SetCardInfo("Intrepid Trufflesnout", 320, Rarity.UNCOMMON, mage.cards.i.IntrepidTrufflesnout.class)); cards.add(new SetCardInfo("Island", 263, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS)); @@ -159,19 +194,28 @@ public final class WildsOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Johann's Stopgap", 58, Rarity.COMMON, mage.cards.j.JohannsStopgap.class)); cards.add(new SetCardInfo("Johann, Apprentice Sorcerer", 207, Rarity.UNCOMMON, mage.cards.j.JohannApprenticeSorcerer.class)); cards.add(new SetCardInfo("Kellan's Lightblades", 18, Rarity.COMMON, mage.cards.k.KellansLightblades.class)); - cards.add(new SetCardInfo("Kellan, the Fae-Blooded", 230, Rarity.MYTHIC, mage.cards.k.KellanTheFaeBlooded.class)); + cards.add(new SetCardInfo("Kellan, the Fae-Blooded", 230, Rarity.MYTHIC, mage.cards.k.KellanTheFaeBlooded.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Kellan, the Fae-Blooded", 291, Rarity.MYTHIC, mage.cards.k.KellanTheFaeBlooded.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Kellan, the Fae-Blooded", 298, Rarity.MYTHIC, mage.cards.k.KellanTheFaeBlooded.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Kindled Heroism", 138, Rarity.COMMON, mage.cards.k.KindledHeroism.class)); cards.add(new SetCardInfo("Knight of Doves", 19, Rarity.UNCOMMON, mage.cards.k.KnightOfDoves.class)); cards.add(new SetCardInfo("Korvold and the Noble Thief", 139, Rarity.UNCOMMON, mage.cards.k.KorvoldAndTheNobleThief.class)); - cards.add(new SetCardInfo("Lady of Laughter", 309, Rarity.RARE, mage.cards.l.LadyOfLaughter.class)); + cards.add(new SetCardInfo("Lady of Laughter", 309, Rarity.RARE, mage.cards.l.LadyOfLaughter.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Lady of Laughter", 370, Rarity.RARE, mage.cards.l.LadyOfLaughter.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Leaping Ambush", 177, Rarity.COMMON, mage.cards.l.LeapingAmbush.class)); - cards.add(new SetCardInfo("Lich-Knights' Conquest", 96, Rarity.RARE, mage.cards.l.LichKnightsConquest.class)); - cards.add(new SetCardInfo("Likeness Looter", 208, Rarity.RARE, mage.cards.l.LikenessLooter.class)); + cards.add(new SetCardInfo("Lich-Knights' Conquest", 338, Rarity.RARE, mage.cards.l.LichKnightsConquest.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Lich-Knights' Conquest", 380, Rarity.RARE, mage.cards.l.LichKnightsConquest.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Lich-Knights' Conquest", 96, Rarity.RARE, mage.cards.l.LichKnightsConquest.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Likeness Looter", 208, Rarity.RARE, mage.cards.l.LikenessLooter.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Likeness Looter", 364, Rarity.RARE, mage.cards.l.LikenessLooter.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Living Lectern", 59, Rarity.COMMON, mage.cards.l.LivingLectern.class)); - cards.add(new SetCardInfo("Lord Skitter's Blessing", 98, Rarity.RARE, mage.cards.l.LordSkittersBlessing.class)); + cards.add(new SetCardInfo("Lord Skitter's Blessing", 340, Rarity.RARE, mage.cards.l.LordSkittersBlessing.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Lord Skitter's Blessing", 98, Rarity.RARE, mage.cards.l.LordSkittersBlessing.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Lord Skitter's Butcher", 99, Rarity.UNCOMMON, mage.cards.l.LordSkittersButcher.class)); - cards.add(new SetCardInfo("Lord Skitter, Sewer King", 97, Rarity.RARE, mage.cards.l.LordSkitterSewerKing.class)); - cards.add(new SetCardInfo("Malevolent Witchkite", 315, Rarity.RARE, mage.cards.m.MalevolentWitchkite.class)); + cards.add(new SetCardInfo("Lord Skitter, Sewer King", 339, Rarity.RARE, mage.cards.l.LordSkitterSewerKing.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Lord Skitter, Sewer King", 97, Rarity.RARE, mage.cards.l.LordSkitterSewerKing.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Malevolent Witchkite", 315, Rarity.RARE, mage.cards.m.MalevolentWitchkite.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Malevolent Witchkite", 372, Rarity.RARE, mage.cards.m.MalevolentWitchkite.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Merfolk Coralsmith", 60, Rarity.COMMON, mage.cards.m.MerfolkCoralsmith.class)); cards.add(new SetCardInfo("Merry Bards", 140, Rarity.COMMON, mage.cards.m.MerryBards.class)); cards.add(new SetCardInfo("Minecart Daredevil", 141, Rarity.COMMON, mage.cards.m.MinecartDaredevil.class)); @@ -180,8 +224,10 @@ public final class WildsOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Mocking Sprite", 62, Rarity.COMMON, mage.cards.m.MockingSprite.class)); cards.add(new SetCardInfo("Moment of Valor", 20, Rarity.COMMON, mage.cards.m.MomentOfValor.class)); cards.add(new SetCardInfo("Monstrous Rage", 142, Rarity.UNCOMMON, mage.cards.m.MonstrousRage.class)); - cards.add(new SetCardInfo("Moonshaker Cavalry", 21, Rarity.MYTHIC, mage.cards.m.MoonshakerCavalry.class)); - cards.add(new SetCardInfo("Mosswood Dreadknight", 231, Rarity.RARE, mage.cards.m.MosswoodDreadknight.class)); + cards.add(new SetCardInfo("Moonshaker Cavalry", 21, Rarity.MYTHIC, mage.cards.m.MoonshakerCavalry.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Moonshaker Cavalry", 325, Rarity.MYTHIC, mage.cards.m.MoonshakerCavalry.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Mosswood Dreadknight", 231, Rarity.RARE, mage.cards.m.MosswoodDreadknight.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Mosswood Dreadknight", 292, Rarity.RARE, mage.cards.m.MosswoodDreadknight.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Mountain", 265, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Mountain", 273, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Mountain", 274, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); @@ -190,7 +236,8 @@ public final class WildsOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Not Dead After All", 101, Rarity.COMMON, mage.cards.n.NotDeadAfterAll.class)); cards.add(new SetCardInfo("Obyra's Attendants", 63, Rarity.COMMON, mage.cards.o.ObyrasAttendants.class)); cards.add(new SetCardInfo("Obyra, Dreaming Duelist", 210, Rarity.UNCOMMON, mage.cards.o.ObyraDreamingDuelist.class)); - cards.add(new SetCardInfo("Ogre Chitterlord", 319, Rarity.RARE, mage.cards.o.OgreChitterlord.class)); + cards.add(new SetCardInfo("Ogre Chitterlord", 319, Rarity.RARE, mage.cards.o.OgreChitterlord.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Ogre Chitterlord", 373, Rarity.RARE, mage.cards.o.OgreChitterlord.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Old Flitterfang", 316, Rarity.UNCOMMON, mage.cards.o.OldFlitterfang.class)); cards.add(new SetCardInfo("Pests of Honor", 310, Rarity.UNCOMMON, mage.cards.p.PestsOfHonor.class)); cards.add(new SetCardInfo("Picklock Prankster", 64, Rarity.UNCOMMON, mage.cards.p.PicklockPrankster.class)); @@ -199,60 +246,82 @@ public final class WildsOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Plains", 267, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Plains", 268, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Plunge into Winter", 22, Rarity.COMMON, mage.cards.p.PlungeIntoWinter.class)); - cards.add(new SetCardInfo("Pollen-Shield Hare", 233, Rarity.RARE, mage.cards.p.PollenShieldHare.class)); + cards.add(new SetCardInfo("Pollen-Shield Hare", 233, Rarity.RARE, mage.cards.p.PollenShieldHare.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Pollen-Shield Hare", 293, Rarity.RARE, mage.cards.p.PollenShieldHare.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Prophetic Prism", 249, Rarity.COMMON, mage.cards.p.PropheticPrism.class)); cards.add(new SetCardInfo("Protective Parents", 24, Rarity.COMMON, mage.cards.p.ProtectiveParents.class)); cards.add(new SetCardInfo("Provisions Merchant", 321, Rarity.UNCOMMON, mage.cards.p.ProvisionsMerchant.class)); - cards.add(new SetCardInfo("Questing Druid", 234, Rarity.RARE, mage.cards.q.QuestingDruid.class)); + cards.add(new SetCardInfo("Questing Druid", 234, Rarity.RARE, mage.cards.q.QuestingDruid.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Questing Druid", 294, Rarity.RARE, mage.cards.q.QuestingDruid.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Quick Study", 65, Rarity.COMMON, mage.cards.q.QuickStudy.class)); - cards.add(new SetCardInfo("Raging Battle Mouse", 143, Rarity.RARE, mage.cards.r.RagingBattleMouse.class)); - cards.add(new SetCardInfo("Rankle's Prank", 102, Rarity.RARE, mage.cards.r.RanklesPrank.class)); + cards.add(new SetCardInfo("Raging Battle Mouse", 143, Rarity.RARE, mage.cards.r.RagingBattleMouse.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Raging Battle Mouse", 349, Rarity.RARE, mage.cards.r.RagingBattleMouse.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Rankle's Prank", 102, Rarity.RARE, mage.cards.r.RanklesPrank.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Rankle's Prank", 341, Rarity.RARE, mage.cards.r.RanklesPrank.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Rat Out", 103, Rarity.COMMON, mage.cards.r.RatOut.class)); cards.add(new SetCardInfo("Ratcatcher Trainee", 144, Rarity.COMMON, mage.cards.r.RatcatcherTrainee.class)); - cards.add(new SetCardInfo("Realm-Scorcher Hellkite", 145, Rarity.MYTHIC, mage.cards.r.RealmScorcherHellkite.class)); - cards.add(new SetCardInfo("Redcap Gutter-Dweller", 146, Rarity.RARE, mage.cards.r.RedcapGutterDweller.class)); + cards.add(new SetCardInfo("Realm-Scorcher Hellkite", 145, Rarity.MYTHIC, mage.cards.r.RealmScorcherHellkite.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Realm-Scorcher Hellkite", 350, Rarity.MYTHIC, mage.cards.r.RealmScorcherHellkite.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Redcap Gutter-Dweller", 146, Rarity.RARE, mage.cards.r.RedcapGutterDweller.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Redcap Gutter-Dweller", 351, Rarity.RARE, mage.cards.r.RedcapGutterDweller.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Redcap Thief", 147, Rarity.COMMON, mage.cards.r.RedcapThief.class)); cards.add(new SetCardInfo("Redtooth Genealogist", 179, Rarity.COMMON, mage.cards.r.RedtoothGenealogist.class)); cards.add(new SetCardInfo("Redtooth Vanguard", 180, Rarity.UNCOMMON, mage.cards.r.RedtoothVanguard.class)); - cards.add(new SetCardInfo("Regal Bunnicorn", 25, Rarity.RARE, mage.cards.r.RegalBunnicorn.class)); - cards.add(new SetCardInfo("Restless Bivouac", 257, Rarity.RARE, mage.cards.r.RestlessBivouac.class)); - cards.add(new SetCardInfo("Restless Cottage", 258, Rarity.RARE, mage.cards.r.RestlessCottage.class)); - cards.add(new SetCardInfo("Restless Fortress", 259, Rarity.RARE, mage.cards.r.RestlessFortress.class)); - cards.add(new SetCardInfo("Restless Spire", 260, Rarity.RARE, mage.cards.r.RestlessSpire.class)); - cards.add(new SetCardInfo("Restless Vinestalk", 261, Rarity.RARE, mage.cards.r.RestlessVinestalk.class)); + cards.add(new SetCardInfo("Regal Bunnicorn", 25, Rarity.RARE, mage.cards.r.RegalBunnicorn.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Regal Bunnicorn", 326, Rarity.RARE, mage.cards.r.RegalBunnicorn.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Restless Bivouac", 257, Rarity.RARE, mage.cards.r.RestlessBivouac.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Restless Bivouac", 303, Rarity.RARE, mage.cards.r.RestlessBivouac.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Restless Cottage", 258, Rarity.RARE, mage.cards.r.RestlessCottage.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Restless Cottage", 304, Rarity.RARE, mage.cards.r.RestlessCottage.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Restless Fortress", 259, Rarity.RARE, mage.cards.r.RestlessFortress.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Restless Fortress", 305, Rarity.RARE, mage.cards.r.RestlessFortress.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Restless Spire", 260, Rarity.RARE, mage.cards.r.RestlessSpire.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Restless Spire", 306, Rarity.RARE, mage.cards.r.RestlessSpire.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Restless Vinestalk", 261, Rarity.RARE, mage.cards.r.RestlessVinestalk.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Restless Vinestalk", 307, Rarity.RARE, mage.cards.r.RestlessVinestalk.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Return Triumphant", 26, Rarity.COMMON, mage.cards.r.ReturnTriumphant.class)); cards.add(new SetCardInfo("Return from the Wilds", 181, Rarity.COMMON, mage.cards.r.ReturnFromTheWilds.class)); cards.add(new SetCardInfo("Rimefur Reindeer", 27, Rarity.COMMON, mage.cards.r.RimefurReindeer.class)); cards.add(new SetCardInfo("Rootrider Faun", 182, Rarity.COMMON, mage.cards.r.RootriderFaun.class)); - cards.add(new SetCardInfo("Rotisserie Elemental", 148, Rarity.RARE, mage.cards.r.RotisserieElemental.class)); + cards.add(new SetCardInfo("Rotisserie Elemental", 148, Rarity.RARE, mage.cards.r.RotisserieElemental.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Rotisserie Elemental", 352, Rarity.RARE, mage.cards.r.RotisserieElemental.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Rowan's Grim Search", 104, Rarity.COMMON, mage.cards.r.RowansGrimSearch.class)); - cards.add(new SetCardInfo("Rowan, Scion of War", 211, Rarity.MYTHIC, mage.cards.r.RowanScionOfWar.class)); + cards.add(new SetCardInfo("Rowan, Scion of War", 211, Rarity.MYTHIC, mage.cards.r.RowanScionOfWar.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Rowan, Scion of War", 300, Rarity.MYTHIC, mage.cards.r.RowanScionOfWar.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Rowdy Research", 312, Rarity.UNCOMMON, mage.cards.r.RowdyResearch.class)); cards.add(new SetCardInfo("Royal Treatment", 183, Rarity.UNCOMMON, mage.cards.r.RoyalTreatment.class)); cards.add(new SetCardInfo("Ruby, Daring Tracker", 212, Rarity.UNCOMMON, mage.cards.r.RubyDaringTracker.class)); cards.add(new SetCardInfo("Savior of the Sleeping", 28, Rarity.COMMON, mage.cards.s.SaviorOfTheSleeping.class)); - cards.add(new SetCardInfo("Scalding Viper", 235, Rarity.RARE, mage.cards.s.ScaldingViper.class)); + cards.add(new SetCardInfo("Scalding Viper", 235, Rarity.RARE, mage.cards.s.ScaldingViper.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Scalding Viper", 295, Rarity.RARE, mage.cards.s.ScaldingViper.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Scarecrow Guide", 250, Rarity.COMMON, mage.cards.s.ScarecrowGuide.class)); cards.add(new SetCardInfo("Scream Puff", 105, Rarity.COMMON, mage.cards.s.ScreamPuff.class)); - cards.add(new SetCardInfo("Sentinel of Lost Lore", 184, Rarity.RARE, mage.cards.s.SentinelOfLostLore.class)); + cards.add(new SetCardInfo("Sentinel of Lost Lore", 184, Rarity.RARE, mage.cards.s.SentinelOfLostLore.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Sentinel of Lost Lore", 358, Rarity.RARE, mage.cards.s.SentinelOfLostLore.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Sharae of Numbing Depths", 213, Rarity.UNCOMMON, mage.cards.s.SharaeOfNumbingDepths.class)); cards.add(new SetCardInfo("Shatter the Oath", 106, Rarity.COMMON, mage.cards.s.ShatterTheOath.class)); cards.add(new SetCardInfo("Shrouded Shepherd", 236, Rarity.UNCOMMON, mage.cards.s.ShroudedShepherd.class)); cards.add(new SetCardInfo("Skewer Slinger", 149, Rarity.COMMON, mage.cards.s.SkewerSlinger.class)); cards.add(new SetCardInfo("Skybeast Tracker", 185, Rarity.COMMON, mage.cards.s.SkybeastTracker.class)); - cards.add(new SetCardInfo("Sleep-Cursed Faerie", 66, Rarity.RARE, mage.cards.s.SleepCursedFaerie.class)); - cards.add(new SetCardInfo("Sleight of Hand", 67, Rarity.COMMON, mage.cards.s.SleightOfHand.class)); + cards.add(new SetCardInfo("Sleep-Cursed Faerie", 334, Rarity.RARE, mage.cards.s.SleepCursedFaerie.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Sleep-Cursed Faerie", 66, Rarity.RARE, mage.cards.s.SleepCursedFaerie.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Sleight of Hand", 376, Rarity.COMMON, mage.cards.s.SleightOfHand.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Sleight of Hand", 67, Rarity.COMMON, mage.cards.s.SleightOfHand.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Slumbering Keepguard", 29, Rarity.COMMON, mage.cards.s.SlumberingKeepguard.class)); cards.add(new SetCardInfo("Snaremaster Sprite", 68, Rarity.COMMON, mage.cards.s.SnaremasterSprite.class)); cards.add(new SetCardInfo("Solitary Sanctuary", 30, Rarity.UNCOMMON, mage.cards.s.SolitarySanctuary.class)); - cards.add(new SetCardInfo("Song of Totentanz", 150, Rarity.RARE, mage.cards.s.SongOfTotentanz.class)); + cards.add(new SetCardInfo("Song of Totentanz", 150, Rarity.RARE, mage.cards.s.SongOfTotentanz.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Song of Totentanz", 353, Rarity.RARE, mage.cards.s.SongOfTotentanz.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Soul-Guide Lantern", 251, Rarity.UNCOMMON, mage.cards.s.SoulGuideLantern.class)); - cards.add(new SetCardInfo("Specter of Mortality", 107, Rarity.RARE, mage.cards.s.SpecterOfMortality.class)); + cards.add(new SetCardInfo("Specter of Mortality", 107, Rarity.RARE, mage.cards.s.SpecterOfMortality.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Specter of Mortality", 342, Rarity.RARE, mage.cards.s.SpecterOfMortality.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Spell Stutter", 69, Rarity.COMMON, mage.cards.s.SpellStutter.class)); - cards.add(new SetCardInfo("Spellbook Vendor", 31, Rarity.RARE, mage.cards.s.SpellbookVendor.class)); + cards.add(new SetCardInfo("Spellbook Vendor", 31, Rarity.RARE, mage.cards.s.SpellbookVendor.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Spellbook Vendor", 327, Rarity.RARE, mage.cards.s.SpellbookVendor.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Spellscorn Coven", 237, Rarity.UNCOMMON, mage.cards.s.SpellscornCoven.class)); cards.add(new SetCardInfo("Spider Food", 186, Rarity.COMMON, mage.cards.s.SpiderFood.class)); - cards.add(new SetCardInfo("Spiteful Hexmage", 108, Rarity.RARE, mage.cards.s.SpitefulHexmage.class)); + cards.add(new SetCardInfo("Spiteful Hexmage", 108, Rarity.RARE, mage.cards.s.SpitefulHexmage.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Spiteful Hexmage", 343, Rarity.RARE, mage.cards.s.SpitefulHexmage.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Splashy Spellcaster", 70, Rarity.UNCOMMON, mage.cards.s.SplashySpellcaster.class)); cards.add(new SetCardInfo("Stingblade Assassin", 109, Rarity.COMMON, mage.cards.s.StingbladeAssassin.class)); cards.add(new SetCardInfo("Stockpiling Celebrant", 32, Rarity.COMMON, mage.cards.s.StockpilingCelebrant.class)); @@ -260,7 +329,8 @@ public final class WildsOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Stormkeld Prowler", 71, Rarity.COMMON, mage.cards.s.StormkeldProwler.class)); cards.add(new SetCardInfo("Stormkeld Vanguard", 187, Rarity.UNCOMMON, mage.cards.s.StormkeldVanguard.class)); cards.add(new SetCardInfo("Storyteller Pixie", 313, Rarity.UNCOMMON, mage.cards.s.StorytellerPixie.class)); - cards.add(new SetCardInfo("Stroke of Midnight", 33, Rarity.UNCOMMON, mage.cards.s.StrokeOfMidnight.class)); + cards.add(new SetCardInfo("Stroke of Midnight", 33, Rarity.UNCOMMON, mage.cards.s.StrokeOfMidnight.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Stroke of Midnight", 375, Rarity.UNCOMMON, mage.cards.s.StrokeOfMidnight.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Succumb to the Cold", 72, Rarity.UNCOMMON, mage.cards.s.SuccumbToTheCold.class)); cards.add(new SetCardInfo("Sugar Rush", 110, Rarity.COMMON, mage.cards.s.SugarRush.class)); cards.add(new SetCardInfo("Swamp", 264, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); @@ -268,36 +338,47 @@ public final class WildsOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Swamp", 272, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Sweettooth Witch", 111, Rarity.COMMON, mage.cards.s.SweettoothWitch.class)); cards.add(new SetCardInfo("Syr Armont, the Redeemer", 214, Rarity.UNCOMMON, mage.cards.s.SyrArmontTheRedeemer.class)); - cards.add(new SetCardInfo("Syr Ginger, the Meal Ender", 252, Rarity.RARE, mage.cards.s.SyrGingerTheMealEnder.class)); + cards.add(new SetCardInfo("Syr Ginger, the Meal Ender", 252, Rarity.RARE, mage.cards.s.SyrGingerTheMealEnder.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Syr Ginger, the Meal Ender", 369, Rarity.RARE, mage.cards.s.SyrGingerTheMealEnder.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Taken by Nightmares", 112, Rarity.UNCOMMON, mage.cards.t.TakenByNightmares.class)); - cards.add(new SetCardInfo("Talion's Messenger", 73, Rarity.RARE, mage.cards.t.TalionsMessenger.class)); - cards.add(new SetCardInfo("Talion, the Kindly Lord", 215, Rarity.MYTHIC, mage.cards.t.TalionTheKindlyLord.class)); - cards.add(new SetCardInfo("Tangled Colony", 113, Rarity.RARE, mage.cards.t.TangledColony.class)); - cards.add(new SetCardInfo("Tanglespan Lookout", 188, Rarity.UNCOMMON, mage.cards.t.TanglespanLookout.class)); + cards.add(new SetCardInfo("Talion's Messenger", 335, Rarity.RARE, mage.cards.t.TalionsMessenger.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Talion's Messenger", 73, Rarity.RARE, mage.cards.t.TalionsMessenger.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Talion, the Kindly Lord", 215, Rarity.MYTHIC, mage.cards.t.TalionTheKindlyLord.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Talion, the Kindly Lord", 301, Rarity.MYTHIC, mage.cards.t.TalionTheKindlyLord.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Tangled Colony", 113, Rarity.RARE, mage.cards.t.TangledColony.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Tangled Colony", 344, Rarity.RARE, mage.cards.t.TangledColony.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Tanglespan Lookout", 188, Rarity.UNCOMMON, mage.cards.t.TanglespanLookout.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Tanglespan Lookout", 379, Rarity.UNCOMMON, mage.cards.t.TanglespanLookout.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Tattered Ratter", 152, Rarity.UNCOMMON, mage.cards.t.TatteredRatter.class)); cards.add(new SetCardInfo("Tempest Hart", 238, Rarity.UNCOMMON, mage.cards.t.TempestHart.class)); cards.add(new SetCardInfo("Tenacious Tomeseeker", 74, Rarity.UNCOMMON, mage.cards.t.TenaciousTomeseeker.class)); cards.add(new SetCardInfo("Territorial Witchstalker", 189, Rarity.COMMON, mage.cards.t.TerritorialWitchstalker.class)); cards.add(new SetCardInfo("The Apprentice's Folly", 200, Rarity.RARE, mage.cards.t.TheApprenticesFolly.class)); - cards.add(new SetCardInfo("The End", 87, Rarity.RARE, mage.cards.t.TheEnd.class)); - cards.add(new SetCardInfo("The Goose Mother", 204, Rarity.RARE, mage.cards.t.TheGooseMother.class)); + cards.add(new SetCardInfo("The End", 337, Rarity.RARE, mage.cards.t.TheEnd.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("The End", 87, Rarity.RARE, mage.cards.t.TheEnd.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("The Goose Mother", 204, Rarity.RARE, mage.cards.t.TheGooseMother.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("The Goose Mother", 362, Rarity.RARE, mage.cards.t.TheGooseMother.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("The Huntsman's Redemption", 176, Rarity.RARE, mage.cards.t.TheHuntsmansRedemption.class)); - cards.add(new SetCardInfo("The Irencrag", 248, Rarity.RARE, mage.cards.t.TheIrencrag.class)); + cards.add(new SetCardInfo("The Irencrag", 248, Rarity.RARE, mage.cards.t.TheIrencrag.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("The Irencrag", 368, Rarity.RARE, mage.cards.t.TheIrencrag.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("The Princess Takes Flight", 23, Rarity.UNCOMMON, mage.cards.t.ThePrincessTakesFlight.class)); cards.add(new SetCardInfo("The Witch's Vanity", 119, Rarity.UNCOMMON, mage.cards.t.TheWitchsVanity.class)); cards.add(new SetCardInfo("Threadbind Clique", 239, Rarity.UNCOMMON, mage.cards.t.ThreadbindClique.class)); cards.add(new SetCardInfo("Three Blind Mice", 35, Rarity.RARE, mage.cards.t.ThreeBlindMice.class)); cards.add(new SetCardInfo("Three Bowls of Porridge", 253, Rarity.UNCOMMON, mage.cards.t.ThreeBowlsOfPorridge.class)); - cards.add(new SetCardInfo("Thunderous Debut", 190, Rarity.RARE, mage.cards.t.ThunderousDebut.class)); + cards.add(new SetCardInfo("Thunderous Debut", 190, Rarity.RARE, mage.cards.t.ThunderousDebut.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Thunderous Debut", 359, Rarity.RARE, mage.cards.t.ThunderousDebut.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Titanic Growth", 191, Rarity.COMMON, mage.cards.t.TitanicGrowth.class)); cards.add(new SetCardInfo("Toadstool Admirer", 192, Rarity.COMMON, mage.cards.t.ToadstoolAdmirer.class)); - cards.add(new SetCardInfo("Torch the Tower", 153, Rarity.COMMON, mage.cards.t.TorchTheTower.class)); + cards.add(new SetCardInfo("Torch the Tower", 153, Rarity.COMMON, mage.cards.t.TorchTheTower.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Torch the Tower", 378, Rarity.COMMON, mage.cards.t.TorchTheTower.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Totentanz, Swarm Piper", 216, Rarity.UNCOMMON, mage.cards.t.TotentanzSwarmPiper.class)); cards.add(new SetCardInfo("Tough Cookie", 193, Rarity.UNCOMMON, mage.cards.t.ToughCookie.class)); cards.add(new SetCardInfo("Troublemaker Ouphe", 194, Rarity.COMMON, mage.cards.t.TroublemakerOuphe.class)); cards.add(new SetCardInfo("Troyan, Gutsy Explorer", 217, Rarity.UNCOMMON, mage.cards.t.TroyanGutsyExplorer.class)); - cards.add(new SetCardInfo("Twining Twins", 240, Rarity.RARE, mage.cards.t.TwiningTwins.class)); cards.add(new SetCardInfo("Tuinvale Guide", 36, Rarity.COMMON, mage.cards.t.TuinvaleGuide.class)); + cards.add(new SetCardInfo("Twining Twins", 240, Rarity.RARE, mage.cards.t.TwiningTwins.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Twining Twins", 296, Rarity.RARE, mage.cards.t.TwiningTwins.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Twisted Fealty", 154, Rarity.UNCOMMON, mage.cards.t.TwistedFealty.class)); cards.add(new SetCardInfo("Twisted Sewer-Witch", 114, Rarity.UNCOMMON, mage.cards.t.TwistedSewerWitch.class)); cards.add(new SetCardInfo("Two-Headed Hunter", 155, Rarity.UNCOMMON, mage.cards.t.TwoHeadedHunter.class)); @@ -306,23 +387,32 @@ public final class WildsOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Up the Beanstalk", 195, Rarity.UNCOMMON, mage.cards.u.UpTheBeanstalk.class)); cards.add(new SetCardInfo("Vantress Transmuter", 75, Rarity.COMMON, mage.cards.v.VantressTransmuter.class)); cards.add(new SetCardInfo("Verdant Outrider", 196, Rarity.COMMON, mage.cards.v.VerdantOutrider.class)); - cards.add(new SetCardInfo("Virtue of Courage", 157, Rarity.MYTHIC, mage.cards.v.VirtueOfCourage.class)); - cards.add(new SetCardInfo("Virtue of Knowledge", 76, Rarity.MYTHIC, mage.cards.v.VirtueOfKnowledge.class)); - cards.add(new SetCardInfo("Virtue of Loyalty", 38, Rarity.MYTHIC, mage.cards.v.VirtueOfLoyalty.class)); - cards.add(new SetCardInfo("Virtue of Persistence", 115, Rarity.MYTHIC, mage.cards.v.VirtueOfPersistence.class)); - cards.add(new SetCardInfo("Virtue of Strength", 197, Rarity.MYTHIC, mage.cards.v.VirtueOfStrength.class)); + cards.add(new SetCardInfo("Virtue of Courage", 157, Rarity.MYTHIC, mage.cards.v.VirtueOfCourage.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Virtue of Courage", 282, Rarity.MYTHIC, mage.cards.v.VirtueOfCourage.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Virtue of Knowledge", 279, Rarity.MYTHIC, mage.cards.v.VirtueOfKnowledge.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Virtue of Knowledge", 76, Rarity.MYTHIC, mage.cards.v.VirtueOfKnowledge.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Virtue of Loyalty", 277, Rarity.MYTHIC, mage.cards.v.VirtueOfLoyalty.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Virtue of Loyalty", 38, Rarity.MYTHIC, mage.cards.v.VirtueOfLoyalty.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Virtue of Persistence", 115, Rarity.MYTHIC, mage.cards.v.VirtueOfPersistence.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Virtue of Persistence", 281, Rarity.MYTHIC, mage.cards.v.VirtueOfPersistence.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Virtue of Strength", 197, Rarity.MYTHIC, mage.cards.v.VirtueOfStrength.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Virtue of Strength", 284, Rarity.MYTHIC, mage.cards.v.VirtueOfStrength.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Voracious Vermin", 116, Rarity.COMMON, mage.cards.v.VoraciousVermin.class)); cards.add(new SetCardInfo("Warehouse Tabby", 117, Rarity.COMMON, mage.cards.w.WarehouseTabby.class)); cards.add(new SetCardInfo("Water Wings", 77, Rarity.COMMON, mage.cards.w.WaterWings.class)); cards.add(new SetCardInfo("Welcome to Sweettooth", 198, Rarity.UNCOMMON, mage.cards.w.WelcomeToSweettooth.class)); - cards.add(new SetCardInfo("Werefox Bodyguard", 39, Rarity.RARE, mage.cards.w.WerefoxBodyguard.class)); + cards.add(new SetCardInfo("Werefox Bodyguard", 329, Rarity.RARE, mage.cards.w.WerefoxBodyguard.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Werefox Bodyguard", 39, Rarity.RARE, mage.cards.w.WerefoxBodyguard.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Wicked Visitor", 118, Rarity.COMMON, mage.cards.w.WickedVisitor.class)); - cards.add(new SetCardInfo("Wildwood Mentor", 322, Rarity.RARE, mage.cards.w.WildwoodMentor.class)); - cards.add(new SetCardInfo("Will, Scion of Peace", 218, Rarity.MYTHIC, mage.cards.w.WillScionOfPeace.class)); + cards.add(new SetCardInfo("Wildwood Mentor", 322, Rarity.RARE, mage.cards.w.WildwoodMentor.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Wildwood Mentor", 374, Rarity.RARE, mage.cards.w.WildwoodMentor.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Will, Scion of Peace", 218, Rarity.MYTHIC, mage.cards.w.WillScionOfPeace.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Will, Scion of Peace", 302, Rarity.MYTHIC, mage.cards.w.WillScionOfPeace.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Witch's Mark", 158, Rarity.COMMON, mage.cards.w.WitchsMark.class)); cards.add(new SetCardInfo("Witchstalker Frenzy", 159, Rarity.UNCOMMON, mage.cards.w.WitchstalkerFrenzy.class)); cards.add(new SetCardInfo("Woodland Acolyte", 241, Rarity.UNCOMMON, mage.cards.w.WoodlandAcolyte.class)); - cards.add(new SetCardInfo("Yenna, Redtooth Regent", 219, Rarity.RARE, mage.cards.y.YennaRedtoothRegent.class)); + cards.add(new SetCardInfo("Yenna, Redtooth Regent", 219, Rarity.RARE, mage.cards.y.YennaRedtoothRegent.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Yenna, Redtooth Regent", 365, Rarity.RARE, mage.cards.y.YennaRedtoothRegent.class, NON_FULL_USE_VARIOUS)); } @Override From c5deb3d3bab7b811c780dcae44ec6d26f1f57403 Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Thu, 31 Aug 2023 19:15:01 +0400 Subject: [PATCH 33/36] [NEO] Planar Incision - fixed game error on usage (NPE error) --- Mage.Sets/src/mage/cards/p/PlanarIncision.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Mage.Sets/src/mage/cards/p/PlanarIncision.java b/Mage.Sets/src/mage/cards/p/PlanarIncision.java index 8dc6ceab064..2a5e7af8dc6 100644 --- a/Mage.Sets/src/mage/cards/p/PlanarIncision.java +++ b/Mage.Sets/src/mage/cards/p/PlanarIncision.java @@ -70,12 +70,14 @@ class PlanarIncisionEffect extends OneShotEffect { && controller != null) { UUID exileId = CardUtil.getExileZoneId("planarIncisionExile" + source.toString(), game); if (controller.moveCardsToExile(permanent, source, game, true, exileId, "")) { - Card exiledCard = game.getExile().getExileZone(exileId).get(permanent.getId(), game); - if (exiledCard != null) { - Counters countersToAdd = new Counters(); - countersToAdd.addCounter(CounterType.P1P1.createInstance()); - game.setEnterWithCounters(exiledCard.getId(), countersToAdd); - return controller.moveCards(exiledCard, Zone.BATTLEFIELD, source, game, false, false, true, null); + if (game.getExile().getExileZone(exileId) != null) { + Card exiledCard = game.getExile().getExileZone(exileId).get(permanent.getId(), game); + if (exiledCard != null) { + Counters countersToAdd = new Counters(); + countersToAdd.addCounter(CounterType.P1P1.createInstance()); + game.setEnterWithCounters(exiledCard.getId(), countersToAdd); + return controller.moveCards(exiledCard, Zone.BATTLEFIELD, source, game, false, false, true, null); + } } } } From e3229d7eaba80fd216e012540d96f3162700b19d Mon Sep 17 00:00:00 2001 From: Oleg Agafonov Date: Thu, 31 Aug 2023 19:38:37 +0400 Subject: [PATCH 34/36] refactor: use same code style in library's methods --- Mage/src/main/java/mage/players/Library.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Mage/src/main/java/mage/players/Library.java b/Mage/src/main/java/mage/players/Library.java index 36798050c4b..1ce50eaf77c 100644 --- a/Mage/src/main/java/mage/players/Library.java +++ b/Mage/src/main/java/mage/players/Library.java @@ -103,6 +103,7 @@ public class Library implements Serializable { public void putOnTop(Card card, Game game) { if (card.isOwnedBy(playerId)) { card.setZone(Zone.LIBRARY, game); + library.remove(card.getId()); library.addFirst(card.getId()); } else { game.getPlayer(card.getOwnerId()).getLibrary().putOnTop(card, game); @@ -146,13 +147,6 @@ public class Library implements Serializable { return library.size(); } - public void set(Library newLibrary) { - library.clear(); - for (UUID card : newLibrary.getCardList()) { - library.add(card); - } - } - public List getCardList() { return new ArrayList<>(library); } @@ -202,8 +196,10 @@ public class Library implements Serializable { } public void addAll(Set cards, Game game) { + // put on bottom for (Card card : cards) { card.setZone(Zone.LIBRARY, game); + library.remove(card.getId()); library.add(card.getId()); } } From 2f0c1d84c53979420c2d2f1852aeac7b36b25ee5 Mon Sep 17 00:00:00 2001 From: arcox <10953229+arcox@users.noreply.github.com> Date: Thu, 31 Aug 2023 13:42:45 -0400 Subject: [PATCH 35/36] Lint: fix 'declarations should use interfaces instead of classes' bugs (#11082) --- .../java/mage/client/components/ext/dlg/DlgParams.java | 9 ++++++--- .../src/mage/player/human/HumanPlayer.java | 8 ++++---- .../main/java/mage/server/draft/DraftController.java | 2 +- Mage.Sets/src/mage/cards/f/FatalGrudge.java | 5 +++-- .../src/test/java/org/mage/test/player/TestPlayer.java | 2 +- .../main/java/mage/verify/mtgjson/MtgJsonService.java | 8 ++++---- .../common/EquippedHasSupertypeCondition.java | 5 +++-- Mage/src/main/java/mage/players/Player.java | 2 +- Mage/src/main/java/mage/players/PlayerImpl.java | 6 +++--- Mage/src/main/java/mage/util/ManaUtil.java | 10 +++++----- 10 files changed, 31 insertions(+), 26 deletions(-) diff --git a/Mage.Client/src/main/java/mage/client/components/ext/dlg/DlgParams.java b/Mage.Client/src/main/java/mage/client/components/ext/dlg/DlgParams.java index b09a7a72b92..c2497482c71 100644 --- a/Mage.Client/src/main/java/mage/client/components/ext/dlg/DlgParams.java +++ b/Mage.Client/src/main/java/mage/client/components/ext/dlg/DlgParams.java @@ -7,7 +7,10 @@ import mage.util.CardUtil; import mage.view.CardsView; import java.awt.*; -import java.util.*; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; +import java.util.UUID; /** * GUI: parameters for dialogs, uses to store useful data @@ -102,7 +105,7 @@ public class DlgParams { return stringList; } - public void setStringList(ArrayList stringList) { + public void setStringList(List stringList) { this.stringList = stringList; } @@ -118,7 +121,7 @@ public class DlgParams { return objectList; } - public void setObjectList(ArrayList objectList) { + public void setObjectList(List objectList) { this.objectList = objectList; } diff --git a/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java b/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java index f0d57b9e4eb..c66b25f6542 100644 --- a/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java +++ b/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java @@ -1213,7 +1213,7 @@ public class HumanPlayer extends PlayerImpl { Zone zone = game.getState().getZone(object.getId()); if (zone != null) { // look at card or try to cast/activate abilities - LinkedHashMap useableAbilities = new LinkedHashMap<>(); + Map useableAbilities = new LinkedHashMap<>(); Player actingPlayer = null; if (playerId.equals(game.getPriorityPlayerId())) { @@ -1559,7 +1559,7 @@ public class HumanPlayer extends PlayerImpl { Zone zone = game.getState().getZone(object.getId()); if (zone != null) { - LinkedHashMap useableAbilities = getUseableManaAbilities(object, zone, game); + Map useableAbilities = getUseableManaAbilities(object, zone, game); if (!useableAbilities.isEmpty()) { // Added to ensure that mana is not being autopaid for spells that care about the color of mana being paid // See https://github.com/magefree/mage/issues/9070 @@ -2164,7 +2164,7 @@ public class HumanPlayer extends PlayerImpl { return super.activateAbility(ability, game); } - protected void activateAbility(LinkedHashMap abilities, MageObject object, Game game) { + protected void activateAbility(Map abilities, MageObject object, Game game) { if (gameInCheckPlayableState(game)) { return; } @@ -2268,7 +2268,7 @@ public class HumanPlayer extends PlayerImpl { MageObject object = game.getObject(card.getId()); // must be object to find real abilities (example: commander) if (object != null) { String message = "Choose ability to cast" + (noMana ? " for FREE" : "") + "
" + object.getLogName(); - LinkedHashMap useableAbilities = PlayerImpl.getCastableSpellAbilities(game, playerId, object, game.getState().getZone(object.getId()), noMana); + Map useableAbilities = PlayerImpl.getCastableSpellAbilities(game, playerId, object, game.getState().getZone(object.getId()), noMana); if (useableAbilities != null && useableAbilities.size() == 1) { return useableAbilities.values().iterator().next(); diff --git a/Mage.Server/src/main/java/mage/server/draft/DraftController.java b/Mage.Server/src/main/java/mage/server/draft/DraftController.java index bf60355656e..7fecbb36a73 100644 --- a/Mage.Server/src/main/java/mage/server/draft/DraftController.java +++ b/Mage.Server/src/main/java/mage/server/draft/DraftController.java @@ -33,7 +33,7 @@ public class DraftController { private final Draft draft; private final UUID tableId; - public DraftController(ManagerFactory managerFactory, Draft draft, ConcurrentHashMap userPlayerMap, UUID tableId) { + public DraftController(ManagerFactory managerFactory, Draft draft, ConcurrentMap userPlayerMap, UUID tableId) { this.managerFactory = managerFactory; draftSessionId = UUID.randomUUID(); this.userPlayerMap = userPlayerMap; diff --git a/Mage.Sets/src/mage/cards/f/FatalGrudge.java b/Mage.Sets/src/mage/cards/f/FatalGrudge.java index e56f3b5ec0d..5a6e664fb82 100644 --- a/Mage.Sets/src/mage/cards/f/FatalGrudge.java +++ b/Mage.Sets/src/mage/cards/f/FatalGrudge.java @@ -1,6 +1,7 @@ package mage.cards.f; import java.util.HashSet; +import java.util.Set; import java.util.UUID; import mage.MageObject; @@ -95,9 +96,9 @@ class FatalGrudgeEffect extends OneShotEffect { class FatalGrudgePredicate implements Predicate { - private final HashSet types; + private final Set types; - public FatalGrudgePredicate(HashSet types) { + public FatalGrudgePredicate(Set types) { this.types = types; } diff --git a/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java b/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java index fd708a96011..8fd88c75bb4 100644 --- a/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java +++ b/Mage.Tests/src/test/java/org/mage/test/player/TestPlayer.java @@ -3209,7 +3209,7 @@ public class TestPlayer implements Player { } @Override - public LinkedHashMap getPlayableActivatedAbilities(MageObject object, Zone zone, Game game) { + public Map getPlayableActivatedAbilities(MageObject object, Zone zone, Game game) { return computerPlayer.getPlayableActivatedAbilities(object, zone, game); } diff --git a/Mage.Verify/src/main/java/mage/verify/mtgjson/MtgJsonService.java b/Mage.Verify/src/main/java/mage/verify/mtgjson/MtgJsonService.java index 1e38c861cba..a9c47771b21 100644 --- a/Mage.Verify/src/main/java/mage/verify/mtgjson/MtgJsonService.java +++ b/Mage.Verify/src/main/java/mage/verify/mtgjson/MtgJsonService.java @@ -144,15 +144,15 @@ public final class MtgJsonService { private static final class AtomicCardsModel { - // list by card names, each name can havem multiple cards (two faces, different cards with same name from un-sets) - public HashMap> data; + // list by card names, each name can have multiple cards (two faces, different cards with same name from un-sets) + public Map> data; private boolean containsSameNames(ArrayList list) { Set names = list.stream().map(MtgJsonCard::getNameAsFace).collect(Collectors.toSet()); return names.size() == 1; } - public HashMap prepareIndex() { + public Map prepareIndex() { HashMap index = new HashMap<>(); for (Map.Entry> rec : data.entrySet()) { if (rec.getValue().size() == 1) { @@ -179,7 +179,7 @@ public final class MtgJsonService { } private static final class AllPrintingsModel { - public HashMap data; + public Map data; public MtgJsonMetadata meta; } diff --git a/Mage/src/main/java/mage/abilities/condition/common/EquippedHasSupertypeCondition.java b/Mage/src/main/java/mage/abilities/condition/common/EquippedHasSupertypeCondition.java index 14c47d9e463..32fc1fe93b3 100644 --- a/Mage/src/main/java/mage/abilities/condition/common/EquippedHasSupertypeCondition.java +++ b/Mage/src/main/java/mage/abilities/condition/common/EquippedHasSupertypeCondition.java @@ -9,6 +9,7 @@ import mage.game.Game; import mage.game.permanent.Permanent; import java.util.EnumSet; +import java.util.Set; /** * @@ -18,13 +19,13 @@ import java.util.EnumSet; public class EquippedHasSupertypeCondition implements Condition { private SuperType superType; - private EnumSet superTypes = EnumSet.noneOf(SuperType.class); // scope = Any + private Set superTypes = EnumSet.noneOf(SuperType.class); // scope = Any public EquippedHasSupertypeCondition(SuperType supertype) { this.superType = supertype; } - public EquippedHasSupertypeCondition(EnumSet superTypes) { + public EquippedHasSupertypeCondition(Set superTypes) { this.superTypes = superTypes; } diff --git a/Mage/src/main/java/mage/players/Player.java b/Mage/src/main/java/mage/players/Player.java index d3faa9c7a4b..b4914d502b1 100644 --- a/Mage/src/main/java/mage/players/Player.java +++ b/Mage/src/main/java/mage/players/Player.java @@ -811,7 +811,7 @@ public interface Player extends MageItem, Copyable { PlayableObjectsList getPlayableObjects(Game game, Zone zone); - LinkedHashMap getPlayableActivatedAbilities(MageObject object, Zone zone, Game game); + Map getPlayableActivatedAbilities(MageObject object, Zone zone, Game game); boolean addCounters(Counter counter, UUID playerAddingCounters, Ability source, Game game); diff --git a/Mage/src/main/java/mage/players/PlayerImpl.java b/Mage/src/main/java/mage/players/PlayerImpl.java index 22650d8fae3..4096754feaa 100644 --- a/Mage/src/main/java/mage/players/PlayerImpl.java +++ b/Mage/src/main/java/mage/players/PlayerImpl.java @@ -1534,7 +1534,7 @@ public abstract class PlayerImpl implements Player, Serializable { * @param noMana * @return */ - public static LinkedHashMap getCastableSpellAbilities(Game game, UUID playerId, MageObject object, Zone zone, boolean noMana) { + public static Map getCastableSpellAbilities(Game game, UUID playerId, MageObject object, Zone zone, boolean noMana) { // it uses simple check from spellCanBeActivatedRegularlyNow // reason: no approved info here (e.g. forced to choose spell ability from cast card) LinkedHashMap useable = new LinkedHashMap<>(); @@ -1607,7 +1607,7 @@ public abstract class PlayerImpl implements Player, Serializable { } @Override - public LinkedHashMap getPlayableActivatedAbilities(MageObject object, Zone zone, Game game) { + public Map getPlayableActivatedAbilities(MageObject object, Zone zone, Game game) { LinkedHashMap useable = new LinkedHashMap<>(); // stack abilities - can't activate anything // spell ability - can activate additional abilities (example: "Lightning Storm") @@ -1634,7 +1634,7 @@ public abstract class PlayerImpl implements Player, Serializable { return useable; } - protected LinkedHashMap getUseableManaAbilities(MageObject object, Zone zone, Game game) { + protected Map getUseableManaAbilities(MageObject object, Zone zone, Game game) { LinkedHashMap useable = new LinkedHashMap<>(); boolean canUse = !(object instanceof Permanent) || ((Permanent) object).canUseActivatedAbilities(game); for (ActivatedManaAbilityImpl ability : object.getAbilities().getActivatedManaAbilities(zone)) { diff --git a/Mage/src/main/java/mage/util/ManaUtil.java b/Mage/src/main/java/mage/util/ManaUtil.java index 94a660ff976..c06536acc49 100644 --- a/Mage/src/main/java/mage/util/ManaUtil.java +++ b/Mage/src/main/java/mage/util/ManaUtil.java @@ -62,10 +62,10 @@ public final class ManaUtil { * * @param unpaid Mana we need to pay. Can be null (it is for X costs now). * @param useableAbilities List of mana abilities permanent may produce - * @return List of mana abilities permanent may produce and are reasonable + * @return Map of mana abilities permanent may produce and are reasonable * for unpaid mana */ - public static LinkedHashMap tryToAutoPay(ManaCost unpaid, LinkedHashMap useableAbilities) { + public static Map tryToAutoPay(ManaCost unpaid, Map useableAbilities) { // first check if we have only basic mana abilities for (ActivatedManaAbilityImpl ability : useableAbilities.values()) { @@ -141,7 +141,7 @@ public final class ManaUtil { return false; } - private static LinkedHashMap getManaAbilitiesUsingManaSymbols(LinkedHashMap useableAbilities, ManaSymbols symbols, Mana unpaidMana) { + private static Map getManaAbilitiesUsingManaSymbols(Map useableAbilities, ManaSymbols symbols, Mana unpaidMana) { Set countColored = new HashSet<>(); ActivatedManaAbilityImpl chosenManaAbility = null; @@ -355,7 +355,7 @@ public final class ManaUtil { * @param useableAbilities * @return */ - private static LinkedHashMap getManaAbilitiesUsingMana(ManaCost unpaid, LinkedHashMap useableAbilities) { + private static Map getManaAbilitiesUsingMana(ManaCost unpaid, Map useableAbilities) { Mana mana = unpaid.getMana(); int countColorfull = 0; @@ -408,7 +408,7 @@ public final class ManaUtil { return replace(useableAbilities, chosenManaAbility); } - private static LinkedHashMap replace(LinkedHashMap useableAbilities, ActivatedManaAbilityImpl chosenManaAbility) { + private static Map replace(Map useableAbilities, ActivatedManaAbilityImpl chosenManaAbility) { // modify the map with the chosen mana ability useableAbilities.clear(); useableAbilities.put(chosenManaAbility.getId(), chosenManaAbility); From e70fedeaef77e68bfddbc9463090481828adf50b Mon Sep 17 00:00:00 2001 From: theelk801 Date: Thu, 31 Aug 2023 17:57:41 -0400 Subject: [PATCH 36/36] [WOC] Implement Court of Vantress --- .../src/mage/cards/c/CourtOfVantress.java | 112 ++++++++++++++++++ .../mage/sets/WildsOfEldraineCommander.java | 1 + 2 files changed, 113 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/c/CourtOfVantress.java diff --git a/Mage.Sets/src/mage/cards/c/CourtOfVantress.java b/Mage.Sets/src/mage/cards/c/CourtOfVantress.java new file mode 100644 index 00000000000..5ed183df876 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CourtOfVantress.java @@ -0,0 +1,112 @@ +package mage.cards.c; + +import mage.MageObject; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.BecomesMonarchSourceEffect; +import mage.abilities.effects.common.CreateTokenCopyTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterArtifactOrEnchantmentPermanent; +import mage.filter.predicate.mageobject.AnotherPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; +import mage.target.TargetPermanent; +import mage.util.functions.CopyApplier; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class CourtOfVantress extends CardImpl { + + private static final FilterPermanent filter + = new FilterArtifactOrEnchantmentPermanent("other target enchantment or artifact"); + + static { + filter.add(AnotherPredicate.instance); + } + + public CourtOfVantress(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}{U}"); + + // When Court of Vantress enters the battlefield, you become the monarch. + this.addAbility(new EntersBattlefieldTriggeredAbility(new BecomesMonarchSourceEffect())); + + // At the beginning of your upkeep, choose up to one other target enchantment or artifact. If you're the monarch, you may create a token that's a copy of it. If you're not the monarch, you may have Court of Vantress become a copy of it, except it has this ability. + this.addAbility(makeAbility()); + } + + private CourtOfVantress(final CourtOfVantress card) { + super(card); + } + + @Override + public CourtOfVantress copy() { + return new CourtOfVantress(this); + } + + static Ability makeAbility() { + Ability ability = new BeginningOfUpkeepTriggeredAbility( + new CourtOfVantressEffect(), TargetController.YOU, false + ); + ability.addTarget(new TargetPermanent(0, 1, filter)); + return ability; + } +} + +class CourtOfVantressEffect extends OneShotEffect { + + private static final CopyApplier applier = new CopyApplier() { + @Override + public boolean apply(Game game, MageObject blueprint, Ability source, UUID targetObjectId) { + blueprint.getAbilities().add(CourtOfVantress.makeAbility()); + return true; + } + }; + + CourtOfVantressEffect() { + super(Outcome.Benefit); + staticText = "choose up to one other target enchantment or artifact. If you're the monarch, " + + "you may create a token that's a copy of it. If you're not the monarch, " + + "you may have {this} become a copy of it, except it has this ability"; + } + + private CourtOfVantressEffect(final CourtOfVantressEffect effect) { + super(effect); + } + + @Override + public CourtOfVantressEffect copy() { + return new CourtOfVantressEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source)); + if (player == null || permanent == null) { + return false; + } + if (source.isControlledBy(game.getMonarchId())) { + return player.chooseUse(outcome, "Create a token copy of " + permanent.getIdName() + '?', source, game) + && new CreateTokenCopyTargetEffect().setSavedPermanent(permanent).apply(game, source); + } + Permanent sourcePermanent = source.getSourcePermanentIfItStillExists(game); + if (sourcePermanent == null || !player.chooseUse(outcome, "Have " + sourcePermanent.getIdName() + + " become a copy of " + permanent.getIdName() + '?', source, game)) { + return false; + } + game.copyPermanent(Duration.Custom, permanent, sourcePermanent.getId(), source, applier); + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/WildsOfEldraineCommander.java b/Mage.Sets/src/mage/sets/WildsOfEldraineCommander.java index e06b89b908d..ead6be7f88b 100644 --- a/Mage.Sets/src/mage/sets/WildsOfEldraineCommander.java +++ b/Mage.Sets/src/mage/sets/WildsOfEldraineCommander.java @@ -42,6 +42,7 @@ public final class WildsOfEldraineCommander extends ExpansionSet { cards.add(new SetCardInfo("Command Tower", 156, Rarity.COMMON, mage.cards.c.CommandTower.class)); cards.add(new SetCardInfo("Consider", 87, Rarity.COMMON, mage.cards.c.Consider.class)); cards.add(new SetCardInfo("Court of Ardenvale", 21, Rarity.RARE, mage.cards.c.CourtOfArdenvale.class)); + cards.add(new SetCardInfo("Court of Vantress", 22, Rarity.RARE, mage.cards.c.CourtOfVantress.class)); cards.add(new SetCardInfo("Danitha Capashen, Paragon", 64, Rarity.UNCOMMON, mage.cards.d.DanithaCapashenParagon.class)); cards.add(new SetCardInfo("Darkwater Catacombs", 157, Rarity.RARE, mage.cards.d.DarkwaterCatacombs.class)); cards.add(new SetCardInfo("Daybreak Coronet", 65, Rarity.RARE, mage.cards.d.DaybreakCoronet.class));