This commit is contained in:
Ggafrik 2025-08-26 00:29:17 +08:00
parent 027f40481f
commit b5a090b70e
6 changed files with 12 additions and 5 deletions

Binary file not shown.

View File

@ -106,6 +106,7 @@ function Attack:Execute()
-- 暴击判定走通用属性
local critCheckRate = self:GetAttributeValue("critRate") or 0
critCheckRate = 100
local isCrit = Rng:RandomPercent(critCheckRate)
local baseAttack = self.PlayerAI:GetBaseAttack()
@ -131,9 +132,11 @@ function Attack:Execute()
local DamageType = DamageProxy.DamageType.NORMAL
local baseCritDamageRate = self:GetAttributeValue("critDamageRate") or 0
local extraCritDamageRate = attribute.CritDamageRateName and self:GetAttributeValue(attribute.CritDamageRateName) or 0
if isCrit then
DamageType = DamageProxy.DamageType.CRIT
attributeValue = attributeValue * (1 + (200 + baseCritDamageRate + extraCritDamageRate) / 100)
attributeValue = math.floor(attributeValue * (1 + extraCritDamageRate + (100 + baseCritDamageRate) / 100))
print("baseAttack", baseAttack, "baseCritDamageRate", baseCritDamageRate, "extraCritDamageRate", extraCritDamageRate, "attributeValue", attributeValue)
end
-- 记录伤害数据

View File

@ -24,7 +24,8 @@ function RuneCritDamageRateFire:Check(index: number, AttributesData: table, Beha
end
function RuneCritDamageRateFire:OnExecute(index: number, AttributesData: table, BehaviorNameList: table)
local nowAttribute = AttributesData.critDamageRateFire or 200
local nowAttribute = AttributesData.critDamageRateFire or 100
if nowAttribute == 0 then nowAttribute = 100 end
local addAttribute = math.floor(nowAttribute * 50 / 100)
Utils:TableSafeAddValue(AttributesData, "critDamageRateFire", addAttribute)
return nil

View File

@ -24,7 +24,8 @@ function RuneCritDamageRateIce:Check(index: number, AttributesData: table, Behav
end
function RuneCritDamageRateIce:OnExecute(index: number, AttributesData: table, BehaviorNameList: table)
local nowAttribute = AttributesData.critDamageRateIce or 200
local nowAttribute = AttributesData.critDamageRateIce or 100
if nowAttribute == 0 then nowAttribute = 100 end
local addAttribute = math.floor(nowAttribute * 50 / 100)
Utils:TableSafeAddValue(AttributesData, "critDamageRateIce", addAttribute)
return nil

View File

@ -24,7 +24,8 @@ function RuneCritDamageRateLight:Check(index: number, AttributesData: table, Beh
end
function RuneCritDamageRateLight:OnExecute(index: number, AttributesData: table, BehaviorNameList: table)
local nowAttribute = AttributesData.critDamageRateLight or 200
local nowAttribute = AttributesData.critDamageRateLight or 100
if nowAttribute == 0 then nowAttribute = 100 end
local addAttribute = math.floor(nowAttribute * 50 / 100)
Utils:TableSafeAddValue(AttributesData, "critDamageRateLight", addAttribute)
return nil

View File

@ -24,7 +24,8 @@ function RuneCritDamageRateShadow:Check(index: number, AttributesData: table, Be
end
function RuneCritDamageRateShadow:OnExecute(index: number, AttributesData: table, BehaviorNameList: table)
local nowAttribute = AttributesData.critDamageRateShadow or 200
local nowAttribute = AttributesData.critDamageRateShadow or 100
if nowAttribute == 0 then nowAttribute = 100 end
local addAttribute = math.floor(nowAttribute * 50 / 100)
Utils:TableSafeAddValue(AttributesData, "critDamageRateShadow", addAttribute)
return nil