magarena/release/Magarena/scripts/Thallid.groovy

46 lines
1.6 KiB
Groovy
Raw Normal View History

2013-03-08 01:01:44 -08:00
[
new MagicAtUpkeepTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPlayer upkeepPlayer) {
return permanent.isController(upkeepPlayer) ?
new MagicEvent(
permanent,
this,
"PN puts a spore counter on SN."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(
final MagicGame game,
2013-03-22 22:00:53 -07:00
final MagicEvent event) {
2013-03-08 01:01:44 -08:00
game.doAction(new MagicChangeCountersAction(event.getPermanent(),MagicCounterType.Charge,1,true));
}
},
new MagicPermanentActivation(
[MagicConditionFactory.ChargeCountersAtLeast(3)],
new MagicActivationHints(MagicTiming.Token),
"Token") {
@Override
public MagicEvent[] getCostEvent(final MagicPermanent source) {
return [
new MagicRemoveCounterEvent(source,MagicCounterType.Charge,3)
];
}
@Override
public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) {
return new MagicEvent(
source,
this,
"PN puts a a 1/1 green Saproling creature token onto the battlefield."
);
}
@Override
public void executeEvent(
final MagicGame game,
2013-03-22 22:00:53 -07:00
final MagicEvent event) {
2013-03-08 01:01:44 -08:00
game.doAction(new MagicPlayTokenAction(event.getPlayer(),TokenCardDefinitions.get("Saproling")));
}
}
]