示例#1
0
 public ChampionUpgrades(JSONArray json_)
 {
     foreach (var node in json_)
     {
         var skillUpgrade = new SkillUpgrade(node.Value.AsObject);
         skillUpgradeMap.Add(skillUpgrade.Skill, skillUpgrade);
     }
 }
示例#2
0
        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);
            }
        }
示例#3
0
        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));
        }
示例#4
0
 public SkillSpecializer(Champion champion_, SkillUpgrade skillUpgrade_)
 {
     champion     = champion_;
     skillUpgrade = skillUpgrade_;
 }