this.power = new MageInt(4);
this.toughness = new MageInt(4);
// When Kuldotha Flamefiend enters the battlefield, you may sacrifice an artifact. If you do, Kuldotha Flamefiend deals 4 damage divided as you choose among any number of target creatures and/or players.
EntersBattlefieldTriggeredAbility ability =
new EntersBattlefieldTriggeredAbility(new DoIfCostPaid(new DamageMultiEffect(4), new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledArtifactPermanent("an artifact")))), false);
ability.addTarget(new TargetCreatureOrPlayerAmount(4));
this.addAbility(ability);
}