コード例 #1
0
        public Character GenerateFromTemplate(NonPlayerCharacterTemplate template)
        {
            var character = new Character
                {
                    PhysicalStrength = this._characteristicGenerator.Generate(template.PhysicalStrengthRange),
                    ManualDexterity = this._characteristicGenerator.Generate(template.ManualDexterityRange),
                    Agility = this._characteristicGenerator.Generate(template.AgilityRange),
                    MagicalAptitude = this._characteristicGenerator.Generate(template.MagicalAptitudeRange),
                    Willpower = this._characteristicGenerator.Generate(template.WillpowerRange),
                    Endurance = this._characteristicGenerator.Generate(template.EnduranceRange),
                    Fatigue = this._characteristicGenerator.Generate(template.FatigueRange),
                    Perception = this._characteristicGenerator.Generate(template.PerceptionRange),
                    PhysicalBeauty = this._characteristicGenerator.Generate(template.PhysicalBeautyRange),
                    NaturalArmor = this._characteristicGenerator.Generate(template.NaturalArmorRange)
                };

            this._weaponChooser.ChooseWeapons(character);

            // TODO Other stuff

            return character;
        }
コード例 #2
0
 private Character RunGeneratorTest(NonPlayerCharacterTemplate template)
 {
     var generator = new NonPlayerCharacterGenerator();
     return generator.GenerateFromTemplate(template);
 }