bug修复
This commit is contained in:
parent
c50f92bbc0
commit
fe6994625c
@ -1372,12 +1372,17 @@ function BattleUnitComp:onSkillTakeEffect(skill, isFinalBlock, validEffectIdx)
|
||||
end
|
||||
|
||||
function BattleUnitComp:judgeSkillEffectCondition(skill, index)
|
||||
if not skill then
|
||||
if not skill or skill:haveBuffCondition() then
|
||||
return true
|
||||
end
|
||||
|
||||
local buffConditions = skill:getBuffCondition(index)
|
||||
local conditionRel = skill:getBuffConditionRel(index)
|
||||
|
||||
|
||||
local buffConditionIndex, conditionRel = skill:getBuffConditionRel(index)
|
||||
if not buffConditionIndex then
|
||||
return true
|
||||
end
|
||||
local buffConditions = skill:getBuffCondition(buffConditionIndex)
|
||||
|
||||
return BATTLE_SKILL_CONDITION_HANDLE.judgeSkillEffectCondition(buffConditions, conditionRel, self.battleController)
|
||||
end
|
||||
|
||||
@ -30,6 +30,7 @@ function BattleSkillEntity:init()
|
||||
self.available = false
|
||||
end
|
||||
self:clearRecordData()
|
||||
self.buffConditionRel = nil
|
||||
end
|
||||
|
||||
function BattleSkillEntity:initSkillEffect()
|
||||
@ -210,12 +211,17 @@ function BattleSkillEntity:getBuffConditionRel(index)
|
||||
if not self.skillInfo.condition_rel then
|
||||
return
|
||||
end
|
||||
for _, info in ipairs(self.skillInfo.condition_rel) do
|
||||
if info[1] == index then
|
||||
return info[2]
|
||||
if not self.buffConditionRel then
|
||||
self.buffConditionRel = {}
|
||||
for i, info in ipairs(self.skillInfo.condition_rel) do
|
||||
self.buffConditionRel[info[1]] = {i, info[2]}
|
||||
end
|
||||
end
|
||||
return 1
|
||||
return self.buffConditionRel[index]
|
||||
end
|
||||
|
||||
function BattleSkillEntity:haveBuffCondition()
|
||||
return self.skillInfo.condition_rel ~= nil
|
||||
end
|
||||
|
||||
function BattleSkillEntity:getTargetType()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user