27 lines
1.0 KiB
Groovy
27 lines
1.0 KiB
Groovy
[
|
|
new MagicWhenLeavesPlayTrigger() {
|
|
@Override
|
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent left) {
|
|
final int amount = permanent.getCounters(MagicCounterType.Charge);
|
|
return (permanent == left && amount > 0) ?
|
|
new MagicEvent(
|
|
permanent,
|
|
amount,
|
|
this,
|
|
amount > 1 ?
|
|
"PN puts " + amount + " 1/1 white Bird creature tokens with flying onto the battlefield." :
|
|
"PN puts a 1/1 white Bird creature token with flying onto the battlefield."
|
|
):
|
|
MagicEvent.NONE;
|
|
}
|
|
@Override
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
game.doAction(new MagicPlayTokensAction(
|
|
event.getPlayer(),
|
|
TokenCardDefinitions.get("Bird1"),
|
|
event.getRefInt()
|
|
));
|
|
}
|
|
}
|
|
]
|