|
@@ -183,7 +183,7 @@ namespace GFGGame
|
|
|
robotData.cardId = fightCfg.targetCardId;
|
|
|
robotData.cardScore = fightCfg.targetCardScore;
|
|
|
robotData.skillLvs = new List<int>(fightCfg.targetSkillLvsArr);
|
|
|
- robotData.targetPareScorList = new List<int>(fightCfg.targetPartsScoreArr);
|
|
|
+ robotData.itemScoreList = new List<int>(fightCfg.targetPartsScoreArr);
|
|
|
return robotData;
|
|
|
}
|
|
|
|
|
@@ -225,5 +225,78 @@ namespace GFGGame
|
|
|
}
|
|
|
return clickType;
|
|
|
}
|
|
|
+
|
|
|
+ public void GetQuickFightResult(FightRoleData myRoleData, int targetType, FightRoleData targetRoleData, FightRobotData targetRobotData, out int _score, out int _targetScore)
|
|
|
+ {
|
|
|
+ double score = 0;
|
|
|
+ double targetScore = 0;
|
|
|
+
|
|
|
+ int cardId = myRoleData.cardId;
|
|
|
+ double mainScore = ScoreSystemData.Instance.GetMainScore(myRoleData);
|
|
|
+ List<int> skillLvs = myRoleData.skillLvs;
|
|
|
+
|
|
|
+ int targetCardId;
|
|
|
+ double targetMainScore;
|
|
|
+ List<int> targetSkillLvs;
|
|
|
+ List<int> targetRoundTime;
|
|
|
+ List<int> roundTime = ScoreSystemData.Instance.GetRoundTime(myRoleData.cardId, myRoleData.skillLvs);
|
|
|
+
|
|
|
+ if (targetType == ArenaFightTargetType.PLAYER)
|
|
|
+ {
|
|
|
+ targetCardId = targetRoleData.cardId;
|
|
|
+ targetSkillLvs = targetRoleData.skillLvs;
|
|
|
+ targetMainScore = ScoreSystemData.Instance.GetMainScore(targetRoleData);
|
|
|
+ targetRoundTime = ScoreSystemData.Instance.GetRoundTime(targetRoleData.cardId, targetRoleData.skillLvs);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ targetCardId = targetRobotData.cardId;
|
|
|
+ targetSkillLvs = targetRobotData.skillLvs;
|
|
|
+ targetMainScore = ScoreSystemData.Instance.GetRobotMainScore(targetRobotData);
|
|
|
+ targetRoundTime = ScoreSystemData.Instance.GetRoundTime(targetRobotData.cardId, targetRobotData.skillLvs);
|
|
|
+ }
|
|
|
+
|
|
|
+ int partId = 0;
|
|
|
+ int currentTime = BeginTime.PART_ALL_FIGHT_BEGIN;
|
|
|
+ GetSkillScore(currentTime, partId, mainScore, cardId, skillLvs, roundTime, ref score, targetMainScore, targetCardId, targetSkillLvs, targetRoundTime, ref targetScore);
|
|
|
+ GetSkillScore(currentTime, partId, 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(currentTime, partId, mainScore, cardId, skillLvs, roundTime, ref score, targetMainScore, targetCardId, targetSkillLvs, targetRoundTime, ref targetScore);
|
|
|
+ GetSkillScore(currentTime, partId, targetMainScore, targetCardId, targetSkillLvs, targetRoundTime, ref targetScore, mainScore, cardId, skillLvs, roundTime, ref score);
|
|
|
+ score += ScoreSystemData.Instance.GetPartScore(myRoleData, partId, ClickType.PREFACT_CLICK, 0);
|
|
|
+ if (targetType == ArenaFightTargetType.PLAYER)
|
|
|
+ {
|
|
|
+ targetScore += ScoreSystemData.Instance.GetPartScore(targetRoleData, partId, ClickType.PREFACT_CLICK, 0);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ targetScore += ScoreSystemData.Instance.GetRobotPartScore(targetRobotData, partId, ClickType.PREFACT_CLICK, 0);
|
|
|
+ }
|
|
|
+ currentTime = BeginTime.PART_PREFACT_CLICK;
|
|
|
+ GetSkillScore(currentTime, partId, mainScore, cardId, skillLvs, roundTime, ref score, targetMainScore, targetCardId, targetSkillLvs, targetRoundTime, ref targetScore);
|
|
|
+ GetSkillScore(currentTime, partId, targetMainScore, targetCardId, targetSkillLvs, targetRoundTime, ref targetScore, mainScore, cardId, skillLvs, roundTime, ref score);
|
|
|
+ currentTime = BeginTime.PART_FIGHT_END;
|
|
|
+ GetSkillScore(currentTime, partId, mainScore, cardId, skillLvs, roundTime, ref score, targetMainScore, targetCardId, targetSkillLvs, targetRoundTime, ref targetScore);
|
|
|
+ GetSkillScore(currentTime, partId, targetMainScore, targetCardId, targetSkillLvs, targetRoundTime, ref targetScore, mainScore, cardId, skillLvs, roundTime, ref score);
|
|
|
+ }
|
|
|
+ score += ScoreSystemData.Instance.GetAllCircleAddScore(mainScore);
|
|
|
+ targetScore += ScoreSystemData.Instance.GetAllCircleAddScore(targetMainScore);
|
|
|
+ _score = Mathf.CeilToInt((float)score);
|
|
|
+ _targetScore = Mathf.CeilToInt((float)targetScore);
|
|
|
+ }
|
|
|
+
|
|
|
+ private void GetSkillScore(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);
|
|
|
+ score += skillScore;
|
|
|
+ targetMainScore += targetSkillScore;
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
}
|