38 lines
1.2 KiB
Groovy
38 lines
1.2 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 >= 5) {
|
|
pt.set(4,8);
|
|
} else if (charges >= 2) {
|
|
pt.set(3,6);
|
|
}
|
|
}
|
|
},
|
|
new MagicStatic(
|
|
MagicLayer.ModPT,
|
|
MagicTargetFilter.TARGET_CREATURE_YOU_CONTROL
|
|
) {
|
|
@Override
|
|
public void modPowerToughness(final MagicPermanent source,final MagicPermanent permanent,final MagicPowerToughness pt) {
|
|
final int charges = source.getCounters(MagicCounterType.Charge);
|
|
int amount = 0;
|
|
if (charges >= 5) {
|
|
amount = 2;
|
|
} else if (charges >= 2) {
|
|
amount = 1;
|
|
}
|
|
pt.add(amount, amount);
|
|
}
|
|
|
|
@Override
|
|
public boolean condition(final MagicGame game,final MagicPermanent source,final MagicPermanent target) {
|
|
return source != target;
|
|
}
|
|
}
|
|
]
|