判断地图上是否还有黄金和石头
有黄金(cc-players-unit-type-count gaia 66 > 0)
无黄金
(cc-players-unit-type-count gaia 66 == 0)
有石头
(cc-players-unit-type-count gaia 102 > 0)
无石头
(cc-players-unit-type-count gaia 102 == 0) 木或食物呢??一樣的嗎?? 等你木头砍完了我看是可以宣布投降了,呵呵
同理有木头就有粮食
喔..........是呀.........我笨 可以测定一定区域内的咩?总不能跑到敌人家去偷吧,11 木头的找到了
cc-players-unit-type-count gaia 915圣物
cc-players-unit-type-count gaia 942
没有测试过players-unit-type-count是否支持 gaia 楼上你试试吧 找到资源有什么用呢?没有相应的动作,只是简单的BUILD MINING-CAMP,还不是浪费. 主要是用于合理分配采集资源的农民比例
例如当黄金石头挖不到了适当减少农民增加贸易单位给你一个采集资源的农民分配比例的例子
(defrule
(current-age == imperial-age)
(cc-players-unit-type-count gaia 102 > 0)
(cc-players-unit-type-count gaia 66 == 0)
=>
(set-strategic-number sn-gold-gatherer-percentage 0)
(set-strategic-number sn-stone-gatherer-percentage 30)
)(defrule
(current-age == imperial-age)
(cc-players-unit-type-count gaia 102 == 0)
(cc-players-unit-type-count gaia 66 > 0)
=>
(set-strategic-number sn-gold-gatherer-percentage 30)
(set-strategic-number sn-stone-gatherer-percentage 0)
)(defrule
(current-age == imperial-age)
(cc-players-unit-type-count gaia 102 == 0)
(cc-players-unit-type-count gaia 66 == 0)
=>
(set-strategic-number sn-food-gatherer-percentage 45)
(set-strategic-number sn-wood-gatherer-percentage 55)
(set-strategic-number sn-gold-gatherer-percentage 0)
(set-strategic-number sn-stone-gatherer-percentage 0)
) 这个帖对ai制作有很大帮助,你可以用它来调整村民分配,金小于三或者五就不挖金子,还可以用来改出垃圾兵,所以我提升了,有异议请提出。 {:7_260:}
页:
[1]