Пример #1
0
 private void ChooseProffesion(ProffesionType type)
 {
     Inventory = new Inventory();
     if (type.Equals(ProffesionType.Archer))
     {
         Inventory.helmet    = new Armor("Archer's helmet", 100, 10, 0);
         Inventory.chesplate = new Armor("Archer's chestplate", 100, 10, 0);
         Inventory.leggings  = new Armor("Archer's leggings", 100, 10, 0);
         Inventory.boots     = new Armor("Archer's boots", 100, 10, 0);
         Inventory.oneHand   = new Weapon("Archer's bow", 100, 50, WeaponType.Bow, 0);
     }
     else if (type.Equals(ProffesionType.Mage))
     {
         Inventory.helmet    = new Armor("Mage's helmet", 100, 15, 0);
         Inventory.chesplate = new Armor("Mage's chestplate", 100, 15, 0);
         Inventory.leggings  = new Armor("Mage's leggings", 100, 15, 0);
         Inventory.boots     = new Armor("Mage's boots", 100, 15, 0);
         Inventory.oneHand   = new Weapon("Mage's magic wand", 100, 70, WeaponType.MagicWand, 0);
     }
     else if (type.Equals(ProffesionType.Warrior))
     {
         Inventory.helmet    = new Armor("Warrior's helmet", 150, 20, 0);
         Inventory.chesplate = new Armor("Warrior's chestplate", 150, 20, 0);
         Inventory.leggings  = new Armor("Warrior's leggings", 150, 20, 0);
         Inventory.boots     = new Armor("Warrior's boots", 150, 20, 0);
         Inventory.oneHand   = new Weapon("Warrior's sword", 150, 200, WeaponType.Sword, 0);
     }
 }
Пример #2
0
        public Hero(string name, RaceType race, ProffesionType proffesion, double maxHealth)
        {
            Name         = name;
            Race         = race;
            Proffesion   = proffesion;
            MAX_HEALTH   = maxHealth;
            Strength     = 10;
            Agility      = 10;
            Intelligence = 10;
            Endurance    = 10;
            BasedDamage  = 100;
            IsAlive      = true;

            ChooseRace(race);
            ChooseProffesion(proffesion);

            CurrentHealth  = MAX_HEALTH;
            CurrentMana    = MAX_MANA;
            CurrentStamina = MAX_STAMINA;
        }