* Nissa's Chosen - move permanent instead of card internally to library.

This commit is contained in:
LevelX2 2013-10-04 08:41:45 +02:00
parent e2532a9b11
commit fac4ff40fe

View file

@ -43,6 +43,7 @@ import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType;
import mage.game.events.ZoneChangeEvent;
import mage.game.permanent.Permanent;
/**
*
@ -96,9 +97,9 @@ class NissasChosenEffect extends ReplacementEffectImpl<NissasChosenEffect> {
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
Card card = game.getCard(event.getTargetId());
if ( card != null ) {
return card.moveToZone(Zone.LIBRARY, source.getId(), game, false);
Permanent permanent = ((ZoneChangeEvent) event).getTarget();
if (permanent != null) {
return permanent.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false);
}
return false;
}