magarena/release/Magarena/scripts/Bleak_Coven_Vampires.groovy

25 lines
987 B
Groovy

[
new MagicWhenComesIntoPlayTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final MagicPayedCost payedCost) {
return MagicCondition.METALCRAFT_CONDITION.accept(permanent) ?
new MagicEvent(
permanent,
MagicTargetChoice.NEG_TARGET_PLAYER,
this,
"Target player\$ loses 4 life and PN gains 4 life."
) :
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPlayer(game,new MagicPlayerAction() {
public void doAction(final MagicPlayer player) {
game.doAction(new MagicChangeLifeAction(player,-4));
game.doAction(new MagicChangeLifeAction(event.getPlayer(),4));
}
});
}
}
]