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); }
public CLeggins(int id, CCultivator.CStats bonus) : base(id, bonus) { }
public CHelmet(int id, CCultivator.CStats bonus) : base(id, bonus) { }
public CBoots(int id, CCultivator.CStats bonus) : base(id, bonus) { }
public CSword(int id, CCultivator.CStats bonus) : base(id, bonus) { }
public CPlate(int id, CCultivator.CStats bonus) : base(id, bonus) { }