magarena/release/Magarena/scripts/Frenzied_Goblin.groovy

31 lines
1.2 KiB
Groovy
Raw Normal View History

2013-05-25 20:19:25 -07:00
[
new MagicWhenAttacksTrigger() {
2012-06-17 05:19:08 -07:00
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent creature) {
return (permanent==creature) ?
2011-08-14 00:57:54 -07:00
new MagicEvent(
permanent,
new MagicMayChoice(
2013-02-27 00:47:39 -08:00
new MagicPayManaCostChoice(MagicManaCost.create("{R}")),
MagicTargetChoice.NEG_TARGET_CREATURE
),
new MagicNoCombatTargetPicker(false,true,false),
this,
2013-05-25 20:19:25 -07:00
"You may\$ pay {R}\$. If you do, target creature\$ can't block this turn."
):
2011-09-04 01:19:43 -07:00
MagicEvent.NONE;
2012-06-17 05:19:08 -07:00
}
2013-06-23 18:29:26 -07:00
2012-06-17 05:19:08 -07:00
@Override
2013-03-22 22:00:53 -07:00
public void executeEvent(final MagicGame game, final MagicEvent event) {
if (event.isYes()) {
event.processTargetPermanent(game,new MagicPermanentAction() {
public void doAction(final MagicPermanent creature) {
game.doAction(new MagicGainAbilityAction(creature,MagicAbility.CannotBlock));
2012-06-17 05:19:08 -07:00
}
});
2012-06-17 05:19:08 -07:00
}
}
2013-05-25 20:19:25 -07:00
}
]