Remove unneeded parameter from StackObjectCopyApplier.getNextNewTargetType (all users were using an Iterator or a fixed return value)

This commit is contained in:
Alex W. Jackson 2022-09-14 03:23:21 -04:00
parent c401b35b63
commit efa7b485b0
10 changed files with 10 additions and 10 deletions

View file

@ -205,7 +205,7 @@ class BeamsplitterMageApplier implements StackObjectCopyApplier {
}
@Override
public MageObjectReferencePredicate getNextNewTargetType(int copyNumber) {
public MageObjectReferencePredicate getNextNewTargetType() {
return morPredicate;
}
}

View file

@ -142,7 +142,7 @@ class ChefsKissApplier implements StackObjectCopyApplier {
}
@Override
public MageObjectReferencePredicate getNextNewTargetType(int copyNumber) {
public MageObjectReferencePredicate getNextNewTargetType() {
if (predicate.hasNext()) {
return predicate.next();
}

View file

@ -113,7 +113,7 @@ enum DonalHeraldOfWingsApplier implements StackObjectCopyApplier {
}
@Override
public MageObjectReferencePredicate getNextNewTargetType(int copyNumber) {
public MageObjectReferencePredicate getNextNewTargetType() {
return null;
}
}

View file

@ -87,7 +87,7 @@ enum DoubleMajorApplier implements StackObjectCopyApplier {
}
@Override
public MageObjectReferencePredicate getNextNewTargetType(int copyNumber) {
public MageObjectReferencePredicate getNextNewTargetType() {
return null;
}
}

View file

@ -80,7 +80,7 @@ enum ForkApplier implements StackObjectCopyApplier {
}
@Override
public MageObjectReferencePredicate getNextNewTargetType(int copyNumber) {
public MageObjectReferencePredicate getNextNewTargetType() {
return null;
}
}

View file

@ -108,7 +108,7 @@ class IvyGleefulSpellthiefEffect extends OneShotEffect {
}
@Override
public MageObjectReferencePredicate getNextNewTargetType(int copyNumber) {
public MageObjectReferencePredicate getNextNewTargetType() {
return morPredicate;
}
}

View file

@ -174,7 +174,7 @@ class ObNixilisTheAdversaryApplier implements StackObjectCopyApplier {
}
@Override
public MageObjectReferencePredicate getNextNewTargetType(int copyNumber) {
public MageObjectReferencePredicate getNextNewTargetType() {
return null;
}
}

View file

@ -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();
}

View file

@ -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";

View file

@ -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();
}