tankant 发表于 2013-9-12 00:06:24

【大唐复兴】关于特种兵为重骑兵的生产方案

本帖最后由 tankant 于 2013-9-13 19:10 编辑




为了替换所有以下脚本
(defrule
(can-train aort-knight-line)
=>
(train aort-knight-line)
)
变为如下形式:
#original
(defrule
(can-train knight-line)
(no(can-train aort-knight-line))
=>
(train knight-line)
)

#aort
(defrule
(can-train aort-knight-line)
=>
(train aort-knight-line)
)

解决代码如下:
======================================
vim ./AI/Barbarian.per<<EOF
/train knight-line
?(defrule
O#original^[ma/^)mb
'av'by'bo

^[p
lvedaaort^[mc/^)md:'c,'ds/train knight-line/train aort-knight-line/g
'a
:'a,'bs/(can-train knight-line)/((can-train knight-line) and (no(can-train aort-knight-line)))
:x
EOF

目前只能替换第一个rule

其它特种兵可以以此类推。



levin 发表于 2013-9-12 22:38:11

加油加油
页: [1]
查看完整版本: 【大唐复兴】关于特种兵为重骑兵的生产方案