MageObject mageObject = game.getObject(stackObject.getSourceId());
if (mageObject instanceof Card) {
Card card = (Card) mageObject;
switch (targetZone) {
case HAND:
controller.moveCardToHandWithInfo(card, sourceId, game, Zone.STACK);
break;
case LIBRARY:
controller.moveCardToLibraryWithInfo(card, sourceId, game, Zone.STACK, flag, true);
break;
case EXILED: