30 lines
951 B
Groovy
30 lines
951 B
Groovy
[
|
|
new MagicWhenComesIntoPlayTrigger() {
|
|
@Override
|
|
public MagicEvent executeTrigger(
|
|
final MagicGame game,
|
|
final MagicPermanent permanent,
|
|
final MagicPlayer player) {
|
|
return new MagicEvent(
|
|
permanent,
|
|
player,
|
|
this,
|
|
"Tap all other creatures."
|
|
);
|
|
}
|
|
@Override
|
|
public void executeEvent(
|
|
final MagicGame game,
|
|
final MagicEvent event) {
|
|
final Collection<MagicPermanent> targets = game.filterPermanents(
|
|
event.getPlayer(),
|
|
MagicTargetFilter.TARGET_CREATURE);
|
|
for (final MagicPermanent creature : targets) {
|
|
if (creature != event.getPermanent()) {
|
|
game.doAction(new MagicTapAction(creature,true));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|