magarena/release/Magarena/scripts/Siege_Gang_Commander.groovy

53 lines
1.9 KiB
Groovy
Raw Normal View History

2013-05-30 20:28:02 -07:00
[
new MagicPermanentActivation(
new MagicActivationHints(MagicTiming.Removal,true),
"Damage"
) {
@Override
public Iterable<MagicEvent> getCostEvent(final MagicPermanent source) {
2013-06-23 18:29:26 -07:00
return [
2013-05-30 20:28:02 -07:00
new MagicPayManaCostEvent(source,"{1}{R}"),
new MagicSacrificePermanentEvent(source,MagicTargetChoice.SACRIFICE_GOBLIN)
];
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
return new MagicEvent(
source,
MagicTargetChoice.NEG_TARGET_CREATURE_OR_PLAYER,
new MagicDamageTargetPicker(2),
this,
"SN deals 2 damage to target creature or player\$."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTarget(game,new MagicTargetAction() {
public void doAction(final MagicTarget target) {
final MagicDamage damage=new MagicDamage(event.getSource(),target,2);
game.doAction(new MagicDealDamageAction(damage));
}
});
}
},
new MagicWhenComesIntoPlayTrigger() {
@Override
2013-06-19 07:23:35 -07:00
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final MagicPayedCost payedCost) {
2013-05-30 20:28:02 -07:00
return new MagicEvent(
permanent,
this,
"PN puts three 1/1 red Goblin creature tokens onto the battlefield."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicPlayTokensAction(
event.getPlayer(),
TokenCardDefinitions.get("Goblin1"),
3
));
2013-06-23 18:29:26 -07:00
}
2013-05-30 20:28:02 -07:00
}
]