AI语法中or不能一次放超过2个条件吗?
(defrule(goal GOAL-ANTI-ARCHER 0)
(or (players-unit-type-count any-enemy longbowman-line > 12) ;长弓兵
(or (players-unit-type-count any-enemy chu-ko-nu-line > 12);诸葛弩
(players-unit-type-count any-enemyplumed-archer-line > 11);羽箭手 )
)
=>
(chat-to-allies "发现敌人远程部队!")
(set-goal GOAL-ANTI-ARCHER 1)
)
看见boom有这样的写法,不明白,这些部队都可以放在一起吧?
(or (players-unit-type-count any-enemy longbowman-line > 12) ;长弓兵
(players-unit-type-count any-enemy chu-ko-nu-line > 12);诸葛弩
(players-unit-type-count any-enemyplumed-archer-line > 11);羽箭手
) 自己测试一下不就搞掂咯?
页:
[1]