magarena/release/Magarena/scripts/Myrsmith.groovy

30 lines
1.1 KiB
Groovy
Raw Normal View History

2013-05-18 18:19:39 -07:00
[
new MagicWhenOtherSpellIsCastTrigger() {
2013-04-12 19:32:25 -07:00
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicCardOnStack spell) {
return (spell.isFriend(permanent) &&
spell.hasType(MagicType.Artifact)) ?
2013-04-12 19:32:25 -07:00
new MagicEvent(
permanent,
new MagicMayChoice(
new MagicPayManaCostChoice(MagicManaCost.create("{1}"))
),
this,
2013-05-18 18:19:39 -07:00
"PN may\$ pay {1}\$. If you do, put a 1/1 " +
2013-04-12 19:32:25 -07:00
"colorless Myr artifact creature token onto the battlefield."
) :
MagicEvent.NONE;
}
2013-06-23 18:29:26 -07:00
2013-04-12 19:32:25 -07:00
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
if (event.isYes()) {
2013-10-21 06:06:58 -07:00
game.doAction(new MagicPlayTokenAction(
event.getPlayer(),
TokenCardDefinitions.get("1/1 colorless Myr artifact creature token")
));
2013-04-12 19:32:25 -07:00
}
}
2013-05-18 18:19:39 -07:00
}
]