diff --git a/Mage.Sets/src/mage/cards/l/LivingDeath.java b/Mage.Sets/src/mage/cards/l/LivingDeath.java index 9a67de26d35..032aa651d8f 100644 --- a/Mage.Sets/src/mage/cards/l/LivingDeath.java +++ b/Mage.Sets/src/mage/cards/l/LivingDeath.java @@ -2,6 +2,7 @@ package mage.cards.l; import java.util.HashMap; +import java.util.HashSet; import java.util.Map; import java.util.Set; import java.util.UUID; @@ -65,7 +66,9 @@ class LivingDeathEffect extends OneShotEffect { MageObject sourceObject = game.getObject(source.getSourceId()); if (controller != null && sourceObject != null) { Map> exiledCards = new HashMap<>(); - // move creature cards from graveyard to exile + + // Move creature cards from graveyard to exile + for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) { Player player = game.getPlayer(playerId); if (player != null) { @@ -77,21 +80,28 @@ class LivingDeathEffect extends OneShotEffect { } } game.applyEffects(); - // sacrifice all creatures + + // Sacrifice all creatures + for (Permanent permanent : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_PERMANENT_CREATURE, source.getControllerId(), game)) { permanent.sacrifice(source.getSourceId(), game); } game.applyEffects(); - // put exiled cards to battlefield + + // Exiled cards are put onto the battlefield at the same time under their owner's control + + Set cardsToReturnFromExile = new HashSet<>(); for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) { Player player = game.getPlayer(playerId); if (player != null) { Set cardsPlayer = exiledCards.get(playerId); - if (cardsPlayer != null && !cardsPlayer.isEmpty()) { - player.moveCards(cardsPlayer, Zone.BATTLEFIELD, source, game, false, false, false, null); + if (cardsPlayer != null + && !cardsPlayer.isEmpty()) { + cardsToReturnFromExile.addAll(cardsPlayer); } } } + controller.moveCards(cardsToReturnFromExile, Zone.BATTLEFIELD, source, game, false, false, true, null); return true; } return false;