39 lines
1.5 KiB
Groovy
39 lines
1.5 KiB
Groovy
[
|
|
new MagicWhenComesIntoPlayTrigger() {
|
|
@Override
|
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final MagicPayedCost payedCost) {
|
|
return new MagicEvent(
|
|
permanent,
|
|
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 MagicWhenOtherDiesTrigger() {
|
|
@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));
|
|
}
|
|
}
|
|
]
|