magarena/release/Magarena/scripts/Mad_Auntie.groovy

58 lines
1.9 KiB
Groovy
Raw Normal View History

2013-05-30 05:48:25 -07:00
[
new MagicStatic(
2013-04-12 19:32:25 -07:00
MagicLayer.ModPT,
MagicTargetFilter.TARGET_GOBLIN_YOU_CONTROL
) {
@Override
public void modPowerToughness(final MagicPermanent source,
final MagicPermanent permanent, final MagicPowerToughness pt) {
pt.add(1, 1);
}
@Override
public boolean condition(final MagicGame game,
final MagicPermanent source, final MagicPermanent target) {
return source != target;
}
2013-05-30 05:48:25 -07:00
},
new MagicPermanentActivation(
[MagicCondition.CAN_TAP_CONDITION],
2013-04-12 19:32:25 -07:00
new MagicActivationHints(MagicTiming.Pump, false),
"Regen"
) {
@Override
public MagicEvent[] getCostEvent(final MagicPermanent source) {
2013-05-30 05:48:25 -07:00
return [
2013-04-12 19:32:25 -07:00
new MagicTapEvent(source)
2013-05-30 05:48:25 -07:00
];
2013-04-12 19:32:25 -07:00
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source, final MagicPayedCost payedCost) {
final MagicTargetFilter<MagicPermanent> targetFilter = new MagicTargetFilter.MagicOtherPermanentTargetFilter(
MagicTargetFilter.TARGET_GOBLIN_CREATURE, source);
final MagicTargetChoice targetChoice = new MagicTargetChoice(
targetFilter, true, MagicTargetHint.Positive,
"another target Goblin");
return new MagicEvent(
source,
targetChoice,
MagicRegenerateTargetPicker.getInstance(),
this,
2013-05-30 05:48:25 -07:00
"Regenerate another target Goblin\$."
2013-04-12 19:32:25 -07:00
);
}
@Override
2013-05-30 05:48:25 -07:00
public void executeEvent(final MagicGame game, final MagicEvent event) {
2013-04-12 19:32:25 -07:00
event.processTargetPermanent(game,
new MagicPermanentAction() {
public void doAction(final MagicPermanent creature) {
game.doAction(new MagicRegenerateAction(creature));
}
});
}
2013-05-30 05:48:25 -07:00
}
]