Exemplo n.º 1
0
 public static void RespecReset(Hero hero)
 {
     if (hero == default)
     {
         return;
     }
     DisplayMessage(string.Format("Reset {0}", hero));
     hero.HeroDeveloper.ClearFocuses();
     hero.ClearAttributes();
     using (IEnumerator <SkillObject> enumerator = DefaultSkills.GetAllSkills().GetEnumerator())
     {
         while (enumerator.MoveNext())
         {
             var current = enumerator.Current;
             hero.HeroDeveloper.SetInitialSkillLevel(current, 5);
         }
     }
     hero.HeroDeveloper.SetInitialSkillLevel(DefaultSkills.OneHanded, 10);
     hero.HeroDeveloper.SetInitialSkillLevel(DefaultSkills.TwoHanded, 10);
     hero.HeroDeveloper.SetInitialSkillLevel(DefaultSkills.Polearm, 10);
     hero.HeroDeveloper.SetInitialSkillLevel(DefaultSkills.Bow, 10);
     hero.HeroDeveloper.SetInitialSkillLevel(DefaultSkills.Crossbow, 10);
     hero.HeroDeveloper.SetInitialSkillLevel(DefaultSkills.Throwing, 10);
     hero.ClearPerks();
     HeroHelper.DetermineInitialLevel(hero);
     if (hero == Hero.MainHero)
     {
         for (CharacterAttributesEnum characterAttributesEnum = 0; characterAttributesEnum < CharacterAttributesEnum.End; characterAttributesEnum += 1)
         {
             hero.SetAttributeValue(characterAttributesEnum, 2);
         }
         hero.HeroDeveloper.UnspentAttributePoints = 6;
         hero.HeroDeveloper.UnspentFocusPoints     = 13;
     }
     else
     {
         hero.HeroDeveloper.UnspentAttributePoints = 9;
         hero.HeroDeveloper.UnspentFocusPoints     = 5;
     }
 }