magarena/release/Magarena/scripts/Biting_Tether.groovy

30 lines
932 B
Groovy
Raw Normal View History

2013-04-12 19:58:51 -07:00
[
new MagicAtUpkeepTrigger() {
@Override
public MagicEvent executeTrigger(
final MagicGame game,
final MagicPermanent permanent,
final MagicPlayer upkeepPlayer) {
return permanent.isController(upkeepPlayer) ?
new MagicEvent(
permanent,
permanent.getEnchantedCreature(),
this,
"PN puts a -1/-1 counter on " +
permanent.getEnchantedCreature() + "."
) :
MagicEvent.NONE;
}
@Override
public void executeEvent(
final MagicGame game,
final MagicEvent event) {
game.doAction(new MagicChangeCountersAction(
event.getRefPermanent(),
MagicCounterType.MinusOne,1,true
));
}
}
]