* Living Death and Living End - Fixed a bug that wrongly all creatures were put onto battlefield under control of spell controller.

This commit is contained in:
LevelX2 2014-11-05 15:23:59 +01:00
parent c02e5c8fbc
commit 8412515be0
2 changed files with 10 additions and 3 deletions

View file

@ -106,7 +106,10 @@ class LivingDeathEffect extends OneShotEffect {
ExileZone exileZone = game.getState().getExile().getExileZone(source.getSourceId());
if (exileZone != null) {
for (Card card : exileZone.getCards(game)) {
controller.putOntoBattlefieldWithInfo(card, game, Zone.EXILED, source.getSourceId());
Player player = game.getPlayer(card.getOwnerId());
if (player != null) {
player.putOntoBattlefieldWithInfo(card, game, Zone.EXILED, source.getSourceId());
}
}
}
return true;

View file

@ -60,7 +60,8 @@ public class LivingEnd extends CardImpl {
// Suspend 3-{2}{B}{B}
this.addAbility(new SuspendAbility(3, new ManaCostsImpl("{2}{B}{B}"), this));
// Each player exiles all creature cards from his or her graveyard, then sacrifices all creatures he or she controls, then puts all cards he or she onto the battlefield.
// Each player exiles all creature cards from his or her graveyard, then sacrifices all creatures
// he or she controls, then puts all cards he or she exiled this way onto the battlefield.
this.getSpellAbility().addEffect(new LivingEndEffect());
}
@ -113,7 +114,10 @@ class LivingEndEffect extends OneShotEffect {
ExileZone exileZone = game.getState().getExile().getExileZone(source.getSourceId());
if (exileZone != null) {
for (Card card : exileZone.getCards(game)) {
controller.putOntoBattlefieldWithInfo(card, game, Zone.EXILED, source.getSourceId());
Player player = game.getPlayer(card.getOwnerId());
if (player != null) {
player.putOntoBattlefieldWithInfo(card, game, Zone.EXILED, source.getSourceId());
}
}
}
return true;