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 052c0c88..ebefc057 100644 --- a/lua/app/module/battle/skill/battle_rogue_skill_handle.lua +++ b/lua/app/module/battle/skill/battle_rogue_skill_handle.lua @@ -505,7 +505,14 @@ local _addEnergyRandomOne = function(skillId, skillInfo, battleBaseData, battleC return end - local elementType = math.random(1, BattleConst.ELEMENT_TYPE.PURPLE) + local types = {} + for i = 1, BattleConst.ELEMENT_TYPE.PURPLE do + if battleController:getSkillEntityByElement(i) then + table.insert(types, i) + end + end + + local elementType = types[math.random(1, #types)] local map = { [elementType] = num }