2013-05-18 04:46:47 -07:00
|
|
|
[
|
|
|
|
new MagicWhenLeavesPlayTrigger() {
|
2013-04-12 19:32:25 -07:00
|
|
|
@Override
|
2013-07-02 05:31:26 -07:00
|
|
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicRemoveFromPlayAction act) {
|
2013-04-12 19:32:25 -07:00
|
|
|
final int amount = permanent.getCounters(MagicCounterType.Charge);
|
2013-07-02 05:31:26 -07:00
|
|
|
return (act.isPermanent(permanent) && amount > 0) ?
|
2013-04-12 19:32:25 -07:00
|
|
|
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
|
2013-05-18 04:46:47 -07:00
|
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
2013-04-12 19:32:25 -07:00
|
|
|
game.doAction(new MagicPlayTokensAction(
|
|
|
|
event.getPlayer(),
|
|
|
|
TokenCardDefinitions.get("Bird1"),
|
|
|
|
event.getRefInt()
|
|
|
|
));
|
|
|
|
}
|
2013-05-18 04:46:47 -07:00
|
|
|
}
|
|
|
|
]
|