magarena/incomplete/Teferi_s_Puzzle_Box.groovy

25 lines
1.0 KiB
Groovy
Raw Normal View History

2014-04-18 07:54:24 -07:00
[
new MagicAtDrawTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPlayer drawPlayer) {
return new MagicEvent(
permanent,
drawPlayer,
this,
"PN puts the cards in his or her hand on the bottom of his or her library in any order, "+
"then draws that many cards."
2014-04-18 07:54:24 -07:00
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicPlayer player = event.getPlayer();
final MagicCardList hand = new MagicCardList(player.getHand());
for (final MagicCard card : hand) {
game.addEvent(new MagicTuckCardEvent(event.getPermanent(),player,false));
}
game.logAppendMessage(player,"PN puts "+hand.size()+" cards on the bottom of his or her library.");
game.addEvent(new MagicDrawEvent(event.getPermanent(),player,hand.size()));
2014-04-18 07:54:24 -07:00
}
}
]