magarena/release/Magarena/scripts/Sea_Gate_Loremaster.groovy

26 lines
881 B
Groovy
Raw Normal View History

2013-05-18 19:25:10 -07:00
[
new MagicPermanentActivation(
new MagicActivationHints(MagicTiming.Token),
"Draw"
) {
@Override
public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
2013-05-18 19:25:10 -07:00
return [new MagicTapEvent(source)];
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
return new MagicEvent(
source,
this,
"PN draws a card for each Ally he or she controls."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicPlayer player = event.getPlayer();
final int amount = player.getNrOfPermanents(MagicSubType.Ally);
2013-05-18 19:25:10 -07:00
game.doAction(new MagicDrawAction(player,amount));
}
}
]