コード例 #1
0
 /// <summary>
 /// Adds a damage step to the damage formula.
 /// </summary>
 /// <param name="damageStep">The DamageCalcStep to add.</param>
 /// <param name="index">The index to insert the damage step at. If less than 0, it will be added to the end of the list.</param>
 public static void AddDamageStep(DamageCalcStep damageStep, int index = -1)
 {
     if (index < 0)
     {
         DamageCalculationSteps.Add(damageStep);
     }
     else
     {
         DamageCalculationSteps.Insert(index, damageStep);
     }
 }
コード例 #2
0
 /// <summary>
 /// Removes a damage step from the damage formula.
 /// </summary>
 /// <param name="damageStep">The DamageCalcStep to remove.</param>
 /// <returns>true if the damage step was removed, otherwise false.</returns>
 public static bool RemoveDamageStep(DamageCalcStep damageStep)
 {
     return(DamageCalculationSteps.Remove(damageStep));
 }