示例#1
0
 public Gnome(string name, int year, string sex, int growth, int weight, AbstractClass abstractClass) : base(name, sex, abstractClass)
 {
     if (year > 0 && year < 400)
     {
         this.year = year;
     }
     else
     {
         Console.WriteLine(new Exception("Year not true"));
     }
     if (weight > 0 && weight < 20)
     {
         this.weight = weight;
     }
     else
     {
         Console.WriteLine(new Exception("Weight not true"));
     }
     if (growth > 0 && growth < 120)
     {
         this.growth = growth;
     }
     else
     {
         Console.WriteLine(new Exception("Growth not true"));
     }
 }
示例#2
0
 public Chondathan(string name, int year, string sex, int growth, int weight, AbstractClass abstractClass) : base(name, year, sex, growth, weight, abstractClass)
 {
     addCharacteristic(getArrOfRandomPoints());
     addHumanBonus(false);
     Mod_wisdom       = addModCharacteristic(Dexterity);
     Mod_dexterity    = addModCharacteristic(Dexterity);
     Mod_constitution = addModCharacteristic(Constitution);
     Mod_intelligence = addModCharacteristic(Intelligence);
     Mod_wisdom       = addModCharacteristic(Wisdom);
     Mod_charisma     = addModCharacteristic(Charisma);
     recoveryHealth();
 }
示例#3
0
 public AbstractRaces(string name, string sex, AbstractClass abstractClass)
 {
     this.name          = name;
     this.abstractClass = abstractClass;
     if (sex == "Man" || sex == "Woman" || sex == "Other")
     {
         this.sex = sex;
     }
     else
     {
         Console.WriteLine(new Exception("String is false"));
     }
     foreach (string str in abstractClass.List)
     {
         this.addSavingThrow(str);
     }
 }
示例#4
0
        public Dragonborn(string name, int year, string sex, int growth, int weight, AbstractClass abstractClass) : base(name, sex, abstractClass)
        {
            if (year > 0 && year < 120)
            {
                this.year = year;
            }
            else
            {
                Console.WriteLine(new Exception("Year not true"));
            }
            if (weight > 0 && weight < 125)
            {
                this.weight = weight;
            }
            else
            {
                Console.WriteLine(new Exception("Weight not true"));
            }
            if (growth > 0 && growth < 200)
            {
                this.growth = growth;
            }
            else
            {
                Console.WriteLine(new Exception("Growth not true"));
            }

            addCharacteristic(getArrOfRandomPoints());

            Mod_wisdom       = addModCharacteristic(Dexterity);
            Mod_dexterity    = addModCharacteristic(Dexterity);
            Mod_constitution = addModCharacteristic(Constitution);
            Mod_intelligence = addModCharacteristic(Intelligence);
            Mod_wisdom       = addModCharacteristic(Wisdom);
            Mod_charisma     = addModCharacteristic(Charisma);
            this.AbstractClass.lvlUp(this);
            recoveryHealth();
            this.AbstractClass.lvlUp(this);
        }
示例#5
0
        public HalfElf(string name, int year, string sex, int growth, int weight, AbstractClass abstractClass) : base(name, sex, abstractClass)
        {
            if (year > 0 && year < 180)
            {
                this.year = year;
            }
            else
            {
                Console.WriteLine(new Exception("Year not true"));
            }
            if (weight > 0 && weight < 65)
            {
                this.weight = weight;
            }
            else
            {
                Console.WriteLine(new Exception("Weight not true"));
            }
            if (growth > 0 && growth < 190)
            {
                this.growth = growth;
            }
            else
            {
                Console.WriteLine(new Exception("Growth not true"));
            }

            addCharacteristic(getArrOfRandomPoints());
            //addHalfElfBonus (Wisdom,Intelligence);// не работает
            Mod_wisdom       = addModCharacteristic(Dexterity);
            Mod_dexterity    = addModCharacteristic(Dexterity);
            Mod_constitution = addModCharacteristic(Constitution);
            Mod_intelligence = addModCharacteristic(Intelligence);
            Mod_wisdom       = addModCharacteristic(Wisdom);
            Mod_charisma     = addModCharacteristic(Charisma);
            recoveryHealth();
        }