40 lines
1.5 KiB
Groovy
40 lines
1.5 KiB
Groovy
[
|
|
new MagicWhenComesIntoPlayTrigger() {
|
|
@Override
|
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final MagicPlayer player) {
|
|
return new MagicEvent(
|
|
permanent,
|
|
player,
|
|
this,
|
|
"Creatures your opponent controls get -2/-2 until end of turn."
|
|
);
|
|
}
|
|
@Override
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
final Collection<MagicPermanent> targets=
|
|
game.filterPermanents(event.getPlayer().getOpponent(),MagicTargetFilter.TARGET_CREATURE_YOU_CONTROL);
|
|
for (final MagicPermanent target : targets) {
|
|
game.doAction(new MagicChangeTurnPTAction(target,-2,-2));
|
|
}
|
|
}
|
|
},
|
|
new MagicWhenOtherPutIntoGraveyardFromPlayTrigger() {
|
|
@Override
|
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent otherPermanent) {
|
|
return (otherPermanent.isEnemy(permanent) &&
|
|
otherPermanent.isCreature()) ?
|
|
new MagicEvent(
|
|
permanent,
|
|
otherPermanent.getController(),
|
|
this,
|
|
"PN loses 2 life."
|
|
):
|
|
MagicEvent.NONE;
|
|
}
|
|
@Override
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
game.doAction(new MagicChangeLifeAction(event.getPlayer(),-2));
|
|
}
|
|
}
|
|
]
|