magarena/release/Magarena/scripts/Nirkana_Cutthroat.groovy

29 lines
951 B
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>=3) {
pt.set(5,4);
} else if (charges>=1) {
pt.set(4,3);
}
}
},
new MagicStatic(MagicLayer.Ability) {
@Override
public void modAbilityFlags(
final MagicPermanent source,
final MagicPermanent permanent,
final Set<MagicAbility> flags) {
final int charges=permanent.getCounters(MagicCounterType.Charge);
if (charges>=3) {
flags.add(MagicAbility.FirstStrike);
}
if (charges>=1) {
flags.add(MagicAbility.Deathtouch);
}
}
}
]