Add script for Magma Sliver

master
Jericho Pumpkin 2013-09-21 20:11:04 +00:00
parent 09ff8171a5
commit 7161152649
2 changed files with 63 additions and 0 deletions

View File

@ -0,0 +1,51 @@
def MagmaPump = new MagicPermanentActivation(
new MagicActivationHints(MagicTiming.Pump),
"Magma"
) {
@Override
public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
return [
new MagicTapEvent(source)
];
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
final MagicTargetFilter<MagicPermanent> targetFilter = new MagicOtherPermanentTargetFilter(
MagicTargetFilter.TARGET_SLIVER, source);
final MagicTargetChoice targetChoice = new MagicTargetChoice(
targetFilter, true, MagicTargetHint.Positive,
"target Sliver");
return new MagicEvent(
source,
targetChoice,
MagicPumpTargetPicker.create(),
this,
"Target Sliver creature gets +X/+0 until end of turn, " +
"where X is the number of Slivers on the battlefield\$."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPermanent(game,new MagicPermanentAction() {
public void doAction(final MagicPermanent creature) {
final int amount =
creature.getController().getNrOfPermanents(MagicSubType.Sliver) +
creature.getController().getOpponent().getNrOfPermanents(MagicSubType.Sliver);
game.doAction(new MagicChangeTurnPTAction(creature,amount,0));
}
});
}
};
[
new MagicStatic(
MagicLayer.Ability,
MagicTargetFilter.TARGET_SLIVER
) {
@Override
public void modAbilityFlags(final MagicPermanent source,final MagicPermanent permanent,final Set<MagicAbility> flags) {
permanent.addAbility(MagmaPump);
}
}
]

View File

@ -0,0 +1,12 @@
name=Magma Sliver
url=http://magiccards.info/le/en/107.html
image=http://magiccards.info/scans/en/le/107.jpg
value=4.442
rarity=R
type=Creature
subtype=Sliver
cost={3}{R}
pt=3/3
timing=main
static=all
requires_groovy_code