magarena/release/Magarena/scripts/Knight_of_Cliffhaven.groovy

26 lines
917 B
Groovy
Raw Normal View History

2013-05-17 21:10:32 -07:00
[
new MagicStatic(MagicLayer.SetPT) {
2013-04-12 19:32:25 -07:00
@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(4,4);
} else if (charges >= 1) {
pt.set(2,3);
}
}
2013-05-17 21:10:32 -07:00
},
new MagicStatic(MagicLayer.Ability) {
2013-04-12 19:32:25 -07:00
@Override
2013-05-17 21:10:32 -07:00
public void modAbilityFlags(final MagicPermanent source, final MagicPermanent permanent, final Set<MagicAbility> flags) {
2013-04-12 19:32:25 -07:00
final int charges = permanent.getCounters(MagicCounterType.Charge);
if (charges >= 4) {
flags.add(MagicAbility.Vigilance);
}
if (charges >= 1) {
flags.add(MagicAbility.Flying);
}
}
2013-05-17 21:10:32 -07:00
}
]