* Reanimate - Fixed a problem that abilities of cards brought to battlefield from opponents graveyards did act as if controller would be the owner of the card.

This commit is contained in:
LevelX2 2014-06-15 11:15:37 +02:00
parent ba885fef91
commit 83c3f92241
3 changed files with 16 additions and 5 deletions

View file

@ -36,6 +36,7 @@ import mage.cards.Card;
import mage.constants.Outcome;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.Target;
import mage.util.CardUtil;
@ -75,8 +76,12 @@ public class ReturnFromGraveyardToBattlefieldTargetEffect extends OneShotEffect
if (card != null) {
Player player = game.getPlayer(source.getControllerId());
if (player != null) {
if(player.putOntoBattlefieldWithInfo(card, game, Zone.GRAVEYARD, source.getSourceId(), tapped)){
result = true;
if (player.putOntoBattlefieldWithInfo(card, game, Zone.GRAVEYARD, source.getSourceId(), tapped)){
Permanent permanent = game.getPermanent(source.getSourceId());
if (permanent != null) {
permanent.changeControllerId(source.getControllerId(), game);
result = true;
}
}
}
}