大佬能修改加一段代码吗?
参考以下AI写的,多目标的时候优先传染,达到2个目标就传染。
-- 检查并施放地狱烈焰,如果玩家身边有超过2个怪物
local function CheckAndCastHellfire()
-- 计算玩家周围的怪物数量
local monsterCount = BeeGroupCountScript("BeeUnitIsEnemy(unit)", nil, "player")
-- 如果怪物数量超过2个,且地狱烈焰没有在冷却,施放地狱烈焰
if monsterCount > 2 and BeeSpellCoolDown("地狱烈焰") == 0 then
BeeRun("/cast 地狱烈焰")
end
end