Exemplo n.º 1
0
 public SkillLevel SkillLevel(Model.Settler.Skill.Skill skill)
 {
     if (Experience.ContainsKey(skill))
     {
         return(Skill.SkillLevel.XPtoLevel(Experience[skill]));
     }
     else
     {
         return(Skill.SkillLevel.Unskilled);
     }
 }
Exemplo n.º 2
0
        public void GainXp(Settlement.Settlement settlement, Model.Settler.Skill.Skill skill, int amount)
        {
            var before = SkillLevel(skill);

            if (Experience.ContainsKey(skill))
            {
                Experience[skill] += amount;
            }
            else
            {
                Experience.Add(skill, amount);
            }
            if (before < SkillLevel(skill))
            {
                settlement.MessageManager.TodaysMessages.Add(new SkillIncreasedMessage(this, skill, SkillLevel(skill)));
            }
        }