magarena/release/Magarena/scripts/Hada_Spy_Patrol.groovy

32 lines
1010 B
Groovy
Raw Normal View History

2013-05-17 22:54:28 -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 >= 3) {
pt.set(3,3);
} else if (charges >= 1) {
pt.set(2,2);
}
}
2013-05-17 22:54:28 -07:00
},
new MagicStatic(MagicLayer.Ability) {
2013-04-12 19:32:25 -07:00
@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.Shroud);
}
if (charges >= 1) {
flags.add(MagicAbility.Unblockable);
}
}
2013-05-17 22:54:28 -07:00
}
]