magarena/release/Magarena/scripts/Claustrophobia.groovy

25 lines
1015 B
Groovy
Raw Normal View History

2013-05-17 22:16:04 -07:00
[
new MagicWhenComesIntoPlayTrigger() {
2013-04-12 19:32:25 -07:00
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPlayer player) {
final MagicPermanent enchantedCreature = permanent.getEnchantedCreature();
return enchantedCreature.isValid() ?
new MagicEvent(
permanent,
this,
"Tap " + enchantedCreature + ". It doesn't " +
2013-05-17 22:16:04 -07:00
"untap during its controller's untap step"
) :
2013-04-12 19:32:25 -07:00
MagicEvent.NONE;
}
@Override
2013-05-17 22:16:04 -07:00
public void executeEvent(final MagicGame game, final MagicEvent event) {
2013-04-12 19:32:25 -07:00
final MagicPermanent permanent= event.getPermanent();
final MagicPermanent enchantedCreature = permanent.getEnchantedCreature();
if (enchantedCreature.isValid()) {
game.doAction(new MagicTapAction(enchantedCreature,true));
}
}
2013-05-17 22:16:04 -07:00
}
]