mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 20:41:58 -08:00
Fixed a problem with Tokens of the CopyEffect (e.g. with Essence of the Wild and Back from the Bring in play).
This commit is contained in:
parent
397b874b2d
commit
0a31a8b479
3 changed files with 39 additions and 3 deletions
|
|
@ -92,8 +92,12 @@ public class CopyEffect extends ContinuousEffectImpl {
|
|||
permanent = game.getPermanentEntering(copyToObjectId);
|
||||
if (permanent != null) {
|
||||
copyToPermanent(permanent, game, source);
|
||||
// set reference to the permanent later on the battlefield so we have to add already one to the zone change counter
|
||||
affectedObjectList.add(new MageObjectReference(permanent.getId(), game.getState().getZoneChangeCounter(copyToObjectId) + 1, game));
|
||||
// set reference to the permanent later on the battlefield so we have to add already one (if no token) to the zone change counter
|
||||
int ZCCDiff = 1;
|
||||
if (permanent instanceof PermanentToken) {
|
||||
ZCCDiff = 0;
|
||||
}
|
||||
affectedObjectList.add(new MageObjectReference(permanent.getId(), game.getState().getZoneChangeCounter(copyToObjectId) + ZCCDiff, game));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue