magarena/release/Magarena/scripts/Null_Champion.groovy

44 lines
1.3 KiB
Groovy

[
new MagicStatic(MagicLayer.SetPT) {
@Override
public void modPowerToughness(final MagicPermanent source,final MagicPermanent permanent,final MagicPowerToughness pt) {
final int charges = permanent.getCounters(MagicCounterType.Charge);
if (charges >= 4) {
pt.set(7,3);
} else if (charges >= 1) {
pt.set(4,2);
}
}
},
new MagicPermanentActivation(
[
MagicConditionFactory.ChargeCountersAtLeast(4),
],
new MagicActivationHints(MagicTiming.Pump),
"Regen"
) {
@Override
public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
return [
new MagicPayManaCostEvent(source,"{B}"),
new MagicRegenerationConditionsEvent(source,this)
];
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
return new MagicEvent(
source,
this,
"Regenerate SN."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicRegenerateAction(event.getPermanent()));
}
}
]