mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
create token copy checks for copyfrom
* Esoteric Duplicator test demonstrates fix. Sculpting steel token was not coming back as an Esoteric Duplicator
This commit is contained in:
parent
71cd3ce3fc
commit
d13a0e6e6b
2 changed files with 10 additions and 4 deletions
|
|
@ -176,8 +176,8 @@ public class CreateTokenCopyTargetEffect extends OneShotEffect {
|
|||
}
|
||||
|
||||
// can target card or permanent
|
||||
Card copyFrom;
|
||||
CopyApplier applier = new EmptyCopyApplier();
|
||||
Card copyFrom = null;
|
||||
CopyApplier applier = null;
|
||||
if (permanent != null) {
|
||||
// handle copies of copies
|
||||
Permanent copyFromPermanent = permanent;
|
||||
|
|
@ -196,9 +196,17 @@ public class CreateTokenCopyTargetEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
}
|
||||
// check if permanent was copying, but copy effect is no longer active
|
||||
if (applier == null) {
|
||||
if (permanent.isCopy() && permanent.getCopyFrom() instanceof Permanent) {
|
||||
copyFromPermanent = (Permanent) permanent.getCopyFrom();
|
||||
}
|
||||
applier = new EmptyCopyApplier();
|
||||
}
|
||||
copyFrom = copyFromPermanent;
|
||||
} else {
|
||||
copyFrom = game.getCard(getTargetPointer().getFirst(game, source));
|
||||
applier = new EmptyCopyApplier();
|
||||
}
|
||||
|
||||
if (copyFrom == null) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue