fixed a test failure

This commit is contained in:
Evan Kranzler 2021-02-24 16:32:30 -05:00
parent 27b85bca88
commit 5f23ccf24c
3 changed files with 7 additions and 3 deletions

View file

@ -26,13 +26,17 @@ public class MageObjectReference implements Comparable<MageObjectReference>, Ser
private final int zoneChangeCounter;
public MageObjectReference(MageObject mageObject, Game game) {
this(mageObject, game, 0);
}
public MageObjectReference(MageObject mageObject, Game game, int offset) {
if (mageObject == null) {
this.sourceId = null;
this.zoneChangeCounter = -1;
return;
}
this.sourceId = mageObject.getId();
this.zoneChangeCounter = mageObject.getZoneChangeCounter(game);
this.zoneChangeCounter = mageObject.getZoneChangeCounter(game) + offset;
}
/**