magarena/release/Magarena/scripts/Rakish_Heir.groovy

25 lines
967 B
Groovy
Raw Normal View History

2013-05-18 19:32:09 -07:00
[
new MagicWhenDamageIsDealtTrigger() {
@Override
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicDamage damage) {
final MagicSource dmgSource = damage.getSource();
2013-06-23 18:29:26 -07:00
return (damage.isCombat() &&
2013-05-18 19:32:09 -07:00
damage.getTarget().isPlayer() &&
2013-06-06 06:03:49 -07:00
permanent.isFriend(dmgSource) &&
dmgSource.isCreature() &&
2013-05-18 19:32:09 -07:00
dmgSource.hasSubType(MagicSubType.Vampire)) ?
new MagicEvent(
permanent,
dmgSource,
this,
"Put a +1/+1 counter on RN."
):
MagicEvent.NONE;
}
@Override
public void executeEvent(final MagicGame game, final MagicEvent event) {
game.doAction(new MagicChangeCountersAction(event.getRefPermanent(),MagicCounterType.PlusOne,1,true));
}
}
]