* Fixed a bug that countered spells of creatures with the ability going back to library if going to graveyard (e.g. Legacy Waepon) stayed in hand or caused a java bug instead of going to library.

This commit is contained in:
LevelX2 2015-05-01 14:04:52 +02:00
parent eb6e7f9b46
commit d7c23bbfc0
3 changed files with 43 additions and 1 deletions

View file

@ -39,6 +39,7 @@ import mage.constants.Zone;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.game.permanent.PermanentCard;
import mage.game.stack.Spell;
import mage.players.Player;
/**
@ -65,6 +66,9 @@ public class RevealAndShuffleIntoLibrarySourceEffect extends OneShotEffect {
Player owner = null;
Cards cards = new CardsImpl();
Permanent permanent = null;
if (sourceObject instanceof Spell) {
sourceObject = ((Spell)sourceObject).getCard();
}
if (sourceObject instanceof Permanent) {
permanent = (Permanent) sourceObject;
owner = game.getPlayer(permanent.getOwnerId());