[ 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, final Object[] choiceResults) { game.addEvent(new MagicPopulateEvent(event.getSource())); } } ]