magarena/release/Magarena/scripts/Tidewalker.groovy

23 lines
855 B
Groovy

[
new MagicStatic(MagicLayer.SetPT) {
@Override
public void modPowerToughness(final MagicPermanent source,final MagicPermanent permanent,final MagicPowerToughness pt) {
final int amount = permanent.getCounters(MagicCounterType.Charge);
pt.set(amount,amount);
}
},
new MagicWhenComesIntoPlayTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final MagicPlayer player) {
final int amount = game.filterPermanents(player,MagicTargetFilter.TARGET_ISLAND_YOU_CONTROL).size();
game.doAction(new MagicChangeCountersAction(
permanent,
MagicCounterType.Charge,
amount,
true
));
return MagicEvent.NONE;
}
}
]