Ejemplo n.º 1
0
        /// <summary>
        /// Selects the class for the character
        /// </summary>
        /// <returns>The class that was selected.</returns>
        /// <param name="character">Character to assign class to.</param>
        public CharacterSheet SelectClass(CharacterSheet character)
        {
            character.SetClass(this.classGateway.All().ToList().ChooseOne());
            var hp = new HitPointGenerator();

            character.SetHitPoints(hp.RollHitPoints(character));

            // Assign Age based on class
            var assignAge = new AssignAge();

            character.Age = assignAge.RandomAge(character.Class.ClassDevelopmentAge, maturityGateway.Get(character.Race));

            // Figure out how this class came about
            var classOrigin = new ClassOriginStoryCreator(new ClassOriginYamlGateway());

            character.History.ClassOriginStory = classOrigin.CreateStory(character.Class.Name);

            return(character);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the
 /// <see cref="SilverNeedle.Mechanics.CharacterGenerator.LevelUpGenerator"/> class.
 /// </summary>
 /// <param name="hitPointGen">Generator for hit points.</param>
 public LevelUpGenerator(HitPointGenerator hitPointGen)
 {
     this.hitPointGenerator = hitPointGen;
 }