mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
Fix #9524
This commit is contained in:
parent
48245f4a23
commit
c401b35b63
3 changed files with 8 additions and 12 deletions
|
@ -194,12 +194,10 @@ class BeamsplitterMagePredicate implements Predicate<Permanent> {
|
|||
|
||||
class BeamsplitterMageApplier implements StackObjectCopyApplier {
|
||||
|
||||
private final Iterator<MageObjectReferencePredicate> predicate;
|
||||
private final MageObjectReferencePredicate morPredicate;
|
||||
|
||||
BeamsplitterMageApplier(Permanent permanent, Game game) {
|
||||
this.predicate = Arrays.asList(new MageObjectReferencePredicate(
|
||||
new MageObjectReference(permanent, game)
|
||||
)).iterator();
|
||||
this.morPredicate = new MageObjectReferencePredicate(permanent, game);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -208,9 +206,6 @@ class BeamsplitterMageApplier implements StackObjectCopyApplier {
|
|||
|
||||
@Override
|
||||
public MageObjectReferencePredicate getNextNewTargetType(int copyNumber) {
|
||||
if (predicate.hasNext()) {
|
||||
return predicate.next();
|
||||
}
|
||||
return null;
|
||||
return morPredicate;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -109,7 +109,7 @@ class IvyGleefulSpellthiefEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public MageObjectReferencePredicate getNextNewTargetType(int copyNumber) {
|
||||
return copyNumber == 0 ? morPredicate : null;
|
||||
return morPredicate;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -298,9 +298,10 @@ public abstract class TokenImpl extends MageObjectImpl implements Token {
|
|||
game.addSimultaneousEvent(new CreatedTokenEvent(source, (PermanentToken) permanent));
|
||||
}
|
||||
|
||||
// handle auras coming into the battlefield
|
||||
// code refactored from CopyPermanentEffect
|
||||
if (permanent.getSubtype().contains(SubType.AURA)) {
|
||||
// if token was created (not a spell copy) handle auras coming into the battlefield
|
||||
// code blindly copied from CopyPermanentEffect
|
||||
// TODO: clean this up -- half the comments make no sense in the context of creating a token
|
||||
if (created && permanent.getSubtype().contains(SubType.AURA)) {
|
||||
Outcome auraOutcome = Outcome.BoostCreature;
|
||||
Target auraTarget = null;
|
||||
|
||||
|
|
Loading…
Reference in a new issue