| Main/Core/GameEngine/Launch/ConfigInitTask.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Main/System/Battle/BattleField/StoryBattleField.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Main/System/Battle/BattleManager.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Main/System/Equip/EquipModel.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Main/System/Equip/ItemsOnFloor.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Main/System/Hero/HeroInfo.InheritPer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Main/System/Main/AutoFightModel.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Main/System/Main/FightPowerFormula.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Main/System/Main/FightPowerManager.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Main/System/Main/MoneyMoveByPath.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Main/System/PhantasmPavilion/PhantasmPavilionManager.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
Main/Core/GameEngine/Launch/ConfigInitTask.cs
@@ -82,6 +82,21 @@ code.AppendLine("public class FightPowerFormula"); code.AppendLine("{"); // 生成常量字符串定义 var allVariables = new HashSet<string>(); allVariables.UnionWith(propertyVariables); allVariables.UnionWith(fightPropertyVariables); allVariables.UnionWith(fightPowerVariables); allVariables.UnionWith(skillFightPowerVariables); code.AppendLine(" // 变量名常量定义"); foreach (var variable in allVariables) { var constantName = variable.ToUpper() + "_VALUE"; code.AppendLine($" private const string {constantName} = \"{variable}\";"); } code.AppendLine(); // 添加公式注释 code.AppendLine(" // 基础属性公式"); code.AppendLine($" // {propertyFormula}"); @@ -98,7 +113,8 @@ code.AppendLine(" {"); foreach (var variable in propertyVariables) { code.AppendLine($" double {variable} = variables[\"{variable}\"];"); var constantName = variable.ToUpper() + "_VALUE"; code.AppendLine($" double {variable} = variables[{constantName}];"); } code.AppendLine(); code.AppendLine($" return {processedPropertyFormula};"); @@ -110,7 +126,8 @@ code.AppendLine(" {"); foreach (var variable in fightPropertyVariables) { code.AppendLine($" double {variable} = variables[\"{variable}\"];"); var constantName = variable.ToUpper() + "_VALUE"; code.AppendLine($" double {variable} = variables[{constantName}];"); } code.AppendLine(); code.AppendLine($" return {processedFightPropertyFormula};"); @@ -122,7 +139,8 @@ code.AppendLine(" {"); foreach (var variable in fightPowerVariables) { code.AppendLine($" double {variable} = variables[\"{variable}\"];"); var constantName = variable.ToUpper() + "_VALUE"; code.AppendLine($" double {variable} = variables[{constantName}];"); } code.AppendLine(); code.AppendLine($" return {processedFightPowerFormula};"); @@ -134,7 +152,8 @@ code.AppendLine(" {"); foreach (var variable in skillFightPowerVariables) { code.AppendLine($" double {variable} = variables[\"{variable}\"];"); var constantName = variable.ToUpper() + "_VALUE"; code.AppendLine($" double {variable} = variables[{constantName}];"); } code.AppendLine(); code.AppendLine($" return {processedSkillFightPowerFormula};"); Main/System/Battle/BattleField/StoryBattleField.cs
@@ -154,7 +154,7 @@ base.OnSettlement(turnFightStateData); if (battleState == StoryBattleState.Battle) { EquipModel.Instance.CalcAllFloorItems(); // EquipModel.Instance.CalcAllFloorItems(); BattleManager.Instance.MainFightRequest(4); } } Main/System/Battle/BattleManager.cs
@@ -613,6 +613,7 @@ if (currentTime - lastTime < turnCoolDown) { SysNotifyMgr.Instance.ShowTip("BattleCoolDown"); Debug.Log("BattleCoolDown tip"); return; } lastTime = currentTime; Main/System/Equip/EquipModel.cs
@@ -338,13 +338,11 @@ { if (equip == null) { Debug.LogWarning("OpenEquipExchangeWin: 装备为空"); return false; } if (!DTC0403_tagPlayerLoginLoadOK.finishedLogin) { Debug.LogWarning("OpenEquipExchangeWin: 未登录"); return false; } @@ -354,7 +352,6 @@ if (AutoFightModel.Instance.TryAutoFightDoEquip(equip)) { //自动战力对比, 条件不满足的分解 Debug.LogWarning("OpenEquipExchangeWin: 自动战力对比, 条件不满足的分解"); return false; } @@ -367,14 +364,12 @@ //未回复装备操作结果,否则会显示旧装备 if (waitEquipOPPack) { Debug.LogWarning("OpenEquipExchangeWin: 等待服务器响应"); return false; } if (UIManager.Instance.IsOpened<EquipExchangeWin>()) { Debug.LogWarning("OpenEquipExchangeWin: 装备界面已打开"); return false; } @@ -382,10 +377,8 @@ selectFloorEquip = GetSelectFloorEquip(); if (selectFloorEquip == null) { Debug.LogWarning("OpenEquipExchangeWin: 没有可选装备"); return false; } Debug.LogWarning("OpenEquipExchangeWin: 打开装备界面"); UIManager.Instance.OpenWindow<EquipExchangeWin>(); return true; @@ -478,8 +471,7 @@ //得到装备位对应的部位名称 public string GetEquipPlaceName(int place) { return Language.Get("equipPlace" + place); return Language.Get(string.Concat("equipPlace", place)); } //是否装备 Main/System/Equip/ItemsOnFloor.cs
@@ -23,14 +23,14 @@ { //将预制体实例化到界面中 var inst = Instantiate(floorItemCell, floorUI); inst.gameObject.name = "floorItemCell" + i; inst.gameObject.name = $"floorItemCell{i}"; inst.transform.localPosition = Vector3.zero; floorItemCells[i] = inst; } for (int i = 0; i < moneyMoveByPathArr.Length; i++) { var mmbpath = Instantiate(moneyMoveByPathCell, floorUI); mmbpath.gameObject.name = "moneyMoveByPath" + i; mmbpath.gameObject.name = $"moneyMoveByPath{i}"; mmbpath.transform.localPosition = Vector3.zero; moneyMoveByPathArr[i] = mmbpath; } @@ -80,7 +80,7 @@ if (drops.expDrops.Count > 0) { var nowIndex = expIndex; expTexts[nowIndex].text = "E+" + (drops.expDrops[0].Exp + drops.expDrops[0].ExpPoint * Constants.ExpPointValue); expTexts[nowIndex].text = $"E+{drops.expDrops[0].Exp + drops.expDrops[0].ExpPoint * Constants.ExpPointValue}"; expTexts[nowIndex].transform.position = drops.rectTransform.position; expTexts[nowIndex].transform.DOLocalMove(expTexts[nowIndex].transform.localPosition + new Vector3(0, 20, 0), 1f).SetEase(Ease.InOutSine).onComplete = () => { Main/System/Hero/HeroInfo.InheritPer.cs
@@ -1,24 +1,28 @@ using System.Collections.Generic; using System.Linq; public partial class HeroInfo { //继承百分比对应三围,对应属性条目表里的ID private Dictionary<int, int> _inheritPer; Dictionary<int, int> inheritPer { get { return new Dictionary<int, int>() { if (_inheritPer == null) { _inheritPer = new Dictionary<int, int>() { { 6, heroConfig.AtkInheritPer }, { 7, heroConfig.DefInheritPer }, { 8, heroConfig.HPInheritPer }, }; } return _inheritPer; } } public int GetInheritAttrPer(int attrType) { return inheritPer.ContainsKey(attrType) ? inheritPer[attrType] : 0; return inheritPer.TryGetValue(attrType, out int value) ? value : 0; } } Main/System/Main/AutoFightModel.cs
@@ -158,7 +158,7 @@ if (item == null) return true; long showFightPower = FightPowerManager.Instance.GetFightPowerChangeSimple(item); long showFightPower = FightPowerManager.Instance.GetFightPowerChange(item); if (showFightPower < 0) { Main/System/Main/FightPowerFormula.cs
@@ -2,6 +2,127 @@ public class FightPowerFormula { // 变量名常量定义 private const string LVVALUE_VALUE = "lvValue"; private const string EQUIPVALUE_VALUE = "equipValue"; private const string BOOKVALUE_VALUE = "bookValue"; private const string REALMVALUE_VALUE = "realmValue"; private const string GUBAOVALUE_VALUE = "gubaoValue"; private const string HJGVALUE_VALUE = "hjgValue"; private const string HORSEVALUE_VALUE = "horseValue"; private const string BEAUTYVALUE_VALUE = "beautyValue"; private const string LINEUPHALOPER_VALUE = "lineupHaloPer"; private const string BOOKPER_VALUE = "bookPer"; private const string REALMPER_VALUE = "realmPer"; private const string GUBAOPER_VALUE = "gubaoPer"; private const string HJGPER_VALUE = "hjgPer"; private const string HORSEPER_VALUE = "horsePer"; private const string BEAUTYPER_VALUE = "beautyPer"; private const string LINEUPINITADDPER_VALUE = "lineupInitAddPer"; private const string LINEUPLVADDPER_VALUE = "lineupLVAddPer"; private const string LINEUPBREAKLVADDPER_VALUE = "lineupBreakLVAddPer"; private const string LINEUPSTARADDPER_VALUE = "lineupStarAddPer"; private const string INHERITPER_VALUE = "inheritPer"; private const string FETTERPER_VALUE = "fetterPer"; private const string STARTALENTPER_VALUE = "starTalentPer"; private const string BREAKLVPER_VALUE = "breakLVPer"; private const string AWAKETALENTPER_VALUE = "awakeTalentPer"; private const string HEROSELFVALUE_VALUE = "heroSelfValue"; private const string HEROLVVALUE_VALUE = "heroLVValue"; private const string LINEUPHALOVALUE_VALUE = "lineupHaloValue"; private const string STARTALENTVALUE_VALUE = "starTalentValue"; private const string BREAKLVVALUE_VALUE = "breakLVValue"; private const string AWAKETALENTVALUE_VALUE = "awakeTalentValue"; private const string FETTERVALUE_VALUE = "fetterValue"; private const string ATK_VALUE = "Atk"; private const string ATKRATIO_VALUE = "AtkRatio"; private const string MAXHP_VALUE = "MaxHP"; private const string MAXHPRATIO_VALUE = "MaxHPRatio"; private const string DEF_VALUE = "Def"; private const string DEFRATIO_VALUE = "DefRatio"; private const string STUNRATE_VALUE = "StunRate"; private const string STUNRATERATIO_VALUE = "StunRateRatio"; private const string SUPERHITRATE_VALUE = "SuperHitRate"; private const string SUPERHITRATERATIO_VALUE = "SuperHitRateRatio"; private const string COMBORATE_VALUE = "ComboRate"; private const string COMBORATERATIO_VALUE = "ComboRateRatio"; private const string MISSRATE_VALUE = "MissRate"; private const string MISSRATERATIO_VALUE = "MissRateRatio"; private const string PARRYRATE_VALUE = "ParryRate"; private const string PARRYRATERATIO_VALUE = "ParryRateRatio"; private const string SUCKHPPER_VALUE = "SuckHPPer"; private const string SUCKHPPERRATIO_VALUE = "SuckHPPerRatio"; private const string STUNRATEDEF_VALUE = "StunRateDef"; private const string STUNRATEDEFRATIO_VALUE = "StunRateDefRatio"; private const string SUPERHITRATEDEF_VALUE = "SuperHitRateDef"; private const string SUPERHITRATEDEFRATIO_VALUE = "SuperHitRateDefRatio"; private const string COMBORATEDEF_VALUE = "ComboRateDef"; private const string COMBORATEDEFRATIO_VALUE = "ComboRateDefRatio"; private const string MISSRATEDEF_VALUE = "MissRateDef"; private const string MISSRATEDEFRATIO_VALUE = "MissRateDefRatio"; private const string PARRYRATEDEF_VALUE = "ParryRateDef"; private const string PARRYRATEDEFRATIO_VALUE = "ParryRateDefRatio"; private const string SUCKHPPERDEF_VALUE = "SuckHPPerDef"; private const string SUCKHPPERDEFRATIO_VALUE = "SuckHPPerDefRatio"; private const string FINALDAMPER_VALUE = "FinalDamPer"; private const string FINALDAMPERRATIO_VALUE = "FinalDamPerRatio"; private const string FINALDAMPERDEF_VALUE = "FinalDamPerDef"; private const string FINALDAMPERDEFRATIO_VALUE = "FinalDamPerDefRatio"; private const string PHYDAMPER_VALUE = "PhyDamPer"; private const string PHYDAMPERRATIO_VALUE = "PhyDamPerRatio"; private const string PHYDAMPERDEF_VALUE = "PhyDamPerDef"; private const string PHYDAMPERDEFRATIO_VALUE = "PhyDamPerDefRatio"; private const string MAGDAMPER_VALUE = "MagDamPer"; private const string MAGDAMPERRATIO_VALUE = "MagDamPerRatio"; private const string MAGDAMPERDEF_VALUE = "MagDamPerDef"; private const string MAGDAMPERDEFRATIO_VALUE = "MagDamPerDefRatio"; private const string NORMALSKILLPER_VALUE = "NormalSkillPer"; private const string NORMALSKILLPERRATIO_VALUE = "NormalSkillPerRatio"; private const string NORMALSKILLPERDEF_VALUE = "NormalSkillPerDef"; private const string NORMALSKILLPERDEFRATIO_VALUE = "NormalSkillPerDefRatio"; private const string ANGERSKILLPER_VALUE = "AngerSkillPer"; private const string ANGERSKILLPERRATIO_VALUE = "AngerSkillPerRatio"; private const string ANGERSKILLPERDEF_VALUE = "AngerSkillPerDef"; private const string ANGERSKILLPERDEFRATIO_VALUE = "AngerSkillPerDefRatio"; private const string SUPERDAMPER_VALUE = "SuperDamPer"; private const string SUPERDAMPERRATIO_VALUE = "SuperDamPerRatio"; private const string SUPERDAMPERDEF_VALUE = "SuperDamPerDef"; private const string SUPERDAMPERDEFRATIO_VALUE = "SuperDamPerDefRatio"; private const string CUREPER_VALUE = "CurePer"; private const string CUREPERRATIO_VALUE = "CurePerRatio"; private const string CUREPERDEF_VALUE = "CurePerDef"; private const string CUREPERDEFRATIO_VALUE = "CurePerDefRatio"; private const string SHIELDPER_VALUE = "ShieldPer"; private const string SHIELDPERRATIO_VALUE = "ShieldPerRatio"; private const string SHIELDPERDEF_VALUE = "ShieldPerDef"; private const string SHIELDPERDEFRATIO_VALUE = "ShieldPerDefRatio"; private const string DOTPER_VALUE = "DOTPer"; private const string DOTPERRATIO_VALUE = "DOTPerRatio"; private const string DOTPERDEF_VALUE = "DOTPerDef"; private const string DOTPERDEFRATIO_VALUE = "DOTPerDefRatio"; private const string WEIFINALDAMPER_VALUE = "WeiFinalDamPer"; private const string WEIFINALDAMPERRATIO_VALUE = "WeiFinalDamPerRatio"; private const string WEIFINALDAMPERDEF_VALUE = "WeiFinalDamPerDef"; private const string WEIFINALDAMPERDEFRATIO_VALUE = "WeiFinalDamPerDefRatio"; private const string SHUFINALDAMPER_VALUE = "ShuFinalDamPer"; private const string SHUFINALDAMPERRATIO_VALUE = "ShuFinalDamPerRatio"; private const string SHUFINALDAMPERDEF_VALUE = "ShuFinalDamPerDef"; private const string SHUFINALDAMPERDEFRATIO_VALUE = "ShuFinalDamPerDefRatio"; private const string WUFINALDAMPER_VALUE = "WuFinalDamPer"; private const string WUFINALDAMPERRATIO_VALUE = "WuFinalDamPerRatio"; private const string WUFINALDAMPERDEF_VALUE = "WuFinalDamPerDef"; private const string WUFINALDAMPERDEFRATIO_VALUE = "WuFinalDamPerDefRatio"; private const string QUNFINALDAMPER_VALUE = "QunFinalDamPer"; private const string QUNFINALDAMPERRATIO_VALUE = "QunFinalDamPerRatio"; private const string QUNFINALDAMPERDEF_VALUE = "QunFinalDamPerDef"; private const string QUNFINALDAMPERDEFRATIO_VALUE = "QunFinalDamPerDefRatio"; private const string PVPDAMPER_VALUE = "PVPDamPer"; private const string PVPDAMPERRATIO_VALUE = "PVPDamPerRatio"; private const string PVPDAMPERDEF_VALUE = "PVPDamPerDef"; private const string PVPDAMPERDEFRATIO_VALUE = "PVPDamPerDefRatio"; private const string SKILLPOWER_VALUE = "SkillPower"; private const string OFFICIALLV_VALUE = "OfficialLV"; // 基础属性公式 // (lvValue+equipValue+bookValue+realmValue+gubaoValue+hjgValue+horseValue+beautyValue)*(1+lineupHaloPer+bookPer+realmPer+gubaoPer+hjgPer+horsePer+beautyPer+lineupInitAddPer+lineupLVAddPer+lineupBreakLVAddPer+lineupStarAddPer)*(inheritPer+fetterPer+starTalentPer+breakLVPer+awakeTalentPer)+heroSelfValue+heroLVValue // 战斗属性公式 @@ -13,152 +134,152 @@ public static double GetBaseAttr(Dictionary<string, double> variables) { double lvValue = variables["lvValue"]; double equipValue = variables["equipValue"]; double bookValue = variables["bookValue"]; double realmValue = variables["realmValue"]; double gubaoValue = variables["gubaoValue"]; double hjgValue = variables["hjgValue"]; double horseValue = variables["horseValue"]; double beautyValue = variables["beautyValue"]; double lineupHaloPer = variables["lineupHaloPer"]; double bookPer = variables["bookPer"]; double realmPer = variables["realmPer"]; double gubaoPer = variables["gubaoPer"]; double hjgPer = variables["hjgPer"]; double horsePer = variables["horsePer"]; double beautyPer = variables["beautyPer"]; double lineupInitAddPer = variables["lineupInitAddPer"]; double lineupLVAddPer = variables["lineupLVAddPer"]; double lineupBreakLVAddPer = variables["lineupBreakLVAddPer"]; double lineupStarAddPer = variables["lineupStarAddPer"]; double inheritPer = variables["inheritPer"]; double fetterPer = variables["fetterPer"]; double starTalentPer = variables["starTalentPer"]; double breakLVPer = variables["breakLVPer"]; double awakeTalentPer = variables["awakeTalentPer"]; double heroSelfValue = variables["heroSelfValue"]; double heroLVValue = variables["heroLVValue"]; double lvValue = variables[LVVALUE_VALUE]; double equipValue = variables[EQUIPVALUE_VALUE]; double bookValue = variables[BOOKVALUE_VALUE]; double realmValue = variables[REALMVALUE_VALUE]; double gubaoValue = variables[GUBAOVALUE_VALUE]; double hjgValue = variables[HJGVALUE_VALUE]; double horseValue = variables[HORSEVALUE_VALUE]; double beautyValue = variables[BEAUTYVALUE_VALUE]; double lineupHaloPer = variables[LINEUPHALOPER_VALUE]; double bookPer = variables[BOOKPER_VALUE]; double realmPer = variables[REALMPER_VALUE]; double gubaoPer = variables[GUBAOPER_VALUE]; double hjgPer = variables[HJGPER_VALUE]; double horsePer = variables[HORSEPER_VALUE]; double beautyPer = variables[BEAUTYPER_VALUE]; double lineupInitAddPer = variables[LINEUPINITADDPER_VALUE]; double lineupLVAddPer = variables[LINEUPLVADDPER_VALUE]; double lineupBreakLVAddPer = variables[LINEUPBREAKLVADDPER_VALUE]; double lineupStarAddPer = variables[LINEUPSTARADDPER_VALUE]; double inheritPer = variables[INHERITPER_VALUE]; double fetterPer = variables[FETTERPER_VALUE]; double starTalentPer = variables[STARTALENTPER_VALUE]; double breakLVPer = variables[BREAKLVPER_VALUE]; double awakeTalentPer = variables[AWAKETALENTPER_VALUE]; double heroSelfValue = variables[HEROSELFVALUE_VALUE]; double heroLVValue = variables[HEROLVVALUE_VALUE]; return (lvValue+equipValue+bookValue+realmValue+gubaoValue+hjgValue+horseValue+beautyValue)*(1+lineupHaloPer+bookPer+realmPer+gubaoPer+hjgPer+horsePer+beautyPer+lineupInitAddPer+lineupLVAddPer+lineupBreakLVAddPer+lineupStarAddPer)*(inheritPer+fetterPer+starTalentPer+breakLVPer+awakeTalentPer)+heroSelfValue+heroLVValue; } public static double GetFightAttr(Dictionary<string, double> variables) { double lvValue = variables["lvValue"]; double equipValue = variables["equipValue"]; double bookValue = variables["bookValue"]; double realmValue = variables["realmValue"]; double gubaoValue = variables["gubaoValue"]; double hjgValue = variables["hjgValue"]; double horseValue = variables["horseValue"]; double beautyValue = variables["beautyValue"]; double heroSelfValue = variables["heroSelfValue"]; double lineupHaloValue = variables["lineupHaloValue"]; double starTalentValue = variables["starTalentValue"]; double breakLVValue = variables["breakLVValue"]; double awakeTalentValue = variables["awakeTalentValue"]; double fetterValue = variables["fetterValue"]; double lvValue = variables[LVVALUE_VALUE]; double equipValue = variables[EQUIPVALUE_VALUE]; double bookValue = variables[BOOKVALUE_VALUE]; double realmValue = variables[REALMVALUE_VALUE]; double gubaoValue = variables[GUBAOVALUE_VALUE]; double hjgValue = variables[HJGVALUE_VALUE]; double horseValue = variables[HORSEVALUE_VALUE]; double beautyValue = variables[BEAUTYVALUE_VALUE]; double heroSelfValue = variables[HEROSELFVALUE_VALUE]; double lineupHaloValue = variables[LINEUPHALOVALUE_VALUE]; double starTalentValue = variables[STARTALENTVALUE_VALUE]; double breakLVValue = variables[BREAKLVVALUE_VALUE]; double awakeTalentValue = variables[AWAKETALENTVALUE_VALUE]; double fetterValue = variables[FETTERVALUE_VALUE]; return (lvValue+equipValue+bookValue+realmValue+gubaoValue+hjgValue+horseValue+beautyValue)+(heroSelfValue+lineupHaloValue+starTalentValue+breakLVValue+awakeTalentValue)+fetterValue; } public static double GetFightPower(Dictionary<string, double> variables) { double Atk = variables["Atk"]; double AtkRatio = variables["AtkRatio"]; double MaxHP = variables["MaxHP"]; double MaxHPRatio = variables["MaxHPRatio"]; double Def = variables["Def"]; double DefRatio = variables["DefRatio"]; double StunRate = variables["StunRate"]; double StunRateRatio = variables["StunRateRatio"]; double SuperHitRate = variables["SuperHitRate"]; double SuperHitRateRatio = variables["SuperHitRateRatio"]; double ComboRate = variables["ComboRate"]; double ComboRateRatio = variables["ComboRateRatio"]; double MissRate = variables["MissRate"]; double MissRateRatio = variables["MissRateRatio"]; double ParryRate = variables["ParryRate"]; double ParryRateRatio = variables["ParryRateRatio"]; double SuckHPPer = variables["SuckHPPer"]; double SuckHPPerRatio = variables["SuckHPPerRatio"]; double StunRateDef = variables["StunRateDef"]; double StunRateDefRatio = variables["StunRateDefRatio"]; double SuperHitRateDef = variables["SuperHitRateDef"]; double SuperHitRateDefRatio = variables["SuperHitRateDefRatio"]; double ComboRateDef = variables["ComboRateDef"]; double ComboRateDefRatio = variables["ComboRateDefRatio"]; double MissRateDef = variables["MissRateDef"]; double MissRateDefRatio = variables["MissRateDefRatio"]; double ParryRateDef = variables["ParryRateDef"]; double ParryRateDefRatio = variables["ParryRateDefRatio"]; double SuckHPPerDef = variables["SuckHPPerDef"]; double SuckHPPerDefRatio = variables["SuckHPPerDefRatio"]; double FinalDamPer = variables["FinalDamPer"]; double FinalDamPerRatio = variables["FinalDamPerRatio"]; double FinalDamPerDef = variables["FinalDamPerDef"]; double FinalDamPerDefRatio = variables["FinalDamPerDefRatio"]; double PhyDamPer = variables["PhyDamPer"]; double PhyDamPerRatio = variables["PhyDamPerRatio"]; double PhyDamPerDef = variables["PhyDamPerDef"]; double PhyDamPerDefRatio = variables["PhyDamPerDefRatio"]; double MagDamPer = variables["MagDamPer"]; double MagDamPerRatio = variables["MagDamPerRatio"]; double MagDamPerDef = variables["MagDamPerDef"]; double MagDamPerDefRatio = variables["MagDamPerDefRatio"]; double NormalSkillPer = variables["NormalSkillPer"]; double NormalSkillPerRatio = variables["NormalSkillPerRatio"]; double NormalSkillPerDef = variables["NormalSkillPerDef"]; double NormalSkillPerDefRatio = variables["NormalSkillPerDefRatio"]; double AngerSkillPer = variables["AngerSkillPer"]; double AngerSkillPerRatio = variables["AngerSkillPerRatio"]; double AngerSkillPerDef = variables["AngerSkillPerDef"]; double AngerSkillPerDefRatio = variables["AngerSkillPerDefRatio"]; double SuperDamPer = variables["SuperDamPer"]; double SuperDamPerRatio = variables["SuperDamPerRatio"]; double SuperDamPerDef = variables["SuperDamPerDef"]; double SuperDamPerDefRatio = variables["SuperDamPerDefRatio"]; double CurePer = variables["CurePer"]; double CurePerRatio = variables["CurePerRatio"]; double CurePerDef = variables["CurePerDef"]; double CurePerDefRatio = variables["CurePerDefRatio"]; double ShieldPer = variables["ShieldPer"]; double ShieldPerRatio = variables["ShieldPerRatio"]; double ShieldPerDef = variables["ShieldPerDef"]; double ShieldPerDefRatio = variables["ShieldPerDefRatio"]; double DOTPer = variables["DOTPer"]; double DOTPerRatio = variables["DOTPerRatio"]; double DOTPerDef = variables["DOTPerDef"]; double DOTPerDefRatio = variables["DOTPerDefRatio"]; double WeiFinalDamPer = variables["WeiFinalDamPer"]; double WeiFinalDamPerRatio = variables["WeiFinalDamPerRatio"]; double WeiFinalDamPerDef = variables["WeiFinalDamPerDef"]; double WeiFinalDamPerDefRatio = variables["WeiFinalDamPerDefRatio"]; double ShuFinalDamPer = variables["ShuFinalDamPer"]; double ShuFinalDamPerRatio = variables["ShuFinalDamPerRatio"]; double ShuFinalDamPerDef = variables["ShuFinalDamPerDef"]; double ShuFinalDamPerDefRatio = variables["ShuFinalDamPerDefRatio"]; double WuFinalDamPer = variables["WuFinalDamPer"]; double WuFinalDamPerRatio = variables["WuFinalDamPerRatio"]; double WuFinalDamPerDef = variables["WuFinalDamPerDef"]; double WuFinalDamPerDefRatio = variables["WuFinalDamPerDefRatio"]; double QunFinalDamPer = variables["QunFinalDamPer"]; double QunFinalDamPerRatio = variables["QunFinalDamPerRatio"]; double QunFinalDamPerDef = variables["QunFinalDamPerDef"]; double QunFinalDamPerDefRatio = variables["QunFinalDamPerDefRatio"]; double PVPDamPer = variables["PVPDamPer"]; double PVPDamPerRatio = variables["PVPDamPerRatio"]; double PVPDamPerDef = variables["PVPDamPerDef"]; double PVPDamPerDefRatio = variables["PVPDamPerDefRatio"]; double Atk = variables[ATK_VALUE]; double AtkRatio = variables[ATKRATIO_VALUE]; double MaxHP = variables[MAXHP_VALUE]; double MaxHPRatio = variables[MAXHPRATIO_VALUE]; double Def = variables[DEF_VALUE]; double DefRatio = variables[DEFRATIO_VALUE]; double StunRate = variables[STUNRATE_VALUE]; double StunRateRatio = variables[STUNRATERATIO_VALUE]; double SuperHitRate = variables[SUPERHITRATE_VALUE]; double SuperHitRateRatio = variables[SUPERHITRATERATIO_VALUE]; double ComboRate = variables[COMBORATE_VALUE]; double ComboRateRatio = variables[COMBORATERATIO_VALUE]; double MissRate = variables[MISSRATE_VALUE]; double MissRateRatio = variables[MISSRATERATIO_VALUE]; double ParryRate = variables[PARRYRATE_VALUE]; double ParryRateRatio = variables[PARRYRATERATIO_VALUE]; double SuckHPPer = variables[SUCKHPPER_VALUE]; double SuckHPPerRatio = variables[SUCKHPPERRATIO_VALUE]; double StunRateDef = variables[STUNRATEDEF_VALUE]; double StunRateDefRatio = variables[STUNRATEDEFRATIO_VALUE]; double SuperHitRateDef = variables[SUPERHITRATEDEF_VALUE]; double SuperHitRateDefRatio = variables[SUPERHITRATEDEFRATIO_VALUE]; double ComboRateDef = variables[COMBORATEDEF_VALUE]; double ComboRateDefRatio = variables[COMBORATEDEFRATIO_VALUE]; double MissRateDef = variables[MISSRATEDEF_VALUE]; double MissRateDefRatio = variables[MISSRATEDEFRATIO_VALUE]; double ParryRateDef = variables[PARRYRATEDEF_VALUE]; double ParryRateDefRatio = variables[PARRYRATEDEFRATIO_VALUE]; double SuckHPPerDef = variables[SUCKHPPERDEF_VALUE]; double SuckHPPerDefRatio = variables[SUCKHPPERDEFRATIO_VALUE]; double FinalDamPer = variables[FINALDAMPER_VALUE]; double FinalDamPerRatio = variables[FINALDAMPERRATIO_VALUE]; double FinalDamPerDef = variables[FINALDAMPERDEF_VALUE]; double FinalDamPerDefRatio = variables[FINALDAMPERDEFRATIO_VALUE]; double PhyDamPer = variables[PHYDAMPER_VALUE]; double PhyDamPerRatio = variables[PHYDAMPERRATIO_VALUE]; double PhyDamPerDef = variables[PHYDAMPERDEF_VALUE]; double PhyDamPerDefRatio = variables[PHYDAMPERDEFRATIO_VALUE]; double MagDamPer = variables[MAGDAMPER_VALUE]; double MagDamPerRatio = variables[MAGDAMPERRATIO_VALUE]; double MagDamPerDef = variables[MAGDAMPERDEF_VALUE]; double MagDamPerDefRatio = variables[MAGDAMPERDEFRATIO_VALUE]; double NormalSkillPer = variables[NORMALSKILLPER_VALUE]; double NormalSkillPerRatio = variables[NORMALSKILLPERRATIO_VALUE]; double NormalSkillPerDef = variables[NORMALSKILLPERDEF_VALUE]; double NormalSkillPerDefRatio = variables[NORMALSKILLPERDEFRATIO_VALUE]; double AngerSkillPer = variables[ANGERSKILLPER_VALUE]; double AngerSkillPerRatio = variables[ANGERSKILLPERRATIO_VALUE]; double AngerSkillPerDef = variables[ANGERSKILLPERDEF_VALUE]; double AngerSkillPerDefRatio = variables[ANGERSKILLPERDEFRATIO_VALUE]; double SuperDamPer = variables[SUPERDAMPER_VALUE]; double SuperDamPerRatio = variables[SUPERDAMPERRATIO_VALUE]; double SuperDamPerDef = variables[SUPERDAMPERDEF_VALUE]; double SuperDamPerDefRatio = variables[SUPERDAMPERDEFRATIO_VALUE]; double CurePer = variables[CUREPER_VALUE]; double CurePerRatio = variables[CUREPERRATIO_VALUE]; double CurePerDef = variables[CUREPERDEF_VALUE]; double CurePerDefRatio = variables[CUREPERDEFRATIO_VALUE]; double ShieldPer = variables[SHIELDPER_VALUE]; double ShieldPerRatio = variables[SHIELDPERRATIO_VALUE]; double ShieldPerDef = variables[SHIELDPERDEF_VALUE]; double ShieldPerDefRatio = variables[SHIELDPERDEFRATIO_VALUE]; double DOTPer = variables[DOTPER_VALUE]; double DOTPerRatio = variables[DOTPERRATIO_VALUE]; double DOTPerDef = variables[DOTPERDEF_VALUE]; double DOTPerDefRatio = variables[DOTPERDEFRATIO_VALUE]; double WeiFinalDamPer = variables[WEIFINALDAMPER_VALUE]; double WeiFinalDamPerRatio = variables[WEIFINALDAMPERRATIO_VALUE]; double WeiFinalDamPerDef = variables[WEIFINALDAMPERDEF_VALUE]; double WeiFinalDamPerDefRatio = variables[WEIFINALDAMPERDEFRATIO_VALUE]; double ShuFinalDamPer = variables[SHUFINALDAMPER_VALUE]; double ShuFinalDamPerRatio = variables[SHUFINALDAMPERRATIO_VALUE]; double ShuFinalDamPerDef = variables[SHUFINALDAMPERDEF_VALUE]; double ShuFinalDamPerDefRatio = variables[SHUFINALDAMPERDEFRATIO_VALUE]; double WuFinalDamPer = variables[WUFINALDAMPER_VALUE]; double WuFinalDamPerRatio = variables[WUFINALDAMPERRATIO_VALUE]; double WuFinalDamPerDef = variables[WUFINALDAMPERDEF_VALUE]; double WuFinalDamPerDefRatio = variables[WUFINALDAMPERDEFRATIO_VALUE]; double QunFinalDamPer = variables[QUNFINALDAMPER_VALUE]; double QunFinalDamPerRatio = variables[QUNFINALDAMPERRATIO_VALUE]; double QunFinalDamPerDef = variables[QUNFINALDAMPERDEF_VALUE]; double QunFinalDamPerDefRatio = variables[QUNFINALDAMPERDEFRATIO_VALUE]; double PVPDamPer = variables[PVPDAMPER_VALUE]; double PVPDamPerRatio = variables[PVPDAMPERRATIO_VALUE]; double PVPDamPerDef = variables[PVPDAMPERDEF_VALUE]; double PVPDamPerDefRatio = variables[PVPDAMPERDEFRATIO_VALUE]; return (long)(Atk*AtkRatio+MaxHP*MaxHPRatio+Def*DefRatio+(StunRate*StunRateRatio+SuperHitRate*SuperHitRateRatio+ComboRate*ComboRateRatio+MissRate*MissRateRatio+ParryRate*ParryRateRatio+SuckHPPer*SuckHPPerRatio+StunRateDef*StunRateDefRatio+SuperHitRateDef*SuperHitRateDefRatio+ComboRateDef*ComboRateDefRatio+MissRateDef*MissRateDefRatio+ParryRateDef*ParryRateDefRatio+SuckHPPerDef*SuckHPPerDefRatio+FinalDamPer*FinalDamPerRatio+FinalDamPerDef*FinalDamPerDefRatio+PhyDamPer*PhyDamPerRatio+PhyDamPerDef*PhyDamPerDefRatio+MagDamPer*MagDamPerRatio+MagDamPerDef*MagDamPerDefRatio+NormalSkillPer*NormalSkillPerRatio+NormalSkillPerDef*NormalSkillPerDefRatio+AngerSkillPer*AngerSkillPerRatio+AngerSkillPerDef*AngerSkillPerDefRatio+SuperDamPer*SuperDamPerRatio+SuperDamPerDef*SuperDamPerDefRatio+CurePer*CurePerRatio+CurePerDef*CurePerDefRatio+ShieldPer*ShieldPerRatio+ShieldPerDef*ShieldPerDefRatio+DOTPer*DOTPerRatio+DOTPerDef*DOTPerDefRatio+WeiFinalDamPer*WeiFinalDamPerRatio+WeiFinalDamPerDef*WeiFinalDamPerDefRatio+ShuFinalDamPer*ShuFinalDamPerRatio+ShuFinalDamPerDef*ShuFinalDamPerDefRatio+WuFinalDamPer*WuFinalDamPerRatio+WuFinalDamPerDef*WuFinalDamPerDefRatio+QunFinalDamPer*QunFinalDamPerRatio+QunFinalDamPerDef*QunFinalDamPerDefRatio+PVPDamPer*PVPDamPerRatio+PVPDamPerDef*PVPDamPerDefRatio)/100.0-55000); } public static double GetSkillsFightPower(Dictionary<string, double> variables) { double SkillPower = variables["SkillPower"]; double OfficialLV = variables["OfficialLV"]; double SkillPower = variables[SKILLPOWER_VALUE]; double OfficialLV = variables[OFFICIALLV_VALUE]; return SkillPower*OfficialLV; } Main/System/Main/FightPowerManager.cs
@@ -1,4 +1,4 @@ using System; using System; using System.Collections; using System.Collections.Generic; using System.Linq; @@ -12,25 +12,100 @@ // 所有武将战力加起来 + 技能战力汇总(公式)就是整个号的战力 public class FightPowerManager : Singleton<FightPowerManager> { public string propertyFormula; public string fightPropertyFormula; public string fightPowerFormula; public string skillFightPowerFormula; // 属性变量常量 private const string LV_VALUE = "lvValue"; private const string EQUIP_VALUE = "equipValue"; private const string BOOK_VALUE = "bookValue"; private const string BOOK_PER = "bookPer"; private const string REALM_VALUE = "realmValue"; private const string REALM_PER = "realmPer"; private const string GUBAO_VALUE = "gubaoValue"; private const string GUBAO_PER = "gubaoPer"; private const string HJG_VALUE = "hjgValue"; private const string HJG_PER = "hjgPer"; private const string HORSE_VALUE = "horseValue"; private const string HORSE_PER = "horsePer"; private const string BEAUTY_VALUE = "beautyValue"; private const string BEAUTY_PER = "beautyPer"; private const string LINEUP_INIT_ADD_PER = "lineupInitAddPer"; private const string LINEUP_LV_ADD_PER = "lineupLVAddPer"; private const string LINEUP_BREAK_LV_ADD_PER = "lineupBreakLVAddPer"; private const string LINEUP_STAR_ADD_PER = "lineupStarAddPer"; private const string LINEUP_HALO_VALUE = "lineupHaloValue"; private const string LINEUP_HALO_PER = "lineupHaloPer"; private const string INHERIT_PER = "inheritPer"; private const string HERO_SELF_VALUE = "heroSelfValue"; private const string HERO_SELF_PER = "heroSelfPer"; private const string STAR_TALENT_VALUE = "starTalentValue"; private const string STAR_TALENT_PER = "starTalentPer"; private const string BREAK_LV_VALUE = "breakLVValue"; private const string BREAK_LV_PER = "breakLVPer"; private const string AWAKE_TALENT_VALUE = "awakeTalentValue"; private const string AWAKE_TALENT_PER = "awakeTalentPer"; private const string FETTER_VALUE = "fetterValue"; private const string FETTER_PER = "fetterPer"; private const string HERO_LV_VALUE = "heroLVValue"; private const string HERO_LV_PER = "heroLVPer"; // 战力变量常量 private const string ATK_RATIO = "AtkRatio"; private const string MAX_HP_RATIO = "MaxHPRatio"; private const string DEF_RATIO = "DefRatio"; private const string STUN_RATE_RATIO = "StunRateRatio"; private const string SUPER_HIT_RATE_RATIO = "SuperHitRateRatio"; private const string COMBO_RATE_RATIO = "ComboRateRatio"; private const string MISS_RATE_RATIO = "MissRateRatio"; private const string PARRY_RATE_RATIO = "ParryRateRatio"; private const string SUCK_HP_PER_RATIO = "SuckHPPerRatio"; private const string STUN_RATE_DEF_RATIO = "StunRateDefRatio"; private const string SUPER_HIT_RATE_DEF_RATIO = "SuperHitRateDefRatio"; private const string COMBO_RATE_DEF_RATIO = "ComboRateDefRatio"; private const string MISS_RATE_DEF_RATIO = "MissRateDefRatio"; private const string PARRY_RATE_DEF_RATIO = "ParryRateDefRatio"; private const string SUCK_HP_PER_DEF_RATIO = "SuckHPPerDefRatio"; private const string NORMAL_SKILL_PER_RATIO = "NormalSkillPerRatio"; private const string NORMAL_SKILL_PER_DEF_RATIO = "NormalSkillPerDefRatio"; private const string ANGER_SKILL_PER_RATIO = "AngerSkillPerRatio"; private const string ANGER_SKILL_PER_DEF_RATIO = "AngerSkillPerDefRatio"; private const string SUPER_DAM_PER_RATIO = "SuperDamPerRatio"; private const string SUPER_DAM_PER_DEF_RATIO = "SuperDamPerDefRatio"; private const string SHIELD_PER_RATIO = "ShieldPerRatio"; private const string SHIELD_PER_DEF_RATIO = "ShieldPerDefRatio"; private const string DOT_PER_RATIO = "DOTPerRatio"; private const string DOT_PER_DEF_RATIO = "DOTPerDefRatio"; private const string WEI_FINAL_DAM_PER_RATIO = "WeiFinalDamPerRatio"; private const string WEI_FINAL_DAM_PER_DEF_RATIO = "WeiFinalDamPerDefRatio"; private const string SHU_FINAL_DAM_PER_RATIO = "ShuFinalDamPerRatio"; private const string SHU_FINAL_DAM_PER_DEF_RATIO = "ShuFinalDamPerDefRatio"; private const string WU_FINAL_DAM_PER_RATIO = "WuFinalDamPerRatio"; private const string WU_FINAL_DAM_PER_DEF_RATIO = "WuFinalDamPerDefRatio"; private const string QUN_FINAL_DAM_PER_RATIO = "QunFinalDamPerRatio"; private const string QUN_FINAL_DAM_PER_DEF_RATIO = "QunFinalDamPerDefRatio"; private const string FINAL_DAM_PER_RATIO = "FinalDamPerRatio"; private const string FINAL_DAM_PER_DEF_RATIO = "FinalDamPerDefRatio"; private const string PHY_DAM_PER_RATIO = "PhyDamPerRatio"; private const string PHY_DAM_PER_DEF_RATIO = "PhyDamPerDefRatio"; private const string MAG_DAM_PER_RATIO = "MagDamPerRatio"; private const string MAG_DAM_PER_DEF_RATIO = "MagDamPerDefRatio"; private const string CURE_PER_RATIO = "CurePerRatio"; private const string CURE_PER_DEF_RATIO = "CurePerDefRatio"; private const string PVP_DAM_PER_RATIO = "PVPDamPerRatio"; private const string PVP_DAM_PER_DEF_RATIO = "PVPDamPerDefRatio"; private const string PLAYER_LV = "PlayerLV"; private const string OFFICIAL_LV = "OfficialLV"; private const string SKILL_POWER = "SkillPower"; Dictionary<string, double> propertyVariables = new Dictionary<string, double>(); Dictionary<string, double> fightPowerVariables = new Dictionary<string, double>(); //总战力中的单武将战力 int useFormulaType = 0; //公式调用方式0 代码 1公式 List<PlayerPropertyConfig> pConfig = new List<PlayerPropertyConfig>(); public FightPowerManager() { // 数值1:基础三维属性计算公式 // 数值2:战斗属性/战斗抗性/特殊属性计算公式 // 数值3:属性战力计算公式,计算参数详见 S.属性条目配置 var config = FuncConfigConfig.Get("HeroAttrFormula"); propertyFormula = config.Numerical1; fightPropertyFormula = config.Numerical2; fightPowerFormula = config.Numerical3; skillFightPowerFormula = config.Numerical4; pConfig = PlayerPropertyConfig.GetValues(); JaceCalculator.Init(); } @@ -221,99 +296,49 @@ #region 属性公式 // 单基础属性计算 // public double GetPropertyVaule(int attrType, HeroInfo hero, string formula) // { // propertyVariables.Clear(); // propertyVariables["lvValue"] = lvAttrs.ContainsKey(attrType) ? lvAttrs[attrType] : 0; // propertyVariables["equipValue"] = equipAttrs.ContainsKey(attrType) ? equipAttrs[attrType] : 0; // propertyVariables["bookValue"] = 0; // propertyVariables["bookPer"] = GetBookPer(attrType) / 10000.0f; // propertyVariables["realmValue"] = officialAttrs.ContainsKey(attrType) ? officialAttrs[attrType] : 0; // propertyVariables["realmPer"] = GetOfficialPer(attrType) / 10000.0f; // propertyVariables["gubaoValue"] = 0; // propertyVariables["gubaoPer"] = 0; // propertyVariables["hjgValue"] = 0; // propertyVariables["hjgPer"] = 0; // propertyVariables["horseValue"] = 0; // propertyVariables["horsePer"] = 0; // //!!!单武将战力预览的话需要排除队伍影响战力,只算武将自身的上阵属性 // propertyVariables["lineupInitAddPer"] = GetLineUpPer(attrType, "lineupInitAddPer") / 10000.0f; // propertyVariables["lineupLVAddPer"] = GetLineUpPer(attrType, "lineupLVAddPer") / 10000.0f; // propertyVariables["lineupBreakLVAddPer"] = GetLineUpPer(attrType, "lineupBreakLVAddPer") / 10000.0f; // propertyVariables["lineupStarAddPer"] = GetLineUpPer(attrType, "lineupStarAddPer") / 10000.0f; // //阵容光环 三围百分比加成 // propertyVariables["lineupHaloValue"] = countryAttrs.ContainsKey(attrType) ? countryAttrs[attrType] : 0; // propertyVariables["lineupHaloPer"] = GetCountryPer(attrType) / 10000.0f; // //武将属性 // propertyVariables["inheritPer"] = hero.GetInheritAttrPer(attrType) / 10000.0f; // propertyVariables["heroSelfValue"] = hero.GetSelfAddValue(attrType); // propertyVariables["heroSelfPer"] = hero.GetSelfAddPer(attrType) / 10000.0f; // propertyVariables["starTalentValue"] = hero.GetTalentAttrValue(attrType); // propertyVariables["starTalentPer"] = hero.GetTalentAttrPer(attrType) / 10000.0f; // propertyVariables["breakLVValue"] = hero.GetBreakAttrValue(attrType); // propertyVariables["breakLVPer"] = hero.GetBreakAttrPer(attrType) / 10000.0f; // propertyVariables["awakeTalentValue"] = hero.GetAwakeAttrValue(attrType); // propertyVariables["awakeTalentPer"] = hero.GetAwakeAttrPer(attrType) / 10000.0f; // propertyVariables["fetterValue"] = hero.GetFetterAttrValue(attrType); // propertyVariables["fetterPer"] = hero.GetFetterAttrPer(attrType) / 10000.0f; // #if UNITY_EDITOR // //排除值为0的属性输出 // // var tmpPropertyVariables = propertyVariables.Where(x => x.Value > 0).ToDictionary(x => x.Key, x => x.Value); // // if (!tmpPropertyVariables.IsNullOrEmpty()) // // propertyStrForDebug += $"属性ID {attrType} - {JsonMapper.ToJson(tmpPropertyVariables)}"; // #endif // return JaceCalculator.Calculate(formula, propertyVariables); // } public double GetPropertyVaule(int attrType, HeroInfo hero, int type) { propertyVariables.Clear(); propertyVariables["lvValue"] = lvAttrs.ContainsKey(attrType) ? lvAttrs[attrType] : 0; propertyVariables["equipValue"] = equipAttrs.ContainsKey(attrType) ? equipAttrs[attrType] : 0; propertyVariables["bookValue"] = 0; propertyVariables["bookPer"] = GetBookPer(attrType) / 10000.0f; propertyVariables["realmValue"] = officialAttrs.ContainsKey(attrType) ? officialAttrs[attrType] : 0; propertyVariables["realmPer"] = GetOfficialPer(attrType) / 10000.0f; propertyVariables["gubaoValue"] = 0; propertyVariables["gubaoPer"] = 0; propertyVariables["hjgValue"] = PhantasmPavilionManager.Instance.GetAttrValue(attrType); propertyVariables["hjgPer"] = PhantasmPavilionManager.Instance.GetAttrPer(attrType) / 10000.0f; propertyVariables["horseValue"] = HorseManager.Instance.GetAttrValue(attrType); propertyVariables["horsePer"] = HorseManager.Instance.GetAttrPer(attrType) / 10000.0f; propertyVariables["beautyValue"] = 0; propertyVariables["beautyPer"] = 0; // propertyVariables.Clear(); propertyVariables[LV_VALUE] = lvAttrs.ContainsKey(attrType) ? lvAttrs[attrType] : 0; propertyVariables[EQUIP_VALUE] = equipAttrs.ContainsKey(attrType) ? equipAttrs[attrType] : 0; propertyVariables[BOOK_VALUE] = 0; propertyVariables[REALM_VALUE] = officialAttrs.ContainsKey(attrType) ? officialAttrs[attrType] : 0; propertyVariables[REALM_PER] = GetOfficialPer(attrType) / 10000.0f; propertyVariables[BOOK_PER] = GetBookPer(attrType) / 10000.0f; propertyVariables[GUBAO_VALUE] = 0; propertyVariables[GUBAO_PER] = 0; propertyVariables[HJG_VALUE] = PhantasmPavilionManager.Instance.GetAttrValue(attrType); propertyVariables[HJG_PER] = PhantasmPavilionManager.Instance.GetAttrPer(attrType) / 10000.0f; propertyVariables[HORSE_VALUE] = HorseManager.Instance.GetAttrValue(attrType); propertyVariables[HORSE_PER] = HorseManager.Instance.GetAttrPer(attrType) / 10000.0f; propertyVariables[BEAUTY_VALUE] = 0; propertyVariables[BEAUTY_PER] = 0; //!!!单武将战力预览的话需要排除队伍影响战力,只算武将自身的上阵属性 propertyVariables["lineupInitAddPer"] = GetLineUpPer(attrType, "lineupInitAddPer") / 10000.0f; propertyVariables["lineupLVAddPer"] = GetLineUpPer(attrType, "lineupLVAddPer") / 10000.0f; propertyVariables["lineupBreakLVAddPer"] = GetLineUpPer(attrType, "lineupBreakLVAddPer") / 10000.0f; propertyVariables["lineupStarAddPer"] = GetLineUpPer(attrType, "lineupStarAddPer") / 10000.0f; propertyVariables[LINEUP_INIT_ADD_PER] = GetLineUpPer(attrType, LINEUP_INIT_ADD_PER) / 10000.0f; propertyVariables[LINEUP_LV_ADD_PER] = GetLineUpPer(attrType, LINEUP_LV_ADD_PER) / 10000.0f; propertyVariables[LINEUP_BREAK_LV_ADD_PER] = GetLineUpPer(attrType, LINEUP_BREAK_LV_ADD_PER) / 10000.0f; propertyVariables[LINEUP_STAR_ADD_PER] = GetLineUpPer(attrType, LINEUP_STAR_ADD_PER) / 10000.0f; //阵容光环 三围百分比加成 propertyVariables["lineupHaloValue"] = countryAttrs.ContainsKey(attrType) ? countryAttrs[attrType] : 0; propertyVariables["lineupHaloPer"] = GetCountryPer(attrType) / 10000.0f; propertyVariables[LINEUP_HALO_VALUE] = countryAttrs.ContainsKey(attrType) ? countryAttrs[attrType] : 0; propertyVariables[LINEUP_HALO_PER] = GetCountryPer(attrType) / 10000.0f; //武将属性 propertyVariables["inheritPer"] = hero.GetInheritAttrPer(attrType) / 10000.0f; propertyVariables["heroSelfValue"] = hero.GetSelfAddValue(attrType); propertyVariables["heroSelfPer"] = hero.GetSelfAddPer(attrType) / 10000.0f; propertyVariables["starTalentValue"] = hero.GetTalentAttrValue(attrType); propertyVariables["starTalentPer"] = hero.GetTalentAttrPer(attrType) / 10000.0f; propertyVariables["breakLVValue"] = hero.GetBreakAttrValue(attrType); propertyVariables["breakLVPer"] = hero.GetBreakAttrPer(attrType) / 10000.0f; propertyVariables["awakeTalentValue"] = hero.GetAwakeAttrValue(attrType); propertyVariables["awakeTalentPer"] = hero.GetAwakeAttrPer(attrType) / 10000.0f; propertyVariables["fetterValue"] = hero.GetFetterAttrValue(attrType); propertyVariables["fetterPer"] = hero.GetFetterAttrPer(attrType) / 10000.0f; propertyVariables["heroLVValue"] = hero.GetHeroLVValue(attrType); propertyVariables["heroLVPer"] = hero.GetHeroLVPer(attrType) / 10000.0f; propertyVariables[INHERIT_PER] = hero.GetInheritAttrPer(attrType) / 10000.0f; propertyVariables[HERO_SELF_VALUE] = hero.GetSelfAddValue(attrType); propertyVariables[HERO_SELF_PER] = hero.GetSelfAddPer(attrType) / 10000.0f; propertyVariables[STAR_TALENT_VALUE] = hero.GetTalentAttrValue(attrType); propertyVariables[STAR_TALENT_PER] = hero.GetTalentAttrPer(attrType) / 10000.0f; propertyVariables[BREAK_LV_VALUE] = hero.GetBreakAttrValue(attrType); propertyVariables[BREAK_LV_PER] = hero.GetBreakAttrPer(attrType) / 10000.0f; propertyVariables[AWAKE_TALENT_VALUE] = hero.GetAwakeAttrValue(attrType); propertyVariables[AWAKE_TALENT_PER] = hero.GetAwakeAttrPer(attrType) / 10000.0f; propertyVariables[FETTER_VALUE] = hero.GetFetterAttrValue(attrType); propertyVariables[FETTER_PER] = hero.GetFetterAttrPer(attrType) / 10000.0f; propertyVariables[HERO_LV_VALUE] = hero.GetHeroLVValue(attrType); propertyVariables[HERO_LV_PER] = hero.GetHeroLVPer(attrType) / 10000.0f; #if UNITY_EDITOR //排除值为0的属性输出 // var tmpPropertyVariables = propertyVariables.Where(x => x.Value > 0).ToDictionary(x => x.Key, x => x.Value); @@ -391,7 +416,6 @@ RefrehEquipAttrs(); RefreshTeamAttrs(); // --- 算单武将功能属性战力 后相加--- long fightPower = 0; var team = TeamManager.Instance.GetTeam(teamTypeCalc); @@ -416,9 +440,9 @@ } #if UNITY_EDITOR Debug.Log("战力:计算完毕 " + fightPower); #endif // #if UNITY_EDITOR // Debug.Log("战力:计算完毕 " + fightPower); // #endif return fightPower; } @@ -436,7 +460,7 @@ #if UNITY_EDITOR propertyStrForDebug = ""; #endif foreach (var config in PlayerPropertyConfig.GetValues()) foreach (var config in pConfig) { if (config.showType < 1 || config.showType > 4) { @@ -444,17 +468,11 @@ } if (config.showType == 1) { if (useFormulaType == 0) fightPowerVariables[config.Parameter] = Math.Round(GetPropertyVaule(config.ID, hero, 0), 3); // else // fightPowerVariables[config.Parameter] = Math.Round(GetPropertyVaule(config.ID, hero, propertyFormula), 3); } else { if (useFormulaType == 0) fightPowerVariables[config.Parameter] = Math.Round(GetPropertyVaule(config.ID, hero, 1), 3); // else // fightPowerVariables[config.Parameter] = Math.Round(GetPropertyVaule(config.ID, hero, fightPropertyFormula), 3); } } @@ -465,60 +483,51 @@ //属性系数根据官职等级的加成 var fightPowerRatioConfig = FightPowerRatioConfig.Get(PlayerDatas.Instance.baseData.realmLevel); fightPowerVariables["AtkRatio"] = fightPowerRatioConfig.AtkRatio; fightPowerVariables["MaxHPRatio"] = fightPowerRatioConfig.MaxHPRatio; fightPowerVariables["DefRatio"] = fightPowerRatioConfig.DefRatio; fightPowerVariables["StunRateRatio"] = fightPowerRatioConfig.StunRateRatio; fightPowerVariables["SuperHitRateRatio"] = fightPowerRatioConfig.SuperHitRateRatio; fightPowerVariables["ComboRateRatio"] = fightPowerRatioConfig.ComboRateRatio; fightPowerVariables["MissRateRatio"] = fightPowerRatioConfig.MissRateRatio; fightPowerVariables["ParryRateRatio"] = fightPowerRatioConfig.ParryRateRatio; fightPowerVariables["SuckHPPerRatio"] = fightPowerRatioConfig.SuckHPPerRatio; fightPowerVariables["StunRateDefRatio"] = fightPowerRatioConfig.StunRateDefRatio; fightPowerVariables["SuperHitRateDefRatio"] = fightPowerRatioConfig.SuperHitRateDefRatio; fightPowerVariables["ComboRateDefRatio"] = fightPowerRatioConfig.ComboRateDefRatio; fightPowerVariables["MissRateDefRatio"] = fightPowerRatioConfig.MissRateDefRatio; fightPowerVariables["ParryRateDefRatio"] = fightPowerRatioConfig.ParryRateDefRatio; fightPowerVariables["SuckHPPerDefRatio"] = fightPowerRatioConfig.SuckHPPerDefRatio; fightPowerVariables["NormalSkillPerRatio"] = fightPowerRatioConfig.NormalSkillPerRatio; fightPowerVariables["NormalSkillPerDefRatio"] = fightPowerRatioConfig.NormalSkillPerDefRatio; fightPowerVariables["AngerSkillPerRatio"] = fightPowerRatioConfig.AngerSkillPerRatio; fightPowerVariables["AngerSkillPerDefRatio"] = fightPowerRatioConfig.AngerSkillPerDefRatio; fightPowerVariables["SuperDamPerRatio"] = fightPowerRatioConfig.SuperDamPerRatio; fightPowerVariables["SuperDamPerDefRatio"] = fightPowerRatioConfig.SuperDamPerDefRatio; fightPowerVariables["ShieldPerRatio"] = fightPowerRatioConfig.ShieldPerRatio; fightPowerVariables["ShieldPerDefRatio"] = fightPowerRatioConfig.ShieldPerDefRatio; fightPowerVariables["DOTPerRatio"] = fightPowerRatioConfig.DOTPerRatio; fightPowerVariables["DOTPerDefRatio"] = fightPowerRatioConfig.DOTPerDefRatio; fightPowerVariables["WeiFinalDamPerRatio"] = fightPowerRatioConfig.WeiFinalDamPerRatio; fightPowerVariables["WeiFinalDamPerDefRatio"] = fightPowerRatioConfig.WeiFinalDamPerDefRatio; fightPowerVariables["ShuFinalDamPerRatio"] = fightPowerRatioConfig.ShuFinalDamPerRatio; fightPowerVariables["ShuFinalDamPerDefRatio"] = fightPowerRatioConfig.ShuFinalDamPerDefRatio; fightPowerVariables["WuFinalDamPerRatio"] = fightPowerRatioConfig.WuFinalDamPerRatio; fightPowerVariables["WuFinalDamPerDefRatio"] = fightPowerRatioConfig.WuFinalDamPerDefRatio; fightPowerVariables["QunFinalDamPerRatio"] = fightPowerRatioConfig.QunFinalDamPerRatio; fightPowerVariables["QunFinalDamPerDefRatio"] = fightPowerRatioConfig.QunFinalDamPerDefRatio; fightPowerVariables["FinalDamPerRatio"] = fightPowerRatioConfig.FinalDamPerRatio; fightPowerVariables["FinalDamPerDefRatio"] = fightPowerRatioConfig.FinalDamPerDefRatio; fightPowerVariables["PhyDamPerRatio"] = fightPowerRatioConfig.PhyDamPerRatio; fightPowerVariables["PhyDamPerDefRatio"] = fightPowerRatioConfig.PhyDamPerDefRatio; fightPowerVariables["MagDamPerRatio"] = fightPowerRatioConfig.MagDamPerRatio; fightPowerVariables["MagDamPerDefRatio"] = fightPowerRatioConfig.MagDamPerDefRatio; fightPowerVariables["CurePerRatio"] = fightPowerRatioConfig.CurePerRatio; fightPowerVariables["CurePerDefRatio"] = fightPowerRatioConfig.CurePerDefRatio; fightPowerVariables["PVPDamPerRatio"] = fightPowerRatioConfig.PVPDamPerRatio; fightPowerVariables["PVPDamPerDefRatio"] = fightPowerRatioConfig.PVPDamPerDefRatio; fightPowerVariables[ATK_RATIO] = fightPowerRatioConfig.AtkRatio; fightPowerVariables[MAX_HP_RATIO] = fightPowerRatioConfig.MaxHPRatio; fightPowerVariables[DEF_RATIO] = fightPowerRatioConfig.DefRatio; fightPowerVariables[STUN_RATE_RATIO] = fightPowerRatioConfig.StunRateRatio; fightPowerVariables[SUPER_HIT_RATE_RATIO] = fightPowerRatioConfig.SuperHitRateRatio; fightPowerVariables[COMBO_RATE_RATIO] = fightPowerRatioConfig.ComboRateRatio; fightPowerVariables[MISS_RATE_RATIO] = fightPowerRatioConfig.MissRateRatio; fightPowerVariables[PARRY_RATE_RATIO] = fightPowerRatioConfig.ParryRateRatio; fightPowerVariables[SUCK_HP_PER_RATIO] = fightPowerRatioConfig.SuckHPPerRatio; fightPowerVariables[STUN_RATE_DEF_RATIO] = fightPowerRatioConfig.StunRateDefRatio; fightPowerVariables[SUPER_HIT_RATE_DEF_RATIO] = fightPowerRatioConfig.SuperHitRateDefRatio; fightPowerVariables[COMBO_RATE_DEF_RATIO] = fightPowerRatioConfig.ComboRateDefRatio; fightPowerVariables[MISS_RATE_DEF_RATIO] = fightPowerRatioConfig.MissRateDefRatio; fightPowerVariables[PARRY_RATE_DEF_RATIO] = fightPowerRatioConfig.ParryRateDefRatio; fightPowerVariables[SUCK_HP_PER_DEF_RATIO] = fightPowerRatioConfig.SuckHPPerDefRatio; fightPowerVariables[NORMAL_SKILL_PER_RATIO] = fightPowerRatioConfig.NormalSkillPerRatio; fightPowerVariables[NORMAL_SKILL_PER_DEF_RATIO] = fightPowerRatioConfig.NormalSkillPerDefRatio; fightPowerVariables[ANGER_SKILL_PER_RATIO] = fightPowerRatioConfig.AngerSkillPerRatio; fightPowerVariables[ANGER_SKILL_PER_DEF_RATIO] = fightPowerRatioConfig.AngerSkillPerDefRatio; fightPowerVariables[SUPER_DAM_PER_RATIO] = fightPowerRatioConfig.SuperDamPerRatio; fightPowerVariables[SUPER_DAM_PER_DEF_RATIO] = fightPowerRatioConfig.SuperDamPerDefRatio; fightPowerVariables[SHIELD_PER_RATIO] = fightPowerRatioConfig.ShieldPerRatio; fightPowerVariables[SHIELD_PER_DEF_RATIO] = fightPowerRatioConfig.ShieldPerDefRatio; fightPowerVariables[DOT_PER_RATIO] = fightPowerRatioConfig.DOTPerRatio; fightPowerVariables[DOT_PER_DEF_RATIO] = fightPowerRatioConfig.DOTPerDefRatio; fightPowerVariables[WEI_FINAL_DAM_PER_RATIO] = fightPowerRatioConfig.WeiFinalDamPerRatio; fightPowerVariables[WEI_FINAL_DAM_PER_DEF_RATIO] = fightPowerRatioConfig.WeiFinalDamPerDefRatio; fightPowerVariables[SHU_FINAL_DAM_PER_RATIO] = fightPowerRatioConfig.ShuFinalDamPerRatio; fightPowerVariables[SHU_FINAL_DAM_PER_DEF_RATIO] = fightPowerRatioConfig.ShuFinalDamPerDefRatio; fightPowerVariables[WU_FINAL_DAM_PER_RATIO] = fightPowerRatioConfig.WuFinalDamPerRatio; fightPowerVariables[WU_FINAL_DAM_PER_DEF_RATIO] = fightPowerRatioConfig.WuFinalDamPerDefRatio; fightPowerVariables[QUN_FINAL_DAM_PER_RATIO] = fightPowerRatioConfig.QunFinalDamPerRatio; fightPowerVariables[QUN_FINAL_DAM_PER_DEF_RATIO] = fightPowerRatioConfig.QunFinalDamPerDefRatio; fightPowerVariables[FINAL_DAM_PER_RATIO] = fightPowerRatioConfig.FinalDamPerRatio; fightPowerVariables[FINAL_DAM_PER_DEF_RATIO] = fightPowerRatioConfig.FinalDamPerDefRatio; fightPowerVariables[PHY_DAM_PER_RATIO] = fightPowerRatioConfig.PhyDamPerRatio; fightPowerVariables[PHY_DAM_PER_DEF_RATIO] = fightPowerRatioConfig.PhyDamPerDefRatio; fightPowerVariables[MAG_DAM_PER_RATIO] = fightPowerRatioConfig.MagDamPerRatio; fightPowerVariables[MAG_DAM_PER_DEF_RATIO] = fightPowerRatioConfig.MagDamPerDefRatio; fightPowerVariables[CURE_PER_RATIO] = fightPowerRatioConfig.CurePerRatio; fightPowerVariables[CURE_PER_DEF_RATIO] = fightPowerRatioConfig.CurePerDefRatio; fightPowerVariables[PVP_DAM_PER_RATIO] = fightPowerRatioConfig.PVPDamPerRatio; fightPowerVariables[PVP_DAM_PER_DEF_RATIO] = fightPowerRatioConfig.PVPDamPerDefRatio; long fightPower; if (useFormulaType == 0) { fightPower = (long)FightPowerFormula.GetFightPower(fightPowerVariables); } else { fightPower = (long)JaceCalculator.Calculate(fightPowerFormula, fightPowerVariables); } long fightPower = (long)FightPowerFormula.GetFightPower(fightPowerVariables); #if UNITY_EDITOR //排除值为0的属性输出 // var tmpFightPowerVariables = fightPowerVariables.Where(x => x.Value > 0).ToDictionary(x => x.Key, x => x.Value); @@ -528,19 +537,11 @@ //加上技能战力 fightPowerVariables.Clear(); fightPowerVariables["PlayerLV"] = PlayerDatas.Instance.baseData.LV; fightPowerVariables["OfficialLV"] = PlayerDatas.Instance.baseData.realmLevel; fightPowerVariables["SkillPower"] = hero.GetSkillsFightPower(); fightPowerVariables[PLAYER_LV] = PlayerDatas.Instance.baseData.LV; fightPowerVariables[OFFICIAL_LV] = PlayerDatas.Instance.baseData.realmLevel; fightPowerVariables[SKILL_POWER] = hero.GetSkillsFightPower(); long skillPower; if (useFormulaType == 0) { skillPower = (long)FightPowerFormula.GetSkillsFightPower(fightPowerVariables); } else { skillPower = (long)JaceCalculator.Calculate(skillFightPowerFormula, fightPowerVariables); } long skillPower = (long)FightPowerFormula.GetSkillsFightPower(fightPowerVariables); #if UNITY_EDITOR // Debug.Log($"战力:武将ID {hero.heroId} 技能战力 {skillPower} 技能参数 {JsonMapper.ToJson(fightPowerVariables)}"); @@ -550,6 +551,7 @@ return fightPower + skillPower; } /// <summary> @@ -565,152 +567,6 @@ InitFightPowerParam(dropindex: item.gridIndex); var tmpFightPower = CalculatePower(); return tmpFightPower - fightPower; } //装备掉落的简易对比,只做两装备之间的好坏对比不用全部计算,避免GC问题 public long GetFightPowerChangeSimple(ItemModel item) { RefrehOneEquipAttr(PackType.Equip, item.config.EquipPlace - 1); var fightPower = CalculateSimpleEquipPower(); if (equipAttrs.IsNullOrEmpty()) { //装备为空,直接返回1,战力公式可能会算出负数的情况,故单一装备不对比 return 1; } RefrehOneEquipAttr(PackType.DropItem, item.gridIndex); var tmpFightPower = CalculateSimpleEquipPower(); #if UNITY_EDITOR var equip = PackManager.Instance.GetItemByIndex(PackType.Equip, item.config.EquipPlace - 1); var dropEquip = PackManager.Instance.GetItemByIndex(PackType.DropItem, item.gridIndex); var name = equip != null ? equip.config.ItemName : "空"; Debug.Log($"简易对比装备 {name} 和 {dropEquip.config.ItemName} 差值 {tmpFightPower - fightPower}"); #endif return tmpFightPower - fightPower; } void RefrehOneEquipAttr(PackType type, int index) { equipAttrs.Clear(); //身上装备属性重置 var equip = PackManager.Instance.GetItemByIndex(type, index); if (equip == null) { return; } var baseIDAttrs = EquipModel.Instance.GetEquipBaseAttrs(equip); var baseVauleAttrs = EquipModel.Instance.GetEquipBaseValues(equip); if (baseIDAttrs != null) { for (int j = 0; j < baseIDAttrs.Count; j++) { if (!equipAttrs.ContainsKey(baseIDAttrs[j])) { equipAttrs[baseIDAttrs[j]] = baseVauleAttrs[j]; } else { equipAttrs[baseIDAttrs[j]] += baseVauleAttrs[j]; } } } var fightIDAttrs = EquipModel.Instance.GetEquipFightAttrs(equip); var fightValueAttrs = EquipModel.Instance.GetEquipFightValues(equip); if (fightIDAttrs != null) { for (int j = 0; j < fightIDAttrs.Count; j++) { if (!equipAttrs.ContainsKey(fightIDAttrs[j])) { equipAttrs[fightIDAttrs[j]] = fightValueAttrs[j]; } else { equipAttrs[fightIDAttrs[j]] += fightValueAttrs[j]; } } } } public long CalculateSimpleEquipPower() { if (equipAttrs.IsNullOrEmpty()) return 0; fightPowerVariables.Clear(); foreach (var config in PlayerPropertyConfig.GetValues()) { if (config.showType < 1 || config.showType > 4) { continue; } var value = equipAttrs.TryGetValue(config.ID, out var v) ? v : 0; fightPowerVariables[config.Parameter] = value; } //属性系数根据官职等级的加成 var fightPowerRatioConfig = FightPowerRatioConfig.Get(PlayerDatas.Instance.baseData.realmLevel); fightPowerVariables["AtkRatio"] = fightPowerRatioConfig.AtkRatio; fightPowerVariables["MaxHPRatio"] = fightPowerRatioConfig.MaxHPRatio; fightPowerVariables["DefRatio"] = fightPowerRatioConfig.DefRatio; fightPowerVariables["StunRateRatio"] = fightPowerRatioConfig.StunRateRatio; fightPowerVariables["SuperHitRateRatio"] = fightPowerRatioConfig.SuperHitRateRatio; fightPowerVariables["ComboRateRatio"] = fightPowerRatioConfig.ComboRateRatio; fightPowerVariables["MissRateRatio"] = fightPowerRatioConfig.MissRateRatio; fightPowerVariables["ParryRateRatio"] = fightPowerRatioConfig.ParryRateRatio; fightPowerVariables["SuckHPPerRatio"] = fightPowerRatioConfig.SuckHPPerRatio; fightPowerVariables["StunRateDefRatio"] = fightPowerRatioConfig.StunRateDefRatio; fightPowerVariables["SuperHitRateDefRatio"] = fightPowerRatioConfig.SuperHitRateDefRatio; fightPowerVariables["ComboRateDefRatio"] = fightPowerRatioConfig.ComboRateDefRatio; fightPowerVariables["MissRateDefRatio"] = fightPowerRatioConfig.MissRateDefRatio; fightPowerVariables["ParryRateDefRatio"] = fightPowerRatioConfig.ParryRateDefRatio; fightPowerVariables["SuckHPPerDefRatio"] = fightPowerRatioConfig.SuckHPPerDefRatio; fightPowerVariables["NormalSkillPerRatio"] = fightPowerRatioConfig.NormalSkillPerRatio; fightPowerVariables["NormalSkillPerDefRatio"] = fightPowerRatioConfig.NormalSkillPerDefRatio; fightPowerVariables["AngerSkillPerRatio"] = fightPowerRatioConfig.AngerSkillPerRatio; fightPowerVariables["AngerSkillPerDefRatio"] = fightPowerRatioConfig.AngerSkillPerDefRatio; fightPowerVariables["SuperDamPerRatio"] = fightPowerRatioConfig.SuperDamPerRatio; fightPowerVariables["SuperDamPerDefRatio"] = fightPowerRatioConfig.SuperDamPerDefRatio; fightPowerVariables["ShieldPerRatio"] = fightPowerRatioConfig.ShieldPerRatio; fightPowerVariables["ShieldPerDefRatio"] = fightPowerRatioConfig.ShieldPerDefRatio; fightPowerVariables["DOTPerRatio"] = fightPowerRatioConfig.DOTPerRatio; fightPowerVariables["DOTPerDefRatio"] = fightPowerRatioConfig.DOTPerDefRatio; fightPowerVariables["WeiFinalDamPerRatio"] = fightPowerRatioConfig.WeiFinalDamPerRatio; fightPowerVariables["WeiFinalDamPerDefRatio"] = fightPowerRatioConfig.WeiFinalDamPerDefRatio; fightPowerVariables["ShuFinalDamPerRatio"] = fightPowerRatioConfig.ShuFinalDamPerRatio; fightPowerVariables["ShuFinalDamPerDefRatio"] = fightPowerRatioConfig.ShuFinalDamPerDefRatio; fightPowerVariables["WuFinalDamPerRatio"] = fightPowerRatioConfig.WuFinalDamPerRatio; fightPowerVariables["WuFinalDamPerDefRatio"] = fightPowerRatioConfig.WuFinalDamPerDefRatio; fightPowerVariables["QunFinalDamPerRatio"] = fightPowerRatioConfig.QunFinalDamPerRatio; fightPowerVariables["QunFinalDamPerDefRatio"] = fightPowerRatioConfig.QunFinalDamPerDefRatio; fightPowerVariables["FinalDamPerRatio"] = fightPowerRatioConfig.FinalDamPerRatio; fightPowerVariables["FinalDamPerDefRatio"] = fightPowerRatioConfig.FinalDamPerDefRatio; fightPowerVariables["PhyDamPerRatio"] = fightPowerRatioConfig.PhyDamPerRatio; fightPowerVariables["PhyDamPerDefRatio"] = fightPowerRatioConfig.PhyDamPerDefRatio; fightPowerVariables["MagDamPerRatio"] = fightPowerRatioConfig.MagDamPerRatio; fightPowerVariables["MagDamPerDefRatio"] = fightPowerRatioConfig.MagDamPerDefRatio; fightPowerVariables["CurePerRatio"] = fightPowerRatioConfig.CurePerRatio; fightPowerVariables["CurePerDefRatio"] = fightPowerRatioConfig.CurePerDefRatio; fightPowerVariables["PVPDamPerRatio"] = fightPowerRatioConfig.PVPDamPerRatio; fightPowerVariables["PVPDamPerDefRatio"] = fightPowerRatioConfig.PVPDamPerDefRatio; long fightPower; if (useFormulaType == 0) { fightPower = (long)FightPowerFormula.GetFightPower(fightPowerVariables); } else { fightPower = (long)JaceCalculator.Calculate(fightPowerFormula, fightPowerVariables); } return fightPower; } @@ -771,7 +627,7 @@ propertyStrForDebug = ""; #endif foreach (var config in PlayerPropertyConfig.GetValues()) foreach (var config in pConfig) { if (config.showType < 1 || config.showType > 4) { Main/System/Main/MoneyMoveByPath.cs
@@ -20,9 +20,10 @@ public Transform targetPosition; List<ImageEx> imgMoneys = new List<ImageEx>(); int pointCount = 30; Vector3[] points = new Vector3[30]; Vector3[] points2 = new Vector3[30]; const int pointCount = 20; Vector3[] points = new Vector3[pointCount]; Vector3[] points2 = new Vector3[pointCount]; private static readonly Vector2 IconSize = new Vector2(40, 40); /// <summary> /// 播放掉落动画 @@ -52,7 +53,7 @@ var moneyImg = imgMoney.GetComponent<ImageEx>(); moneyImg.SetIconWithMoneyType(moneyType); moneyImg.raycastTarget = false; moneyImg.GetComponent<RectTransform>().sizeDelta = new Vector2(40, 40); moneyImg.GetComponent<RectTransform>().sizeDelta = IconSize; imgMoneys.Add(moneyImg); } } @@ -92,7 +93,7 @@ } moneyImg.transform.localPosition = points2[0]; moneyImg.transform.DOLocalPath(points2, duration1, PathType.CatmullRom).SetEase(Ease.InOutSine).OnComplete(() => moneyImg.transform.DOLocalPath(points2, duration1, PathType.Linear).SetEase(Ease.InOutSine).OnComplete(() => { if (targetPosition != null) { Main/System/PhantasmPavilion/PhantasmPavilionManager.cs
@@ -83,10 +83,13 @@ private void OnRefreshItemEvent(PackType type, int arg2, int arg3) private void OnRefreshItemEvent(PackType type, int index, int itemID) { if (type != PackType.Item) return; //要与策划约定类型,避免频繁刷新 if (ItemConfig.Get(itemID).Type != 11111) return; UpdateRedPoint(); }