-
Notifications
You must be signed in to change notification settings - Fork 0
/
rawai-civ-britons.per
378 lines (337 loc) · 9.68 KB
/
rawai-civ-britons.per
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
;civ specific structure preferences
(defrule
(goal current-phase 1)
=>
(up-modify-goal desired-number-towncenters c:= 1)
(up-modify-goal desired-number-barracks c:= 1)
(up-modify-goal desired-number-ranges c:= 0)
(up-modify-goal desired-number-stables c:= 0)
(up-modify-goal desired-number-workshops c:= 0)
(up-modify-goal desired-number-blacksmiths c:= 0)
(up-modify-goal desired-number-markets c:= 0)
(up-modify-goal desired-number-docks c:= 1)
(up-modify-goal desired-number-universities c:= 0)
(up-modify-goal desired-number-monasteries c:= 0)
(disable-self)
)
(defrule
(goal current-phase 1)
=>
(up-modify-goal desired-number-castles c:= 0)
(up-modify-goal desired-number-outposts c:= 0)
(up-modify-goal desired-number-watchtowers c:= 0)
(up-modify-goal desired-number-seatowers c:= 0)
(up-modify-goal desired-number-shipyards c:= 0)
(disable-self)
)
(defrule
(goal current-phase 2)
=>
(up-modify-goal desired-number-towncenters c:= 1)
(up-modify-goal desired-number-barracks c:= 1)
(up-modify-goal desired-number-ranges c:= 1)
(up-modify-goal desired-number-stables c:= 1)
(up-modify-goal desired-number-workshops c:= 0)
(up-modify-goal desired-number-blacksmiths c:= 1)
(up-modify-goal desired-number-markets c:= 1)
(up-modify-goal desired-number-docks c:= 1)
(up-modify-goal desired-number-universities c:= 1)
(up-modify-goal desired-number-monasteries c:= 0)
(disable-self)
)
(defrule
(goal current-phase 2)
=>
(up-modify-goal desired-number-castles c:= 0)
(up-modify-goal desired-number-outposts c:= 0)
(up-modify-goal desired-number-watchtowers c:= 0)
(up-modify-goal desired-number-seatowers c:= 0)
(up-modify-goal desired-number-shipyards c:= 0)
(disable-self)
)
(defrule
(goal current-phase 3)
=>
(up-modify-goal desired-number-towncenters c:= 1)
(up-modify-goal desired-number-barracks c:= 1)
(up-modify-goal desired-number-ranges c:= 1)
(up-modify-goal desired-number-stables c:= 1)
(up-modify-goal desired-number-workshops c:= 0)
(up-modify-goal desired-number-blacksmiths c:= 1)
(up-modify-goal desired-number-markets c:= 1)
(up-modify-goal desired-number-docks c:= 2)
(up-modify-goal desired-number-universities c:= 1)
(up-modify-goal desired-number-monasteries c:= 0)
(disable-self)
)
(defrule
(goal current-phase 3)
=>
(up-modify-goal desired-number-castles c:= 0)
(up-modify-goal desired-number-outposts c:= 2)
(up-modify-goal desired-number-watchtowers c:= 4)
(up-modify-goal desired-number-seatowers c:= 4)
(up-modify-goal desired-number-shipyards c:= 2)
(disable-self)
)
(defrule
(goal current-phase 4)
=>
(up-modify-goal desired-number-towncenters c:= 4)
(up-modify-goal desired-number-barracks c:= 3)
(up-modify-goal desired-number-ranges c:= 2)
(up-modify-goal desired-number-stables c:= 2)
(up-modify-goal desired-number-workshops c:= 1)
(up-modify-goal desired-number-blacksmiths c:= 1)
(up-modify-goal desired-number-markets c:= 1)
(up-modify-goal desired-number-docks c:= 2)
(up-modify-goal desired-number-universities c:= 1)
(up-modify-goal desired-number-monasteries c:= 1)
(disable-self)
)
(defrule
(goal current-phase 4)
=>
(up-modify-goal desired-number-castles c:= 1)
(up-modify-goal desired-number-outposts c:= 4)
(up-modify-goal desired-number-watchtowers c:= 10)
(up-modify-goal desired-number-seatowers c:= 5)
(up-modify-goal desired-number-shipyards c:= 2)
(disable-self)
)
(defrule
(goal current-phase 5)
=>
(up-modify-goal desired-number-towncenters c:= 8)
(up-modify-goal desired-number-barracks c:= 5)
(up-modify-goal desired-number-ranges c:= 4)
(up-modify-goal desired-number-stables c:= 4)
(up-modify-goal desired-number-workshops c:= 2)
(up-modify-goal desired-number-blacksmiths c:= 1)
(up-modify-goal desired-number-markets c:= 2)
(up-modify-goal desired-number-docks c:= 2)
(up-modify-goal desired-number-universities c:= 1)
(up-modify-goal desired-number-monasteries c:= 4)
(disable-self)
)
(defrule
(goal current-phase 5)
=>
(up-modify-goal desired-number-castles c:= 4)
(up-modify-goal desired-number-outposts c:= 6)
(up-modify-goal desired-number-watchtowers c:= 10)
(up-modify-goal desired-number-seatowers c:= 5)
(up-modify-goal desired-number-shipyards c:= 8)
(disable-self)
)
;Always Train Militia/Swordsmen
(defrule
(goal current-phase 5)
(unit-type-count-total militiaman-line g:< desired-number-antiinfantry)
(can-train militiaman-line)
=>
(train militiaman-line)
)
;Always have some Spearmen
(defrule
(goal current-phase 5)
(unit-type-count-total spearman-line g:< gl-one-percent)
(can-train spearman-line)
=>
(train spearman-line)
)
;Otherwise, train them to counter Cavalry and Cavalry Archers
(defrule
(goal current-phase 5)
(or
(goal train-anti-cavalry 1)
(goal train-anti-cavalryarcher 1)
)
(unit-type-count-total spearman-line g:< desired-number-anticavalrytrash)
(can-train spearman-line)
=>
(train spearman-line)
)
;Use Cavalry Archers against Cavalry
(defrule
(goal current-phase 5)
(goal train-anti-cavalry 1)
(unit-type-count-total cavalry-archer-line g:< desired-number-anticavalry)
(can-train cavalry-archer-line)
=>
(train cavalry-archer-line)
)
;Use Composite Bowmen against Infantry
(defrule
(goal current-phase 5)
(goal train-anti-infantry 1)
(unit-type-count-total bowman-line g:< desired-number-antiinfantry)
(can-train bowman-line)
=>
(train bowman-line)
)
;Use Skirmishers against Archers & Cavalry Archers
(defrule
(goal current-phase 5)
(or
(goal train-anti-archer 1)
(goal train-anti-cavalryarcher 1)
)
(unit-type-count-total skirmisher-line g:< desired-number-antiarchertrash)
(can-train skirmisher-line)
=>
(train skirmisher-line)
)
;Use Mangonels against Archers(but not Cavalry Archers) in addition to Skirmishers
(defrule
(goal current-phase 5)
(goal train-anti-archer 1)
(unit-type-count-total mangonel-line g:< desired-number-antiarcher)
(can-train mangonel-line)
=>
(train mangonel-line)
)
;Scorpions are used to counter infantry, archers, cav archers
(defrule
(goal current-phase 5)
(or
(goal train-anti-infantry 1)
(or
(goal train-anti-archer 1)
(goal train-anti-cavalryarcher 1)
)
)
(unit-type-count-total scorpion-line g:< desired-number-antiarcher)
(can-train scorpion-line)
=>
(train scorpion-line)
)
;Britons wield Cavalry against Infantry, Archers, and Siege
(defrule
(goal current-phase 5)
(or
(goal train-anti-infantry 1)
(or
(goal train-anti-archer 1)
(goal train-anti-siege 1)
)
)
(unit-type-count-total cavalry-line g:< desired-number-antisiege)
(can-train cavalry-line)
=>
(train cavalry-line)
)
;Scout/Light Cavalry are also used as anti-priest & anti-siege trash
(defrule
(goal current-phase 5)
(or
(goal train-anti-priest 1)
(goal train-anti-siege 1)
)
(unit-type-count-total scout-cavalry-line g:< gl-one-percent)
(can-train scout-cavalry-line)
=>
(train scout-cavalry-line)
)
;Navy, generic train rules that affect <x>reme etc training are in military-units-common.per
;Train Juggernauts
(defrule
(goal current-phase 5)
(wood-amount > 250)
(unit-type-count-total juggernaut-line g:< desired-number-juggernauts)
(can-train juggernaut-line)
=>
(train juggernaut-line)
)
(defrule
(goal current-phase 5)
(unit-type-count-total essedarius-line g:< desired-number-uniqueunittwo)
(can-train essedarius-line)
=>
(train essedarius-line)
)
;unique technologies
;Ovates for Team Games, will not be done in Solo Games
(defrule
(up-compare-goal villager-count g:>= upgrade-other-villager-requirement)
(goal upgrade-other 1)
(and
(goal flank-position 0)
(goal team-game YES)
)
(can-train-with-escrow ut-ovates)
=>
(release-escrow food)
(release-escrow gold)
(train ut-ovates)
(chat-local-to-self "research ovates(UT)")
)
;Warrior Priests for Team Games
(defrule
(up-compare-goal villager-count g:>= upgrade-other-villager-requirement)
(goal upgrade-other 1)
(and
(goal flank-position 1)
(goal team-game YES)
)
(can-train-with-escrow ut-warrior-priests)
=>
(release-escrow food)
(release-escrow gold)
(train ut-warrior-priests)
(chat-local-to-self "research warrior priests(UT)")
)
;Warrior Priests for Solo Games
(defrule
(up-compare-goal villager-count g:>= upgrade-other-villager-requirement)
(goal upgrade-other 1)
(goal team-game NO)
(can-train-with-escrow ut-warrior-priests)
=>
(release-escrow food)
(release-escrow gold)
(train ut-warrior-priests)
(chat-local-to-self "research warrior priests(UT)")
)
;Carnyx for Team Games
(defrule
(up-compare-goal villager-count g:>= upgrade-other-villager-requirement)
(goal upgrade-other 1)
(and
(goal flank-position 1)
(goal team-game YES)
)
(can-train-with-escrow ut-carnyx)
=>
(release-escrow food)
(release-escrow gold)
(train ut-carnyx)
(chat-local-to-self "research carnyx(UT)")
)
;Carnyx for Solo Games
(defrule
(up-compare-goal villager-count g:>= upgrade-other-villager-requirement)
(goal upgrade-other 1)
(goal team-game NO)
(can-train-with-escrow ut-carnyx)
=>
(release-escrow food)
(release-escrow gold)
(train ut-carnyx)
(chat-local-to-self "research warrior priests(UT)")
)
;Exmoor Covines for Team Games, will not be done in Solo Games
(defrule
(up-compare-goal villager-count g:>= upgrade-other-villager-requirement)
(goal upgrade-other 1)
(and
(goal flank-position 0)
(goal team-game YES)
)
(can-train-with-escrow ut-exmoor-covines)
=>
(release-escrow food)
(release-escrow gold)
(train ut-exmoor-covines)
(chat-local-to-self "research exmoor covines(UT)")
)