|
@@ -27,13 +27,25 @@ namespace GFGGame
|
|
|
|
|
|
public int GetScore(FightData roleData)
|
|
public int GetScore(FightData roleData)
|
|
{
|
|
{
|
|
- int score = 0;
|
|
|
|
|
|
+ float score = 0;
|
|
|
|
|
|
for (int i = 0; i < roleData.itemList.Count; i++)
|
|
for (int i = 0; i < roleData.itemList.Count; i++)
|
|
{
|
|
{
|
|
score += ItemDataManager.GetItemAdditionScore(roleData.itemList[i], roleData.scoreType, roleData.tags);
|
|
score += ItemDataManager.GetItemAdditionScore(roleData.itemList[i], roleData.scoreType, roleData.tags);
|
|
}
|
|
}
|
|
- return score;
|
|
|
|
|
|
+ if (InstanceZonesDataManager.FightScene == ConstInstanceZonesType.Arena)
|
|
|
|
+ {
|
|
|
|
+ int tagCount = ArenaDataManager.Instance.GetTagsCount(roleData.itemList, roleData.tags); ;
|
|
|
|
+ tagCount = Math.Min(ArenaTagCfgArray.Instance.dataArray.Length, tagCount);
|
|
|
|
+ float addition = 0;
|
|
|
|
+ if (tagCount > 0)
|
|
|
|
+ {
|
|
|
|
+ int additionCfg = ArenaTagCfgArray.Instance.GetCfg(tagCount).addition;
|
|
|
|
+ addition = additionCfg / 10000f;
|
|
|
|
+ }
|
|
|
|
+ score = score * (1 + addition);
|
|
|
|
+ }
|
|
|
|
+ return (int)Math.Ceiling(score);
|
|
}
|
|
}
|
|
|
|
|
|
//最终得分
|
|
//最终得分
|
|
@@ -164,10 +176,12 @@ namespace GFGGame
|
|
public void SetItemScoreList(FightData _roleData)
|
|
public void SetItemScoreList(FightData _roleData)
|
|
{
|
|
{
|
|
_roleData.itemScoreList.Clear();
|
|
_roleData.itemScoreList.Clear();
|
|
|
|
+ _roleData.itemScoreDic.Clear();
|
|
for (int i = 0; i < _roleData.itemList.Count; i++)
|
|
for (int i = 0; i < _roleData.itemList.Count; i++)
|
|
{
|
|
{
|
|
int score = ItemDataManager.GetItemAdditionScore(_roleData.itemList[i], _roleData.scoreType);
|
|
int score = ItemDataManager.GetItemAdditionScore(_roleData.itemList[i], _roleData.scoreType);
|
|
_roleData.itemScoreList.Add(score);
|
|
_roleData.itemScoreList.Add(score);
|
|
|
|
+ _roleData.itemScoreDic[_roleData.itemList[i]] = score;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -253,14 +267,15 @@ namespace GFGGame
|
|
{
|
|
{
|
|
// double itemSum = itemScoreSum;
|
|
// double itemSum = itemScoreSum;
|
|
long skillScore = 0;
|
|
long skillScore = 0;
|
|
- long skillBaseScore = (long)itemScoreSum + cardScore + baseScore;
|
|
|
|
|
|
+ float skillBaseScore = (long)itemScoreSum + cardScore + baseScore;
|
|
List<PassivitySkillCfg> skillCfgs = PassivitySkillCfgArray.Instance.GetCfgsBycardId(cardId);
|
|
List<PassivitySkillCfg> skillCfgs = PassivitySkillCfgArray.Instance.GetCfgsBycardId(cardId);
|
|
for (int j = 0; j < skillCfgs.Count; j++)
|
|
for (int j = 0; j < skillCfgs.Count; j++)
|
|
{
|
|
{
|
|
if (skillLvs.Count == 0) continue;
|
|
if (skillLvs.Count == 0) continue;
|
|
PassivitySkillLvlCfg skillLvlCfg = PassivitySkillLvlCfgArray.Instance.GetCfgByskilllvlAndskillId(skillLvs[j], skillCfgs[j].skillId);
|
|
PassivitySkillLvlCfg skillLvlCfg = PassivitySkillLvlCfgArray.Instance.GetCfgByskilllvlAndskillId(skillLvs[j], skillCfgs[j].skillId);
|
|
if (skillLvlCfg == null) continue;
|
|
if (skillLvlCfg == null) continue;
|
|
- skillScore += skillBaseScore * skillLvlCfg.fightPowerParam / 10000;
|
|
|
|
|
|
+ float _skillScore = skillBaseScore * ((float)skillLvlCfg.fightPowerParam / 10000f);
|
|
|
|
+ skillScore += (long)Math.Ceiling(_skillScore);
|
|
}
|
|
}
|
|
return skillScore;
|
|
return skillScore;
|
|
}
|
|
}
|