/// <summary> /// Calculates the damage modification scale for the given school. /// </summary> /// <returns>The damage modification scale.</returns> /// <param name="school">School.</param> private float CalculateScale(School school) { ResistanceSchool rs = resistanceValues.Find(RS => RS.school == school); if (rs == null) { return(1); } return((1 - (rs.resistancePoints / 1000)) * VulnerabilityModifier); }
/// <summary> /// Increases the resistance to a school. /// </summary> /// <param name="school">School.</param> /// <param name="resistance">Resistance.</param> public void IncreaseResistanceToSchool(School school, float resistance) { //Find the appropriate resistance (add a new one to the list if not already present) ResistanceSchool rs = resistanceValues.Find(RS => RS.school == school); if (rs == null) { rs = new ResistanceSchool(school, 0); resistanceValues.Add(rs); } rs.IncreaseResistance(resistance); }