magarena/release/Magarena/scripts/Argentum_Armor.groovy

25 lines
929 B
Groovy
Raw Normal View History

2013-05-17 23:15:03 -07:00
[
new MagicWhenAttacksTrigger(1) {
2013-04-12 19:32:25 -07:00
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent attacker) {
return permanent.getEquippedCreature() == attacker ?
new MagicEvent(
permanent,
MagicTargetChoice.TARGET_PERMANENT,
new MagicDestroyTargetPicker(false),
this,
2013-05-17 23:15:03 -07:00
"Destroy target permanent\$."
2013-04-12 19:32:25 -07:00
):
MagicEvent.NONE;
}
@Override
2013-05-17 23:15:03 -07:00
public void executeEvent(final MagicGame game, final MagicEvent event) {
2013-04-12 19:32:25 -07:00
event.processTargetPermanent(game,new MagicPermanentAction() {
public void doAction(final MagicPermanent permanent) {
game.doAction(new MagicDestroyAction(permanent));
}
});
}
2013-05-17 23:15:03 -07:00
}
]