技能生效条件
This commit is contained in:
parent
82d95ee5fd
commit
ccea5fedfa
@ -4,6 +4,7 @@ local BattleSkillConditionHandle = {}
|
||||
|
||||
local SKILL_CONDITION_REL_TYPE = BattleConst.SKILL_CONDITION_REL_TYPE
|
||||
local SKILL_CONDITION_TYPE = BattleConst.SKILL_CONDITION_TYPE
|
||||
local DEFAULT_FACTOR = BattleConst.DEFAULT_FACTOR
|
||||
|
||||
local function _judgeTargetState(buffCondition, conditionRel, target, battleController)
|
||||
local num = target:getBuffCountByName(buffCondition.attr)
|
||||
@ -14,7 +15,12 @@ local function _judgeTargetState(buffCondition, conditionRel, target, battleCont
|
||||
end
|
||||
|
||||
local function _judgeTargetAttr(buffCondition, conditionRel, target, battleController)
|
||||
local attrNum = target.unitEntity:getAttrValue(buffCondition.attr)
|
||||
local attrNum = 0
|
||||
if buffCondition.attr == "hpp" then
|
||||
attrNum = target.unitEntity:getHpPercent() * DEFAULT_FACTOR
|
||||
else
|
||||
attrNum = target.unitEntity:getAttrValue(buffCondition.attr)
|
||||
end
|
||||
return BattleSkillConditionHandle._strOperatorOverloading(buffCondition.op, attrNum, buffCondition.v)
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user