Esempio n. 1
0
 private static void AssignClassSkills(CharacterBase character, ClassType type)
 {
     switch (type)
     {
         case ClassType.Bard:
             AssignBardSkills(character);
             break;
         case ClassType.Berserker:
             AssignBerserkerSkills(character);
             break;
         case ClassType.Crusader:
             AssignCrusaderSkills(character);
             break;
         case ClassType.Elementalist:
             AssignElementalistSkills(character);
             break;
         case ClassType.Monk:
             AssignMonkSkills(character);
             break;
         case ClassType.Priest:
             AssignPriestSkills(character);
             break;
         case ClassType.Ranger:
             AssignRangerSkills(character);
             break;
         case ClassType.Rogue:
             AssignRogueSkills(character);
             break;
     }
 }
Esempio n. 2
0
 public override void Consume(CharacterBase consumer)
 {
     consumer.CurrentHealth += PotionValue;
     if (consumer.CurrentHealth > consumer.MaximumHealth)
     {
         consumer.CurrentHealth = consumer.MaximumHealth;
     }
 }
Esempio n. 3
0
 private static void AddSkill(CharacterBase character, SkillType type, int value)
 {
     if (character.SkillExists(type))
     {
         var skill = character.GetSkill(type);
         character.SetSkillValue(type, skill.Value + value);
     }
     else
     {
         character.AddSkill(type, value);
     }
 }
Esempio n. 4
0
        private static void AssignHumanSkills(CharacterBase character)
        {
            character.ModifyAbilityBy(AbilityType.Charisma, 1);

            character.AddSkill(SkillType.LanguageCommon, 100);
            character.AddSkill(SkillType.Block, 5);
            character.AddSkill(SkillType.Fortitude, 5);
            character.AddSkill(SkillType.Leadership, 10);
            character.AddSkill(SkillType.Melee, 10);
            character.AddSkill(SkillType.Ranged, 5);
            character.AddSkill(SkillType.Survival, 5);
        }
Esempio n. 5
0
        private static void AssignElfSkills(CharacterBase character)
        {
            character.ModifyAbilityBy(AbilityType.Constitution, -1);
            character.ModifyAbilityBy(AbilityType.Dexterity, 1);
            character.ModifyAbilityBy(AbilityType.Intelligence, 1);

            character.AddSkill(SkillType.LanguageElf, 100);
            character.AddSkill(SkillType.LanguageCommon, 25);
            character.AddSkill(SkillType.Casting, 10);
            character.AddSkill(SkillType.Concentration, 5);
            character.AddSkill(SkillType.Leadership, 5);
            character.AddSkill(SkillType.Perception, 5);
            character.AddSkill(SkillType.Ranged, 10);
            character.AddSkill(SkillType.Survival, 5);
        }
Esempio n. 6
0
        private static void AssignDwarfSkills(CharacterBase character)
        {
            character.ModifyAbilityBy(AbilityType.Constitution, 1);
            character.ModifyAbilityBy(AbilityType.Dexterity, -2);
            character.ModifyAbilityBy(AbilityType.Strength, 1);
            character.ModifyAbilityBy(AbilityType.Wisdom, 1);

            character.AddSkill(SkillType.LanguageDwarf, 100);
            character.AddSkill(SkillType.LanguageCommon, 25);
            character.AddSkill(SkillType.Block, 5);
            character.AddSkill(SkillType.Concentration, 5);
            character.AddSkill(SkillType.Fortitude, 10);
            character.AddSkill(SkillType.Leadership, 5);
            character.AddSkill(SkillType.Melee, 5);
            character.AddSkill(SkillType.Resistance, 10);
        }
Esempio n. 7
0
        private static void AssignOrcSkills(CharacterBase character)
        {
            character.ModifyAbilityBy(AbilityType.Charisma, -1);
            character.ModifyAbilityBy(AbilityType.Intelligence, -2);
            character.ModifyAbilityBy(AbilityType.Strength, 2);
            character.ModifyAbilityBy(AbilityType.Constitution, 2);

            character.AddSkill(SkillType.LanguageOrc, 100);
            character.AddSkill(SkillType.LanguageCommon, 25);
            character.AddSkill(SkillType.Block, 10);
            character.AddSkill(SkillType.DualWield, 5);
            character.AddSkill(SkillType.Fortitude, 10);
            character.AddSkill(SkillType.Melee, 5);
            character.AddSkill(SkillType.Resistance, 5);
            character.AddSkill(SkillType.Survival, 5);
        }
