magarena/release/Magarena/scripts/Gavony_Township.groovy

41 lines
1.4 KiB
Groovy
Raw Normal View History

2013-05-28 01:16:27 -07:00
[
2013-06-23 18:29:26 -07:00
new MagicPermanentActivation(
2013-05-28 01:16:27 -07:00
[
2013-06-14 19:37:59 -07:00
//add ONE for the card itself as it cannot pay for itself
2013-06-23 18:29:26 -07:00
MagicConditionFactory.ManaCost("{3}{G}{W}"),
2013-05-28 01:16:27 -07:00
],
new MagicActivationHints(MagicTiming.Pump),
"Pump"
) {
@Override
public MagicEvent[] getCostEvent(final MagicPermanent source) {
return [
new MagicTapEvent(source),
new MagicPayManaCostEvent(source,"{2}{G}{W}")
];
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
return new MagicEvent(
source,
this,
"Put a +1/+1 counter on each creature you control."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicPlayer player = event.getPlayer();
final Collection<MagicPermanent> targets =
game.filterPermanents(player,MagicTargetFilter.TARGET_CREATURE_YOU_CONTROL);
for (final MagicPermanent target : targets) {
game.doAction(new MagicChangeCountersAction(
target,
MagicCounterType.PlusOne,
1,
true
));
}
}
}
]