magarena/release/Magarena/scripts/Elder_Cathar.groovy

31 lines
1.2 KiB
Groovy
Raw Normal View History

2013-05-26 06:28:34 -07:00
[
new MagicWhenDiesTrigger() {
2013-05-26 06:28:34 -07:00
@Override
public MagicEvent executeTrigger(final MagicGame game, final MagicPermanent permanent, final MagicMoveCardAction data) {
return new MagicEvent(
permanent,
MagicTargetChoice.TARGET_CREATURE_YOU_CONTROL,
MagicPumpTargetPicker.create(),
this,
"PN puts a +1/+1 counter on target creature\$ he or she controls. " +
"If that creature is a Human, put two +1/+1 counters on it instead."
);
2013-05-26 06:28:34 -07:00
}
2013-06-23 18:29:26 -07:00
2013-05-26 06:28:34 -07:00
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
event.processTargetPermanent(game,new MagicPermanentAction() {
public void doAction(final MagicPermanent creature) {
final int amount = creature.hasSubType(MagicSubType.Human) ? 2 : 1;
game.doAction(new MagicChangeCountersAction(
creature,
MagicCounterType.PlusOne,
amount,
true
));
}
});
}
}
]