private (double Heal, DamageOutput Damage) CalculateNumericEffects(Xml.Castable castable, Xml.ModifierEffect effect, Creature source) { double heal = 0; DamageOutput dmg = new DamageOutput(); if (!effect.Heal.IsEmpty) { heal = NumberCruncher.CalculateHeal(castable, effect, Target, source, Name); } if (!effect.Damage.IsEmpty) { dmg = NumberCruncher.CalculateDamage(castable, effect, Target, source, Name); } return(heal, dmg); }
private void ProcessDamageEffects(ModifierEffect effect) { if (!effect.Heal.IsEmpty) { var heal = NumberCruncher.CalculateHeal(Castable, effect, Target, Source, Name); if (heal != 0) { Target.Heal(heal); } } if (!effect.Damage.IsEmpty) { var dmg = NumberCruncher.CalculateDamage(Castable, effect, Target, Source, Name); if (dmg.Amount != 0) { Target.Damage(dmg.Amount, Enums.Element.None, dmg.Type); } } }