public ChampionUpgrades(JSONArray json_) { foreach (var node in json_) { var skillUpgrade = new SkillUpgrade(node.Value.AsObject); skillUpgradeMap.Add(skillUpgrade.Skill, skillUpgrade); } }
public SkillUpgrade this[Data.Skill.Skill skill_] { get { if (skillUpgradeMap.ContainsKey(skill_)) { return(skillUpgradeMap[skill_]); } var skillUpgrade = new SkillUpgrade(skill_); skillUpgradeMap.Add(skill_, skillUpgrade); return(skillUpgrade); } }
public double OverallWeight() { double cumulativeLevel = 0; foreach (var upgrade in skillUpgrade.MetricUpgradeList()) { var localLevel = upgrade.Level; if (temporaryUpgradeMap.ContainsKey(upgrade)) { localLevel += temporaryUpgradeMap[upgrade]; } cumulativeLevel += Math.Abs(localLevel); } return(SkillUpgrade.OverallWeight(cumulativeLevel)); }
public SkillSpecializer(Champion champion_, SkillUpgrade skillUpgrade_) { champion = champion_; skillUpgrade = skillUpgrade_; }