This commit is contained in:
puxuan 2025-10-17 20:45:53 +08:00
parent ebb3797170
commit 9a5041a2af

View File

@ -505,7 +505,14 @@ local _addEnergyRandomOne = function(skillId, skillInfo, battleBaseData, battleC
return return
end 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 = { local map = {
[elementType] = num [elementType] = num
} }