Esempio n. 8
0
        private static void AssignHalflingSkills(CharacterBase character)
        {
            character.ModifyAbilityBy(AbilityType.Charisma, 1);
            character.ModifyAbilityBy(AbilityType.Constitution, -1);
            character.ModifyAbilityBy(AbilityType.Dexterity, 2);
            character.ModifyAbilityBy(AbilityType.Strength, -1);

            character.AddSkill(SkillType.LanguageHalfling, 100);
            character.AddSkill(SkillType.LanguageCommon, 25);
            character.AddSkill(SkillType.DualWield, 5);
            character.AddSkill(SkillType.Melee, 5);
            character.AddSkill(SkillType.Perception, 5);
            character.AddSkill(SkillType.Ranged, 5);
            character.AddSkill(SkillType.Reflex, 10);
            character.AddSkill(SkillType.Thievery, 10);
        }
Esempio n. 9
0
        private static void AssignBerserkerSkills(CharacterBase character)
        {
            character.ModifyAbilityBy(AbilityType.Strength, 2);

            AddEquipmentProficiency(character, EquipmentCategory.LightArmor);
            AddEquipmentProficiency(character, EquipmentCategory.MediumArmor);
            AddEquipmentProficiency(character, EquipmentCategory.HeavyArmor);

            AddEquipmentProficiency(character, EquipmentCategory.Axes);
            AddEquipmentProficiency(character, EquipmentCategory.Daggers);
            AddEquipmentProficiency(character, EquipmentCategory.ShortBow);
            AddEquipmentProficiency(character, EquipmentCategory.Swords);

            AddSkill(character, SkillType.DualWield, 5);
            AddSkill(character, SkillType.Fortitude, 15);
            AddSkill(character, SkillType.Melee, 15);
            AddSkill(character, SkillType.Resistance, 10);
            AddSkill(character, SkillType.Survival, 5);
        }
Esempio n. 10
0
        private static void AssignBardSkills(CharacterBase character)
        {
            character.ModifyAbilityBy(AbilityType.Charisma, 1);
            character.ModifyAbilityBy(AbilityType.Dexterity, 1);

            AddEquipmentProficiency(character, EquipmentCategory.LightArmor);
            AddEquipmentProficiency(character, EquipmentCategory.MediumArmor);

            AddEquipmentProficiency(character, EquipmentCategory.Daggers);
            AddEquipmentProficiency(character, EquipmentCategory.Swords);
            AddEquipmentProficiency(character, EquipmentCategory.ShortBow);
            AddEquipmentProficiency(character, EquipmentCategory.CrossBow);

            AddSkill(character, SkillType.Casting, 10);
            AddSkill(character, SkillType.Concentration, 10);
            AddSkill(character, SkillType.Melee, 5);
            AddSkill(character, SkillType.Ranged, 10);
            AddSkill(character, SkillType.Survival, 15);
        }
Esempio n. 11
0
        private static void AssignCrusaderSkills(CharacterBase character)
        {
            character.ModifyAbilityBy(AbilityType.Strength, 1);
            character.ModifyAbilityBy(AbilityType.Constitution, 1);

            AddEquipmentProficiency(character, EquipmentCategory.LightArmor);
            AddEquipmentProficiency(character, EquipmentCategory.MediumArmor);
            AddEquipmentProficiency(character, EquipmentCategory.HeavyArmor);
            AddEquipmentProficiency(character, EquipmentCategory.Shields);

            AddEquipmentProficiency(character, EquipmentCategory.Daggers);
            AddEquipmentProficiency(character, EquipmentCategory.GreatSword);
            AddEquipmentProficiency(character, EquipmentCategory.ShortBow);
            AddEquipmentProficiency(character, EquipmentCategory.Swords);

            AddSkill(character, SkillType.Casting, 5);
            AddSkill(character, SkillType.Concentration, 5);
            AddSkill(character, SkillType.Fortitude, 10);
            AddSkill(character, SkillType.Leadership, 15);
            AddSkill(character, SkillType.Melee, 10);
            AddSkill(character, SkillType.Resistance, 5);
        }
Esempio n. 12
0
        private static void AssignRogueSkills(CharacterBase character)
        {
            character.ModifyAbilityBy(AbilityType.Dexterity, 2);

            AddEquipmentProficiency(character, EquipmentCategory.LightArmor);
            AddEquipmentProficiency(character, EquipmentCategory.MediumArmor);

            AddEquipmentProficiency(character, EquipmentCategory.Daggers);
            AddEquipmentProficiency(character, EquipmentCategory.ShortBow);
            AddEquipmentProficiency(character, EquipmentCategory.Swords);

            AddSkill(character, SkillType.DualWield, 15);
            AddSkill(character, SkillType.Melee, 5);
            AddSkill(character, SkillType.Perception, 5);
            AddSkill(character, SkillType.Reflex, 10);
            AddSkill(character, SkillType.Thievery, 15);
        }
Esempio n. 13
0
 private static void AssignRacialSkills(CharacterBase character)
 {
     switch (character.Race)
     {
         case RaceType.Dwarf:
             AssignDwarfSkills(character);
             break;
         case RaceType.Elf:
             AssignElfSkills(character);
             break;
         case RaceType.Halfling:
             AssignHalflingSkills(character);
             break;
         case RaceType.Human:
             AssignHumanSkills(character);
             break;
         case RaceType.Orc:
             AssignOrcSkills(character);
             break;
     }
 }
Esempio n. 14
0
        private static void AssignRangerSkills(CharacterBase character)
        {
            character.ModifyAbilityBy(AbilityType.Dexterity, 1);
            character.ModifyAbilityBy(AbilityType.Intelligence, 1);

            AddEquipmentProficiency(character, EquipmentCategory.LightArmor);
            AddEquipmentProficiency(character, EquipmentCategory.MediumArmor);
            AddEquipmentProficiency(character, EquipmentCategory.Shields);

            AddEquipmentProficiency(character, EquipmentCategory.Axes);
            AddEquipmentProficiency(character, EquipmentCategory.CompoundBow);
            AddEquipmentProficiency(character, EquipmentCategory.CrossBow);
            AddEquipmentProficiency(character, EquipmentCategory.Daggers);
            AddEquipmentProficiency(character, EquipmentCategory.LongBow);
            AddEquipmentProficiency(character, EquipmentCategory.ShortBow);
            AddEquipmentProficiency(character, EquipmentCategory.Swords);

            AddSkill(character, SkillType.Block, 5);
            AddSkill(character, SkillType.Casting, 5);
            AddSkill(character, SkillType.Fortitude, 5);
            AddSkill(character, SkillType.Melee, 10);
            AddSkill(character, SkillType.Perception, 5);
            AddSkill(character, SkillType.Ranged, 15);
            AddSkill(character, SkillType.Survival, 5);
        }
Esempio n. 15
0
 private static void AddEquipmentProficiency(CharacterBase character, EquipmentCategory type)
 {
     if (character.Proficiencies.Contains(type))
         return;
     character.Proficiencies.Add(type);
 }
Esempio n. 16
0
        private static void AssignPriestSkills(CharacterBase character)
        {
            character.ModifyAbilityBy(AbilityType.Wisdom, 2);

            AddEquipmentProficiency(character, EquipmentCategory.LightArmor);
            AddEquipmentProficiency(character, EquipmentCategory.Icons);

            AddEquipmentProficiency(character, EquipmentCategory.Staves);
            AddEquipmentProficiency(character, EquipmentCategory.ShortBow);

            AddSkill(character, SkillType.Casting, 15);
            AddSkill(character, SkillType.Concentration, 10);
            AddSkill(character, SkillType.Fortitude, 5);
            AddSkill(character, SkillType.Leadership, 5);
            AddSkill(character, SkillType.Resistance, 15);
        }
Esempio n. 17
0
 public override AttackResult Attack(CharacterBase attacker, CharacterBase defender)
 {
     throw new NotImplementedException();
 }
Esempio n. 18
0
 public abstract AttackResult Attack(CharacterBase attacker, CharacterBase defender);
Esempio n. 19
0
        private static void AssignElementalistSkills(CharacterBase character)
        {
            character.ModifyAbilityBy(AbilityType.Intelligence, 2);

            AddEquipmentProficiency(character, EquipmentCategory.LightArmor);
            AddEquipmentProficiency(character, EquipmentCategory.Icons);

            AddEquipmentProficiency(character, EquipmentCategory.Daggers);
            AddEquipmentProficiency(character, EquipmentCategory.ShortBow);
            AddEquipmentProficiency(character, EquipmentCategory.Staves);

            AddSkill(character, SkillType.Casting, 20);
            AddSkill(character, SkillType.Concentration, 15);
            AddSkill(character, SkillType.Reflex, 5);
            AddSkill(character, SkillType.Resistance, 10);
        }
Esempio n. 20
0
        private static void AssignMonkSkills(CharacterBase character)
        {
            character.ModifyAbilityBy(AbilityType.Dexterity, 1);
            character.ModifyAbilityBy(AbilityType.Strength, 1);

            AddEquipmentProficiency(character, EquipmentCategory.LightArmor);
            AddEquipmentProficiency(character, EquipmentCategory.MediumArmor);

            AddEquipmentProficiency(character, EquipmentCategory.Daggers);
            AddEquipmentProficiency(character, EquipmentCategory.Staves);
            AddEquipmentProficiency(character, EquipmentCategory.ShortBow);
            AddEquipmentProficiency(character, EquipmentCategory.Swords);

            AddSkill(character, SkillType.Casting, 5);
            AddSkill(character, SkillType.DualWield, 10);
            AddSkill(character, SkillType.Reflex, 15);
            AddSkill(character, SkillType.Perception, 5);
            AddSkill(character, SkillType.Melee, 15);
        }
Esempio n. 21
0
 public abstract void Consume(CharacterBase consumer);
Esempio n. 22
0
 public bool Equip(CharacterBase character, EquipmentBase item, EquipmentType location)
 {
     if (item.CanEquip(character, location))
     {
         switch (location)
         {
             case EquipmentType.Arms:
                 if(Arms != null) character.Inventory.Add(Arms);
                 Arms = item;
                 break;
             case EquipmentType.Boots:
                 if (Boots != null) character.Inventory.Add(Boots);
                 Boots = item;
                 break;
             case EquipmentType.Bracelet:
                 if (Boots != null) character.Inventory.Add(Boots);
                 Boots = item;
                 break;
             case EquipmentType.Cape:
                 if (Cape != null) character.Inventory.Add(Cape);
                 Cape = item;
                 break;
             case EquipmentType.Chest:
                 if (Chest != null) character.Inventory.Add(Chest);
                 Chest = item;
                 break;
             case EquipmentType.Finger:
                 if (Finger != null) character.Inventory.Add(Finger);
                 Finger = item;
                 break;
             case EquipmentType.Gloves:
                 if (Gloves != null) character.Inventory.Add(Gloves);
                 Gloves = item;
                 break;
             case EquipmentType.Helmet:
                 if (Head != null) character.Inventory.Add(Head);
                 Head = item;
                 break;
             case EquipmentType.Legs:
                 if (Legs != null) character.Inventory.Add(Legs);
                 Legs = item;
                 break;
             case EquipmentType.MainHand:
                 if (MainWeapon != null) character.Inventory.Add(MainWeapon);
                 if (OffHand != null && item.Types.Contains(EquipmentType.TwoHand)) character.Inventory.Add(OffHand);
                 MainWeapon = item;
                 break;
             case EquipmentType.Necklace:
                 if (Neck != null) character.Inventory.Add(Neck);
                 Neck = item;
                 break;
             case EquipmentType.Ranged:
                 if (Ranged != null) character.Inventory.Add(Ranged);
                 Ranged = item;
                 break;
             case EquipmentType.SecondaryHand:
                 if (OffHand != null) character.Inventory.Add(OffHand);
                 if (MainWeapon.Types.Contains(EquipmentType.TwoHand)) character.Inventory.Add(MainWeapon);
                 OffHand = item;
                 break;
             case EquipmentType.Shoulders:
                 if (Shoulders != null) character.Inventory.Add(Shoulders);
                 Shoulders = item;
                 break;
         }
     }
     return true;
 }