* See Beyond - Fixed wrong card moving from hand to library.
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
-
package mage.cards.s;
import java.util.UUID;
-import mage.constants.CardType;
-import mage.constants.Outcome;
-import mage.constants.Zone;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
+import mage.constants.CardType;
+import mage.constants.Outcome;
+import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.game.Game;
import mage.players.Player;
@@ -67,8 +66,6 @@ public class SeeBeyond extends CardImpl {
class SeeBeyondEffect extends OneShotEffect {
- private static FilterCard filter = new FilterCard("card to shuffle into your library");
-
public SeeBeyondEffect() {
super(Outcome.DrawCard);
staticText = "Draw two cards, then shuffle a card from your hand into your library";
@@ -80,18 +77,18 @@ class SeeBeyondEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
- Player player = game.getPlayer(source.getControllerId());
- player.drawCards(2, game);
- if (player.getHand().size() > 0) {
- TargetCard target = new TargetCard(Zone.HAND, filter);
- player.choose(Outcome.Detriment, player.getHand(), target, game);
- Card card = player.getHand().get(target.getFirstTarget(), game);
+ Player controller = game.getPlayer(source.getControllerId());
+ controller.drawCards(2, game);
+ if (controller.getHand().size() > 0) {
+ TargetCard target = new TargetCard(Zone.HAND, new FilterCard("card to shuffle into your library"));
+ controller.choose(Outcome.Detriment, controller.getHand(), target, game);
+ Card card = controller.getHand().get(target.getFirstTarget(), game);
if (card != null) {
- player.removeFromHand(card, game);
- card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true);
- player.shuffleLibrary(source, game);
- return true;
+ controller.moveCards(card, Zone.LIBRARY, source, game);
+ controller.shuffleLibrary(source, game);
}
+ return true;
+
}
return true;
}
