magarena/release/Magarena/scripts/Kederekt_Parasite.groovy

23 lines
821 B
Groovy
Raw Normal View History

2013-05-18 18:38:31 -07:00
[
new MagicWhenOtherDrawnTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicCard card) {
2013-06-23 18:29:26 -07:00
return (permanent.isEnemy(card) &&
permanent.getController().controlsPermanent(MagicColor.Red)) ?
2013-05-18 18:38:31 -07:00
new MagicEvent(
permanent,
card.getController(),
this,
"SN deals 1 damage to PN."
):
MagicEvent.NONE;
}
2013-06-23 18:29:26 -07:00
2013-05-18 18:38:31 -07:00
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
final MagicDamage damage = new MagicDamage(event.getSource(),event.getPlayer(),1);
game.doAction(new MagicDealDamageAction(damage));
2013-06-23 18:29:26 -07:00
}
2013-05-18 18:38:31 -07:00
}
]