29 lines
1.0 KiB
Groovy
29 lines
1.0 KiB
Groovy
[
|
|
new MagicCDA() {
|
|
@Override
|
|
public void modPowerToughness(final MagicGame game, final MagicPlayer player, final MagicPowerToughness pt) {
|
|
final int amount = player.getNrOfPermanentsWithType(MagicType.Creature);
|
|
pt.set(amount, amount);
|
|
}
|
|
},
|
|
new MagicWhenDamageIsDealtTrigger() {
|
|
@Override
|
|
public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicDamage damage) {
|
|
final MagicSource source = damage.getSource();
|
|
return (source == permanent &&
|
|
damage.isCombat() &&
|
|
damage.getTarget().isPlayer()) ?
|
|
new MagicEvent(
|
|
permanent,
|
|
this,
|
|
"Populate."
|
|
):
|
|
MagicEvent.NONE;
|
|
}
|
|
@Override
|
|
public void executeEvent(final MagicGame game, final MagicEvent event) {
|
|
game.addEvent(new MagicPopulateEvent(event.getSource()));
|
|
}
|
|
}
|
|
]
|