属性加成修改
This commit is contained in:
parent
3f17beb2f2
commit
ae7e52d6ea
@ -211,9 +211,10 @@ function HeroEntity:updateRunesAttr()
|
||||
local skillHurt = self:getRunes():getAttrValue(GConst.MATCH_SKILL_HURT_NAME[self:getMatchType()])
|
||||
local critPer = self:getRunes():getAttrValue(GConst.MATCH_CRIT_NAME[self:getMatchType()])
|
||||
local critHurtPer = self:getRunes():getAttrValue(GConst.MATCH_CRIT_TIME_NAME[self:getMatchType()])
|
||||
local normalHurtPer = self:getRunes():getAttrValue(GConst.MATCH_NORMAL_HURTP_NAME[self:getMatchType()])
|
||||
local skillHurtPer = self:getRunes():getAttrValue(GConst.MATCH_SKILL_HURTP_NAME[self:getMatchType()])
|
||||
local normalHurtPer = self:getRunes():getAttrValue(GConst.MATCH_NORMAL_HURTP_NAME[self:getMatchType()], true)
|
||||
local skillHurtPer = self:getRunes():getAttrValue(GConst.MATCH_SKILL_HURTP_NAME[self:getMatchType()], true)
|
||||
local healPer = self:getRunes():getAttrValue(GConst.MATCH_CURED_NAME[self:getMatchType()])
|
||||
local allHurtp = self:getRunes():getAttrValue(GConst.MATCH_ALL_HURTP_NAME[self:getMatchType()])
|
||||
|
||||
self.runesAttr[GConst.MATCH_HP_NAME[self:getMatchType()]] = hp
|
||||
self.runesAttr[GConst.MATCH_ATTACK_NAME[self:getMatchType()]] = atk
|
||||
@ -224,6 +225,7 @@ function HeroEntity:updateRunesAttr()
|
||||
self.runesAttr[GConst.MATCH_NORMAL_HURTP_NAME[self:getMatchType()]] = normalHurtPer
|
||||
self.runesAttr[GConst.MATCH_SKILL_HURTP_NAME[self:getMatchType()]] = skillHurtPer
|
||||
self.runesAttr[GConst.MATCH_CURED_NAME[self:getMatchType()]] = healPer
|
||||
self.runesAttr[GConst.MATCH_ALL_HURTP_NAME[self:getMatchType()]] = allHurtp
|
||||
|
||||
if EDITOR_MODE then
|
||||
local printStr = ""
|
||||
@ -237,6 +239,7 @@ function HeroEntity:updateRunesAttr()
|
||||
printStr = printStr .. "普攻增伤百分比:".. normalHurtPer .. "\n"
|
||||
printStr = printStr .. "技能增伤百分比:".. skillHurtPer .. "\n"
|
||||
printStr = printStr .. "治疗加成百分比:".. healPer .. "\n"
|
||||
printStr = printStr .. "所有伤害百分比:".. allHurtp .. "\n"
|
||||
Logger.logHighlight(printStr)
|
||||
end
|
||||
end
|
||||
@ -551,7 +554,7 @@ function HeroEntity:getTotalBaseHp()
|
||||
end
|
||||
end
|
||||
result = result + DataManager.SkinData:getBaseHp(self)
|
||||
result = result + self:getRunes():getAttrValue(GConst.MATCH_HP_FIX_NAME, true)
|
||||
result = result + self:getRunes():getAttrValue(GConst.MATCH_HP_FIX_NAME[self:getMatchType()], true)
|
||||
return result
|
||||
end
|
||||
|
||||
@ -569,8 +572,8 @@ function HeroEntity:getTotalBaseAtk()
|
||||
end
|
||||
-- logStr = logStr .. "\nSKIN:" .. DataManager.SkinData:getBaseAttack(self)
|
||||
result = result + DataManager.SkinData:getBaseAttack(self)
|
||||
-- logStr = logStr .. "\nRUNES:" .. self:getRunes():getAttrValue(GConst.MATCH_ATTACK_NAME, true)
|
||||
result = result + self:getRunes():getAttrValue(GConst.MATCH_ATTACK_NAME, true)
|
||||
-- logStr = logStr .. "\nRUNES:" .. self:getRunes():getAttrValue(GConst.MATCH_ATTACK_NAME[self:getMatchType()], true)
|
||||
result = result + self:getRunes():getAttrValue(GConst.MATCH_ATTACK_NAME[self:getMatchType()], true)
|
||||
-- Logger.logHighlight(logStr)
|
||||
return result
|
||||
end
|
||||
|
||||
@ -199,6 +199,11 @@ end
|
||||
|
||||
-- 获取属性 , isBase是否是基础配置的属性
|
||||
function RunesEntity:getAttrValue(attrType, isBase)
|
||||
if type(attrType) ~= "string" then
|
||||
Logger.logError("获取符文属性传入格式错误")
|
||||
return 0
|
||||
end
|
||||
|
||||
local result
|
||||
if not isBase and attrType == GConst.MATCH_HP_FIX_NAME[self:getHeroEntity():getMatchType()] then
|
||||
result = self:getAttrValue(GConst.MATCH_HP_FIX_NAME[self:getHeroEntity():getMatchType()], true)
|
||||
@ -210,7 +215,7 @@ function RunesEntity:getAttrValue(attrType, isBase)
|
||||
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(attrType, true)
|
||||
result = result + self:getAttrValue(GConst.MATCH_ALL_HURTP_NAME, true)
|
||||
result = result + self:getAttrValue(GConst.MATCH_ALL_HURTP_NAME[self:getHeroEntity():getMatchType()], true)
|
||||
return result
|
||||
else
|
||||
local all = self:getAllAttr()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user