guodong 1 год назад
Родитель
Сommit
15b6112d94

+ 2 - 2
GameClient/Assets/Game/HotUpdate/Data/ArenaDataManager.cs

@@ -453,7 +453,7 @@ namespace GFGGame
             double clickScore = 0;
             foreach (int key in roleData.partScoreListDic.Keys)
             {
-                double partBaseScore = ScoreSystemData.Instance.GetPartBaseScore(roleData, key);
+                double partBaseScore = ScoreSystemData.Instance.GetroundBaseScore(roleData, key);
                 //start------------------------------------------------------
                 //本段注释为上个版本的计算公式,留做备份参考
                 //(部件基础分+(人物基础分+雅集技能分数+卡牌属性分数)*卓越点击系数)*点击系数
@@ -477,7 +477,7 @@ namespace GFGGame
             for (int i = 0; i < scoreCfg.Length; i++)
             {
                 clickScore +=
-                    (long)ScoreSystemData.Instance.GetRobotPartScore(robotData, i + 1, ClickType.PERFECT_CLICK, 0);
+                    (long)ScoreSystemData.Instance.GetRobotRoundScore(robotData, i + 1, ClickType.PERFECT_CLICK, 0);
             }
 
             return clickScore;

+ 22 - 22
GameClient/Assets/Game/HotUpdate/Data/FightDataManager.cs

@@ -324,37 +324,37 @@ namespace GFGGame
                 if (!ArenaDataManager.Instance.targetVaildSkills.ContainsKey(roundIndex)) ArenaDataManager.Instance.targetVaildSkills[roundIndex] = new Dictionary<int, Dictionary<int, List<PassivitySkillLvlCfg>>>();
             }
 
-            int partId = 0;
-            int currentTime = BeginTime.PART_ALL_FIGHT_BEGIN;
-            GetSkillScore(FightRoleType.MINE, roundIndex, currentTime, partId, mainScore, cardId, skillLvs, roundTime, ref score, targetMainScore, targetCardId, targetSkillLvs, targetRoundTime, ref targetScore);
-            GetSkillScore(FightRoleType.TAEGET, roundIndex, currentTime, partId, targetMainScore, targetCardId, targetSkillLvs, targetRoundTime, ref targetScore, mainScore, cardId, skillLvs, roundTime, ref score);
+            int roundId = 0;
+            int currentTime = SkillBeginTime.FIGHT_BEGIN;
+            GetSkillScore(FightRoleType.MINE, roundIndex, currentTime, roundId, mainScore, cardId, skillLvs, roundTime, ref score, targetMainScore, targetCardId, targetSkillLvs, targetRoundTime, ref targetScore);
+            GetSkillScore(FightRoleType.TAEGET, roundIndex, currentTime, roundId, targetMainScore, targetCardId, targetSkillLvs, targetRoundTime, ref targetScore, mainScore, cardId, skillLvs, roundTime, ref score);
             for (int i = 0; i < FightScoreCfgArray.Instance.dataArray.Length; i++)
             {
-                partId++;
-                currentTime = BeginTime.PART_FIGHT_BEGIN;
-                GetSkillScore(FightRoleType.MINE, roundIndex, currentTime, partId, mainScore, cardId, skillLvs, roundTime, ref score, targetMainScore, targetCardId, targetSkillLvs, targetRoundTime, ref targetScore);
-                GetSkillScore(FightRoleType.TAEGET, roundIndex, currentTime, partId, targetMainScore, targetCardId, targetSkillLvs, targetRoundTime, ref targetScore, mainScore, cardId, skillLvs, roundTime, ref score);
-                score += ScoreSystemData.Instance.GetPartScore(myRoleData, partId, ClickType.PERFECT_CLICK, 0);
+                roundId++;
+                currentTime = SkillBeginTime.ERVERY_ROUND_BEGIN;
+                GetSkillScore(FightRoleType.MINE, roundIndex, currentTime, roundId, mainScore, cardId, skillLvs, roundTime, ref score, targetMainScore, targetCardId, targetSkillLvs, targetRoundTime, ref targetScore);
+                GetSkillScore(FightRoleType.TAEGET, roundIndex, currentTime, roundId, targetMainScore, targetCardId, targetSkillLvs, targetRoundTime, ref targetScore, mainScore, cardId, skillLvs, roundTime, ref score);
+                score += ScoreSystemData.Instance.GetRoundScore(myRoleData, roundId, ClickType.PERFECT_CLICK, 0);
                 if (targetRoleData.type == FightTargetType.PLAYER)
                 {
-                    targetScore += ScoreSystemData.Instance.GetPartScore(targetRoleData, partId, ClickType.PERFECT_CLICK, 0);
+                    targetScore += ScoreSystemData.Instance.GetRoundScore(targetRoleData, roundId, ClickType.PERFECT_CLICK, 0);
                 }
                 else
                 {
-                    targetScore += ScoreSystemData.Instance.GetRobotPartScore(targetRoleData, partId, ClickType.PERFECT_CLICK, 0);
+                    targetScore += ScoreSystemData.Instance.GetRobotRoundScore(targetRoleData, roundId, ClickType.PERFECT_CLICK, 0);
                 }
-                currentTime = BeginTime.PART_PERFECT_CLICK;
-                GetSkillScore(FightRoleType.MINE, roundIndex, currentTime, partId, mainScore, cardId, skillLvs, roundTime, ref score, targetMainScore, targetCardId, targetSkillLvs, targetRoundTime, ref targetScore);
-                GetSkillScore(FightRoleType.TAEGET, roundIndex, currentTime, partId, targetMainScore, targetCardId, targetSkillLvs, targetRoundTime, ref targetScore, mainScore, cardId, skillLvs, roundTime, ref score);
-                currentTime = BeginTime.PART_FIGHT_END;
-                GetSkillScore(FightRoleType.MINE, roundIndex, currentTime, partId, mainScore, cardId, skillLvs, roundTime, ref score, targetMainScore, targetCardId, targetSkillLvs, targetRoundTime, ref targetScore);
-                GetSkillScore(FightRoleType.TAEGET, roundIndex, currentTime, partId, targetMainScore, targetCardId, targetSkillLvs, targetRoundTime, ref targetScore, mainScore, cardId, skillLvs, roundTime, ref score);
+                currentTime = SkillBeginTime.PERFECT_CLICK;
+                GetSkillScore(FightRoleType.MINE, roundIndex, currentTime, roundId, mainScore, cardId, skillLvs, roundTime, ref score, targetMainScore, targetCardId, targetSkillLvs, targetRoundTime, ref targetScore);
+                GetSkillScore(FightRoleType.TAEGET, roundIndex, currentTime, roundId, targetMainScore, targetCardId, targetSkillLvs, targetRoundTime, ref targetScore, mainScore, cardId, skillLvs, roundTime, ref score);
+                currentTime = SkillBeginTime.ERVERY_ROUND_END;
+                GetSkillScore(FightRoleType.MINE, roundIndex, currentTime, roundId, mainScore, cardId, skillLvs, roundTime, ref score, targetMainScore, targetCardId, targetSkillLvs, targetRoundTime, ref targetScore);
+                GetSkillScore(FightRoleType.TAEGET, roundIndex, currentTime, roundId, targetMainScore, targetCardId, targetSkillLvs, targetRoundTime, ref targetScore, mainScore, cardId, skillLvs, roundTime, ref score);
                 // Debug.Log(" targetScore444:" + targetScore);
             }
