mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Fix Beamsplitter Mage and Ivy interaction with Twinning Staff
This commit is contained in:
parent
efa7b485b0
commit
a301394dd8
2 changed files with 13 additions and 8 deletions
|
@ -1,7 +1,6 @@
|
|||
package mage.cards.b;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.MageObjectReference;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.AbilityImpl;
|
||||
import mage.abilities.Mode;
|
||||
|
@ -194,10 +193,10 @@ class BeamsplitterMagePredicate implements Predicate<Permanent> {
|
|||
|
||||
class BeamsplitterMageApplier implements StackObjectCopyApplier {
|
||||
|
||||
private final MageObjectReferencePredicate morPredicate;
|
||||
private final Iterator<MageObjectReferencePredicate> predicate;
|
||||
|
||||
BeamsplitterMageApplier(Permanent permanent, Game game) {
|
||||
this.morPredicate = new MageObjectReferencePredicate(permanent, game);
|
||||
this.predicate = Arrays.asList(new MageObjectReferencePredicate(permanent, game)).iterator();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -206,6 +205,9 @@ class BeamsplitterMageApplier implements StackObjectCopyApplier {
|
|||
|
||||
@Override
|
||||
public MageObjectReferencePredicate getNextNewTargetType() {
|
||||
return morPredicate;
|
||||
if (predicate.hasNext()) {
|
||||
return predicate.next();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ import mage.target.Target;
|
|||
import mage.util.TargetAddress;
|
||||
import mage.util.functions.StackObjectCopyApplier;
|
||||
|
||||
import java.util.UUID;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
|
@ -97,10 +97,10 @@ class IvyGleefulSpellthiefEffect extends OneShotEffect {
|
|||
|
||||
private static final class IvyGleefulSpellthiefApplier implements StackObjectCopyApplier {
|
||||
|
||||
private final MageObjectReferencePredicate morPredicate;
|
||||
private final Iterator<MageObjectReferencePredicate> predicate;
|
||||
|
||||
IvyGleefulSpellthiefApplier(Permanent permanent, Game game) {
|
||||
this.morPredicate = new MageObjectReferencePredicate(permanent, game);
|
||||
this.predicate = Arrays.asList(new MageObjectReferencePredicate(permanent, game)).iterator();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -109,7 +109,10 @@ class IvyGleefulSpellthiefEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public MageObjectReferencePredicate getNextNewTargetType() {
|
||||
return morPredicate;
|
||||
if (predicate.hasNext()) {
|
||||
return predicate.next();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue