public bool IsSameKind(DamageTemplate template) { if (DamageType == template.DamageType) { if (SituationalDamageModifier == template.SituationalDamageModifier) { return(true); } } return(false); }
public void Add(DamageTemplate to_combine) { if (!this.IsSameKind(to_combine)) { throw new Exception("Trying to combine non likely DamageTemplates, try using DamageTemplate.IsSameKind() before calling DamageTemplate.Add()"); } foreach (DnDToolsLibrary.Dice.Dices dices in to_combine.Damage.DicesList) { this.Damage.AddDice(dices); } this.Damage.Modifier += to_combine.Damage.Modifier; }