2013-05-30 05:56:39 -07:00
|
|
|
[
|
|
|
|
new MagicWhenComesIntoPlayTrigger() {
|
|
|
|
@Override
|
|
|
|
public MagicEvent executeTrigger(
|
|
|
|
final MagicGame game,
|
|
|
|
final MagicPermanent permanent,
|
|
|
|
final MagicPlayer player) {
|
|
|
|
return new MagicEvent(
|
|
|
|
permanent,
|
|
|
|
this,
|
|
|
|
"PN puts a 0/1 green Plant creature token onto " +
|
|
|
|
"the battlefield for each land he or she controls."
|
|
|
|
);
|
|
|
|
}
|
|
|
|
@Override
|
|
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
|
|
final MagicPlayer player = event.getPlayer();
|
|
|
|
int amount = player.getNrOfPermanentsWithType(MagicType.Land);
|
|
|
|
game.doAction(new MagicPlayTokensAction(
|
|
|
|
player,
|
|
|
|
TokenCardDefinitions.get("Plant"),
|
|
|
|
amount
|
|
|
|
));
|
|
|
|
}
|
|
|
|
},
|
|
|
|
new MagicLandfallTrigger() {
|
|
|
|
@Override
|
|
|
|
public MagicEvent getEvent(final MagicPermanent permanent) {
|
|
|
|
return new MagicEvent(
|
|
|
|
permanent,
|
|
|
|
new MagicSimpleMayChoice(
|
|
|
|
MagicSimpleMayChoice.ADD_CHARGE_COUNTER,
|
|
|
|
1,
|
|
|
|
MagicSimpleMayChoice.DEFAULT_YES
|
|
|
|
),
|
|
|
|
this,
|
2013-05-30 06:27:18 -07:00
|
|
|
"PN may\$ put a +1/+1 counter on each " +
|
2013-05-30 05:56:39 -07:00
|
|
|
"Plant creature he or she controls."
|
|
|
|
);
|
|
|
|
}
|
|
|
|
@Override
|
|
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
|
|
if (event.isYes()) {
|
|
|
|
final Collection<MagicPermanent> targets = game.filterPermanents(
|
|
|
|
event.getPlayer(),
|
|
|
|
MagicTargetFilter.TARGET_PLANT_YOU_CONTROL);
|
|
|
|
for (final MagicPermanent target : targets) {
|
|
|
|
game.doAction(new MagicChangeCountersAction(
|
|
|
|
target,
|
|
|
|
MagicCounterType.PlusOne,
|
|
|
|
1,
|
|
|
|
true
|
|
|
|
));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|