private WeaponDamageType GenerateDamageType(PetParameters parameters, PetDropSettings settings) { if (Rand.Int() % 2 == 0) { return(WeaponDamageType.damage); } else { return(WeaponDamageType.heal); } }
private WeaponDamageType GetDamageType(PetParameters parameters, PetDropSettings settings) { if (settings.generateDamageType) { return(GenerateDamageType(parameters, settings)); } else { return(settings.overwriteDamageType); } }
private int GetMastery(PetParameters parameters, PetDropSettings settings) { if (settings.setManualMastery) { return(settings.overwriteMastery); } else { return(GenerateMastery()); } }
private int GetPassiveSkill(PetParameters parameters, PetDropSettings settings, PetPassiveBonusCollection passiveBonuses) { if (settings.generatePassiveSkill) { return(GeneratePassiveSkill(parameters, passiveBonuses)); } else { return(settings.overwritePassiveSkill); } }
private string GetType(PetParameters parameters, PetDropSettings settings) { if (settings.generateModel) { return(GenerateModel(parameters, settings)); } else { return(settings.overwriteModel); } }
private PetColor GetColor(PetParameters parameters, PetDropSettings settings) { if (settings.generateColor) { return(GenerateColor(parameters)); } else { return(settings.overwriteColor); } }
private string GenerateModel(PetParameters parameters, PetDropSettings settings) { if (settings.generateRaceForModel) { return(parameters.typeTable.GetRandomType()); } else { var ids = parameters.typeTable.GetTypes(settings.overwriteRace); return(ids[Rand.Int(0, ids.Count - 1)]); } }
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); }
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()); } }