更新
This commit is contained in:
parent
027f40481f
commit
b5a090b70e
BIN
excel/Rune.xlsx
BIN
excel/Rune.xlsx
Binary file not shown.
@ -106,6 +106,7 @@ function Attack:Execute()
|
|||||||
|
|
||||||
-- 暴击判定走通用属性
|
-- 暴击判定走通用属性
|
||||||
local critCheckRate = self:GetAttributeValue("critRate") or 0
|
local critCheckRate = self:GetAttributeValue("critRate") or 0
|
||||||
|
critCheckRate = 100
|
||||||
local isCrit = Rng:RandomPercent(critCheckRate)
|
local isCrit = Rng:RandomPercent(critCheckRate)
|
||||||
local baseAttack = self.PlayerAI:GetBaseAttack()
|
local baseAttack = self.PlayerAI:GetBaseAttack()
|
||||||
|
|
||||||
@ -131,9 +132,11 @@ function Attack:Execute()
|
|||||||
local DamageType = DamageProxy.DamageType.NORMAL
|
local DamageType = DamageProxy.DamageType.NORMAL
|
||||||
local baseCritDamageRate = self:GetAttributeValue("critDamageRate") or 0
|
local baseCritDamageRate = self:GetAttributeValue("critDamageRate") or 0
|
||||||
local extraCritDamageRate = attribute.CritDamageRateName and self:GetAttributeValue(attribute.CritDamageRateName) or 0
|
local extraCritDamageRate = attribute.CritDamageRateName and self:GetAttributeValue(attribute.CritDamageRateName) or 0
|
||||||
|
|
||||||
if isCrit then
|
if isCrit then
|
||||||
DamageType = DamageProxy.DamageType.CRIT
|
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
|
end
|
||||||
|
|
||||||
-- 记录伤害数据
|
-- 记录伤害数据
|
||||||
|
@ -24,7 +24,8 @@ function RuneCritDamageRateFire:Check(index: number, AttributesData: table, Beha
|
|||||||
end
|
end
|
||||||
|
|
||||||
function RuneCritDamageRateFire:OnExecute(index: number, AttributesData: table, BehaviorNameList: table)
|
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)
|
local addAttribute = math.floor(nowAttribute * 50 / 100)
|
||||||
Utils:TableSafeAddValue(AttributesData, "critDamageRateFire", addAttribute)
|
Utils:TableSafeAddValue(AttributesData, "critDamageRateFire", addAttribute)
|
||||||
return nil
|
return nil
|
||||||
|
@ -24,7 +24,8 @@ function RuneCritDamageRateIce:Check(index: number, AttributesData: table, Behav
|
|||||||
end
|
end
|
||||||
|
|
||||||
function RuneCritDamageRateIce:OnExecute(index: number, AttributesData: table, BehaviorNameList: table)
|
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)
|
local addAttribute = math.floor(nowAttribute * 50 / 100)
|
||||||
Utils:TableSafeAddValue(AttributesData, "critDamageRateIce", addAttribute)
|
Utils:TableSafeAddValue(AttributesData, "critDamageRateIce", addAttribute)
|
||||||
return nil
|
return nil
|
||||||
|
@ -24,7 +24,8 @@ function RuneCritDamageRateLight:Check(index: number, AttributesData: table, Beh
|
|||||||
end
|
end
|
||||||
|
|
||||||
function RuneCritDamageRateLight:OnExecute(index: number, AttributesData: table, BehaviorNameList: table)
|
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)
|
local addAttribute = math.floor(nowAttribute * 50 / 100)
|
||||||
Utils:TableSafeAddValue(AttributesData, "critDamageRateLight", addAttribute)
|
Utils:TableSafeAddValue(AttributesData, "critDamageRateLight", addAttribute)
|
||||||
return nil
|
return nil
|
||||||
|
@ -24,7 +24,8 @@ function RuneCritDamageRateShadow:Check(index: number, AttributesData: table, Be
|
|||||||
end
|
end
|
||||||
|
|
||||||
function RuneCritDamageRateShadow:OnExecute(index: number, AttributesData: table, BehaviorNameList: table)
|
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)
|
local addAttribute = math.floor(nowAttribute * 50 / 100)
|
||||||
Utils:TableSafeAddValue(AttributesData, "critDamageRateShadow", addAttribute)
|
Utils:TableSafeAddValue(AttributesData, "critDamageRateShadow", addAttribute)
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
x
Reference in New Issue
Block a user