diff --git a/lua/app/module/battle/helper/battle_formula.lua b/lua/app/module/battle/helper/battle_formula.lua index d26bdd4a..03f9e73e 100644 --- a/lua/app/module/battle/helper/battle_formula.lua +++ b/lua/app/module/battle/helper/battle_formula.lua @@ -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 diff --git a/lua/app/module/battle/helper/battle_helper.lua b/lua/app/module/battle/helper/battle_helper.lua index deb59cf9..6000eb26 100644 --- a/lua/app/module/battle/helper/battle_helper.lua +++ b/lua/app/module/battle/helper/battle_helper.lua @@ -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