Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ShrewdHatchlingEffect(), new ManaCostsImpl("{U/R}"));
ability.addTarget(new TargetCreaturePermanent());
this.addAbility(ability);
// Whenever you cast a blue spell, remove a -1/-1 counter from Shrewd Hatchling.
this.addAbility(new SpellCastAllTriggeredAbility(new RemoveCounterSourceEffect(CounterType.M1M1.createInstance()), filter, false, rule));
// Whenever you cast a red spell, remove a -1/-1 counter from Shrewd Hatchling.
this.addAbility(new SpellCastAllTriggeredAbility(new RemoveCounterSourceEffect(CounterType.M1M1.createInstance()), filter2, false, rule2));
}