public override CEquipmentInventory Generate()
        {
            CCultivator.CStats out_  = MinStats.Copy();
            double             scale = Gaus.NextDouble();

            scale /= 10;
            out_.MainStats.Agility = Math.Round(out_.MainStats.Agility + (MaxStats.MainStats.Agility - out_.MainStats.Agility) * scale);
            scale = Gaus.NextDouble() / 10;
            out_.MainStats.Endurance += Math.Round((MaxStats.MainStats.Endurance - out_.MainStats.Endurance) * scale);
            scale = Gaus.NextDouble() / 10;
            out_.MainStats.Intelligence += Math.Round((MaxStats.MainStats.Intelligence - out_.MainStats.Intelligence) * scale);
            scale = Gaus.NextDouble() / 10;
            out_.MainStats.Strength += Math.Round((MaxStats.MainStats.Strength - out_.MainStats.Strength) * scale);
            scale = Gaus.NextDouble() / 10;
            out_.SubStats.Charisma += Math.Round((MaxStats.SubStats.Charisma - out_.SubStats.Charisma) * scale);
            scale = Gaus.NextDouble() / 10;
            out_.SubStats.Luck += Math.Round((MaxStats.SubStats.Luck - out_.SubStats.Luck) * scale);
            scale = Gaus.NextDouble() / 10;
            out_.SubStats.Perception += Math.Round((MaxStats.SubStats.Perception - out_.SubStats.Perception) * scale);
            scale = Gaus.NextDouble() / 10;
            out_.Scales.Agility += (MaxStats.Scales.Agility - out_.Scales.Agility) * scale;
            scale = Gaus.NextDouble() / 10;
            out_.Scales.Endurance += (MaxStats.Scales.Endurance - out_.Scales.Endurance) * scale;
            scale = Gaus.NextDouble() / 10;
            out_.Scales.Intelligence += (MaxStats.Scales.Intelligence - out_.Scales.Intelligence) * scale;
            scale = Gaus.NextDouble() / 10;
            out_.Scales.Strength += (MaxStats.Scales.Strength - out_.Scales.Strength) * scale;
            return(new T
            {
                Bonus = out_,
                Count = 1,
                Id = Id
            });
        }
 // G - переменная от 0 до 10,по сути величина, выпадающая чаще всего
 public CEquipmentGenerator(int id, CCultivator.CStats min, CCultivator.CStats max, double G)
 {
     Id       = id;
     MinStats = min;
     MaxStats = max;
     Gaus     = new NormalRandom(2.2, G);
 }
Exemple #3
0
 public CLeggins(int id, CCultivator.CStats bonus) : base(id, bonus)
 {
 }
Exemple #4
0
 public CHelmet(int id, CCultivator.CStats bonus) : base(id, bonus)
 {
 }
Exemple #5
0
 public CBoots(int id, CCultivator.CStats bonus) : base(id, bonus)
 {
 }
Exemple #6
0
 public CSword(int id, CCultivator.CStats bonus) : base(id, bonus)
 {
 }
Exemple #7
0
 public CPlate(int id, CCultivator.CStats bonus) : base(id, bonus)
 {
 }