| | |
| | | // public Dictionary<string, int> lineUpPerDict = new Dictionary<string, int>(); //阵容属性加成 |
| | | public Dictionary<int, int> countryAttrs = new Dictionary<int, int>(); //阵容国家(光环)属性 |
| | | public Dictionary<int, long> minggeAttrs = new Dictionary<int, long>(); //命格属性 |
| | | |
| | | public Dictionary<int, long> djgAttrs = new Dictionary<int, long>(); //定军阁属性 |
| | | double allHeroAddPer = 0; //所有武将加成 |
| | | |
| | | //等级属性 |
| | |
| | | var beautyPer = BeautyMMManager.Instance.GetAttrPer(attrType) / 10000.0; |
| | | var fatesValue = HeroFatesManager.Instance.GetAttrValue(attrType); |
| | | var fatesPer = HeroFatesManager.Instance.GetAttrPer(attrType) / 10000.0; |
| | | var dingjungeValue = 0; //默认不需要加,爬塔特殊用,配合公式 |
| | | var dingjungePer = 0; //默认不需要加,爬塔特殊用,配合公式 |
| | | |
| | | djgAttrs.TryGetValue(attrType, out var dingjungeValue); |
| | | var dingjungePer = GetAttrPer(attrType, djgAttrs) / 10000.0; //默认不需要加,爬塔特殊用,配合公式 |
| | | |
| | | minggeAttrs.TryGetValue(attrType, out var minggeValue); |
| | | var minggePer = GetAttrPer(attrType, minggeAttrs) / 10000.0; |
| | | |
| | |
| | | var heroLVValue = hero.GetHeroLVValue(attrType); |
| | | |
| | | //武将皮肤 |
| | | var skinValue = 0; |
| | | var skinPer = 0; |
| | | var heroSkinValue = 0; |
| | | var skinValue = HeroUIManager.Instance.GetSkinAttrValue(attrType); |
| | | var skinPer = HeroUIManager.Instance.GetSkinAttrPer(attrType) / 10000.0; |
| | | var heroSkinValue = hero.GetHeroSkinValue(attrType); |
| | | |
| | | |
| | | double value = (lvValue+equipValue+realmValue+gubaoValue+hjgValue+horseValue+beautyValue+fatesValue+skinValue+dingjungeValue+minggeValue)*(1+lineupHaloPer+realmPer+gubaoPer+hjgPer+horsePer+beautyPer+fatesPer+skinPer+cardPer+minggePer)*(inheritPer+fetterPer+starTalentPer+breakLVPer+awakeTalentPer)*(1+dingjungePer)+heroSelfValue+heroLVValue+heroSkinValue; |
| | |
| | | var horseValue = HorseManager.Instance.GetAttrValue(attrType); |
| | | var beautyValue = BeautyMMManager.Instance.GetAttrValue(attrType); |
| | | var fatesValue = HeroFatesManager.Instance.GetAttrValue(attrType); |
| | | var dingjungeValue = 0; //默认不需要加,爬塔特殊用,配合公式 |
| | | djgAttrs.TryGetValue(attrType, out var dingjungeValue); |
| | | minggeAttrs.TryGetValue(attrType, out var minggeValue); |
| | | |
| | | //阵容光环 三围百分比加成 |
| | |
| | | var fetterValue = hero.GetFetterAttrValue(attrType); |
| | | |
| | | //武将皮肤 |
| | | var heroSkinValue = 0; |
| | | var heroSkinValue = hero.GetHeroSkinValue(attrType); |
| | | |
| | | double value = (lvValue+equipValue+realmValue+gubaoValue+hjgValue+horseValue+beautyValue+fatesValue+dingjungeValue+minggeValue)+(heroSelfValue+heroSkinValue+lineupHaloValue+starTalentValue+breakLVValue+awakeTalentValue)+fetterValue; |
| | | |
| | |
| | | RefreshOfficialAttrs(); |
| | | RefrehEquipAttrs(); |
| | | RefrehMinggeAttrs(); |
| | | |
| | | djgAttrs.Clear(); |
| | | |
| | | bool diffFP = lastFightPower != PlayerDatas.Instance.baseData.FightPower; //战力是否有变化 |
| | | if (diffFP || calcType == 0) |
| | | { |
| | |
| | | public long CalculateTeamHeroPower(HeroInfo hero) |
| | | { |
| | | hero.RefreshFetterAttrsWhenCalcPower(teamTypeCalc); //羁绊属性要实时算 |
| | | hero.RefreshInheritPer(); |
| | | |
| | | var Atk = GetPropertyVaule(6, hero); |
| | | var Def = GetPropertyVaule(7, hero); |
| | | var MaxHP = GetPropertyVaule(8, hero); |
| | | var AtkSpeed = GetFighttPropertyVaule(11, hero); |
| | | var StunRate = GetFighttPropertyVaule(21, hero); |
| | | var StunRateDef = GetFighttPropertyVaule(22, hero); |
| | | var SuperHitRate = GetFighttPropertyVaule(23, hero); |
| | | var SuperHitRateDef = GetFighttPropertyVaule(24, hero); |
| | | var ComboRate = GetFighttPropertyVaule(25, hero); |
| | | var ComboRateDef = GetFighttPropertyVaule(26, hero); |
| | | var MissRate = GetFighttPropertyVaule(27, hero); |
| | | var MissRateDef = GetFighttPropertyVaule(28, hero); |
| | | var ParryRate = GetFighttPropertyVaule(29, hero); |
| | | var ParryRateDef = GetFighttPropertyVaule(30, hero); |
| | | var SuckHPPer = GetFighttPropertyVaule(31, hero); |
| | | var SuckHPPerDef = GetFighttPropertyVaule(32, hero); |
| | | var StunRate = GetFighttPropertyVaule(21, hero) + GetFighttPropertyVaule(33, hero); |
| | | var StunRateDef = GetFighttPropertyVaule(22, hero) + GetFighttPropertyVaule(34, hero); |
| | | var SuperHitRate = GetFighttPropertyVaule(23, hero) + GetFighttPropertyVaule(33, hero); |
| | | var SuperHitRateDef = GetFighttPropertyVaule(24, hero) + GetFighttPropertyVaule(34, hero); |
| | | var ComboRate = GetFighttPropertyVaule(25, hero) + GetFighttPropertyVaule(33, hero); |
| | | var ComboRateDef = GetFighttPropertyVaule(26, hero) + GetFighttPropertyVaule(34, hero); |
| | | var MissRate = GetFighttPropertyVaule(27, hero) + GetFighttPropertyVaule(33, hero); |
| | | var MissRateDef = GetFighttPropertyVaule(28, hero) + GetFighttPropertyVaule(34, hero); |
| | | var ParryRate = GetFighttPropertyVaule(29, hero) + GetFighttPropertyVaule(33, hero); |
| | | var ParryRateDef = GetFighttPropertyVaule(30, hero) + GetFighttPropertyVaule(34, hero); |
| | | var SuckHPPer = GetFighttPropertyVaule(31, hero) + GetFighttPropertyVaule(33, hero); |
| | | var SuckHPPerDef = GetFighttPropertyVaule(32, hero) + GetFighttPropertyVaule(34, hero); |
| | | |
| | | var FinalDamPer = GetFighttPropertyVaule(35, hero); |
| | | var FinalDamPerDef = GetFighttPropertyVaule(36, hero); |
| | |
| | | RefrehMinggeAttrs(); |
| | | RefrehEquipAttrs(); |
| | | RefreshTeamAttrs(); |
| | | djgAttrs.Clear(); |
| | | |
| | | var fightPower = CalculateTeamHeroPower(heroInfo); |
| | | fightPower += GetMinggeSkillPower(); |
| | |
| | | #endregion |
| | | |
| | | |
| | | //和战力计算无关,重算属性展示用 |
| | | public Dictionary<int, long> GetHeroTotalAttr(HeroInfo hero) |
| | | { |
| | | |
| | |
| | | var pConfig = PlayerPropertyConfig.GetValues(); |
| | | foreach (var config in pConfig) |
| | | { |
| | | if (config.showType < 1 || config.showType > 4) |
| | | if (config.showType != 1 && |
| | | config.showType != 2 && |
| | | config.showType != 3 && |
| | | config.showType != 4 && |
| | | config.showType != 7) |
| | | { |
| | | continue; |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | //六大战斗属性需要再加上总的战斗属性 |
| | | int[] fightAttrList = { 21, 23, 25, 27, 29, 31}; |
| | | foreach (var attr in fightAttrList) |
| | | { |
| | | tmpAttrs[attr] += tmpAttrs[33]; |
| | | } |
| | | int[] fightDefAttrList = { 22, 24, 26, 28, 30, 32}; |
| | | foreach (var attr in fightDefAttrList) |
| | | { |
| | | tmpAttrs[attr] += tmpAttrs[34]; |
| | | } |
| | | |
| | | return tmpAttrs; |
| | | } |
| | | |