-            partId++;
-            currentTime = BeginTime.ALL_PERFECT_START;
-            GetSkillScore(FightRoleType.MINE, roundIndex, currentTime, partId, mainScore, cardId, skillLvs, roundTime, ref score, targetMainScore, targetCardId, targetSkillLvs, targetRoundTime, ref targetScore);
-            GetSkillScore(FightRoleType.TAEGET, roundIndex, currentTime, partId, targetMainScore, targetCardId, targetSkillLvs, targetRoundTime, ref targetScore, mainScore, cardId, skillLvs, roundTime, ref score);
+            roundId++;
+            currentTime = SkillBeginTime.ALL_PERFECT_START;
+            GetSkillScore(FightRoleType.MINE, roundIndex, currentTime, roundId, mainScore, cardId, skillLvs, roundTime, ref score, targetMainScore, targetCardId, targetSkillLvs, targetRoundTime, ref targetScore);
+            GetSkillScore(FightRoleType.TAEGET, roundIndex, currentTime, roundId, targetMainScore, targetCardId, targetSkillLvs, targetRoundTime, ref targetScore, mainScore, cardId, skillLvs, roundTime, ref score);
             score += ScoreSystemData.Instance.GetAllCircleAddScore(myRoleData);
             targetScore += ScoreSystemData.Instance.GetAllCircleAddScore(targetRoleData);
             Debug.Log(" targetScore666:" + targetScore);
@@ -366,7 +366,7 @@ namespace GFGGame
         private void GetSkillScore(int roleType, int roundIndex, int currentTime, int partId, double mainScore, int cardId, List<int> skillLvs, List<int> roundTime, ref double score, double targetMainScore, int targetCardId, List<int> targetSkillLvs, List<int> targetRoundTime, ref double targetScore)
         {
             List<PassivitySkillLvlCfg> vaildSkills = ScoreSystemData.Instance.GetValidSkills(currentTime, partId, cardId, skillLvs, targetCardId, targetSkillLvs, roundTime, targetRoundTime);
-            ScoreSystemData.Instance.GetPartItemSkillScore(vaildSkills, mainScore, targetMainScore, out int skillScore, out int targetSkillScore, out Dictionary<int, int> skillScoreDic);
+            ScoreSystemData.Instance.GetRoundItemSkillScore(vaildSkills, mainScore, targetMainScore, out int skillScore, out int targetSkillScore, out Dictionary<int, int> skillScoreDic);
 
             score += skillScore;
             targetScore += targetSkillScore;

+ 52 - 52
GameClient/Assets/Game/HotUpdate/Data/ScoreSystemData.cs

@@ -11,19 +11,19 @@ namespace GFGGame
         public const int GOOD_CLICK = 1;
         public const int PERFECT_CLICK = 2;
     }
