local FuncNode_HpLossWithinTime = class("FuncNode_HpLossWithinTime") --[[ 初始化 --]] function FuncNode_HpLossWithinTime:initialize(entity) self.LimitChildCount = 2 self.Type = LuaConst.ConditionFuncType.HpLossWithinTime end --[[ 执行 --]] function FuncNode_HpLossWithinTime:Run(conditionDataNode, entity, missile) local time = FP.tonumberV1(conditionDataNode.FirstNode:Run(entity, missile)) local compareToValue = conditionDataNode.SecondNode:Run(entity, missile) local value = entity.components.record:GetHpLossWithin(time):Negative() if entity then if compareToValue <= FP.Const.One then value:Div(FP.tonumberV1(entity:GetMaxHp())) end end return value > compareToValue and FP.Const.One or FP.Const.Zero end return FuncNode_HpLossWithinTime