31 lines
1.0 KiB
Groovy
31 lines
1.0 KiB
Groovy
[
|
|
new MagicPermanentActivation(
|
|
[MagicConditionFactory.ManaCost("{G}{W}")],
|
|
new MagicActivationHints(MagicTiming.Pump),
|
|
"Regen"
|
|
) {
|
|
@Override
|
|
public MagicEvent[] getCostEvent(final MagicPermanent source) {
|
|
return [
|
|
new MagicPayManaCostSacrificeEvent(source, "{G}{W}")
|
|
];
|
|
}
|
|
@Override
|
|
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
|
|
return new MagicEvent(
|
|
source,
|
|
this,
|
|
"Regenerate each creature you control."
|
|
);
|
|
}
|
|
@Override
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
final Collection<MagicPermanent> targets=
|
|
game.filterPermanents(event.getPlayer(),MagicTargetFilter.TARGET_CREATURE_YOU_CONTROL);
|
|
for (final MagicPermanent permanent : targets) {
|
|
game.doAction(new MagicRegenerateAction(permanent));
|
|
}
|
|
}
|
|
}
|
|
]
|