magarena/release/Magarena/scripts/Twilight_Drover.groovy

57 lines
1.9 KiB
Groovy

[
new MagicWhenLeavesPlayTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent, final MagicPermanent left) {
return (left.isCreature() && left.isToken()) ?
new MagicEvent(
permanent,
this,
"PN puts a +1/+1 counter on SN."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicChangeCountersAction(
event.getPermanent(),
MagicCounterType.PlusOne,
1,
true
));
}
},
new MagicPermanentActivation(
[
MagicConditionFactory.ManaCost("{2}{W}"),
MagicCondition.PLUS_COUNTER_CONDITION
],
new MagicActivationHints(MagicTiming.Token),
"Token"
) {
@Override
public MagicEvent[] getCostEvent(final MagicPermanent source) {
return [
new MagicPayManaCostEvent(source,"{2}{W}"),
new MagicRemoveCounterEvent(source,MagicCounterType.PlusOne,1)
];
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
return new MagicEvent(
source,
this,
"PN puts two 1/1 white Spirit creature " +
"tokens with flying onto the battlefield."
);
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicPlayTokensAction(
event.getPlayer(),
TokenCardDefinitions.get("Spirit2"),
2
));
}
}
]