-
Notifications
You must be signed in to change notification settings - Fork 0
/
rawai-escrow.per
74 lines (69 loc) · 1.79 KB
/
rawai-escrow.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
;-----Escrow-----
(defrule
(current-age == dark-age)
=>
(set-escrow-percentage wood 5)
(set-escrow-percentage food 5)
(set-escrow-percentage gold 5)
(set-escrow-percentage stone 5)
)
(defrule
(current-age == feudal-age)
=>
(set-escrow-percentage wood 15)
(set-escrow-percentage food 15)
(set-escrow-percentage gold 15)
(set-escrow-percentage stone 15)
)
(defrule
(current-age == castle-age)
=>
(set-escrow-percentage wood 30)
(set-escrow-percentage food 30)
(set-escrow-percentage gold 30)
(set-escrow-percentage stone 30)
)
(defrule
(current-age == imperial-age)
=>
(set-escrow-percentage wood 50)
(set-escrow-percentage food 50)
(set-escrow-percentage gold 50)
(set-escrow-percentage stone 50)
)
(defrule
(up-compare-goal villager-count g:< upgrade-military-villager-requirement)
(up-compare-goal villager-count g:< upgrade-economy-villager-requirement)
(up-compare-goal villager-count g:< upgrade-fortifications-villager-requirement)
(up-compare-goal villager-count g:< upgrade-navy-villager-requirement)
(up-compare-goal villager-count g:< upgrade-other-villager-requirement)
(up-compare-goal villager-count g:< desired-ageup-villagers)
=>
(up-release-escrow)
)
(defrule
(up-compare-goal upgrade-military-lines != 1)
(up-compare-goal upgrade-military-smith != 1)
(up-compare-goal upgrade-military-generic != 1)
(up-compare-goal upgrade-economy != 1)
(up-compare-goal upgrade-fortifications != 1)
(up-compare-goal upgrade-navy != 1)
(up-compare-goal upgrade-other != 1)
(current-age g:>= desired-age)
=>
(up-release-escrow)
)
(defrule
(or
(or
(escrow-amount wood >= 1800)
(escrow-amount food >= 1800)
)
(or
(escrow-amount gold >= 1800)
(escrow-amount stone >= 1800)
)
)
=>
(up-release-escrow)
)