Menu

Submission for Identity Crisis

81

Comment

tested in magarena 1.43

Config

name=Identity Crisis
url=http://magiccards.info/arb/en/81.html
image=http://magiccards.info/scans/en/arb/81.jpg
value=3.265
rarity=R
type=Sorcery
cost={2}{W}{W}{B}{B}
timing=main
requires_groovy_code

Script

[
    new MagicSpellCardEvent() {
        @Override
        public MagicEvent getEvent(final MagicCardOnStack cardOnStack, final MagicPayedCost payedCost) {
            return new MagicEvent(
                cardOnStack,
                MagicTargetChoice.NEG_TARGET_PLAYER,
                this,
                "Exile all cards from target player\$'s hand and graveyard."
            );
        }
        @Override
        public void executeEvent(final MagicGame game, final MagicEvent event) {
            event.processTargetPlayer(game,new MagicPlayerAction() {
                public void doAction(final MagicPlayer player) {
                    for (final MagicCard card : new MagicCardList(player.getHand())) {
						game.doAction(new MagicRemoveCardAction(card, MagicLocationType.OwnersHand));
						game.doAction(new MagicMoveCardAction(card, MagicLocationType.OwnersHand, MagicLocationType.Exile));
					}
					for (final MagicCard card : new MagicCardList(player.getGraveyard())) {
						game.doAction(new MagicRemoveCardAction(card, MagicLocationType.Graveyard));
						game.doAction(new MagicMoveCardAction(card, MagicLocationType.Graveyard, MagicLocationType.Exile));
					}
                }
            });
        }
    }
]
Pushed