replace groovy code with ability in card script

master
melvin 2013-10-16 20:21:46 +08:00
parent 6e45b06a11
commit 8d7697a0f9
2 changed files with 1 additions and 46 deletions

View File

@ -1,45 +0,0 @@
def TelekineticTap = new MagicPermanentActivation(
new MagicActivationHints(MagicTiming.Tapping),
"Tap"
) {
@Override
public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
return [
new MagicTapEvent(source)
];
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
return new MagicEvent(
source,
MagicTargetChoice.NEG_TARGET_PERMANENT,
MagicTapTargetPicker.Tap,
this,
"Tap target permanent\$."
);
}
@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));
}
});
}
};
[
new MagicStatic(
MagicLayer.Ability,
MagicTargetFilter.TARGET_SLIVER
) {
@Override
public void modAbilityFlags(final MagicPermanent source,final MagicPermanent permanent,final Set<MagicAbility> flags) {
permanent.addAbility(TelekineticTap);
}
}
]

View File

@ -7,6 +7,6 @@ type=Creature
subtype=Sliver subtype=Sliver
cost={2}{U}{U} cost={2}{U}{U}
pt=2/2 pt=2/2
ability=lord all slivers have pay {T} Tap target permanent.
static=all static=all
timing=main timing=main
requires_groovy_code