コード例 #1
0
        protected Character(string name, Race characterRace, Dictionary <Attribute, int> attributes, int hitPoints, int experiencePoints)
        {
            Name                = name;
            CharactersRace      = characterRace;
            Attributes          = attributes;
            this.hitPoints      = hitPoints;
            ExperiencePoints    = experiencePoints;
            Inventory           = new List <EquipmentItems>();
            EquippedInRightHand = null;
            EquippedInLeftHand  = null;
            EquippedToBody      = null;
            CharacterId         = 0;

            StrBonus_ToHitMeleeBonus_DamageBonus_ToOpenDoorBonus = AttributeBonuses.GetStrenghtBonus(Attributes[Attribute.Strength]);
            DexBonus_ToHitMissilesBonus              = AttributeBonuses.GetDexterity_ToHitMissilesBonus(Attributes[Attribute.Dexterity]);
            DexBonus_AcAdjustment                    = AttributeBonuses.GetDexterity_AcAdjustmentBonus(Attributes[Attribute.Dexterity]);
            DexBonus_InitiativeAdjustment            = AttributeBonuses.GetDexterity_AcAdjustmentBonus(Attributes[Attribute.Dexterity]);
            WisBonus_MagicBasedSavingThrowAdjustment = AttributeBonuses.GetWisdomBonus(Attributes[Attribute.Wisdom]);
            ConBonus_HitPointAdjustment              = AttributeBonuses.GetConstitution_HitPointBonus(Attributes[Attribute.Constitution]);
            ChaBonus_ReactionAdjustment              = AttributeBonuses.GetCharimsaBonus_ReactionAdjustment(Attributes[Attribute.Charisma]);
            ChaBonus_NoOfRetainers                   = AttributeBonuses.GetCharimsaBonus_NoOfRetainers(Attributes[Attribute.Charisma]);
            ChaBonus_RetainerMorale                  = AttributeBonuses.GetCharimsaBonus_RetainersMorale(Attributes[Attribute.Charisma]);

            SetArmourClass();
        }
コード例 #2
0
 private void SetDexterityBonus(int value)
 {
     DexBonus_ToHitMissiles        = AttributeBonuses.GetDexterity_ToHitMissilesBonus(value);
     DexBonus_AcAdjustment         = AttributeBonuses.GetDexterity_AcAdjustmentBonus(value);
     DexBonus_InitiativeAdjustment = AttributeBonuses.GetDexterity_InitiativeBonus(value);
 }