From efa7b485b09b4d0ebb06fabb685e99faa5dfeae8 Mon Sep 17 00:00:00 2001 From: "Alex W. Jackson" Date: Wed, 14 Sep 2022 03:23:21 -0400 Subject: [PATCH] Remove unneeded parameter from StackObjectCopyApplier.getNextNewTargetType (all users were using an Iterator or a fixed return value) --- Mage.Sets/src/mage/cards/b/BeamsplitterMage.java | 2 +- Mage.Sets/src/mage/cards/c/ChefsKiss.java | 2 +- Mage.Sets/src/mage/cards/d/DonalHeraldOfWings.java | 2 +- Mage.Sets/src/mage/cards/d/DoubleMajor.java | 2 +- Mage.Sets/src/mage/cards/f/Fork.java | 2 +- Mage.Sets/src/mage/cards/i/IvyGleefulSpellthief.java | 2 +- Mage.Sets/src/mage/cards/o/ObNixilisTheAdversary.java | 2 +- .../effects/common/CopySpellForEachItCouldTargetEffect.java | 2 +- Mage/src/main/java/mage/game/stack/StackObjectImpl.java | 2 +- .../main/java/mage/util/functions/StackObjectCopyApplier.java | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Mage.Sets/src/mage/cards/b/BeamsplitterMage.java b/Mage.Sets/src/mage/cards/b/BeamsplitterMage.java index b8e5c8f566..6555fa016d 100644 --- a/Mage.Sets/src/mage/cards/b/BeamsplitterMage.java +++ b/Mage.Sets/src/mage/cards/b/BeamsplitterMage.java @@ -205,7 +205,7 @@ class BeamsplitterMageApplier implements StackObjectCopyApplier { } @Override - public MageObjectReferencePredicate getNextNewTargetType(int copyNumber) { + public MageObjectReferencePredicate getNextNewTargetType() { return morPredicate; } } diff --git a/Mage.Sets/src/mage/cards/c/ChefsKiss.java b/Mage.Sets/src/mage/cards/c/ChefsKiss.java index 8f6438b92c..f55b8eb06d 100644 --- a/Mage.Sets/src/mage/cards/c/ChefsKiss.java +++ b/Mage.Sets/src/mage/cards/c/ChefsKiss.java @@ -142,7 +142,7 @@ class ChefsKissApplier implements StackObjectCopyApplier { } @Override - public MageObjectReferencePredicate getNextNewTargetType(int copyNumber) { + public MageObjectReferencePredicate getNextNewTargetType() { if (predicate.hasNext()) { return predicate.next(); } diff --git a/Mage.Sets/src/mage/cards/d/DonalHeraldOfWings.java b/Mage.Sets/src/mage/cards/d/DonalHeraldOfWings.java index c4aac13c92..8751955fe3 100644 --- a/Mage.Sets/src/mage/cards/d/DonalHeraldOfWings.java +++ b/Mage.Sets/src/mage/cards/d/DonalHeraldOfWings.java @@ -113,7 +113,7 @@ enum DonalHeraldOfWingsApplier implements StackObjectCopyApplier { } @Override - public MageObjectReferencePredicate getNextNewTargetType(int copyNumber) { + public MageObjectReferencePredicate getNextNewTargetType() { return null; } } diff --git a/Mage.Sets/src/mage/cards/d/DoubleMajor.java b/Mage.Sets/src/mage/cards/d/DoubleMajor.java index f88df80806..d3eeffce9c 100644 --- a/Mage.Sets/src/mage/cards/d/DoubleMajor.java +++ b/Mage.Sets/src/mage/cards/d/DoubleMajor.java @@ -87,7 +87,7 @@ enum DoubleMajorApplier implements StackObjectCopyApplier { } @Override - public MageObjectReferencePredicate getNextNewTargetType(int copyNumber) { + public MageObjectReferencePredicate getNextNewTargetType() { return null; } } diff --git a/Mage.Sets/src/mage/cards/f/Fork.java b/Mage.Sets/src/mage/cards/f/Fork.java index 6a6be29273..2d4b59e551 100644 --- a/Mage.Sets/src/mage/cards/f/Fork.java +++ b/Mage.Sets/src/mage/cards/f/Fork.java @@ -80,7 +80,7 @@ enum ForkApplier implements StackObjectCopyApplier { } @Override - public MageObjectReferencePredicate getNextNewTargetType(int copyNumber) { + public MageObjectReferencePredicate getNextNewTargetType() { return null; } } diff --git a/Mage.Sets/src/mage/cards/i/IvyGleefulSpellthief.java b/Mage.Sets/src/mage/cards/i/IvyGleefulSpellthief.java index b91e285234..db6d9658d6 100644 --- a/Mage.Sets/src/mage/cards/i/IvyGleefulSpellthief.java +++ b/Mage.Sets/src/mage/cards/i/IvyGleefulSpellthief.java @@ -108,7 +108,7 @@ class IvyGleefulSpellthiefEffect extends OneShotEffect { } @Override - public MageObjectReferencePredicate getNextNewTargetType(int copyNumber) { + public MageObjectReferencePredicate getNextNewTargetType() { return morPredicate; } } diff --git a/Mage.Sets/src/mage/cards/o/ObNixilisTheAdversary.java b/Mage.Sets/src/mage/cards/o/ObNixilisTheAdversary.java index 7516f32be3..70d368c792 100644 --- a/Mage.Sets/src/mage/cards/o/ObNixilisTheAdversary.java +++ b/Mage.Sets/src/mage/cards/o/ObNixilisTheAdversary.java @@ -174,7 +174,7 @@ class ObNixilisTheAdversaryApplier implements StackObjectCopyApplier { } @Override - public MageObjectReferencePredicate getNextNewTargetType(int copyNumber) { + public MageObjectReferencePredicate getNextNewTargetType() { return null; } } diff --git a/Mage/src/main/java/mage/abilities/effects/common/CopySpellForEachItCouldTargetEffect.java b/Mage/src/main/java/mage/abilities/effects/common/CopySpellForEachItCouldTargetEffect.java index 6234633886..0ccc9a2edf 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/CopySpellForEachItCouldTargetEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/CopySpellForEachItCouldTargetEffect.java @@ -30,7 +30,7 @@ public abstract class CopySpellForEachItCouldTargetEffect extends OneShotEffect } @Override - public MageObjectReferencePredicate getNextNewTargetType(int copyNumber) { + public MageObjectReferencePredicate getNextNewTargetType() { if (newTargetTypes.hasNext()) { return newTargetTypes.next(); } diff --git a/Mage/src/main/java/mage/game/stack/StackObjectImpl.java b/Mage/src/main/java/mage/game/stack/StackObjectImpl.java index 3acdd809b5..a3a2c486e3 100644 --- a/Mage/src/main/java/mage/game/stack/StackObjectImpl.java +++ b/Mage/src/main/java/mage/game/stack/StackObjectImpl.java @@ -88,7 +88,7 @@ public abstract class StackObjectImpl implements StackObject { newTargetTypes = new HashMap<>(); for (int i = 0; i < amount; i++) { - MageObjectReferencePredicate newTargetType = applier.getNextNewTargetType(i + 1); + MageObjectReferencePredicate newTargetType = applier.getNextNewTargetType(); if (newTargetType == null) { currentAnyTargetNumber++; String message = "Any target"; diff --git a/Mage/src/main/java/mage/util/functions/StackObjectCopyApplier.java b/Mage/src/main/java/mage/util/functions/StackObjectCopyApplier.java index c24f6bc366..c16045f041 100644 --- a/Mage/src/main/java/mage/util/functions/StackObjectCopyApplier.java +++ b/Mage/src/main/java/mage/util/functions/StackObjectCopyApplier.java @@ -20,5 +20,5 @@ public interface StackObjectCopyApplier extends Serializable { * @param copyNumber current number of copy, starts with 1 * @return */ - MageObjectReferencePredicate getNextNewTargetType(int copyNumber); + MageObjectReferencePredicate getNextNewTargetType(); }