-    public class BeginTime
+    public class SkillBeginTime
     {
-        public const int PART_SCORE_1 = 1;//作用第一回合
-        public const int PART_SCORE_2 = 2;//作用第二回合
-        public const int PART_SCORE_3 = 3;//作用第三回合
-        public const int PART_SCORE_4 = 4;//作用第四回合
-        public const int PART_SCORE_5 = 5;//作用第五回合
-        public const int PART_SCORE_6 = 6;//作用第六回合
-        public const int PART_ALL_FIGHT_BEGIN = 7;//对战开始
-        public const int PART_PERFECT_CLICK = 8;//每次完美点击
-        public const int PART_FIGHT_BEGIN = 9;//每回合开始
-        public const int PART_FIGHT_END = 10;//每回合结束
-        public const int ALL_PERFECT_START = 11;//登封造极开始
+        public const int ROUND_1 = 1;//作用第一回合
+        public const int ROUND_2 = 2;//作用第二回合
+        public const int ROUND_3 = 3;//作用第三回合
+        public const int ROUND_4 = 4;//作用第四回合
+        public const int ROUND_5 = 5;//作用第五回合
+        public const int ROUND_6 = 6;//作用第六回合
+        public const int FIGHT_BEGIN = 7;//对战开始
+        public const int PERFECT_CLICK = 8;//每次完美点击
+        public const int ERVERY_ROUND_BEGIN = 9;//每回合开始
+        public const int ERVERY_ROUND_END = 10;//每回合结束
+        public const int ALL_PERFECT_START = 11;//登封造极开始(所有点击完美才会出现登峰造极)
     }
 
 
@@ -89,7 +89,7 @@ namespace GFGGame
 
             for (int i = 0; i < FightScoreCfgArray.Instance.dataArray.Length; i++)
             {
-                baseScore += GetPartBaseScore(roleData, i + 1);
+                baseScore += GetroundBaseScore(roleData, i + 1);
             }
 
 
@@ -105,27 +105,27 @@ namespace GFGGame
 
             for (int i = 0; i < FightScoreCfgArray.Instance.dataArray.Length; i++)
             {
-                partScore += GetRobotPartBaseScore(robotData, i + 1);
+                partScore += GetRobotRoundBaseScore(robotData, i + 1);
             }
             return (partScore + robotData.baseScore + robotData.leagueSkillScore + robotData.cardScore) * ConstScoreSystem.MAIN_SCORE;
         }
 
 
         /// <summary>
-        /// 部件评分
+        /// 回合评分
         /// </summary>
-        /// <param name="partId">部件id</param>
+        /// <param name="roundId">部件id</param>
         /// <param name="clickType">点击状态0:miss,1:优秀,2:完美</param>
         /// <param name="mainScore">总主属性</param>
         /// <param name="type">评分部位</param>
         /// <param name="showCard">是否展示词牌效果</param>
         /// <returns></returns>
-        public int GetPartScore(FightData roleData, int partId, int clickType, double skillScore)
+        public int GetRoundScore(FightData roleData, int roundId, int clickType, double skillScore)
         {
 
             //部件评分=部件基础分*部件系数
             //词牌评分=总属性*技能配表百分比
-            double partBaseScore = GetPartBaseScore(roleData, partId);
+            double partBaseScore = GetroundBaseScore(roleData, roundId);
 
             double partScore = partBaseScore * ConstScoreSystem.PART_SCORE;
 
@@ -133,7 +133,7 @@ namespace GFGGame
             long leagueSkillScore = roleData.leagueSkillScore;
             int cardScore = roleData.cardScore;
 
-            double clickCoefficient = GetPartItemClickScore(clickType);
+            double clickCoefficient = GetRoundItemClickScore(clickType);
             //start------------------------------------------------------
             //本段注释为上个版本的计算公式,留做备份参考
             //点击评分=(部件基础分+(人物基础分+雅集技能分+词牌属性分数)*点击系数)*2.22   (防止点击优秀却因为未穿衣服结果是0分)
@@ -145,11 +145,11 @@ namespace GFGGame
             return Math.Max(0, score);
         }
 
-        public int GetRobotPartScore(FightData robotData, int partId, int clickType, double skillScore)
+        public int GetRobotRoundScore(FightData robotData, int roundId, int clickType, double skillScore)
         {
             //部件评分=部件基础分*部件系数
             //词牌评分=总属性*技能配表百分比
-            double partBaseScore = GetRobotPartBaseScore(robotData, partId);
+            double partBaseScore = GetRobotRoundBaseScore(robotData, roundId);
 
             double partScore = partBaseScore * ConstScoreSystem.PART_SCORE;
 
@@ -157,7 +157,7 @@ namespace GFGGame
             long leagueSkillScore = robotData.leagueSkillScore;
             int cardScore = robotData.cardScore;
 
-            double clickCoefficient = GetPartItemClickScore(clickType);
+            double clickCoefficient = GetRoundItemClickScore(clickType);
             //start------------------------------------------------------
             //本段注释为上个版本的计算公式,留做备份参考
             //点击评分=(部件基础分+(人物基础分+词牌属性分数)*点击系数)*2.22   (防止点击优秀却因为未穿衣服结果是0分)
@@ -170,21 +170,21 @@ namespace GFGGame
         }
 
         /// <summary>
-        /// 部件基础评分
+        /// 回合基础评分
         /// </summary>
-        /// <param name="partId">评分部位</param>
+        /// <param name="roundId">评分部位</param>
         /// <returns></returns>
