diff --git a/lua/app/module/battle/battle_const.lua b/lua/app/module/battle/battle_const.lua index 18c2dee9..e3af0842 100644 --- a/lua/app/module/battle/battle_const.lua +++ b/lua/app/module/battle/battle_const.lua @@ -85,6 +85,10 @@ BattleConst.MIN_NODE_HEIGHT = { [3] = 34 } +BattleConst.BUFF_TYPE = { + DIRECT_HURT = 3 +} + BattleConst.SKILL_MOVE_TYPE = { MOVE = 1, -- 移动到目标跟前使用 STAND = 2, -- 原地使用 diff --git a/lua/app/module/battle/component/battle_unit_comp.lua b/lua/app/module/battle/component/battle_unit_comp.lua index 9ee52200..25d3188f 100644 --- a/lua/app/module/battle/component/battle_unit_comp.lua +++ b/lua/app/module/battle/component/battle_unit_comp.lua @@ -1113,7 +1113,9 @@ function BattleUnitComp:onSkillTakeEffect(skill) end end if succ then - self.team:addCombo() + if skill:getIsHurtType() then + self.team:addCombo() + end if skill:getIsNormalType() then -- 普攻攻击成功的话 self:checkPassiveEvent(PASSIVE_EVENT.USE_NORMAL_SKILL, target) elseif skill:getIsActiveType() then diff --git a/lua/app/userdata/battle/skill/battle_buff_entity.lua b/lua/app/userdata/battle/skill/battle_buff_entity.lua index 8537856e..7bdc6a5e 100644 --- a/lua/app/userdata/battle/skill/battle_buff_entity.lua +++ b/lua/app/userdata/battle/skill/battle_buff_entity.lua @@ -1,5 +1,8 @@ +local BattleConst = require "app/module/battle/battle_const" local BattleBuffEntity = class("BattleBuffEntity", BaseData) +local BUFF_TYPE_DIRECT_HURT = BattleConst.BUFF_TYPE.DIRECT_HURT + function BattleBuffEntity:ctor() end @@ -38,6 +41,10 @@ function BattleBuffEntity:getBuffType() return self.buffType end +function BattleBuffEntity:getIsHurtType() + return self.buffType == BUFF_TYPE_DIRECT_HURT +end + function BattleBuffEntity:getEffectNum() return self.effectNum end diff --git a/lua/app/userdata/battle/skill/battle_skill_entity.lua b/lua/app/userdata/battle/skill/battle_skill_entity.lua index de8cc71b..b8645253 100644 --- a/lua/app/userdata/battle/skill/battle_skill_entity.lua +++ b/lua/app/userdata/battle/skill/battle_skill_entity.lua @@ -33,10 +33,14 @@ end function BattleSkillEntity:initSkillEffect() self.effectList = {} + self.isHurtType = false if self.skillInfo.effect then for k, v in ipairs(self.skillInfo.effect) do local buffEntity = BattleBuffEntity:create() buffEntity:init(v, self.owner) + if buffEntity:getIsHurtType() then + self.isHurtType = true + end table.insert(self.effectList, buffEntity) end end @@ -223,4 +227,8 @@ function BattleSkillEntity:getSlowDownBulletTimeParams() return self.skillInfo.bullet_time end +function BattleSkillEntity:getIsHurtType() + return self.isHurtType +end + return BattleSkillEntity \ No newline at end of file