Example #1
0
        /// <summary>计算伙伴属性战力</summary>
        public static float GetSelfAttributeCombatPower(LTPartnerData partnerData)
        {
            LTAttributesData attr  = GetPartnerAllAttributesByParnterData(partnerData);//所有基础属性
            float            power = attr.Power() * (1 + attr.PowerPer());

            return(power);
        }
Example #2
0
        /// <summary>计算技能及装备套装加成的战力</summary>
        public static float GetOtherCombatPower(LTAttributesData attr, int[] _skill, int[] skill_level, List <int> ECid, int infoId, int star, int awakenlevel)
        {
            SkillTemplate commonSkillTem  = SkillTemplateManager.Instance.GetTemplateWithAwake(infoId, _skill[0], awakenlevel);
            SkillTemplate passiveSkillTem = SkillTemplateManager.Instance.GetTemplateWithAwake(infoId, _skill[1], awakenlevel);
            SkillTemplate activeSkillTem  = SkillTemplateManager.Instance.GetTemplateWithAwake(infoId, _skill[2], awakenlevel);
            float         skillPer        = skill_level[0] * commonSkillTem.BattleRating +
                                            skill_level[1] * passiveSkillTem.BattleRating +
                                            skill_level[2] * activeSkillTem.BattleRating;
            int           skillid;
            SkillTemplate skilltemp;

            switch (star)
            {
            case 5:
                skillid   = CharacterTemplateManager.Instance.GetHeroStatByInfoId(infoId).starskill5;
                skilltemp = SkillTemplateManager.Instance.GetTemplate(skillid);
                skillPer += skilltemp.BattleRating;
                break;

            case 6:
                skillid   = CharacterTemplateManager.Instance.GetHeroStatByInfoId(infoId).starskill5;
                skilltemp = SkillTemplateManager.Instance.GetTemplate(skillid);
                skillPer += skilltemp.BattleRating;
                skillid   = CharacterTemplateManager.Instance.GetHeroStatByInfoId(infoId).starskill6;
                skilltemp = SkillTemplateManager.Instance.GetTemplate(skillid);
                skillPer += skilltemp.BattleRating;
                break;

            default:
                break;
            }

            skillPer += GetEquipSuitPer(ECid);
            float power = attr.Power() * (1 + attr.PowerPer()) * (1 + skillPer);

            return(power);
        }