// {X}{X}{G}: Monstrosity X.
this.addAbility(new MonstrosityAbility("{X}{X}{G}", Integer.MAX_VALUE));
// When Polukranos, World Eater becomes monstrous, it deals X damage divided as you choose among any number of target creatures your opponents control. Each of those creatures deals damage equal to its power to Polukranos.
Ability ability = new BecomesMonstrousSourceTriggeredAbility(new PolukranosWorldEaterEffect());
ability.addTarget(new TargetCreaturePermanentAmount(1, filter));
this.addAbility(ability);
}