* Fixed a problem with card movement that prevented Tiny Leaders go to command zone at game start.

This commit is contained in:
LevelX2 2016-09-22 23:08:40 +02:00
parent 4c91440f5e
commit 4ad3ef4e68
2 changed files with 9 additions and 2 deletions

View file

@ -453,6 +453,9 @@ public abstract class CardImpl extends MageObjectImpl implements Card {
} else if (game.getPlayer(ownerId).getSideboard().contains(this.getId())) {
game.getPlayer(ownerId).getSideboard().remove(this.getId());
removed = true;
} else if (game.getPhase() == null) {
// E.g. Commander of commander game
removed = true;
}
break;
case BATTLEFIELD: // for sacrificing permanents or putting to library
@ -465,7 +468,9 @@ public abstract class CardImpl extends MageObjectImpl implements Card {
break;
}
if (removed) {
game.rememberLKI(lkiObject != null ? lkiObject.getId() : objectId, fromZone, lkiObject != null ? lkiObject : this);
if (!fromZone.equals(Zone.OUTSIDE)) {
game.rememberLKI(lkiObject != null ? lkiObject.getId() : objectId, fromZone, lkiObject != null ? lkiObject : this);
}
} else {
logger.warn("Couldn't find card in fromZone, card=" + getIdName() + ", fromZone=" + fromZone);
}

View file

@ -59,7 +59,9 @@ public class ZonesHandler {
}
for (ZoneChangeInfo zoneChangeInfo : zoneChangeInfos) {
placeInDestinationZone(zoneChangeInfo, game);
game.addSimultaneousEvent(zoneChangeInfo.event);
if (game.getPhase() != null) { // moving cards to zones before game started does not need events
game.addSimultaneousEvent(zoneChangeInfo.event);
}
}
return zoneChangeInfos;
}