暴击
This commit is contained in:
parent
94e9a6cc18
commit
f01edc8f5a
@ -24,7 +24,7 @@ BattleFormula.calculateFormula = {
|
||||
local crit = unitComp.unitEntity:getCrit()
|
||||
if crit > 0 then
|
||||
if BattleHelper:random(1, DEFAULT_FACTOR) <= crit then -- 暴击了
|
||||
result = result * (DEFAULT_FACTOR + unitComp.unitEntity:getCrittime()) // DEFAULT_FACTOR
|
||||
result = result * (BattleHelper:getDefaultCrittime() + unitComp.unitEntity:getCrittime()) // DEFAULT_FACTOR
|
||||
hurtState = HURT_STATE_CRIT
|
||||
end
|
||||
end
|
||||
|
||||
@ -62,6 +62,13 @@ function BattleHelper:getSupportInterval()
|
||||
return self.supportInterval
|
||||
end
|
||||
|
||||
function BattleHelper:getDefaultCrittime()
|
||||
if self.defaultCrittime == nil then
|
||||
self.defaultCrittime = GFunc.getConstIntValue("crit_dmg")
|
||||
end
|
||||
return self.defaultCrittime
|
||||
end
|
||||
|
||||
function BattleHelper:loadBattleHeroModel(id, parent, callback)
|
||||
local pool = self.characterPools[id]
|
||||
if pool and #pool > 0 then
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user