From ff032a0d727eee13399e29391e1437bea912337c Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期六, 06 十二月 2025 16:42:46 +0800
Subject: [PATCH] 121 【武将】武将系统 - 生效武将版本,同步属性计算,更改新筛选模式
---
Main/System/Main/FightPowerManager.cs | 55 ++++++++++++++++++++++++++++++-------------------------
1 files changed, 30 insertions(+), 25 deletions(-)
diff --git a/Main/System/Main/FightPowerManager.cs b/Main/System/Main/FightPowerManager.cs
index aa20721..779d0cc 100644
--- a/Main/System/Main/FightPowerManager.cs
+++ b/Main/System/Main/FightPowerManager.cs
@@ -46,6 +46,7 @@
private const string FETTER_PER = "fetterPer";
private const string HERO_LV_VALUE = "heroLVValue";
private const string HERO_LV_PER = "heroLVPer";
+ private const string HERO_CARDPER = "cardPer";
// 鎴樺姏鍙橀噺甯搁噺
private const string ATK_RATIO = "AtkRatio";
@@ -143,8 +144,10 @@
//鍒嗗紑瀛樺偍棰勮鍜� 鐪熷疄灞炴��
public Dictionary<int, int> equipAttrs = new Dictionary<int, int>(); //瑁呭灞炴��
- public Dictionary<string, int> lineUpPerDict = new Dictionary<string, int>(); //闃靛灞炴�у姞鎴�
+ // public Dictionary<string, int> lineUpPerDict = new Dictionary<string, int>(); //闃靛灞炴�у姞鎴�
public Dictionary<int, int> countryAttrs = new Dictionary<int, int>(); //闃靛鍥藉锛堝厜鐜級灞炴��
+
+ float allHeroAddPer = 0; //鎵�鏈夋灏嗗姞鎴�
//绛夌骇灞炴��
void RefreshLVAttrs()
@@ -259,8 +262,8 @@
{
//闃靛灞炴��
// 闃靛锛氭墍鏈夋灏嗕笂闃靛睘鎬�
- lineUpPerDict = HeroUIManager.Instance.GetLineupPer(teamTypeCalc, isPreviewTeamPower);
-
+ // lineUpPerDict = HeroUIManager.Instance.GetLineupPer(teamTypeCalc, isPreviewTeamPower);
+ allHeroAddPer = HeroUIManager.Instance.GetAllHeroPer() / 10000.0f;
#if UNITY_EDITOR
// Debug.Log("鎴樺姏锛氫笂闃靛睘鎬� " + JsonMapper.ToJson(lineUpPerDict));
#endif
@@ -302,10 +305,10 @@
propertyVariables[LV_VALUE] = lvAttrs.ContainsKey(attrType) ? lvAttrs[attrType] : 0;
propertyVariables[EQUIP_VALUE] = equipAttrs.ContainsKey(attrType) ? equipAttrs[attrType] : 0;
- propertyVariables[BOOK_VALUE] = 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[BOOK_PER] = GetBookPer(attrType) / 10000.0f;
propertyVariables[GUBAO_VALUE] = 0;
propertyVariables[GUBAO_PER] = 0;
propertyVariables[HJG_VALUE] = PhantasmPavilionManager.Instance.GetAttrValue(attrType);
@@ -315,11 +318,13 @@
propertyVariables[BEAUTY_VALUE] = 0;
propertyVariables[BEAUTY_PER] = 0;
+ //鍏ㄤ綋鍗$墝鍔犳垚
+ propertyVariables[HERO_CARDPER] = allHeroAddPer;
//锛侊紒锛佸崟姝﹀皢鎴樺姏棰勮鐨勮瘽闇�瑕佹帓闄ら槦浼嶅奖鍝嶆垬鍔涳紝鍙畻姝﹀皢鑷韩鐨勪笂闃靛睘鎬�
- 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[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[LINEUP_HALO_VALUE] = countryAttrs.ContainsKey(attrType) ? countryAttrs[attrType] : 0;
@@ -354,24 +359,24 @@
- int GetLineUpPer(int attrType, string key)
- {
- if (!PlayerPropertyConfig.baseAttrs.Contains(attrType))
- {
- return 0;
- }
+ // int GetLineUpPer(int attrType, string key)
+ // {
+ // if (!PlayerPropertyConfig.baseAttrs.Contains(attrType))
+ // {
+ // return 0;
+ // }
- return lineUpPerDict[key];
- }
+ // return lineUpPerDict[key];
+ // }
- int GetBookPer(int attrType)
- {
- if (!PlayerPropertyConfig.baseAttrs.Contains(attrType))
- {
- return 0;
- }
- return HeroUIManager.Instance.allHeroBookPer;
- }
+ // int GetBookPer(int attrType)
+ // {
+ // if (!PlayerPropertyConfig.baseAttrs.Contains(attrType))
+ // {
+ // return 0;
+ // }
+ // return HeroUIManager.Instance.allHeroBookPer;
+ // }
int GetOfficialPer(int attrType)
{
--
Gitblit v1.8.0