Пример #1
0
 public MagicUser(string name, Race characterRace, Dictionary <Attribute, int> attributes, int hitPoints, int xp)
     : base(name, characterRace, attributes, hitPoints, xp)
 {
     SetPrimeRequisite(Attribute.Intelligence);
     SetExperiencePointMultiplier(AttributeBonuses.GetPrimeRequisiteXPBonus(attributes[Attribute.Intelligence]));
     CurrentLevel = GetMagicUserLevel();
 }
Пример #2
0
 public Cleric(string name, Race characterRace, Dictionary <Attribute, int> attributes, int hitPoints, int xp)
     : base(name, characterRace, attributes, hitPoints, xp)
 {
     SetPrimeRequisite(Attribute.Wisdom);
     SetExperiencePointMultiplier(AttributeBonuses.GetPrimeRequisiteXPBonus(attributes[Attribute.Wisdom]));
     CurrentLevel = GetClericLevel();
 }
Пример #3
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();
        }
Пример #4
0
 public Thief(string name, Race characterRace, Dictionary <Attribute, int> attributes, int hitPoints, int xp)
     : base(name, characterRace, attributes, hitPoints, xp)
 {
     SetPrimeRequisite(Attribute.Dexterity);
     SetExperiencePointMultiplier(AttributeBonuses.GetPrimeRequisiteXPBonus(attributes[Attribute.Dexterity]));
     CurrentLevel = GetThiefLevel();
     SetThievesAbilities(CurrentLevel);
 }
Пример #5
0
        public string GetPrimeRequisiteBonusText(Attribute attribute)
        {
            int    attributeScore = OriginalAttributes[attribute];
            int    bonusPercent   = AttributeBonuses.GetPrimeRequisiteXPBonus(attributeScore);
            string bonusText      = "";

            if (bonusPercent == 0)
            {
                bonusText = "No adjustment to experience points";
            }
            else if (bonusPercent > 0)
            {
                bonusText = "+" + bonusPercent + "% from earned experience points";
            }
            else
            {
                bonusText = bonusPercent + "% from earned experience points";
            }
            return(bonusText);
        }
Пример #6
0
        public void SetClass(ClassType classType)
        {
            ClassType = classType;
            int hitPointBonus = AttributeBonuses.GetConstitution_HitPointBonus(OriginalAttributes[Attribute.Constitution]);

            switch (classType)
            {
            case ClassType.Fighter:
            {
                PrimeRequisite = Attribute.Strength;
                HitPoints      = Character.GetAdditionalHitPointsForNewLevel(DiceRoll.Roll(1, DiceType.D8), hitPointBonus);
                break;
            }

            case ClassType.Thief:
            {
                PrimeRequisite = Attribute.Dexterity;
                HitPoints      = Character.GetAdditionalHitPointsForNewLevel(DiceRoll.Roll(1, DiceType.D4), hitPointBonus);
                break;
            }

            case ClassType.MagicUser:
            {
                PrimeRequisite = Attribute.Intelligence;
                HitPoints      = Character.GetAdditionalHitPointsForNewLevel(DiceRoll.Roll(1, DiceType.D4), hitPointBonus);
                break;
            }

            case ClassType.Cleric:
            {
                PrimeRequisite = Attribute.Wisdom;
                HitPoints      = Character.GetAdditionalHitPointsForNewLevel(DiceRoll.Roll(1, DiceType.D6), hitPointBonus);
                break;
            }
            }
        }
Пример #7
0
 private void SetCharimsaBonus(int value)
 {
     ChaBonus_ReactionAdjustment = AttributeBonuses.GetCharimsaBonus_ReactionAdjustment(value);
     ChaBonus_NoOfRetainers      = AttributeBonuses.GetCharimsaBonus_NoOfRetainers(value);
     ChaBonus_RetainerMorale     = AttributeBonuses.GetCharimsaBonus_RetainersMorale(value);
 }
Пример #8
0
 private void SetConstitutionBonus(int value)
 {
     ConBonus_HitPointAdjustment = AttributeBonuses.GetConstitution_HitPointBonus(value);
 }
Пример #9
0
 private void SetWisdomBonus(int value)
 {
     WisBonus_MagicBasedSavingThrowAdjustment = AttributeBonuses.GetWisdomBonus(value);
 }
Пример #10
0
 private void SetDexterityBonus(int value)
 {
     DexBonus_ToHitMissiles        = AttributeBonuses.GetDexterity_ToHitMissilesBonus(value);
     DexBonus_AcAdjustment         = AttributeBonuses.GetDexterity_AcAdjustmentBonus(value);
     DexBonus_InitiativeAdjustment = AttributeBonuses.GetDexterity_InitiativeBonus(value);
 }
Пример #11
0
 private void SetStrenghtBonus(int value)
 {
     StrBonus_ToHit_Damage_ToOpenDoor = AttributeBonuses.GetStrenghtBonus(value);
 }