|
|
楼主 |
发表于 2022-7-2 13:38:12
|
显示全部楼层
enemyAI ,里面的有些条件对于玩家一方来说没啥用。因此没有完全实现。 要实现的话需要自己写lua代码放进去。
比如下面这个条件 需要一个函数。
-- NOTE 中了异常的人数
-- return: num
local function gotAnyStatusNum(charIndex,side,battleIndex)
local chars = getAttackerSide(charIndex,side,battleIndex)
local statusChars= _.select(chars,function(charIndex)
return Char.GetData(charIndex,CONST.CHAR_BattleModPoison)>1 or
Char.GetData(charIndex,CONST.CHAR_BattleModSleep)>1 or
Char.GetData(charIndex,CONST.CHAR_BattleModStone)>1 or
Char.GetData(charIndex,CONST.CHAR_BattleModDrunk)>1 or
Char.GetData(charIndex,CONST.CHAR_BattleModConfusion)>1 or
Char.GetData(charIndex,CONST.CHAR_BattleModAmnesia)>1
end)
return #statusChars;
end
-- NOTE 己方中异常人数>=1
['201']={
comment="己方中异常人数>=1",
fn=function(charIndex,side,battleIndex) return gotAnyStatusNum(charIndex,side,battleIndex) >=1 end
} , |
|