-        public double GetPartBaseScore(FightData roleData, int partId)
+        public double GetroundBaseScore(FightData roleData, int roundId)
         {
             double partScore = 0;
             double tagScore = 0;
             int tagCount = 0;
-            if (!roleData.partListDic.ContainsKey(partId) || roleData.partListDic[partId].Count == 0) return partScore;
+            if (!roleData.partListDic.ContainsKey(roundId) || roleData.partListDic[roundId].Count == 0) return partScore;
 
-            List<int> partList = roleData.partListDic[partId];
+            List<int> partList = roleData.partListDic[roundId];
             for (int i = 0; i < partList.Count; i++)
             {
-                partScore += roleData.partScoreListDic[partId][i];
+                partScore += roleData.partScoreListDic[roundId][i];
                 tagScore += ItemDataManager.GetItemTagScore(partList[i], roleData.tags);
                 // if (ItemDataManager.CheckItemTagsRight(partList[i], roleData.tags)) tagCount++;
             }
@@ -210,20 +210,20 @@ namespace GFGGame
         /// </summary>
         /// <param name="roleData"></param>
         /// <returns></returns>
-        public double GetAllPartBaseScore(FightData roleData)
+        public double GetAllRoundBaseScore(FightData roleData)
         {
             double baseScore = 0;
 
             for (int i = 0; i < FightScoreCfgArray.Instance.dataArray.Length; i++)
             {
-                baseScore += GetPartBaseScore(roleData, i + 1);
+                baseScore += GetroundBaseScore(roleData, i + 1);
             }
             return baseScore;
         }
 
-        private double GetRobotPartBaseScore(FightData robotData, int partId)
+        private double GetRobotRoundBaseScore(FightData robotData, int roundId)
         {
-            double partBaseScore = robotData.itemScoreList[partId - 1];
+            double partBaseScore = robotData.itemScoreList[roundId - 1];
             if (InstanceZonesDataManager.FightScene == ConstInstanceZonesType.Arena)
             {
                 partBaseScore = partBaseScore * (1 + robotData.tagAddition / 10000f);
@@ -232,7 +232,7 @@ namespace GFGGame
         }
 
 
-        private double GetPartItemClickScore(int clickType)
+        private double GetRoundItemClickScore(int clickType)
         {
             //点击评分=(部件基础分+(人物基础分+词牌属性分数)*点击系数)*2.22
             double clickCoefficient = 0;
@@ -266,7 +266,7 @@ namespace GFGGame
                 if (skillLvs.Count <= i) continue;
                 int skillLv = skillLvs[i];
                 PassivitySkillLvlCfg skillLvlCfg = PassivitySkillLvlCfgArray.Instance.GetCfgByskilllvlAndskillId(skillLv, targetSkillCfgs[i].skillId);
-                if (skillLvlCfg.beginTime == BeginTime.PART_ALL_FIGHT_BEGIN && UnityEngine.Random.Range(0, 10000) < skillLvlCfg.probability)
+                if (skillLvlCfg.beginTime == SkillBeginTime.FIGHT_BEGIN && UnityEngine.Random.Range(0, 10000) < skillLvlCfg.probability)
                 {
                     roundTimes.Add(skillLvlCfg.roundTime);
                 }
@@ -283,21 +283,21 @@ namespace GFGGame
         /// 获取有效技能配置,过滤掉:被对方失效的、不符合作用时机、未满足触发概率的技能
         /// </summary>
         /// <returns></returns>
-        public List<PassivitySkillLvlCfg> GetValidSkills(int currentTime, int partId, int cardId, List<int> skillLvs, int targetCardId, List<int> targetSkillLvs, List<int> roundTimes, List<int> targetRoundTimes)
+        public List<PassivitySkillLvlCfg> GetValidSkills(int currentTime, int roundId, int cardId, List<int> skillLvs, int targetCardId, List<int> targetSkillLvs, List<int> roundTimes, List<int> targetRoundTimes)
         {
             List<PassivitySkillLvlCfg> skillCfgs = new List<PassivitySkillLvlCfg>();
 
             List<PassivitySkillCfg> targetSkillCfgs = PassivitySkillCfgArray.Instance.GetCfgsBycardId(targetCardId);
-
+            //找到敌方对我的减益技能
             List<int> nullifySkillIndex = new List<int>();
             for (int i = 0; i < targetSkillCfgs.Count; i++)
             {
                 if (targetSkillLvs.Count <= i) continue;
                 PassivitySkillLvlCfg targetSkillLvlCfg = PassivitySkillLvlCfgArray.Instance.GetCfgByskilllvlAndskillId(targetSkillLvs[i], targetSkillCfgs[i].skillId);
-                if (CheckIsRightTime(targetSkillLvlCfg, currentTime, partId))
+                if (CheckIsRightTime(targetSkillLvlCfg, currentTime, roundId))
                 {
                     bool isProbability = targetSkillLvlCfg.nullifySkillIndex > 0 && UnityEngine.Random.Range(0, 10000) < targetSkillLvlCfg.probability;
-                    if (targetSkillLvlCfg.beginTime == BeginTime.PART_ALL_FIGHT_BEGIN && targetRoundTimes.Count > i && partId < targetRoundTimes[i]) isProbability = true;
+                    if (targetSkillLvlCfg.beginTime == SkillBeginTime.FIGHT_BEGIN && targetRoundTimes.Count > i && roundId < targetRoundTimes[i]) isProbability = true;
                     if (isProbability) nullifySkillIndex.Add(targetSkillLvlCfg.nullifySkillIndex);
                 }
             }
@@ -311,25 +311,25 @@ namespace GFGGame
 
                 if (nullifySkillIndex.IndexOf(i + 1) >= 0) continue;//技能被对手失效
 
-                if (CheckIsRightTime(mySkillLvlCfg, currentTime, partId))
+                if (CheckIsRightTime(mySkillLvlCfg, currentTime, roundId))
                 {
                     bool isProbability = UnityEngine.Random.Range(0, 10000) < mySkillLvlCfg.probability;
-                    if (mySkillLvlCfg.beginTime == BeginTime.PART_ALL_FIGHT_BEGIN && roundTimes != null && partId < roundTimes[i]) isProbability = true;
+                    if (mySkillLvlCfg.beginTime == SkillBeginTime.FIGHT_BEGIN && roundTimes != null && roundId < roundTimes[i]) isProbability = true;
                     if (isProbability) skillCfgs.Add(mySkillLvlCfg);
                 }
             }
             return skillCfgs;
         }
 
-        private bool CheckIsRightTime(PassivitySkillLvlCfg skillLvlCfg, int currentTime, int partId)
+        private bool CheckIsRightTime(PassivitySkillLvlCfg skillLvlCfg, int currentTime, int roundId)
         {
 
-            if (skillLvlCfg.beginTime == BeginTime.PART_ALL_FIGHT_BEGIN && currentTime == BeginTime.PART_FIGHT_BEGIN
-          || skillLvlCfg.beginTime == BeginTime.PART_PERFECT_CLICK && currentTime == BeginTime.PART_PERFECT_CLICK
-          || skillLvlCfg.beginTime == BeginTime.PART_FIGHT_BEGIN && currentTime == BeginTime.PART_FIGHT_BEGIN
-          || skillLvlCfg.beginTime == BeginTime.PART_FIGHT_END && currentTime == BeginTime.PART_FIGHT_END
-          || skillLvlCfg.beginTime == BeginTime.ALL_PERFECT_START && currentTime == BeginTime.ALL_PERFECT_START
-          || skillLvlCfg.beginTime <= BeginTime.PART_SCORE_6 && currentTime == BeginTime.PART_FIGHT_BEGIN && partId == skillLvlCfg.beginTime)
+            if (skillLvlCfg.beginTime == SkillBeginTime.FIGHT_BEGIN && currentTime == SkillBeginTime.ERVERY_ROUND_BEGIN
+          || skillLvlCfg.beginTime == SkillBeginTime.PERFECT_CLICK && currentTime == SkillBeginTime.PERFECT_CLICK
+          || skillLvlCfg.beginTime == SkillBeginTime.ERVERY_ROUND_BEGIN && currentTime == SkillBeginTime.ERVERY_ROUND_BEGIN
+          || skillLvlCfg.beginTime == SkillBeginTime.ERVERY_ROUND_END && currentTime == SkillBeginTime.ERVERY_ROUND_END
+          || skillLvlCfg.beginTime == SkillBeginTime.ALL_PERFECT_START && currentTime == SkillBeginTime.ALL_PERFECT_START
+          || skillLvlCfg.beginTime <= SkillBeginTime.ROUND_6 && currentTime == SkillBeginTime.ERVERY_ROUND_BEGIN && roundId == skillLvlCfg.beginTime)
             {
                 return true;
             }
@@ -341,24 +341,24 @@ namespace GFGGame
         /// <param name="validSkills">有效技能列表</param>
         /// <param name="mainScore">总主属性</param>
         /// <returns></returns>
-        public void GetPartItemSkillScore(List<PassivitySkillLvlCfg> validSkills, double mainScore, double targetMainScore, out int skillScore, out int targetScore, out Dictionary<int, int> skillScoreDic)
+        public void GetRoundItemSkillScore(List<PassivitySkillLvlCfg> validSkills, double mainScore, double targetMainScore, out int skillScore, out int targetScore, out Dictionary<int, int> skillsToShowDic)
         {
             double _skillScore = 0;
             double _targetSkillScore = 0;
-            skillScoreDic = new Dictionary<int, int>();
+            skillsToShowDic = new Dictionary<int, int>();
             for (int i = 0; i < validSkills.Count; i++)
             {
                 if (validSkills[i].target == 1 && mainScore > 0)//作用自身
                 {
                     double score = mainScore * validSkills[i].ratio / 10000;
                     _skillScore += score;
-                    skillScoreDic.Add(validSkills[i].skillId, (int)Math.Ceiling(score));
+                    skillsToShowDic.Add(validSkills[i].skillId, (int)Math.Ceiling(score));
                 }
                 else if (validSkills[i].target == 2 && targetMainScore > 0)//作用对方
                 {
                     double score = targetMainScore * validSkills[i].ratio / 10000;
                     _targetSkillScore += score;
-                    skillScoreDic.Add(validSkills[i].skillId, (int)Math.Ceiling(score));
+                    skillsToShowDic.Add(validSkills[i].skillId, (int)Math.Ceiling(score));
                 }
             }
             skillScore = (int)Math.Ceiling(_skillScore);
@@ -392,7 +392,7 @@ namespace GFGGame
         public int GetAllCircleAddScore(FightData fightData)
         {
             //登峰造极评分 = (部件基础分之和 + 人物基础分)*卓越点击系数 * 3
-            double allPartsBaseScore = GetAllPartBaseScore(fightData);
+            double allPartsBaseScore = GetAllRoundBaseScore(fightData);
             return (int)Math.Ceiling((allPartsBaseScore + (double)fightData.baseScore)* ConstScoreSystem.PERFECT_SCORE * ConstScoreSystem.ALL_CIRCLE_SCORE);
         }
 

+ 37 - 32
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryFightSingleScoreView.cs

@@ -13,13 +13,13 @@ namespace GFGGame
         private GameObject _scenePrefab;
         private GameObject _sceneObject;
         private FightData roleData;
-        private int _partId;//当前评分part
+        private int _partId;//当前评分part(回合id)
         private int _curIndex;//当前评分index
         private int _score;//当前总分数
         private int _skillScore = 0;//当前词牌技能分
         private int _allSkillScore = 0;//当前词牌技能叠加分,加到部件里的分,(部件开始、完美点击)
         private int _partScore = 0;//当前部件分+技能评分(_skillScore)
-        private int _currentTime = BeginTime.PART_ALL_FIGHT_BEGIN;
+        private int _currentTime = SkillBeginTime.FIGHT_BEGIN;
         private double _mainScore;//总主属性分
         private const int _range = 100;//圆圈随机范围
         // private const float _prefectScale = 0.866f;//完美缩放比
@@ -147,7 +147,7 @@ namespace GFGGame
         protected override void AddEventListener()
         {
             base.AddEventListener();
-            EventAgent.AddEventListener(ConstMessage.SHOW_CARD_SKILL_END, SkillScoreEnd);
+            EventAgent.AddEventListener(ConstMessage.SHOW_CARD_SKILL_END, OnShowCardSkillCompleted);
             // EventAgent.AddEventListener(ConstMessage.GUIDE_VIEW_HIDE, OnGuideEventListener);
         }
         protected override void OnShown()
@@ -181,7 +181,7 @@ namespace GFGGame
             _ui.m_comClick.m_comAllPerfect.target.visible = false;
             _isAllPerfect = false;
 
-            _currentTime = BeginTime.PART_ALL_FIGHT_BEGIN;
+            _currentTime = SkillBeginTime.FIGHT_BEGIN;
             // _stopFight = false;
             _partId = FightScoreCfgArray.Instance.dataArray[0].id;
             _curIndex = 0;
@@ -195,61 +195,63 @@ namespace GFGGame
             {
                 // _ui.m_comClick.target.touchable = true;
                 _ui.m_btnBack.visible = true;
-                Timers.inst.Add(0.5f, 1, SkillScoreStart);
+                Timers.inst.Add(0.5f, 1, TryShowCardSkill);
             }
             tryGuide = false;
             Timers.inst.AddUpdate(CheckGuide);
         }
 
-        private void SkillScoreStart(object param)
+        private void TryShowCardSkill(object param)
         {
             List<int> roundTimes = ScoreSystemData.Instance.GetRoundTime(roleData.cardId, roleData.skillLvs);
             List<PassivitySkillLvlCfg> vaildSkills = ScoreSystemData.Instance.GetValidSkills(_currentTime, _partId, roleData.cardId, roleData.skillLvs, 0, null, roundTimes, new List<int>());
-            ScoreSystemData.Instance.GetPartItemSkillScore(vaildSkills, _mainScore, 0, out _skillScore, out int _targetScore, out Dictionary<int, int> skillScoreDic);
+            ScoreSystemData.Instance.GetRoundItemSkillScore(vaildSkills, _mainScore, 0, out _skillScore, out int _targetScore, out Dictionary<int, int> skillsToShowDic);
             bool _showCard = ScoreSystemData.Instance.IsShowCard(InstanceZonesDataManager.currentCardId, vaildSkills);
             if (_showCard)
             {
-                ViewManager.Show<StorySkillView>(skillScoreDic);
+                ViewManager.Show<StorySkillView>(skillsToShowDic);
             }
             else
             {
                 EventAgent.DispatchEvent(ConstMessage.SHOW_CARD_SKILL_END);
             }
         }
-        private void SkillScoreEnd()
+
+        //技能展示结束
+        private void OnShowCardSkillCompleted()
         {
             switch (_currentTime)
             {
-                case BeginTime.PART_ALL_FIGHT_BEGIN:
+                case SkillBeginTime.FIGHT_BEGIN:
                     _score += _skillScore;
-                    CheckPartBeginSkill(null);
+                    CheckRoundBeginSkill(null);
                     break;
-                case BeginTime.PART_FIGHT_BEGIN:
+                case SkillBeginTime.ERVERY_ROUND_BEGIN:
                     _allSkillScore += _skillScore;
                     //这里不把技能分加到总分里,因为技能分会算到部件分里
-                    PartScoreStart();
+                    RoundStart();
                     break;
-                case BeginTime.PART_PERFECT_CLICK:
+                case SkillBeginTime.PERFECT_CLICK:
                     _allSkillScore += _skillScore;
                     PartScoreResultStart(ClickType.PERFECT_CLICK);
                     break;
-                case BeginTime.PART_FIGHT_END:
+                case SkillBeginTime.ERVERY_ROUND_END:
                     _score += _skillScore;
                     UpdateProgress();
                     break;
-                case BeginTime.ALL_PERFECT_START:
+                case SkillBeginTime.ALL_PERFECT_START:
                     _score += _skillScore;
                     UpdateProgress();
                     break;
             }
         }
-        private void CheckPartBeginSkill(object param)
+        private void CheckRoundBeginSkill(object param)
         {
-            _currentTime = BeginTime.PART_FIGHT_BEGIN;
-            SkillScoreStart(null);
+            _currentTime = SkillBeginTime.ERVERY_ROUND_BEGIN;
+            TryShowCardSkill(null);
 
         }
-        private void PartScoreStart()
+        private void RoundStart()
         {
             if (_curIndex == _partId) return;
             _ui.m_comClick.target.touchable = !FightDataManager.Instance.autoPlay;
@@ -302,8 +304,8 @@ namespace GFGGame
 
             if (clickType == ClickType.PERFECT_CLICK)
             {
-                _currentTime = BeginTime.PART_PERFECT_CLICK;
-                SkillScoreStart(null);
+                _currentTime = SkillBeginTime.PERFECT_CLICK;
+                TryShowCardSkill(null);
             }
             else
             {
@@ -318,7 +320,7 @@ namespace GFGGame
             // _ui.m_comClick.target.touchable = false;
 
             PartScoreResultEnd();
-            _partScore = ScoreSystemData.Instance.GetPartScore(roleData, _partId, clickType, _allSkillScore);
+            _partScore = ScoreSystemData.Instance.GetRoundScore(roleData, _partId, clickType, _allSkillScore);
             _score += _partScore;
             _ui.m_comClick.m_comResult.target.GetChild("holder" + clickType).visible = true;
             _ui.m_comClick.m_comResult.m_c1.selectedIndex = clickType;
@@ -352,9 +354,11 @@ namespace GFGGame
         {
             // _ui.m_comClick.m_comResult.target.visible = _partId == FightScoreCfgArray.Instance.dataArray.Length ? false : true;
             _skillScore = 0;
-            _currentTime = BeginTime.PART_FIGHT_END;
-            SkillScoreStart(null);
+            _currentTime = SkillBeginTime.ERVERY_ROUND_END;
+            TryShowCardSkill(null);
         }
+
+        //更新得分进度条
         private void UpdateProgress(object param = null)
         {
             double proportion = _score / _ui.m_proScore.target.max;
@@ -376,6 +380,7 @@ namespace GFGGame
                 });
         }
 
+        //回合结束
         private void PartScoreEnd()
         {
             _partId++;
@@ -383,7 +388,7 @@ namespace GFGGame
             {
                 if (_partId == FightScoreCfgArray.Instance.dataArray.Length + 1 && _prefectCount >= FightScoreCfgArray.Instance.dataArray.Length)//0)// 
                 {
-                    _currentTime = BeginTime.ALL_PERFECT_START;
+                    _currentTime = SkillBeginTime.ALL_PERFECT_START;
                     AllCirclePlayStart();//完美八连击
                 }
                 else
@@ -393,7 +398,7 @@ namespace GFGGame
             }
             else
             {
-                Timers.inst.Add(ConstScoreSystem.REFRESH_CIRCLE_WITE_TIME / FightDataManager.Instance.fightSpeed, 1, CheckPartBeginSkill);//下个部分评分
+                Timers.inst.Add(ConstScoreSystem.REFRESH_CIRCLE_WITE_TIME / FightDataManager.Instance.fightSpeed, 1, CheckRoundBeginSkill);//下个部分评分
             }
         }
 
@@ -457,7 +462,7 @@ namespace GFGGame
             _ui.m_comClick.m_comAllPerfect.m_t2.Play(() =>
                 {
                     _prefectCount = 0;
-                    SkillScoreStart(null);
+                    TryShowCardSkill(null);
                 });
             if (ViewManager.isViewOpen(typeof(GuideView).FullName) && GuideDataManager.IsGuideFinish(ConstGuideId.START_FIGHT) <= 0)
             {
@@ -506,16 +511,16 @@ namespace GFGGame
         protected override void RemoveEventListener()
         {
             base.RemoveEventListener();
-            EventAgent.RemoveEventListener(ConstMessage.SHOW_CARD_SKILL_END, SkillScoreEnd);
+            EventAgent.RemoveEventListener(ConstMessage.SHOW_CARD_SKILL_END, OnShowCardSkillCompleted);
             // EventAgent.RemoveEventListener(ConstMessage.GUIDE_VIEW_HIDE, OnGuideEventListener);
         }
         private void Reset()
         {
 
             Timers.inst.Remove(ComAllCirclePressTime);
-            Timers.inst.Remove(SkillScoreStart);
+            Timers.inst.Remove(TryShowCardSkill);
             Timers.inst.Remove(Skip);
-            Timers.inst.Remove(CheckPartBeginSkill);
+            Timers.inst.Remove(CheckRoundBeginSkill);
             GTween.Kill(_ui.m_proScore.m_comBar);
 
             _ui.m_proScore.target.value = 0;
@@ -569,7 +574,7 @@ namespace GFGGame
             if (!tryGuide && GuideDataManager.IsGuideIndexFinish(guideCfg.id, 6))
             {
                 tryGuide = true;
-                Timers.inst.Add(0.5f, 1, SkillScoreStart);
+                Timers.inst.Add(0.5f, 1, TryShowCardSkill);
             }
         }
 

+ 16 - 16
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryFightTargetScoreView.cs

@@ -49,7 +49,7 @@ namespace GFGGame
         private List<int> _roundTimes = new List<int>();//作用时机为对战开始的技能持续的回合数,为0表示技能未被触发或技能作用时机不是对战开始
         private List<int> _targetRoundTimes = new List<int>();//对方作用时机为对战开始的技能持续的回合数,为0表示技能未被触发或技能作用时机不是对战开始
 
-        private int _currentTime = BeginTime.PART_ALL_FIGHT_BEGIN;
+        private int _currentTime = SkillBeginTime.FIGHT_BEGIN;
         private int _prefectCount = 0;//卓越点击数量
         private float _time = 0;// 登峰造极按住的时间
 
@@ -248,7 +248,7 @@ namespace GFGGame
                 {
                     vaildSkills = ScoreSystemData.Instance.GetValidSkills(_currentTime, _partId, roleData.cardId, roleData.skillLvs, targetCardId, targetSkillLvs, _roundTimes, _targetRoundTimes);
                 }
-                ScoreSystemData.Instance.GetPartItemSkillScore(vaildSkills, _mainScore, _targetMainScore, out skillScore, out targetSkillScore, out skillScoreDic);
+                ScoreSystemData.Instance.GetRoundItemSkillScore(vaildSkills, _mainScore, _targetMainScore, out skillScore, out targetSkillScore, out skillScoreDic);
                 showCard = ScoreSystemData.Instance.IsShowCard(roleData.cardId, vaildSkills);
             }
             else
@@ -261,7 +261,7 @@ namespace GFGGame
                 {
                     vaildSkills = ScoreSystemData.Instance.GetValidSkills(_currentTime, _partId, targetCardId, targetSkillLvs, roleData.cardId, roleData.skillLvs, _roundTimes, _targetRoundTimes);
                 }
-                ScoreSystemData.Instance.GetPartItemSkillScore(vaildSkills, _targetMainScore, _mainScore, out skillScore, out targetSkillScore, out skillScoreDic);
+                ScoreSystemData.Instance.GetRoundItemSkillScore(vaildSkills, _targetMainScore, _mainScore, out skillScore, out targetSkillScore, out skillScoreDic);
                 showCard = false;
             }
         }
@@ -280,7 +280,7 @@ namespace GFGGame
         {
             _skillScore = 0;
             _targetSkillScore = 0;
-            _currentTime = BeginTime.PART_ALL_FIGHT_BEGIN;
+            _currentTime = SkillBeginTime.FIGHT_BEGIN;
             UpdateSkill0();
         }
         private void CheckPartFightBeginSkill()
@@ -288,20 +288,20 @@ namespace GFGGame
             _skillScore = 0;
             _targetSkillScore = 0;
 
-            _currentTime = BeginTime.PART_FIGHT_BEGIN;
+            _currentTime = SkillBeginTime.ERVERY_ROUND_BEGIN;
 
             UpdateSkill1();
 
         }
         private void CheckPartPerfectClickSkill()
         {
-            _currentTime = BeginTime.PART_PERFECT_CLICK;
+            _currentTime = SkillBeginTime.PERFECT_CLICK;
 
             UpdateSkill1();
         }
         private void CheckAllPerfectClickSkill()
         {
-            _currentTime = BeginTime.ALL_PERFECT_START;
+            _currentTime = SkillBeginTime.ALL_PERFECT_START;
 
             UpdateSkill0();
         }
