diff --git a/lua/app/module/battle/battle_const.lua b/lua/app/module/battle/battle_const.lua index 87cb3ee5..41dcf7c1 100644 --- a/lua/app/module/battle/battle_const.lua +++ b/lua/app/module/battle/battle_const.lua @@ -12,6 +12,7 @@ BattleConst.ELEMENT_WIGHT = 100 BattleConst.MAX_ELEMENT_WIGHT = 500 BattleConst.SIDE_ATK = 1 BattleConst.SIDE_DEF = 2 +BattleConst.SIDE_ATK_ALL = 8 BattleConst.SKILL_TYPE_ACTIVE = 1 BattleConst.SKILL_TYPE_NORMAL = 2 BattleConst.SKILL_TYPE_ASSISTING = 3 diff --git a/lua/app/module/battle/skill/battle_rogue_skill_handle.lua b/lua/app/module/battle/skill/battle_rogue_skill_handle.lua index bbd100c3..c40d7b23 100644 --- a/lua/app/module/battle/skill/battle_rogue_skill_handle.lua +++ b/lua/app/module/battle/skill/battle_rogue_skill_handle.lua @@ -199,6 +199,21 @@ local _addSkillEffect = function(skillInfo, battleData, battleController) local target = atkComp if skillInfo.obj == BattleConst.SIDE_DEF then target = defComp + elseif skillInfo.obj == BattleConst.SIDE_ATK then + target = atkComp + elseif skillInfo.obj == BattleConst.SIDE_ATK_ALL then + for matchtype, comp in pairs(battleController.atkTeam:getUnitComp()) do + local buffEntity = BattleBuffEntity:create() + buffEntity:init(effect, comp.unitEntity) + buffEntity:setTargetSide(skillInfo.obj) + comp:takeEffect(buffEntity, comp) + end + return + else + local matchType = BattleConst.SIDE_OBJ_TO_MATCH_TYPE[effect:getTartgetSide()] + if matchType then + target = battleController.atkTeam:getUnitComp()[matchType] + end end local buffEntity = BattleBuffEntity:create() buffEntity:init(effect, atkComp.unitEntity)