Beispiel #1
0
 /// <summary>
 /// Changes a Talent by the given number of points.
 /// </summary>
 /// <param name="stat">Medicine, Speech, Herbalim, BombCrafting, Bestiary, Veterancy, Engineering, or History.</param>
 /// <param name="points">Positive points to increase, negative points to decrease.</param>
 public void AdjustTalent(string stat, int points)
 {
     if (BaseValue.ContainsKey(stat))
     {
         BaseValue[stat] += points;
     }
     else
     {
         throw new ArgumentException("Tried to change an invalid Talent.");
     }
 }
Beispiel #2
0
 /// <summary>
 /// Changes an Attribute by the given points.
 /// </summary>
 /// <param name="stat">STR, DEX, SKL, APT, PER, or CHA</param>
 /// <param name="points">Positive points to increase, negative points to decrease.</param>
 public void AdjustAttribute(string stat, int points)
 {
     if (BaseValue.ContainsKey(stat))
     {
         stat             = stat.ToUpper();
         BaseValue[stat] += points;
         if (BaseValue[stat] < 1)
         {
             BaseValue[stat] = 1;
         }
         else if (BaseValue[stat] > 10)
         {
             BaseValue[stat] = 10;
         }
     }
     else
     {
         throw new ArgumentException("Tried to change an invalid Attribute.");
     }
 }