Add script for Dispatch

master
Jericho Pumpkin 2013-10-15 14:41:47 +00:00
parent d6148da0a1
commit 0cd8959df5
2 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,26 @@
[
new MagicSpellCardEvent() {
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack, final MagicPayedCost payedCost) {
return new MagicEvent(
cardOnStack,
MagicTargetChoice.NEG_TARGET_CREATURE,
MagicTapTargetPicker.Tap,
this,
"Tap target creature\$. " +
"If you control three or more artifacts, exile it."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPermanent(game,new MagicPermanentAction() {
public void doAction(final MagicPermanent permanent) {
game.doAction(new MagicTapAction(permanent,true));
if (MagicCondition.METALCRAFT_CONDITION.accept(event.getSource())) {
game.doAction(new MagicRemoveFromPlayAction(permanent,MagicLocationType.Exile));
}
}
});
}
}
]

View File

@ -0,0 +1,9 @@
name=Dispatch
url=http://magiccards.info/nph/en/7.html
image=http://magiccards.info/scans/en/nph/7.jpg
value=3.968
rarity=U
type=Instant
cost={W}
timing=tapping
requires_groovy_code