Effect effect = new AddCountersSourceEffect(CounterType.P1P1.createInstance(0), new ManaSpentToCastCount(), true);
effect.setText("with a number of +1/+1 counters on it equal to the amount of mana spent to cast it");
this.addAbility(new EntersBattlefieldAbility(effect));
// {X}, Remove X +1/+1 counters from Marath: Choose one - Put X +1/+1 counters on target creature;
effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance(0), new ManacostVariableValue());
effect.setText("Put X +1/+1 counters on target creature");
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{X}"));
ability.addCost(new MarathWillOfTheWildRemoveCountersCost());
ability.addTarget(new TargetCreaturePermanent());
// or Marath deals X damage to target creature or player;
Mode mode = new Mode();
mode.getEffects().add(new DamageTargetEffect(new ManacostVariableValue()));
mode.getTargets().add(new TargetCreatureOrPlayer());
ability.addMode(mode);
// or put an X/X green Elemental creature token onto the battlefield.
mode = new Mode();