-
Notifications
You must be signed in to change notification settings - Fork 0
/
rawai-civ-syracusans.per
421 lines (377 loc) · 10.8 KB
/
rawai-civ-syracusans.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
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
;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:= 4)
(up-modify-goal desired-number-ranges c:= 2)
(up-modify-goal desired-number-stables c:= 1)
(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:= 6)
(up-modify-goal desired-number-ranges c:= 4)
(up-modify-goal desired-number-stables c:= 2)
(up-modify-goal desired-number-workshops c:= 4)
(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:= 1)
(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)
)
; Will have rush strategies in rush.per for Castle Age Crossbowmen/Siege Weaponry rushes
;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 Crossbowmen against Infantry
(defrule
(goal current-phase 5)
(goal train-anti-infantry 1)
(unit-type-count-total crossbowman g:< desired-number-antiinfantry)
(can-train crossbowman)
=>
(train crossbowman)
)
;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)
)
;Scout/Light Cavalry are used as anti-siege trash if anti-siege units cannot be afforded
(defrule
(goal current-phase 5)
(goal train-anti-siege 1)
(and
(not
(can-afford-unit cavalry-line)
)
(and
(not
(can-afford-unit scorpion-line)
)
(not
(can-afford-unit catapult)
)
)
)
(unit-type-count-total scout-cavalry-line g:< desired-number-antisiegetrash)
(can-train scout-cavalry-line)
=>
(train scout-cavalry-line)
)
;Catapults are used when there are enemy siege weapons present
(defrule
(goal current-phase 5)
(goal train-anti-siege 1)
(unit-type-count-total catapult g:< desired-number-antisiege)
(can-train catapult)
=>
(train catapult)
)
;Cavalry are used in addition to other anti-siege measures as anti-siege units
(defrule
(goal current-phase 5)
(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 as anti-priest trash
(defrule
(goal current-phase 5)
(goal train-anti-priest 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 Quadriremes/Quinqueremes to complement our <x>remes and Hemiolia
(defrule
(goal current-phase 5)
(or
(goal train-remes 1)
(goal train-hemiolia 1)
)
(wood-amount > 300)
(unit-type-count-total quadrireme-line g:< desired-number-qremes)
(can-train quadrireme-line)
=>
(train quadrireme-line)
)
;Train Juggernauts if you cannot afford Octeres
(defrule
(goal current-phase 5)
(not
(can-afford-unit octeres)
)
(wood-amount > 250)
(unit-type-count-total juggernaut-line g:< desired-number-juggernauts)
(can-train juggernaut-line)
=>
(train juggernaut-line)
)
;Else train Octeres
(defrule
(goal current-phase 5)
(wood-amount > 350)
(unit-type-count-total octeres g:< desired-number-octeres)
(can-train octeres)
=>
(train octeres)
)
(defrule
(goal current-phase 5)
(unit-type-count-total oxybeles-line g:< desired-number-uniqueunitone)
(can-train oxybeles-line)
=>
(train oxybeles-line)
)
;unique technologies
;Lex Hieronica for Team 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-lex-hieronica)
=>
(release-escrow food)
(release-escrow wood)
(train ut-lex-hieronica)
(chat-local-to-self "research lex hieronica(UT)")
)
;Lex Hieronica 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-lex-hieronica)
=>
(release-escrow food)
(release-escrow wood)
(train ut-lex-hieronica)
(chat-local-to-self "research lex hieronica(UT)")
)
;Archimedean Defenses 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 1)
(goal team-game YES)
)
(can-train-with-escrow ut-archimedean-defenses)
=>
(release-escrow stone)
(release-escrow gold)
(train ut-archimedean-defenses)
(chat-local-to-self "research archimedean defenses(UT)")
)
;Gastraphetes 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-gastraphetes)
=>
(release-escrow wood)
(release-escrow gold)
(train ut-gastraphetes)
(chat-local-to-self "research gastraphetes(UT)")
)
;Gastraphetes 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-lex-hieronica)
=>
(release-escrow wood)
(release-escrow gold)
(train ut-gastraphetes)
(chat-local-to-self "research gastraphetes(UT)")
)
;Lithobolos 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-lithobolos)
=>
(release-escrow wood)
(release-escrow gold)
(train ut-lithobolos)
(chat-local-to-self "research lithobolos(UT)")
)