magarena/release/Magarena/scripts/Mirran_Mettle.groovy

25 lines
1.0 KiB
Groovy
Raw Normal View History

2013-10-15 22:39:10 -07:00
[
new MagicSpellCardEvent() {
@Override
public MagicEvent getEvent(final MagicCardOnStack cardOnStack,final MagicPayedCost payedCost) {
return new MagicEvent(
cardOnStack,
MagicTargetChoice.POS_TARGET_CREATURE,
MagicPumpTargetPicker.create(),
this,
"Target creature\$ gets +2/+2 until end of turn. " +
"If you control three or more artifacts, it gets +4/+4 instead."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPermanent(game,new MagicPermanentAction() {
public void doAction(final MagicPermanent targetPermanent) {
final int amount = MagicCondition.METALCRAFT_CONDITION.accept(event.getSource()) ? 4 : 2;
2013-10-20 05:33:08 -07:00
game.doAction(new MagicChangeTurnPTAction(targetPermanent,amount,amount));
2013-10-15 22:39:10 -07:00
}
});
}
}
]