public static int Modifier(this ProficiencyRank rank) { if (rank == ProficiencyRank.Untrained) { return(-2); } else { int val = (int)rank; return(val + 1); } }
public void AddExperience(int experience) { if (experience > 100) { Debug.LogErrorFormat("Can't increase by more than 100: {0}", experience); } Experience += experience; if (ProficiencyRank.Equals(Rank.S)) { return; } if (Experience >= 100) { ProficiencyRank += 1; Experience %= 100; } }
public Skill(string name, string description, int id, ProficiencyRank proficiency, int abilityScoreId) : base(name, description, id) { Proficiency = proficiency; AbilityScoreId = abilityScoreId; }