@@ -311,7 +311,7 @@ namespace GFGGame
             _skillScore = 0;
             _targetSkillScore = 0;
 
-            _currentTime = BeginTime.PART_FIGHT_END;
+            _currentTime = SkillBeginTime.ERVERY_ROUND_END;
             UpdateSkill0();
         }
         private void UpdateSkill0()
@@ -391,14 +391,14 @@ namespace GFGGame
         {
             switch (_currentTime)
             {
-                case BeginTime.PART_ALL_FIGHT_BEGIN:
+                case SkillBeginTime.FIGHT_BEGIN:
                     _partId++;
                     UpdateProgress(CheckPartFightBeginSkill);
                     break;
-                case BeginTime.PART_FIGHT_BEGIN:
+                case SkillBeginTime.ERVERY_ROUND_BEGIN:
                     PartScoreStart();
                     break;
-                case BeginTime.PART_PERFECT_CLICK:
+                case SkillBeginTime.PERFECT_CLICK:
                     if (_skillScore < 0)
                     {
                         Timers.inst.Add(0.3f, 1, (object param) =>
@@ -411,10 +411,10 @@ namespace GFGGame
                         PartScoreResultStart(ClickType.PERFECT_CLICK);
                     }
                     break;
-                case BeginTime.PART_FIGHT_END:
+                case SkillBeginTime.ERVERY_ROUND_END:
                     UpdateProgress(OnePartScoreEnd);
                     break;
-                case BeginTime.ALL_PERFECT_START:
+                case SkillBeginTime.ALL_PERFECT_START:
                     UpdateProgress(OnePartScoreEnd);
                     break;
             }
@@ -479,15 +479,15 @@ namespace GFGGame
 
             _ui.m_comClick.target.touchable = false;
 
-            int _partScore = ScoreSystemData.Instance.GetPartScore(roleData, _partId, clickType, _skillScore);
+            int _partScore = ScoreSystemData.Instance.GetRoundScore(roleData, _partId, clickType, _skillScore);
             int _targetPartScore;
             if (targetData.type == FightTargetType.PLAYER)
             {
-                _targetPartScore = ScoreSystemData.Instance.GetPartScore(targetData, _partId, ClickType.PERFECT_CLICK, _targetSkillScore);
+                _targetPartScore = ScoreSystemData.Instance.GetRoundScore(targetData, _partId, ClickType.PERFECT_CLICK, _targetSkillScore);
             }
             else
             {
-                _targetPartScore = ScoreSystemData.Instance.GetRobotPartScore(targetData, _partId, ClickType.PERFECT_CLICK, _targetSkillScore);
+                _targetPartScore = ScoreSystemData.Instance.GetRobotRoundScore(targetData, _partId, ClickType.PERFECT_CLICK, _targetSkillScore);
             }
             // Debug.Log("partId:" + _partId + "    skillScore:" + _partScore);
             // Debug.Log("partId:" + _partId + "   targetSkillScore: " + _targetPartScore);