コード例 #1
0
 public static int Modifier(this ProficiencyRank rank)
 {
     if (rank == ProficiencyRank.Untrained)
     {
         return(-2);
     }
     else
     {
         int val = (int)rank;
         return(val + 1);
     }
 }
コード例 #2
0
        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;
            }
        }
コード例 #3
0
 public Skill(string name, string description, int id, ProficiencyRank proficiency, int abilityScoreId)
     : base(name, description, id)
 {
     Proficiency    = proficiency;
     AbilityScoreId = abilityScoreId;
 }