bug修复
This commit is contained in:
parent
55f72da67f
commit
d9a6ccc527
@ -1478,7 +1478,7 @@ function BattleUnitComp:judgeSkillEffectCondition(skill, index)
|
|||||||
local buffConditionIndex, conditionRel = rel[1], rel[2]
|
local buffConditionIndex, conditionRel = rel[1], rel[2]
|
||||||
local buffConditions = skill:getBuffCondition(buffConditionIndex)
|
local buffConditions = skill:getBuffCondition(buffConditionIndex)
|
||||||
|
|
||||||
return BATTLE_SKILL_CONDITION_HANDLE.judgeSkillEffectCondition(buffConditions, conditionRel, self.battleController)
|
return BATTLE_SKILL_CONDITION_HANDLE.judgeSkillEffectCondition(buffConditions, conditionRel, self.battleController, self.side)
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleUnitComp:takeEffect(buff, target, conditionResult)
|
function BattleUnitComp:takeEffect(buff, target, conditionResult)
|
||||||
|
|||||||
@ -47,7 +47,7 @@ BattleSkillConditionHandle._strOperatorOverloading = function(opStr, value1, val
|
|||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleSkillConditionHandle.judgeSkillEffectCondition(buffConditions, conditionRel, battleController)
|
function BattleSkillConditionHandle.judgeSkillEffectCondition(buffConditions, conditionRel, battleController, side)
|
||||||
if not buffConditions or not conditionRel then
|
if not buffConditions or not conditionRel then
|
||||||
return BattleConst.SKILL_CONDITION_RESULT.NO_CONDITION
|
return BattleConst.SKILL_CONDITION_RESULT.NO_CONDITION
|
||||||
end
|
end
|
||||||
@ -57,11 +57,20 @@ function BattleSkillConditionHandle.judgeSkillEffectCondition(buffConditions, co
|
|||||||
local func = BattleSkillConditionHandle._judgeSkillEffectCondition[condition.type]
|
local func = BattleSkillConditionHandle._judgeSkillEffectCondition[condition.type]
|
||||||
if func then
|
if func then
|
||||||
local target
|
local target
|
||||||
if condition.side == BattleConst.SIDE_ATK then
|
if side == BattleConst.SIDE_ATK then
|
||||||
target = battleController.atkTeam:getMainUnit()
|
if condition.side == 1 then
|
||||||
|
target = battleController.atkTeam:getMainUnit()
|
||||||
|
else
|
||||||
|
target = battleController.defTeam:getMainUnit()
|
||||||
|
end
|
||||||
else
|
else
|
||||||
target = battleController.defTeam:getMainUnit()
|
if condition.side == 1 then
|
||||||
|
target = battleController.defTeam:getMainUnit()
|
||||||
|
else
|
||||||
|
target = battleController.atkTeam:getMainUnit()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if func(condition, conditionRel, target, battleController) then
|
if func(condition, conditionRel, target, battleController) then
|
||||||
passConditionCount = passConditionCount + 1
|
passConditionCount = passConditionCount + 1
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user