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:
LevelX2 2016-03-07 17:34:03 +01:00
parent 397b874b2d
commit 0a31a8b479
3 changed files with 39 additions and 3 deletions

View file

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