Ejemplo n.º 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();
 }
Ejemplo n.º 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();
 }
Ejemplo n.º 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();
        }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 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;
            }
            }
        }
Ejemplo n.º 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);
 }
Ejemplo n.º 8
0
 private void SetConstitutionBonus(int value)
 {
     ConBonus_HitPointAdjustment = AttributeBonuses.GetConstitution_HitPointBonus(value);
 }
Ejemplo n.º 9
0
 private void SetWisdomBonus(int value)
 {
     WisBonus_MagicBasedSavingThrowAdjustment = AttributeBonuses.GetWisdomBonus(value);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 11
0
 private void SetStrenghtBonus(int value)
 {
     StrBonus_ToHit_Damage_ToOpenDoor = AttributeBonuses.GetStrenghtBonus(value);
 }