mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
* Fixed a problem with card movement that prevented Tiny Leaders go to command zone at game start.
This commit is contained in:
parent
4c91440f5e
commit
4ad3ef4e68
2 changed files with 9 additions and 2 deletions
|
@ -453,6 +453,9 @@ public abstract class CardImpl extends MageObjectImpl implements Card {
|
||||||
} else if (game.getPlayer(ownerId).getSideboard().contains(this.getId())) {
|
} else if (game.getPlayer(ownerId).getSideboard().contains(this.getId())) {
|
||||||
game.getPlayer(ownerId).getSideboard().remove(this.getId());
|
game.getPlayer(ownerId).getSideboard().remove(this.getId());
|
||||||
removed = true;
|
removed = true;
|
||||||
|
} else if (game.getPhase() == null) {
|
||||||
|
// E.g. Commander of commander game
|
||||||
|
removed = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case BATTLEFIELD: // for sacrificing permanents or putting to library
|
case BATTLEFIELD: // for sacrificing permanents or putting to library
|
||||||
|
@ -465,7 +468,9 @@ public abstract class CardImpl extends MageObjectImpl implements Card {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (removed) {
|
if (removed) {
|
||||||
|
if (!fromZone.equals(Zone.OUTSIDE)) {
|
||||||
game.rememberLKI(lkiObject != null ? lkiObject.getId() : objectId, fromZone, lkiObject != null ? lkiObject : this);
|
game.rememberLKI(lkiObject != null ? lkiObject.getId() : objectId, fromZone, lkiObject != null ? lkiObject : this);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
logger.warn("Couldn't find card in fromZone, card=" + getIdName() + ", fromZone=" + fromZone);
|
logger.warn("Couldn't find card in fromZone, card=" + getIdName() + ", fromZone=" + fromZone);
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,8 +59,10 @@ public class ZonesHandler {
|
||||||
}
|
}
|
||||||
for (ZoneChangeInfo zoneChangeInfo : zoneChangeInfos) {
|
for (ZoneChangeInfo zoneChangeInfo : zoneChangeInfos) {
|
||||||
placeInDestinationZone(zoneChangeInfo, game);
|
placeInDestinationZone(zoneChangeInfo, game);
|
||||||
|
if (game.getPhase() != null) { // moving cards to zones before game started does not need events
|
||||||
game.addSimultaneousEvent(zoneChangeInfo.event);
|
game.addSimultaneousEvent(zoneChangeInfo.event);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return zoneChangeInfos;
|
return zoneChangeInfos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue