Пример #1
0
        public PetInfo Drop(PetParameters parameters, PetDropSettings settings, PetSkillCollection skills, PetPassiveBonusCollection passiveBonuses)
        {
            PetInfo pet = new PetInfo();

            pet.SetId(Guid.NewGuid().ToString());
            pet.SetExp(0);

            pet.SetColor(GetColor(parameters, settings));
            pet.SetType(GetType(parameters, settings));
            pet.SetPassiveSkill(GetPassiveSkill(parameters, settings, passiveBonuses));
            pet.SetActiveSkills(GetActiveSkills(pet.color, parameters, settings, skills));
            pet.SetActive(false);


            float attackBaseAdd  = Rand.Float(parameters.damage.BaseMin(), parameters.damage.BaseMax());
            float attackColorAdd = Rand.Float(parameters.damage.ColorMin(), parameters.damage.ColorMax());
            float attackLevelAdd = Rand.Float(parameters.damage.LevelMin(), parameters.damage.LevelMax());

            pet.SetAttackParameters(attackBaseAdd, attackColorAdd, attackLevelAdd);

            float hpBaseAdd  = Rand.Float(parameters.hp.BaseMin(), parameters.hp.BaseMax());
            float hpColorAdd = Rand.Float(parameters.hp.ColorMin(), parameters.hp.ColorMax());
            float hpLevelAdd = Rand.Float(parameters.hp.LevelMin(), parameters.hp.LevelMax());

            pet.SetHpParameters(hpBaseAdd, hpColorAdd, hpLevelAdd);

            float odBaseAdd  = Rand.Float(parameters.od.BaseMin(), parameters.od.BaseMax());
            float odColorAdd = Rand.Float(parameters.od.ColorMin(), parameters.od.ColorMax());
            float odLevelAdd = Rand.Float(parameters.od.LevelMin(), parameters.od.LevelMax());

            pet.SetOptimalDistanceParameters(odBaseAdd, odColorAdd, odLevelAdd);

            pet.SetDamageType(GetDamageType(parameters, settings));
            pet.SetMastery(GetMastery(parameters, settings));
            return(pet);
        }
Пример #2
0
 private List <PetActiveSkill> GenerateActiveSkills(PetColor color, PetParameters parameters, PetSkillCollection skills)
 {
     return(skills.GetRandomSkills(parameters.activeSkillCountTable[color]));
 }
Пример #3
0
 private List <PetActiveSkill> GetActiveSkills(PetColor color, PetParameters parameters, PetDropSettings settings, PetSkillCollection skills)
 {
     if (settings.generateActiveSkills)
     {
         return(GenerateActiveSkills(color, parameters, skills));
     }
     else
     {
         return(settings.overwriteActiveSkills.Take(parameters.activeSkillCountTable[color]).ToList());
     }
 }