显示fix

This commit is contained in:
Fang 2023-09-12 15:27:27 +08:00
parent 1a4b4e9764
commit 1f93123171
2 changed files with 6 additions and 1 deletions

View File

@ -446,7 +446,8 @@ function GFunc.getAttrShowValue(attrType, attrNum, notPercentSign)
table.containValue(GConst.MATCH_SKILL_HURTP_NAME, attrType) or
table.containValue(GConst.MATCH_CRIT_NAME, attrType) or
table.containValue(GConst.MATCH_CRIT_TIME_NAME, attrType) or
table.containValue(GConst.MATCH_CURED_NAME, attrType)
table.containValue(GConst.MATCH_CURED_NAME, attrType) or
table.containValue(GConst.MATCH_ALL_HURTP_NAME, attrType)
then
local str = notPercentSign and "" or "%"
return attrNum // GConst.BattleConst.PERCENT_FACTOR .. str

View File

@ -188,6 +188,10 @@ function RunesEntity:getAttrValue(attrType, isBase)
result = self:getAttrValue(GConst.MATCH_ATTACK_NAME[self:getHeroEntity():getMatchType()], true)
result = result + self:getHeroEntity():getTotalBaseAtk() * self:getAttrValue(GConst.MATCH_ATTACK_ADD_NAME) // DEFAULT_FACTOR
return result
elseif not isBase and (attrType == GConst.MATCH_NORMAL_HURTP_NAME[self:getHeroEntity():getMatchType()] or attrType == GConst.MATCH_SKILL_HURTP_NAME[self:getHeroEntity():getMatchType()]) then
result = self:getAttrValue(GConst.MATCH_ALL_HURTP_NAME[self:getHeroEntity():getMatchType()])
result = result + self:getAttrValue(GConst.MATCH_ATTACK_ADD_NAME)
return result
else
local all = self:getAllAttr()
if all == nil then