for (UUID targetId : getTargetPointer().getTargets(game, source)) {
Permanent permanent = game.getPermanent(targetId);
if (permanent != null) {
Zone currentZone = game.getState().getZone(permanent.getId());
if (!currentZone.equals(Zone.EXILED) && (onlyFromZone == null || onlyFromZone.equals(Zone.BATTLEFIELD))) {
controller.moveCardToExileWithInfo(permanent, exileId, exileZone, source.getSourceId(), game, currentZone);
}
} else {
Card card = game.getCard(targetId);
if (card != null) {
Zone currentZone = game.getState().getZone(card.getId());