Forked from Andygmb/Age of empires II AI Scripting
Created
February 26, 2021 06:30
-
-
Save justinmeiners/7dc097746f73569c1f56d7b074cdbd26 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; The official HD AI | |
; An Artificial Intelligence Script written by Archon and Promiskuitiv | |
; Get in contact with Promiskuitiv by sending a mail to neuernamae@web.de | |
; List of taunts it reacts to: | |
; Standard taunts. | |
; 33 - Stop slinging resources. If slinging is requested early and is immediately canceled it may mess up the strategy. | |
; 38 - Sling Resources. Human player only, stops any unit production except for civilian units. | |
; 100 - Forbids the AI to resign. | |
; 101 - Cancels the 100 taunt. | |
; 200 - Enables resource cheats - only works on 'hardest' difficulty. | |
; 222 - Same as 31, but more likely to help (only taunt this if you really need it). | |
; 230 - Tells the AI to go for a monk rush (taunt only works on civs who have good monks). | |
; 231-238 - Chat 230+[enemy player number] to make the AI target this enemy for 10 minutes. | |
; 250 - Chats information about the current strategy. | |
;Reusing obsolete strategic numbers that have no other effect. | |
(defconst sn-current-age 193);tracks our current age | |
(defconst sn-military-level 190); compares our military with enemy | |
(defconst sn-resource-control 191); 0=spend res free, 1=navy, 2=research only; > 2 specific items | |
(defconst sn-infantry-threat 53) | |
(defconst sn-archer-threat 64) | |
(defconst sn-cavalry-threat 65) | |
;Goals | |
(defconst increase-town-size-goal 1); this increases town size when needed, 0 = no increase, 2 = building placed this rule pass, else increase | |
(defconst attack-goal 2) | |
(defconst strategy-goal 3) | |
(defconst unit-goal 4) | |
(defconst train-civ-goal 5);1=train villagers, !=1 no villagers | |
(defconst control-goal 6); 6 = allow to be shot, 7 = shot, also controls if stone for a castle is needed. | |
(defconst anti-cavalry-threat-goal 7) | |
(defconst monk-threat-goal 8) | |
(defconst enemy-goal 9); keep track of what our foe is doing | |
(defconst farm-goal 10);enable/disable farming | |
(defconst under-attack-goal 11); town under attack or just a little harass? | |
(defconst enemy-boats-goal 12) | |
(defconst ffa-game-goal 13) | |
(defconst need-loom-goal 14) | |
(defconst escrow-purpose-goal 15); keeps track on what we use our escrow | |
(defconst spread-military-goal 16); spread military every couple of minutes to prevent villagers stuck | |
(defconst uu-up-goal 17); use escrow to upgrade uu | |
(defconst hostilities-goal 18); set this flag when we're attacked or attacking - avoid rule too long error | |
(defconst ranged-unit-type-goal 19);shows the ranged unit we use | |
(defconst retreat-now-goal 20); use to retreat with UP, condition: 1=always, 2=when attacking, 3=attack conditions false | |
(defconst housing-goal 21); used to build multiple houses with UP | |
(defconst anti-monk-threat-goal 22) | |
(defconst enemy-sighted-goal 23); when enemy activities detected, split the attack groups | |
(defconst attack-status-goal 24); indicates if we stop or regroup the attack | |
(defconst forward-threat-goal 25); enemy tower rush threat | |
(defconst enemy-fortifications-goal 26); delay attacks if enemy has many castles and walled with castle | |
(defconst restart-attack-goal 27); restarts attack in team games if TSA was reduced to place a building | |
(defconst save-wood-goal 28); controls spending wood | |
(defconst meso-enemy-goal 29); enemy has a meso civ; saves elements in a rule | |
(defconst nr-map-goal 30); focus on eco in easily wall-able maps vs humans | |
(defconst tribute-goal 31); ask for resources | |
(defconst patrol-goal 32); resets patrol attacks sent by the direct unit feature | |
(defconst split-rule-goal 33); split rule if we need more than 16 elements | |
(defconst tc-dodging-goal 34); move scout out of TC fire | |
(defconst kill-scouts-goal 35); kill enemy scouts | |
(defconst forward-goal 36); -1 no fwd, 1 fwd, ID of building = building requested | |
(defconst gather-inside-goal 37) | |
(defconst hunting-goal 38); controls hunting | |
(defconst micro-goal 41) | |
(defconst math-goal 42); temporary stored values | |
(defconst math-goal2 43) | |
(defconst math-goal3 44) | |
(defconst math-goal4 45) | |
(defconst position-goal 46); detect if we're pocket (=2) or flank (=1) player; was here before that many goals were used, shared with other AI | |
(defconst raid-goal 47); raiding weak player's eco. | |
(defconst closest-enemy-goal 48); stores player number of nearest enemy | |
(defconst threat-time-goal 49); stores time in miliseconds we were last attacked | |
(defconst threat-player-goal 50); stores player number of the attacker | |
(defconst threat-source-goal 51); unit class of the last enemy attacker | |
(defconst threat-target-goal 52); unit class of the our last attacked unit | |
(defconst winning-player 53); player number of enemy winning by specifal victory condition | |
(defconst victory-type 54); winning type | |
(defconst victory-time 55); time left | |
(defconst retargetenemy 56) | |
(defconst defendchat 57) | |
(defconst dark-build-order-goal 58); 1 = dock first, 2 = skip farms on a map that has more berries | |
(defconst closest-ally-goal 59); stores closes flank if pocket instead | |
(defconst aofe-game-goal 60); set to 1 if forgotten empires expansion is detected | |
(defconst attacking-enemy-goal 61); stores player number of the attacker; shared with Barbarian | |
(defconst reset 62); prov | |
(defconst attackchat 63) | |
(defconst stanceg 64) | |
(defconst request 65) | |
(defconst nomad 66) | |
(defconst landnomad 67) | |
(defconst request2 68) | |
(defconst team-coordination-goal 392); shared with Barbarian and Promi | |
;SN/Goal Values | |
(defconst yes 1) | |
(defconst no 0) | |
(defconst dark 78) | |
(defconst df-transit 79) | |
(defconst feudal 80) | |
(defconst fc-transit 81) | |
(defconst castle 82) | |
(defconst ci-transit 83) | |
(defconst imperial 84) | |
(defconst flush 200) | |
(defconst rush 201) | |
(defconst boom 202) | |
(defconst fast-imp 203) | |
(defconst sling 204) | |
(defconst drush 205); not used | |
(defconst mix 1) | |
(defconst belated-flush-defense 5) | |
(defconst aggressive-rush 6) | |
(defconst shot 7) | |
(defconst uu 8) | |
(defconst navy 4000) | |
(defconst flank 1) | |
(defconst pocket 2) | |
(defconst retreat 1) | |
(defconst groups 2) | |
(defconst tsa 3) | |
;Timers | |
(defconst increase-town-size-timer 1) | |
(defconst reset-town-size-timer 2) | |
(defconst scouting-timer 3) | |
(defconst attack-timer 4) | |
(defconst spread-military-timer 5) | |
(defconst under-attack-timer 7) | |
(defconst civ-explore-timer 8) | |
(defconst lumber-timer 8) | |
(defconst one-minute-timer 9) | |
(defconst tribute-timer 10) | |
(defconst micro-timer 11) | |
(defconst navy-attack-timer 12); don't spam attack or we can't retreat boats from fortifications | |
(defconst help-ally-timer 13); indicated when we sent help to ally | |
(defconst FDrop 14); timer for forcedrop to continuously train villager | |
(defconst retreat-timer 15); timer to avoid looping retreat unit commands | |
(defconst hunting-timer 16) | |
(defconst garrison-timer 17) | |
(defconst disable-defend-groups-timer 18); always enable defending again | |
(defconst monk-micro-timer 19) | |
(defconst misc-micro-timer 20) | |
(defconst train-forward-timer 21) | |
(defconst rally-units-timer 22) | |
(defconst reset-units-timer 23) | |
(defconst attack-chat 24) | |
(defconst stance 25) | |
(defconst thirty 26) | |
(defconst tensec 27) | |
(defconst two-minute-timer 28) | |
(defconst defend-timer 29) | |
(defconst resign-timer 30) | |
(defconst human-coop-timer 31) | |
(defconst tribute-timer2 31) | |
;Unit IDs | |
(defconst male-hunter 122) | |
(defconst female-hunter 216) | |
(defconst male-forager 120) | |
(defconst female-forager 354) | |
(defconst male-shepherd 592) | |
(defconst female-shepherd 590) | |
(defconst female-gold-miner 579) | |
(defconst male-gold-miner 581) | |
(defconst hunter 976) | |
(defconst food-gatherer 978) | |
(defconst ri-herbal-medicine 441) | |
(defconst ri-perfusion 457) | |
(defconst ri-anarchy 16) | |
(defconst ri-spies 408); useless for AIs | |
(defconst ri-treadmill-crane 54) | |
(defconst unpacked-trebuchet 42) | |
(defconst rax-husky-line 759) | |
(defconst ranged-unit-class 900) | |
(defconst building-class 903) | |
(defconst villager-class 904) | |
(defconst infantry-class 906) | |
(defconst cavalry-unit-class 912) | |
(defconst siege-unit-class 913) | |
(defconst monastery-class 918) | |
(defconst mounted-gun-class 923) | |
(defconst cavalry-archer-class 936) | |
(defconst gunpowder-class 944) | |
(defconst scorpion-class 955) | |
(defconst tower-class 952) | |
(defconst warship-class 922) | |
(defconst tree-class 915) | |
(defconst forage-bush 59) | |
(defconst gold-mine 66) | |
(defconst stone-mine 102) | |
(defconst shore-fish 933) | |
(defconst sea-fish 905) | |
(defconst sheep 958) | |
(defconst relic 285) | |
(defconst revealer 112) | |
(defconst flare 274) | |
(defconst tc-arrow 54) | |
(defconst watch-tower-arrow 786) | |
(defconst castle-arrow 746) | |
(defconst castle-arrow-chemistry 747) | |
;User Patch | |
(defconst game-time 0); FactId Constants | |
(defconst population-cap 1) | |
(defconst population-headroom 2) | |
(defconst housing-headroom 3) | |
(defconst idle-farm-count 4) | |
(defconst food-amount 5) | |
(defconst wood-amount 6) | |
(defconst stone-amount 7) | |
(defconst gold-amount 8) | |
(defconst escrow-amount 9) | |
(defconst commodity-buying-price 10) | |
(defconst commodity-selling-price 11) | |
(defconst dropsite-min-distance 12) | |
(defconst soldier-count 13) | |
(defconst attack-soldier-count 14) | |
(defconst defend-soldier-count 15) | |
(defconst warboat-count 16) | |
(defconst attack-warboat-count 17) | |
(defconst defend-warboat-count 18) | |
(defconst current-age 19) | |
(defconst current-score 20) | |
(defconst civilization 21) | |
(defconst player-number 22) | |
(defconst player-in-game 23) | |
(defconst unit-count 24) | |
(defconst unit-type-count 25) | |
(defconst unit-type-count-total 26) | |
(defconst building-count 27) | |
(defconst building-type-count 28) | |
(defconst building-type-count-total 29) | |
(defconst population 30) | |
(defconst military-population 31) | |
(defconst civilian-population 32) | |
(defconst random-number 33) | |
(defconst resource-amount 34) | |
(defconst player-distance 35) | |
(defconst allied-goal 36) | |
(defconst allied-sn 37) | |
(defconst resource-percent 38) | |
(defconst enemy-buildings-in-town 39) | |
(defconst enemy-units-in-town 40) | |
(defconst enemy-villagers-in-town 41) | |
(defconst players-in-game 42) | |
(defconst defender-count 43) | |
(defconst building-type-in-town 44) | |
(defconst unit-type-in-town 45) | |
(defconst villager-type-in-town 46) | |
(defconst gaia-type-count 47) | |
(defconst gaia-type-count-total 48) | |
(defconst cc-gaia-type-count 49) | |
(defconst aggressive 0) | |
(defconst defensive 1) | |
(defconst stand-ground 2) | |
(defconst no-attack 3) | |
(defconst projectile-town-center 0); Define ProjectileType Constants | |
(defconst projectile-castle 1) | |
(defconst projectile-watch-tower 2) | |
(defconst projectile-bombard-tower 3) | |
(defconst projectile-ship 4) | |
(defconst projectile-siege 5) | |
(defconst projectile-fortification 6) | |
(defconst projectile-any 7) | |
(defconst find-attacker 0); Define FindPlayerMethod Constants | |
(defconst find-random 1) | |
(defconst find-closest 2) | |
(defconst find-ordered 3) | |
(defconst research-unavailable 0); Define ResearchState Constants | |
(defconst research-available 1) | |
(defconst research-pending 2) | |
(defconst research-complete 3) | |
(defconst timer-disabled 0); Define TimerState Constants | |
(defconst timer-triggered 1) | |
(defconst timer-running 2) | |
(defconst group-type-land-attack 100);Define GroupType Constants | |
(defconst group-type-land-explore 101) | |
(defconst group-type-land-trade 109) | |
(defconst group-type-water-attack 102) | |
(defconst group-type-water-explore 103) | |
(defconst group-type-water-trade 106) | |
(defconst group-type-transport-ship 104) | |
(defconst group-type-fishing-ship 105) | |
(defconst group-type-forward-builder 107) | |
(defconst group-type-monk 108) | |
(defconst amount-tribute-inefficiency 46) | |
(defconst position-center 0) | |
(defconst position-opposite 1) | |
(defconst position-corner 2) | |
(defconst position-enemy 3) | |
(defconst position-border 4) | |
(defconst position-mirror 5) | |
(defconst position-flank 6) | |
(defconst position-zero 7) | |
(defconst position-map-size 8) | |
(defconst position-self 9) | |
(defconst position-target 10) | |
(defconst position-focus 11) | |
(defconst position-object 12) | |
(defconst position-point 13) | |
(defconst sort-targets 0) | |
(defconst sort-random 1) | |
(defconst sort-distance 2) | |
(defconst sort-hitpoints 3) | |
(defconst sort-range 4) | |
;(defconst find-attacker 0) | |
;(defconst find-random 1) | |
;(defconst find-closest 2) | |
;(defconst find-ordered 3) | |
(defconst ally 0) | |
(defconst neutral 1) | |
(defconst any 2) | |
(defconst enemy 3) | |
(defconst forage-food 16) | |
(defconst sheep-food 958) | |
(defconst boar-food 910) | |
#load-if-defined CIV-TAGS-FOR-EDITOR | |
(defconst ITALIAN-CIV 0) | |
(defconst MAGYAR-CIV 0) | |
(defconst INDIAN-CIV 0) | |
(defconst SLAVIC-CIV 0) | |
(defconst INCAN-CIV 0) | |
#end-if | |
(defconst italian 19) | |
(defconst indian 20) | |
(defconst incan 21) | |
(defconst magyar 22) | |
(defconst slavic 23) | |
(defconst stable-tarkan 886) | |
(defconst stable-elite-tarkan 887) | |
(defconst boyar 876) | |
(defconst elite-boyar 878) | |
(defconst kamayuk 879) | |
(defconst elite-kamayuk 881) | |
(defconst slinger 185) | |
(defconst ri-elite-magyar-huszar 472) | |
(defconst magyar-huszar 869) | |
(defconst elite-magyar-huszar 871) | |
(defconst ri-elite-elephant-archer 481) | |
(defconst elephant-archer 873) | |
(defconst elite-elephant-archer 875) | |
(defconst imperial-camel 897) | |
(defconst ri-elite-genoese-crossbow 468) | |
(defconst genoese-crossbowman 866) | |
(defconst elite-genoese-crossbowman 868) | |
(defconst heavy-eagle-warrior 753) | |
(defconst condottiero 882) | |
(defconst ri-chivalry 493) | |
(defconst ri-inquisition 492) | |
(defconst ri-sipahi 491) | |
(defconst ri-madrasah 490) | |
(defconst ri-ironclad 489) | |
(defconst ri-boiling-oil 488) | |
(defconst ri-nomads 487) | |
(defconst ri-panokseon 486) | |
(defconst ri-yasama 484) | |
(defconst ri-marauders 483) | |
(defconst ri-atlatl 460) | |
(defconst ri-war-wolf 461) | |
(defconst ri-greek-fire 464) | |
(defconst ri-chieftains 463) | |
(defconst ri-stronghold 482) | |
(defconst ri-great-wall 462) | |
(defconst ri-orthodoxy 512) | |
(defconst ri-druzhina 513) | |
(defconst ri-elite-boyar 504) | |
(defconst ri-andean-sling 516) | |
(defconst ri-couriers 517) | |
(defconst ri-elite-kamayuk 509) | |
(defconst ri-sultans 506) | |
(defconst ri-shatagni 507) | |
(defconst ri-imperial-camel 521) | |
(defconst ri-mercenaries 514) | |
(defconst ri-recurve-bow 515) | |
(defconst ri-silk-road 499) | |
(defconst ri-pavise 494) | |
(defconst ri-revetments 525) | |
(defconst ri-eagle-warrior 384) | |
(defconst ri-gillnets 65) | |
(defconst ri-hunting-dogs 526) | |
(defconst ri-obsidian-arrows 485) | |
(defconst siege-tower 885) | |
(defconst upgraded-palisade-wall 119) | |
(defconst sea-tower 785) | |
(defconst sea-wall 788) | |
; Other SNs | |
(defconst sn-food-modifier-percentage 156) | |
(defconst sn-wood-modifier-percentage 157) | |
(defconst sn-stone-modifier-percentage 158) | |
(defconst sn-gold-modifier-percentage 159) | |
;civ specific | |
#load-if-defined AZTEC-CIV | |
(defconst dark-age-villager 28) | |
(defconst villager-wonder-dark 32) | |
(defconst villager-wonder-feudal 34) | |
(defconst default-strategy 201) | |
(defconst pocket-strategy 202) | |
(defconst default-unit eagle-warrior) | |
(defconst unique-unit-food 110);minimum food amount | |
(defconst default-flush-unit archer) | |
(defconst no-gold-flush-unit skirmisher) | |
(defconst default-ranged archer) | |
(defconst pocket-unit eagle-warrior) | |
(defconst get-lightcav 0) | |
(defconst scout-unit eagle-warrior-line) | |
(defconst military-level-flush 1) | |
(defconst military-level-flush-aggressive 0) | |
(defconst allow-forward-castle 1) | |
(defconst sling-time 600) | |
(defconst sling-number 100); > 10 actually never slings | |
(defconst sling-two 0) | |
(defconst blot-size 0) | |
(defconst villager-barracks 3) | |
(defconst villager-stable 3) | |
(defconst villager-archery-range 9) | |
(defconst villager-monastery 7) | |
(defconst villager-town-center 15) | |
(defconst villager-castle 12) | |
(defconst villager-mining-camp 14) | |
(defconst villager-siege-workshop 16) | |
(defconst villager-market 17) | |
(defconst number-barracks 10) | |
(defconst number-stables 5) | |
(defconst number-archery-ranges 7) | |
(defconst tc-boom-monastery 2) | |
(defconst farm-count 14) | |
(defconst pidm-food 10) | |
(defconst pidm-wood 10) | |
(defconst pidm-gold 75) | |
(defconst pidm-stone 5) | |
(defconst pidm-food2 34) | |
(defconst pidm-wood2 28) | |
(defconst pidm-gold2 33) | |
(defconst pidm-stone2 5) | |
(defconst uu-food 36) | |
(defconst uu-wood 36) | |
(defconst uu-gold 24) | |
(defconst uu-stone 4) | |
(defconst uu-food2 36) | |
(defconst uu-wood2 30) | |
(defconst uu-gold2 28) | |
(defconst uu-stone2 6) | |
(defconst ci-uu-switch-food 38) | |
(defconst ci-uu-switch-wood 28) | |
(defconst ci-uu-switch-gold 28) | |
(defconst ci-uu-switch-stone 6) | |
(defconst evaluation-hitpoints 0) | |
(defconst evaluation-distance 100) | |
(defconst max-food-escrow 1000) | |
(defconst max-gold-escrow 500) | |
#end-if | |
#load-if-defined BRITON-CIV | |
(defconst dark-age-villager 28) | |
(defconst villager-wonder-dark 32) | |
(defconst villager-wonder-feudal 34) | |
(defconst default-strategy 200) | |
(defconst pocket-strategy 202) | |
(defconst default-unit archer) | |
(defconst unique-unit-food 0) | |
(defconst default-flush-unit archer) | |
(defconst no-gold-flush-unit skirmisher) | |
(defconst default-ranged archer) | |
(defconst pocket-unit my-unique-unit-line) | |
(defconst get-lightcav 0) | |
(defconst scout-unit scout-cavalry-line) | |
(defconst military-level-flush 2) | |
(defconst military-level-flush-aggressive 1) | |
(defconst allow-forward-castle 0) | |
(defconst sling-time 600) | |
(defconst sling-number 90) | |
(defconst sling-two 1) | |
(defconst blot-size 1) | |
(defconst villager-barracks 3) | |
(defconst villager-stable 3) | |
(defconst villager-archery-range 12) | |
(defconst villager-monastery 7) | |
(defconst villager-town-center 8) | |
(defconst villager-castle 3) | |
(defconst villager-mining-camp 14) | |
(defconst villager-siege-workshop 16) | |
(defconst villager-market 17) | |
(defconst number-barracks 6) | |
(defconst number-stables 0) | |
(defconst number-archery-ranges 9) | |
(defconst tc-boom-monastery 3) | |
(defconst farm-count 14) | |
(defconst pidm-food 0) | |
(defconst pidm-wood 47) | |
(defconst pidm-gold 48) | |
(defconst pidm-stone 5) | |
(defconst pidm-food2 26) | |
(defconst pidm-wood2 34) | |
(defconst pidm-gold2 35) | |
(defconst pidm-stone2 5) | |
(defconst uu-food 36) | |
(defconst uu-wood 44) | |
(defconst uu-gold 16) | |
(defconst uu-stone 4) | |
(defconst uu-food2 30) | |
(defconst uu-wood2 36) | |
(defconst uu-gold2 28) | |
(defconst uu-stone2 6) | |
(defconst ci-uu-switch-food 30) | |
(defconst ci-uu-switch-wood 40) | |
(defconst ci-uu-switch-gold 26) | |
(defconst ci-uu-switch-stone 6) | |
(defconst evaluation-hitpoints 100) | |
(defconst evaluation-distance 0) | |
(defconst max-food-escrow 850) | |
(defconst max-gold-escrow 850) | |
#end-if | |
#load-if-defined BYZANTINE-CIV | |
(defconst dark-age-villager 30) | |
(defconst villager-wonder-dark 32) | |
(defconst villager-wonder-feudal 34) | |
(defconst default-strategy 201) | |
(defconst pocket-strategy 201) | |
(defconst default-unit skirmisher) | |
(defconst unique-unit-food 120) | |
(defconst default-flush-unit skirmisher) | |
(defconst no-gold-flush-unit skirmisher) | |
(defconst default-ranged archer) | |
(defconst pocket-unit skirmisher) | |
(defconst get-lightcav 0) | |
(defconst scout-unit scout-cavalry-line) | |
(defconst military-level-flush 2) | |
(defconst military-level-flush-aggressive 1) | |
(defconst allow-forward-castle 0) | |
(defconst sling-time 270) | |
(defconst sling-number 80) | |
(defconst sling-two 0) | |
(defconst blot-size 1) | |
(defconst villager-barracks 9) | |
(defconst villager-stable 3) | |
(defconst villager-archery-range 12) | |
(defconst villager-monastery 12) | |
(defconst villager-town-center 15) | |
(defconst villager-castle 3) | |
(defconst villager-mining-camp 14) | |
(defconst villager-siege-workshop 16) | |
(defconst villager-market 17) | |
(defconst number-barracks 6) | |
(defconst number-stables 5) | |
(defconst number-archery-ranges 7) | |
(defconst tc-boom-monastery 2) | |
(defconst farm-count 14) | |
(defconst pidm-food 10) | |
(defconst pidm-wood 10) | |
(defconst pidm-gold 75) | |
(defconst pidm-stone 5) | |
(defconst pidm-food2 37) | |
(defconst pidm-wood2 32) | |
(defconst pidm-gold2 27) | |
(defconst pidm-stone2 4) | |
(defconst uu-food 36) | |
(defconst uu-wood 44) | |
(defconst uu-gold 16) | |
(defconst uu-stone 4) | |
(defconst uu-food2 39) | |
(defconst uu-wood2 39) | |
(defconst uu-gold2 18) | |
(defconst uu-stone2 3) | |
(defconst ci-uu-switch-food 38) | |
(defconst ci-uu-switch-wood 37) | |
(defconst ci-uu-switch-gold 18) | |
(defconst ci-uu-switch-stone 6) | |
(defconst evaluation-hitpoints 100) | |
(defconst evaluation-distance 0) | |
(defconst max-food-escrow 1600) | |
(defconst max-gold-escrow 800) | |
#end-if | |
#load-if-defined CELTIC-CIV | |
(defconst dark-age-villager 29) | |
(defconst villager-wonder-dark 32) | |
(defconst villager-wonder-feudal 34) | |
(defconst default-strategy 200) | |
(defconst pocket-strategy 201) | |
(defconst default-unit militiaman-line) | |
(defconst unique-unit-food 115) | |
(defconst default-flush-unit skirmisher) | |
(defconst no-gold-flush-unit skirmisher) | |
(defconst default-ranged 0) | |
(defconst pocket-unit knight) | |
(defconst get-lightcav 0) | |
(defconst scout-unit scout-cavalry-line) | |
(defconst military-level-flush 2) | |
(defconst military-level-flush-aggressive 1) | |
(defconst allow-forward-castle 0) | |
(defconst sling-time 210) | |
(defconst sling-number 55) | |
(defconst sling-two 1) | |
(defconst blot-size 1) | |
(defconst villager-barracks 3) | |
(defconst villager-stable 3) | |
(defconst villager-archery-range 9) | |
(defconst villager-monastery 7) | |
(defconst villager-town-center 8) | |
(defconst villager-castle 5) | |
(defconst villager-mining-camp 14) | |
(defconst villager-siege-workshop 16) | |
(defconst villager-market 17) | |
(defconst number-barracks 9) | |
(defconst number-stables 3) | |
(defconst number-archery-ranges 4) | |
(defconst tc-boom-monastery 2) | |
(defconst farm-count 16) | |
(defconst pidm-food 30) | |
(defconst pidm-wood 10) | |
(defconst pidm-gold 55) | |
(defconst pidm-stone 5) | |
(defconst pidm-food2 34) | |
(defconst pidm-wood2 28) | |
(defconst pidm-gold2 33) | |
(defconst pidm-stone2 5) | |
(defconst uu-food 39) | |
(defconst uu-wood 45) | |
(defconst uu-gold 13) | |
(defconst uu-stone 3) | |
(defconst uu-food2 40) | |
(defconst uu-wood2 28) | |
(defconst uu-gold2 28) | |
(defconst uu-stone2 4) | |
(defconst ci-uu-switch-food 38) | |
(defconst ci-uu-switch-wood 28) | |
(defconst ci-uu-switch-gold 28) | |
(defconst ci-uu-switch-stone 6) | |
(defconst evaluation-hitpoints 100) | |
(defconst evaluation-distance 0) | |
(defconst max-food-escrow 1000) | |
(defconst max-gold-escrow 800) | |
#end-if | |
#load-if-defined CHINESE-CIV | |
(defconst dark-age-villager 29) | |
(defconst villager-wonder-dark 33) | |
(defconst villager-wonder-feudal 35) | |
(defconst default-strategy 201) | |
(defconst pocket-strategy 202) | |
(defconst default-unit knight) | |
(defconst unique-unit-food 0) | |
(defconst default-flush-unit scout-cavalry) | |
(defconst no-gold-flush-unit scout-cavalry) | |
(defconst default-ranged archer) | |
(defconst pocket-unit my-unique-unit-line) | |
(defconst get-lightcav 0) | |
(defconst scout-unit scout-cavalry-line) | |
(defconst military-level-flush 1) | |
(defconst military-level-flush-aggressive 0) | |
(defconst allow-forward-castle 0) | |
(defconst sling-time 260) | |
(defconst sling-number 70) | |
(defconst sling-two 0) | |
(defconst blot-size 1) | |
(defconst villager-barracks 9) | |
(defconst villager-stable 3) | |
(defconst villager-archery-range 16) | |
(defconst villager-monastery 12) | |
(defconst villager-town-center 15) | |
(defconst villager-castle 5) | |
(defconst villager-mining-camp 14) | |
(defconst villager-siege-workshop 16) | |
(defconst villager-market 17) | |
(defconst number-barracks 6) | |
(defconst number-stables 8) | |
(defconst number-archery-ranges 6) | |
(defconst tc-boom-monastery 3) | |
(defconst farm-count 14) | |
(defconst pidm-food 0) | |
(defconst pidm-wood 47) | |
(defconst pidm-gold 48) | |
(defconst pidm-stone 5) | |
(defconst pidm-food2 26) | |
(defconst pidm-wood2 34) | |
(defconst pidm-gold2 35) | |
(defconst pidm-stone2 5) | |
(defconst uu-food 36) | |
(defconst uu-wood 44) | |
(defconst uu-gold 16) | |
(defconst uu-stone 4) | |
(defconst uu-food2 32) | |
(defconst uu-wood2 38) | |
(defconst uu-gold2 24) | |
(defconst uu-stone2 6) | |
(defconst ci-uu-switch-food 34) | |
(defconst ci-uu-switch-wood 34) | |
(defconst ci-uu-switch-gold 26) | |
(defconst ci-uu-switch-stone 6) | |
(defconst evaluation-hitpoints 0) | |
(defconst evaluation-distance 100) | |
(defconst max-food-escrow 760) | |
(defconst max-gold-escrow 760) | |
#end-if | |
#load-if-defined FRANKISH-CIV | |
(defconst dark-age-villager 29) | |
(defconst villager-wonder-dark 32) | |
(defconst villager-wonder-feudal 34) | |
(defconst default-strategy 201) | |
(defconst pocket-strategy 201) | |
(defconst default-unit knight) | |
(defconst unique-unit-food 0) | |
(defconst default-flush-unit skirmisher) | |
(defconst no-gold-flush-unit skirmisher) | |
(defconst default-ranged archer) | |
(defconst pocket-unit knight) | |
(defconst get-lightcav 0) | |
(defconst scout-unit scout-cavalry-line) | |
(defconst military-level-flush 1) | |
(defconst military-level-flush-aggressive 0) | |
(defconst allow-forward-castle 1) | |
(defconst sling-time 600) | |
(defconst sling-number 100) | |
(defconst sling-two 0) | |
(defconst blot-size 1) | |
(defconst villager-barracks 9) | |
(defconst villager-stable 3) | |
(defconst villager-archery-range 16) | |
(defconst villager-monastery 12) | |
(defconst villager-town-center 18) | |
(defconst villager-castle 8) | |
(defconst villager-mining-camp 14) | |
(defconst villager-siege-workshop 14) | |
(defconst villager-market 8) | |
(defconst number-barracks 8) | |
(defconst number-stables 10) | |
(defconst number-archery-ranges 4) | |
(defconst tc-boom-monastery 2) | |
(defconst farm-count 15) | |
(defconst pidm-food 45) | |
(defconst pidm-wood 0) | |
(defconst pidm-gold 50) | |
(defconst pidm-stone 5) | |
(defconst pidm-food2 34) | |
(defconst pidm-wood2 28) | |
(defconst pidm-gold2 33) | |
(defconst pidm-stone2 5) | |
(defconst uu-food 36) | |
(defconst uu-wood 44) | |
(defconst uu-gold 16) | |
(defconst uu-stone 4) | |
(defconst uu-food2 44) | |
(defconst uu-wood2 26) | |
(defconst uu-gold2 25) | |
(defconst uu-stone2 5) | |
(defconst ci-uu-switch-food 43) | |
(defconst ci-uu-switch-wood 26) | |
(defconst ci-uu-switch-gold 25) | |
(defconst ci-uu-switch-stone 6) | |
(defconst evaluation-hitpoints 0) | |
(defconst evaluation-distance 100) | |
(defconst max-food-escrow 1000) | |
(defconst max-gold-escrow 850) | |
#end-if | |
#load-if-defined GOTHIC-CIV | |
(defconst dark-age-villager 30) | |
(defconst villager-wonder-dark 33) | |
(defconst villager-wonder-feudal 35) | |
(defconst default-strategy 200) | |
(defconst pocket-strategy 201) | |
(defconst default-unit militiaman-line) | |
(defconst unique-unit-food 100) | |
(defconst default-flush-unit militiaman-line) | |
(defconst no-gold-flush-unit skirmisher) | |
#load-if-not-defined POST-IMPERIAL-AGE-START | |
(defconst default-ranged archer) | |
#else | |
(defconst default-ranged scorpion) | |
#end-if | |
(defconst pocket-unit knight) | |
(defconst get-lightcav 0) | |
(defconst scout-unit scout-cavalry-line) | |
(defconst military-level-flush 1) | |
(defconst military-level-flush-aggressive 0) | |
(defconst allow-forward-castle 1) | |
(defconst sling-time 250) | |
(defconst sling-number 40) | |
(defconst sling-two 0) | |
(defconst blot-size 1) | |
(defconst villager-barracks 3) | |
(defconst villager-stable 20) | |
(defconst villager-archery-range 14) | |
(defconst villager-monastery 12) | |
(defconst villager-castle 10) | |
(defconst villager-mining-camp 14) | |
(defconst villager-town-center 18) | |
(defconst villager-siege-workshop 15) | |
(defconst villager-market 9) | |
(defconst number-barracks 14) | |
(defconst number-stables 1) | |
(defconst number-archery-ranges 4) | |
(defconst tc-boom-monastery 2) | |
(defconst farm-count 14) | |
(defconst pidm-food 52) | |
(defconst pidm-wood 12) | |
(defconst pidm-gold 36) | |
(defconst pidm-stone 0) | |
(defconst pidm-food2 36) | |
(defconst pidm-wood2 23) | |
(defconst pidm-gold2 36) | |
(defconst pidm-stone2 5) | |
(defconst uu-food 36) | |
(defconst uu-wood 44) | |
(defconst uu-gold 16) | |
(defconst uu-stone 4) | |
(defconst uu-food2 51) | |
(defconst uu-wood2 28) | |
(defconst uu-gold2 19) | |
(defconst uu-stone2 2) | |
(defconst ci-uu-switch-food 46) | |
(defconst ci-uu-switch-wood 28) | |
(defconst ci-uu-switch-gold 20) | |
(defconst ci-uu-switch-stone 6) | |
(defconst evaluation-hitpoints 100) | |
(defconst evaluation-distance 0) | |
(defconst max-food-escrow 1200) | |
(defconst max-gold-escrow 550) | |
#end-if | |
#load-if-defined HUN-CIV | |
(defconst dark-age-villager 29) | |
(defconst villager-wonder-dark 32) | |
(defconst villager-wonder-feudal 34) | |
(defconst default-strategy 201) | |
(defconst pocket-strategy 201) | |
(defconst default-unit knight) | |
(defconst unique-unit-food 0) | |
(defconst default-flush-unit scout-cavalry) | |
(defconst no-gold-flush-unit scout-cavalry) | |
(defconst default-ranged cavalry-archer) | |
(defconst pocket-unit knight) | |
(defconst get-lightcav 1) | |
(defconst scout-unit scout-cavalry-line) | |
(defconst military-level-flush 1) | |
(defconst military-level-flush-aggressive 0) | |
(defconst allow-forward-castle 1) | |
(defconst sling-time 600) | |
(defconst sling-number 100) | |
(defconst sling-two 0) | |
(defconst blot-size 1) | |
(defconst villager-barracks 3) | |
(defconst villager-stable 3) | |
(defconst villager-castle 10) | |
(defconst villager-archery-range 8) | |
(defconst villager-monastery 6) | |
(defconst villager-mining-camp 16) | |
(defconst villager-town-center 15) | |
(defconst villager-siege-workshop 5) | |
(defconst villager-market 12) | |
(defconst number-barracks 9) | |
(defconst number-stables 8) | |
(defconst number-archery-ranges 12) | |
(defconst tc-boom-monastery 2) | |
(defconst farm-count 14) | |
(defconst pidm-food 0) | |
(defconst pidm-wood 30) | |
(defconst pidm-gold 67) | |
(defconst pidm-stone 3) | |
(defconst pidm-food2 30) | |
(defconst pidm-wood2 32) | |
(defconst pidm-gold2 33) | |
(defconst pidm-stone2 5) | |
(defconst uu-food 36) | |
(defconst uu-wood 44) | |
(defconst uu-gold 16) | |
(defconst uu-stone 4) | |
(defconst uu-food2 30) | |
(defconst uu-wood2 36) | |
(defconst uu-gold2 28) | |
(defconst uu-stone2 6) | |
(defconst ci-uu-switch-food 38) | |
(defconst ci-uu-switch-wood 28) | |
(defconst ci-uu-switch-gold 28) | |
(defconst ci-uu-switch-stone 6) | |
(defconst evaluation-hitpoints 0) | |
(defconst evaluation-distance 100) | |
(defconst max-food-escrow 1000) | |
(defconst max-gold-escrow 500) | |
#end-if | |
#load-if-defined JAPANESE-CIV | |
(defconst dark-age-villager 30) | |
(defconst villager-wonder-dark 32) | |
(defconst villager-wonder-feudal 34) | |
(defconst default-strategy 200) | |
(defconst pocket-strategy 202) | |
(defconst default-unit archer) | |
(defconst unique-unit-food 110) | |
(defconst default-flush-unit archer) | |
(defconst no-gold-flush-unit skirmisher) | |
(defconst default-ranged archer) | |
(defconst pocket-unit archer) | |
(defconst get-lightcav 0) | |
(defconst scout-unit scout-cavalry-line) | |
(defconst military-level-flush 1) | |
(defconst military-level-flush-aggressive 0) | |
(defconst allow-forward-castle 0) | |
(defconst sling-time 200) | |
(defconst sling-number 55) | |
(defconst sling-two 0) | |
(defconst blot-size 1) | |
(defconst villager-barracks 3) | |
(defconst villager-stable 3) | |
(defconst villager-archery-range 9) | |
(defconst villager-monastery 7) | |
(defconst villager-town-center 8) | |
(defconst villager-castle 5) | |
(defconst villager-mining-camp 14) | |
(defconst villager-siege-workshop 16) | |
(defconst villager-market 17) | |
(defconst number-barracks 9) | |
(defconst number-stables 1) | |
(defconst number-archery-ranges 7) | |
(defconst tc-boom-monastery 2) | |
(defconst farm-count 16) | |
(defconst pidm-food 30) | |
(defconst pidm-wood 10) | |
(defconst pidm-gold 60) | |
(defconst pidm-stone 0) | |
(defconst pidm-food2 38) | |
(defconst pidm-wood2 30) | |
(defconst pidm-gold2 27) | |
(defconst pidm-stone2 5) | |
(defconst uu-food 36) | |
(defconst uu-wood 44) | |
(defconst uu-gold 16) | |
(defconst uu-stone 4) | |
(defconst uu-food2 38) | |
(defconst uu-wood2 28) | |
(defconst uu-gold2 28) | |
(defconst uu-stone2 6) | |
(defconst ci-uu-switch-food 38) | |
(defconst ci-uu-switch-wood 28) | |
(defconst ci-uu-switch-gold 28) | |
(defconst ci-uu-switch-stone 6) | |
(defconst evaluation-hitpoints 100) | |
(defconst evaluation-distance 0) | |
(defconst max-food-escrow 950) | |
(defconst max-gold-escrow 875) | |
#end-if | |
#load-if-defined KOREAN-CIV | |
(defconst dark-age-villager 29) | |
(defconst villager-wonder-dark 33) | |
(defconst villager-wonder-feudal 35) | |
(defconst default-strategy 200) | |
(defconst pocket-strategy 202) | |
(defconst default-unit my-unique-unit-line) | |
(defconst unique-unit-food 0) | |
(defconst default-flush-unit archer) | |
(defconst no-gold-flush-unit skirmisher) | |
(defconst default-ranged archer) | |
(defconst pocket-unit my-unique-unit-line) | |
(defconst get-lightcav 0) | |
(defconst scout-unit scout-cavalry-line) | |
(defconst military-level-flush 1) | |
(defconst military-level-flush-aggressive 0) | |
(defconst allow-forward-castle 0) | |
(defconst sling-time 180) | |
(defconst sling-number 20) | |
(defconst sling-two 1) | |
(defconst blot-size 1) | |
(defconst villager-barracks 3) | |
(defconst villager-stable 16) | |
(defconst villager-archery-range 13) | |
(defconst villager-monastery 7) | |
(defconst villager-town-center 8) | |
(defconst villager-castle 4) | |
(defconst villager-mining-camp 14) | |
(defconst villager-siege-workshop 8) | |
(defconst villager-market 17) | |
(defconst number-barracks 6) | |
(defconst number-stables 1) | |
(defconst number-archery-ranges 7) | |
(defconst tc-boom-monastery 3) | |
(defconst farm-count 14) | |
(defconst pidm-food 0) | |
(defconst pidm-wood 58) | |
(defconst pidm-gold 37) | |
(defconst pidm-stone 5) | |
(defconst pidm-food2 26) | |
(defconst pidm-wood2 39) | |
(defconst pidm-gold2 30) | |
(defconst pidm-stone2 5) | |
(defconst uu-food 36) | |
(defconst uu-wood 48) | |
(defconst uu-gold 12) | |
(defconst uu-stone 4) | |
(defconst uu-food2 25) | |
(defconst uu-wood2 44) | |
(defconst uu-gold2 25) | |
(defconst uu-stone2 6) | |
(defconst ci-uu-switch-food 28) | |
(defconst ci-uu-switch-wood 40) | |
(defconst ci-uu-switch-gold 26) | |
(defconst ci-uu-switch-stone 6) | |
(defconst evaluation-hitpoints 100) | |
(defconst evaluation-distance 0) | |
(defconst max-food-escrow 0) | |
(defconst max-gold-escrow 800) | |
#end-if | |
#load-if-defined MAYAN-CIV | |
(defconst dark-age-villager 28) | |
(defconst villager-wonder-dark 32) | |
(defconst villager-wonder-feudal 34) | |
(defconst default-strategy 201) | |
(defconst pocket-strategy 202) | |
(defconst default-unit archer) | |
(defconst unique-unit-food 0) | |
(defconst default-flush-unit archer) | |
(defconst no-gold-flush-unit skirmisher) | |
(defconst default-ranged archer) | |
(defconst pocket-unit my-unique-unit-line) | |
(defconst get-lightcav 0) | |
(defconst scout-unit eagle-warrior-line) | |
(defconst military-level-flush 2) | |
(defconst military-level-flush-aggressive 1) | |
(defconst allow-forward-castle 0) | |
(defconst sling-time 600) | |
(defconst sling-number 100) | |
(defconst sling-two 0) | |
(defconst blot-size 0) | |
(defconst villager-barracks 3) | |
(defconst villager-stable 3) | |
(defconst villager-archery-range 14) | |
(defconst villager-monastery 15) | |
(defconst villager-town-center 15) | |
(defconst villager-castle 4) | |
(defconst villager-mining-camp 14) | |
(defconst villager-siege-workshop 12) | |
(defconst villager-market 17) | |
(defconst number-barracks 7) | |
(defconst number-stables 0) | |
(defconst number-archery-ranges 7) | |
(defconst tc-boom-monastery 3) | |
(defconst farm-count 14) | |
(defconst pidm-food 0) | |
(defconst pidm-wood 47) | |
(defconst pidm-gold 48) | |
(defconst pidm-stone 5) | |
(defconst pidm-food2 26) | |
(defconst pidm-wood2 34) | |
(defconst pidm-gold2 35) | |
(defconst pidm-stone2 5) | |
(defconst uu-food 36) | |
(defconst uu-wood 44) | |
(defconst uu-gold 16) | |
(defconst uu-stone 4) | |
(defconst uu-food2 33) | |
(defconst uu-wood2 39) | |
(defconst uu-gold2 23) | |
(defconst uu-stone2 4) | |
(defconst ci-uu-switch-food 28) | |
(defconst ci-uu-switch-wood 38) | |
(defconst ci-uu-switch-gold 28) | |
(defconst ci-uu-switch-stone 6) | |
(defconst evaluation-hitpoints 0) | |
(defconst evaluation-distance 100) | |
(defconst max-food-escrow 500) | |
(defconst max-gold-escrow 0) | |
#end-if | |
#load-if-defined MONGOL-CIV | |
(defconst dark-age-villager 28) | |
(defconst villager-wonder-dark 32) | |
(defconst villager-wonder-feudal 34) | |
(defconst default-strategy 200) | |
(defconst pocket-strategy 202) | |
(defconst default-unit knight) | |
(defconst default-flush-unit scout-cavalry) | |
(defconst no-gold-flush-unit scout-cavalry) | |
(defconst unique-unit-food 0) | |
(defconst default-ranged cavalry-archer) | |
(defconst pocket-unit my-unique-unit-line) | |
(defconst get-lightcav 1) | |
(defconst scout-unit scout-cavalry-line) | |
(defconst military-level-flush 1) | |
(defconst military-level-flush-aggressive 0) | |
(defconst allow-forward-castle 0) | |
(defconst sling-time 230) | |
(defconst sling-number 50) | |
(defconst sling-two 0) | |
(defconst blot-size 0) | |
(defconst villager-barracks 14) | |
(defconst villager-stable 3) | |
(defconst villager-archery-range 14) | |
(defconst villager-monastery 7) | |
(defconst villager-town-center 8) | |
(defconst villager-castle 3) | |
(defconst villager-mining-camp 14) | |
(defconst villager-siege-workshop 8) | |
(defconst villager-market 17) | |
(defconst number-barracks 6) | |
(defconst number-stables 5) | |
(defconst number-archery-ranges 7) | |
(defconst tc-boom-monastery 3) | |
(defconst farm-count 14) | |
(defconst pidm-food 0) | |
(defconst pidm-wood 30) | |
(defconst pidm-gold 65) | |
(defconst pidm-stone 5) | |
(defconst pidm-food2 26) | |
(defconst pidm-wood2 34) | |
(defconst pidm-gold2 35) | |
(defconst pidm-stone2 5) | |
(defconst uu-food 36) | |
(defconst uu-wood 44) | |
(defconst uu-gold 16) | |
(defconst uu-stone 4) | |
(defconst uu-food2 30) | |
(defconst uu-wood2 36) | |
(defconst uu-gold2 28) | |
(defconst uu-stone2 6) | |
(defconst ci-uu-switch-food 35) | |
(defconst ci-uu-switch-wood 33) | |
(defconst ci-uu-switch-gold 26) | |
(defconst ci-uu-switch-stone 6) | |
(defconst evaluation-hitpoints 0) | |
(defconst evaluation-distance 100) | |
(defconst max-food-escrow 1100) | |
(defconst max-gold-escrow 675) | |
#end-if | |
#load-if-defined PERSIAN-CIV | |
(defconst dark-age-villager 30) | |
(defconst villager-wonder-dark 33) | |
(defconst villager-wonder-feudal 35) | |
(defconst default-strategy 201) | |
(defconst pocket-strategy 201) | |
(defconst default-unit knight) | |
(defconst default-flush-unit scout-cavalry) | |
(defconst no-gold-flush-unit scout-cavalry) | |
(defconst unique-unit-food 0) | |
(defconst default-ranged archer) | |
(defconst pocket-unit knight) | |
(defconst get-lightcav 1) | |
(defconst scout-unit scout-cavalry-line) | |
(defconst military-level-flush 1) | |
(defconst military-level-flush-aggressive 0) | |
(defconst allow-forward-castle 1) | |
(defconst sling-time 240) | |
(defconst sling-number 60) | |
(defconst sling-two 0) | |
(defconst blot-size 1) | |
(defconst villager-barracks 7) | |
(defconst villager-stable 3) | |
(defconst villager-archery-range 16) | |
(defconst villager-monastery 12) | |
(defconst villager-town-center 18) | |
(defconst villager-castle 5) | |
(defconst villager-mining-camp 14) | |
(defconst villager-siege-workshop 7) | |
(defconst villager-market 17) | |
(defconst number-barracks 4) | |
(defconst number-stables 6) | |
(defconst number-archery-ranges 7) | |
(defconst tc-boom-monastery 2) | |
(defconst farm-count 14) | |
(defconst pidm-food 37) | |
(defconst pidm-wood 0) | |
(defconst pidm-gold 58) | |
(defconst pidm-stone 5) | |
(defconst pidm-food2 34) | |
(defconst pidm-wood2 28) | |
(defconst pidm-gold2 33) | |
(defconst pidm-stone2 5) | |
(defconst uu-food 36) | |
(defconst uu-wood 44) | |
(defconst uu-gold 16) | |
(defconst uu-stone 4) | |
(defconst uu-food2 43) | |
(defconst uu-wood2 24) | |
(defconst uu-gold2 29) | |
(defconst uu-stone2 4) | |
(defconst ci-uu-switch-food 40) | |
(defconst ci-uu-switch-wood 28) | |
(defconst ci-uu-switch-gold 20) | |
(defconst ci-uu-switch-stone 12) | |
(defconst evaluation-hitpoints 0) | |
(defconst evaluation-distance 100) | |
(defconst max-food-escrow 1600) | |
(defconst max-gold-escrow 1200) | |
#end-if | |
#load-if-defined SARACEN-CIV | |
(defconst dark-age-villager 30) | |
(defconst villager-wonder-dark 33) | |
(defconst villager-wonder-feudal 35) | |
(defconst default-strategy 200) | |
(defconst pocket-strategy 201) | |
#load-if-not-defined POST-IMPERIAL-AGE-START | |
(defconst default-unit knight) | |
#else | |
(defconst default-unit my-unique-unit-line) | |
#end-if | |
(defconst unique-unit-food 135) | |
(defconst default-flush-unit scout-cavalry) | |
(defconst no-gold-flush-unit scout-cavalry) | |
(defconst default-ranged archer) | |
(defconst pocket-unit archer) | |
(defconst get-lightcav 1) | |
(defconst scout-unit scout-cavalry-line) | |
(defconst military-level-flush 1) | |
(defconst military-level-flush-aggressive 0) | |
(defconst allow-forward-castle 1) | |
(defconst sling-time 190) | |
(defconst sling-number 25) | |
(defconst sling-two 1) | |
(defconst blot-size 1) | |
(defconst villager-barracks 9) | |
(defconst villager-stable 3) | |
(defconst villager-archery-range 9) | |
(defconst villager-monastery 15) | |
(defconst villager-town-center 18) | |
(defconst villager-castle 9) | |
(defconst villager-mining-camp 14) | |
(defconst villager-siege-workshop 16) | |
(defconst villager-market 9) | |
(defconst number-barracks 6) | |
(defconst number-stables 9) | |
(defconst number-archery-ranges 8) | |
(defconst tc-boom-monastery 2) | |
(defconst farm-count 14) | |
(defconst pidm-food 10) | |
(defconst pidm-wood 10) | |
(defconst pidm-gold 75) | |
(defconst pidm-stone 5) | |
(defconst pidm-food2 34) | |
(defconst pidm-wood2 28) | |
(defconst pidm-gold2 33) | |
(defconst pidm-stone2 5) | |
(defconst uu-food 36) | |
(defconst uu-wood 44) | |
(defconst uu-gold 16) | |
(defconst uu-stone 4) | |
(defconst uu-food2 30) | |
(defconst uu-wood2 36) | |
(defconst uu-gold2 28) | |
(defconst uu-stone2 6) | |
(defconst ci-uu-switch-food 33) | |
(defconst ci-uu-switch-wood 33) | |
(defconst ci-uu-switch-gold 28) | |
(defconst ci-uu-switch-stone 6) | |
(defconst evaluation-hitpoints 100) | |
(defconst evaluation-distance 0) | |
(defconst max-food-escrow 600) | |
(defconst max-gold-escrow 500) | |
#end-if | |
#load-if-defined SPANISH-CIV | |
(defconst dark-age-villager 30) | |
(defconst villager-wonder-dark 33) | |
(defconst villager-wonder-feudal 35) | |
(defconst default-strategy 201) | |
(defconst pocket-strategy 201) | |
(defconst default-unit knight) | |
(defconst unique-unit-food 110) | |
(defconst default-flush-unit skirmisher) | |
(defconst no-gold-flush-unit skirmisher) | |
(defconst default-ranged cavalry-archer) | |
(defconst pocket-unit knight) | |
(defconst get-lightcav 1) | |
(defconst scout-unit scout-cavalry-line) | |
(defconst military-level-flush 1) | |
(defconst military-level-flush-aggressive 0) | |
(defconst allow-forward-castle 0) | |
(defconst sling-time 600) | |
(defconst sling-number 100) | |
(defconst sling-two 0) | |
(defconst blot-size 1) | |
(defconst villager-barracks 14) | |
(defconst villager-stable 3) | |
(defconst villager-archery-range 16) | |
(defconst villager-monastery 12) | |
(defconst villager-town-center 18) | |
(defconst villager-castle 5) | |
(defconst villager-mining-camp 14) | |
(defconst villager-siege-workshop 16) | |
(defconst villager-market 17) | |
(defconst number-barracks 8) | |
(defconst number-stables 6) | |
(defconst number-archery-ranges 4) | |
(defconst tc-boom-monastery 2) | |
(defconst farm-count 14) | |
(defconst pidm-food 45) | |
(defconst pidm-wood 0) | |
(defconst pidm-gold 50) | |
(defconst pidm-stone 5) | |
(defconst pidm-food2 34) | |
(defconst pidm-wood2 28) | |
(defconst pidm-gold2 33) | |
(defconst pidm-stone2 5) | |
(defconst uu-food 36) | |
(defconst uu-wood 44) | |
(defconst uu-gold 16) | |
(defconst uu-stone 4) | |
(defconst uu-food2 42) | |
(defconst uu-wood2 24) | |
(defconst uu-gold2 28) | |
(defconst uu-stone2 6) | |
(defconst ci-uu-switch-food 42) | |
(defconst ci-uu-switch-wood 24) | |
(defconst ci-uu-switch-gold 28) | |
(defconst ci-uu-switch-stone 6) | |
(defconst evaluation-hitpoints 0) | |
(defconst evaluation-distance 100) | |
(defconst max-food-escrow 1200) | |
(defconst max-gold-escrow 600) | |
#end-if | |
#load-if-defined TEUTONIC-CIV | |
(defconst dark-age-villager 29) | |
(defconst villager-wonder-dark 32) | |
(defconst villager-wonder-feudal 34) | |
(defconst default-strategy 201) | |
(defconst pocket-strategy 201) | |
(defconst default-unit knight) | |
(defconst unique-unit-food 0) | |
(defconst default-flush-unit skirmisher) | |
(defconst no-gold-flush-unit skirmisher) | |
(defconst default-ranged archer) | |
(defconst pocket-unit knight) | |
(defconst get-lightcav 0) | |
(defconst scout-unit scout-cavalry-line) | |
(defconst military-level-flush 1) | |
(defconst military-level-flush-aggressive 0) | |
(defconst allow-forward-castle 0) | |
(defconst sling-time 600) | |
(defconst sling-number 100) | |
(defconst sling-two 0) | |
(defconst blot-size 1) | |
(defconst villager-barracks 14) | |
(defconst villager-stable 3) | |
(defconst villager-archery-range 16) | |
(defconst villager-monastery 12) | |
(defconst villager-town-center 18) | |
(defconst villager-castle 5) | |
(defconst villager-mining-camp 14) | |
(defconst villager-siege-workshop 7) | |
(defconst villager-market 17) | |
(defconst number-barracks 8) | |
(defconst number-stables 6) | |
(defconst number-archery-ranges 4) | |
(defconst tc-boom-monastery 2) | |
(defconst farm-count 16) | |
(defconst pidm-food 45) | |
(defconst pidm-wood 0) | |
(defconst pidm-gold 50) | |
(defconst pidm-stone 5) | |
(defconst pidm-food2 34) | |
(defconst pidm-wood2 28) | |
(defconst pidm-gold2 33) | |
(defconst pidm-stone2 5) | |
(defconst uu-food 36) | |
(defconst uu-wood 36) | |
(defconst uu-gold 24) | |
(defconst uu-stone 4) | |
(defconst uu-food2 42) | |
(defconst uu-wood2 24) | |
(defconst uu-gold2 28) | |
(defconst uu-stone2 6) | |
(defconst ci-uu-switch-food 42) | |
(defconst ci-uu-switch-wood 24) | |
(defconst ci-uu-switch-gold 28) | |
(defconst ci-uu-switch-stone 6) | |
(defconst evaluation-hitpoints 0) | |
(defconst evaluation-distance 100) | |
(defconst max-food-escrow 1200) | |
(defconst max-gold-escrow 600) | |
(defconst farm-wood 40) | |
#else | |
(defconst farm-wood 60) | |
#end-if | |
#load-if-defined TURKISH-CIV | |
(defconst dark-age-villager 30) | |
(defconst villager-wonder-dark 33) | |
(defconst villager-wonder-feudal 35) | |
(defconst default-strategy 201) | |
(defconst pocket-strategy 201) | |
(defconst default-unit knight) | |
(defconst unique-unit-food 110) | |
(defconst default-flush-unit scout-cavalry) | |
(defconst no-gold-flush-unit scout-cavalry) | |
#load-if-not-defined POST-IMPERIAL-AGE-START | |
(defconst default-ranged archer) | |
#else | |
(defconst default-ranged cavalry-archer) | |
#end-if | |
(defconst pocket-unit knight) | |
(defconst get-lightcav 1) | |
(defconst scout-unit scout-cavalry-line) | |
(defconst military-level-flush 1) | |
(defconst military-level-flush-aggressive 0) | |
(defconst allow-forward-castle 1) | |
(defconst sling-time 220) | |
(defconst sling-number 35) | |
(defconst sling-two 1) | |
(defconst blot-size 1) | |
(defconst villager-barracks 14) | |
(defconst villager-stable 3) | |
(defconst villager-archery-range 3) | |
(defconst villager-monastery 7) | |
(defconst villager-town-center 8) | |
(defconst villager-castle 5) | |
(defconst villager-mining-camp 14) | |
(defconst villager-siege-workshop 16) | |
(defconst villager-market 17) | |
(defconst number-barracks 6) | |
(defconst number-stables 7) | |
(defconst number-archery-ranges 4) | |
(defconst tc-boom-monastery 2) | |
(defconst farm-count 14) | |
(defconst pidm-food 45) | |
(defconst pidm-wood 0) | |
(defconst pidm-gold 50) | |
(defconst pidm-stone 5) | |
(defconst pidm-food2 42) | |
(defconst pidm-wood2 20) | |
(defconst pidm-gold2 33) | |
(defconst pidm-stone2 5) | |
(defconst uu-food 36) | |
(defconst uu-wood 44) | |
(defconst uu-gold 16) | |
(defconst uu-stone 4) | |
(defconst uu-food2 40) | |
(defconst uu-wood2 26) | |
(defconst uu-gold2 28) | |
(defconst uu-stone2 6) | |
(defconst ci-uu-switch-food 42) | |
(defconst ci-uu-switch-wood 24) | |
(defconst ci-uu-switch-gold 28) | |
(defconst ci-uu-switch-stone 6) | |
(defconst evaluation-hitpoints 0) | |
(defconst evaluation-distance 100) | |
(defconst max-food-escrow 850) | |
(defconst max-gold-escrow 750) | |
#end-if | |
#load-if-defined VIKING-CIV | |
(defconst dark-age-villager 30) | |
(defconst villager-wonder-dark 33) | |
(defconst villager-wonder-feudal 35) | |
(defconst default-strategy 201) | |
(defconst pocket-strategy 202) | |
(defconst default-unit militiaman-line) | |
(defconst unique-unit-food 115) | |
(defconst default-flush-unit archer) | |
(defconst no-gold-flush-unit skirmisher) | |
(defconst default-ranged archer) | |
(defconst pocket-unit archer) | |
(defconst get-lightcav 0) | |
(defconst scout-unit scout-cavalry-line) | |
(defconst military-level-flush 1) | |
(defconst military-level-flush-aggressive 0) | |
(defconst allow-forward-castle 1) | |
(defconst sling-time 600) | |
(defconst sling-number 95) | |
(defconst sling-two 0) | |
(defconst blot-size 1) | |
(defconst villager-barracks 3) | |
(defconst villager-stable 3) | |
(defconst villager-archery-range 9) | |
(defconst villager-monastery 9) | |
(defconst villager-town-center 7) | |
(defconst villager-castle 5) | |
(defconst villager-mining-camp 14) | |
(defconst villager-siege-workshop 16) | |
(defconst villager-market 17) | |
(defconst number-barracks 9) | |
(defconst number-stables 1) | |
(defconst number-archery-ranges 7) | |
(defconst tc-boom-monastery 3) | |
(defconst farm-count 14) | |
(defconst pidm-food 30) | |
(defconst pidm-wood 10) | |
(defconst pidm-gold 60) | |
(defconst pidm-stone 0) | |
(defconst pidm-food2 34) | |
(defconst pidm-wood2 28) | |
(defconst pidm-gold2 33) | |
(defconst pidm-stone2 5) | |
(defconst uu-food 36) | |
(defconst uu-wood 44) | |
(defconst uu-gold 16) | |
(defconst uu-stone 4) | |
(defconst uu-food2 38) | |
(defconst uu-wood2 28) | |
(defconst uu-gold2 28) | |
(defconst uu-stone2 6) | |
(defconst ci-uu-switch-food 46) | |
(defconst ci-uu-switch-wood 26) | |
(defconst ci-uu-switch-gold 22) | |
(defconst ci-uu-switch-stone 6) | |
(defconst evaluation-hitpoints 100) | |
(defconst evaluation-distance 0) | |
(defconst max-food-escrow 1300) | |
(defconst max-gold-escrow 550) | |
#end-if | |
#load-if-defined INCAN-CIV | |
(defconst dark-age-villager 29) | |
(defconst villager-wonder-dark 32) | |
(defconst villager-wonder-feudal 34) | |
(defconst default-strategy 200) | |
(defconst pocket-strategy 202) | |
(defconst default-unit archer) | |
(defconst unique-unit-food 110) | |
(defconst default-flush-unit archer) | |
(defconst no-gold-flush-unit skirmisher) | |
(defconst default-ranged archer) | |
(defconst pocket-unit eagle-warrior) | |
(defconst get-lightcav 0) | |
(defconst scout-unit eagle-warrior-line) | |
(defconst military-level-flush 1) | |
(defconst military-level-flush-aggressive 0) | |
(defconst allow-forward-castle 0) | |
(defconst sling-time 600) | |
(defconst sling-number 100) | |
(defconst sling-two 0) | |
(defconst blot-size 1) | |
(defconst villager-barracks 3) | |
(defconst villager-stable 3) | |
(defconst villager-archery-range 9) | |
(defconst villager-monastery 7) | |
(defconst villager-town-center 16) | |
(defconst villager-castle 5) | |
(defconst villager-mining-camp 14) | |
(defconst villager-siege-workshop 16) | |
(defconst villager-market 17) | |
(defconst number-barracks 9) | |
(defconst number-stables 1) | |
(defconst number-archery-ranges 7) | |
(defconst tc-boom-monastery 2) | |
(defconst farm-count 14) | |
(defconst pidm-food 30) | |
(defconst pidm-wood 10) | |
(defconst pidm-gold 60) | |
(defconst pidm-stone 0) | |
(defconst pidm-food2 34) | |
(defconst pidm-wood2 28) | |
(defconst pidm-gold2 33) | |
(defconst pidm-stone2 5) | |
(defconst uu-food 36) | |
(defconst uu-wood 36) | |
(defconst uu-gold 24) | |
(defconst uu-stone 4) | |
(defconst uu-food2 41) | |
(defconst uu-wood2 27) | |
(defconst uu-gold2 28) | |
(defconst uu-stone2 4) | |
(defconst ci-uu-switch-food 36) | |
(defconst ci-uu-switch-wood 32) | |
(defconst ci-uu-switch-gold 26) | |
(defconst ci-uu-switch-stone 6) | |
(defconst evaluation-hitpoints 100) | |
(defconst evaluation-distance 0) | |
(defconst max-food-escrow 1300) | |
(defconst max-gold-escrow 550) | |
#end-if | |
#load-if-defined INDIAN-CIV | |
(defconst dark-age-villager 30) | |
(defconst villager-wonder-dark 33) | |
(defconst villager-wonder-feudal 35) | |
(defconst default-strategy 201) | |
(defconst pocket-strategy 201) | |
(defconst default-unit skirmisher) | |
(defconst unique-unit-food 160) | |
(defconst default-flush-unit skirmisher) | |
(defconst no-gold-flush-unit skirmisher) | |
(defconst default-ranged archer) | |
(defconst pocket-unit knight) | |
(defconst get-lightcav 1) | |
(defconst scout-unit scout-cavalry-line) | |
(defconst military-level-flush 1) | |
(defconst military-level-flush-aggressive 0) | |
(defconst allow-forward-castle 1) | |
(defconst sling-time 195) | |
(defconst sling-number 60) | |
(defconst sling-two 1) | |
(defconst blot-size 1) | |
(defconst villager-barracks 9) | |
(defconst villager-stable 3) | |
(defconst villager-archery-range 9) | |
(defconst villager-monastery 7) | |
(defconst villager-town-center 18) | |
(defconst villager-castle 5) | |
(defconst villager-mining-camp 14) | |
(defconst villager-siege-workshop 16) | |
(defconst villager-market 17) | |
(defconst number-barracks 6) | |
(defconst number-stables 9) | |
(defconst number-archery-ranges 7) | |
(defconst tc-boom-monastery 3) | |
(defconst farm-count 14) | |
(defconst pidm-food 30) | |
(defconst pidm-wood 10) | |
(defconst pidm-gold 60) | |
(defconst pidm-stone 0) | |
(defconst pidm-food2 34) | |
(defconst pidm-wood2 28) | |
(defconst pidm-gold2 33) | |
(defconst pidm-stone2 5) | |
(defconst uu-food 36) | |
(defconst uu-wood 44) | |
(defconst uu-gold 16) | |
(defconst uu-stone 4) | |
(defconst uu-food2 38) | |
(defconst uu-wood2 28) | |
(defconst uu-gold2 28) | |
(defconst uu-stone2 6) | |
(defconst ci-uu-switch-food 42) | |
(defconst ci-uu-switch-wood 24) | |
(defconst ci-uu-switch-gold 28) | |
(defconst ci-uu-switch-stone 6) | |
(defconst evaluation-hitpoints 100) | |
(defconst evaluation-distance 0) | |
(defconst max-food-escrow 1300) | |
(defconst max-gold-escrow 550) | |
#end-if | |
#load-if-defined ITALIAN-CIV | |
(defconst dark-age-villager 30) | |
(defconst villager-wonder-dark 32) | |
(defconst villager-wonder-feudal 34) | |
(defconst default-strategy 201) | |
(defconst pocket-strategy 201) | |
(defconst default-unit archer) | |
(defconst unique-unit-food 115) | |
(defconst default-flush-unit archer) | |
(defconst no-gold-flush-unit skirmisher) | |
(defconst default-ranged archer) | |
(defconst pocket-unit knight) | |
(defconst get-lightcav 0) | |
(defconst scout-unit scout-cavalry-line) | |
(defconst military-level-flush 1) | |
(defconst military-level-flush-aggressive 0) | |
(defconst allow-forward-castle 0) | |
(defconst sling-time 600) | |
(defconst sling-number 100) | |
(defconst sling-two 0) | |
(defconst blot-size 1) | |
(defconst villager-barracks 12) | |
(defconst villager-stable 3) | |
(defconst villager-archery-range 9) | |
(defconst villager-monastery 7) | |
(defconst villager-town-center 18) | |
(defconst villager-castle 3) | |
(defconst villager-mining-camp 14) | |
(defconst villager-siege-workshop 16) | |
(defconst villager-market 17) | |
(defconst number-barracks 9) | |
(defconst number-stables 1) | |
(defconst number-archery-ranges 7) | |
(defconst tc-boom-monastery 2) | |
(defconst farm-count 14) | |
(defconst pidm-food 30) | |
(defconst pidm-wood 10) | |
(defconst pidm-gold 60) | |
(defconst pidm-stone 0) | |
(defconst pidm-food2 34) | |
(defconst pidm-wood2 28) | |
(defconst pidm-gold2 33) | |
(defconst pidm-stone2 5) | |
(defconst uu-food 36) | |
(defconst uu-wood 44) | |
(defconst uu-gold 16) | |
(defconst uu-stone 4) | |
(defconst uu-food2 38) | |
(defconst uu-wood2 28) | |
(defconst uu-gold2 28) | |
(defconst uu-stone2 6) | |
(defconst ci-uu-switch-food 38) | |
(defconst ci-uu-switch-wood 28) | |
(defconst ci-uu-switch-gold 28) | |
(defconst ci-uu-switch-stone 6) | |
(defconst evaluation-hitpoints 100) | |
(defconst evaluation-distance 0) | |
(defconst max-food-escrow 1300) | |
(defconst max-gold-escrow 550) | |
#end-if | |
#load-if-defined MAGYAR-CIV | |
(defconst dark-age-villager 30) | |
(defconst villager-wonder-dark 33) | |
(defconst villager-wonder-feudal 35) | |
(defconst default-strategy 200) | |
(defconst pocket-strategy 201) | |
(defconst default-unit knight) | |
(defconst unique-unit-food 130) | |
(defconst default-flush-unit scout-cavalry) | |
(defconst no-gold-flush-unit scout-cavalry) | |
#load-if-not-defined POST-IMPERIAL-AGE-START | |
(defconst default-ranged archer) | |
#else | |
(defconst default-ranged cavalry-archer) | |
#end-if | |
(defconst pocket-unit knight) | |
(defconst get-lightcav 0); uu instead | |
(defconst scout-unit scout-cavalry-line) | |
(defconst military-level-flush 1) | |
(defconst military-level-flush-aggressive 0) | |
(defconst allow-forward-castle 0) | |
(defconst sling-time 600) | |
(defconst sling-number 100) | |
(defconst sling-two 0) | |
(defconst blot-size 1) | |
(defconst villager-barracks 7) | |
(defconst villager-stable 3) | |
(defconst villager-archery-range 16) | |
(defconst villager-monastery 12) | |
(defconst villager-town-center 18) | |
(defconst villager-castle 12) | |
(defconst villager-mining-camp 14) | |
(defconst villager-siege-workshop 14) | |
(defconst villager-market 17) | |
(defconst number-barracks 8) | |
(defconst number-stables 6) | |
(defconst number-archery-ranges 4) | |
(defconst tc-boom-monastery 3) | |
(defconst farm-count 14) | |
(defconst pidm-food 30) | |
(defconst pidm-wood 10) | |
(defconst pidm-gold 60) | |
(defconst pidm-stone 0) | |
(defconst pidm-food2 34) | |
(defconst pidm-wood2 28) | |
(defconst pidm-gold2 33) | |
(defconst pidm-stone2 5) | |
(defconst uu-food 36) | |
(defconst uu-wood 36) | |
(defconst uu-gold 24) | |
(defconst uu-stone 4) | |
(defconst uu-food2 42) | |
(defconst uu-wood2 24) | |
(defconst uu-gold2 28) | |
(defconst uu-stone2 6) | |
(defconst ci-uu-switch-food 32) | |
(defconst ci-uu-switch-wood 36) | |
(defconst ci-uu-switch-gold 26) | |
(defconst ci-uu-switch-stone 6) | |
(defconst evaluation-hitpoints 100) | |
(defconst evaluation-distance 0) | |
(defconst max-food-escrow 1300) | |
(defconst max-gold-escrow 550) | |
#end-if | |
#load-if-defined SLAVIC-CIV | |
(defconst dark-age-villager 29) | |
(defconst villager-wonder-dark 32) | |
(defconst villager-wonder-feudal 34) | |
(defconst default-strategy 201) | |
(defconst pocket-strategy 202) | |
(defconst default-unit knight) | |
(defconst unique-unit-food 115) | |
(defconst default-flush-unit skirmisher) | |
(defconst no-gold-flush-unit skirmisher) | |
#load-if-not-defined DEATH-MATCH | |
(defconst default-ranged monk) | |
#else | |
(defconst default-ranged 0) | |
#end-if | |
(defconst pocket-unit scorpion) | |
(defconst get-lightcav 1) | |
(defconst scout-unit scout-cavalry-line) | |
(defconst military-level-flush 1) | |
(defconst military-level-flush-aggressive 0) | |
(defconst allow-forward-castle 0) | |
(defconst sling-time 600) | |
(defconst sling-number 100) | |
(defconst sling-two 0) | |
(defconst blot-size 1) | |
(defconst villager-barracks 2) | |
(defconst villager-stable 16) | |
(defconst villager-archery-range 16) | |
(defconst villager-monastery 6) | |
(defconst villager-town-center 16) | |
(defconst villager-castle 4) | |
(defconst villager-mining-camp 14) | |
(defconst villager-siege-workshop 6) | |
(defconst villager-market 17) | |
(defconst number-barracks 4) | |
(defconst number-stables 4) | |
(defconst number-archery-ranges 4) | |
(defconst tc-boom-monastery 2) | |
(defconst farm-count 14) | |
(defconst pidm-food 30) | |
(defconst pidm-wood 10) | |
(defconst pidm-gold 60) | |
(defconst pidm-stone 0) | |
(defconst pidm-food2 34) | |
(defconst pidm-wood2 24) | |
(defconst pidm-gold2 37) | |
(defconst pidm-stone2 5) | |
(defconst uu-food 36) | |
(defconst uu-wood 36) | |
(defconst uu-gold 24) | |
(defconst uu-stone 4) | |
(defconst uu-food2 36) | |
(defconst uu-wood2 31) | |
(defconst uu-gold2 30) | |
(defconst uu-stone2 3) | |
(defconst ci-uu-switch-food 42) | |
(defconst ci-uu-switch-wood 24) | |
(defconst ci-uu-switch-gold 28) | |
(defconst ci-uu-switch-stone 6) | |
(defconst evaluation-hitpoints 100) | |
(defconst evaluation-distance 0) | |
(defconst max-food-escrow 1300) | |
(defconst max-gold-escrow 550) | |
#end-if | |
#load-if-defined BYZANTINE-CIV | |
(defconst imp-food 667) | |
(defconst imp-gold 536) | |
(defconst imp-f2 517) | |
(defconst imp-g2 400) | |
#else | |
#load-if-defined ITALIAN-CIV | |
(defconst imp-food 900) | |
(defconst imp-gold 720) | |
(defconst imp-f2 730) | |
(defconst imp-g2 600) | |
#else | |
(defconst imp-food 1000) | |
(defconst imp-gold 800) | |
(defconst imp-f2 800) | |
(defconst imp-g2 650) | |
#end-if | |
#end-if | |
#load-if-defined POST-IMPERIAL-AGE-START | |
(defconst pop-house 20) | |
#else | |
(defconst pop-house 50) | |
#end-if | |
#load-if-defined DEATH-MATCH | |
(defconst housing-headroom1 40) | |
(defconst housing-headroom2 40) | |
(defconst camp-distance 45) | |
(defconst food-distance 0) | |
(defconst wood-distance -1) | |
#load-if-defined POST-IMPERIAL-AGE-START | |
(defconst market-time 420) | |
#else | |
(defconst market-time 900) | |
#end-if | |
(defconst number-markets 4) | |
(defconst number-blacksmiths 2) | |
(defconst mill-distance 15) | |
(defconst hunt-distance 0) | |
(defconst spread-interval 40) | |
(defconst home-exploration-time 30); deathmatch | |
(defconst special-attack-type2 town-center) | |
#else | |
(defconst housing-headroom1 3) | |
(defconst housing-headroom2 25) | |
(defconst camp-distance 15) | |
(defconst food-distance 25) | |
(defconst wood-distance 0) | |
(defconst market-time 2700) | |
(defconst number-blacksmiths 1) | |
(defconst number-markets 3) | |
#load-if-not-defined SCANDANAVIA-MAP | |
(defconst mill-distance 15) | |
(defconst hunt-distance 0) | |
#else | |
(defconst mill-distance 29) | |
(defconst hunt-distance 32) | |
#end-if | |
(defconst spread-interval 180) | |
#load-if-not-defined WONDER-RACE | |
(defconst home-exploration-time 420) | |
#else | |
(defconst home-exploration-time 32768) | |
#end-if | |
(defconst special-attack-type2 lumber-camp) | |
#end-if | |
#load-if-defined NOMAD-MAP | |
(defconst wood-distance2 -1) | |
#else | |
(defconst wood-distance2 30) | |
#end-if | |
#load-if-defined SALT-MARSH-MAP | |
(defconst dock-placement 1) | |
#else | |
(defconst dock-placement 0) | |
#end-if | |
#load-if-defined YUCATAN-MAP | |
(defconst max-warships 20) | |
#end-if | |
#load-if-defined HIGHLAND-MAP | |
(defconst max-warships 20) | |
#end-if | |
#load-if-not-defined HIGHLAND-MAP | |
#load-if-not-defined YUCATAN-MAP | |
(defconst max-warships 35) | |
#end-if | |
#end-if | |
#load-if-defined ARENA-MAP | |
(defconst camp-distance-tc 15) | |
#else | |
(defconst camp-distance-tc 22) | |
#end-if | |
#load-if-defined REGICIDE | |
#load-if-defined FORTRESS-MAP | |
(defconst lumber-delay 40) | |
#else | |
(defconst lumber-delay 180) | |
#end-if | |
#else | |
(defconst lumber-delay 180) | |
#end-if | |
#load-if-defined TINY-MAP | |
(defconst tsa-increment 6) | |
(defconst shorefishreq 50) | |
(defconst shorefishreq2 25) | |
(defconst deepfishreq 6) | |
(defconst deepfishreq2 3) | |
(defconst heavy-wood 7000) | |
(defconst max-trade-cart 22) | |
(defconst trade-distance 54) | |
#end-if | |
#load-if-defined SMALL-MAP | |
(defconst tsa-increment 8) | |
(defconst shorefishreq 100) | |
(defconst shorefishreq2 50) | |
(defconst deepfishreq 8) | |
(defconst deepfishreq2 4) | |
(defconst heavy-wood 8000) | |
(defconst max-trade-cart 28) | |
(defconst trade-distance 72) | |
#end-if | |
#load-if-defined MEDIUM-MAP | |
(defconst tsa-increment 10) | |
(defconst shorefishreq 150) | |
(defconst shorefishreq2 75) | |
(defconst deepfishreq 10) | |
(defconst deepfishreq2 5) | |
(defconst heavy-wood 10000) | |
(defconst max-trade-cart 35) | |
(defconst trade-distance 90) | |
#end-if | |
#load-if-defined NORMAL-MAP | |
(defconst tsa-increment 12) | |
(defconst shorefishreq 200) | |
(defconst shorefishreq2 100) | |
(defconst deepfishreq 12) | |
(defconst deepfishreq2 6) | |
(defconst heavy-wood 14000) | |
(defconst max-trade-cart 40) | |
(defconst trade-distance 120) | |
#end-if | |
#load-if-defined LARGE-MAP | |
(defconst tsa-increment 15) | |
(defconst shorefishreq 250) | |
(defconst shorefishreq2 125) | |
(defconst deepfishreq 14) | |
(defconst deepfishreq2 7) | |
(defconst heavy-wood 18000) | |
(defconst max-trade-cart 45) | |
(defconst trade-distance 150) | |
#end-if | |
#load-if-defined GIANT-MAP | |
(defconst tsa-increment 18) | |
(defconst shorefishreq 300) | |
(defconst shorefishreq2 150) | |
(defconst deepfishreq 16) | |
(defconst deepfishreq2 8) | |
(defconst heavy-wood 22000) | |
(defconst max-trade-cart 55) | |
(defconst trade-distance 200) | |
#end-if | |
#load-if-defined LUDIKRIS-MAP | |
(defconst tsa-increment 20) | |
(defconst shorefishreq 350) | |
(defconst shorefishreq2 175) | |
(defconst deepfishreq 18) | |
(defconst deepfishreq2 9) | |
(defconst heavy-wood 26000) | |
(defconst max-trade-cart 75) | |
(defconst trade-distance 400) | |
#end-if | |
#load-if-defined HIGHLAND-MAP | |
(defconst water-mixed 1000) | |
(defconst water-islands 1001) | |
#else | |
#load-if-defined TINY-MAP | |
(defconst water-mixed 1000) | |
(defconst water-islands 1001) | |
#end-if | |
#load-if-defined SMALL-MAP | |
(defconst water-mixed 2000) | |
(defconst water-islands 2001) | |
#end-if | |
#load-if-defined MEDIUM-MAP | |
(defconst water-mixed 4000) | |
(defconst water-islands 4001) | |
#end-if | |
#load-if-defined NORMAL-MAP | |
(defconst water-mixed 4000) | |
(defconst water-islands 4001) | |
#end-if | |
#load-if-defined LARGE-MAP | |
(defconst water-mixed 4000) | |
(defconst water-islands 4001) | |
#end-if | |
#load-if-defined GIANT-MAP | |
(defconst water-mixed 4000) | |
(defconst water-islands 4001) | |
#end-if | |
#load-if-defined LUDIKRIS-MAP | |
(defconst water-mixed 4000) | |
(defconst water-islands 4001) | |
#end-if | |
#end-if | |
#load-if-defined DIFFICULTY-EASIEST | |
(defconst wood-distance-farm 15) | |
#end-if | |
#load-if-defined DIFFICULTY-EASY | |
(defconst wood-distance-farm 12) | |
#end-if | |
#load-if-defined DIFFICULTY-MODERATE | |
(defconst wood-distance-farm 8) | |
#end-if | |
#load-if-defined DIFFICULTY-HARD | |
(defconst wood-distance-farm 7) | |
#end-if | |
#load-if-defined DIFFICULTY-HARDEST | |
(defconst wood-distance-farm 6) | |
#end-if | |
#load-if-not-defined TURBO-RANDOM-MAP | |
#load-if-not-defined POPULATION-CAP-25 | |
(defconst number-rams 4) | |
(defconst number-garrison-units 4) | |
#load-if-defined DIFFICULTY-EASIEST | |
(defconst villager-feudal 10) | |
(defconst villager-flush 10) | |
#end-if | |
#load-if-defined DIFFICULTY-EASY | |
(defconst villager-feudal 12) | |
(defconst villager-flush 11) | |
#end-if | |
#load-if-not-defined DIFFICULTY-EASIEST | |
#load-if-not-defined DIFFICULTY-EASY | |
#load-if-defined LOW-RESOURCES-START | |
#load-if-defined DIFFICULTY-MODERATE | |
(defconst villager-flush 27) | |
(defconst villager-feudal 29) | |
#end-if | |
#load-if-defined DIFFICULTY-HARD | |
(defconst villager-flush 25) | |
(defconst villager-feudal 29) | |
#end-if | |
#load-if-defined DIFFICULTY-HARDEST | |
(defconst villager-flush 24) | |
(defconst villager-feudal 28) | |
#end-if | |
#end-if | |
#load-if-defined MEDIUM-RESOURCES-START | |
(defconst villager-flush 20) | |
(defconst villager-feudal 24) | |
#end-if | |
#load-if-defined HIGH-RESOURCES-START | |
(defconst villager-flush 15) | |
(defconst villager-feudal 16) | |
#end-if | |
#end-if ;NOT EASY | |
#end-if ;NOT EASIEST | |
#else | |
(defconst number-rams 3) | |
(defconst number-garrison-units 1) | |
(defconst villager-feudal 24) | |
(defconst villager-flush 24) | |
#end-if ; = POP25 | |
#else ; = TURBO | |
#load-if-not-defined POPULATION-CAP-25 | |
(defconst number-rams 4) | |
(defconst number-garrison-units 4) | |
#else | |
(defconst number-rams 3) | |
(defconst number-garrison-units 1) | |
#end-if | |
(defconst villager-flush 15) | |
(defconst villager-feudal 16) | |
#end-if | |
#load-if-defined GOLD-RUSH-MAP | |
#load-if-defined TINY-MAP | |
(defconst castle-age-camp-distance 48); high camp distance to reach center gold | |
#end-if | |
#load-if-defined SMALL-MAP | |
(defconst castle-age-camp-distance 48) | |
#end-if | |
#load-if-defined MEDIUM-MAP | |
(defconst castle-age-camp-distance 64) | |
#end-if | |
#load-if-defined NORMAL-MAP | |
(defconst castle-age-camp-distance 90) | |
#end-if | |
#load-if-defined LARGE-MAP | |
(defconst castle-age-camp-distance 124) | |
#end-if | |
#load-if-defined GIANT-MAP | |
(defconst castle-age-camp-distance 124) | |
#end-if | |
#load-if-defined LUDIKRIS-MAP | |
(defconst castle-age-camp-distance 240) | |
#end-if | |
#else | |
(defconst castle-age-camp-distance 35) | |
#end-if ; not gold-rush-map | |
(defconst scorpion-gold-min 170) | |
(defconst villager-coinage 60) | |
(defconst safe-town 45) | |
#load-if-defined POPULATION-CAP-25 | |
(defconst max-fleet 20) | |
(defconst twenty-five-percent-pop 6) | |
(defconst thirty-percent-pop 7) | |
(defconst fourty-percent-pop 10) | |
(defconst sixty-percent-pop 15) | |
(defconst seventy-five-percent-pop 19) | |
(defconst eighty-five-percent-pop 21) | |
#load-if-defined DIFFICULTY-EASIEST | |
(defconst max-civ 4) | |
#end-if | |
#load-if-defined DIFFICULTY-EASY | |
(defconst max-civ 6) | |
#end-if | |
#load-if-defined DIFFICULTY-MODERATE | |
(defconst max-civ 8) | |
#end-if | |
#load-if-defined DIFFICULTY-HARD | |
(defconst max-civ 10) | |
#end-if | |
#load-if-defined DIFFICULTY-HARDEST | |
(defconst max-civ 12) | |
#end-if | |
(defconst max-civ-pop 20) | |
(defconst del-civ-pop 24) | |
(defconst max-pop 25) | |
(defconst tc-level-one 1) | |
(defconst tc-level-two 1) | |
(defconst tc-level-three 1) | |
(defconst tc-level-four 1) | |
(defconst tc-level-five 1) | |
(defconst low-min-number-upgrade 1) | |
(defconst mid-min-number-upgrade 2) | |
(defconst high-min-number-upgrade 3) | |
(defconst max-trade-pop 0) | |
#end-if | |
#load-if-defined POPULATION-CAP-50 | |
(defconst max-fleet 30) | |
(defconst twenty-five-percent-pop 13) | |
(defconst thirty-percent-pop 15) | |
(defconst fourty-percent-pop 20) | |
(defconst sixty-percent-pop 30) | |
(defconst seventy-five-percent-pop 38) | |
(defconst eighty-five-percent-pop 42) | |
#load-if-defined DIFFICULTY-EASIEST | |
(defconst max-civ 4) | |
#end-if | |
#load-if-defined DIFFICULTY-EASY | |
(defconst max-civ 12) | |
#end-if | |
#load-if-defined DIFFICULTY-MODERATE | |
(defconst max-civ 18) | |
#end-if | |
#load-if-defined DIFFICULTY-HARD | |
(defconst max-civ 24) | |
#end-if | |
#load-if-defined DIFFICULTY-HARDEST | |
(defconst max-civ 28) | |
#end-if | |
(defconst max-civ-pop 45) | |
(defconst del-civ-pop 48) | |
(defconst max-pop 50) | |
(defconst tc-level-one 1) | |
(defconst tc-level-two 1) | |
(defconst tc-level-three 1) | |
(defconst tc-level-four 2) | |
(defconst tc-level-five 2) | |
(defconst low-min-number-upgrade 1) | |
(defconst mid-min-number-upgrade 3) | |
(defconst high-min-number-upgrade 5) | |
(defconst max-trade-pop 0) | |
#end-if | |
#load-if-defined POPULATION-CAP-75 | |
(defconst max-fleet 40) | |
(defconst twenty-five-percent-pop 19) | |
(defconst thirty-percent-pop 22) | |
(defconst fourty-percent-pop 30) | |
(defconst sixty-percent-pop 45) | |
(defconst seventy-five-percent-pop 57) | |
(defconst eighty-five-percent-pop 64) | |
#load-if-defined DIFFICULTY-EASIEST | |
(defconst max-civ 5) | |
#end-if | |
#load-if-defined DIFFICULTY-EASY | |
(defconst max-civ 12) | |
#end-if | |
#load-if-defined DIFFICULTY-MODERATE | |
(defconst max-civ 22) | |
#end-if | |
#load-if-defined DIFFICULTY-HARD | |
(defconst max-civ 35) | |
#end-if | |
#load-if-defined DIFFICULTY-HARDEST | |
(defconst max-civ 50) | |
#end-if | |
(defconst max-civ-pop 65) | |
(defconst del-civ-pop 72) | |
(defconst max-pop 75) | |
(defconst tc-level-one 1) | |
(defconst tc-level-two 1) | |
(defconst tc-level-three 1) | |
(defconst tc-level-four 2) | |
(defconst tc-level-five 2) | |
(defconst low-min-number-upgrade 2) | |
(defconst mid-min-number-upgrade 4) | |
(defconst high-min-number-upgrade 6) | |
(defconst max-trade-pop 7) | |
#end-if | |
#load-if-defined POPULATION-CAP-100 | |
(defconst max-fleet 40) | |
(defconst twenty-five-percent-pop 25) | |
(defconst thirty-percent-pop 30) | |
(defconst fourty-percent-pop 40) | |
(defconst sixty-percent-pop 60) | |
(defconst seventy-five-percent-pop 75) | |
(defconst eighty-five-percent-pop 85) | |
#load-if-defined DIFFICULTY-EASIEST | |
(defconst max-civ 5) | |
#end-if | |
#load-if-defined DIFFICULTY-EASY | |
(defconst max-civ 14) | |
#end-if | |
#load-if-defined DIFFICULTY-MODERATE | |
(defconst max-civ 26) | |
#end-if | |
#load-if-defined DIFFICULTY-HARD | |
(defconst max-civ 42) | |
#end-if | |
#load-if-defined DIFFICULTY-HARDEST | |
(defconst max-civ 65) | |
#end-if | |
(defconst max-civ-pop 95) | |
(defconst del-civ-pop 98) | |
(defconst max-pop 100) | |
(defconst tc-level-one 1) | |
(defconst tc-level-two 2) | |
(defconst tc-level-three 2) | |
(defconst tc-level-four 2) | |
(defconst tc-level-five 3) | |
(defconst low-min-number-upgrade 2) | |
(defconst mid-min-number-upgrade 5) | |
(defconst high-min-number-upgrade 8) | |
(defconst max-trade-pop 10) | |
#end-if | |
#load-if-defined POPULATION-CAP-125 | |
(defconst max-fleet 50) | |
(defconst twenty-five-percent-pop 32) | |
(defconst thirty-percent-pop 37) | |
(defconst fourty-percent-pop 50) | |
(defconst sixty-percent-pop 75) | |
(defconst seventy-five-percent-pop 94) | |
(defconst eighty-five-percent-pop 106) | |
#load-if-defined DIFFICULTY-EASIEST | |
(defconst max-civ 6) | |
#end-if | |
#load-if-defined DIFFICULTY-EASY | |
(defconst max-civ 16) | |
#end-if | |
#load-if-defined DIFFICULTY-MODERATE | |
(defconst max-civ 32) | |
#end-if | |
#load-if-defined DIFFICULTY-HARD | |
(defconst max-civ 54) | |
#end-if | |
#load-if-defined DIFFICULTY-HARDEST | |
(defconst max-civ 75) | |
#end-if | |
(defconst max-civ-pop 115) | |
(defconst del-civ-pop 123) | |
(defconst max-pop 125) | |
(defconst tc-level-one 1) | |
(defconst tc-level-two 2) | |
(defconst tc-level-three 2) | |
(defconst tc-level-four 3) | |
(defconst tc-level-five 3) | |
(defconst low-min-number-upgrade 3) | |
(defconst mid-min-number-upgrade 6) | |
(defconst high-min-number-upgrade 9) | |
(defconst max-trade-pop 12) | |
#end-if | |
#load-if-defined POPULATION-CAP-150 | |
(defconst max-fleet 56) | |
(defconst twenty-five-percent-pop 38) | |
(defconst thirty-percent-pop 45) | |
(defconst fourty-percent-pop 60) | |
(defconst sixty-percent-pop 90) | |
(defconst seventy-five-percent-pop 113) | |
(defconst eighty-five-percent-pop 128) | |
#load-if-defined DIFFICULTY-EASIEST | |
(defconst max-trade-pop 2) | |
(defconst max-civ 6) | |
#end-if | |
#load-if-defined DIFFICULTY-EASY | |
(defconst max-trade-pop 5) | |
(defconst max-civ 18) | |
#end-if | |
#load-if-defined DIFFICULTY-MODERATE | |
(defconst max-trade-pop 8) | |
(defconst max-civ 39) | |
#end-if | |
#load-if-defined DIFFICULTY-HARD | |
(defconst max-trade-pop 12) | |
(defconst max-civ 65) | |
#end-if | |
#load-if-defined DIFFICULTY-HARDEST | |
(defconst max-trade-pop 15) | |
(defconst max-civ 90) | |
#end-if | |
(defconst max-civ-pop 140) | |
(defconst del-civ-pop 148) | |
(defconst max-pop 150) | |
(defconst tc-level-one 1) | |
(defconst tc-level-two 2) | |
(defconst tc-level-three 3) | |
(defconst tc-level-four 3) | |
(defconst tc-level-five 4) | |
(defconst low-min-number-upgrade 4) | |
(defconst mid-min-number-upgrade 7) | |
(defconst high-min-number-upgrade 10) | |
#end-if | |
#load-if-defined POPULATION-CAP-175 | |
(defconst max-fleet 66) | |
(defconst twenty-five-percent-pop 44) | |
(defconst thirty-percent-pop 52) | |
(defconst fourty-percent-pop 70) | |
(defconst sixty-percent-pop 105) | |
(defconst seventy-five-percent-pop 131) | |
(defconst eighty-five-percent-pop 149) | |
#load-if-defined DIFFICULTY-EASIEST | |
(defconst max-trade-pop 2) | |
(defconst max-civ 7) | |
#end-if | |
#load-if-defined DIFFICULTY-EASY | |
(defconst max-trade-pop 5) | |
(defconst max-civ 20) | |
#end-if | |
#load-if-defined DIFFICULTY-MODERATE | |
(defconst max-trade-pop 11) | |
(defconst max-civ 43) | |
#end-if | |
#load-if-defined DIFFICULTY-HARD | |
(defconst max-trade-pop 24) | |
(defconst max-civ 80) | |
#end-if | |
#load-if-defined DIFFICULTY-HARDEST | |
(defconst max-trade-pop 35) | |
(defconst max-civ 110) | |
#end-if | |
(defconst max-civ-pop 165) | |
(defconst del-civ-pop 173) | |
(defconst max-pop 175) | |
(defconst tc-level-one 1) | |
(defconst tc-level-two 2) | |
(defconst tc-level-three 3) | |
(defconst tc-level-four 4) | |
(defconst tc-level-five 5) | |
(defconst low-min-number-upgrade 4) | |
(defconst mid-min-number-upgrade 8) | |
(defconst high-min-number-upgrade 12) | |
#end-if | |
#load-if-defined POPULATION-CAP-200 | |
#load-if-not-defined POPULATION-CAP-EXTENDED | |
(defconst max-fleet 75) | |
(defconst twenty-five-percent-pop 50) | |
(defconst thirty-percent-pop 60) | |
(defconst fourty-percent-pop 80) | |
(defconst sixty-percent-pop 120) | |
(defconst seventy-five-percent-pop 150) | |
(defconst eighty-five-percent-pop 170) | |
#load-if-defined DIFFICULTY-EASIEST | |
(defconst max-trade-pop 2) | |
(defconst max-civ 7) | |
#end-if | |
#load-if-defined DIFFICULTY-EASY | |
(defconst max-trade-pop 5) | |
(defconst max-civ 21) | |
#end-if | |
#load-if-defined DIFFICULTY-MODERATE | |
(defconst max-trade-pop 13) | |
(defconst max-civ 48) | |
#end-if | |
#load-if-defined DIFFICULTY-HARD | |
(defconst max-trade-pop 26) | |
(defconst max-civ 89) | |
#end-if | |
#load-if-defined DIFFICULTY-HARDEST | |
(defconst max-trade-pop 40) | |
(defconst max-civ 125) | |
#end-if | |
(defconst max-civ-pop 185) | |
#load-if-not-defined GOTHIC-CIV | |
(defconst del-civ-pop 196) | |
(defconst max-pop 200) | |
#else | |
(defconst del-civ-pop 206) | |
(defconst max-pop 210) | |
#end-if | |
#end-if | |
(defconst tc-level-one 1) | |
(defconst tc-level-two 2) | |
(defconst tc-level-three 3) | |
(defconst tc-level-four 4) | |
(defconst tc-level-five 5) | |
(defconst low-min-number-upgrade 4) | |
(defconst mid-min-number-upgrade 8) | |
(defconst high-min-number-upgrade 12) | |
#end-if | |
#load-if-defined POPULATION-CAP-225 | |
(defconst max-fleet 78) | |
(defconst twenty-five-percent-pop 56) | |
(defconst thirty-percent-pop 66) | |
(defconst fourty-percent-pop 90) | |
(defconst sixty-percent-pop 135) | |
(defconst seventy-five-percent-pop 169) | |
(defconst eighty-five-percent-pop 191) | |
(defconst tc-level-one 1) | |
(defconst tc-level-two 2) | |
(defconst tc-level-three 3) | |
(defconst tc-level-four 4) | |
(defconst tc-level-five 5) | |
(defconst low-min-number-upgrade 4) | |
(defconst mid-min-number-upgrade 8) | |
(defconst high-min-number-upgrade 12) | |
#load-if-defined DIFFICULTY-EASIEST | |
(defconst max-trade-pop 2) | |
(defconst max-civ 8) | |
#end-if | |
#load-if-defined DIFFICULTY-EASY | |
(defconst max-trade-pop 6) | |
(defconst max-civ 23) | |
#end-if | |
#load-if-defined DIFFICULTY-MODERATE | |
(defconst max-trade-pop 15) | |
(defconst max-civ 52) | |
#end-if | |
#load-if-defined DIFFICULTY-HARD | |
(defconst max-trade-pop 29) | |
(defconst max-civ 95) | |
#end-if | |
#load-if-defined DIFFICULTY-HARDEST | |
(defconst max-trade-pop 45) | |
(defconst max-civ 135) | |
#end-if | |
(defconst max-civ-pop 210) | |
(defconst del-civ-pop 221) | |
(defconst max-pop 225) | |
#end-if | |
#load-if-defined POPULATION-CAP-EXTENDED; Load for Pop >= 250 | |
#load-if-not-defined POPULATION-CAP-225 | |
(defconst max-fleet 90) | |
(defconst twenty-five-percent-pop 63) | |
(defconst thirty-percent-pop 75) | |
(defconst fourty-percent-pop 100) | |
(defconst sixty-percent-pop 150) | |
(defconst seventy-five-percent-pop 187) | |
(defconst eighty-five-percent-pop 213) | |
(defconst tc-level-one 1) | |
(defconst tc-level-two 2) | |
(defconst tc-level-three 3) | |
(defconst tc-level-four 4) | |
(defconst tc-level-five 5) | |
(defconst low-min-number-upgrade 4) | |
(defconst mid-min-number-upgrade 8) | |
(defconst high-min-number-upgrade 12) | |
#load-if-defined DIFFICULTY-EASIEST | |
(defconst max-trade-pop 2) | |
(defconst max-civ 8) | |
#end-if | |
#load-if-defined DIFFICULTY-EASY | |
(defconst max-trade-pop 8) | |
(defconst max-civ 25) | |
#end-if | |
#load-if-defined DIFFICULTY-MODERATE | |
(defconst max-trade-pop 18) | |
(defconst max-civ 58) | |
#end-if | |
#load-if-defined DIFFICULTY-HARD | |
(defconst max-trade-pop 33) | |
(defconst max-civ 103) | |
#end-if | |
#load-if-defined DIFFICULTY-HARDEST | |
(defconst max-trade-pop 60) | |
(defconst max-civ 140) | |
#end-if | |
(defconst max-civ-pop 220) | |
(defconst del-civ-pop 246) | |
(defconst max-pop 250) | |
#end-if | |
#end-if | |
#load-if-defined DIFFICULTY-EASIEST | |
(defconst ability-to-dodge 100) | |
(defconst ability-to-kite 100) | |
(defconst enable-patrol 0) | |
#end-if | |
#load-if-defined DIFFICULTY-EASY | |
(defconst ability-to-dodge 75) | |
(defconst ability-to-kite 75) | |
(defconst enable-patrol 0) | |
#end-if | |
#load-if-defined DIFFICULTY-MODERATE | |
(defconst ability-to-dodge 50) | |
(defconst ability-to-kite 50) | |
(defconst enable-patrol 0) | |
#end-if | |
#load-if-defined DIFFICULTY-HARD | |
(defconst ability-to-dodge 25) | |
(defconst ability-to-kite 25) | |
(defconst enable-patrol 1) | |
#end-if | |
#load-if-defined DIFFICULTY-HARDEST | |
(defconst ability-to-dodge 0) | |
(defconst ability-to-kite 0) | |
(defconst enable-patrol 1) | |
#end-if | |
#load-if-defined ARABIA-MAP | |
(defconst additional-town-center-placed-distance 14) | |
(defconst pop60-town-size 16) | |
(defconst pop90-town-size 20) | |
(defconst pop120-town-size 24) | |
#end-if | |
#load-if-defined ARENA-MAP | |
(defconst additional-town-center-placed-distance 16) | |
(defconst pop60-town-size 20) | |
(defconst pop90-town-size 24) | |
(defconst pop120-town-size 24) | |
#end-if | |
#load-if-not-defined ARENA-MAP | |
#load-if-not-defined ARABIA-MAP | |
(defconst additional-town-center-placed-distance 16) | |
(defconst pop60-town-size 20) | |
(defconst pop90-town-size 24) | |
(defconst pop120-town-size 28) | |
#end-if | |
#end-if | |
#load-if-not-defined INCAN-CIV | |
#load-if-not-defined FRANKISH-CIV | |
(defconst castle-stone 650) | |
#else ; Franks | |
(defconst castle-stone 488) | |
#end-if | |
#else ; Incas | |
(defconst castle-stone 553) | |
#end-if | |
#load-if-defined UP-POCKET-POSITION | |
(defconst scouting-type scout-mirror) | |
#else | |
(defconst scouting-type scout-flank) | |
#end-if | |
; The locations that are currently implemented are center, mirror, opposite, and enemy. | |
; Corner, border, and flank are the ones that aren't currently implemented. | |
(defrule | |
(true) | |
=> | |
(set-strategic-number sn-maximum-town-size 8) | |
(set-strategic-number sn-total-number-explorers 13);start with all civilians as explorer and turn them off when sheep or berries are found | |
(set-strategic-number sn-percent-civilian-explorers 100) | |
(set-strategic-number sn-minimum-civilian-explorers 12) | |
(set-strategic-number sn-number-explore-groups 1);explore with scouts | |
(set-difficulty-parameter ability-to-dodge-missiles ability-to-dodge); 0 = dodge | |
(set-difficulty-parameter ability-to-maintain-distance ability-to-kite); 0 = kite | |
(set-strategic-number sn-percent-enemy-sighted-response 100);fight with all men | |
(set-strategic-number sn-group-commander-selection-method 0) | |
(set-strategic-number sn-ignore-attack-group-under-attack 0) | |
(set-strategic-number sn-attack-group-size-randomness 0) | |
(set-strategic-number sn-scale-minimum-attack-group-size 0) | |
(set-strategic-number sn-scale-maximum-attack-group-size 0) | |
(set-strategic-number sn-group-leader-defense-distance 3); increases chance to make a few big groups instead of many medium sized ones | |
(disable-self) | |
) | |
(defrule | |
(true) | |
=> | |
(set-strategic-number sn-intelligent-gathering 1);drop resources when switched to another type | |
(set-strategic-number sn-retask-gather-amount 0);minimum amount to collect before allowed to switch | |
(set-strategic-number sn-camp-max-distance camp-distance);small distances at the start | |
(set-strategic-number sn-mill-max-distance mill-distance) | |
(set-strategic-number sn-cap-civilian-builders 100); maximum villagers that can be tasked as builder | |
(set-strategic-number sn-cap-civilian-explorers 100); maximum villagers that can be tasked as explorer | |
(set-strategic-number sn-maximum-hunt-drop-distance hunt-distance);Dont walk all over the map for resources | |
(set-strategic-number sn-maximum-food-drop-distance food-distance) | |
(set-strategic-number sn-maximum-wood-drop-distance wood-distance) | |
(set-strategic-number sn-maximum-stone-drop-distance 0) | |
(set-strategic-number sn-maximum-gold-drop-distance 0) | |
(set-strategic-number sn-blot-exploration-map 0);1=rexplore | |
(set-strategic-number sn-blot-size blot-size);15=default, 0 scouts w/ high LOS, 1 rest | |
(set-strategic-number sn-sentry-distance-variation 0) | |
(disable-self) | |
) | |
(defrule | |
(true) | |
=> | |
(set-strategic-number sn-group-form-distance 20) | |
(set-strategic-number sn-consecutive-idle-unit-limit 0) | |
(set-strategic-number sn-percent-attack-soldiers 100);attack with all men | |
(set-strategic-number sn-attack-winning-player 1);attacks the player with most points, irrelevant for us | |
(set-strategic-number sn-attack-winning-player-factor 10000) | |
(set-strategic-number sn-attack-intelligence 1);doesn't really avoid TC/castle fire, but better than nothing | |
(set-strategic-number sn-build-frequency 1);sometimes it helps when AI trys to build next to enemy and get interrupted | |
(set-strategic-number sn-number-build-attempts-before-skip 5) | |
(set-strategic-number sn-max-skips-per-attempt 5) | |
(set-strategic-number sn-coop-share-attacking 1); usually helps ally too late, but better than nothing | |
(set-strategic-number sn-coop-share-information 1); gives information to an AI ally | |
(set-strategic-number sn-garrison-rams 0) | |
(set-strategic-number sn-current-age dark) | |
(set-strategic-number sn-minimum-water-body-size-for-dock 999); don't build docks in small puddles | |
(disable-self) | |
) | |
(defrule | |
(true) | |
=> | |
(set-strategic-number sn-target-evaluation-in-progress 0) | |
(set-strategic-number sn-target-evaluation-boat 0) | |
(set-strategic-number sn-target-evaluation-rof 0) | |
(set-strategic-number sn-target-evaluation-continent 0) | |
(set-strategic-number sn-target-evaluation-siege-weapon 500);high value => siege vs buildings, soldier vs soldier | |
(set-strategic-number sn-target-evaluation-distance evaluation-distance) | |
(set-strategic-number sn-target-evaluation-time-kill-ratio 0) | |
(set-strategic-number sn-target-evaluation-hitpoints evaluation-hitpoints) | |
(set-strategic-number sn-target-evaluation-damage-capability 1) | |
(set-strategic-number sn-target-evaluation-kills 0) | |
(set-strategic-number sn-target-evaluation-randomness 0) | |
(set-strategic-number sn-target-evaluation-attack-attempts 0) | |
(set-strategic-number sn-target-evaluation-range -100) | |
(set-strategic-number sn-special-attack-type2 special-attack-type2) | |
(disable-self) | |
) | |
(defrule | |
(true) | |
=> | |
(set-strategic-number sn-minimum-attack-group-size 1) | |
(set-strategic-number sn-zero-priority-distance 450) | |
(set-strategic-number sn-attack-group-gather-spacing 5) | |
(set-strategic-number sn-do-not-scale-for-difficulty-level 1) | |
(set-strategic-number sn-initial-exploration-required 0); ! | |
(set-strategic-number sn-gather-defense-units 1) | |
(set-strategic-number sn-ignore-tower-elevation 1) | |
(set-goal escrow-purpose-goal 0) | |
(generate-random-number 100) | |
(enable-timer civ-explore-timer 150) | |
(enable-timer attack-timer 1) | |
(enable-timer spread-military-timer 220) | |
(enable-timer one-minute-timer 60) | |
(disable-self) | |
) | |
(defrule | |
(true) | |
=> | |
(set-strategic-number sn-task-ungrouped-soldiers 0); spread military 0=no,1=yes | |
(set-strategic-number sn-forage-defend-priority 1) | |
(set-strategic-number sn-gold-defend-priority 1) | |
(set-strategic-number sn-stone-defend-priority 1) | |
(set-strategic-number sn-livestock-defend-priority 1) | |
(set-goal reset 0) | |
(set-goal control-goal 0); secondary unit | |
(set-goal enemy-goal 0); enemy strategy unkonwn | |
(set-goal increase-town-size-goal 0); disable TS increase | |
(set-goal strategy-goal default-strategy) | |
(set-goal unit-goal default-unit) | |
(set-goal ranged-unit-type-goal default-ranged) | |
(set-goal under-attack-goal 0); not under attack | |
(set-goal spread-military-goal 0) | |
(disable-self) | |
) | |
(defrule | |
(true) | |
=> | |
; (set-strategic-number sn-percent-half-exploration 30); default | |
; (set-strategic-number sn-percent-exploration-required 0) | |
(set-strategic-number sn-number-enemy-objects-required 1) | |
(set-goal attackchat 1) | |
(set-goal stanceg 0) | |
(set-goal request 0) | |
(set-goal request2 0) | |
(up-assign-builders c: 621 c: 4) | |
(up-assign-builders c: town-center c: 4) | |
(enable-timer thirty 30) | |
(enable-timer tensec 10) | |
(set-goal retargetenemy yes) | |
(enable-timer two-minute-timer 120) | |
(set-goal defendchat no); soon to be reset | |
(set-strategic-number sn-allow-civilian-defense 1) | |
(disable-self) | |
) | |
(defrule | |
(true) | |
=> | |
(set-strategic-number sn-percent-building-cancellation 25) | |
(set-strategic-number sn-home-exploration-time home-exploration-time) | |
(set-strategic-number sn-minimum-boar-hunt-group-size 0) | |
; (set-strategic-number sn-enable-boar-hunting 2) | |
(set-strategic-number sn-number-civilian-militia 0) | |
(set-strategic-number sn-enable-patrol-attack enable-patrol) | |
(set-strategic-number sn-safe-town-size safe-town) | |
(set-goal nomad no) | |
(set-goal landnomad no) | |
(set-strategic-number sn-livestock-to-town-center 1) | |
(disable-self) | |
) | |
(defrule | |
(true) | |
=> | |
(enable-timer navy-attack-timer 1) | |
(enable-timer retreat-timer 1) | |
(enable-timer micro-timer 1) | |
(enable-timer garrison-timer 1) | |
(set-goal raid-goal 0) | |
(set-goal forward-goal -1) | |
(enable-timer defend-timer 10) | |
(set-goal position-goal pocket); nomad | |
(disable-self) | |
) | |
(defrule | |
(game-time < 10) | |
(wood-amount < 275) | |
(building-type-count-total town-center <= 0) | |
(up-compare-goal landnomad != yes) | |
=> | |
(set-goal nomad yes) | |
(set-goal landnomad yes) | |
(chat-local-to-self "Land-Nomad.") | |
(up-assign-builders c: town-center-foundation c: 10) | |
(disable-self)) | |
(defrule | |
(game-time < 10) | |
(wood-amount >= 275) | |
(building-type-count-total town-center <= 0) | |
(up-compare-goal nomad != yes) | |
=> | |
(set-goal nomad yes) | |
(chat-local-to-self "Nomad.") | |
(up-assign-builders c: town-center-foundation c: 10) | |
(disable-self)) | |
#load-if-not-defined DEATH-MATCH | |
#load-if-not-defined WONDER-RACE | |
#load-if-not-defined NOMAD-MAP | |
#load-if-not-defined UP-2-PLAYER-GAME | |
#load-if-defined UP-POCKET-POSITION | |
(defrule | |
; (strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(true);(game-time > 10) | |
=> | |
(set-goal position-goal pocket) | |
(set-goal strategy-goal pocket-strategy) | |
(set-goal unit-goal pocket-unit) | |
(set-goal control-goal 0) | |
(chat-local-to-self "I'm pocket.") | |
; (chat-to-player every-ally "I'm pocket.") | |
(disable-self)) | |
#else | |
(defrule | |
; (strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(true);(game-time > 10) | |
=> | |
(set-goal position-goal flank) | |
(chat-local-to-self "I'm flank.") | |
; (chat-to-player every-ally "I'm flank.") | |
(disable-self)) | |
#end-if | |
#end-if | |
#end-if | |
#end-if | |
#end-if | |
#load-if-defined DEATH-MATCH | |
;#load-if-not-defined UP-2-PLAYER-GAME | |
#load-if-defined UP-POCKET-POSITION | |
(defrule | |
(true);(game-time > 10) | |
=> | |
(set-goal position-goal pocket) | |
(chat-local-to-self "I'm pocket.") | |
; (chat-to-player every-ally "I'm pocket.") | |
(disable-self)) | |
#else | |
(defrule | |
(true);(game-time > 10) | |
=> | |
(set-goal position-goal flank) | |
(chat-local-to-self "I'm flank.") | |
; (chat-to-player every-ally "I'm flank.") | |
(disable-self)) | |
#end-if | |
;#end-if | |
#end-if | |
(defrule | |
(unit-type-count-total 213 < 3) ; Dead female builder | |
(unit-type-count-total 225 < 3) ; Dead male builder | |
(building-type-count town-center >= 1) | |
(strategic-number sn-percent-building-cancellation > 10) | |
=> | |
(set-strategic-number sn-percent-building-cancellation 10)) | |
(defrule | |
(or (unit-type-count-total 213 >= 3) ; Dead female builder | |
(unit-type-count-total 225 >= 3)) ; Dead male builder | |
(population < max-civ-pop) | |
(building-type-count town-center >= 1) | |
(strategic-number sn-percent-building-cancellation < 100) | |
=> | |
(set-strategic-number sn-percent-building-cancellation 100) | |
; (chat-local-to-self "Resetting townsize."); test | |
; (set-strategic-number sn-maximum-town-size 12) | |
) | |
(defrule | |
(building-type-count town-center <= 0) | |
(building-type-count-total town-center >= 1) | |
(strategic-number sn-percent-building-cancellation > 0) | |
=> | |
(set-strategic-number sn-percent-building-cancellation 0)) | |
(defrule | |
(strategic-number sn-allow-adjacent-dropsites != 0) | |
=> | |
(set-strategic-number sn-allow-adjacent-dropsites 0)) | |
(defrule | |
(true); clear these goals/SNs each rule pass | |
=> | |
(set-strategic-number sn-military-level 0) | |
(set-strategic-number sn-archer-threat 0) | |
(set-strategic-number sn-infantry-threat 0) | |
(set-strategic-number sn-cavalry-threat 0) | |
(set-goal anti-cavalry-threat-goal 0) | |
(set-goal anti-monk-threat-goal 0) | |
(set-goal monk-threat-goal 0) | |
(set-goal enemy-sighted-goal 0) | |
(set-goal attack-goal 0) | |
(set-goal farm-goal 0) | |
(set-goal housing-goal 0) | |
(set-goal enemy-boats-goal 0) | |
(set-goal hostilities-goal 0) | |
(set-goal save-wood-goal 0) | |
(set-goal math-goal 0) | |
) | |
(defrule | |
(true) | |
=> | |
(set-goal gather-inside-goal 0) | |
(set-goal split-rule-goal 0) | |
(set-goal tribute-goal 0) | |
(set-goal threat-source-goal 0) | |
(set-goal threat-target-goal 0) | |
(set-goal team-coordination-goal 0) | |
(up-get-threat-data threat-time-goal threat-player-goal threat-source-goal threat-target-goal) | |
(up-get-victory-data winning-player victory-type victory-time) | |
(up-modify-goal attacking-enemy-goal g:= threat-player-goal); replacement | |
) | |
#load-if-not-defined DIFFICULTY-EASIEST | |
#load-if-not-defined DIFFICULTY-EASY | |
#load-if-not-defined DIFFICULTY-MODERATE | |
(defrule | |
(true) | |
=> | |
(set-strategic-number sn-enable-training-queue 1) | |
(set-strategic-number sn-wall-targeting-mode 1) | |
(set-strategic-number sn-enable-new-building-system 1) | |
) | |
#end-if | |
#end-if | |
#end-if | |
(defrule | |
(players-building-count any-enemy > 0) | |
=> | |
(up-find-player enemy find-closest closest-enemy-goal) | |
; (up-modify-sn sn-focus-player-number g:= closest-enemy-goal) | |
; (up-chat-data-to-self "Focus-player: %d" g: closest-enemy-goal) | |
) | |
(defrule | |
(or (strategic-number sn-maximum-town-size >= 40) | |
(strategic-number sn-number-attack-groups >= 1)) | |
(up-compare-goal team-coordination-goal != 1) | |
=> | |
(set-goal team-coordination-goal 1) | |
) | |
(defrule | |
(or (game-time < 1200); don't block early villagers in DM | |
(nor (and (goal train-civ-goal -1) | |
(population >= max-civ-pop)) | |
(goal train-civ-goal 2))) | |
=> | |
(set-goal train-civ-goal 1) | |
) | |
(defrule | |
(taunt-detected any-ally 33) | |
(game-time > 300) | |
=> | |
(acknowledge-taunt this-any-ally 33) | |
(chat-to-allies-using-id 22157) | |
(set-goal train-civ-goal 1) | |
) | |
(defrule | |
(current-age == imperial-age) | |
(population >= max-civ-pop) | |
(taunt-detected any-ally 32) | |
=> | |
(acknowledge-taunt this-any-ally 32) | |
(chat-to-allies-using-id 22154) | |
(set-goal train-civ-goal -1) | |
) | |
(defrule | |
(game-time > 1800) | |
(or (or (dropsite-min-distance wood == -1); wood gone | |
(dropsite-min-distance wood == 480)); or remaining wood is on other islands | |
(and (unit-type-count-total villager > thirty-percent-pop) | |
(game-type == 8))) | |
=> | |
(set-goal train-civ-goal -1) | |
) | |
(defrule | |
(current-age == imperial-age) | |
(strategic-number sn-minimum-water-body-size-for-dock == water-islands) | |
(or (and (unit-type-count villager > twenty-five-percent-pop) | |
(game-time > 2700)) | |
(and (and (players-unit-type-count every-enemy galley-line < 15) | |
(players-unit-type-count every-enemy fire-ship-line < 15)) | |
(warboat-count > 25))) | |
=> | |
(set-goal train-civ-goal -1) | |
) | |
(defrule | |
(current-age == imperial-age) | |
(strategic-number sn-resource-control < 1) | |
(up-compare-goal escrow-purpose-goal != ri-halberdier) | |
(civilian-population >= max-civ); more than enough civ, usually achieved by adding trade carts | |
(or (gold-amount > 800); and enough of all resources | |
(and (civilian-population > sixty-percent-pop) | |
(unit-type-count trade-cart > 0))) | |
(wood-amount > 800) | |
(food-amount > 800) | |
(population > del-civ-pop) | |
(unit-type-count-total villager >= 12) | |
(population-cap <= 250) | |
=> | |
(delete-unit villager) | |
(set-goal train-civ-goal -1) | |
(chat-local-to-self "Deleting excess villagers.") | |
) | |
(defrule | |
; (game-time < 60) | |
(unit-type-count-total villager > 0) | |
(building-type-count-total lumber-camp >= 1) | |
(wood-amount < 275) | |
(strategic-number sn-number-explore-groups == 101) | |
=> | |
(set-strategic-number sn-percent-civilian-explorers 0) | |
(set-strategic-number sn-cap-civilian-explorers 0) | |
(set-strategic-number sn-total-number-explorers 1) | |
(set-strategic-number sn-number-explore-groups 1)) | |
(defrule | |
; (game-time < 60) | |
(unit-type-count-total villager > 0) | |
(building-type-count-total mining-camp >= 1) | |
(stone-amount < 100) | |
(strategic-number sn-number-explore-groups == 101) | |
=> | |
(set-strategic-number sn-percent-civilian-explorers 0) | |
(set-strategic-number sn-cap-civilian-explorers 0) | |
(set-strategic-number sn-total-number-explorers 1) | |
(set-strategic-number sn-number-explore-groups 1)) | |
(defrule | |
; (game-time < 60) | |
(unit-type-count-total villager > 0) | |
(building-type-count town-center >= 1); -total | |
(strategic-number sn-number-explore-groups == 101) | |
=> | |
(set-strategic-number sn-percent-civilian-explorers 0) | |
(set-strategic-number sn-cap-civilian-explorers 0) | |
(set-strategic-number sn-total-number-explorers 1) | |
(set-strategic-number sn-number-explore-groups 1)) | |
(defrule | |
(game-time < 120) | |
(unit-type-count-total villager > 0) | |
(building-type-count-total town-center == 0) | |
(building-type-count-total lumber-camp == 0) | |
(wood-amount < 275) | |
=> | |
(set-strategic-number sn-percent-civilian-explorers 100) | |
(set-strategic-number sn-cap-civilian-explorers 100) | |
(set-strategic-number sn-total-number-explorers 101) | |
(set-strategic-number sn-number-explore-groups 101)) | |
(defrule | |
(game-time < 120) | |
(unit-type-count-total villager > 0) | |
(building-type-count-total town-center == 0) | |
(building-type-count-total mining-camp == 0) | |
(stone-amount < 100) | |
=> | |
(set-strategic-number sn-percent-civilian-explorers 100) | |
(set-strategic-number sn-cap-civilian-explorers 100) | |
(set-strategic-number sn-total-number-explorers 101) | |
(set-strategic-number sn-number-explore-groups 101)) | |
(defrule | |
; (game-time < 120) | |
(unit-type-count-total villager > 0) | |
(building-type-count-total town-center == 0) | |
(wood-amount >= 275) | |
(stone-amount >= 100) | |
=> | |
(set-strategic-number sn-wood-gatherer-percentage 20) | |
(set-strategic-number sn-food-gatherer-percentage 80); provisory | |
(set-strategic-number sn-percent-civilian-explorers 100) | |
(set-strategic-number sn-cap-civilian-explorers 100) | |
(set-strategic-number sn-total-number-explorers 101) | |
(set-strategic-number sn-number-explore-groups 101)) | |
(defrule ; 126 | |
(or (building-type-count-total town-center == 0) | |
(and (up-pending-objects c: town-center == 0) | |
(building-type-count town-center == 0))); just to be sure | |
; (goal increase-town-size-goal 0) | |
(can-build town-center) | |
; (wood-amount >= 275) | |
; (stone-amount >= 100) | |
; (building-available town-center) | |
=> | |
(set-goal increase-town-size-goal 0) | |
(build town-center) | |
; (set-goal increase-town-size-goal town-center) | |
(chat-local-to-self "Trying to get a TC up.") | |
) | |
(defrule | |
(building-type-count-total mill >= 1) | |
(or (wood-amount >= 200) | |
(dropsite-min-distance wood s:<= sn-maximum-wood-drop-distance)) | |
(strategic-number sn-wood-gatherer-percentage < 5) | |
(strategic-number sn-minimum-civilian-explorers >= 1) | |
=> | |
(set-strategic-number sn-percent-civilian-explorers 0) | |
(set-strategic-number sn-minimum-civilian-explorers 0) | |
(set-strategic-number sn-cap-civilian-explorers 0) | |
(set-strategic-number sn-total-number-explorers 1) | |
(set-strategic-number sn-number-explore-groups 1)) | |
(defrule | |
(or (unit-type-count scout-unit >= 1) | |
(current-age <= dark-age)) | |
(or (players-building-count every-enemy >= 1) | |
(current-age <= dark-age)) | |
(building-type-count-total mill >= 1) | |
(building-type-count-total lumber-camp >= 1) | |
(dropsite-min-distance wood s:<= sn-maximum-wood-drop-distance) | |
(strategic-number sn-minimum-civilian-explorers >= 1) | |
=> | |
(set-strategic-number sn-percent-civilian-explorers 0) | |
(set-strategic-number sn-minimum-civilian-explorers 0) | |
(set-strategic-number sn-cap-civilian-explorers 0) | |
(set-strategic-number sn-total-number-explorers 1) | |
(set-strategic-number sn-number-explore-groups 1)) | |
(defrule | |
(unit-type-count scout-unit <= 0) | |
(or (not (resource-found wood)) | |
(or (dropsite-min-distance wood s:> sn-maximum-wood-drop-distance) | |
(dropsite-min-distance wood > 7))) | |
(strategic-number sn-wood-gatherer-percentage >= 5) | |
(building-type-count town-center >= 1); -total | |
=> | |
(set-strategic-number sn-percent-civilian-explorers 100) | |
(set-strategic-number sn-minimum-civilian-explorers 1) | |
(set-strategic-number sn-cap-civilian-explorers 1) | |
(set-strategic-number sn-total-number-explorers 2) | |
(set-strategic-number sn-number-explore-groups 2)) | |
(defrule | |
(or (unit-type-count-total villager <= 1) | |
(unit-type-count scout-unit >= 1)) | |
(strategic-number sn-current-age >= fc-transit); provisory | |
(strategic-number sn-minimum-civilian-explorers >= 1) | |
=> | |
(set-strategic-number sn-percent-civilian-explorers 0) | |
(set-strategic-number sn-minimum-civilian-explorers 0) | |
(set-strategic-number sn-cap-civilian-explorers 0) | |
(set-strategic-number sn-total-number-explorers 1) | |
(set-strategic-number sn-number-explore-groups 1)) | |
(defrule | |
(resource-found wood) | |
(building-type-count-total town-center == 0) | |
(building-type-count-total lumber-camp == 0) | |
(wood-amount < 275) | |
(can-build lumber-camp) | |
=> | |
(set-strategic-number sn-allow-adjacent-dropsites 0); testing | |
(set-strategic-number sn-wood-gatherer-percentage 100) | |
(set-strategic-number sn-maximum-wood-drop-distance 480) | |
(build lumber-camp)) | |
(defrule | |
(resource-found stone) | |
(building-type-count-total town-center == 0) | |
(building-type-count-total mining-camp < 1) | |
(or (wood-amount >= 260) | |
(building-type-count-total lumber-camp > 0)) | |
(stone-amount < 100) | |
(can-build mining-camp) | |
=> | |
(set-strategic-number sn-allow-adjacent-dropsites 0) | |
(build mining-camp)) | |
#load-if-defined DEFEND-WONDER | |
(defrule | |
(unit-type-count-total villager > fourty-percent-pop) | |
=> | |
(set-goal train-civ-goal -1) | |
) | |
#end-if | |
(defrule | |
(strategic-number sn-resource-control != 3) | |
(nand | |
(strategic-number sn-current-age == feudal) | |
(and | |
(strategic-number sn-resource-control == 2) | |
(goal under-attack-goal 0) | |
) | |
) | |
=> | |
(set-strategic-number sn-resource-control 0) | |
) | |
#load-if-defined WONDER-RACE | |
(defrule | |
(true) | |
=> | |
(set-goal strategy-goal fast-imp);overwrite all other settings | |
(set-goal unit-goal wonder) | |
(set-goal control-goal wonder) | |
) | |
(defrule | |
(goal increase-town-size-goal 0) | |
(building-type-count-total university < 1) | |
(current-age == castle-age) | |
(wood-amount >= 200) | |
=> | |
(set-goal increase-town-size-goal university) | |
(enable-timer increase-town-size-timer 4) | |
) | |
(defrule | |
(strategic-number sn-current-age >= ci-transit) | |
(can-research ri-treadmill-crane) | |
=> | |
(research ri-treadmill-crane)) | |
(defrule | |
(strategic-number sn-current-age >= ci-transit) | |
=> | |
(enable-timer 6 60)(disable-self) | |
) | |
(defrule | |
(strategic-number sn-current-age >= ci-transit) | |
(timer-triggered 6) | |
(food-amount < 300); ri-stonecutting | |
(can-buy-commodity food) | |
(research-available ri-stonecutting) | |
=> | |
(buy-commodity food) | |
) | |
(defrule | |
(strategic-number sn-current-age >= ci-transit) | |
(not (research-available ri-stonecutting)) | |
=> | |
(sell-commodity food) | |
(delete-building farm) | |
(enable-timer lumber-timer 1200) | |
) | |
(defrule | |
(current-age == imperial-age) | |
(wood-amount > 1100) | |
(can-sell-commodity wood) | |
=> | |
(sell-commodity wood) | |
) | |
(defrule | |
(current-age == imperial-age) | |
(wood-amount < 1000) | |
(gold-amount > 1150) | |
(commodity-buying-price wood <= 150) | |
=> | |
(buy-commodity wood) | |
) | |
(defrule | |
(current-age == imperial-age) | |
(stone-amount < 1000) | |
(gold-amount > 1174) | |
(commodity-buying-price stone <= 175) | |
=> | |
(buy-commodity stone) | |
) | |
(defrule | |
(can-build wonder) | |
=> | |
(build wonder) | |
) | |
(defrule | |
(building-type-count-total wonder > 0) | |
=> | |
(delete-building blacksmith) | |
(delete-building market) | |
(delete-building university) | |
(delete-building monastery) | |
(delete-building town-center) | |
(set-goal increase-town-size-goal 2); block build system | |
) | |
#else | |
;******************** NAVY INITIALISATION ******************** | |
(defrule | |
(or (goal enemy-boats-goal 1) | |
(players-building-type-count any-enemy dock > 0)) | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(building-type-count-total blacksmith > 0) | |
=> | |
(enable-wall-placement 2) | |
(set-strategic-number sn-minimum-water-body-size-for-dock water-mixed) | |
(set-strategic-number sn-percent-attack-soldiers 0) | |
(set-strategic-number sn-number-boat-explore-groups 0) | |
(chat-to-player my-player-number "The enemy goes for water, treating this as a watermap now.") | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(taunt-detected any-human 34) | |
=> | |
(acknowledge-taunt every-human 34) | |
(acknowledge-taunt every-human 35) | |
(enable-wall-placement 2) | |
(set-strategic-number sn-minimum-water-body-size-for-dock water-mixed) | |
(set-strategic-number sn-percent-attack-soldiers 0) | |
(set-strategic-number sn-number-boat-explore-groups 0) | |
; (chat-to-allies-using-id 7110); "Yes." | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock == water-mixed) | |
(taunt-detected any-human 35) | |
=> | |
(set-strategic-number sn-minimum-water-body-size-for-dock 999) | |
; (chat-to-allies-using-id 7110); "Yes." | |
) | |
#load-if-not-defined FORTRESS-MAP | |
#load-if-not-defined OASIS-MAP | |
#load-if-not-defined SALT-MARSH-MAP | |
(defrule | |
(or (cc-players-unit-type-count 0 shore-fish >= shorefishreq) ; a lot | |
(or (cc-players-unit-type-count 0 sea-fish >= deepfishreq); a lot | |
(and (cc-players-unit-type-count 0 shore-fish >= shorefishreq2); a bit | |
(cc-players-unit-type-count 0 sea-fish >= deepfishreq2)))); a bit | |
=> | |
(enable-wall-placement 2) | |
(set-strategic-number sn-minimum-water-body-size-for-dock water-mixed) | |
(set-strategic-number sn-percent-attack-soldiers 0) | |
(set-strategic-number sn-number-boat-explore-groups 0) | |
(chat-to-player my-player-number "This map has fish.") | |
(disable-self)) | |
#else | |
(defrule | |
(true) | |
=> | |
(enable-wall-placement 2) | |
(set-strategic-number sn-maximum-fish-boat-drop-distance 14) | |
(set-strategic-number sn-minimum-water-body-size-for-dock water-mixed) | |
(set-strategic-number sn-percent-attack-soldiers 0) | |
(set-strategic-number sn-number-boat-explore-groups 0) | |
(chat-to-player my-player-number "This map has fish.") | |
(disable-self)) | |
#end-if | |
#end-if | |
#end-if | |
(defrule | |
(or (map-type islands) | |
(map-type team-islands)) | |
(strategic-number sn-minimum-water-body-size-for-dock != water-islands) | |
=> | |
(set-strategic-number sn-garrison-rams 0); don't load rams or the computer messes up with transports | |
(set-strategic-number sn-minimum-water-body-size-for-dock water-islands) | |
(set-strategic-number sn-group-form-distance 30); big distances to load transport ships | |
(set-goal strategy-goal rush) | |
(chat-to-player my-player-number "Defined as island-map.")) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock == water-mixed) | |
(wall-completed-percentage 2 >= 100) | |
(players-building-type-count my-player-number stone-wall < 15); this will be only true on islands | |
(players-building-type-count my-player-number palisade-wall < 15) | |
=> | |
(set-strategic-number sn-garrison-rams 0); don't load rams or the computer messes up with transports | |
(set-strategic-number sn-minimum-water-body-size-for-dock water-islands) | |
(set-strategic-number sn-group-form-distance 30); big distances to load transport ships | |
(set-goal strategy-goal rush) | |
(chat-to-player my-player-number "Islands?") | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock == water-mixed) | |
(or (goal unit-goal skirmisher) | |
(goal unit-goal archer)) | |
(up-compare-goal strategy-goal != flush) | |
(current-age < castle-age) | |
=> | |
(set-goal strategy-goal boom) | |
(set-goal unit-goal my-unique-unit-line) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock == water-islands) | |
(or (goal unit-goal my-unique-unit-line) | |
(or (goal unit-goal skirmisher) | |
(goal unit-goal archer))) | |
(current-age < castle-age) | |
=> | |
(set-goal strategy-goal rush) | |
(set-goal unit-goal militiaman-line) | |
) | |
(defrule | |
(not (taunt-detected any-human 35)) | |
(or (players-unit-type-count any-enemy longboat-line > 0) | |
(or (players-unit-type-count any-enemy galley-line > 0) | |
(players-unit-type-count any-enemy fire-ship-line > 0))) | |
=> | |
(set-goal enemy-boats-goal 1) | |
) | |
(defrule | |
(not (taunt-detected any-human 35)) | |
(building-type-count dock > 0) | |
(or (players-building-type-count any-enemy dock > 0) | |
(players-unit-type-count any-enemy fishing-ship > 0)) | |
=> | |
(set-goal enemy-boats-goal 1) | |
) | |
(defrule | |
(not (player-in-game any-ally)) | |
(player-valid 3) | |
(game-time > 13) | |
=> | |
(set-goal nr-map-goal 1) | |
(set-goal ffa-game-goal 1) | |
(disable-self) | |
) | |
;******************** MILITARY SUPERIORITY CODE ******************** | |
; -1 = -5 units | |
; 1 = +5 units | |
; 2 = enemy has < 70% of our military | |
; 3 = enemy has < 55% of our military | |
(defrule | |
(military-population > 7) | |
(or | |
(military-population > 15) | |
(players-military-population target-player < 4) | |
) | |
(or | |
(military-population > 20) | |
(players-military-population target-player < 10) | |
) | |
(or | |
(military-population > 25) | |
(players-military-population target-player < 15) | |
) | |
(or | |
(military-population > 30) | |
(players-military-population target-player < 20) | |
) | |
(players-military-population target-player < 25) | |
=> | |
(set-strategic-number sn-military-level 1) | |
) | |
(defrule | |
(military-population > 35) | |
(or | |
(military-population > 40) | |
(players-military-population target-player < 30) | |
) | |
(or | |
(military-population > 45) | |
(players-military-population target-player < 35) | |
) | |
(or | |
(military-population > 50) | |
(players-military-population target-player < 40) | |
) | |
(or | |
(military-population > 55) | |
(players-military-population target-player < 45) | |
) | |
(players-military-population target-player < 50) | |
=> | |
(set-strategic-number sn-military-level 1) | |
) | |
(defrule | |
(military-population > 60) | |
(or | |
(military-population > 65) | |
(players-military-population target-player < 55) | |
) | |
(or | |
(military-population > 70) | |
(players-military-population target-player < 60) | |
) | |
(or | |
(military-population > 75) | |
(players-military-population target-player < 65) | |
) | |
(or | |
(military-population > 80) | |
(players-military-population target-player < 70) | |
) | |
(players-military-population target-player < 75) | |
=> | |
(set-strategic-number sn-military-level 1) | |
) | |
(defrule | |
(military-population > 85) | |
(or | |
(military-population > 90) | |
(players-military-population target-player < 80) | |
) | |
(or | |
(military-population > 95) | |
(players-military-population target-player < 85) | |
) | |
(or | |
(military-population > 100) | |
(players-military-population target-player < 90) | |
) | |
(or | |
(military-population > 105) | |
(players-military-population target-player < 95) | |
) | |
(players-military-population target-player < 100) | |
=> | |
(set-strategic-number sn-military-level 1) | |
) | |
(defrule | |
(military-population > 110) | |
(or | |
(military-population > 120) | |
(players-military-population target-player < 105) | |
) | |
(or | |
(military-population > 140) | |
(players-military-population target-player < 115) | |
) | |
(or | |
(military-population > 160) | |
(players-military-population target-player < 135) | |
) | |
(or | |
(military-population > 180) | |
(players-military-population target-player < 155) | |
) | |
(players-military-population target-player < 175) | |
=> | |
(set-strategic-number sn-military-level 1) | |
) | |
(defrule | |
(military-population > 200) | |
(or | |
(military-population > 220) | |
(players-military-population target-player < 195) | |
) | |
(or | |
(military-population > 240) | |
(players-military-population target-player < 215) | |
) | |
(or | |
(military-population > 260) | |
(players-military-population target-player < 235) | |
) | |
(or | |
(military-population > 280) | |
(players-military-population target-player < 255) | |
) | |
(players-military-population target-player < 275) | |
=> | |
(set-strategic-number sn-military-level 1) | |
) | |
(defrule | |
(military-population > 300) | |
(or | |
(military-population > 320) | |
(players-military-population target-player < 295) | |
) | |
(or | |
(military-population > 340) | |
(players-military-population target-player < 315) | |
) | |
(or | |
(military-population > 360) | |
(players-military-population target-player < 335) | |
) | |
(or | |
(military-population > 380) | |
(players-military-population target-player < 355) | |
) | |
(players-military-population target-player < 375) | |
=> | |
(set-strategic-number sn-military-level 1) | |
) | |
(defrule | |
(military-population > 400) | |
(or | |
(military-population > 420) | |
(players-military-population target-player < 395) | |
) | |
(or | |
(military-population > 440) | |
(players-military-population target-player < 415) | |
) | |
(or | |
(military-population > 460) | |
(players-military-population target-player < 435) | |
) | |
(or | |
(military-population > 480) | |
(players-military-population target-player < 455) | |
) | |
(players-military-population target-player < 475) | |
=> | |
(set-strategic-number sn-military-level 1) | |
) | |
(defrule | |
(military-population > 10) | |
(or | |
(military-population > 15) | |
(players-military-population target-player < 2) | |
) | |
(or | |
(military-population > 20) | |
(players-military-population target-player < 10) | |
) | |
(or | |
(military-population > 25) | |
(players-military-population target-player < 14) | |
) | |
(or | |
(military-population > 30) | |
(players-military-population target-player < 17) | |
) | |
(players-military-population target-player < 21) | |
=> | |
(set-strategic-number sn-military-level 2) | |
) | |
(defrule | |
(military-population > 35) | |
(or | |
(military-population > 40) | |
(players-military-population target-player < 24) | |
) | |
(or | |
(military-population > 45) | |
(players-military-population target-player < 28) | |
) | |
(or | |
(military-population > 50) | |
(players-military-population target-player < 31) | |
) | |
(or | |
(military-population > 55) | |
(players-military-population target-player < 35) | |
) | |
(players-military-population target-player < 38) | |
=> | |
(set-strategic-number sn-military-level 2) | |
) | |
(defrule | |
(military-population > 60) | |
(or | |
(military-population > 65) | |
(players-military-population target-player < 42) | |
) | |
(or | |
(military-population > 70) | |
(players-military-population target-player < 45) | |
) | |
(or | |
(military-population > 75) | |
(players-military-population target-player < 49) | |
) | |
(or | |
(military-population > 80) | |
(players-military-population target-player < 52) | |
) | |
(players-military-population target-player < 56) | |
=> | |
(set-strategic-number sn-military-level 2) | |
) | |
(defrule | |
(military-population > 100) | |
(or | |
(military-population > 120) | |
(players-military-population target-player < 70) | |
) | |
(or | |
(military-population > 140) | |
(players-military-population target-player < 84) | |
) | |
(or | |
(military-population > 160) | |
(players-military-population target-player < 98) | |
) | |
(or | |
(military-population > 180) | |
(players-military-population target-player < 112) | |
) | |
(players-military-population target-player < 126) | |
=> | |
(set-strategic-number sn-military-level 2) | |
) | |
(defrule | |
(military-population > 200) | |
(or | |
(military-population > 220) | |
(players-military-population target-player < 140) | |
) | |
(or | |
(military-population > 240) | |
(players-military-population target-player < 154) | |
) | |
(or | |
(military-population > 260) | |
(players-military-population target-player < 168) | |
) | |
(or | |
(military-population > 280) | |
(players-military-population target-player < 182) | |
) | |
(players-military-population target-player < 196) | |
=> | |
(set-strategic-number sn-military-level 2) | |
) | |
(defrule | |
(military-population > 300) | |
(or | |
(military-population > 320) | |
(players-military-population target-player < 210) | |
) | |
(or | |
(military-population > 340) | |
(players-military-population target-player < 224) | |
) | |
(or | |
(military-population > 360) | |
(players-military-population target-player < 238) | |
) | |
(or | |
(military-population > 380) | |
(players-military-population target-player < 252) | |
) | |
(players-military-population target-player < 266) | |
=> | |
(set-strategic-number sn-military-level 2) | |
) | |
(defrule | |
(military-population > 400) | |
(or | |
(military-population > 420) | |
(players-military-population target-player < 280) | |
) | |
(or | |
(military-population > 440) | |
(players-military-population target-player < 294) | |
) | |
(or | |
(military-population > 460) | |
(players-military-population target-player < 308) | |
) | |
(or | |
(military-population > 480) | |
(players-military-population target-player < 322) | |
) | |
(players-military-population target-player < 336) | |
=> | |
(set-strategic-number sn-military-level 2) | |
) | |
(defrule | |
(military-population > 23) | |
(or | |
(military-population > 28) | |
(players-military-population target-player < 14) | |
) | |
(or | |
(military-population > 35) | |
(players-military-population target-player < 17) | |
) | |
(or | |
(military-population > 40) | |
(players-military-population target-player < 21) | |
) | |
(or | |
(military-population > 45) | |
(players-military-population target-player < 24) | |
) | |
(players-military-population target-player < 27) | |
=> | |
(set-strategic-number sn-military-level 3) | |
) | |
(defrule | |
(military-population > 50) | |
(or | |
(military-population > 55) | |
(players-military-population target-player < 30) | |
) | |
(or | |
(military-population > 60) | |
(players-military-population target-player < 33) | |
) | |
(or | |
(military-population > 65) | |
(players-military-population target-player < 36) | |
) | |
(or | |
(military-population > 70) | |
(players-military-population target-player < 39) | |
) | |
(players-military-population target-player < 42) | |
=> | |
(set-strategic-number sn-military-level 3) | |
) | |
(defrule | |
(military-population > 75) | |
(or | |
(military-population > 80) | |
(players-military-population target-player < 41) | |
) | |
(or | |
(military-population > 85) | |
(players-military-population target-player < 44) | |
) | |
(or | |
(military-population > 90) | |
(players-military-population target-player < 47) | |
) | |
(or | |
(military-population > 95) | |
(players-military-population target-player < 50) | |
) | |
(players-military-population target-player < 52) | |
=> | |
(set-strategic-number sn-military-level 3) | |
) | |
(defrule | |
(military-population > 100) | |
(or | |
(military-population > 120) | |
(players-military-population target-player < 55) | |
) | |
(or | |
(military-population > 140) | |
(players-military-population target-player < 66) | |
) | |
(or | |
(military-population > 160) | |
(players-military-population target-player < 77) | |
) | |
(or | |
(military-population > 180) | |
(players-military-population target-player < 88) | |
) | |
(players-military-population target-player < 99) | |
=> | |
(set-strategic-number sn-military-level 3) | |
) | |
(defrule | |
(military-population > 200) | |
(or | |
(military-population > 220) | |
(players-military-population target-player < 110) | |
) | |
(or | |
(military-population > 240) | |
(players-military-population target-player < 121) | |
) | |
(or | |
(military-population > 260) | |
(players-military-population target-player < 132) | |
) | |
(or | |
(military-population > 280) | |
(players-military-population target-player < 143) | |
) | |
(players-military-population target-player < 154) | |
=> | |
(set-strategic-number sn-military-level 3) | |
) | |
(defrule | |
(military-population > 300) | |
(or | |
(military-population > 320) | |
(players-military-population target-player < 165) | |
) | |
(or | |
(military-population > 340) | |
(players-military-population target-player < 176) | |
) | |
(or | |
(military-population > 360) | |
(players-military-population target-player < 187) | |
) | |
(or | |
(military-population > 380) | |
(players-military-population target-player < 198) | |
) | |
(players-military-population target-player < 209) | |
=> | |
(set-strategic-number sn-military-level 3) | |
) | |
(defrule | |
(military-population > 400) | |
(or | |
(military-population > 420) | |
(players-military-population target-player < 220) | |
) | |
(or | |
(military-population > 440) | |
(players-military-population target-player < 231) | |
) | |
(or | |
(military-population > 460) | |
(players-military-population target-player < 242) | |
) | |
(or | |
(military-population > 480) | |
(players-military-population target-player < 253) | |
) | |
(players-military-population target-player < 264) | |
=> | |
(set-strategic-number sn-military-level 3) | |
) | |
(defrule | |
(players-military-population target-player > 5) | |
(or | |
(military-population < 2) | |
(players-military-population target-player > 10) | |
) | |
(or | |
(military-population < 6) | |
(players-military-population target-player > 15) | |
) | |
(or | |
(military-population < 10) | |
(players-military-population target-player > 20) | |
) | |
(or | |
(military-population < 15) | |
(players-military-population target-player > 25) | |
) | |
(military-population < 20) | |
=> | |
(set-strategic-number sn-military-level -1) | |
) | |
(defrule | |
(players-military-population target-player > 30) | |
(or | |
(military-population < 25) | |
(players-military-population target-player > 35) | |
) | |
(or | |
(military-population < 30) | |
(players-military-population target-player > 40) | |
) | |
(or | |
(military-population < 35) | |
(players-military-population target-player > 45) | |
) | |
(or | |
(military-population < 40) | |
(players-military-population target-player > 50) | |
) | |
(military-population < 45) | |
=> | |
(set-strategic-number sn-military-level -1) | |
) | |
(defrule | |
(players-military-population target-player > 55) | |
(or | |
(military-population < 50) | |
(players-military-population target-player > 60) | |
) | |
(or | |
(military-population < 55) | |
(players-military-population target-player > 65) | |
) | |
(or | |
(military-population < 60) | |
(players-military-population target-player > 70) | |
) | |
(or | |
(military-population < 65) | |
(players-military-population target-player > 75) | |
) | |
(military-population < 70) | |
=> | |
(set-strategic-number sn-military-level -1) | |
) | |
(defrule | |
(players-military-population target-player > 80) | |
(or | |
(military-population < 75) | |
(players-military-population target-player > 85) | |
) | |
(or | |
(military-population < 80) | |
(players-military-population target-player > 90) | |
) | |
(or | |
(military-population < 85) | |
(players-military-population target-player > 95) | |
) | |
(or | |
(military-population < 90) | |
(players-military-population target-player > 100) | |
) | |
(military-population < 95) | |
=> | |
(set-strategic-number sn-military-level -1) | |
) | |
(defrule | |
(players-military-population target-player > 105) | |
(or | |
(military-population < 100) | |
(players-military-population target-player > 120) | |
) | |
(or | |
(military-population < 115) | |
(players-military-population target-player > 140) | |
) | |
(or | |
(military-population < 135) | |
(players-military-population target-player > 160) | |
) | |
(or | |
(military-population < 155) | |
(players-military-population target-player > 180) | |
) | |
(military-population < 175) | |
=> | |
(set-strategic-number sn-military-level -1) | |
) | |
(defrule | |
(players-military-population target-player > 200) | |
(or | |
(military-population < 195) | |
(players-military-population target-player > 220) | |
) | |
(or | |
(military-population < 215) | |
(players-military-population target-player > 240) | |
) | |
(or | |
(military-population < 235) | |
(players-military-population target-player > 260) | |
) | |
(or | |
(military-population < 255) | |
(players-military-population target-player > 280) | |
) | |
(military-population < 275) | |
=> | |
(set-strategic-number sn-military-level -1) | |
) | |
(defrule | |
(players-military-population target-player > 300) | |
(or | |
(military-population < 295) | |
(players-military-population target-player > 320) | |
) | |
(or | |
(military-population < 315) | |
(players-military-population target-player > 340) | |
) | |
(or | |
(military-population < 335) | |
(players-military-population target-player > 360) | |
) | |
(or | |
(military-population < 355) | |
(players-military-population target-player > 380) | |
) | |
(military-population < 375) | |
=> | |
(set-strategic-number sn-military-level -1) | |
) | |
(defrule | |
(players-military-population target-player > 400) | |
(or | |
(military-population < 395) | |
(players-military-population target-player > 420) | |
) | |
(or | |
(military-population < 415) | |
(players-military-population target-player > 440) | |
) | |
(or | |
(military-population < 435) | |
(players-military-population target-player > 460) | |
) | |
(or | |
(military-population < 455) | |
(players-military-population target-player > 480) | |
) | |
(military-population < 475) | |
=> | |
(set-strategic-number sn-military-level -1) | |
) | |
(defrule | |
(population >= del-civ-pop) | |
(goal escrow-purpose-goal 0) | |
(or (research-completed ri-bracer) | |
(or (research-completed ri-plate-mail) | |
(or (research-completed ri-plate-barding) | |
(or (research-completed ri-blast-furnace) | |
(research-completed ri-ring-archer-armor))))) | |
(strategic-number sn-military-level <= 0) | |
=> | |
(set-strategic-number sn-military-level 1)) | |
(defrule | |
(population >= del-civ-pop) | |
(current-age-time > 180) | |
(current-age >= imperial-age) | |
(goal escrow-purpose-goal 0) | |
(strategic-number sn-military-level <= 0) | |
=> | |
(set-strategic-number sn-military-level 1)) | |
(defrule | |
(or (military-population >= 2) | |
(or (players-military-population any-ally >= 2) | |
(players-military-population any-enemy >= 2))) | |
(timer-triggered one-minute-timer) | |
=> | |
(up-chat-data-to-self "Military level: %d." s: sn-military-level) | |
) | |
#load-if-defined UP-MULTIPLE-ENEMIES ; counter the actual attacker too | |
(defrule ; but only when we're actually under attack | |
(nor (unit-type-count castle-arrow > 0) | |
(or (unit-type-count castle-arrow-chemistry > 0) | |
(or (unit-type-count tc-arrow > 0) | |
(goal under-attack-goal 1)))) | |
=> | |
(up-jump-rule 2)) | |
(defrule | |
(up-compare-goal threat-player-goal >= 1) | |
(up-compare-goal threat-player-goal < 8) | |
(strategic-number sn-target-player-number g:!= threat-player-goal) | |
(strategic-number sn-target-player-number s:== sn-focus-player-number) | |
=> | |
(up-modify-goal math-goal s:= sn-focus-player-number)) | |
(defrule | |
(up-compare-goal threat-player-goal >= 1) | |
(up-compare-goal threat-player-goal < 8) | |
(strategic-number sn-target-player-number g:!= threat-player-goal) | |
(strategic-number sn-target-player-number s:== sn-focus-player-number) | |
=> | |
(up-modify-sn sn-focus-player-number g:= threat-player-goal)) | |
#end-if | |
(defrule | |
(strategic-number sn-infantry-threat < 1) | |
(or | |
(or | |
(or | |
(players-unit-type-count focus-player militiaman-line > 6) | |
(players-unit-type-count focus-player eagle-warrior-line > 6) | |
) | |
(or | |
(players-unit-type-count focus-player teutonic-knight-line > 4) | |
(players-unit-type-count focus-player berserk-line > 4) | |
) | |
) | |
(or | |
(or | |
(players-unit-type-count focus-player samurai-line > 4) | |
(players-unit-type-count focus-player woad-raider-line > 4) | |
) | |
(players-unit-type-count focus-player jaguar-man-line > 4) | |
) | |
) | |
=> | |
(set-strategic-number sn-infantry-threat 1) | |
) | |
(defrule | |
(strategic-number sn-infantry-threat < 1) | |
(or | |
(players-unit-type-count focus-player huskarl-line > 6) | |
(players-unit-type-count focus-player throwing-axeman-line > 6) | |
) | |
=> | |
(set-strategic-number sn-infantry-threat 1) | |
) | |
(defrule | |
(strategic-number sn-infantry-threat < 2) | |
(or | |
(or | |
(or | |
(players-unit-type-count focus-player militiaman-line > 12) | |
(players-unit-type-count focus-player eagle-warrior-line > 12) | |
) | |
(or | |
(players-unit-type-count focus-player teutonic-knight-line > 10) | |
(players-unit-type-count focus-player berserk-line > 10) | |
) | |
) | |
(or | |
(or | |
(players-unit-type-count focus-player samurai-line > 10) | |
(players-unit-type-count focus-player woad-raider-line > 10) | |
) | |
(players-unit-type-count focus-player jaguar-man-line > 12) | |
) | |
) | |
=> | |
(set-strategic-number sn-infantry-threat 2) | |
) | |
(defrule | |
(strategic-number sn-infantry-threat < 2) | |
(or | |
(or | |
(and | |
(players-unit-type-count focus-player spearman-line > 18) | |
(unit-type-count cavalry-unit-class > 20) | |
) | |
(players-unit-type-count focus-player huskarl-line > 12) | |
) | |
(players-unit-type-count focus-player throwing-axeman-line > 12) | |
) | |
=> | |
(set-strategic-number sn-infantry-threat 2) | |
) | |
(defrule | |
(strategic-number sn-infantry-threat < 2) | |
(or | |
(or | |
(or | |
(players-unit-type-count focus-player militiaman-line > 20) | |
(players-unit-type-count focus-player eagle-warrior-line > 20) | |
) | |
(or | |
(players-unit-type-count focus-player teutonic-knight-line > 15) | |
(players-unit-type-count focus-player berserk-line > 15) | |
) | |
) | |
(or | |
(or | |
(players-unit-type-count focus-player samurai-line > 15) | |
(players-unit-type-count focus-player woad-raider-line > 15) | |
) | |
(players-unit-type-count focus-player jaguar-man-line > 15) | |
) | |
) | |
=> | |
(set-strategic-number sn-infantry-threat 3) | |
) | |
(defrule | |
(strategic-number sn-infantry-threat < 3) | |
(or | |
(or | |
(and | |
(players-unit-type-count focus-player spearman-line > 25) | |
(unit-type-count cavalry-unit-class > 20) | |
) | |
(players-unit-type-count focus-player huskarl-line > 16) | |
) | |
(players-unit-type-count focus-player throwing-axeman-line > 15) | |
) | |
=> | |
(set-strategic-number sn-infantry-threat 3) | |
) | |
(defrule | |
(strategic-number sn-infantry-threat < 3) | |
(or | |
(or | |
(or | |
(players-unit-type-count focus-player militiaman-line > 36) | |
(players-unit-type-count focus-player eagle-warrior-line > 36) | |
) | |
(or | |
(players-unit-type-count focus-player teutonic-knight-line > 24) | |
(players-unit-type-count focus-player berserk-line > 24) | |
) | |
) | |
(or | |
(or | |
(players-unit-type-count focus-player samurai-line > 24) | |
(players-unit-type-count focus-player woad-raider-line > 24) | |
) | |
(players-unit-type-count focus-player jaguar-man-line > 24) | |
) | |
) | |
=> | |
(set-strategic-number sn-infantry-threat 4) | |
) | |
(defrule | |
(strategic-number sn-infantry-threat < 4) | |
(or | |
(or | |
(and | |
(players-unit-type-count focus-player spearman-line > 46) | |
(unit-type-count cavalry-unit-class > 20) | |
) | |
(players-unit-type-count focus-player huskarl-line > 24) | |
) | |
(players-unit-type-count focus-player throwing-axeman-line > 24) | |
) | |
=> | |
(set-strategic-number sn-infantry-threat 4) | |
) | |
(defrule | |
(game-time < 1500) | |
(players-building-type-count focus-player castle > 0); early enemy castle and ranged uu civ | |
(or | |
(or | |
(players-civ focus-player briton) | |
(players-civ focus-player chinese) | |
) | |
(or | |
(or | |
(players-civ focus-player mayan) | |
(players-civ focus-player mongol) | |
) | |
(or | |
(players-civ focus-player spanish) | |
(players-civ focus-player turkish) | |
) | |
) | |
) | |
=> | |
(set-strategic-number sn-archer-threat 1) | |
) | |
(defrule | |
(or | |
(players-unit-type-count focus-player hand-cannoneer > 6) | |
(or | |
(players-unit-type-count focus-player conquistador-line > 4) | |
(players-unit-type-count focus-player janissary-line > 4) | |
) | |
) | |
=> | |
(set-strategic-number sn-archer-threat 1) | |
) | |
(defrule | |
(or | |
(or | |
(players-unit-type-count focus-player archer-line > 13) | |
(or | |
(players-unit-type-count focus-player chu-ko-nu-line > 9) | |
(players-unit-type-count focus-player longbowman-line > 9) | |
) | |
) | |
(or | |
(or | |
(players-unit-type-count focus-player plumed-archer-line > 9) | |
(players-unit-type-count focus-player mangudai-line > 9) | |
) | |
(or | |
(players-unit-type-count focus-player cavalry-archer-line > 9) | |
(players-unit-type-count focus-player war-wagon-line > 9) | |
) | |
) | |
) | |
=> | |
(set-strategic-number sn-archer-threat 2) | |
) | |
(defrule | |
(or | |
(or | |
(or | |
(players-unit-type-count focus-player elephant-archer > 9) | |
(players-unit-type-count focus-player genoese-crossbowman > 9) | |
) | |
(or | |
(players-unit-type-count focus-player hand-cannoneer > 13) | |
(and | |
(goal unit-goal archer) | |
(players-unit-type-count focus-player skirmisher-line > 15) | |
) | |
) | |
) | |
(or | |
(players-unit-type-count focus-player conquistador-line > 9) | |
(players-unit-type-count focus-player janissary-line > 9) | |
) | |
) | |
=> | |
(set-strategic-number sn-archer-threat 2) | |
) | |
(defrule | |
(or | |
(or | |
(players-unit-type-count focus-player archer-line > 25) | |
(or | |
(players-unit-type-count focus-player chu-ko-nu-line > 20) | |
(players-unit-type-count focus-player longbowman-line > 20) | |
) | |
) | |
(or | |
(or | |
(players-unit-type-count focus-player plumed-archer-line > 20) | |
(players-unit-type-count focus-player mangudai-line > 20) | |
) | |
(or | |
(players-unit-type-count focus-player cavalry-archer-line > 20) | |
(players-unit-type-count focus-player war-wagon-line > 20) | |
) | |
) | |
) | |
=> | |
(set-strategic-number sn-archer-threat 3) | |
) | |
(defrule | |
(or | |
(or | |
(players-unit-type-count focus-player genoese-crossbowman > 40) | |
(or | |
(players-unit-type-count focus-player chu-ko-nu-line > 40) | |
(players-unit-type-count focus-player longbowman-line > 40) | |
) | |
) | |
(or | |
(or | |
(players-unit-type-count focus-player plumed-archer-line > 40) | |
(players-unit-type-count focus-player mangudai-line > 40) | |
) | |
(or | |
(players-unit-type-count focus-player cavalry-archer-line > 40) | |
(players-unit-type-count focus-player war-wagon-line > 40) | |
) | |
) | |
) | |
=> | |
(set-strategic-number sn-archer-threat 4) | |
) | |
(defrule | |
(or | |
(or | |
(or | |
(players-unit-type-count focus-player magyar-huszar > 4) | |
(players-unit-type-count focus-player boyar > 4) | |
) | |
(or | |
(or | |
(players-unit-type-count focus-player knight-line > 4) | |
(players-unit-type-count focus-player scout-cavalry-line > 4) | |
) | |
(or | |
(players-unit-type-count focus-player tarkan-line > 3) | |
(players-unit-type-count focus-player war-elephant-line > 2) | |
) | |
) | |
) | |
(or | |
(players-unit-type-count focus-player camel-line > 4) | |
(players-unit-type-count focus-player cataphract-line > 4) | |
) | |
) | |
=> | |
(set-strategic-number sn-cavalry-threat 1) | |
) | |
(defrule | |
(or | |
(or | |
(or | |
(players-unit-type-count focus-player magyar-huszar > 10) | |
(players-unit-type-count focus-player boyar > 10) | |
) | |
(or | |
(or | |
(players-unit-type-count focus-player knight-line > 10) | |
(players-unit-type-count focus-player scout-cavalry-line > 10) | |
) | |
(or | |
(players-unit-type-count focus-player tarkan-line > 10) | |
(players-unit-type-count focus-player war-elephant-line > 6) | |
) | |
) | |
) | |
(or | |
(players-unit-type-count focus-player camel-line > 10) | |
(players-unit-type-count focus-player cataphract-line > 10) | |
) | |
) | |
=> | |
(set-strategic-number sn-cavalry-threat 2) | |
) | |
(defrule | |
(or | |
(or | |
(or | |
(players-unit-type-count focus-player magyar-huszar > 16) | |
(players-unit-type-count focus-player boyar > 16) | |
) | |
(or | |
(or | |
(players-unit-type-count focus-player knight-line > 16) | |
(players-unit-type-count focus-player scout-cavalry-line > 16) | |
) | |
(or | |
(players-unit-type-count focus-player tarkan-line > 16) | |
(players-unit-type-count focus-player war-elephant-line > 10) | |
) | |
) | |
) | |
(or | |
(players-unit-type-count focus-player camel-line > 16) | |
(players-unit-type-count focus-player cataphract-line > 16) | |
) | |
) | |
=> | |
(set-strategic-number sn-cavalry-threat 3) | |
) | |
(defrule | |
(or | |
(or | |
(or | |
(players-unit-type-count focus-player magyar-huszar > 26) | |
(players-unit-type-count focus-player boyar > 22) | |
) | |
(or | |
(or | |
(players-unit-type-count focus-player knight-line > 22) | |
(players-unit-type-count focus-player scout-cavalry-line > 26) | |
) | |
(or | |
(players-unit-type-count focus-player tarkan-line > 22) | |
(players-unit-type-count focus-player war-elephant-line > 15) | |
) | |
) | |
) | |
(or | |
(players-unit-type-count focus-player camel-line > 22) | |
(players-unit-type-count focus-player cataphract-line > 22) | |
) | |
) | |
=> | |
(set-strategic-number sn-cavalry-threat 4) | |
) | |
(defrule | |
(or | |
(or | |
(players-unit-type-count focus-player camel-line > 9) | |
(players-unit-type-count focus-player spearman-line > 12) | |
) | |
(or | |
(players-unit-type-count focus-player mameluke-line > 9) | |
(and | |
(game-time < 1380) | |
(players-unit-type-count focus-player spearman-line > 6) | |
) | |
) | |
) | |
=> | |
(set-goal anti-cavalry-threat-goal 1) | |
) | |
(defrule | |
(or | |
(players-unit-type-count any-enemy scout-cavalry-line > 9) | |
(or | |
(players-unit-type-count any-enemy eagle-warrior-line > 9) | |
(goal enemy-goal eagle-warrior) | |
) | |
) | |
=> | |
(set-goal anti-monk-threat-goal 1) | |
) | |
(defrule | |
(or | |
(players-unit-type-count any-enemy monk > 5) | |
(and | |
(game-time < 1500) | |
(players-building-type-count focus-player monastery > 1) | |
) | |
) | |
(or | |
(game-time < 1500) | |
(players-unit-type-count any-enemy monk > 11) | |
) | |
(or | |
(game-time < 1800) | |
(players-unit-type-count any-enemy monk > 18) | |
) | |
=> | |
(set-goal monk-threat-goal 1) | |
) | |
; Following rules help to make up for poor scouting. | |
(defrule | |
(game-time > 900) | |
(game-time < 1800) | |
(strategic-number sn-cavalry-threat == 0) | |
(or | |
(players-unit-type-count focus-player knight-line > 0) | |
(game-time < 1320) | |
) | |
(players-building-type-count focus-player stable > 0) | |
=> | |
(set-strategic-number sn-cavalry-threat 1) | |
) | |
(defrule | |
(strategic-number sn-cavalry-threat < 2) | |
(or | |
(and | |
(and | |
(game-time < 1500) | |
(players-unit-type-count focus-player knight-line > 3) | |
) | |
(or | |
(players-unit-type-count focus-player knight-line > 5) | |
(game-time < 1320) | |
) | |
) | |
(players-building-type-count focus-player stable > 1) | |
) | |
=> | |
(set-strategic-number sn-cavalry-threat 2) | |
) | |
(defrule | |
(game-time > 1020) | |
(game-time < 1260) | |
(goal strategy-goal flush) | |
(strategic-number sn-cavalry-threat == 0) | |
(players-building-type-count focus-player barracks < 1) | |
(players-building-type-count focus-player archery-range == 0) | |
(players-military-population focus-player < 2) | |
(players-building-type-count focus-player market == 0) | |
(nor | |
(players-civ focus-player aztec) | |
(players-civ focus-player mayan) | |
) | |
=> | |
(set-strategic-number sn-cavalry-threat 1) | |
) | |
#load-if-defined DEATH-MATCH | |
(defrule | |
(strategic-number sn-cavalry-threat < 1) | |
(current-age >= castle-age) | |
(game-time < 480) | |
(nor | |
(or | |
(players-civ focus-player gothic) | |
(players-civ focus-player korean) | |
) | |
(or | |
(players-civ focus-player viking) | |
(players-civ focus-player briton) | |
) | |
) | |
(nor | |
(players-civ focus-player japanese) | |
(goal meso-enemy-goal 1) | |
) | |
=> | |
(set-strategic-number sn-cavalry-threat 1) | |
) | |
#end-if | |
(defrule | |
(strategic-number sn-archer-threat < 1) | |
(players-current-age focus-player < imperial-age) | |
(players-current-age-time focus-player < 600) | |
(players-building-type-count focus-player archery-range > 1) | |
=> | |
(set-strategic-number sn-archer-threat 1) | |
) | |
#load-if-not-defined DIFFICULTY-EASIEST | |
#load-if-not-defined DIFFICULTY-EASY | |
#load-if-not-defined DIFFICULTY-MODERATE | |
#load-if-not-defined DIFFICULTY-HARD | |
;(defrule | |
;(or (goal unit-goal archer) | |
; (goal strategy-goal flush)) | |
; (up-research-status c: ri-ballistics < research-pending) | |
;(or (and (strategic-number sn-cavalry-threat > 1) | |
; (players-current-age every-enemy >= castle-age)) | |
; (players-unit-type-count focus-player eagle-warrior-line > 10)) | |
;=> | |
; (set-difficulty-parameter ability-to-maintain-distance 100); stay | |
;) | |
(defrule | |
(or (or (unit-type-count fire-ship-line >= 1) | |
(unit-type-count scorpion-line >= 20)) | |
(or (unit-type-count ranged-unit-class >= 50) | |
(unit-type-count war-wagon-line >= 50))) | |
=> | |
(set-difficulty-parameter ability-to-maintain-distance 100); stay | |
) | |
(defrule | |
(unit-type-count fire-ship-line < 1) | |
(unit-type-count scorpion-line < 18) | |
(unit-type-count ranged-unit-class < 45) | |
(unit-type-count war-wagon-line < 45) | |
=> | |
(set-difficulty-parameter ability-to-dodge-missiles ability-to-dodge); 0 = dodge | |
(set-difficulty-parameter ability-to-maintain-distance ability-to-kite)); 0 = kite | |
#end-if | |
#end-if | |
#end-if | |
#end-if | |
#load-if-defined UP-MULTIPLE-ENEMIES | |
(defrule ; test | |
(nor (unit-type-count castle-arrow > 0) | |
(or (unit-type-count castle-arrow-chemistry > 0) | |
(or (unit-type-count tc-arrow > 0) | |
(goal under-attack-goal 1)))) | |
=> | |
(up-jump-rule 1)) | |
(defrule | |
(strategic-number sn-target-player-number g:== threat-player-goal) | |
(strategic-number sn-target-player-number s:!= sn-focus-player-number) | |
=> | |
(up-modify-sn sn-focus-player-number s:== sn-target-player-number) | |
;jtbs (up-modify-sn sn-focus-player-number g:= math-goal) | |
) | |
#end-if | |
#end-if | |
; Scouting | |
#load-if-not-defined WONDER-RACE | |
#load-if-not-defined DEATH-MATCH | |
#load-if-not-defined SCANDANAVIA-MAP | |
(defrule | |
(strategic-number sn-minimum-civilian-explorers > 0) | |
(timer-triggered civ-explore-timer) | |
(game-time > 90) | |
(strategic-number sn-maximum-wood-drop-distance == 0) | |
=> | |
(set-strategic-number sn-maximum-wood-drop-distance -1) | |
(chat-local-to-self "Enable wood gathering.") | |
) | |
#load-if-not-defined UP-MULTIPLAYER-GAME ; bug in MP | |
(defrule | |
(game-time > 90) | |
(strategic-number sn-percent-civilian-explorers == 0) | |
(building-type-count-total mill == 0) | |
(unit-type-count villager < 11) | |
(sheep-and-forage-too-far) | |
(strategic-number sn-current-age == dark) | |
(building-type-count town-center > 0) | |
=> | |
(set-strategic-number sn-percent-civilian-builders 0) | |
(set-strategic-number sn-percent-civilian-explorers 100) | |
(set-strategic-number sn-minimum-civilian-explorers 12) | |
(set-strategic-number sn-maximum-food-drop-distance 32) | |
(set-strategic-number sn-maximum-wood-drop-distance 0) | |
(enable-timer civ-explore-timer 20) | |
(chat-local-to-self "Civ explore again.") | |
(disable-self) | |
) | |
#end-if | |
#end-if | |
(defrule | |
(or | |
(players-building-type-count every-enemy dock == 0) | |
(and | |
(warboat-count > 7) | |
(players-building-type-count any-enemy dock == 0) | |
) | |
) | |
(warboat-count > 0) | |
(strategic-number sn-number-boat-explore-groups < 1) | |
(nand | |
(warboat-count < 6) | |
(unit-type-count revealer > 0) | |
) | |
=> | |
(set-strategic-number sn-number-boat-explore-groups 1) | |
(set-strategic-number sn-total-number-explorers 2) | |
(chat-local-to-self "Search for enemy docks.") | |
) | |
#else | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock == water-islands) | |
(players-building-count every-enemy == 0) | |
(goal under-attack-goal 0) | |
(warboat-count > 0) | |
=> | |
(set-strategic-number sn-number-boat-explore-groups 5) | |
(set-strategic-number sn-total-number-explorers 6) | |
) | |
(defrule | |
(strategic-number sn-number-boat-explore-groups > 1) | |
(players-building-type-count every-enemy dock > 0) | |
=> | |
(set-strategic-number sn-number-boat-explore-groups 1) | |
) | |
#end-if | |
(defrule | |
(game-time s:>= sn-home-exploration-time); 300 by default | |
(nor (map-type islands) | |
(map-type team-islands)) | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(players-building-count any-enemy <= 0); every | |
(military-population >= 1) | |
; (up-compare-goal strategy-goal != boom) | |
=> | |
(chat-local-to-self "Searching for the closest enemy.") | |
(up-send-scout group-type-land-explore scouting-type) | |
(enable-timer scouting-timer 120) | |
(disable-self)) | |
(defrule | |
(timer-triggered scouting-timer) | |
(game-time < 1200) | |
(nor (map-type islands) | |
(map-type team-islands)) | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(players-building-count every-enemy <= 0) | |
(military-population >= 1) | |
; (up-compare-goal strategy-goal != boom) | |
=> | |
(chat-local-to-self "Searching for the closest enemy again.") | |
(up-send-scout group-type-land-explore scouting-type) | |
(enable-timer scouting-timer 120)); 80 | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(or (and (unit-type-count knight-line == 0) | |
(strategic-number sn-military-level >= 0)) | |
(game-time >= 1380)) | |
(game-time > 1140) | |
(game-time < 1800) | |
(timer-triggered scouting-timer) | |
(strategic-number sn-infantry-threat == 0) | |
(strategic-number sn-archer-threat == 0) | |
(strategic-number sn-cavalry-threat == 0) | |
(players-building-count any-enemy >= 1) | |
(players-current-age focus-player >= feudal-age) | |
(goal monk-threat-goal 0) | |
=> | |
(enable-timer scouting-timer 180) | |
; (set-strategic-number sn-percent-attack-soldiers 1) | |
; (attack-now) | |
(chat-local-to-self "Scouting the target-player.") | |
(up-send-scout group-type-land-explore scout-enemy) | |
) | |
(defrule | |
(game-time > 1500) | |
(players-building-count every-enemy > 0) | |
(or (or (strategic-number sn-infantry-threat >= 1) | |
(strategic-number sn-archer-threat >= 1)) | |
(or (strategic-number sn-cavalry-threat >= 1) | |
(goal monk-threat-goal 1))) | |
=> | |
(set-strategic-number sn-number-explore-groups 0);disable scouting when found threats to not waste units | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(or (and (and | |
(strategic-number sn-infantry-threat == 0) | |
(strategic-number sn-archer-threat == 0) | |
) | |
(and | |
(strategic-number sn-cavalry-threat == 0) | |
(goal monk-threat-goal 0) | |
) | |
) | |
(players-building-count any-enemy == 0) | |
) | |
(strategic-number sn-number-explore-groups == 0) | |
=> | |
(set-strategic-number sn-number-explore-groups 1); restart scouting when no threats found | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(players-current-age any-enemy == feudal-age) | |
(players-current-age-time any-enemy > 360); enemy in feudal age for 6+ mins | |
(game-time < 1320) | |
(players-military-population any-enemy < 2); yet no military | |
(players-building-count any-enemy == 0); not all enemy sighted | |
(military-population > 10) | |
(goal position-goal pocket) | |
=> | |
(set-strategic-number sn-number-explore-groups 3); find the sling | |
(set-strategic-number sn-total-number-explorers 3) | |
(disable-self) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(nor | |
(players-civ every-enemy gothic) | |
(players-civ every-enemy viking) | |
) | |
(nor | |
(players-civ every-enemy japanese) | |
(goal meso-enemy-goal 1) | |
) | |
(strategic-number sn-cavalry-threat == 0) | |
(strategic-number sn-number-explore-groups == 0) | |
=> | |
(set-strategic-number sn-number-explore-groups 1);resume exploring | |
) | |
(defrule | |
(stance-toward focus-player enemy) | |
(or (players-civ focus-player aztec) | |
(or (players-civ focus-player mayan) | |
(players-civ focus-player incan))) | |
(up-compare-goal meso-enemy-goal != 1) | |
=> | |
(set-goal meso-enemy-goal 1) | |
) | |
(defrule | |
(stance-toward focus-player enemy) | |
(nor (players-civ focus-player aztec) | |
(or (players-civ focus-player mayan) | |
(players-civ focus-player incan))) | |
(up-compare-goal meso-enemy-goal != 0) | |
=> | |
(set-goal meso-enemy-goal 0) | |
) | |
#load-if-not-defined POPULATION-CAP-25 | |
#load-if-not-defined UP-POCKET-POSITION | |
;gather information about what the enemy (mainly 1v1) is doing | |
(defrule | |
(current-age == dark-age); we have +2 villagers, so enemy feudals early?! => flush | |
(unit-type-count villager >= 22); or +3 villagers as meso as they start with either one more or free loom and save time. | |
(or | |
(players-civilian-population target-player < 21) | |
(unit-type-count villager >= 23) | |
) | |
(or | |
(players-civilian-population target-player < 22) | |
(unit-type-count villager >= 24) | |
) | |
(or | |
(players-civilian-population target-player < 23) | |
(unit-type-count villager >= 25) | |
) | |
(players-civilian-population target-player < 24) | |
=> | |
(set-goal enemy-goal flush) | |
) | |
(defrule | |
(current-age == dark-age); we have +2 villagers, so enemy feudals early?! => flush | |
(unit-type-count villager >= 26) | |
(or | |
(players-civilian-population target-player < 25) | |
(unit-type-count villager >= 27) | |
) | |
(or | |
(players-civilian-population target-player < 26) | |
(unit-type-count villager >= 28) | |
) | |
(or | |
(players-civilian-population target-player < 27) | |
(unit-type-count villager >= 29) | |
) | |
(or | |
(players-civilian-population target-player < 28) | |
(unit-type-count villager >= 30) | |
) | |
(players-civilian-population target-player < 29) | |
=> | |
(set-goal enemy-goal flush) | |
) | |
(defrule | |
(or | |
(game-time < 1020) | |
(players-military-population target-player > 11) | |
) | |
(players-current-age target-player == feudal-age) | |
(players-military-population target-player > 4) | |
=> | |
(set-goal enemy-goal flush) | |
) | |
#end-if ; <- no pocket | |
(defrule | |
(players-current-age target-player == dark-age) | |
(or (goal ffa-game-goal 1) | |
(players-civilian-population target-player >= 26)) | |
(goal enemy-goal flush) | |
=> | |
(set-goal enemy-goal 0) | |
) | |
#load-if-defined CHINESE-CIV | |
(defrule | |
(players-current-age target-player == dark-age) | |
(or (starting-resources >= medium-resources); don't false trigger flush if chinese are able to keep their villager advantage | |
(regicide-game)) | |
(goal enemy-goal flush) | |
=> | |
(set-goal enemy-goal 0) | |
) | |
#end-if | |
(defrule | |
(players-current-age target-player == castle-age) | |
(game-time < 1200) | |
(players-military-population target-player < 3); enemy fast castle without military could be rush so better be prepared | |
(nor | |
(goal enemy-goal rush) | |
(goal enemy-goal eagle-warrior) | |
) | |
=> | |
(set-goal enemy-goal rush) | |
) | |
(defrule | |
(game-time < 1260) | |
(players-current-age target-player >= castle-age) | |
(players-military-population target-player > 5) | |
(goal enemy-goal flush) | |
=> | |
(set-goal enemy-goal skirmisher) | |
(chat-to-player my-player-number "The enemy isn't flushing.") | |
) | |
(defrule | |
(game-time < 1720) | |
(or | |
(and | |
(players-current-age target-player == feudal-age) | |
(up-compare-goal enemy-goal != flush) | |
) | |
(players-unit-type-count target-player skirmisher-line > 8) | |
) | |
(players-military-population target-player >= 6) | |
=> | |
(set-goal enemy-goal skirmisher) | |
(chat-to-player my-player-number "Enemy trash-unit strategy detected.") | |
(disable-self) | |
) | |
(defrule | |
(game-time < 1500) | |
(or | |
(or | |
(players-unit-type-count target-player eagle-warrior-line > 7) | |
(and | |
(players-building-type-count target-player barracks > 2) | |
(players-unit-type-count target-player militiaman-line < 3) | |
) | |
) | |
(and | |
(game-time < 1200) | |
(and | |
(players-building-type-count target-player barracks > 1) | |
(players-military-population target-player < 2) | |
) | |
) | |
) | |
=> | |
(set-goal enemy-goal eagle-warrior) | |
(chat-to-player my-player-number "24Enemy EW rush detected.") | |
(disable-self) | |
) | |
(defrule | |
(game-time < 1500) | |
(players-unit-type-count target-player eagle-warrior-line > 4) | |
(players-current-age-time target-player < 150) | |
=> | |
(set-goal enemy-goal eagle-warrior) | |
(chat-to-player my-player-number "24Enemy EW rush detected.") | |
(disable-self) | |
) | |
(defrule | |
(game-time >= 1800) | |
(or | |
(players-unit-type-count target-player eagle-warrior-line < 5) | |
(game-time > 2400) | |
) | |
(players-unit-type-count target-player eagle-warrior-line < 20) | |
(goal enemy-goal eagle-warrior) | |
=> | |
(set-goal enemy-goal 0) | |
(disable-self) | |
) | |
#end-if | |
(defrule | |
(or | |
(or | |
(goal under-attack-goal 1) | |
(up-compare-goal patrol-goal >= 0) | |
) | |
(or | |
(and | |
(strategic-number sn-maximum-town-size >= 40) | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands); TSA is not used on islands | |
) | |
(strategic-number sn-number-attack-groups > 0) | |
) | |
) | |
(building-type-count-total town-center > 0) | |
=> | |
(set-goal hostilities-goal 1) | |
) | |
;******************** STRATEGY SELECTION ******************** | |
#load-if-not-defined POST-IMPERIAL-AGE-START | |
#load-if-not-defined UP-POCKET-POSITION | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(goal enemy-goal flush) | |
(up-compare-goal control-goal != aggressive-rush) | |
(up-compare-goal control-goal != shot) | |
(up-compare-goal strategy-goal != sling) | |
(up-compare-goal position-goal == flank) | |
(strategic-number sn-current-age == dark); not too early, if the enemy just had idle TC and we have no food for feudal | |
(food-amount >= 430) | |
=> | |
(set-goal strategy-goal flush) | |
(set-goal unit-goal default-flush-unit) | |
(set-strategic-number sn-task-ungrouped-soldiers 1); spread military to find forward towers, set back after 6 mins | |
(set-goal spread-military-goal 1) | |
(enable-timer spread-military-timer 360) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(goal enemy-goal flush) | |
(up-compare-goal control-goal != aggressive-rush) | |
(up-compare-goal control-goal != shot) | |
(up-compare-goal strategy-goal != sling) | |
(up-compare-goal position-goal == flank) | |
(players-current-age focus-player == feudal-age) | |
(strategic-number sn-current-age == df-transit) | |
=> | |
(set-goal strategy-goal flush) | |
(set-goal unit-goal default-flush-unit) | |
(set-strategic-number sn-task-ungrouped-soldiers 1); spread military to find forward towers, set back after 5 mins | |
(set-goal spread-military-goal 1) | |
(enable-timer spread-military-timer 300) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(goal enemy-goal flush) | |
(current-age == dark-age) | |
(goal control-goal aggressive-rush) | |
(up-compare-goal position-goal == flank) | |
=> | |
(set-goal strategy-goal flush) | |
(set-goal unit-goal default-flush-unit) | |
(set-goal control-goal 0) | |
(set-strategic-number sn-task-ungrouped-soldiers 1); spread military to find forward towers, set back after 5 mins | |
(set-goal spread-military-goal 1) | |
(enable-timer spread-military-timer 300) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(goal nr-map-goal -1) | |
(building-type-count stone-wall < 15); not on walled maps | |
(strategic-number sn-current-age == feudal) | |
(up-compare-goal strategy-goal != flush) | |
(up-compare-goal control-goal != shot) | |
(up-compare-goal position-goal == flank); hm | |
(building-type-count-total barracks > 0) | |
(or | |
(food-amount < 500) | |
(goal unit-goal skirmisher) | |
) | |
(players-military-population focus-player > 2) | |
=> | |
(set-goal strategy-goal flush) | |
(set-goal unit-goal default-flush-unit) | |
(set-goal control-goal belated-flush-defense); change gatherer percentages to collect more wood | |
(chat-to-player my-player-number "Counter-flushing. 1") | |
) | |
#load-if-not-defined BRITON-CIV | |
#load-if-not-defined MAYAN-CIV | |
#load-if-not-defined VIKING-CIV | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(building-type-count stone-wall < 15); not on walled maps | |
(strategic-number sn-current-age == feudal) | |
(goal strategy-goal rush) | |
(goal enemy-goal flush) | |
(up-compare-goal position-goal == flank); hm | |
(nor | |
(or | |
(goal control-goal aggressive-rush) | |
(goal control-goal shot) | |
) | |
(goal position-goal pocket) | |
) | |
(building-type-count barracks > 0) | |
=> | |
(set-goal strategy-goal flush) | |
(set-goal unit-goal default-flush-unit) | |
(set-goal control-goal belated-flush-defense); change gatherer percentages to collect more wood | |
(chat-to-player my-player-number "Counter-flushing. 2") | |
) | |
#else | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(building-type-count stone-wall < 15); not on walled maps | |
(strategic-number sn-current-age == feudal) | |
(goal strategy-goal rush) | |
(goal enemy-goal flush) | |
(goal position-goal flank) | |
(up-compare-goal control-goal != shot) | |
(building-type-count-total stable == 0) | |
(building-type-count barracks > 0) | |
=> | |
(set-goal strategy-goal flush) | |
(set-goal unit-goal archer) | |
(set-goal control-goal belated-flush-defense); change gatherer percentages to collect more wood | |
(chat-to-player my-player-number "Counter-flushing. 3") | |
) | |
#end-if | |
#end-if | |
#end-if | |
#end-if | |
#load-if-not-defined DIFFICULTY-MODERATE | |
#load-if-not-defined DIFFICULTY-HARD | |
#load-if-not-defined DIFFICULTY-HARDEST | |
;#load-if-not-defined DEATH-MATCH | |
(defrule | |
(current-age < feudal-age);(strategic-number sn-current-age == dark) | |
(goal strategy-goal flush) | |
=> | |
(set-goal strategy-goal boom); rush | |
(set-goal unit-goal default-unit) | |
(chat-local-to-self "Don't flush on easy difficulty-levels.") | |
) | |
;#end-if | |
#end-if | |
#end-if | |
#end-if | |
#load-if-defined DEATH-MATCH ; treat this as flush and build an army in feudal age. | |
;(defrule | |
; (strategic-number sn-current-age == df-transit) | |
;=> | |
; (set-goal enemy-goal flush) | |
; (set-goal strategy-goal flush) | |
; (set-goal unit-goal default-flush-unit) | |
; (disable-self) | |
;) | |
#else | |
#load-if-not-defined SARACEN-CIV | |
#load-if-not-defined DIFFICULTY-MODERATE | |
#load-if-not-defined DIFFICULTY-HARD | |
#load-if-not-defined DIFFICULTY-HARDEST | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(nor | |
(goal strategy-goal flush) | |
(goal strategy-goal sling) | |
) | |
(or | |
(building-type-count-total mining-camp == 0) | |
(dropsite-min-distance gold < 0) | |
) | |
(strategic-number sn-current-age == feudal) | |
(building-type-count-total market < 1) | |
(current-age-time < 10) | |
(nor | |
(town-under-attack) | |
(goal unit-goal eagle-warrior) | |
) | |
=> | |
(set-goal strategy-goal flush) | |
(set-goal unit-goal no-gold-flush-unit) | |
(set-strategic-number sn-maximum-gold-drop-distance 20) | |
) | |
#end-if | |
#end-if | |
#end-if | |
#end-if | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(goal unit-goal my-unique-unit-line) | |
(strategic-number sn-current-age == feudal) | |
(current-age-time < 10) | |
(or | |
(dropsite-min-distance stone < 0); no stone found | |
(dropsite-min-distance stone > 20); so switch strategy ; 33 | |
) | |
=> | |
(set-goal unit-goal default-ranged); should work for all civs | |
(set-goal ranged-unit-type-goal default-ranged) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(or (civ-selected aztec) | |
(or (civ-selected hun) | |
(or (civ-selected incan) | |
(civ-selected persian)))) | |
(goal unit-goal my-unique-unit-line) | |
=> | |
(chat-local-to-self "Trying to find an alternate strategy: No castledrop.") | |
(set-goal unit-goal default-ranged); should work for all civs | |
(set-goal ranged-unit-type-goal default-ranged) | |
(disable-self) | |
) | |
(defrule | |
(or (and (player-in-game any-human-enemy) | |
(or (or (map-type black-forest) | |
(cc-players-unit-type-count 0 tree-class > heavy-wood)) | |
(or (map-type mongolia) | |
(map-type oasis)))) | |
(building-type-count stone-wall-line > 15)) | |
=> | |
(set-goal nr-map-goal 1) | |
(disable-self) | |
) | |
(defrule | |
(taunt-detected any-ally 38) | |
(taunt-detected any-ally 33) | |
=> | |
(acknowledge-taunt this-any-ally 38) | |
(acknowledge-taunt this-any-ally 33) | |
(chat-to-allies "1") | |
(chat-to-allies-using-id 7110); "Yes." | |
) | |
(defrule | |
(or (taunt-detected any-ally 32) | |
(taunt-detected any-ally 33)) | |
(or (goal strategy-goal sling) | |
(goal control-goal shot)) | |
=> | |
(acknowledge-taunt this-any-ally 32) | |
(acknowledge-taunt this-any-ally 33) | |
(chat-to-allies "2") | |
(chat-to-allies-using-id 7111); "No." | |
) | |
; *** STRATEGY DEPENDING ON CIV *** | |
#load-if-defined AZTEC-CIV | |
#load-if-not-defined ARABIA-MAP | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(game-time > 13) | |
(game-time < 60) | |
(random-number <= 20) | |
(or (goal position-goal pocket) | |
(or (map-size giant) | |
(map-size ludikris))) | |
;(nand (goal position-goal flank) | |
; (or (map-size large) | |
; (or (map-size giant) | |
; (map-size ludikris)))) | |
=> | |
(set-goal strategy-goal boom) | |
(set-goal unit-goal archer) | |
(set-goal ranged-unit-type-goal archer) | |
(set-goal control-goal 0) | |
(disable-self) | |
) | |
(defrule | |
(game-time < 1500) | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(goal unit-goal archer) | |
(goal strategy-goal boom) | |
(up-compare-goal position-goal == flank) | |
(strategic-number sn-military-level < 0) | |
(building-type-count-total town-center > tc-level-one) | |
=> | |
(set-goal strategy-goal rush) | |
(set-goal control-goal 0) | |
(disable-self) | |
) | |
#else | |
#load-if-not-defined UP-POCKET-POSITION | |
#load-if-defined LOW-RESOURCES-START | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(game-time > 13) | |
(game-time < 60) | |
(random-number <= 20) | |
(up-compare-goal position-goal == flank) | |
(up-compare-goal control-goal != shot) | |
=> | |
(set-goal strategy-goal flush) | |
(set-goal unit-goal archer) | |
(set-goal ranged-unit-type-goal archer) | |
(set-goal control-goal 0) | |
(disable-self) | |
) | |
#end-if | |
#end-if | |
#end-if | |
(defrule | |
(or | |
(nand | |
(goal meso-enemy-goal 1) | |
(goal position-goal flank) | |
) | |
(goal nr-map-goal 1) | |
) | |
(random-number > 20) | |
(random-number <= 40) | |
(game-time > 13) | |
(game-time < 60) | |
=> | |
(set-goal strategy-goal rush) | |
(set-goal unit-goal monk) | |
(set-goal ranged-unit-type-goal monk) | |
(disable-self) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(or | |
(random-number <= 20) | |
(random-number > 86) | |
) | |
(goal position-goal pocket) | |
(game-time > 13) | |
(game-time < 60) | |
=> | |
(set-goal strategy-goal boom) | |
(set-goal unit-goal archer) | |
(set-goal control-goal 0) | |
(disable-self) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(goal ffa-game-goal -1) | |
(goal nr-map-goal -1) | |
(strategic-number sn-current-age <= fc-transit) | |
(nor | |
(players-civ any-ally briton); don't play with too much ranged | |
(players-civ any-ally mayan) | |
) | |
(random-number >= 70) | |
(game-time < 60) | |
=> | |
(set-goal strategy-goal rush) | |
(set-goal unit-goal archer) | |
(set-goal control-goal aggressive-rush) | |
(disable-self) | |
) | |
(defrule | |
(strategic-number sn-current-age == castle) | |
(or | |
(and | |
(goal strategy-goal boom) | |
(or | |
(goal unit-goal archer) | |
(goal unit-goal eagle-warrior) | |
) | |
) | |
(goal unit-goal skirmisher) | |
) | |
(building-type-count-total town-center >= tc-level-three) | |
(or | |
(building-type-count-total town-center >= tc-level-four) | |
(goal unit-goal eagle-warrior) | |
) | |
=> | |
(set-goal strategy-goal fast-imp) | |
) | |
(defrule | |
(or | |
(or | |
(players-unit-type-count focus-player huskarl-line > 15) | |
(players-unit-type-count focus-player samurai-line > 15) | |
) | |
(or | |
(and | |
(strategic-number sn-cavalry-threat > 3) | |
(goal anti-monk-threat-goal 0) | |
) | |
(strategic-number sn-minimum-water-body-size-for-dock == water-islands) | |
) | |
) | |
=> | |
(set-goal ranged-unit-type-goal monk) | |
(disable-self) | |
) | |
(defrule | |
(goal unit-goal monk) | |
(or | |
(and | |
(building-type-count-total barracks > 0) | |
(building-type-count-total monastery < 2) | |
) | |
(up-research-status c: ri-long-swordsman >= research-pending) | |
) | |
=> | |
(set-goal strategy-goal rush) | |
(set-goal unit-goal eagle-warrior) | |
) | |
(defrule | |
(strategic-number sn-current-age >= ci-transit) | |
(or | |
(or | |
(goal strategy-goal boom) | |
(goal strategy-goal fast-imp) | |
) | |
(and | |
(goal unit-goal skirmisher) | |
(goal ranged-unit-type-goal archer) | |
) | |
) | |
(up-compare-goal unit-goal != monk) | |
=> | |
(set-goal strategy-goal rush) | |
(set-goal unit-goal eagle-warrior) | |
) | |
(defrule | |
(strategic-number sn-current-age < ci-transit) | |
(goal unit-goal eagle-warrior) | |
(goal strategy-goal rush) | |
(or | |
(military-population > 60) | |
(unit-type-count-total eagle-warrior-line > 45) | |
) | |
=> | |
(set-goal unit-goal eagle-warrior) | |
(set-goal strategy-goal fast-imp) | |
(set-goal ranged-unit-type-goal 0) | |
) | |
(defrule | |
(goal unit-goal eagle-warrior) | |
(goal strategy-goal rush) | |
(or | |
(players-building-type-count focus-player castle > 0) | |
(or | |
(players-unit-type-count focus-player teutonic-knight-line > 0) | |
(players-unit-type-count focus-player cataphract-line > 0) | |
) | |
) | |
(game-time < 1500) | |
=> | |
(set-goal unit-goal eagle-warrior) | |
(set-goal strategy-goal fast-imp) | |
(set-goal ranged-unit-type-goal monk) | |
) | |
#load-if-defined UP-1-PLAYER-TEAM | |
(defrule | |
(nor | |
(goal control-goal my-unique-unit-line) | |
(goal unit-goal my-unique-unit-line) | |
) | |
(civilian-population > 90) | |
(or | |
(and | |
(strategic-number sn-current-age >= ci-transit) | |
(game-time > 3000) | |
) | |
(and | |
(food-amount > 400) | |
(gold-amount < 100) | |
) | |
) | |
(current-age-time > 300) | |
=> | |
(set-goal control-goal militiaman-line) | |
(chat-to-player my-player-number "Trying to research m@a and LSM.") | |
(disable-self) | |
) | |
#end-if | |
(defrule | |
(game-time < 2100) | |
(players-current-age focus-player == imperial-age) | |
(or | |
(goal unit-goal mix) | |
(goal unit-goal eagle-warrior) | |
) | |
(players-unit-type-count focus-player eagle-warrior-line > 5) | |
=> | |
(set-goal control-goal militiaman-line) | |
(chat-to-player my-player-number "Trying to research m@a and LSM.") | |
(disable-self) | |
) | |
(defrule | |
(food-amount > 150) | |
(or | |
(gold-amount < 50) | |
(food-amount > 300) | |
) | |
(or | |
(and | |
(up-research-status c: ri-iron-casting >= research-pending) | |
(and | |
(goal unit-goal eagle-warrior) | |
(goal enemy-goal eagle-warrior) | |
) | |
) | |
(and | |
(goal unit-goal monk) | |
(players-unit-type-count focus-player eagle-warrior-line > 7) | |
) | |
) | |
=> | |
(set-goal control-goal militiaman-line) | |
(chat-to-player my-player-number "Going for long-swordsmen to counter an EW rush.") | |
(disable-self) | |
) | |
#load-if-not-defined RIVERS-MAP | |
#load-if-not-defined BALTIC-MAP | |
(defrule | |
(or | |
(and | |
(strategic-number sn-current-age >= ci-transit) | |
(and | |
(goal control-goal militiaman-line) | |
(up-research-status c: ri-long-swordsman >= research-pending) | |
) | |
) | |
(strategic-number sn-minimum-water-body-size-for-dock == water-islands) | |
) | |
(nand | |
(unit-type-count-total eagle-warrior-line > 20); go for eew instead as some enemy still may have ranged units | |
(strategic-number sn-archer-threat > 0) | |
) | |
=> | |
(set-goal unit-goal militiaman-line) | |
(disable-self) | |
) | |
#end-if | |
#end-if | |
(defrule | |
(up-compare-goal control-goal != shot) | |
(strategic-number sn-infantry-threat >= 3) | |
(players-unit-type-count every-enemy samurai-line < 20) | |
(nand | |
(players-unit-type-count focus-player eagle-warrior-line > 20) | |
(goal control-goal militiaman-line) | |
) | |
(dropsite-min-distance stone < 5) | |
(building-type-count-total town-center >= tc-level-two) | |
=> | |
(set-goal control-goal my-unique-unit-line) | |
(set-goal uu-up-goal 1) | |
(disable-self) | |
) | |
(defrule | |
(building-type-count castle > 1) | |
(goal control-goal my-unique-unit-line) | |
=> | |
(set-goal unit-goal my-unique-unit-line) | |
(set-goal control-goal 0) | |
(disable-self) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock == water-mixed) | |
(or (map-type baltic) | |
(map-type rivers)) | |
(current-age < castle-age) | |
(goal unit-goal eagle-warrior) | |
(players-unit-type-count any-enemy galley-line > 0) | |
=> | |
(set-strategic-number sn-minimum-water-body-size-for-dock water-islands) | |
(set-goal strategy-goal rush) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock == water-islands) | |
(or | |
(map-type baltic) | |
(map-type rivers) | |
) | |
(goal unit-goal eagle-warrior) | |
(or | |
(goal enemy-boats-goal 0) | |
(warboat-count > 40) | |
) | |
=> | |
(set-strategic-number sn-minimum-water-body-size-for-dock water-mixed) | |
(set-goal strategy-goal rush) | |
(set-goal unit-goal eagle-warrior) | |
) | |
(defrule | |
(goal strategy-goal flush) | |
(strategic-number sn-current-age >= fc-transit) | |
(or | |
(players-building-type-count focus-player watch-tower > 3) | |
(and | |
(and | |
(players-unit-type-count focus-player skirmisher-line > 7) | |
(players-unit-type-count focus-player militiaman-line < 5) | |
) | |
(or | |
(players-unit-type-count focus-player skirmisher-line > 15) | |
(game-time < 1500) | |
) | |
) | |
) | |
=> | |
(set-goal strategy-goal rush) | |
(set-goal unit-goal eagle-warrior) | |
(disable-self) | |
) | |
(defrule | |
(goal strategy-goal flush) | |
(goal unit-goal archer) | |
(strategic-number sn-current-age == fc-transit) | |
=> | |
(set-goal strategy-goal rush) | |
(set-goal unit-goal archer) | |
(set-goal control-goal aggressive-rush) | |
(disable-self) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(taunt-detected any-ally 32) | |
=> | |
(acknowledge-taunt this-any-ally 32) | |
(set-goal strategy-goal rush) | |
(set-goal control-goal aggressive-rush) | |
(set-goal ranged-unit-type-goal archer) | |
(set-goal unit-goal archer) | |
(chat-to-allies-using-id 22155) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(taunt-detected any-ally 33) | |
=> | |
(acknowledge-taunt this-any-ally 33) | |
(set-goal strategy-goal boom) | |
(set-goal control-goal 0) | |
(set-goal unit-goal eagle-warrior) | |
(chat-to-allies-using-id 22156) | |
) | |
#end-if ; AZTEC CIV STRATEGY | |
#load-if-defined BRITON-CIV | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(or | |
(or | |
(random-number <= 20) | |
(regicide-game) | |
) | |
(goal nr-map-goal 1) | |
) | |
(game-time > 13) | |
(game-time < 60) | |
=> | |
(set-goal unit-goal my-unique-unit-line) | |
(set-goal control-goal 0) | |
(set-goal ranged-unit-type-goal 0) | |
(set-goal strategy-goal boom) | |
(set-goal uu-up-goal 1) | |
(disable-self) | |
) | |
#load-if-defined UP-POCKET-POSITION | |
(defrule | |
(random-number > 80) | |
(game-time > 15) | |
(game-time < 60) | |
=> | |
(set-goal unit-goal knight) | |
(set-goal strategy-goal rush) | |
(set-goal control-goal 0) | |
(set-goal ranged-unit-type-goal 0) | |
(disable-self) | |
) | |
(defrule | |
(goal unit-goal knight) | |
(up-compare-goal control-goal != my-unique-unit-line) | |
(unit-type-count villager > fourty-percent-pop) | |
(dropsite-min-distance stone < 5) | |
=> | |
(set-goal control-goal my-unique-unit-line) | |
(set-goal uu-up-goal 1) | |
(set-goal ranged-unit-type-goal 0) | |
(chat-to-player my-player-number "Switching to unique units.") | |
) | |
(defrule | |
(building-type-count castle > 1) | |
=> | |
(set-goal unit-goal my-unique-unit-line) | |
(set-goal control-goal 0) | |
(set-goal uu-up-goal 1) | |
(set-goal ranged-unit-type-goal 0) | |
) | |
#end-if | |
(defrule | |
(random-number >= 60) | |
(game-time < 60) | |
(goal nr-map-goal -1) | |
=> | |
(set-goal unit-goal archer) | |
(set-goal strategy-goal rush) | |
(disable-self) | |
) | |
(defrule | |
(up-compare-goal control-goal != shot) | |
(or | |
(and | |
(goal strategy-goal flush) | |
(building-type-count-total town-center >= tc-level-three) | |
) | |
(and | |
(building-type-count castle > 0) | |
(goal unit-goal archer) | |
) | |
) | |
=> | |
(set-goal unit-goal mix) | |
(set-goal control-goal my-unique-unit-line) | |
(disable-self) | |
) | |
(defrule | |
(research-available ri-man-at-arms) | |
(or | |
(or | |
(players-unit-type-count focus-player eagle-warrior-line > 14) | |
(players-unit-type-count focus-player huskarl-line > 20) | |
) | |
(goal enemy-goal eagle-warrior) | |
) | |
=> | |
(set-goal control-goal militiaman-line) | |
(disable-self) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(up-compare-goal strategy-goal != flush) | |
(taunt-detected any-ally 32) | |
=> | |
(acknowledge-taunt this-any-ally 32) | |
(set-goal strategy-goal rush) | |
(set-goal control-goal aggressive-rush) | |
(set-goal ranged-unit-type-goal archer) | |
(set-goal unit-goal archer) | |
(chat-to-allies-using-id 22155) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(taunt-detected any-ally 33) | |
=> | |
(acknowledge-taunt this-any-ally 33) | |
(set-goal control-goal 0) | |
(set-goal ranged-unit-type-goal 0) | |
(set-goal strategy-goal boom) | |
(set-goal uu-up-goal 1) | |
(set-goal unit-goal my-unique-unit-line) | |
(chat-to-allies-using-id 22156) | |
) | |
#end-if ; BRITON STRATEGY | |
#load-if-defined BYZANTINE-CIV | |
(defrule | |
(goal unit-goal skirmisher) | |
(goal meso-enemy-goal 1) | |
(or | |
(goal enemy-goal eagle-warrior) | |
(and | |
(and | |
(game-time < 1200) | |
(players-building-type-count focus-player barracks > 0) | |
) | |
(or | |
(players-building-type-count focus-player barracks > 1) | |
(players-building-type-count focus-player market > 0) | |
) | |
) | |
) | |
(building-type-count castle == 0) | |
=> | |
(set-goal unit-goal mix) | |
(disable-self) | |
) | |
(defrule | |
(building-type-count castle > 1) | |
(up-compare-goal unit-goal != my-unique-unit-line) | |
=> | |
(set-goal unit-goal my-unique-unit-line) | |
(set-goal uu-up-goal 1) | |
(chat-to-player my-player-number "Switching to unique units.") | |
(disable-self) | |
) | |
(defrule | |
(random-number > 80) | |
(strategic-number sn-current-age == df-transit) | |
(building-type-count-total archery-range == 0) | |
(goal strategy-goal rush) | |
(up-compare-goal enemy-goal != flush) | |
(or | |
(or | |
(players-civ focus-player hun) | |
(players-civ focus-player mongol) | |
) | |
(or | |
(players-civ focus-player persian) | |
(players-civ focus-player frankish) | |
) | |
) | |
=> | |
(set-goal unit-goal knight) | |
) | |
(defrule | |
(or (building-type-count castle > 0) | |
(goal nr-map-goal 1)) | |
(random-number >= 60) | |
(game-time > 13) | |
(game-time < 60) | |
=> | |
(set-goal strategy-goal boom) | |
(set-goal unit-goal my-unique-unit-line) | |
(set-goal control-goal 0) | |
(set-goal uu-up-goal 1) | |
(disable-self) | |
) | |
#load-if-defined UP-POCKET-POSITION | |
(defrule | |
(dropsite-min-distance stone < 5) | |
(building-type-count-total town-center >= tc-level-four) | |
(up-compare-goal unit-goal != my-unique-unit-line) | |
(up-compare-goal control-goal != my-unique-unit-line) | |
=> | |
(set-goal control-goal my-unique-unit-line) | |
(chat-to-player my-player-number "Preparing in order to train unique units later on.") | |
(disable-self) | |
) | |
(defrule | |
(random-number >= 60) | |
(game-time > 12) | |
(game-time < 60) | |
=> | |
(set-goal strategy-goal boom) | |
(set-goal unit-goal archer) | |
(set-goal control-goal 0) | |
(set-goal uu-up-goal 1) | |
(disable-self) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(taunt-detected any-ally 32) | |
=> | |
(acknowledge-taunt this-any-ally 32) | |
(set-goal strategy-goal rush) | |
(set-goal control-goal my-unique-unit-line) | |
(set-goal ranged-unit-type-goal archer) | |
(set-goal unit-goal archer) | |
(chat-to-allies-using-id 22155) | |
) | |
#else | |
(defrule | |
(dropsite-min-distance stone < 5) | |
(building-type-count-total town-center >= tc-level-three) | |
(up-compare-goal unit-goal != my-unique-unit-line) | |
(up-compare-goal control-goal != my-unique-unit-line) | |
=> | |
(set-goal control-goal my-unique-unit-line) | |
(chat-to-player my-player-number "Preparing in order to train unique units later on.") | |
(disable-self) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(up-compare-goal position-goal == flank); hm | |
(up-compare-goal strategy-goal != flush) | |
(taunt-detected any-ally 32) | |
=> | |
(acknowledge-taunt this-any-ally 32) | |
(set-goal strategy-goal flush) | |
(set-goal control-goal 0) | |
(set-goal unit-goal skirmisher) | |
(chat-to-allies-using-id 22155) | |
) | |
#load-if-defined ARABIA-MAP | |
#load-if-defined DIFFICULTY-HARDEST | |
#load-if-defined LOW-RESOURCES-START | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(strategic-number sn-current-age == dark) | |
(goal strategy-goal rush) | |
(unit-type-count-total villager < 27) | |
(food-amount > 420) | |
(up-compare-goal control-goal != shot) | |
(up-compare-goal position-goal == flank) | |
=> | |
(set-goal strategy-goal flush) | |
(set-goal unit-goal skirmisher) | |
(set-goal control-goal 0) | |
(disable-self) | |
) | |
#end-if | |
#end-if | |
#end-if | |
#end-if | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(taunt-detected any-ally 33) | |
=> | |
(acknowledge-taunt this-any-ally 33) | |
(set-goal control-goal 0) | |
(set-goal ranged-unit-type-goal 0) | |
(set-goal strategy-goal boom) | |
(set-goal uu-up-goal 1) | |
(set-goal unit-goal my-unique-unit-line) | |
(chat-to-allies-using-id 22156) | |
) | |
#end-if | |
#load-if-defined CELTIC-CIV | |
(defrule | |
(goal unit-goal militiaman-line) | |
(or | |
(strategic-number sn-current-age == fc-transit) | |
(research-available ri-long-swordsman) | |
) | |
(players-unit-type-count focus-player eagle-warrior-line < 5) | |
=> | |
(set-goal unit-goal skirmisher) | |
(set-goal control-goal 0) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(random-number < 25) | |
=> | |
(set-goal strategy-goal rush) | |
(set-goal control-goal 0) | |
(set-goal ranged-unit-type-goal archer) | |
(set-goal unit-goal archer) | |
(disable-self) | |
) | |
(defrule | |
(or | |
(and | |
(goal unit-goal knight) | |
(game-time > 1800) | |
) | |
(and | |
(goal unit-goal scorpion) | |
(building-type-count town-center >= tc-level-four) | |
) | |
) | |
(dropsite-min-distance stone < 6) | |
=> | |
(set-goal control-goal my-unique-unit-line) | |
(disable-self) | |
) | |
(defrule | |
(or | |
(goal unit-goal knight) | |
(or | |
(goal unit-goal scorpion) | |
(goal unit-goal archer) | |
) | |
) | |
(building-type-count castle > 0) | |
(or | |
(building-type-count castle > 1) | |
(strategic-number sn-current-age >= ci-transit) | |
) | |
=> | |
(set-goal unit-goal my-unique-unit-line) | |
(set-goal uu-up-goal 1) | |
(set-goal control-goal 0) | |
) | |
(defrule | |
(goal nr-map-goal -1) | |
(current-age == dark-age) | |
(random-number > 80) | |
(game-time > 25) | |
(game-time < 60) | |
=> | |
(set-goal unit-goal knight) | |
(set-goal strategy-goal rush) | |
(set-goal uu-up-goal 1) | |
(disable-self) | |
) | |
#load-if-defined UP-4-PLAYER-TEAM | |
(defrule | |
(goal nr-map-goal -1) | |
(building-type-count stone-wall < 10) | |
(goal unit-goal knight) | |
(goal strategy-goal boom) | |
=> | |
(set-goal unit-goal archer) | |
(set-goal ranged-unit-type-goal archer) | |
(disable-self) | |
) | |
(defrule | |
(goal unit-goal archer) | |
(building-type-count-total town-center >= tc-level-four) | |
(strategic-number sn-current-age >= ci-transit) | |
=> | |
(set-goal strategy-goal boom) | |
(set-goal unit-goal scorpion) | |
(set-goal ranged-unit-type-goal scorpion) | |
(set-goal uu-up-goal 1) | |
(disable-self) | |
) | |
#end-if | |
(defrule | |
(current-age == dark-age) | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(random-number > 80) | |
(goal nr-map-goal 1) | |
(game-time > 13) | |
(game-time < 60) | |
=> | |
(set-goal unit-goal my-unique-unit-line) | |
(set-goal strategy-goal boom) | |
(set-goal uu-up-goal 1) | |
(disable-self) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(or | |
(goal nr-map-goal 1) | |
(and | |
(goal position-goal pocket) | |
(random-number > 50) | |
) | |
) | |
(random-number <= 80) | |
(game-time > 25) | |
(game-time < 60) | |
=> | |
(set-goal unit-goal scorpion) | |
(set-goal control-goal 0) | |
(set-goal ranged-unit-type-goal 0) | |
(set-goal strategy-goal boom) | |
(disable-self) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(up-compare-goal strategy-goal != flush) | |
(taunt-detected any-ally 32) | |
=> | |
(acknowledge-taunt this-any-ally 32) | |
(set-goal strategy-goal rush) | |
(set-goal control-goal aggressive-rush) | |
(set-goal ranged-unit-type-goal archer) | |
(set-goal unit-goal archer) | |
(chat-to-allies-using-id 22155) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(up-compare-goal strategy-goal != boom) | |
(taunt-detected any-ally 33) | |
=> | |
(acknowledge-taunt this-any-ally 33) | |
(set-goal control-goal 0) | |
(set-goal ranged-unit-type-goal scorpion) | |
(set-goal strategy-goal boom) | |
(set-goal uu-up-goal 1) | |
(set-goal unit-goal my-unique-unit-line) | |
(chat-to-allies-using-id 22156) | |
) | |
#end-if | |
#load-if-defined CHINESE-CIV | |
(defrule | |
(nor | |
(goal unit-goal knight) | |
(goal unit-goal my-unique-unit-line) | |
) | |
(or | |
(and | |
(goal strategy-goal flush) | |
(strategic-number sn-current-age == fc-transit) | |
) | |
(and | |
(goal unit-goal archer) | |
(goal forward-threat-goal 1) | |
) | |
) | |
=> | |
(set-goal unit-goal knight) | |
(chat-to-player my-player-number "Switching to knights.") | |
) | |
(defrule | |
(goal unit-goal knight) | |
(goal strategy-goal rush) | |
(strategic-number sn-current-age == fc-transit) | |
(goal ranged-unit-type-goal archer) | |
(up-research-status c: ri-bloodlines >= research-pending) | |
=> | |
(set-goal ranged-unit-type-goal cavalry-archer) | |
(disable-self) | |
) | |
(defrule | |
(goal unit-goal knight) | |
(up-compare-goal control-goal != shot) | |
(up-compare-goal control-goal != my-unique-unit-line) | |
(or | |
(and | |
(building-type-count-total archery-range > 0) | |
(building-type-count-total town-center >= tc-level-three) | |
) | |
(unit-type-count villager > fourty-percent-pop) | |
) | |
(dropsite-min-distance stone < 5) | |
=> | |
(set-goal control-goal my-unique-unit-line) | |
(set-goal uu-up-goal 1) | |
(chat-to-player my-player-number "Switching to unique units.") | |
) | |
#load-if-defined UP-1-PLAYER-TEAM | |
#load-if-not-defined UP-TURKISH-CIV-ENEMY | |
#load-if-not-defined UP-SARACEN-CIV-ENEMY | |
(defrule | |
(goal unit-goal knight) | |
(goal control-goal my-unique-unit-line) | |
(goal anti-cavalry-threat-goal 1) | |
(civilian-population > 80) | |
(building-type-count castle > 0) | |
=> | |
(set-goal unit-goal militiaman-line) | |
(disable-self) | |
) | |
#end-if | |
#end-if | |
#end-if | |
#load-if-defined ARABIA-MAP | |
(defrule | |
(strategic-number sn-current-age == dark) | |
(goal strategy-goal rush) | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(or | |
(building-type-count castle > 0) | |
(random-number < 50) | |
) | |
=> | |
(set-goal unit-goal my-unique-unit-line) | |
(set-goal control-goal 0) | |
(set-goal ranged-unit-type-goal 0) | |
(set-goal strategy-goal boom) | |
(set-goal uu-up-goal 1) | |
(disable-self) | |
) | |
#else | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(or | |
(or | |
(goal nr-map-goal 1) | |
(building-type-count castle > 0) | |
) | |
(random-number < 30) | |
) | |
(game-time > 13) | |
(game-time < 60) | |
=> | |
(set-goal unit-goal my-unique-unit-line) | |
(set-goal control-goal 0) | |
(set-goal ranged-unit-type-goal 0) | |
(set-goal strategy-goal boom) | |
(set-goal uu-up-goal 1) | |
(disable-self) | |
) | |
(defrule | |
(goal nr-map-goal 1) | |
(random-number > 60) | |
(game-time > 13) | |
(game-time < 60) | |
=> | |
(set-goal unit-goal knight) | |
(set-goal control-goal 0) | |
(set-goal ranged-unit-type-goal 0) | |
(set-goal strategy-goal boom) | |
(set-goal uu-up-goal 1) | |
(disable-self) | |
) | |
#end-if | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(goal nr-map-goal -1) | |
(building-type-count-total castle == 0) | |
(random-number > 80) | |
(game-time < 60) | |
=> | |
(set-goal unit-goal archer) | |
(set-goal strategy-goal rush) | |
(set-goal control-goal aggressive-rush) | |
(disable-self) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(up-compare-goal strategy-goal != flush) | |
(taunt-detected any-ally 32) | |
=> | |
(acknowledge-taunt this-any-ally 32) | |
(set-goal strategy-goal rush) | |
(set-goal control-goal aggressive-rush) | |
(set-goal ranged-unit-type-goal archer) | |
(set-goal unit-goal archer) | |
(chat-to-allies-using-id 22155) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(taunt-detected any-ally 33) | |
=> | |
(acknowledge-taunt this-any-ally 33) | |
(set-goal control-goal 0) | |
(set-goal ranged-unit-type-goal 0) | |
(set-goal strategy-goal boom) | |
(set-goal uu-up-goal 1) | |
(set-goal unit-goal my-unique-unit-line) | |
(chat-to-allies-using-id 22156) | |
) | |
#end-if | |
#load-if-defined FRANKISH-CIV | |
(defrule | |
(goal unit-goal knight) | |
(players-unit-type-count focus-player camel-line > 10) | |
(dropsite-min-distance stone < 5) | |
(game-time >= 1800) | |
(research-available ri-man-at-arms) | |
=> | |
(set-goal control-goal my-unique-unit-line) | |
(set-goal uu-up-goal 1) | |
) | |
(defrule | |
(goal control-goal my-unique-unit-line) | |
(players-unit-type-count focus-player camel-line > 10) | |
(building-type-count-total castle > 0) | |
(research-available ri-man-at-arms) | |
(or | |
(building-type-count-total castle > 1) | |
(strategic-number sn-archer-threat < 2) | |
) | |
=> | |
(set-goal unit-goal my-unique-unit-line) | |
(set-goal uu-up-goal 1) | |
) | |
(defrule | |
(goal unit-goal knight) | |
(up-compare-goal control-goal != shot) | |
(goal anti-cavalry-threat-goal 1) | |
(or | |
(strategic-number sn-current-age >= ci-transit) | |
(and | |
(food-amount > 400) | |
(gold-amount < 100) | |
) | |
) | |
(research-available ri-man-at-arms) | |
(up-research-status c: ri-hand-cart >= research-pending) | |
(building-type-count-total castle > 0) | |
=> | |
(set-goal control-goal my-unique-unit-line) | |
(set-goal uu-up-goal 1) | |
) | |
#load-if-defined UP-1-PLAYER-TEAM | |
#load-if-not-defined UP-TURKISH-CIV-ENEMY | |
#load-if-not-defined UP-SARACEN-CIV-ENEMY | |
(defrule | |
(goal unit-goal knight) | |
(strategic-number sn-military-level < 0) | |
(goal anti-cavalry-threat-goal 1) | |
(building-type-count-total castle == 0) | |
(up-research-status c: ri-hand-cart >= research-pending) | |
=> | |
(set-goal control-goal militiaman-line) | |
) | |
(defrule | |
(goal unit-goal knight) | |
(up-compare-goal strategy-goal != boom) | |
(up-compare-goal control-goal != shot) | |
(up-compare-goal ranged-unit-type-goal != scorpion) | |
(goal anti-cavalry-threat-goal 1) | |
(building-type-count-total castle == 0) | |
(or | |
(strategic-number sn-current-age >= ci-transit) | |
(and | |
(food-amount > 400) | |
(gold-amount < 100) | |
) | |
) | |
(up-research-status c: ri-hand-cart >= research-pending) | |
=> | |
(set-goal control-goal militiaman-line) | |
) | |
#end-if | |
#end-if | |
#end-if | |
(defrule | |
(goal unit-goal knight) | |
(goal control-goal militiaman-line) | |
(players-unit-type-count focus-player spearman-line > 30) | |
(strategic-number sn-archer-threat < 2) | |
(up-research-status c: ri-long-swordsman >= research-pending) | |
(building-type-count-total barracks >= 3) | |
(up-compare-goal ranged-unit-type-goal != scorpion) | |
=> | |
(set-goal unit-goal militiaman-line) | |
(chat-to-player my-player-number "switching to militiaman-line.") | |
) | |
(defrule | |
(goal unit-goal militiaman-line) | |
(players-unit-type-count every-enemy spearman-line < 20) | |
(gold-amount > 500) | |
(strategic-number sn-current-age >= ci-transit) | |
=> | |
(set-goal unit-goal knight) | |
(chat-to-player my-player-number "Switching to knight-line.") | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(building-type-count-total stone-wall > 15) | |
(game-time > 13) | |
(game-time < 60) | |
(random-number > 40) | |
(or | |
(players-civ focus-player aztec) | |
(players-civ focus-player saracen) | |
) | |
=> | |
(set-goal control-goal aggressive-rush) | |
(set-goal strategy-goal rush) | |
(set-goal unit-goal scout-cavalry) | |
(disable-self) | |
) | |
(defrule | |
(current-age == castle-age) | |
(goal unit-goal scout-cavalry) | |
=> | |
(set-goal unit-goal knight) | |
(disable-self) | |
) | |
#load-if-defined UP-POCKET-POSITION | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(game-time > 13) | |
(game-time < 60) | |
(or | |
(and | |
(random-number > 50) | |
(or | |
(random-number > 70) | |
(goal nr-map-goal 1) | |
) | |
) | |
(building-type-count-total stone-wall >= 15) | |
) | |
=> | |
(set-goal control-goal 0) | |
(set-goal strategy-goal boom) | |
(set-goal unit-goal knight) | |
(set-goal ranged-unit-type-goal scorpion) | |
(disable-self) | |
) | |
#end-if | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(up-compare-goal strategy-goal != rush) | |
(taunt-detected any-ally 32) | |
=> | |
(acknowledge-taunt this-any-ally 32) | |
(set-goal strategy-goal rush) | |
(set-goal control-goal aggressive-rush) | |
(set-goal unit-goal knight) | |
(chat-to-allies-using-id 22155) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(taunt-detected any-ally 33) | |
=> | |
(acknowledge-taunt this-any-ally 33) | |
(set-goal control-goal 0) | |
(set-goal ranged-unit-type-goal scorpion) | |
(set-goal strategy-goal boom) | |
(set-goal unit-goal knight) | |
(chat-to-allies-using-id 22156) | |
) | |
#end-if ;french | |
#load-if-defined GOTHIC-CIV | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(strategic-number sn-archer-threat >= 1) | |
(up-research-status c: ri-champion < research-pending) | |
(can-research my-unique-research) | |
=> | |
(research my-unique-research) | |
(set-goal unit-goal my-unique-unit-line) | |
(set-goal uu-up-goal 1) | |
(chat-to-player my-player-number "Switching to husks.") | |
) | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(dropsite-min-distance stone < 6) | |
(building-type-count-total town-center >= tc-level-three) | |
(or | |
(or | |
(players-civ focus-player briton) | |
(players-civ focus-player hun) | |
) | |
(or | |
(or | |
(players-civ focus-player mongol) | |
(players-civ focus-player mayan) | |
) | |
(and | |
(current-age == imperial-age) | |
(goal unit-goal skirmisher) | |
) | |
) | |
) | |
=> | |
(set-goal control-goal my-unique-unit-line) | |
(set-goal uu-up-goal 1) | |
) | |
(defrule | |
(up-compare-goal control-goal != militiaman-line) | |
(or | |
(or | |
(players-unit-type-count focus-player eagle-warrior-line > 10) | |
(strategic-number sn-current-age >= ci-transit) | |
) | |
(and | |
(and | |
(food-amount > 500) | |
(gold-amount < 100) | |
) | |
(goal unit-goal knight) | |
) | |
) | |
=> | |
(set-goal control-goal militiaman-line) | |
) | |
(defrule | |
(goal unit-goal knight) | |
(up-research-status c: ri-long-swordsman >= research-pending) | |
=> | |
(set-goal unit-goal militiaman-line) | |
(set-goal control-goal 0) | |
) | |
(defrule | |
(or | |
(random-number >= 80) | |
(or | |
(goal nr-map-goal 1) | |
(building-type-count castle > 0) | |
) | |
) | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(game-time > 13) | |
(game-time < 60) | |
=> | |
(set-goal strategy-goal rush) | |
(set-goal unit-goal my-unique-unit-line) | |
(set-goal uu-up-goal 1) | |
(set-goal ranged-unit-type-goal 0) | |
(disable-self) | |
) | |
#load-if-defined UP-POCKET-POSITION | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(taunt-detected any-ally 32) | |
=> | |
(acknowledge-taunt this-any-ally 32) | |
(set-goal strategy-goal rush) | |
(set-goal control-goal aggressive-rush) | |
(set-goal unit-goal knight) | |
(set-goal ranged-unit-type-goal 0) | |
(chat-to-allies-using-id 22155) | |
) | |
#else | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(up-compare-goal strategy-goal != flush) | |
(up-compare-goal position-goal == flank); hm | |
(taunt-detected any-ally 32) | |
=> | |
(acknowledge-taunt this-any-ally 32) | |
(set-goal strategy-goal flush) | |
(set-goal unit-goal militiaman-line) | |
(set-goal ranged-unit-type-goal archer) | |
(chat-to-allies-using-id 22155) | |
) | |
#end-if | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(taunt-detected any-ally 33) | |
=> | |
(acknowledge-taunt this-any-ally 33) | |
(set-goal control-goal 0) | |
(set-goal ranged-unit-type-goal scorpion) | |
(set-goal strategy-goal boom) | |
(set-goal uu-up-goal 1) | |
(set-goal unit-goal my-unique-unit-line) | |
(chat-to-allies-using-id 22156) | |
) | |
#end-if | |
#load-if-defined HUN-CIV | |
(defrule | |
(current-age >= castle-age) | |
(building-type-count archery-range >= 2) | |
(nor | |
(or | |
(goal unit-goal cavalry-archer) | |
(goal control-goal shot) | |
) | |
(strategic-number sn-minimum-water-body-size-for-dock == water-islands) | |
) | |
=> | |
(set-goal unit-goal cavalry-archer) | |
(set-goal control-goal 0) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(building-type-count-total stone-wall < 15) | |
(random-number > 60) | |
(or | |
(goal nr-map-goal 1) | |
(goal position-goal pocket) | |
) | |
(game-time > 13) | |
(game-time < 60) | |
=> | |
(set-goal strategy-goal boom) | |
(set-goal unit-goal cavalry-archer) | |
(set-goal control-goal 0) | |
(disable-self) | |
) | |
#load-if-not-defined UP-GAME-AGE2-X2 | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(goal ffa-game-goal -1) | |
(goal nr-map-goal -1) | |
(building-type-count-total stone-wall < 15) | |
(random-number > 60) | |
(or | |
(player-in-game any-ally) | |
(random-number > 80) | |
) | |
(game-time > 13) | |
(game-time < 60) | |
=> | |
(set-goal control-goal aggressive-rush) | |
(set-goal strategy-goal rush) | |
(set-goal unit-goal cavalry-archer) | |
(disable-self) | |
) | |
#else | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(goal ffa-game-goal -1) | |
(goal nr-map-goal -1) | |
(building-type-count-total stone-wall < 15) | |
(random-number > 60) | |
(up-compare-goal position-goal == flank) | |
(or | |
(player-in-game any-ally) | |
(random-number > 80) | |
) | |
(game-time > 13) | |
(game-time < 60) | |
=> | |
(set-goal control-goal aggressive-rush) | |
(set-goal strategy-goal flush) | |
(set-goal unit-goal scout-cavalry) | |
(disable-self) | |
) | |
#end-if | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(up-compare-goal strategy-goal != flush) | |
(taunt-detected any-ally 32) | |
=> | |
(acknowledge-taunt this-any-ally 32) | |
(set-goal strategy-goal rush) | |
(set-goal control-goal aggressive-rush) | |
(set-goal unit-goal cavalry-archer) | |
(chat-to-allies-using-id 22155) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(taunt-detected any-ally 33) | |
=> | |
(acknowledge-taunt this-any-ally 33) | |
(set-goal control-goal 0) | |
(set-goal strategy-goal boom) | |
(set-goal unit-goal knight) | |
(chat-to-allies-using-id 22156) | |
) | |
#load-if-defined UP-POCKET-POSITION | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(game-time > 13) | |
(game-time < 60) | |
(building-type-count-total stone-wall >= 15) | |
=> | |
(set-goal control-goal 0) | |
(set-goal strategy-goal boom) | |
(set-goal unit-goal knight) | |
(disable-self) | |
) | |
#else | |
#load-if-defined ARABIA-MAP | |
#load-if-defined DIFFICULTY-HARDEST | |
#load-if-defined LOW-RESOURCES-START | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(strategic-number sn-current-age == dark) | |
(up-compare-goal control-goal != shot) | |
(up-compare-goal position-goal == flank) | |
(goal strategy-goal rush) | |
(unit-type-count-total villager < 26) | |
(food-amount > 420) | |
=> | |
(set-goal strategy-goal flush) | |
(set-goal unit-goal skirmisher) | |
(set-goal control-goal aggressive-rush) | |
(disable-self) | |
) | |
#end-if | |
#end-if | |
#end-if | |
#end-if | |
#end-if | |
#load-if-defined JAPANESE-CIV | |
(defrule | |
(strategic-number sn-current-age >= castle) | |
(or | |
(goal strategy-goal boom) | |
(or | |
(goal unit-goal knight) | |
(goal unit-goal skirmisher) | |
) | |
) | |
(building-type-count-total town-center >= tc-level-four) | |
=> | |
(set-goal control-goal my-unique-unit-line) | |
(set-goal uu-up-goal 1) | |
) | |
(defrule | |
(strategic-number sn-current-age == castle) | |
(up-research-status c: ri-long-swordsman < research-pending) | |
(unit-type-count-total militiaman-line < 10) | |
(goal strategy-goal flush) | |
=> | |
(set-goal unit-goal skirmisher) | |
(set-goal control-goal my-unique-unit-line) | |
) | |
(defrule | |
(or | |
(goal unit-goal skirmisher) | |
(and | |
(goal unit-goal knight) | |
(building-type-count-total castle > 1) | |
) | |
) | |
(building-type-count castle > 0) | |
(up-research-status c: ri-long-swordsman < research-pending) | |
=> | |
(set-goal unit-goal my-unique-unit-line) | |
(set-goal uu-up-goal 1) | |
) | |
#load-if-defined UP-1-PLAYER-TEAM | |
(defrule | |
(current-age == dark-age) | |
(or | |
(or | |
(and | |
(goal ffa-game-goal 1) | |
(random-number > 50) | |
) | |
(building-type-count castle > 0) | |
) | |
(and | |
(random-number >= 80) | |
(goal nr-map-goal 1) | |
) | |
) | |
(game-time > 12) | |
(game-time < 60) | |
=> | |
(set-goal unit-goal my-unique-unit-line) | |
(set-goal strategy-goal boom) | |
(set-goal uu-up-goal 1) | |
(disable-self) | |
) | |
(defrule | |
(current-age == dark-age) | |
(goal meso-enemy-goal 1) | |
(random-number >= 90) | |
(game-time > 12) | |
(game-time < 60) | |
=> | |
(set-goal unit-goal my-unique-unit-line) | |
(set-goal strategy-goal rush) | |
(set-goal control-goal 0) | |
(set-goal uu-up-goal 1) | |
(disable-self) | |
) | |
(defrule | |
(goal meso-enemy-goal -1) | |
(random-number < 8) | |
(game-time > 15) | |
(game-time < 60) | |
=> | |
(set-goal strategy-goal rush) | |
(set-goal unit-goal monk) | |
(set-goal control-goal 0) | |
(set-goal ranged-unit-type-goal monk) | |
(disable-self) | |
) | |
#end-if | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(goal strategy-goal flush) | |
(goal nr-map-goal 1) | |
=> | |
(set-goal unit-goal archer) | |
(set-goal control-goal 0) | |
(set-goal ranged-unit-type-goal archer) | |
(set-goal strategy-goal boom) | |
(disable-self) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(goal strategy-goal flush) | |
(unit-type-count villager > 27) | |
(strategic-number sn-current-age == dark) | |
=> | |
(set-goal unit-goal archer) | |
(set-goal control-goal 0) | |
(set-goal ranged-unit-type-goal archer) | |
(set-goal strategy-goal rush) | |
(disable-self) | |
) | |
#load-if-defined UP-POCKET-POSITION | |
#load-if-defined UP-GAME-AGE2-X2 | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(taunt-detected any-ally 32) | |
=> | |
(acknowledge-taunt this-any-ally 32) | |
(set-goal strategy-goal rush) | |
(set-goal control-goal aggressive-rush) | |
(set-goal unit-goal knight) | |
(set-goal ranged-unit-type-goal archer) | |
(chat-to-allies-using-id 22155) | |
) | |
#else | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(taunt-detected any-ally 32) | |
=> | |
(acknowledge-taunt this-any-ally 32) | |
(set-goal strategy-goal rush) | |
(set-goal control-goal aggressive-rush) | |
(set-goal unit-goal archer) | |
(set-goal ranged-unit-type-goal archer) | |
(chat-to-allies-using-id 22156) | |
) | |
#end-if | |
#else | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(up-compare-goal position-goal == flank); hm | |
(up-compare-goal strategy-goal != flush) | |
(taunt-detected any-ally 32) | |
=> | |
(acknowledge-taunt this-any-ally 32) | |
(set-goal strategy-goal flush) | |
(set-goal unit-goal archer) | |
(set-goal ranged-unit-type-goal archer) | |
(chat-to-allies-using-id 22155) | |
) | |
#end-if | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(up-compare-goal strategy-goal != boom) | |
(taunt-detected any-ally 33) | |
=> | |
(acknowledge-taunt this-any-ally 33) | |
(set-goal control-goal 0) | |
(set-goal ranged-unit-type-goal archer) | |
(set-goal strategy-goal boom) | |
(set-goal uu-up-goal 1) | |
(set-goal unit-goal archer) | |
(chat-to-allies-using-id 22156) | |
) | |
#end-if | |
#load-if-defined KOREAN-CIV | |
(defrule | |
(goal strategy-goal flush) | |
=> | |
(set-goal unit-goal skirmisher) | |
(set-goal ranged-unit-type-goal archer) | |
(disable-self) | |
) | |
(defrule | |
(dropsite-min-distance stone < 5) | |
(building-type-count-total town-center >= tc-level-three) | |
(not (goal unit-goal my-unique-unit-line)) | |
=> | |
(set-goal control-goal my-unique-unit-line) | |
(chat-to-player my-player-number "Preparing in order to train unique units later on.") | |
(disable-self) | |
) | |
(defrule | |
(building-type-count castle > 1) | |
(goal unit-goal militiaman-line) | |
(goal control-goal my-unique-unit-line) | |
=> | |
(set-goal unit-goal my-unique-unit-line) | |
(set-goal control-goal militiaman-line) | |
(set-goal uu-up-goal 1) | |
(disable-self) | |
) | |
(defrule | |
(building-type-count castle > 1) | |
(nor | |
(goal unit-goal militiaman-line) | |
(goal unit-goal my-unique-unit-line) | |
) | |
=> | |
(set-goal unit-goal my-unique-unit-line) | |
(set-goal uu-up-goal 1) | |
(disable-self) | |
) | |
(defrule | |
(current-age == dark-age) | |
(random-number > 25) | |
(random-number < 60) | |
(up-compare-goal position-goal == flank); hm | |
(goal nr-map-goal -1) | |
=> | |
(set-goal unit-goal skirmisher) | |
(set-goal strategy-goal flush) | |
(set-goal uu-up-goal 1) | |
(disable-self) | |
) | |
(defrule | |
(or | |
(and | |
(or | |
(random-number >= 60) | |
(players-civ every-enemy aztec) | |
) | |
(random-number > 40) | |
) | |
(building-type-count castle > 0) | |
) | |
(game-time < 60) | |
=> | |
(set-goal strategy-goal boom) | |
(set-goal unit-goal my-unique-unit-line) | |
(set-goal ranged-unit-type-goal 0) | |
(set-goal uu-up-goal 1) | |
(disable-self) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(goal nr-map-goal 1) | |
(game-time > 13) | |
(game-time < 60) | |
=> | |
(set-goal unit-goal my-unique-unit-line) | |
(set-goal control-goal 0) | |
(set-goal ranged-unit-type-goal 0) | |
(set-goal strategy-goal boom) | |
(set-goal uu-up-goal 1) | |
(disable-self) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(up-compare-goal strategy-goal != flush) | |
(taunt-detected any-ally 32) | |
=> | |
(acknowledge-taunt this-any-ally 32) | |
(set-goal strategy-goal rush) | |
(set-goal control-goal aggressive-rush) | |
(set-goal ranged-unit-type-goal archer) | |
(set-goal unit-goal archer) | |
(chat-to-allies-using-id 22155) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(taunt-detected any-ally 33) | |
=> | |
(acknowledge-taunt this-any-ally 33) | |
(set-goal control-goal 0) | |
(set-goal ranged-unit-type-goal 0) | |
(set-goal strategy-goal boom) | |
(set-goal uu-up-goal 1) | |
(set-goal unit-goal my-unique-unit-line) | |
(chat-to-allies-using-id 22156) | |
) | |
#end-if | |
#load-if-defined MAYAN-CIV | |
(defrule | |
(or | |
(and | |
(or | |
(up-research-status c: ri-heresy >= research-pending) | |
(strategic-number sn-current-age >= ci-transit) | |
) | |
(or | |
(goal strategy-goal boom) | |
(goal strategy-goal fast-imp) | |
) | |
) | |
(strategic-number sn-minimum-water-body-size-for-dock == water-islands) | |
) | |
=> | |
(set-goal strategy-goal rush) | |
(set-goal unit-goal eagle-warrior) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(goal unit-goal eagle-warrior) | |
(or | |
(players-civ focus-player gothic) | |
(players-civ focus-player japanese) | |
) | |
(up-compare-goal control-goal != shot) | |
(up-compare-goal position-goal == flank); hm | |
(goal nr-map-goal -1) | |
=> | |
(set-goal strategy-goal flush) | |
(set-goal unit-goal default-flush-unit) | |
(disable-self) | |
) | |
(defrule | |
(current-age == dark-age) | |
(random-number < 50) | |
(up-compare-goal position-goal == flank); hm | |
(goal nr-map-goal -1) | |
=> | |
(set-goal strategy-goal flush) | |
(set-goal unit-goal default-flush-unit) | |
(disable-self) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(goal nr-map-goal 1) | |
(game-time > 13) | |
(game-time < 60) | |
=> | |
(set-goal strategy-goal boom) | |
(set-goal uu-up-goal 1) | |
(set-goal unit-goal my-unique-unit-line) | |
(set-goal control-goal 0) | |
(disable-self) | |
) | |
(defrule | |
(random-number >= 50) | |
(game-time < 60) | |
(goal ffa-game-goal -1) | |
(building-type-count-total castle == 0) | |
=> | |
(set-goal strategy-goal rush) | |
(set-goal unit-goal archer) | |
(set-goal control-goal aggressive-rush) | |
(set-goal ranged-unit-type-goal archer) | |
(disable-self) | |
) | |
(defrule | |
(dropsite-min-distance stone < 5) | |
(building-type-count-total town-center >= tc-level-three) | |
(nor | |
(goal unit-goal my-unique-unit-line) | |
(or | |
(goal control-goal shot) | |
(goal control-goal aggressive-rush) | |
) | |
) | |
(or | |
(not (goal unit-goal eagle-warrior)) | |
(strategic-number sn-current-age >= ci-transit) | |
) | |
=> | |
(set-goal control-goal my-unique-unit-line) | |
(set-goal uu-up-goal 1) | |
(chat-to-player my-player-number "Preparing in order to train unique units later on.") | |
(disable-self) | |
) | |
(defrule | |
(or (building-type-count castle > 1) | |
(regicide-game)) | |
=> | |
(set-goal unit-goal my-unique-unit-line) | |
(set-goal uu-up-goal 1) | |
(chat-to-player my-player-number "Switching to unique units.") | |
(disable-self) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock == water-mixed) | |
(or (map-type baltic) | |
(map-type rivers)) | |
(current-age < castle-age) | |
(goal unit-goal eagle-warrior) | |
(players-unit-type-count any-enemy galley-line > 0) | |
=> | |
(set-strategic-number sn-minimum-water-body-size-for-dock water-islands) | |
(set-goal strategy-goal rush) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock == water-islands) | |
(or (map-type baltic) | |
(map-type rivers)) | |
(goal unit-goal eagle-warrior) | |
(or (goal enemy-boats-goal 0) | |
(warboat-count > 40)) | |
=> | |
(set-strategic-number sn-minimum-water-body-size-for-dock water-mixed) | |
(set-goal strategy-goal rush) | |
(set-goal unit-goal eagle-warrior) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock >= water-mixed) | |
(current-age < castle-age) | |
(goal unit-goal my-unique-unit-line) | |
(building-type-count-total castle == 0) | |
=> | |
(set-goal unit-goal eagle-warrior) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(up-compare-goal strategy-goal != flush) | |
(up-compare-goal strategy-goal != rush) | |
(taunt-detected any-ally 32) | |
=> | |
(acknowledge-taunt this-any-ally 32) | |
(set-goal strategy-goal rush) | |
(set-goal control-goal aggressive-rush) | |
(set-goal ranged-unit-type-goal archer) | |
(set-goal unit-goal archer) | |
(chat-to-allies-using-id 22155) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(taunt-detected any-ally 33) | |
=> | |
(acknowledge-taunt this-any-ally 33) | |
(set-goal control-goal 0) | |
(set-goal ranged-unit-type-goal 0) | |
(set-goal strategy-goal boom) | |
(set-goal uu-up-goal 1) | |
(set-goal unit-goal my-unique-unit-line) | |
(chat-to-allies-using-id 22156) | |
) | |
#end-if | |
#load-if-defined MONGOL-CIV | |
(defrule | |
(current-age == dark-age) | |
(game-time > 30) | |
(goal strategy-goal flush) | |
(random-number >= 40) | |
=> | |
(set-goal unit-goal default-flush-unit) | |
(disable-self) | |
) | |
(defrule | |
(current-age == dark-age) | |
(game-time > 30) | |
(goal strategy-goal flush) | |
(random-number < 40) | |
=> | |
(set-goal unit-goal skirmisher) | |
(disable-self) | |
) | |
(defrule | |
(strategic-number sn-current-age >= fc-transit) | |
(goal strategy-goal flush) | |
=> | |
(set-goal unit-goal knight) | |
(chat-to-player my-player-number "Switching to knights.") | |
(disable-self) | |
) | |
(defrule | |
(strategic-number sn-current-age >= fc-transit) | |
(unit-type-count archer-line > 12) | |
=> | |
(set-goal ranged-unit-type-goal archer) | |
(disable-self) | |
) | |
(defrule | |
(or | |
(goal unit-goal knight) | |
(goal unit-goal skirmisher) | |
) | |
(up-compare-goal control-goal != my-unique-unit-line) | |
(unit-type-count villager > fourty-percent-pop) | |
(dropsite-min-distance stone < 5) | |
=> | |
(set-goal control-goal my-unique-unit-line) | |
(set-goal uu-up-goal 1) | |
(chat-to-player my-player-number "Switching to unique units.") | |
) | |
(defrule | |
(or (up-research-status c: my-unique-unit-upgrade >= research-pending) | |
(building-type-count castle >= 3)) | |
(up-compare-goal control-goal != my-unique-unit-line) | |
(building-type-count castle >= 1) | |
=> | |
(set-goal control-goal my-unique-unit-line) | |
(set-goal uu-up-goal 1) | |
(chat-to-player my-player-number "Switching to unique units."); test | |
) | |
#load-if-not-defined UP-TURKISH-CIV-ENEMY | |
#load-if-not-defined UP-SARACEN-CIV-ENEMY | |
(defrule | |
(goal unit-goal knight) | |
(goal control-goal my-unique-unit-line) | |
(or | |
(players-unit-type-count focus-player spearman-line > 20) | |
(players-unit-type-count focus-player camel-line > 12) | |
) | |
(unit-type-count villager > fourty-percent-pop) | |
(building-type-count castle > 0) | |
=> | |
(set-goal unit-goal militiaman-line) | |
(disable-self) | |
) | |
(defrule | |
(building-type-count castle > 2) | |
(or | |
(goal unit-goal militiaman-line) | |
(goal control-goal militiaman-line) | |
) | |
=> | |
(set-goal unit-goal my-unique-unit-line) | |
(set-goal control-goal militiaman-line) | |
(disable-self) | |
) | |
#end-if | |
#end-if | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(strategic-number sn-current-age == dark) | |
(unit-type-count villager > 27) | |
(goal strategy-goal flush) | |
=> | |
(set-goal unit-goal my-unique-unit-line) | |
(set-goal control-goal 0) | |
(set-goal ranged-unit-type-goal 0) | |
(set-goal strategy-goal boom) | |
(set-goal uu-up-goal 1) | |
(disable-self) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(or | |
(goal nr-map-goal 1) | |
(random-number >= 90) | |
) | |
(game-time > 13) | |
(game-time < 60) | |
=> | |
(set-goal unit-goal my-unique-unit-line) | |
(set-goal control-goal 0) | |
(set-goal ranged-unit-type-goal 0) | |
(set-goal strategy-goal boom) | |
(set-goal uu-up-goal 1) | |
(disable-self) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(goal nr-map-goal 1) | |
(random-number >= 70) | |
(game-time > 13) | |
(game-time < 60) | |
=> | |
(set-goal unit-goal knight) | |
(set-goal control-goal 0) | |
(set-goal ranged-unit-type-goal 0) | |
(set-goal strategy-goal boom) | |
(disable-self) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(up-compare-goal strategy-goal != flush) | |
(up-compare-goal strategy-goal != rush) | |
(taunt-detected any-ally 32) | |
=> | |
(acknowledge-taunt this-any-ally 32) | |
(set-goal strategy-goal rush) | |
(set-goal control-goal aggressive-rush) | |
(set-goal ranged-unit-type-goal cavalry-archer) | |
(set-goal unit-goal cavalry-archer) | |
(chat-to-allies-using-id 22155) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(taunt-detected any-ally 33) | |
=> | |
(acknowledge-taunt this-any-ally 33) | |
(set-goal control-goal 0) | |
(set-goal ranged-unit-type-goal 0) | |
(set-goal strategy-goal boom) | |
(set-goal uu-up-goal 1) | |
(set-goal unit-goal my-unique-unit-line) | |
(chat-to-allies-using-id 22156) | |
) | |
#end-if; mongol | |
#load-if-defined PERSIAN-CIV | |
(defrule | |
(strategic-number sn-current-age >= fc-transit) | |
(goal strategy-goal flush) | |
=> | |
(set-goal unit-goal knight) | |
(chat-to-player my-player-number "Switching to knights.") | |
(disable-self) | |
) | |
(defrule | |
(random-number >= 50) | |
(random-number < 80) | |
(game-time < 60) | |
(up-compare-goal position-goal == flank); hm | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
=> | |
(set-goal unit-goal scout-cavalry) | |
(set-goal strategy-goal flush) | |
(disable-self) | |
) | |
(defrule | |
(current-age == dark-age) | |
(or | |
(and | |
(or | |
(goal nr-map-goal 1) | |
(goal position-goal pocket) | |
) | |
(random-number < 60) | |
) | |
(building-type-count stone-wall > 15) | |
) | |
(game-time > 13) | |
(game-time < 60) | |
=> | |
(set-goal unit-goal knight) | |
(set-goal strategy-goal boom) | |
(set-goal control-goal 0) | |
(disable-self) | |
) | |
(defrule | |
(or | |
(goal position-goal pocket) | |
(goal nr-map-goal 1) | |
) | |
(random-number < 40) | |
(game-time > 13) | |
(game-time < 60) | |
=> | |
(set-goal unit-goal scorpion) | |
(set-goal strategy-goal boom) | |
(set-goal control-goal 0) | |
(set-goal ranged-unit-type-goal 0) | |
(disable-self) | |
) | |
(defrule | |
(goal unit-goal scorpion) | |
(or | |
(building-type-count town-center >= tc-level-four) | |
(strategic-number sn-current-age >= ci-transit) | |
) | |
=> | |
(set-goal control-goal my-unique-unit-line) | |
(set-goal uu-up-goal 1) | |
(set-goal ranged-unit-type-goal scorpion) | |
) | |
(defrule | |
(or | |
(and | |
(goal unit-goal scorpion) | |
(goal control-goal my-unique-unit-line) | |
) | |
(goal unit-goal skirmisher) | |
) | |
(building-type-count-total castle > 1) | |
=> | |
(set-goal unit-goal my-unique-unit-line) | |
(set-goal uu-up-goal 1) | |
(set-goal ranged-unit-type-goal scorpion) | |
) | |
(defrule | |
(random-number > 80) | |
(game-time < 60) | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
=> | |
(set-goal strategy-goal rush) | |
(set-goal unit-goal knight) | |
(disable-self) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(up-compare-goal strategy-goal != flush) | |
(up-compare-goal strategy-goal != rush) | |
(taunt-detected any-ally 32) | |
=> | |
(acknowledge-taunt this-any-ally 32) | |
(set-goal strategy-goal rush) | |
(set-goal control-goal aggressive-rush) | |
(set-goal unit-goal knight) | |
(chat-to-allies-using-id 22155) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(taunt-detected any-ally 33) | |
=> | |
(acknowledge-taunt this-any-ally 33) | |
(set-goal control-goal 0) | |
(set-goal ranged-unit-type-goal scorpion) | |
(set-goal strategy-goal boom) | |
(set-goal unit-goal my-unique-unit-line) | |
(chat-to-allies-using-id 22156) | |
) | |
#end-if ; persian | |
#load-if-defined SARACEN-CIV | |
(defrule | |
(current-age == dark-age) | |
(random-number <= 20) | |
(goal position-goal pocket) | |
(not (players-civ any-ally aztec)) | |
(game-time < 30) | |
=> | |
(set-goal unit-goal monk) | |
(set-goal ranged-unit-type-goal monk) | |
(disable-self) | |
) | |
(defrule | |
(current-age == dark-age) | |
(random-number <= 50) | |
(up-compare-goal position-goal == flank); hm | |
(game-time < 60) | |
=> | |
(set-goal unit-goal scout-cavalry) | |
(set-goal strategy-goal flush) | |
(set-goal control-goal aggressive-rush) | |
(disable-self) | |
) | |
(defrule | |
(current-age == dark-age) | |
(random-number > 50) | |
(up-compare-goal position-goal == flank); hm | |
(game-time < 60) | |
=> | |
(set-goal unit-goal archer) | |
(set-goal strategy-goal flush) | |
(set-goal control-goal aggressive-rush) | |
(disable-self) | |
) | |
(defrule | |
(goal position-goal pocket) | |
(or | |
(and | |
(goal strategy-goal rush) | |
(goal unit-goal archer) | |
) | |
(goal strategy-goal flush) | |
) | |
(game-time > 60) | |
(game-time < 70) | |
=> | |
(set-goal strategy-goal boom) | |
(set-goal ranged-unit-type-goal archer) | |
) | |
(defrule | |
(current-age == dark-age) | |
(or | |
(or | |
(random-number > 70) | |
(building-type-count stone-wall > 15) | |
) | |
(and | |
(goal nr-map-goal 1) | |
(random-number < 25) | |
) | |
) | |
(game-time < 60) | |
=> | |
(set-goal unit-goal monk) | |
(set-goal strategy-goal rush) | |
(set-goal control-goal 0) | |
(set-goal ranged-unit-type-goal monk) | |
(disable-self) | |
) | |
(defrule | |
(strategic-number sn-current-age == fc-transit) | |
(goal strategy-goal flush) | |
(random-number <= 50) | |
=> | |
(set-goal unit-goal knight) | |
) | |
(defrule | |
(goal unit-goal knight) | |
(goal control-goal shot) | |
(strategic-number sn-current-age >= ci-transit) | |
(building-type-count-total castle > 0) | |
=> | |
(set-goal unit-goal my-unique-unit-line) | |
(set-goal ranged-unit-type-goal archer) | |
) | |
(defrule | |
(or | |
(and | |
(goal unit-goal knight) | |
(strategic-number sn-current-age >= ci-transit) | |
) | |
(and | |
(goal strategy-goal flush) | |
(and | |
(strategic-number sn-current-age == feudal) | |
(players-unit-type-count focus-player spearman-line > 6) | |
) | |
) | |
) | |
=> | |
(set-goal unit-goal archer) | |
(set-goal ranged-unit-type-goal archer) | |
(set-goal control-goal aggressive-rush); also stop slinging here, without even cavalier upgrade it is pretty pointless | |
) | |
(defrule | |
(or | |
(and | |
(goal nr-map-goal 1) | |
(building-type-count stone-wall-line < 15) | |
) | |
(and | |
(and | |
(random-number >= 70) | |
(regicide-game) | |
) | |
(goal unit-goal monk) | |
) | |
) | |
(game-time > 15) | |
(game-time < 60) | |
=> | |
(set-goal unit-goal my-unique-unit-line) | |
(set-goal strategy-goal boom) | |
(set-goal uu-up-goal 1) | |
(set-goal ranged-unit-type-goal monk) | |
(set-goal control-goal 0) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(up-compare-goal strategy-goal != flush) | |
(up-compare-goal strategy-goal != rush) | |
(taunt-detected any-ally 32) | |
=> | |
(acknowledge-taunt this-any-ally 32) | |
(set-goal strategy-goal rush) | |
(set-goal control-goal aggressive-rush) | |
(set-goal ranged-unit-type-goal archer) | |
(set-goal unit-goal archer) | |
(chat-to-allies-using-id 22155) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(taunt-detected any-ally 33) | |
=> | |
(acknowledge-taunt this-any-ally 33) | |
(set-goal control-goal 0) | |
(set-goal ranged-unit-type-goal archer) | |
(set-goal strategy-goal boom) | |
(set-goal unit-goal my-unique-unit-line) | |
(chat-to-allies-using-id 22156) | |
) | |
#end-if | |
#load-if-defined SPANISH-CIV | |
(defrule | |
(goal control-goal 0) | |
(or | |
(goal anti-cavalry-threat-goal 1) | |
(players-civ focus-player gothic) | |
) | |
(building-type-count-total town-center >= tc-level-three) | |
(dropsite-min-distance stone < 5) | |
(nand | |
(strategic-number sn-current-age == castle) | |
(goal strategy-goal boom) | |
) | |
=> | |
(set-goal control-goal my-unique-unit-line) | |
(chat-to-player my-player-number "Enable training of unique units.") | |
) | |
(defrule | |
(goal unit-goal knight) | |
(goal control-goal my-unique-unit-line) | |
(goal anti-cavalry-threat-goal 1) | |
(building-type-count castle >= 2) | |
(nand | |
(up-research-status c: ri-paladin >= research-pending) | |
(research-available my-unique-unit-upgrade) | |
) | |
=> | |
(set-goal unit-goal my-unique-unit-line) | |
(chat-to-player my-player-number "Switching to unique units.") | |
(set-goal uu-up-goal 1) | |
(disable-self) | |
) | |
(defrule | |
(goal strategy-goal flush) | |
(strategic-number sn-current-age == feudal) | |
(or | |
(players-unit-type-count focus-player spearman-line > 6) | |
(or | |
(players-civ focus-player mayan) | |
(players-civ focus-player briton) | |
) | |
) | |
=> | |
(set-goal unit-goal skirmisher) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(or | |
(goal nr-map-goal 1) | |
(and | |
(random-number < 20) | |
(goal position-goal pocket) | |
) | |
) | |
(game-time > 13) | |
(game-time < 60) | |
(up-compare-goal unit-goal != my-unique-unit-line) | |
=> | |
(set-goal unit-goal knight) | |
(set-goal control-goal 0) | |
(set-goal strategy-goal boom) | |
(set-goal ranged-unit-type-goal 0) | |
(disable-self) | |
) | |
(defrule | |
(random-number >= 50) | |
(or | |
(random-number >= 75) | |
(goal nr-map-goal 1) | |
) | |
(game-time > 15) | |
(game-time < 60) | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
=> | |
(set-goal strategy-goal boom) | |
(set-goal uu-up-goal 1) | |
(set-goal unit-goal my-unique-unit-line) | |
(set-goal control-goal 0) | |
(disable-self) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(goal nr-map-goal -1) | |
(random-number >= 25) | |
(random-number < 35) | |
(game-time > 13) | |
(game-time < 60) | |
(not (players-civ any-ally aztec)) | |
=> | |
(set-goal unit-goal monk) | |
(set-goal control-goal 0) | |
(set-goal strategy-goal rush) | |
(set-goal ranged-unit-type-goal monk) | |
(disable-self) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(up-compare-goal strategy-goal != flush) | |
(up-compare-goal strategy-goal != rush) | |
(taunt-detected any-ally 32) | |
=> | |
(acknowledge-taunt this-any-ally 32) | |
(set-goal strategy-goal rush) | |
(set-goal control-goal aggressive-rush) | |
(set-goal unit-goal knight) | |
(chat-to-allies-using-id 22155) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(up-compare-goal strategy-goal != boom) | |
(taunt-detected any-ally 33) | |
=> | |
(set-goal control-goal 0) | |
(set-goal ranged-unit-type-goal 0) | |
(set-goal strategy-goal boom) | |
(set-goal unit-goal knight) | |
(chat-to-allies-using-id 22156) | |
(acknowledge-taunt this-any-ally 33) | |
) | |
#end-if; spanish | |
#load-if-defined TEUTONIC-CIV | |
(defrule | |
(goal unit-goal knight) | |
(goal control-goal 0) | |
(building-type-count castle > 0) | |
(strategic-number sn-archer-threat < 3) | |
(goal anti-cavalry-threat-goal 1) | |
(up-research-status c: ri-heavy-scorpion < research-pending) | |
=> | |
(set-goal control-goal my-unique-unit-line) | |
(set-goal uu-up-goal 1) | |
(set-goal ranged-unit-type-goal 0) | |
(disable-self) | |
) | |
(defrule | |
(strategic-number sn-current-age >= ci-transit) | |
(goal unit-goal knight) | |
(goal control-goal 0) | |
(building-type-count castle > 0) | |
(or | |
(players-unit-type-count target-player spearman-line > 35) | |
(players-unit-type-count target-player camel-line > 24) | |
) | |
=> | |
(set-goal control-goal my-unique-unit-line) | |
(set-goal uu-up-goal 1) | |
(disable-self) | |
) | |
(defrule | |
(goal unit-goal knight) | |
(goal control-goal my-unique-unit-line) | |
(or | |
(goal anti-cavalry-threat-goal 1) | |
(strategic-number sn-infantry-threat >= 1) | |
) | |
(nor | |
(players-civ every-enemy hun); dont switch to TK vs ca civs | |
(strategic-number sn-archer-threat > 1) | |
) | |
(building-type-count castle > 1) | |
=> | |
(set-goal unit-goal my-unique-unit-line) | |
(set-goal uu-up-goal 1) | |
(disable-self) | |
) | |
(defrule | |
(strategic-number sn-current-age == fc-transit) | |
(goal strategy-goal flush) | |
=> | |
(set-goal unit-goal knight) | |
(disable-self) | |
) | |
(defrule | |
(or | |
(building-type-count stone-wall > 15) | |
(random-number < 6) | |
) | |
(game-time > 13) | |
(game-time < 60) | |
(random-number <= 20) | |
(not (players-civ any-ally aztec)) | |
=> | |
(set-goal strategy-goal rush) | |
(set-goal unit-goal monk) | |
(set-goal ranged-unit-type-goal monk) | |
(disable-self) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(random-number >= 70) | |
(goal position-goal pocket) | |
(game-time > 13) | |
(population-cap >= 200) | |
=> | |
(set-goal strategy-goal boom) | |
(set-goal uu-up-goal 0) | |
(set-goal unit-goal knight) | |
(set-goal control-goal 0) | |
(set-goal ranged-unit-type-goal 0) | |
(disable-self) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(or | |
(and | |
(random-number >= 80) | |
(nor | |
(players-civ focus-player briton) | |
(players-civ focus-player mayan) | |
) | |
) | |
(and | |
(building-type-count castle > 1) | |
(goal unit-goal monk) | |
) | |
) | |
=> | |
(set-goal strategy-goal boom) | |
(set-goal uu-up-goal 1) | |
(set-goal unit-goal my-unique-unit-line) | |
(set-goal control-goal 0) | |
(set-goal ranged-unit-type-goal monk) | |
(disable-self) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(goal nr-map-goal 1) | |
(not (goal ranged-unit-type-goal monk)) | |
(game-time > 25) | |
=> | |
(set-goal unit-goal knight) | |
(set-goal control-goal 0) | |
(set-goal ranged-unit-type-goal 0) | |
(set-goal strategy-goal boom) | |
(disable-self) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(up-compare-goal strategy-goal != flush) | |
(up-compare-goal strategy-goal != rush) | |
(taunt-detected any-ally 32) | |
=> | |
(acknowledge-taunt this-any-ally 32) | |
(set-goal strategy-goal rush) | |
(set-goal control-goal aggressive-rush) | |
(set-goal unit-goal knight) | |
(chat-to-allies-using-id 22155) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(taunt-detected any-ally 33) | |
=> | |
(acknowledge-taunt this-any-ally 33) | |
(set-goal control-goal 0) | |
(set-goal ranged-unit-type-goal 0) | |
(set-goal strategy-goal boom) | |
(set-goal unit-goal knight) | |
(chat-to-allies-using-id 22156) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(up-research-status c: ri-paladin >= research-pending) | |
(goal anti-cavalry-threat-goal 1) | |
(or | |
(strategic-number sn-archer-threat >= 3) | |
(strategic-number sn-cavalry-threat < 3) | |
) | |
(up-compare-goal ranged-unit-type-goal != scorpion) | |
(up-compare-goal ranged-unit-type-goal != monk) | |
(unit-type-count trade-cart > 4) | |
=> | |
(set-goal ranged-unit-type-goal scorpion) | |
) | |
#end-if;teutonic | |
#load-if-defined TURKISH-CIV | |
(defrule | |
(goal nr-map-goal -1) | |
(up-compare-goal position-goal == flank); hm | |
(random-number < 40) | |
=> | |
(set-goal strategy-goal flush) | |
(set-goal unit-goal scout-cavalry) | |
(disable-self) | |
) | |
(defrule | |
(or | |
(and | |
(or | |
(goal ffa-game-goal 1) | |
(and | |
(random-number >= 50) | |
(goal nr-map-goal 1) | |
) | |
) | |
(goal strategy-goal flush) | |
) | |
(regicide-game) | |
) | |
(game-time > 13) | |
(game-time < 60) | |
=> | |
(set-goal strategy-goal boom) | |
(set-goal unit-goal knight) | |
(set-goal ranged-unit-type-goal 0) | |
(set-goal control-goal 0) | |
(disable-self) | |
) | |
(defrule | |
(goal strategy-goal flush) | |
(strategic-number sn-current-age == feudal) | |
(players-unit-type-count focus-player spearman-line > 6) | |
=> | |
(set-goal unit-goal archer) | |
(set-goal ranged-unit-type-goal archer) | |
) | |
(defrule | |
(strategic-number sn-current-age == fc-transit) | |
(goal strategy-goal flush) | |
(goal unit-goal default-ranged) | |
=> | |
(set-goal unit-goal knight) | |
(set-goal ranged-unit-type-goal archer) | |
) | |
(defrule | |
(goal unit-goal knight) | |
(goal control-goal militiaman-line) | |
(players-unit-type-count focus-player spearman-line > 30) | |
(strategic-number sn-archer-threat < 2) | |
(up-research-status c: ri-champion >= research-pending) | |
(building-type-count-total barracks >= 3) | |
=> | |
(set-goal unit-goal militiaman-line) | |
(chat-to-player my-player-number "Switching to militiaman-line.") | |
) | |
(defrule | |
(current-age == dark-age) | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(building-type-count stone-wall > 15) | |
(game-time > 13) | |
(random-number < 50) | |
=> | |
(set-goal strategy-goal fast-imp) | |
(set-goal unit-goal gunpowder-class) | |
(set-goal ranged-unit-type-goal gunpowder-class) | |
(set-goal control-goal 0) | |
(disable-self) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(up-compare-goal strategy-goal != flush) | |
(up-compare-goal strategy-goal != rush) | |
(taunt-detected any-ally 32) | |
=> | |
(acknowledge-taunt this-any-ally 32) | |
(set-goal strategy-goal rush) | |
(set-goal control-goal aggressive-rush) | |
(set-goal unit-goal knight) | |
(chat-to-allies-using-id 22155) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(taunt-detected any-ally 33) | |
=> | |
(acknowledge-taunt this-any-ally 33) | |
(set-goal control-goal 0) | |
(set-goal ranged-unit-type-goal 0) | |
(set-goal strategy-goal boom) | |
(set-goal unit-goal knight) | |
(chat-to-allies-using-id 22156) | |
) | |
#end-if | |
#load-if-defined VIKING-CIV | |
(defrule | |
(random-number > 20) | |
(random-number < 40) | |
=> | |
(set-goal strategy-goal rush) | |
(set-goal unit-goal archer) | |
(disable-self) | |
) | |
#load-if-defined UP-POCKET-POSITION | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed); bug fix in maps that were previously falsely detected as water maps | |
(goal strategy-goal flush) | |
=> | |
(set-goal strategy-goal boom) | |
(set-goal unit-goal archer) | |
(disable-self) | |
) | |
#end-if | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock >= water-mixed) | |
(current-age < castle-age) | |
(up-compare-goal position-goal == flank); hm | |
(not (goal strategy-goal flush)) | |
=> | |
(set-goal strategy-goal flush) | |
(set-goal unit-goal militiaman-line) | |
) | |
(defrule | |
(goal strategy-goal flush) | |
(strategic-number sn-current-age == fc-transit) | |
(military-population < 15) | |
(not (goal unit-goal knight)) | |
=> | |
(set-goal unit-goal knight) | |
(set-goal control-goal militiaman-line) | |
(chat-to-player my-player-number "Switching to knights.") | |
) | |
#load-if-defined UP-GAME-AGE2-X2 | |
(defrule | |
(goal control-goal 0) | |
(or | |
(goal strategy-goal boom) | |
(goal position-goal pocket) | |
) | |
(civilian-population > 90) | |
(strategic-number sn-cavalry-threat > 2) | |
=> | |
(set-goal control-goal my-unique-unit-line) | |
(set-goal uu-up-goal 1) | |
) | |
#end-if | |
(defrule | |
(goal control-goal 0) | |
(or | |
(and | |
(civilian-population > 90) | |
(or | |
(strategic-number sn-current-age >= ci-transit) | |
(and | |
(food-amount > 400) | |
(gold-amount < 200) | |
) | |
) | |
) | |
(or | |
(goal anti-cavalry-threat-goal 1) | |
(goal enemy-goal eagle-warrior) | |
) | |
) | |
(up-compare-goal strategy-goal != boom) | |
=> | |
(set-goal control-goal militiaman-line) | |
) | |
(defrule | |
(goal control-goal 0) | |
(or | |
(or | |
(goal enemy-goal eagle-warrior) | |
(and | |
(players-unit-type-count focus-player huskarl-line > 4) | |
(civilian-population > 60) | |
) | |
) | |
(and | |
(up-research-status c: ri-arbalest >= research-pending) | |
(up-research-status c: ri-ring-archer-armor >= research-pending) | |
) | |
) | |
(goal strategy-goal boom) | |
=> | |
(set-goal control-goal militiaman-line) | |
) | |
(defrule | |
(civilian-population >= 60) | |
(up-research-status c: ri-long-swordsman >= research-pending) | |
(not (goal unit-goal militiaman-line)) | |
(strategic-number sn-current-age >= ci-transit) | |
=> | |
(set-goal strategy-goal rush) | |
(set-goal unit-goal militiaman-line) | |
(chat-to-player my-player-number "Switching to militiaman-line.") | |
) | |
(defrule | |
(goal strategy-goal rush) | |
(goal unit-goal default-unit) | |
(current-age < castle-age) | |
=> | |
(set-goal unit-goal knight) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(or | |
(goal nr-map-goal 1) | |
(random-number <= 20) | |
) | |
=> | |
(set-goal unit-goal archer) | |
(set-goal control-goal 0) | |
(set-goal ranged-unit-type-goal archer) | |
(set-goal strategy-goal boom) | |
(disable-self) | |
) | |
(defrule | |
(game-time > 25) | |
(game-time < 60) | |
(building-type-count castle > 0) | |
=> | |
(set-goal unit-goal my-unique-unit-line) | |
(set-goal control-goal 0) | |
(set-goal ranged-unit-type-goal archer) | |
(set-goal strategy-goal boom) | |
(disable-self) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(taunt-detected any-ally 32) | |
=> | |
(acknowledge-taunt this-any-ally 32) | |
(set-goal strategy-goal rush) | |
(set-goal control-goal aggressive-rush) | |
(set-goal ranged-unit-type-goal archer) | |
(set-goal unit-goal archer) | |
(chat-to-allies-using-id 22155) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(taunt-detected any-ally 33) | |
=> | |
(acknowledge-taunt this-any-ally 33) | |
(set-goal strategy-goal boom) | |
(set-goal control-goal 0) | |
(set-goal unit-goal archer) | |
(set-goal ranged-unit-type-goal archer) | |
(chat-to-allies-using-id 22156) | |
) | |
#end-if; viking-civ | |
#load-if-defined INCAN-CIV | |
(defrule | |
(strategic-number sn-current-age >= ci-transit) | |
(goal strategy-goal fast-imp) | |
=> | |
(set-goal strategy-goal rush) | |
(set-goal unit-goal eagle-warrior) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(random-number < 40) | |
(or | |
(random-number > 20) | |
(goal nr-map-goal 1) | |
) | |
(game-time > 13) | |
(or | |
(goal position-goal pocket) | |
(goal nr-map-goal 1) | |
) | |
=> | |
(set-goal unit-goal archer) | |
(set-goal control-goal 0) | |
(set-goal strategy-goal boom) | |
(disable-self) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(random-number >= 40) | |
(goal nr-map-goal 1) | |
(game-time > 13) | |
=> | |
(set-goal unit-goal eagle-warrior) | |
(set-goal control-goal 0) | |
(set-goal strategy-goal boom) | |
(disable-self) | |
) | |
(defrule | |
(current-age == castle-age) | |
(goal strategy-goal boom) | |
(building-type-count-total town-center >= tc-level-three) | |
=> | |
(set-goal strategy-goal fast-imp) | |
(disable-self) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(goal strategy-goal rush) | |
(goal unit-goal eagle-warrior) | |
(strategic-number sn-cavalry-threat == 0) | |
(strategic-number sn-infantry-threat > 0) | |
(up-research-status c: ri-arbalest < research-pending) | |
=> | |
(set-goal ranged-unit-type-goal slinger) | |
(disable-self) | |
) | |
(defrule | |
(random-number > 65) | |
(random-number < 90) | |
(building-type-count-total castle == 0) | |
=> | |
(set-goal strategy-goal boom) | |
(set-goal unit-goal my-unique-unit-line) | |
(set-goal control-goal 0) | |
(set-goal ranged-unit-type-goal archer) | |
(disable-self) | |
) | |
(defrule | |
(random-number >= 90) | |
(goal ffa-game-goal -1) | |
(building-type-count-total castle == 0) | |
=> | |
(set-goal strategy-goal rush) | |
(set-goal unit-goal archer) | |
(set-goal control-goal aggressive-rush) | |
(set-goal ranged-unit-type-goal archer) | |
(disable-self) | |
) | |
(defrule | |
(dropsite-min-distance stone < 5) | |
(building-type-count-total town-center >= tc-level-three) | |
(nor | |
(goal unit-goal my-unique-unit-line) | |
(goal control-goal shot) | |
) | |
(or | |
(or | |
(strategic-number sn-cavalry-threat > 2) | |
(strategic-number sn-infantry-threat > 2) | |
) | |
(and | |
(goal unit-goal archer) | |
(strategic-number sn-current-age >= ci-transit) | |
) | |
) | |
=> | |
(set-goal control-goal my-unique-unit-line) | |
(set-goal uu-up-goal 1) | |
(chat-to-player my-player-number "Preparing in order to train unique units later on.") | |
(disable-self) | |
) | |
(defrule | |
(building-type-count castle > 1) | |
=> | |
(set-goal unit-goal my-unique-unit-line) | |
(set-goal uu-up-goal 1) | |
(set-goal control-goal 0) | |
(chat-to-player my-player-number "Switching to unique units.") | |
(disable-self) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(taunt-detected any-ally 32) | |
=> | |
(acknowledge-taunt this-any-ally 32) | |
(set-goal strategy-goal rush) | |
(set-goal control-goal aggressive-rush) | |
(set-goal ranged-unit-type-goal archer) | |
(set-goal unit-goal archer) | |
(chat-to-allies-using-id 22155) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(taunt-detected any-ally 33) | |
=> | |
(acknowledge-taunt this-any-ally 33) | |
(set-goal strategy-goal boom) | |
(set-goal control-goal 0) | |
(set-goal unit-goal eagle-warrior) | |
(set-goal ranged-unit-type-goal archer) | |
(chat-to-allies-using-id 22156) | |
) | |
#end-if; INCAN-CIV | |
#load-if-defined MAGYAR-CIV | |
(defrule | |
(goal strategy-goal flush) | |
=> | |
(set-goal unit-goal scout-cavalry) | |
(disable-self) | |
) | |
(defrule | |
(strategic-number sn-current-age == fc-transit) | |
(goal strategy-goal flush) | |
(random-number > 70) | |
=> | |
(set-goal unit-goal knight) | |
(chat-to-player my-player-number "Switching to knights.") | |
(disable-self) | |
) | |
(defrule | |
(or | |
(strategic-number sn-current-age >= ci-transit) | |
(building-type-count-total town-center >= tc-level-four) | |
) | |
(dropsite-min-distance stone < 5) | |
=> | |
(set-goal uu-up-goal 1) | |
(set-goal control-goal my-unique-unit-line) | |
) | |
(defrule | |
(game-time > 13) | |
(random-number >= 70) | |
=> | |
(set-goal strategy-goal rush) | |
(set-goal unit-goal cavalry-archer) | |
(set-goal ranged-unit-type-goal cavalry-archer) | |
(set-goal control-goal my-unique-unit-line) | |
(disable-self) | |
) | |
(defrule | |
(or | |
(regicide-game) | |
(goal nr-map-goal 1) | |
) | |
(game-time > 13) | |
=> | |
(set-goal strategy-goal boom) | |
(set-goal unit-goal cavalry-archer) | |
(set-goal ranged-unit-type-goal cavalry-archer) | |
(set-goal control-goal 0) | |
(disable-self) | |
) | |
(defrule | |
(building-type-count castle == 0) | |
(building-type-count stone-wall-line > 15) | |
(or | |
(players-civ every-enemy aztec) | |
(players-civ every-enemy saracen) | |
) | |
(game-time >= 60) | |
=> | |
(set-goal strategy-goal rush) | |
(set-goal unit-goal scout-cavalry) | |
(set-goal control-goal aggressive-rush) | |
(disable-self) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(up-compare-goal strategy-goal != flush) | |
(taunt-detected any-ally 32) | |
=> | |
(acknowledge-taunt this-any-ally 32) | |
(set-goal strategy-goal rush) | |
(set-goal control-goal aggressive-rush) | |
(set-goal unit-goal knight) | |
(chat-to-allies-using-id 22155) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(taunt-detected any-ally 33) | |
=> | |
(acknowledge-taunt this-any-ally 33) | |
(set-goal control-goal 0) | |
(set-goal strategy-goal boom) | |
(set-goal ranged-unit-type-goal cavalry-archer) | |
(set-goal unit-goal cavalry-archer) | |
(chat-to-allies-using-id 22156) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(building-type-count stone-wall-line > 15) | |
(up-compare-goal unit-goal != scout-cavalry) | |
(game-time > 25) | |
=> | |
(set-goal control-goal 0) | |
(set-goal strategy-goal boom) | |
(disable-self) | |
) | |
#end-if | |
#load-if-defined INDIAN-CIV | |
(defrule | |
(game-time > 13) | |
(game-time < 60) | |
(or | |
(or | |
(players-civ every-enemy hun) | |
(players-civ every-enemy mongol) | |
) | |
(or | |
(or | |
(players-civ every-enemy persian) | |
(players-civ every-enemy teutonic) | |
) | |
(or | |
(players-civ every-enemy frankish) | |
(players-civ every-enemy magyar) | |
) | |
) | |
) | |
=> | |
(set-goal strategy-goal rush) | |
(set-goal unit-goal knight) | |
(disable-self) | |
) | |
#load-if-not-defined UP-POCKET-POSITION | |
(defrule | |
(goal nr-map-goal -1) | |
(random-number > 60) | |
(up-compare-goal position-goal == flank); hm | |
(game-time < 13) | |
=> | |
(set-goal strategy-goal flush) | |
(set-goal unit-goal scout-cavalry) | |
(disable-self) | |
) | |
#else | |
(defrule | |
(goal nr-map-goal -1) | |
(random-number < 30) | |
(game-time > 13) | |
=> | |
(set-goal strategy-goal boom) | |
(set-goal unit-goal archer) | |
(set-goal control-goal 0) | |
(set-goal ranged-unit-type-goal archer) | |
(disable-self) | |
) | |
#end-if | |
(defrule | |
(or | |
(goal unit-goal skirmisher) | |
(goal unit-goal archer) | |
) | |
(building-type-count stable > 1) | |
=> | |
(set-goal unit-goal knight) | |
(chat-to-player my-player-number "Enable training of camels.") | |
) | |
(defrule | |
(goal unit-goal skirmisher) | |
(building-type-count-total town-center >= tc-level-three) | |
(dropsite-min-distance stone < 6) | |
=> | |
(set-goal control-goal my-unique-unit-line) | |
(set-goal uu-up-goal 1) | |
(disable-self) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(up-compare-goal strategy-goal != flush) | |
(up-compare-goal strategy-goal != rush) | |
(taunt-detected any-ally 32) | |
=> | |
(acknowledge-taunt this-any-ally 32) | |
(set-goal strategy-goal rush) | |
(set-goal control-goal aggressive-rush) | |
(set-goal ranged-unit-type-goal archer) | |
(set-goal unit-goal archer) | |
(chat-to-allies-using-id 22155) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(taunt-detected any-ally 33) | |
=> | |
(acknowledge-taunt this-any-ally 33) | |
(set-goal control-goal 0) | |
(set-goal ranged-unit-type-goal 0) | |
(set-goal strategy-goal boom) | |
(set-goal unit-goal my-unique-unit-line) | |
(chat-to-allies-using-id 22156) | |
) | |
#end-if | |
#load-if-defined SLAVIC-CIV | |
(defrule | |
(or | |
(and | |
(goal unit-goal knight) | |
(game-time > 1800) | |
) | |
(and | |
(goal unit-goal scorpion) | |
(building-type-count-total town-center >= tc-level-four) | |
) | |
) | |
(dropsite-min-distance stone < 6) | |
=> | |
(set-goal control-goal my-unique-unit-line) | |
(set-goal uu-up-goal 1) | |
(disable-self) | |
) | |
(defrule | |
(or | |
(goal unit-goal knight) | |
(goal unit-goal scorpion) | |
) | |
(building-type-count castle > 0) | |
(or | |
(building-type-count castle > 1) | |
(goal unit-goal knight) | |
) | |
=> | |
(set-goal unit-goal my-unique-unit-line) | |
(set-goal uu-up-goal 1) | |
(set-goal control-goal 0) | |
) | |
(defrule | |
(food-amount > 150) | |
(or | |
(gold-amount < 50) | |
(food-amount > 300) | |
) | |
(or | |
(goal unit-goal monk) | |
(goal strategy-goal flush) | |
) | |
(or | |
(players-unit-type-count focus-player eagle-warrior-line > 7) | |
(goal enemy-goal eagle-warrior) | |
) | |
=> | |
(set-goal unit-goal militiaman-line) | |
(chat-to-player my-player-number "Training long-swordsmen to counter an EW rush.") | |
(disable-self) | |
) | |
(defrule | |
(strategic-number sn-current-age == dark) | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(random-number > 80) | |
(or | |
(goal nr-map-goal 1) | |
(random-number > 90) | |
) | |
(game-time < 60) | |
=> | |
(set-goal unit-goal my-unique-unit-line) | |
(set-goal strategy-goal boom) | |
(set-goal uu-up-goal 1) | |
(disable-self) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(or | |
(goal nr-map-goal 1) | |
(goal position-goal pocket) | |
) | |
(random-number < 80) | |
(random-number > 60) | |
(game-time > 13) | |
(game-time < 60) | |
=> | |
(set-goal unit-goal scorpion) | |
(set-goal control-goal 0) | |
(set-goal ranged-unit-type-goal 0) | |
(set-goal strategy-goal boom) | |
(disable-self) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(random-number < 15) | |
(game-time < 60) | |
(game-time > 13) | |
=> | |
(set-goal unit-goal monk) | |
(set-goal control-goal 0) | |
(set-goal ranged-unit-type-goal monk) | |
(set-goal strategy-goal rush) | |
(disable-self) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(up-compare-goal strategy-goal != flush) | |
(up-compare-goal strategy-goal != rush) | |
(taunt-detected any-ally 32) | |
=> | |
(acknowledge-taunt this-any-ally 32) | |
(set-goal strategy-goal rush) | |
(set-goal control-goal 0) | |
(set-goal ranged-unit-type-goal monk) | |
(set-goal unit-goal monk) | |
(chat-to-allies-using-id 22155) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(taunt-detected any-ally 33) | |
=> | |
(acknowledge-taunt this-any-ally 33) | |
(set-goal control-goal 0) | |
(set-goal ranged-unit-type-goal 0) | |
(set-goal strategy-goal boom) | |
(set-goal unit-goal scorpion) | |
(chat-to-allies-using-id 22156) | |
) | |
#end-if; slavic-civ | |
#load-if-defined ITALIAN-CIV | |
(defrule | |
(game-time < 60) | |
(game-time > 16) | |
(or | |
(goal nr-map-goal 1) | |
(random-number < 40) | |
) | |
=> | |
(set-goal strategy-goal boom) | |
(set-goal unit-goal my-unique-unit-line) | |
(set-goal uu-up-goal 1) | |
(set-goal ranged-unit-type-goal 0) | |
(disable-self) | |
) | |
#load-if-not-defined UP-POCKET-POSITION | |
(defrule | |
(goal nr-map-goal -1) | |
(random-number > 60) | |
(up-compare-goal position-goal == flank); hm | |
(game-time > 13) | |
=> | |
(set-goal strategy-goal flush) | |
(set-goal unit-goal archer) | |
(disable-self) | |
) | |
#end-if | |
(defrule | |
(goal nr-map-goal -1) | |
(random-number >= 40) | |
(random-number < 61) | |
=> | |
(set-goal strategy-goal rush) | |
(set-goal unit-goal knight) | |
(disable-self) | |
) | |
(defrule | |
(random-number < 10) | |
(game-time > 20) | |
=> | |
(set-goal strategy-goal rush) | |
(set-goal unit-goal monk) | |
(set-goal control-goal 0) | |
(set-goal ranged-unit-type-goal monk) | |
(disable-self) | |
) | |
(defrule | |
(building-type-count-total town-center >= tc-level-three) | |
(goal unit-goal archer) | |
(strategic-number sn-cavalry-threat > 1) | |
=> | |
(set-goal control-goal my-unique-unit-line) | |
(set-goal uu-up-goal 1) | |
) | |
(defrule | |
(goal control-goal my-unique-unit-line) | |
(building-type-count castle > 0) | |
(not (goal unit-goal gunpowder-class)) | |
=> | |
(set-goal unit-goal my-unique-unit-line) | |
(set-goal control-goal 0) | |
) | |
(defrule | |
(strategic-number sn-current-age >= ci-transit) | |
(or | |
(strategic-number sn-infantry-threat > 2) | |
(players-civ every-enemy gothic) | |
) | |
=> | |
(set-goal unit-goal gunpowder-class) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(up-compare-goal strategy-goal != flush) | |
(up-compare-goal strategy-goal != rush) | |
(taunt-detected any-ally 32) | |
=> | |
(acknowledge-taunt this-any-ally 32) | |
(set-goal strategy-goal rush) | |
(set-goal control-goal aggressive-rush) | |
(set-goal ranged-unit-type-goal archer) | |
(set-goal unit-goal archer) | |
(chat-to-allies-using-id 22155) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(current-age == dark-age) | |
(game-time > 30) | |
(game-time < 300) | |
(taunt-detected any-ally 33) | |
=> | |
(acknowledge-taunt this-any-ally 33) | |
(set-goal control-goal 0) | |
(set-goal ranged-unit-type-goal 0) | |
(set-goal strategy-goal boom) | |
(set-goal unit-goal my-unique-unit-line) | |
(chat-to-allies-using-id 22156) | |
) | |
#end-if ;italy | |
#load-if-defined LOW-RESOURCES-START | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(or | |
(game-time < 850) | |
(and | |
(building-type-count-total monastery > 0) | |
(and | |
(players-current-age focus-player == feudal-age) | |
(players-military-population focus-player < 2) | |
) | |
) | |
) | |
(strategic-number sn-current-age >= fc-transit) | |
(goal unit-goal eagle-warrior) | |
(goal control-goal 0) | |
=> | |
(set-goal control-goal aggressive-rush) | |
(chat-to-player my-player-number "Going for an aggressive EW rush.") | |
) | |
#load-if-not-defined DIFFICULTY-MODERATE | |
(defrule | |
(strategic-number sn-current-age == dark) | |
(unit-type-count-total villager >= 28) | |
(goal strategy-goal flush) | |
(up-compare-goal enemy-goal != flush) | |
(or | |
(unit-type-count-total villager >= 30) | |
(and | |
(up-compare-goal unit-goal != militiaman-line) | |
(up-compare-goal unit-goal != scout-cavalry) | |
) | |
) | |
=> | |
(set-goal strategy-goal rush) | |
(set-goal unit-goal default-unit) | |
(chat-local-to-self "Had a bad dark-age, switching to a fast castle-age strategy.") | |
) | |
#end-if | |
#end-if | |
#load-if-defined LUDIKRIS-MAP | |
#load-if-defined UP-POCKET-POSITION | |
(defrule | |
(up-compare-goal strategy-goal == flush) | |
=> | |
(set-goal strategy-goal boom) | |
(set-goal unit-goal default-unit) | |
(disable-self)) | |
#else | |
(defrule | |
(up-compare-goal strategy-goal == flush) | |
=> | |
(set-goal strategy-goal rush) | |
(set-goal unit-goal default-unit) | |
(disable-self)) | |
#end-if | |
#end-if | |
#load-if-not-defined UP-POCKET-POSITION | |
#load-if-not-defined BRITON-CIV | |
#load-if-not-defined CHINESE-CIV | |
#load-if-not-defined MAYAN-CIV | |
#load-if-not-defined MONGOL-CIV | |
#load-if-not-defined KOREAN-CIV | |
(defrule | |
(goal unit-goal my-unique-unit-line) | |
(goal train-civ-goal 1) | |
(strategic-number sn-resource-control == 0) | |
(unit-type-count-total my-unique-unit-line < 3) | |
(building-type-count castle > 0) | |
(building-type-count stone-wall-line < 15) | |
(current-age-time < 300) | |
(current-age == castle-age) | |
(food-amount < unique-unit-food) | |
=> | |
(set-goal train-civ-goal -1) | |
) | |
#end-if | |
#end-if | |
#end-if | |
#end-if | |
#end-if | |
#end-if | |
#end-if ; NOT DM | |
#load-if-defined DEATH-MATCH | |
#load-if-defined KOREAN-CIV | |
(defrule | |
(starting-age < imperial-age) | |
=> | |
(set-goal unit-goal my-unique-unit-line) | |
(set-goal control-goal militiaman-line) | |
(set-goal uu-up-goal 1) | |
(disable-self) | |
) | |
#end-if | |
#load-if-defined TURKISH-CIV | |
(defrule | |
(strategic-number sn-infantry-threat > 1) | |
(research-completed ri-chemistry) | |
=> | |
(set-goal ranged-unit-type-goal gunpowder-class) | |
(disable-self) | |
) | |
#end-if | |
#end-if | |
#load-if-not-defined BRITON-CIV | |
#load-if-not-defined CELTIC-CIV | |
#load-if-not-defined FRANKISH-CIV | |
#load-if-not-defined GOTHIC-CIV | |
#load-if-not-defined HUN-CIV | |
#load-if-not-defined KOREAN-CIV | |
#load-if-not-defined MAYAN-CIV | |
#load-if-not-defined MONGOL-CIV | |
#load-if-not-defined PERSIAN-CIV | |
#load-if-not-defined VIKING-CIV | |
#load-if-not-defined MAGYAR-CIV | |
#load-if-not-defined INCAN-CIV | |
#load-if-not-defined INDIAN-CIV | |
(defrule | |
(or (taunt-detected any-computer 230) | |
(taunt-detected any-human 230)) | |
(current-age <= castle-age); dark | |
; (game-time > 30) | |
(game-time < 300) | |
=> | |
(set-goal strategy-goal rush) | |
(set-goal unit-goal monk) | |
(set-goal ranged-unit-type-goal monk) | |
(chat-to-player this-any-computer "30Going for a mush.") | |
(chat-to-player this-any-human "30Going for a mush.") | |
(acknowledge-taunt this-any-computer 230) | |
(acknowledge-taunt this-any-human 230)) | |
#load-if-not-defined AZTEC-CIV | |
(defrule | |
(goal strategy-goal flush) | |
(goal ranged-unit-type-goal monk) | |
=> | |
(set-goal ranged-unit-type-goal default-ranged) | |
) | |
(defrule | |
(goal unit-goal monk) | |
(strategic-number sn-archer-threat > 1) | |
(or | |
(and | |
(building-type-count-total monastery < 3) | |
(game-time < 1500) | |
) | |
(or | |
(or | |
(civ-selected japanese) | |
(civ-selected chinese) | |
) | |
(or | |
(civ-selected slavic) | |
(civ-selected teutonic) | |
) | |
) | |
) | |
=> | |
(set-goal unit-goal scorpion) | |
(set-goal ranged-unit-type-goal monk) | |
) | |
#end-if | |
#end-if | |
#end-if | |
#end-if | |
#end-if | |
#end-if | |
#end-if | |
#end-if | |
#end-if | |
#end-if | |
#end-if | |
#end-if | |
#end-if | |
#end-if | |
(defrule | |
(strategic-number sn-current-age == feudal) | |
(goal strategy-goal flush) | |
(goal unit-goal militiaman-line) | |
(or | |
(strategic-number sn-archer-threat > 1) | |
(and | |
(players-building-type-count focus-player archery-range > 1) | |
(goal enemy-goal skirmisher) | |
) | |
) | |
(strategic-number sn-infantry-threat == 0) | |
=> | |
(set-goal unit-goal skirmisher) | |
(chat-to-player my-player-number "Switching to skirmishers.") | |
) | |
#load-if-not-defined AZTEC-CIV | |
#load-if-not-defined VIKING-CIV | |
#load-if-not-defined MAYAN-CIV | |
(defrule | |
(goal strategy-goal fast-imp) | |
(up-compare-goal unit-goal != gunpowder-class) | |
(strategic-number sn-current-age >= ci-transit) | |
=> | |
(set-goal strategy-goal rush) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock >= water-islands) | |
(current-age < castle-age) | |
(goal unit-goal my-unique-unit-line); change it or it will bug as no extra stone will be gathered during castle age advance | |
(building-type-count-total castle == 0) | |
=> | |
(set-goal unit-goal militiaman-line) | |
) | |
#end-if | |
#load-if-not-defined BYZANTINE-CIV | |
#load-if-not-defined INDIAN-CIV | |
(defrule | |
(goal strategy-goal rush) | |
(or | |
(goal unit-goal skirmisher) | |
(goal unit-goal mix) | |
) | |
(not (goal control-goal my-unique-unit-line)) | |
(research-available imperial-age) | |
(dropsite-min-distance stone < 6) | |
=> | |
(set-goal unit-goal default-unit) | |
(chat-to-player my-player-number "Switching to my default unit.") | |
) | |
#end-if | |
#end-if | |
#end-if | |
#end-if | |
(defrule | |
(goal strategy-goal flush) | |
(goal unit-goal scout-cavalry) | |
(gold-amount > 250) | |
(building-type-count stable > 0); training scouts doesn't depend on the unit-goal, building a stable does | |
=> | |
(set-goal unit-goal skirmisher); use this to decrease gold gatherer percentage | |
) | |
#load-if-not-defined BYZANTINE-CIV | |
#load-if-not-defined CELTIC-CIV | |
(defrule | |
(goal strategy-goal flush) | |
(or | |
(goal unit-goal scout-cavalry) | |
(goal unit-goal skirmisher) | |
) | |
(strategic-number sn-current-age == fc-transit) | |
=> | |
(set-goal unit-goal default-ranged) | |
(set-goal ranged-unit-type-goal default-ranged) | |
(chat-to-player my-player-number "Switching to my default ranged unit.") | |
) | |
#end-if | |
(defrule | |
(goal strategy-goal flush) | |
(goal unit-goal default-ranged) | |
(or | |
(or | |
(civ-selected frankish) | |
(civ-selected persian) | |
) | |
(or | |
(civ-selected spanish) | |
(civ-selected teutonic) | |
) | |
) | |
=> | |
(set-goal unit-goal knight) | |
(chat-to-player my-player-number "Switching to knights.") | |
) | |
(defrule | |
(goal strategy-goal flush) | |
(goal unit-goal default-ranged) | |
(or | |
(civ-selected gothic) | |
(civ-selected celtic) | |
) | |
=> | |
(set-goal unit-goal militiaman-line) | |
(chat-to-player my-player-number "Switching to militiaman-line.") | |
) | |
#end-if | |
#else ; not PIDM | |
(defrule | |
(not (goal unit-goal cavalry-archer)) | |
(up-research-status c: ri-bloodlines >= research-pending) | |
(up-research-status c: ri-paladin >= research-pending) | |
=> | |
(set-goal unit-goal knight) | |
) | |
(defrule | |
(nor | |
(up-research-status c: ri-bloodlines >= research-pending) | |
(up-research-status c: ri-paladin >= research-pending) | |
) | |
=> | |
(set-goal unit-goal my-unique-unit-line) | |
) | |
#end-if ;PIDM | |
(defrule | |
(true) ; provisory but can leave it in | |
=> | |
(set-goal aofe-game-goal 1) | |
(disable-self) | |
) | |
(defrule | |
(gold-amount < 50) | |
(unit-type-count fishing-ship >= 10) | |
(up-research-status c: ri-hand-cart >= research-pending) | |
(can-research ri-gillnets) | |
=> | |
(research ri-gillnets) | |
) | |
(defrule | |
(or | |
(unit-type-count eagle-warrior > 12) | |
(strategic-number sn-resource-control == ri-elite-eagle-warrior) | |
) | |
(can-research-with-escrow ri-eagle-warrior) | |
=> | |
(release-escrow food)(release-escrow gold) | |
(research ri-eagle-warrior) | |
) | |
(defrule | |
(or | |
(or | |
(unit-type-count genoese-crossbowman > 10) | |
(unit-type-count kamayuk > 10) | |
) | |
(or | |
(unit-type-count magyar-huszar > 10) | |
(or | |
(unit-type-count elephant-archer > 10) | |
(unit-type-count boyar > 10) | |
) | |
) | |
) | |
(can-research-with-escrow my-unique-unit-upgrade);fix for the fact that new uu don't count as my-uu-line | |
=> | |
(release-escrow food)(release-escrow gold) | |
(research my-unique-unit-upgrade) | |
(set-goal uu-up-goal 0) | |
) | |
#load-if-defined AZTEC-CIV | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(unit-type-count skirmisher-line > 15) | |
(or | |
(unit-type-count battering-ram-line > 3) | |
(unit-type-count trebuchet-set > 0) | |
) | |
(can-research-with-escrow ri-atlatl) | |
=> | |
(release-escrow food)(release-escrow gold) | |
(research ri-atlatl) | |
) | |
(defrule | |
(building-type-count castle > 0) | |
(research-available my-unique-research) | |
(up-research-status c: ri-blast-furnace >= research-pending) | |
(up-research-status c: ri-plate-mail >= research-pending) | |
(nand | |
(or | |
(unit-type-count eagle-warrior-line > 10) | |
(unit-type-count heavy-eagle-warrior > 10) | |
) | |
(research-available ri-elite-eagle-warrior) | |
) | |
=> | |
(set-strategic-number sn-resource-control 2) | |
) | |
(defrule | |
(up-research-status c: ri-blast-furnace >= research-pending) | |
(up-research-status c: ri-plate-mail >= research-pending) | |
(can-research-with-escrow my-unique-research) | |
(nand | |
(or | |
(unit-type-count eagle-warrior-line > 10) | |
(unit-type-count heavy-eagle-warrior > 10) | |
) | |
(research-available ri-elite-eagle-warrior) | |
) | |
=> | |
(release-escrow food)(release-escrow gold) | |
(research my-unique-research) | |
) | |
#end-if | |
#load-if-defined BRITON-CIV | |
(defrule | |
(strategic-number sn-resource-control < 1) | |
(unit-type-count trebuchet-set > 3) | |
(up-research-status c: my-unique-research >= research-pending) | |
(can-research ri-war-wolf) | |
=> | |
(research ri-war-wolf) | |
) | |
(defrule | |
(strategic-number sn-resource-control < 1) | |
(building-type-count castle > 0) | |
(research-available my-unique-research) | |
(population >= del-civ-pop) | |
=> | |
(set-strategic-number sn-resource-control 2) | |
) | |
#end-if | |
#load-if-defined BYZANTINE-CIV | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(unit-type-count fire-ship-line > 3) | |
(can-research-with-escrow ri-greek-fire) | |
=> | |
(release-escrow food)(release-escrow gold) | |
(research ri-greek-fire) | |
) | |
(defrule | |
(up-compare-goal ranged-unit-type-goal != archer) | |
(up-research-status c: ri-halberdier >= research-pending) | |
(food-amount < 300) | |
(gold-amount > 700) | |
(wood-amount > 400) | |
=> | |
(set-goal ranged-unit-type-goal archer) | |
) | |
#end-if | |
#load-if-defined CELTIC-CIV | |
(defrule | |
(strategic-number sn-resource-control < 1) | |
(population > max-civ-pop) | |
(can-research ri-stronghold) | |
=> | |
(research ri-stronghold) | |
) | |
#end-if | |
#load-if-defined CHINESE-CIV | |
(defrule | |
(strategic-number sn-resource-control < 1) | |
(building-type-count bombard-tower > 1) | |
(can-research ri-great-wall) | |
=> | |
(research ri-great-wall) | |
) | |
#end-if | |
#load-if-defined FRANKISH-CIV | |
(defrule | |
(strategic-number sn-resource-control < 1) | |
(or | |
(population > del-civ-pop) | |
(death-match-game) | |
) | |
(can-research ri-chivalry) | |
=> | |
(research ri-chivalry) | |
) | |
(defrule | |
(unit-type-count trade-cart > 20) | |
(goal anti-cavalry-threat-goal 1) | |
(goal unit-goal militiaman-line) | |
(up-research-status c: ri-cavalier >= research-pending) | |
=> | |
(set-goal unit-goal knight) | |
(set-goal control-goal 0) | |
(set-goal ranged-unit-type-goal scorpion) | |
) | |
(defrule | |
(unit-type-count trade-cart > 20) | |
(goal anti-cavalry-threat-goal 1) | |
(goal control-goal militiaman-line) | |
=> | |
(set-goal control-goal 0) | |
(set-goal ranged-unit-type-goal scorpion) | |
) | |
#end-if | |
#load-if-defined GOTHIC-CIV | |
(defrule | |
(true) | |
=> | |
(do-nothing); This is just to match the up-jump-rule. | |
(disable-self) | |
) | |
#end-if | |
#load-if-defined HUN-CIV | |
(defrule | |
(strategic-number sn-resource-control < 1) | |
(goal unit-goal my-unique-unit-line) | |
(can-research ri-marauders) | |
=> | |
(research ri-marauders) | |
) | |
#end-if | |
#load-if-defined JAPANESE-CIV | |
(defrule | |
(strategic-number sn-resource-control < 1) | |
(building-type-count watch-tower > 3) | |
(or | |
(up-research-status c: ri-masonry >= research-pending) | |
(goal under-attack-goal 1) | |
) | |
(can-research ri-yasama) | |
=> | |
(research ri-yasama) | |
) | |
(defrule | |
(up-research-status c: my-unique-unit-upgrade >= research-pending) | |
(unit-type-count trebuchet-set >= 4) | |
(can-research-with-escrow my-unique-research) | |
=> | |
(release-escrow wood)(release-escrow gold) | |
(research my-unique-research) | |
) | |
#end-if | |
#load-if-defined KOREAN-CIV | |
(defrule | |
(strategic-number sn-resource-control < 1) | |
(unit-type-count turtle-ship-line > 3) | |
(can-research ri-panokseon) | |
=> | |
(research ri-panokseon) | |
) | |
#end-if | |
#load-if-defined MAYAN-CIV | |
(defrule | |
(strategic-number sn-resource-control < 1) | |
(unit-type-count archer-line >= 18) | |
(goal team-coordination-goal 1); attacking | |
(can-research ri-obsidian-arrows) | |
=> | |
(research ri-obsidian-arrows) | |
) | |
#end-if | |
#load-if-defined MONGOL-CIV | |
(defrule | |
(strategic-number sn-resource-control < 1) | |
(wood-amount > 600) | |
(can-research ri-nomads) | |
=> | |
(research ri-nomads) | |
) | |
(defrule | |
(building-type-count house > 0) | |
(research-completed ri-nomads) | |
=> | |
(delete-building house) | |
) | |
#end-if | |
#load-if-defined PERSIAN-CIV | |
(defrule | |
(strategic-number sn-resource-control < 1) | |
(up-research-status c: ri-murder-holes >= research-pending) | |
(can-research ri-boiling-oil) | |
=> | |
(research ri-boiling-oil) | |
) | |
(defrule | |
(can-research-with-escrow my-unique-research) | |
(or (up-research-status c: my-unique-unit-upgrade >= research-pending) | |
(unit-type-count my-unique-unit-line > 4)) | |
=> | |
(release-escrow food)(release-escrow gold) | |
(research my-unique-research) | |
) | |
#end-if | |
#load-if-defined SARACEN-CIV | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(unit-type-count monk >= 11) | |
(or (strategic-number sn-current-age >= ci-transit) | |
(gold-amount < 500)) | |
(can-research ri-madrasah) | |
=> | |
(research ri-madrasah) | |
) | |
#end-if | |
#load-if-defined SPANISH-CIV | |
(defrule | |
(or (strategic-number sn-resource-control <= 2) | |
(strategic-number sn-resource-control == ri-inquisition)) | |
(unit-type-count monk > 7) | |
(strategic-number sn-current-age >= ci-transit) | |
(can-research-with-escrow ri-inquisition) | |
=> | |
(release-escrow food)(release-escrow gold) | |
(research ri-inquisition) | |
) | |
(defrule | |
(random-number < 90) | |
(goal strategy-goal boom) | |
(goal unit-goal my-unique-unit-line) | |
(current-age == castle-age) | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(strategic-number sn-focus-player-number g:= closest-enemy-goal) | |
(or (or (players-civ focus-player gothic) | |
(players-civ focus-player indian)) | |
(players-civ focus-player persian)) | |
=> | |
(set-goal ranged-unit-type-goal monk) | |
(disable-self) | |
) | |
(defrule | |
(population > del-civ-pop) | |
(current-age-time > 300) | |
(can-research my-unique-research) | |
=> | |
(research my-unique-research) | |
(set-strategic-number sn-allow-civilian-defense 3) | |
) | |
#end-if | |
#load-if-defined TEUTONIC-CIV | |
(defrule | |
(strategic-number sn-resource-control < 1) | |
(strategic-number sn-current-age >= ci-transit) | |
(can-research ri-ironclad) | |
=> | |
(research ri-ironclad) | |
) | |
(defrule | |
(goal unit-goal knight) | |
(goal control-goal 0) | |
(strategic-number sn-archer-threat >= 2) | |
(goal anti-cavalry-threat-goal 1) | |
(up-research-status c: my-unique-unit-upgrade < research-pending) | |
=> | |
(set-goal control-goal 0) | |
(set-goal uu-up-goal 0) | |
(set-goal ranged-unit-type-goal scorpion) | |
(disable-self) | |
) | |
#end-if | |
#load-if-defined TURKISH-CIV | |
(defrule | |
(strategic-number sn-resource-control < 1) | |
(unit-type-count cavalry-archer-class > high-min-number-upgrade) | |
(can-research ri-sipahi) | |
=> | |
(research ri-sipahi) | |
) | |
#end-if | |
#load-if-defined VIKING-CIV | |
(defrule | |
(strategic-number sn-resource-control < 3) | |
(unit-type-count berserk-line > mid-min-number-upgrade) | |
(up-research-status c: my-unique-unit-upgrade >= research-pending) | |
(strategic-number sn-cavalry-threat > 1) | |
(can-research ri-chieftains) | |
=> | |
(research ri-chieftains) | |
) | |
(defrule | |
(can-research-with-escrow my-unique-research) | |
(up-research-status c: my-unique-unit-upgrade >= research-pending) | |
=> | |
(release-escrow food)(release-escrow gold) | |
(research my-unique-research) | |
) | |
#end-if | |
#load-if-defined MAGYAR-CIV | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(or (strategic-number sn-current-age >= ci-transit) | |
(game-time > 3000)) | |
(can-research-with-escrow ri-mercenaries) | |
=> | |
(release-escrow food)(release-escrow gold) | |
(research ri-mercenaries) | |
) | |
(defrule | |
(strategic-number sn-resource-control < 1) | |
(unit-type-count cavalry-archer-class > high-min-number-upgrade) | |
(can-research ri-recurve-bow) | |
=> | |
(research ri-recurve-bow) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(goal nr-map-goal 1) | |
=> | |
(set-goal unit-goal knight) | |
(set-goal strategy-goal rush) | |
(disable-self) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(building-type-count-total stone-wall < 15) | |
(random-number < 3) | |
=> | |
(set-goal unit-goal archer) | |
(set-goal strategy-goal rush) | |
(disable-self) | |
) | |
#end-if | |
#load-if-defined INCAN-CIV | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(or (strategic-number sn-resource-control < 1) | |
(goal hostilities-goal 1)) | |
(or (unit-type-count skirmisher-line > 15) | |
(unit-type-count slinger > 9)) | |
(can-research ri-andean-sling) | |
=> | |
(research ri-andean-sling) | |
) | |
(defrule | |
(strategic-number sn-resource-control < 1) | |
(up-research-status c: ri-conscription >= research-pending) | |
(can-research my-unique-research) | |
=> | |
(research my-unique-research) | |
) | |
(defrule | |
(dropsite-min-distance stone < 5) | |
(or (up-compare-goal control-goal != shot) | |
(up-research-status c: ri-elite-eagle-warrior >= research-pending)) | |
(strategic-number sn-cavalry-threat > 1) | |
=> | |
(set-goal control-goal my-unique-unit-line) | |
(set-goal uu-up-goal 1) | |
(chat-to-player my-player-number "Preparing in order to train unique units later on.") | |
(disable-self) | |
) | |
#end-if | |
#load-if-defined SLAVIC-CIV | |
(defrule | |
(or (strategic-number sn-resource-control <= 2) | |
(strategic-number sn-resource-control == ri-orthodoxy)) | |
(unit-type-count monk >= 7) | |
(or (strategic-number sn-current-age >= ci-transit) | |
(goal hostilities-goal 1)) | |
(can-research-with-escrow ri-orthodoxy) | |
=> | |
(release-escrow gold) | |
(research ri-orthodoxy) | |
) | |
(defrule | |
(strategic-number sn-resource-control < 1) | |
(or (up-research-status c: ri-halberdier >= research-pending) | |
(up-research-status c: ri-champion >= research-pending)) | |
(unit-type-count infantry-class > 20) | |
(can-research my-unique-research) | |
=> | |
(research my-unique-research) | |
) | |
#end-if | |
#load-if-defined INDIAN-CIV | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(unit-type-count camel-line > 7) | |
(can-research-with-escrow ri-imperial-camel) | |
=> | |
(release-escrow food)(release-escrow gold) | |
(research ri-imperial-camel) | |
) | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(or | |
(gold-amount < 100) | |
(strategic-number sn-current-age >= ci-transit) | |
) | |
(can-research ri-sultans) | |
=> | |
(research ri-sultans) | |
) | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(unit-type-count hand-cannoneer > 7) | |
(can-research ri-shatagni) | |
=> | |
(research ri-shatagni) | |
) | |
#end-if | |
#load-if-defined ITALIAN-CIV | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(or | |
(goal hostilities-goal 1) | |
(strategic-number sn-resource-control < 1) | |
) | |
(or | |
(unit-type-count genoese-crossbowman > 10) | |
(up-research-status c: my-unique-unit-upgrade >= research-pending) | |
) | |
(can-research ri-pavise) | |
=> | |
(research ri-pavise) | |
) | |
#end-if | |
#load-if-defined AZTEC-CIV | |
(defrule | |
(strategic-number sn-current-age == castle) | |
(game-time > 1800) | |
(goal unit-goal monk) | |
(wood-amount > 400) | |
(food-amount > 800) | |
(gold-amount < 300) | |
=> | |
(set-goal unit-goal skirmisher) | |
(set-goal control-goal 0) | |
(set-goal ranged-unit-type-goal monk) | |
) | |
#else | |
(defrule | |
(strategic-number sn-current-age == castle) | |
(game-time > 1800) | |
(goal unit-goal monk) | |
(wood-amount > 400) | |
(food-amount > 800) | |
(gold-amount < 300) | |
=> | |
(set-goal unit-goal my-unique-unit-line) | |
(set-goal control-goal 0) | |
(set-goal ranged-unit-type-goal monk) | |
) | |
#end-if | |
(defrule | |
(game-time > 3000) | |
(goal ranged-unit-type-goal monk) | |
(unit-type-count trade-cart < 6) | |
(dropsite-min-distance gold > 10) | |
=> | |
(set-goal ranged-unit-type-goal 0) | |
) | |
#load-if-defined BALTIC-MAP | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock == water-mixed) | |
(goal position-goal pocket) | |
(or (game-time < 1800) | |
(and (goal enemy-boats-goal 1) | |
(unit-type-count warship-class < 35))) | |
=> | |
(set-goal strategy-goal rush) | |
(set-strategic-number sn-minimum-water-body-size-for-dock water-islands) | |
) | |
(defrule | |
(game-time > 1800) | |
(strategic-number sn-minimum-water-body-size-for-dock == water-islands) | |
(goal position-goal pocket) | |
(or | |
(goal enemy-boats-goal 0) | |
(unit-type-count warship-class > 50) | |
) | |
=> | |
(set-strategic-number sn-minimum-water-body-size-for-dock water-mixed); water secured, train land army | |
) | |
#end-if | |
; end strategy section | |
;******************** BOAR HUNTING ************************************** | |
#load-if-not-defined DIFFICULTY-EASIEST | |
#load-if-not-defined DIFFICULTY-EASY | |
(defrule | |
(unit-type-count villager >= 9); 8 | |
(dropsite-min-distance live-boar <= 32) | |
(can-research ri-loom) | |
=> | |
(research ri-loom)) | |
(defrule ; split rule | |
(or (dropsite-min-distance live-boar <= -1) | |
(or (unit-type-count 216 >= 1); male hunter | |
(or (unit-type-count 122 >= 1); female hunter | |
(or (unit-type-count villager < 9) | |
(up-research-status c: ri-loom != research-complete))))) | |
=> | |
(up-jump-rule 2)) | |
(defrule | |
; (timer-triggered tensec) | |
(dropsite-min-distance live-boar s:<= sn-maximum-hunt-drop-distance) | |
; nn (dropsite-min-distance boar-hunting >= 5); no slain boar left | |
;(or | |
; j (unit-type-count villager >= 9) | |
; (unit-type-count 958 <= 0)); living domestic animals ; not working? | |
;(or (unit-type-count villager >= 14) | |
;(or (food-amount >= 50) | |
;(or (up-pending-objects c: villager >= 1) | |
; (building-type-count-total farm >= 3)))) | |
=> | |
(set-strategic-number sn-enable-boar-hunting 2) | |
(set-strategic-number sn-minimum-boar-hunt-group-size 1) | |
(set-strategic-number sn-minimum-number-hunters 1) | |
(set-strategic-number sn-maximum-food-drop-distance 16) ; "failed" hunt | |
(set-strategic-number sn-maximum-hunt-drop-distance 32) | |
; (up-retask-gatherers food c: 1) | |
(up-request-hunters c: 1) | |
; (chat-local-to-self "Trying to start a hunt.") | |
) | |
(defrule | |
(dropsite-min-distance live-boar <= 32) | |
(dropsite-min-distance live-boar >= 0) | |
(strategic-number sn-enable-boar-hunting == 2) | |
(strategic-number sn-minimum-boar-hunt-group-size == 1) | |
(strategic-number sn-minimum-number-hunters == 1) | |
(unit-type-count 216 <= 0); male hunter | |
(unit-type-count 122 <= 0); female hunter | |
=> | |
(up-retask-gatherers food c: 1) | |
(disable-self)); test | |
(defrule | |
(dropsite-min-distance live-boar <= 16) | |
(strategic-number sn-enable-boar-hunting >= 1) | |
(unit-type-count 216 < 2); male hunter | |
(unit-type-count 122 < 2); female hunter | |
(or (unit-type-count 216 >= 1); male hunter | |
(unit-type-count 122 >= 1)); female hunter | |
=> | |
(set-strategic-number sn-minimum-number-hunters 2) | |
(up-request-hunters c: 1) | |
; (chat-local-to-self "Requesting a support hunter.") | |
) | |
(defrule | |
(dropsite-min-distance live-boar <= 10) ; else the risc of a dead vill is still too high | |
(dropsite-min-distance live-boar >= 0) | |
(unit-type-count 216 <= 2); male hunter | |
(unit-type-count 122 <= 2); female hunter | |
(strategic-number sn-enable-boar-hunting >= 1) | |
;(or (unit-type-count 216 >= 1); at least 1 hunter = the boar is not just standing too close to the mill | |
; (unit-type-count 122 >= 1)) | |
=> | |
(set-strategic-number sn-minimum-boar-hunt-group-size 7) | |
(set-strategic-number sn-minimum-number-hunters 7) | |
(up-retask-gatherers food c: 1) | |
(up-request-hunters c: 6) | |
; (chat-local-to-self "Adding more hunters.") | |
) | |
(defrule | |
(or (dropsite-min-distance live-boar s:> sn-maximum-hunt-drop-distance) | |
(and (dropsite-min-distance live-boar >= 11) | |
(dropsite-min-distance boar-hunting <= 10))); eating a boar right now | |
(strategic-number sn-minimum-number-hunters > 2) | |
=> | |
(set-strategic-number sn-minimum-boar-hunt-group-size 1) | |
(set-strategic-number sn-minimum-number-hunters 2) | |
; (chat-local-to-self "Lowering min-hunters.") | |
) | |
(defrule | |
(or (dropsite-min-distance live-boar > 32) | |
(dropsite-min-distance live-boar <= -1)) | |
(or (building-type-count-total mill >= 2) | |
(unit-type-count villager >= 12)) | |
(or (unit-type-count villager >= 18) | |
(and (cc-players-unit-type-count 0 48 == 0); no boar on the map | |
(cc-players-unit-type-count 0 822 == 0))) | |
(strategic-number sn-enable-boar-hunting != 1) | |
=> | |
(set-strategic-number sn-enable-boar-hunting 1); enable hunting of all kinds | |
(set-strategic-number sn-minimum-boar-hunt-group-size 2) | |
(set-strategic-number sn-minimum-number-hunters 2) | |
; (chat-local-to-self "Disabling hunting restrictions.") | |
) | |
#end-if | |
#end-if | |
;******************** RESOURCE MANAGEMENT AND AGE UP ******************** | |
(defrule | |
(or (strategic-number sn-minimum-water-body-size-for-dock >= water-islands) | |
(building-type-count-total town-center == 0)) | |
=> | |
(up-jump-rule 27) | |
) | |
(defrule | |
(game-time < 2400) | |
(or (goal strategy-goal boom) | |
(civ-selected indian)); camel + pikes would be overkill | |
(goal unit-goal knight) | |
=> | |
(up-jump-rule 1) | |
) | |
(defrule | |
(goal train-civ-goal 1) | |
(strategic-number sn-cavalry-threat >= 1) | |
(strategic-number sn-resource-control <= 2) | |
(strategic-number sn-military-level >= 0) | |
(military-population > 10) | |
(building-type-count barracks > 0) | |
(nand (goal unit-goal knight) | |
(unit-type-count villager < 60)) | |
(research-available ri-pikeman) | |
=> | |
(set-strategic-number sn-resource-control ri-pikeman) | |
(set-goal train-civ-goal ri-pikeman) | |
;debug (chat-to-player my-player-number "Saving resources for ri-pikeman") | |
) | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(goal train-civ-goal 1) | |
(goal strategy-goal rush) | |
(goal unit-goal eagle-warrior) | |
(research-available ri-chain-mail) | |
=> | |
(set-goal train-civ-goal ri-chain-mail); stop villager training only EWs | |
;debug (chat-to-player my-player-number "Saving resources for ri-chain-mail") | |
) | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(goal train-civ-goal ri-chain-mail) | |
(goal strategy-goal rush) | |
(goal unit-goal eagle-warrior) | |
(up-research-status c: ri-pikeman >= research-pending) | |
(research-available ri-chain-mail) | |
=> | |
(set-strategic-number sn-resource-control ri-chain-mail);stop all units; vils remain stopped | |
;debug (chat-to-player my-player-number "Saving resources for ri-chain-mail") | |
) | |
(defrule | |
(building-type-count town-center > 0) | |
(current-age >= castle-age) | |
(unit-type-count villager > villager-siege-workshop) | |
(building-type-count-total siege-workshop < 1) | |
(goal forward-threat-goal 1); don't check wood to block other buildings if enemy forwarded us | |
(nand | |
(unit-type-count ranged-unit-class < 5) | |
(strategic-number sn-military-level < 0) | |
) | |
(wood-amount < 260); some buffer | |
=> | |
(set-goal increase-town-size-goal siege-workshop) | |
(set-strategic-number sn-resource-control battering-ram) | |
(set-goal save-wood-goal 1) | |
;debug;debug (chat-to-player my-player-number "Saving resources for siege-workshop") | |
) | |
(defrule | |
(building-type-count-total town-center >= tc-level-two) | |
(goal unit-goal my-unique-unit-line) | |
(or | |
(and | |
(goal monk-threat-goal 1) | |
(map-type arena) | |
) | |
(or | |
(players-unit-type-count focus-player mangonel-line > 1) | |
(players-unit-type-count focus-player scorpion-line > 4) | |
) | |
) | |
(wood-amount >= 200) | |
(current-age >= castle-age) | |
(building-type-count-total siege-workshop < 1) | |
=> | |
(set-goal increase-town-size-goal siege-workshop) | |
(enable-timer increase-town-size-timer 4) | |
) | |
(defrule | |
(strategic-number sn-archer-threat > 1) | |
(goal unit-goal my-unique-unit-line) | |
(wood-amount >= 200) | |
(current-age == castle-age) | |
(building-type-count-total siege-workshop < 1) | |
=> | |
(set-goal increase-town-size-goal siege-workshop) | |
(enable-timer increase-town-size-timer 4) | |
) | |
(defrule | |
(wood-amount >= 800) | |
(current-age == castle-age) | |
(building-type-count-total university < 1) | |
(building-type-count-total castle < 1) | |
(building-type-count-total siege-workshop < 1) | |
=> | |
(set-goal increase-town-size-goal siege-workshop) | |
(enable-timer increase-town-size-timer 4) | |
) | |
#load-if-not-defined BYZANTINE-CIV | |
#load-if-not-defined HUN-CIV | |
#load-if-not-defined VIKING-CIV | |
(defrule | |
(wood-amount >= 200) | |
(current-age >= castle-age) | |
(strategic-number sn-resource-control < 2) | |
(building-type-count-total town-center < tc-level-four) | |
(goal strategy-goal boom) | |
(or | |
(goal unit-goal knight) | |
(civ-selected teutonic) | |
) | |
(strategic-number sn-archer-threat < 2) | |
=> | |
(up-jump-rule 1) | |
) | |
(defrule | |
(wood-amount >= 200) | |
(current-age >= castle-age) | |
(strategic-number sn-resource-control < 2) | |
(building-type-count-total town-center >= tc-level-three) | |
(or | |
(goal unit-goal knight) | |
(civ-selected teutonic) | |
) | |
(building-type-count-total siege-workshop < 1) | |
=> | |
(set-goal increase-town-size-goal siege-workshop) | |
(enable-timer increase-town-size-timer 4) | |
) | |
#load-if-not-defined UP-POCKET-POSITION | |
(defrule | |
(current-age == castle-age) | |
(or | |
(strategic-number sn-archer-threat > 1) | |
(players-building-type-count focus-player siege-workshop > 1) | |
) | |
(or | |
(goal unit-goal knight) | |
(goal ranged-unit-type-goal monk) | |
) | |
(building-type-count-total siege-workshop < 1) | |
(wood-amount < 200) | |
(game-time < 1500) | |
=> | |
(set-goal save-wood-goal siege-workshop) | |
(chat-local-to-self "Saving resources for siege-workshop") | |
) | |
(defrule | |
(can-build siege-workshop) | |
(or | |
(strategic-number sn-archer-threat > 1) | |
(and | |
(players-building-type-count focus-player siege-workshop > 1) | |
(game-time < 1500) | |
) | |
) | |
(or | |
(goal unit-goal knight) | |
(goal ranged-unit-type-goal monk) | |
) | |
(building-type-count-total siege-workshop < 1) | |
=> | |
(set-goal increase-town-size-goal siege-workshop) | |
(enable-timer increase-town-size-timer 4) | |
(build siege-workshop) | |
) | |
#end-if | |
#end-if | |
#end-if | |
#end-if | |
(defrule | |
(current-age >= castle-age) | |
(wood-amount >= 200) | |
(goal save-wood-goal 0) | |
(goal unit-goal cavalry-archer) | |
(building-type-count-total town-center == 1) | |
(building-type-count-total stable == 1) | |
(building-type-count-total archery-range > 3) | |
(building-type-count-total siege-workshop < 1) | |
(or | |
(up-compare-goal position-goal == flank) | |
(players-building-type-count focus-player watch-tower > 1) | |
) | |
=> | |
(set-goal increase-town-size-goal siege-workshop) | |
(enable-timer increase-town-size-timer 4) | |
) | |
(defrule | |
(goal strategy-goal flush) | |
(goal save-wood-goal 0) | |
(building-type-count town-center > 0) | |
(building-type-count-total monastery > 0) | |
(up-research-status c: ri-bodkin-arrow >= research-pending) | |
(strategic-number sn-military-level > 0) | |
(building-type-count-total siege-workshop < 1) | |
(can-build siege-workshop) | |
=> | |
(set-goal increase-town-size-goal siege-workshop) | |
(enable-timer increase-town-size-timer 4) | |
) | |
(defrule | |
(building-type-count town-center > 0) | |
(or | |
(strategic-number sn-military-level > 1) | |
(goal team-coordination-goal 1) | |
) | |
(or | |
(and | |
(players-building-type-count any-enemy castle > 0) | |
(strategic-number sn-military-level > 2) | |
) | |
(and | |
(goal unit-goal default-ranged) | |
(up-compare-goal strategy-goal != boom) | |
) | |
) | |
(goal under-attack-goal 0) | |
(building-type-count-total siege-workshop < 1) | |
(can-build siege-workshop) | |
=> | |
(set-goal increase-town-size-goal siege-workshop) | |
(enable-timer increase-town-size-timer 4) | |
) | |
(defrule | |
(goal control-goal shot) | |
(building-type-count-total town-center < tc-level-three) | |
(players-building-type-count focus-player castle > 0) | |
=> | |
(up-jump-rule 2) | |
) | |
(defrule | |
(current-age >= castle-age) | |
(wood-amount >= 200) | |
(goal strategy-goal rush) | |
(goal unit-goal eagle-warrior) | |
(or | |
(or | |
(strategic-number sn-archer-threat > 1) | |
(players-unit-type-count focus-player scorpion-line > 9) | |
) | |
(or | |
(building-type-count-total stone-wall-line > 10) | |
(players-building-type-count any-enemy castle > 0) | |
) | |
) | |
(building-type-count-total siege-workshop < 1) | |
=> | |
(set-goal increase-town-size-goal siege-workshop) | |
(enable-timer increase-town-size-timer 4) | |
) | |
(defrule | |
(building-type-count town-center > 0) | |
(current-age >= castle-age) | |
(goal increase-town-size-goal 0) | |
(or | |
(building-type-count monastery > 2); get fast imp with mush | |
(or | |
(goal strategy-goal fast-imp) | |
(goal control-goal shot) | |
) | |
) | |
(building-type-count-total siege-workshop < 1) | |
(wood-amount >= 200) | |
=> | |
(set-goal increase-town-size-goal siege-workshop) | |
(enable-timer increase-town-size-timer 4) | |
) | |
(defrule | |
(strategic-number sn-resource-control == 0) | |
(strategic-number sn-military-level > 1) | |
(current-age == castle-age) | |
(or (nor (goal strategy-goal fast-imp); don't delay fast imp or booms | |
(goal strategy-goal boom)) | |
(goal control-goal shot)); except if meso shot | |
(building-type-count siege-workshop > 0) | |
; (unit-type-count-total siege-unit-class == 0) | |
(unit-type-count-total battering-ram-line < 3) | |
=> | |
(set-strategic-number sn-resource-control battering-ram) | |
;debug (chat-to-player my-player-number "Saving resources for battering-ram") | |
) | |
(defrule | |
(strategic-number sn-resource-control == 0) | |
(current-age == castle-age) | |
(or (goal strategy-goal rush) | |
(goal strategy-goal flush)) | |
(strategic-number sn-military-level > 1) | |
(goal unit-goal default-ranged) | |
(building-type-count siege-workshop > 0) | |
(unit-type-count-total battering-ram-line < 2) | |
;(nand (unit-type-count spearman-line < 6) | |
; (strategic-number sn-cavalry-threat > 0)) | |
=> | |
(set-strategic-number sn-resource-control battering-ram) | |
;debug (chat-to-player my-player-number "Saving resources for battering-ram") | |
) | |
(defrule | |
(goal unit-goal knight) | |
(building-type-count siege-workshop > 0) | |
(strategic-number sn-archer-threat > 1) | |
(strategic-number sn-military-level < 0) | |
(unit-type-count-total mangonel-line < 1) | |
=> | |
(up-jump-rule 7) | |
) | |
(defrule | |
(goal forward-threat-goal 1) | |
(building-type-count siege-workshop > 0) | |
(or (unit-type-count-total battering-ram-line == 0) | |
(players-building-type-count focus-player watch-tower > 3)) | |
(unit-type-count-total battering-ram-line < 3) | |
(unit-type-count-total trebuchet-set == 0) | |
(nand (strategic-number sn-military-level < 0) | |
(goal under-attack-goal 1)) | |
(civilian-population > 22) | |
=> | |
(set-strategic-number sn-resource-control battering-ram) | |
;debug (chat-to-player my-player-number "Saving resources for battering-ram") | |
) | |
(defrule | |
(goal forward-threat-goal 1) | |
(building-type-count siege-workshop > 0) | |
(players-building-type-count focus-player watch-tower > 5) | |
(unit-type-count-total battering-ram-line < 6) | |
(unit-type-count-total trebuchet-set == 0) | |
(nand (strategic-number sn-military-level < 0) | |
(goal under-attack-goal 1)) | |
=> | |
(set-strategic-number sn-resource-control battering-ram) | |
;debug (chat-to-player my-player-number "Saving resources for battering-ram") | |
) | |
(defrule | |
(building-type-count siege-workshop > 0) | |
(unit-type-count-total battering-ram-line < 1) | |
(unit-type-count-total trebuchet-set == 0) | |
(goal team-coordination-goal 1); attacking | |
(players-building-type-count target-player stone-wall-line >= 8) | |
=> | |
(set-strategic-number sn-resource-control battering-ram) | |
;debug (chat-to-player my-player-number "Saving resources for battering-ram") | |
) | |
(defrule | |
(building-type-count siege-workshop > 0) | |
(unit-type-count battering-ram-line == 0) | |
(or (cc-players-unit-type-count any-enemy castle-arrow > 0) | |
(cc-players-unit-type-count any-enemy watch-tower-arrow > 0)) | |
(or (up-compare-goal under-attack-goal == 1) | |
(goal forward-threat-goal 1)) | |
(strategic-number sn-military-level >= 0) | |
=> | |
(set-strategic-number sn-resource-control battering-ram) | |
;debug (chat-to-player my-player-number "Saving resources for battering-ram") | |
) | |
(defrule | |
(strategic-number sn-resource-control < 3) | |
(goal control-goal shot) | |
(building-type-count siege-workshop > 0) | |
(unit-type-count-total battering-ram-line < 1) | |
(current-age == castle-age) | |
(strategic-number sn-military-level >= 0) | |
=> | |
(set-strategic-number sn-resource-control battering-ram) | |
;debug (chat-to-player my-player-number "Saving resources for battering-ram") | |
) | |
(defrule | |
(strategic-number sn-resource-control == battering-ram) | |
(wood-amount < 175) | |
=> | |
(set-goal save-wood-goal 1) | |
) | |
(defrule | |
(or (and (goal forward-threat-goal 1) | |
(unit-type-count battering-ram-line < 2)) | |
(strategic-number sn-resource-control == battering-ram)) | |
(can-train-with-escrow battering-ram-line) | |
=> | |
(release-escrow wood)(release-escrow gold) | |
(train battering-ram-line) | |
(set-strategic-number sn-resource-control 0) | |
) | |
(defrule | |
(goal increase-town-size-goal siege-workshop) | |
(or (or (goal unit-goal skirmisher) | |
(goal strategy-goal boom)) | |
(or (goal unit-goal my-unique-unit-line) | |
(goal unit-goal mix))) | |
(up-compare-goal forward-threat-goal != 1); don't build an aggressive siege-workshop with these strategies | |
(building-type-count-total town-center < tc-level-two) | |
=> | |
(set-goal increase-town-size-goal 0) | |
) | |
(defrule | |
(current-age >= castle-age) | |
(player-in-game any-ally) | |
(military-population > 15) | |
(nand (or (goal position-goal pocket) | |
(goal strategy-goal boom)) | |
(players-building-type-count any-ally siege-workshop > 0)) | |
(players-military-population target-player < 5) | |
(building-type-count-total siege-workshop < 1) | |
(wood-amount < 200) | |
=> | |
(set-goal save-wood-goal 1) | |
) | |
(defrule | |
(current-age >= castle-age) | |
(player-in-game any-ally) | |
(military-population > 12) | |
(or | |
(nor | |
(goal position-goal pocket) | |
(goal strategy-goal boom) | |
) | |
(players-building-type-count target-player watch-tower > 0) | |
) | |
(players-military-population target-player < 5) | |
(building-type-count-total siege-workshop < 1) | |
(wood-amount >= 200) | |
=> | |
(set-goal increase-town-size-goal siege-workshop) | |
(enable-timer increase-town-size-goal 3) | |
) | |
#load-if-not-defined DEATH-MATCH | |
(defrule | |
(building-type-count town-center > 0) | |
(current-age >= castle-age) | |
(goal increase-town-size-goal 0) | |
(goal unit-goal archer) | |
(or | |
(and | |
(goal control-goal aggressive-rush) | |
(civ-selected mayan) | |
) | |
(and | |
(players-building-type-count focus-player watch-tower > 0) | |
(goal strategy-goal rush) | |
) | |
) | |
(building-type-count-total siege-workshop < 1) | |
(wood-amount >= 200) | |
(up-compare-goal position-goal == flank) | |
=> | |
(set-goal increase-town-size-goal siege-workshop) | |
(enable-timer increase-town-size-timer 4) | |
) | |
#end-if | |
(defrule | |
(current-age >= castle-age) | |
(goal increase-town-size-goal 0) | |
(goal save-wood-goal 0) | |
(building-type-count-total town-center >= tc-level-four) | |
(or | |
(goal ranged-unit-type-goal scorpion) | |
(up-research-status c: ri-heavy-scorpion >= research-pending) | |
) | |
(building-type-count-total siege-workshop < 3) | |
(wood-amount >= 400) | |
=> | |
(set-goal increase-town-size-goal siege-workshop) | |
(enable-timer increase-town-size-timer 4) | |
) | |
#load-if-not-defined DIFFICULTY-EASIEST | |
#load-if-not-defined DIFFICULTY-EASY | |
(defrule | |
(strategic-number sn-maximum-town-size >= 60) | |
(goal increase-town-size-goal 0) | |
(goal save-wood-goal 0) | |
(building-type-count-total town-center >= tc-level-four) | |
(wood-amount > 1400) | |
(up-research-status c: ri-siege-ram >= research-pending) | |
(building-type-count-total siege-workshop < 3) | |
=> | |
(set-goal forward-goal siege-workshop) | |
) | |
#end-if | |
#end-if | |
(defrule | |
(goal increase-town-size-goal 0) | |
(current-age >= castle-age) | |
(goal save-wood-goal 0) | |
(building-type-count-total town-center >= tc-level-four) | |
(or | |
(or | |
(building-type-count-total town-center >= tc-level-five) | |
(unit-type-count-total villager >= max-civ) | |
) | |
(and | |
(up-compare-goal strategy-goal != boom) | |
(population-cap < 250) | |
) | |
) | |
(building-type-count-total siege-workshop < 1) | |
(wood-amount >= 200) | |
=> | |
(set-goal increase-town-size-goal siege-workshop) | |
(enable-timer increase-town-size-timer 4) | |
) | |
(defrule | |
(goal increase-town-size-goal 0) | |
(current-age >= castle-age) | |
(strategic-number sn-resource-control != ri-elite-skirmisher) | |
(goal strategy-goal rush) | |
(goal unit-goal scorpion) | |
(building-type-count-total siege-workshop < 3) | |
(wood-amount >= 200) | |
=> | |
(set-goal increase-town-size-goal siege-workshop) | |
(enable-timer increase-town-size-timer 4) | |
) | |
#load-if-not-defined UP-POCKET-POSITION | |
#load-if-not-defined GOTHIC-CIV | |
(defrule | |
(goal increase-town-size-goal 0) | |
(current-age >= castle-age) | |
(strategic-number sn-resource-control != ri-elite-skirmisher) | |
(strategic-number sn-archer-threat > 0) | |
(strategic-number sn-military-level < 0) | |
(building-type-count-total town-center >= tc-level-two) | |
(building-type-count-total siege-workshop < 1) | |
(wood-amount >= 200) | |
=> | |
(set-goal increase-town-size-goal siege-workshop) | |
(enable-timer increase-town-size-timer 4) | |
) | |
#end-if | |
#else | |
(defrule | |
(goal increase-town-size-goal 0) | |
(current-age >= castle-age) | |
(strategic-number sn-resource-control != ri-elite-skirmisher) | |
(goal unit-goal scorpion) | |
(building-type-count-total town-center >= tc-level-two) | |
(building-type-count-total siege-workshop < 1) | |
(wood-amount >= 200) | |
=> | |
(set-goal increase-town-size-goal siege-workshop) | |
(enable-timer increase-town-size-timer 4) | |
) | |
#end-if | |
#load-if-defined CELTIC-CIV | |
(defrule | |
(current-age >= castle-age) | |
(goal increase-town-size-goal 0) | |
(building-type-count-total town-center >= tc-level-two) | |
(goal save-wood-goal 0) | |
(or | |
(building-type-count-total town-center >= tc-level-four) | |
(and | |
(or | |
(goal unit-goal knight) | |
(building-type-count-total town-center >= tc-level-three) | |
) | |
(building-type-count-total siege-workshop == 0) | |
) | |
) | |
(building-type-count-total siege-workshop < 3) | |
(wood-amount >= 200) | |
=> | |
(set-goal increase-town-size-goal siege-workshop) | |
(enable-timer increase-town-size-timer 4) | |
) | |
#end-if | |
#load-if-defined SLAVIC-CIV | |
(defrule | |
(goal save-wood-goal 0) | |
(current-age >= castle-age) | |
(goal increase-town-size-goal 0) | |
(building-type-count-total town-center >= tc-level-two) | |
(or | |
(building-type-count-total town-center >= tc-level-three) | |
(building-type-count-total siege-workshop == 0) | |
) | |
(or | |
(building-type-count-total town-center >= tc-level-four) | |
(building-type-count-total siege-workshop == 1) | |
) | |
(building-type-count-total siege-workshop < 3) | |
(wood-amount >= 200) | |
=> | |
(set-goal increase-town-size-goal siege-workshop) | |
(enable-timer increase-town-size-timer 4) | |
) | |
(defrule | |
(strategic-number sn-resource-control == 0) | |
(strategic-number sn-current-age >= ci-transit) | |
(unit-type-count scorpion-line > 9) | |
(up-research-status c: ri-heavy-scorpion < research-pending) | |
(goal unit-goal scorpion) | |
=> | |
(set-strategic-number sn-resource-control 2) | |
(set-goal save-wood-goal 1) | |
) | |
#end-if | |
#load-if-defined DEATH-MATCH | |
(defrule | |
(game-time > 120) | |
(up-compare-goal increase-town-size-goal != siege-workshop) | |
(building-type-count-total siege-workshop == 0) | |
(wood-amount >= 200) | |
(current-age == castle-age) | |
=> | |
(set-goal increase-town-size-goal siege-workshop) | |
(enable-timer increase-town-size-timer 4) | |
) | |
#end-if | |
(defrule | |
(goal increase-town-size-goal siege-workshop) | |
(up-pending-objects c: siege-workshop > 0) | |
=> | |
(set-goal increase-town-size-goal 0) | |
) | |
(defrule | |
(goal increase-town-size-goal siege-workshop) | |
(can-build siege-workshop) | |
=> | |
(build siege-workshop) | |
(set-goal increase-town-size-goal 2) | |
) | |
#end-if ; NOT WONDER RACE | |
(defrule | |
(game-time > 20) | |
(or | |
(or | |
(map-type scandanavia) | |
(death-match-game) | |
) | |
(and | |
(or | |
(dropsite-min-distance boar-hunting < 30) | |
(dropsite-min-distance deer-hunting < 32) | |
) | |
(unit-type-count-total villager > 14) | |
) | |
) | |
(research-available ri-loom) | |
=> | |
(research ri-loom) | |
(set-goal need-loom-goal 1) | |
) | |
(defrule | |
(or (players-military-population any-enemy >= 3); loom fast when enemy looks dangerous | |
(or (current-age >= castle-age); loom anyways at some point | |
(or (goal need-loom-goal 1); loom needed before hunting | |
(and (up-pending-objects c: villager == 0) | |
(food-amount < 50))))) | |
(can-research ri-loom) | |
=> | |
(research ri-loom) | |
) | |
(defrule | |
(or (population >= 6) | |
(building-type-count-total house <= 0)) | |
(housing-headroom == 0) | |
(can-research ri-loom) | |
=> | |
(research ri-loom) | |
) | |
(defrule | |
(building-type-count-total town-center > 0) | |
(or | |
(housing-headroom < housing-headroom1); too late actually, but if we have no food we can't train vils anyways. | |
(and | |
(population > 10) | |
(housing-headroom < 4) | |
) | |
) | |
(population-headroom > 0) | |
=> | |
(set-goal housing-goal 1) | |
) | |
#load-if-not-defined WONDER-RACE | |
(defrule | |
(housing-headroom < 10) | |
(or | |
(goal strategy-goal flush) | |
(building-type-count-total blacksmith > 0) | |
) | |
(nand | |
(goal unit-goal my-unique-unit-line) | |
(strategic-number sn-current-age == fc-transit); build additonal houses in castle age to get builder for the castle | |
) | |
(strategic-number sn-current-age >= feudal) | |
(population < eighty-five-percent-pop) | |
(housing-headroom < housing-headroom2) | |
(population-headroom > 0) | |
=> | |
(set-goal housing-goal 1) | |
) | |
(defrule | |
(or | |
(population > 60) | |
(and | |
(strategic-number sn-current-age >= castle) | |
(or | |
(goal unit-goal eagle-warrior) | |
(goal unit-goal archer) | |
) | |
) | |
) | |
(strategic-number sn-current-age >= feudal) | |
(or | |
(housing-headroom < housing-headroom2) | |
(population > seventy-five-percent-pop) | |
) | |
(population-headroom > 0) | |
(nand | |
(goal strategy-goal boom) | |
(building-type-count-total town-center < 2) | |
) | |
=> | |
(set-goal housing-goal 1) | |
) | |
#end-if | |
(defrule | |
(strategic-number sn-current-age == dark) | |
(building-type-count town-center == 0) | |
(or | |
(or | |
(civ-selected hun); on LN, collect more wood for houses or be huns | |
(civ-selected chinese) | |
) | |
(or | |
(building-type-count-total house > 0) | |
(wood-amount > 300) | |
) | |
) | |
=> | |
(up-assign-builders c: 621 c: 6) | |
(set-goal housing-goal 0) | |
) | |
#load-if-defined DEATH-MATCH | |
(defrule | |
(strategic-number sn-current-age == dark) | |
(building-type-count-total house > 1) | |
=> | |
(set-goal housing-goal 0) | |
) | |
#end-if | |
#load-if-not-defined HUN-CIV | |
#load-if-not-defined CHINESE-CIV | |
#load-if-not-defined SPANISH-CIV ; speed bonus on buildings | |
(defrule | |
(building-type-count-total house == 0) | |
(goal housing-goal 1) | |
(or (or (civ-selected aztec) | |
(civ-selected mayan)) | |
(not (map-type scandanavia))); go for early loom | |
(nor (up-research-status c: ri-treadmill-crane >= research-pending) | |
(and (death-match-game) | |
(starting-age == dark-age))) | |
=> | |
(up-assign-builders c: house c: 2) | |
(disable-self) | |
) | |
(defrule | |
(building-type-count house > 0) | |
=> | |
(up-assign-builders c: house c: 1) | |
(disable-self) | |
) | |
#end-if | |
#end-if | |
#end-if | |
(defrule | |
(goal housing-goal 1) | |
(or | |
(up-pending-objects c: house < 1) | |
(and | |
(and | |
(population > 90) | |
(housing-headroom < 5) | |
) | |
(or | |
(up-pending-objects c: house < 2) | |
(population > pop-house) | |
) | |
) | |
) | |
(up-pending-objects c: house < 3) | |
(can-build house) | |
=> | |
(build house) | |
(set-goal housing-goal 0) | |
(set-goal increase-town-size-goal house) | |
) | |
(defrule | |
(up-pending-objects c: house == 0) | |
(housing-headroom <= 4) | |
(population-headroom > 0) | |
(or (building-type-count-total dock >= 1) | |
(and (goal strategy-goal drush) | |
(building-type-count-total barracks >= 1))) | |
(building-type-count-total town-center >= 1) | |
(strategic-number sn-current-age == dark) | |
(can-build house) | |
=> | |
(build house) | |
(set-goal housing-goal 0) | |
(set-goal increase-town-size-goal house) | |
) | |
#load-if-defined DEATH-MATCH | |
(defrule | |
(goal housing-goal 1) | |
(or | |
(building-type-count-total barracks > 0) | |
(building-type-count-total stable > 0) | |
) | |
(or | |
(up-pending-objects c: house < 2) | |
(current-age >= feudal-age) | |
) | |
(or | |
(up-pending-objects c: house < 3) | |
(starting-age == post-imperial-age) | |
) | |
(up-pending-objects c: house < 5) | |
(can-build house) | |
=> | |
(build house) | |
(set-goal housing-goal 0) | |
(set-goal increase-town-size-goal house) | |
) | |
#end-if | |
(defrule | |
(goal housing-goal 1) | |
(population > 150) | |
(population-cap >= 225) | |
(up-pending-objects c: house < 5) | |
(can-build house) | |
=> | |
(build house) | |
(set-goal housing-goal 0) | |
(set-goal increase-town-size-goal house) | |
) | |
#load-if-not-defined WONDER-RACE | |
(defrule | |
(current-age == dark-age) | |
(civilian-population < max-civ); difficulty | |
(building-type-count town-center > 1); double arabia | |
(unit-type-count villager < 40) | |
(food-amount < 420) | |
(can-train villager) | |
=> | |
(disable-timer FDrop) | |
(enable-timer FDrop 21) | |
(train villager) | |
(set-strategic-number sn-total-number-explorers 2) | |
(set-strategic-number sn-number-explore-groups 2) | |
) | |
#end-if | |
(defrule | |
(strategic-number sn-current-age == dark) | |
(unit-type-count-total villager > 24) | |
(or (unit-type-count-total villager > 25) | |
(or (goal unit-goal archer) | |
(goal unit-goal skirmisher))) | |
(goal strategy-goal flush) | |
(food-amount > 440); 460 | |
=> | |
(set-goal train-civ-goal -1) | |
) | |
#load-if-not-defined DIFFICULTY-EASIEST; test | |
;#load-if-defined DEATH-MATCH | |
(defrule | |
(or (food-amount >= 1400) | |
(and (food-amount >= 820) | |
(unit-type-count-total villager >= 15))) | |
(can-research feudal-age) | |
=> | |
(set-strategic-number sn-current-age df-transit) | |
(set-strategic-number sn-maximum-gold-drop-distance 14) | |
(set-strategic-number sn-maximum-stone-drop-distance 14) | |
(set-strategic-number sn-maximum-town-size 12) | |
(set-strategic-number sn-maximum-food-drop-distance 15) | |
(set-strategic-number sn-maximum-wood-drop-distance 15) | |
; (chat-to-allies-using-id 8101); "Advance to Feudal Age" | |
(research feudal-age) | |
) | |
;#end-if | |
(defrule | |
(or (unit-type-count-total villager >= 31) | |
(civilian-population >= max-civ)) | |
(up-pending-objects c: villager <= 0) | |
(can-research feudal-age) | |
=> | |
(set-strategic-number sn-current-age df-transit) | |
(set-strategic-number sn-maximum-gold-drop-distance 14) | |
(set-strategic-number sn-maximum-stone-drop-distance 14) | |
(set-strategic-number sn-maximum-town-size 10) | |
(set-strategic-number sn-maximum-food-drop-distance 15) | |
; (chat-to-allies-using-id 8101); "Advance to Feudal Age" | |
(research feudal-age) | |
) | |
(defrule | |
(unit-type-count-total villager >= villager-feudal) | |
(or (unit-type-count fishing-ship > 3) | |
(map-type yucatan)) | |
(can-research feudal-age) | |
=> | |
(set-strategic-number sn-current-age df-transit) | |
(set-strategic-number sn-maximum-gold-drop-distance 14) | |
(set-strategic-number sn-maximum-stone-drop-distance 14) | |
(set-strategic-number sn-maximum-town-size 10) | |
(set-strategic-number sn-maximum-food-drop-distance 15) | |
; (chat-to-allies-using-id 8101); "Advance to Feudal Age" | |
(research feudal-age) | |
) | |
(defrule | |
(civilian-population >= villager-flush) | |
(or (unit-type-count-total villager >= 25) | |
(up-compare-goal unit-goal != militiaman-line)) | |
(goal strategy-goal flush) | |
(can-research feudal-age) | |
=> | |
(set-strategic-number sn-current-age df-transit) | |
(set-strategic-number sn-maximum-gold-drop-distance 14) | |
(set-strategic-number sn-maximum-stone-drop-distance 14) | |
(set-strategic-number sn-maximum-town-size 10) | |
(set-strategic-number sn-maximum-food-drop-distance 15) | |
; (chat-to-allies-using-id 8101); "Advance to Feudal Age" | |
(research feudal-age) | |
) | |
(defrule | |
(unit-type-count villager >= dark-age-villager) | |
(or (food-amount >= 620) | |
(or (unit-type-count-total villager >= 30) | |
(goal control-goal shot))) | |
(up-compare-goal strategy-goal != fast-imp) | |
(can-research feudal-age) | |
=> | |
(set-strategic-number sn-current-age df-transit) | |
(set-strategic-number sn-maximum-gold-drop-distance 14) | |
(set-strategic-number sn-maximum-stone-drop-distance 14) | |
(set-strategic-number sn-maximum-town-size 10) | |
(set-strategic-number sn-maximum-food-drop-distance 15) | |
; (chat-to-allies-using-id 8101); "Advance to Feudal Age" | |
(research feudal-age) | |
) | |
(defrule | |
(or (unit-type-count villager >= 33) | |
(goal unit-goal wonder)) | |
(unit-type-count villager >= villager-wonder-dark) | |
(goal strategy-goal fast-imp) | |
(can-research feudal-age) | |
=> | |
(set-strategic-number sn-current-age df-transit) | |
(set-strategic-number sn-maximum-gold-drop-distance 14) | |
(set-strategic-number sn-maximum-stone-drop-distance 14) | |
(set-strategic-number sn-maximum-town-size 10) | |
(set-strategic-number sn-maximum-food-drop-distance 15) | |
; (chat-to-allies-using-id 8101); "Advance to Feudal Age" | |
(research feudal-age) | |
) | |
(defrule | |
(or (or (game-type == 8) | |
(difficulty != hardest)) | |
(or (population-cap == 25) | |
(starting-resources != low-resources))) | |
(unit-type-count-total villager >= villager-feudal) | |
(can-research feudal-age) | |
=> | |
(set-strategic-number sn-current-age df-transit) | |
(set-strategic-number sn-maximum-gold-drop-distance 14) | |
(set-strategic-number sn-maximum-stone-drop-distance 14) | |
(set-strategic-number sn-maximum-food-drop-distance 15) | |
(set-strategic-number sn-maximum-wood-drop-distance 15) | |
; (chat-to-allies-using-id 8101); "Advance to Feudal Age" | |
(research feudal-age) | |
) | |
#else; test | |
(defrule | |
(or (players-current-age any-enemy >= feudal-age) | |
(or (players-current-age any-ally >= feudal-age) | |
(not (player-in-game any-human)))) | |
(can-research feudal-age) | |
=> | |
(set-strategic-number sn-current-age df-transit) | |
(set-strategic-number sn-maximum-gold-drop-distance 14) | |
(set-strategic-number sn-maximum-stone-drop-distance 14) | |
(set-strategic-number sn-maximum-food-drop-distance 15) | |
(set-strategic-number sn-maximum-wood-drop-distance 15) | |
; (chat-to-allies-using-id 8101); "Advance to Feudal Age" | |
(research feudal-age) | |
) | |
#end-if; test | |
#load-if-not-defined DIFFICULTY-EASIEST | |
#load-if-not-defined DIFFICULTY-EASY | |
(defrule | |
(current-age == feudal-age) | |
(unit-type-count villager >= 15); pretend dark age if feudal age start | |
=> | |
(enable-timer lumber-timer 60) | |
(set-strategic-number sn-maximum-town-size 10) | |
(set-strategic-number sn-current-age feudal) | |
(set-strategic-number sn-maximum-gold-drop-distance 14) | |
(set-strategic-number sn-maximum-stone-drop-distance 14) | |
(set-strategic-number sn-minimum-number-hunters 0) | |
(disable-self)) | |
#end-if | |
#end-if | |
(defrule | |
(or (difficulty == easiest) | |
(difficulty == easy)) | |
(current-age == feudal-age) | |
(unit-type-count villager >= 5); pretend dark age if feudal age start | |
=> | |
(enable-timer lumber-timer 60) | |
(set-strategic-number sn-maximum-town-size 10) | |
(set-strategic-number sn-current-age feudal) | |
(set-strategic-number sn-maximum-gold-drop-distance 14) | |
(set-strategic-number sn-maximum-stone-drop-distance 14) | |
(set-strategic-number sn-minimum-number-hunters 0) | |
(disable-self)) | |
(defrule | |
(strategic-number sn-current-age == fc-transit) | |
=> | |
(up-assign-builders c: bombard-tower c: 3) | |
(up-assign-builders c: castle c: 4) | |
(up-assign-builders c: archery-range c: 1) | |
(up-assign-builders c: stable c: 1) | |
(up-assign-builders c: market c: 1) | |
(up-assign-builders c: mining-camp c: 1) | |
) | |
#load-if-not-defined WONDER-RACE | |
#load-if-defined LOW-RESOURCES-START | |
(defrule | |
(strategic-number sn-current-age == feudal) | |
(or | |
(gold-amount < 200) | |
(or | |
(and | |
(goal unit-goal eagle-warrior) | |
(up-compare-goal position-goal == flank) | |
) | |
(goal unit-goal monk) | |
) | |
) | |
(food-amount >= 700) | |
(nor | |
(goal strategy-goal boom) | |
(goal control-goal shot) | |
) | |
(can-sell-commodity stone) | |
=> | |
(sell-commodity stone) | |
) | |
#end-if | |
#load-if-defined SARACEN-CIV | |
(defrule | |
(game-time < 1800); don't do this late game | |
(nor | |
(goal strategy-goal sling) | |
(and | |
(goal unit-goal my-unique-unit-line) | |
(building-type-count castle == 0) | |
) | |
) | |
(commodity-selling-price stone > 95) | |
(or | |
(wood-amount < 300); prevent sell/buy for TC loop | |
(stone-amount >= 200) | |
) | |
(can-sell-commodity stone) | |
=> | |
(sell-commodity stone) | |
) | |
#end-if | |
(defrule | |
(current-age >= imperial-age) | |
(game-time > 1800) | |
(current-age-time > 180) | |
(gold-amount > 900) | |
(stone-amount < 650) | |
(goal under-attack-goal 0) | |
(building-type-count-total castle < 4) | |
(or | |
(up-research-status c: my-unique-unit-upgrade >= research-pending) | |
(building-type-count-total castle < 2) | |
) | |
(or | |
(gold-amount > 1600) | |
(building-type-count-total castle == 0) | |
) | |
(can-buy-commodity stone) | |
=> | |
(buy-commodity stone) | |
(chat-local-to-self "6 buy stone for a castle") | |
) | |
(defrule | |
(strategic-number sn-resource-control != ri-heresy) | |
(game-time < 1800) | |
(goal monk-threat-goal 1) | |
(or | |
(and | |
(research-available ri-light-cavalry) | |
(gold-amount >= 200) | |
) | |
(unit-type-count scout-cavalry-line < 6) | |
) | |
(goal enemy-goal rush) | |
(food-amount < 80) | |
(building-type-count stable > 0) | |
(can-buy-commodity food) | |
=> | |
(buy-commodity food) | |
) | |
(defrule | |
;(or (cc-players-unit-type-count 0 tree-class < 150) | |
(dropsite-min-distance wood > 20);) | |
(wood-amount < 200) | |
(or | |
(gold-amount > 200) | |
(wood-amount < 60) | |
) | |
(can-buy-commodity wood) | |
=> | |
(buy-commodity wood) | |
(chat-to-player my-player-number "buy wood") | |
) | |
(defrule | |
(game-time < 1500) | |
(wood-amount < 120) | |
(gold-amount > 350) | |
(or | |
(unit-type-count-total 219 >= 1) | |
(unit-type-count-total 228 >= 1); dead lumberjacks | |
) | |
(can-buy-commodity wood) | |
=> | |
(buy-commodity wood) | |
(chat-to-player my-player-number "buy wood") | |
) | |
#load-if-not-defined AZTEC-CIV | |
#load-if-not-defined MAYAN-CIV | |
#load-if-not-defined INCAN-CIV | |
(defrule | |
(strategic-number sn-resource-control < 2) | |
(goal monk-threat-goal 1) | |
(building-type-count stable > 0) | |
(building-type-count market > 0) | |
(or | |
(unit-type-count scout-cavalry-line < 6) | |
(research-available ri-light-cavalry) | |
) | |
=> | |
(set-strategic-number sn-resource-control 2) | |
) | |
#end-if | |
#end-if | |
#end-if | |
#load-if-defined SARACEN-CIV | |
(defrule | |
(strategic-number sn-current-age == feudal) | |
(goal strategy-goal rush) | |
(or | |
(food-amount < 650) | |
(gold-amount > 320) | |
) | |
(food-amount < 800) | |
(commodity-buying-price food < 120) | |
(can-buy-commodity food) | |
=> | |
(buy-commodity food) | |
(chat-to-player my-player-number "3 Special Saracen Market Rule") | |
) | |
(defrule | |
(or | |
(game-time < 2100) | |
(research-available ri-horse-collar) | |
) | |
(or | |
(food-amount < 120) | |
(and | |
(up-compare-goal unit-goal != monk) | |
(and | |
(food-amount < 200) | |
(gold-amount > 275) | |
) | |
) | |
) | |
(gold-amount > 200) | |
(commodity-buying-price food < 140) | |
(can-buy-commodity food) | |
=> | |
(buy-commodity food) | |
(chat-to-player my-player-number "3 Special Saracen Market Rule") | |
) | |
(defrule | |
(game-time < 1500) | |
(building-type-count-total stable < 2) | |
(building-type-count-total archery-range < 2) | |
(wood-amount < 200) | |
(or | |
(wood-amount < 120) | |
(gold-amount > 500) | |
) | |
(gold-amount > 200) | |
(or | |
(unit-type-count-total 219 >= 1) | |
(unit-type-count-total 228 >= 1); dead lumberjacks | |
) | |
(commodity-buying-price wood < 120) | |
(can-buy-commodity wood) | |
=> | |
(buy-commodity wood) | |
(chat-to-player my-player-number "4 Special Saracen Market Rule") | |
) | |
#end-if | |
(defrule | |
(goal train-civ-goal 1) | |
(building-type-count-total town-center >= tc-level-two) | |
(gold-amount > 250) | |
(food-amount < 50) | |
(civilian-population < max-civ) | |
(civilian-population < 85) | |
(commodity-buying-price food < 150) | |
(can-buy-commodity food) | |
=> | |
(buy-commodity food) | |
(chat-to-player my-player-number "3 buy food for villagers") | |
) | |
(defrule | |
(strategic-number sn-resource-control != ri-heresy) | |
(gold-amount > 500) | |
(food-amount < 200) | |
(unit-type-count trade-cart > 15) | |
(commodity-buying-price food < 70) | |
(can-buy-commodity food) | |
=> | |
(buy-commodity food) | |
(chat-to-player my-player-number "3 buy cheap food with trade cart gold") | |
) | |
#load-if-defined POST-IMPERIAL-AGE-START | |
(defrule | |
(can-sell-commodity stone) | |
(stone-amount > 750) | |
(food-amount > 2000) | |
(wood-amount > 2000) | |
(gold-amount < 1000) | |
(commodity-selling-price stone > 40) | |
(building-type-count-total castle > 1) | |
=> | |
(sell-commodity stone) | |
) | |
#end-if | |
#end-if ; NOT WONDER-RACE | |
#load-if-defined DEATH-MATCH | |
#load-if-not-defined BRITON-CIV | |
#load-if-not-defined MONGOL-CIV | |
#load-if-not-defined KOREAN-CIV | |
#load-if-not-defined CHINESE-CIV | |
#load-if-not-defined MAYAN-CIV | |
#load-if-not-defined ISLANDS-MAP | |
#load-if-not-defined TEAM-ISLANDS-MAP | |
(defrule | |
(can-sell-commodity wood) | |
(commodity-selling-price wood > 40) | |
=> | |
(sell-commodity wood) | |
(sell-commodity wood) | |
(sell-commodity wood) | |
(sell-commodity wood) | |
(sell-commodity wood) | |
(sell-commodity wood) | |
(sell-commodity wood) | |
(sell-commodity wood) | |
(sell-commodity wood) | |
(sell-commodity wood) | |
(sell-commodity wood) | |
(sell-commodity wood) | |
(sell-commodity wood)(disable-self) | |
) | |
(defrule | |
(can-sell-commodity wood) | |
(commodity-selling-price wood > 30) | |
=> | |
(sell-commodity wood) | |
(sell-commodity wood) | |
(sell-commodity wood) | |
(sell-commodity wood) | |
(sell-commodity wood) | |
(sell-commodity wood) | |
(sell-commodity wood) | |
(sell-commodity wood) | |
(sell-commodity wood) | |
(sell-commodity wood) | |
(sell-commodity wood) | |
(sell-commodity wood) | |
(sell-commodity wood)(disable-self) | |
) | |
#end-if | |
#end-if | |
(defrule | |
(can-sell-commodity stone) | |
(commodity-selling-price stone > 70) | |
=> | |
(sell-commodity stone) | |
(sell-commodity stone) | |
(sell-commodity stone) | |
(sell-commodity stone) | |
(sell-commodity stone) | |
(sell-commodity stone) | |
(sell-commodity stone) | |
(sell-commodity stone) | |
(sell-commodity stone) | |
(sell-commodity stone) | |
(sell-commodity stone)(disable-self)) | |
(defrule | |
(can-sell-commodity stone) | |
(commodity-selling-price stone > 70) | |
=> | |
(sell-commodity stone) | |
(sell-commodity stone) | |
(sell-commodity stone) | |
(sell-commodity stone) | |
(sell-commodity stone) | |
(sell-commodity stone) | |
(sell-commodity stone) | |
(sell-commodity stone) | |
(sell-commodity stone) | |
(sell-commodity stone) | |
(sell-commodity stone)(disable-self)) | |
#else | |
#load-if-not-defined POST-IMPERIAL-AGE-START | |
(defrule | |
(can-sell-commodity stone) | |
(commodity-selling-price stone > 70) | |
=> | |
(sell-commodity stone) | |
(sell-commodity stone) | |
(sell-commodity stone) | |
(sell-commodity stone) | |
(sell-commodity stone) | |
(sell-commodity stone) | |
(sell-commodity stone) | |
(sell-commodity stone) | |
(sell-commodity stone) | |
(sell-commodity stone) | |
(sell-commodity stone)(disable-self)) | |
#end-if | |
#end-if | |
#else | |
#load-if-not-defined POST-IMPERIAL-AGE-START | |
(defrule | |
(can-sell-commodity stone) | |
(commodity-selling-price stone > 70) | |
=> | |
(sell-commodity stone) | |
(sell-commodity stone) | |
(sell-commodity stone) | |
(sell-commodity stone) | |
(sell-commodity stone) | |
(sell-commodity stone) | |
(sell-commodity stone) | |
(sell-commodity stone) | |
(sell-commodity stone) | |
(sell-commodity stone) | |
(sell-commodity stone) | |
(sell-commodity stone) | |
(sell-commodity stone)(disable-self) | |
) | |
#end-if | |
#end-if | |
#end-if | |
#end-if | |
#end-if | |
#end-if | |
(defrule | |
(research-available castle-age) | |
(strategic-number sn-current-age >= fc-transit) | |
=> | |
(set-strategic-number sn-current-age feudal) | |
(chat-to-player my-player-number "castle-age research failed!"); castle research failed, set our age-tracking back | |
) | |
#load-if-not-defined DIFFICULTY-EASIEST; test | |
(defrule | |
(can-research castle-age) | |
=> | |
(set-strategic-number sn-current-age fc-transit) | |
(set-strategic-number sn-maximum-town-size 10) | |
(research castle-age) | |
; (chat-to-allies-using-id 8102); "Advance to Castle Age" | |
) | |
#else; test | |
(defrule | |
(or (players-current-age any-enemy >= feudal-age) | |
(or (players-current-age any-ally >= feudal-age) | |
(not (player-in-game any-human)))) | |
(can-research castle-age) | |
=> | |
(set-strategic-number sn-current-age fc-transit) | |
(set-strategic-number sn-maximum-town-size 10) | |
(research castle-age) | |
; (chat-to-allies-using-id 8102); "Advance to Castle Age" | |
) | |
#end-if; test | |
#load-if-not-defined DIFFICULTY-EASIEST | |
#load-if-not-defined DIFFICULTY-EASY | |
(defrule | |
(current-age == castle-age) | |
(unit-type-count villager >= 15) | |
=> | |
(set-strategic-number sn-camp-max-distance castle-age-camp-distance) | |
(set-strategic-number sn-maximum-fish-boat-drop-distance -1) | |
(set-strategic-number sn-maximum-town-size 12) | |
(set-strategic-number sn-maximum-hunt-drop-distance 18) | |
(set-strategic-number sn-maximum-gold-drop-distance 14) | |
(set-strategic-number sn-maximum-stone-drop-distance 14) | |
(set-strategic-number sn-wood-dropsite-distance 3) | |
(set-strategic-number sn-current-age castle) | |
(disable-self)) | |
#end-if | |
#end-if | |
(defrule | |
(or (difficulty == easiest) | |
(difficulty == easy)) | |
(current-age == castle-age) | |
(unit-type-count villager >= 15) | |
=> | |
(set-strategic-number sn-camp-max-distance castle-age-camp-distance) | |
(set-strategic-number sn-maximum-fish-boat-drop-distance -1) | |
(set-strategic-number sn-maximum-town-size 12) | |
(set-strategic-number sn-maximum-hunt-drop-distance 18) | |
(set-strategic-number sn-maximum-gold-drop-distance 14) | |
(set-strategic-number sn-maximum-stone-drop-distance 14) | |
(set-strategic-number sn-wood-dropsite-distance 3) | |
(set-strategic-number sn-current-age castle) | |
(disable-self)) | |
(defrule | |
(or (strategic-number sn-gold-dropsite-distance >= 40); reset distances after forced camp | |
(strategic-number sn-stone-dropsite-distance >= 40)) | |
=> | |
(set-strategic-number sn-gold-dropsite-distance 3) | |
(set-strategic-number sn-stone-dropsite-distance 3) | |
(set-strategic-number sn-maximum-gold-drop-distance 14) | |
(set-strategic-number sn-maximum-gold-drop-distance 14) | |
) | |
#load-if-not-defined POST-IMPERIAL-AGE-START | |
#load-if-not-defined DEATH-MATCH | |
(defrule | |
(or (and (goal strategy-goal flush) | |
(wood-amount > 420)) | |
(and (stone-amount == 0); if there are many players selling stone for castle age advance, not everyone gets enough gold | |
(and (gold-amount < 200) | |
(food-amount > 750)))) | |
(research-available castle-age) | |
(strategic-number sn-current-age == feudal) | |
(commodity-selling-price wood > 40) | |
(can-sell-commodity wood) | |
=> | |
(sell-commodity wood) | |
(chat-to-player my-player-number "sell excess wood") | |
) | |
#end-if | |
(defrule | |
(or (research-available imperial-age) | |
(current-age >= imperial-age)) | |
(wood-amount > 430) | |
(commodity-selling-price wood > 40) | |
(or (building-type-count town-center >= tc-level-four) | |
(and (strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(stone-amount < 50))) | |
(cc-players-unit-type-count 0 tree-class > 150) | |
(gold-amount < 800) | |
(can-sell-commodity wood) | |
=> | |
(sell-commodity wood) | |
(chat-to-player my-player-number "sell excess wood") | |
) | |
#end-if | |
(defrule | |
(current-age >= imperial-age) | |
(food-amount > 2000) | |
(gold-amount < 1250) | |
(population > eighty-five-percent-pop) | |
(can-sell-commodity food) | |
(commodity-buying-price wood < 120); don't run into a buy wood, farm and sell food cycle, it's not worth | |
=> | |
(sell-commodity food) | |
(chat-to-player my-player-number "sell excess food") | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(food-amount < 2000) | |
(wood-amount > 2000) | |
(cc-players-unit-type-count 0 tree-class > 150) | |
(dropsite-min-distance wood < 7) | |
(gold-amount < 1200) | |
(population > eighty-five-percent-pop) | |
(can-sell-commodity wood) | |
=> | |
(sell-commodity wood) | |
(chat-to-player my-player-number "sell excess wood") | |
) | |
(defrule | |
(current-age >= imperial-age) | |
(food-amount > 600) | |
(or (and (commodity-selling-price food > 40) | |
(gold-amount < 150)) | |
(and (food-amount > 1650) | |
(gold-amount < 800))) | |
(commodity-buying-price wood < 135) | |
(can-sell-commodity food) | |
=> | |
(sell-commodity food) | |
(chat-to-player my-player-number "sell excess food") | |
) | |
(defrule | |
(or (strategic-number sn-minimum-water-body-size-for-dock < water-islands); don't sell too much on water maps, we can't gatherer on other islands | |
(commodity-selling-price wood > 40)) | |
(cc-players-unit-type-count 0 tree-class > 100) | |
(food-amount < 2000); sell food first | |
(wood-amount > 1200) | |
(dropsite-min-distance wood < 7) | |
(gold-amount < 800) | |
(or (starting-age < post-imperial-age) | |
(or (commodity-selling-price wood > 40) | |
(food-amount < 800))) | |
(can-sell-commodity wood) | |
=> | |
(sell-commodity wood) | |
(chat-to-player my-player-number "sell excess wood") | |
) | |
(defrule | |
(strategic-number sn-resource-control == ri-heresy) | |
(wood-amount > 220) | |
(gold-amount < 1100) | |
(commodity-selling-price wood > 20) | |
(can-sell-commodity wood) | |
=> | |
(sell-commodity wood) | |
(chat-to-player my-player-number "emergency sell wood - need ri-heresy") | |
) | |
(defrule | |
(strategic-number sn-resource-control == ri-heresy) | |
(food-amount > 300) | |
(gold-amount < 1100) | |
(commodity-selling-price food > 20) | |
(up-research-status c: ri-light-cavalry < research-pending) | |
(can-sell-commodity food) | |
=> | |
(sell-commodity food) | |
(chat-to-player my-player-number "emergency sell food - need ri-heresy") | |
) | |
(defrule | |
(research-available imperial-age) | |
(civilian-population >= max-civ) | |
(players-unit-type-count every-ally villager >= 95) | |
(food-amount < 500) | |
(gold-amount >= 800) | |
=> | |
(set-goal tribute-goal 3) | |
) | |
(defrule | |
(strategic-number sn-resource-control != ri-heresy) | |
(goal under-attack-goal 1) | |
(civilian-population < fourty-percent-pop) | |
(food-amount < 100) | |
(gold-amount > 350) | |
(commodity-buying-price food < 170) | |
(can-buy-commodity food) | |
=> | |
(buy-commodity food) | |
(set-goal tribute-goal 3) | |
) | |
(defrule | |
(wood-amount >= 275) | |
(stone-amount < 100) | |
(building-type-count-total town-center == 0) | |
(can-buy-commodity stone) | |
(unit-type-count villager > 0) | |
=> | |
(buy-commodity stone) | |
) | |
(defrule | |
(wood-amount > 375) | |
(stone-amount < 100) | |
(gold-amount < 300) | |
(unit-type-count villager > 0) | |
(building-type-count-total town-center == 0) | |
(building-type-count market > 0) | |
=> | |
(release-escrow wood) | |
(sell-commodity wood) | |
) | |
(defrule | |
(wood-amount >= 275) | |
(stone-amount < 100) | |
(building-type-count-total town-center == 0) | |
(unit-type-count villager > 0) | |
=> | |
(set-goal tribute-goal 6) | |
) | |
(defrule | |
(wood-amount < 275) | |
(stone-amount >= 100) | |
(building-type-count-total town-center == 0) | |
(unit-type-count villager > 0) | |
=> | |
(set-goal tribute-goal 4) | |
) | |
(defrule | |
(strategic-number sn-resource-control < 2) | |
(wood-amount >= 330) | |
(stone-amount < 100) | |
(civilian-population < 80) | |
(or (current-age-time > 300) | |
(gold-amount > 400)) | |
(current-age >= castle-age) | |
(building-type-count-total town-center < 3) | |
(up-compare-goal strategy-goal != fast-imp) | |
(up-pending-objects c: town-center == 0) | |
(can-buy-commodity stone) | |
=> | |
(buy-commodity stone) | |
(chat-to-player my-player-number "6") | |
) | |
(defrule | |
(stone-amount < 650) | |
(civilian-population < 80) | |
(current-age >= imperial-age) | |
(building-type-count-total castle == 0) | |
(gold-amount > 400) | |
(unit-type-count trade-cart > 4) | |
(or (dropsite-min-distance stone > 20) | |
(dropsite-min-distance stone < 0)) | |
(can-buy-commodity stone) | |
=> | |
(buy-commodity stone) | |
(chat-to-player my-player-number "6") | |
) | |
(defrule | |
(research-available imperial-age) | |
(strategic-number sn-current-age >= ci-transit) | |
=> | |
(set-strategic-number sn-current-age castle) | |
(chat-to-player my-player-number "imperial-age research failed!"); imperial research failed, set our age-tracking back | |
) | |
(defrule | |
(research-available imperial-age) | |
(civilian-population > 95) | |
(game-time >= 2400) | |
(or (population > seventy-five-percent-pop) | |
(population-cap >= 250)) | |
(population > sixty-percent-pop) | |
=> | |
(set-escrow-percentage food 10)(set-escrow-percentage gold 20) | |
) | |
#load-if-not-defined DIFFICULTY-EASIEST; test | |
(defrule | |
(can-research-with-escrow imperial-age) | |
=> | |
(release-escrow food)(release-escrow gold) | |
(set-escrow-percentage food 0)(set-escrow-percentage gold 0) | |
(set-strategic-number sn-current-age ci-transit) | |
(set-strategic-number sn-percent-building-cancellation 75) | |
; (chat-to-allies-using-id 8103); "Advance to Imperial Age" | |
(research imperial-age) | |
) | |
#else; test | |
(defrule | |
(or (players-current-age any-enemy >= feudal-age) | |
(or (players-current-age any-ally >= feudal-age) | |
(not (player-in-game any-human)))) | |
(can-research-with-escrow imperial-age) | |
=> | |
(release-escrow food)(release-escrow gold) | |
(set-escrow-percentage food 0)(set-escrow-percentage gold 0) | |
(set-strategic-number sn-current-age ci-transit) | |
(set-strategic-number sn-percent-building-cancellation 75) | |
; (chat-to-allies-using-id 8103); "Advance to Imperial Age" | |
(research imperial-age) | |
) | |
#end-if; test | |
(defrule | |
(or | |
(population < sixty-percent-pop) | |
(military-population < 20) | |
) | |
(goal under-attack-goal 1) | |
(strategic-number sn-military-level < 0) | |
=> | |
(release-escrow food)(release-escrow gold) | |
) | |
(defrule | |
(or (unit-type-count villager >= 15) | |
(or (death-match-game) | |
(or (difficulty == easiest) | |
(or (difficulty == easy) | |
(and (starting-resources == high-resources) | |
(game-time > 90)))))) | |
(current-age == imperial-age) | |
=> | |
(set-strategic-number sn-current-age imperial) | |
(set-strategic-number sn-maximum-gold-drop-distance 14) | |
(set-strategic-number sn-maximum-stone-drop-distance 14) | |
(disable-self)) | |
;================================================================ | |
; Stone in general | |
;================================================================ | |
(defrule | |
(unit-type-count 124 == 0); stone-miners | |
(unit-type-count 220 == 0) | |
(building-type-count-total town-center <= 0) | |
(wood-amount >= 275) | |
(stone-amount < 100) | |
(can-buy-commodity stone) | |
=> | |
(chat-local-to-self "Buying stone for a towncenter.") | |
(buy-commodity stone)) | |
;================================================================ | |
#load-if-not-defined WONDER-RACE | |
#load-if-not-defined HUN-CIV | |
(defrule | |
(strategic-number sn-military-level >= 0) | |
(building-type-count-total castle == 0) | |
(stone-amount < castle-stone) | |
(gold-amount > 300) | |
(or (strategic-number sn-current-age >= imperial) | |
(gold-amount > 1100)) | |
; (building-available castle) | |
(can-buy-commodity stone) | |
=> | |
(chat-local-to-self "Buying stone for a castle.") | |
(buy-commodity stone)) | |
(defrule | |
(strategic-number sn-military-level >= 0) | |
(building-type-count-total castle < 3) | |
(or (building-type-count-total castle < 2) | |
(gold-amount > 2000)) | |
(stone-amount < castle-stone) | |
(gold-amount > 800); 300 in the rule above | |
(strategic-number sn-current-age >= imperial) | |
; (building-available castle) | |
(commodity-buying-price stone < 600) | |
(can-buy-commodity stone) | |
=> | |
(chat-local-to-self "Buying stone for a castle.") | |
(buy-commodity stone)) | |
#end-if | |
#end-if | |
;================================================================ | |
(defrule | |
(building-type-count-total castle < 5) | |
(stone-amount < castle-stone) | |
(or (gold-amount > 8000) | |
(and (or (unit-type-count-total trade-cart >= 15) | |
(unit-type-count-total trade-cog >= 15)) | |
(gold-amount > 5000))) | |
; (building-available castle) | |
(commodity-buying-price stone < 600) | |
(can-buy-commodity stone) | |
=> | |
(chat-local-to-self "Buying stone for a castle.") | |
(buy-commodity stone)) | |
;================================================================ | |
(defrule | |
(building-type-count-total castle < 10) | |
(stone-amount < castle-stone) | |
(or (gold-amount > 10200) | |
(and (or (unit-type-count-total trade-cart >= 20) | |
(unit-type-count-total trade-cog >= 20)) | |
(gold-amount > 5500))) | |
; (building-available castle) | |
(commodity-buying-price stone < 600) | |
(can-buy-commodity stone) | |
=> | |
(chat-local-to-self "Buying stone for a castle.") | |
(buy-commodity stone)) | |
;================================================================ | |
(defrule | |
(civilian-population < max-civ) | |
(building-type-count-total town-center < 4) | |
(current-age >= castle-age) | |
(or (strategic-number sn-military-level >= 2) | |
(and (goal strategy-goal boom) | |
(or (unit-type-count-total monk >= 1) | |
(building-type-count-total monastery <= 0)))) | |
(wood-amount >= 275) | |
(stone-amount < 100) | |
(can-buy-commodity stone) | |
=> | |
(chat-local-to-self "Buying stone for a towncenter.") | |
(buy-commodity stone)) | |
;================================================================ | |
(defrule | |
(building-type-count-total castle >= 3) | |
(building-type-count-total town-center >= 3) | |
(players-military-population focus-player >= 50) | |
(military-population < 30) | |
(gold-amount < 100) | |
(commodity-selling-price stone > 200) | |
(can-sell-commodity stone) | |
=> | |
(chat-local-to-self "Selling stone.") | |
(sell-commodity stone)) | |
;================================================================ | |
; Food excess | |
;================================================================ | |
#load-if-defined CAPTURE-THE-RELIC | |
(defrule | |
(food-amount > 200) | |
(gold-amount < 100) | |
(unit-type-count-total monk <= 0) | |
(unit-type-count-total 134 <= 0); dead monk | |
(can-sell-commodity food) | |
=> | |
(chat-local-to-self "Selling food for a monk.") | |
(sell-commodity food)) | |
#end-if | |
;================================================================ | |
(defrule | |
(food-amount > 700) | |
(gold-amount < 100) | |
(commodity-selling-price food > 40) | |
(can-sell-commodity food) | |
=> | |
(chat-local-to-self "Selling food.") | |
(sell-commodity food)) | |
;================================================================ | |
(defrule | |
(food-amount > 1000) | |
(gold-amount < 100) | |
(can-sell-commodity food) | |
=> | |
(chat-local-to-self "Selling food.") | |
(sell-commodity food)) | |
;================================================================ | |
(defrule | |
(food-amount > 10000) | |
(gold-amount < 200) | |
(can-sell-commodity food) | |
=> | |
(chat-local-to-self "Selling food.") | |
(sell-commodity food)) | |
;================================================================ | |
(defrule | |
(food-amount > 1500) | |
(gold-amount < 300) | |
(commodity-selling-price food > 30) | |
(can-sell-commodity food) | |
=> | |
(chat-local-to-self "Selling food.") | |
(sell-commodity food)) | |
;================================================================ | |
(defrule | |
(food-amount > 2300) | |
(gold-amount < 600) | |
(or (cc-players-unit-type-count 0 gold-mine < 1) | |
(commodity-selling-price food > 40)) | |
(can-sell-commodity food) | |
=> | |
(chat-local-to-self "Selling food.") | |
(sell-commodity food)) | |
;================================================================ | |
(defrule | |
(food-amount > 400) | |
(gold-amount < 200) | |
(wood-amount < 100) | |
(cc-players-unit-type-count 0 tree-class < 30) | |
(can-sell-commodity food) | |
=> | |
(chat-local-to-self "Selling food.") | |
(sell-commodity food)) | |
;================================================================ | |
(defrule | |
(food-amount > 100) | |
(gold-amount < 200) | |
(wood-amount < 60) | |
(or (cc-players-unit-type-count 0 tree-class < 20) | |
(dropsite-min-distance wood > 25)) | |
(can-sell-commodity food) | |
=> | |
(chat-local-to-self "Selling food.") | |
(sell-commodity food)) | |
;================================================================ | |
; Buying food | |
;================================================================ | |
(defrule | |
(gold-amount > 1800) | |
(food-amount < 200) | |
(can-buy-commodity food) | |
=> | |
(chat-local-to-self "Buying food.") | |
(buy-commodity food)) | |
;================================================================ | |
(defrule | |
(gold-amount > 1000) | |
(food-amount < 100) | |
(can-buy-commodity food) | |
=> | |
(chat-local-to-self "Buying food.") | |
(buy-commodity food)) | |
;================================================================ | |
(defrule | |
(gold-amount > 2500) | |
(food-amount < 300) | |
(can-buy-commodity food) | |
=> | |
(chat-local-to-self "Buying food.") | |
(buy-commodity food)) | |
;================================================================ | |
(defrule | |
(food-amount < 4100) | |
(or (gold-amount > 10000) | |
(and (or (unit-type-count-total trade-cart >= 15) | |
(unit-type-count-total trade-cog >= 15)) | |
(gold-amount > 5200))) | |
(can-buy-commodity food) | |
=> | |
(chat-local-to-self "Buying food.") | |
(buy-commodity food)) | |
;================================================================ | |
; Wood excess | |
;================================================================ | |
#load-if-defined CAPTURE-THE-RELIC | |
(defrule | |
(wood-amount > 200) | |
(gold-amount < 100) | |
(unit-type-count-total monk <= 0) | |
(unit-type-count-total 134 <= 0); dead monk | |
(can-sell-commodity wood) | |
=> | |
(chat-local-to-self "Selling wood for a monk.") | |
(sell-commodity wood)) | |
#end-if | |
;================================================================ | |
(defrule | |
(or (cc-players-unit-type-count 0 tree-class > 300) | |
(dropsite-min-distance wood < 15)) | |
(wood-amount > 1100) | |
(gold-amount < 200) | |
(commodity-selling-price wood > 45) | |
(can-sell-commodity wood) | |
=> | |
(chat-local-to-self "Selling wood.") | |
(sell-commodity wood)) | |
;================================================================ | |
(defrule | |
(or (cc-players-unit-type-count 0 tree-class > 300) | |
(dropsite-min-distance wood < 15)) | |
(wood-amount > 700) | |
(gold-amount < 100) | |
(commodity-selling-price wood > 30) | |
(can-sell-commodity wood) | |
=> | |
(chat-local-to-self "Selling wood.") | |
(sell-commodity wood)) | |
;================================================================ | |
(defrule | |
(or (cc-players-unit-type-count 0 tree-class > 300) | |
(dropsite-min-distance wood < 15)) | |
(wood-amount > 900) | |
(gold-amount < 100) | |
(can-sell-commodity wood) | |
=> | |
(chat-local-to-self "Selling wood.") | |
(sell-commodity wood)) | |
;================================================================ | |
(defrule | |
(or (cc-players-unit-type-count 0 tree-class > 300) | |
(dropsite-min-distance wood < 15)) | |
(wood-amount > 1500) | |
(gold-amount < 300) | |
(or (cc-players-unit-type-count 0 gold-mine < 1) | |
(commodity-selling-price wood > 50)) | |
(can-sell-commodity wood) | |
=> | |
(chat-local-to-self "Selling wood.") | |
(sell-commodity wood)) | |
;================================================================ | |
; Buying wood | |
;================================================================ | |
;(defrule | |
; (wood-amount < 300) | |
; (gold-amount > 1200) | |
; (can-buy-commodity wood) | |
;=> | |
; (chat-local-to-self "Buying wood.") | |
; (buy-commodity wood)) | |
;================================================================ | |
;(defrule | |
; (wood-amount < 200) | |
; (gold-amount > 700) | |
; (can-buy-commodity wood) | |
;=> | |
; (chat-local-to-self "Buying wood.") | |
; (buy-commodity wood)) | |
;================================================================ | |
(defrule | |
(wood-amount < 200) | |
(gold-amount > 1200) | |
(or (players-building-type-count any-ally market >= 1) | |
(players-building-type-count any-ally dock >= 1)) | |
(or (unit-type-count-total trade-cart >= 15) | |
(unit-type-count-total trade-cog >= 15)) | |
(can-buy-commodity wood) | |
=> | |
(chat-local-to-self "Buying wood.") | |
(buy-commodity wood)) | |
;================================================================ | |
(defrule | |
(wood-amount < 60) | |
;(or (cc-players-unit-type-count 0 tree-class < 150) | |
(dropsite-min-distance wood > 25);) | |
(can-buy-commodity wood) | |
=> | |
(chat-local-to-self "Buying wood.") | |
(buy-commodity wood)) | |
;================================================================ | |
(defrule | |
(wood-amount < 100) | |
(gold-amount > 100) | |
;(or (cc-players-unit-type-count 0 tree-class < 150) | |
(dropsite-min-distance wood > 25);) | |
(can-buy-commodity wood) | |
=> | |
(chat-local-to-self "Buying wood.") | |
(buy-commodity wood)) | |
;================================================================ | |
(defrule | |
(wood-amount < 200) | |
(gold-amount > 300) | |
;(or (cc-players-unit-type-count 0 tree-class < 150) | |
(dropsite-min-distance wood > 25);) | |
(can-buy-commodity wood) | |
=> | |
(chat-local-to-self "Buying wood.") | |
(buy-commodity wood)) | |
;================================================================ | |
(defrule | |
(wood-amount < 4100) | |
(or (gold-amount > 10000) | |
(and (or (unit-type-count-total trade-cart >= 15) | |
(unit-type-count-total trade-cog >= 15)) | |
(gold-amount > 5200))) | |
(can-buy-commodity wood) | |
=> | |
(chat-local-to-self "Buying wood.") | |
(buy-commodity wood)) | |
;================================================================ | |
; Trading to accomplish important goals | |
;================================================================ | |
(defrule | |
(strategic-number sn-current-age == feudal) | |
(building-type-count blacksmith >= 1) | |
(gold-amount > 350) | |
(food-amount < 800) | |
(can-buy-commodity food) | |
(research-available castle-age) | |
=> | |
(chat-local-to-self "Buying food to advance to the next age.") | |
(buy-commodity food)) | |
;================================================================ | |
(defrule | |
(strategic-number sn-current-age == feudal) | |
(building-type-count blacksmith >= 1) | |
(gold-amount < 200) | |
(food-amount > 900) | |
(research-available castle-age) | |
(can-sell-commodity food) | |
=> | |
(chat-local-to-self "Selling food to advance to the next age.") | |
(sell-commodity food)) | |
;================================================================ | |
(defrule | |
(strategic-number sn-current-age == feudal) | |
(building-type-count blacksmith >= 1) | |
(food-amount >= 600) | |
(or (gold-amount < 200) | |
(food-amount < 800)) | |
(wood-amount > 100) | |
(research-available castle-age) | |
(can-sell-commodity wood) | |
=> | |
(chat-local-to-self "Selling wood to advance to the next age.") | |
(sell-commodity wood)) | |
;================================================================ | |
#load-if-defined BYZANTINE-CIV | |
(defrule | |
(strategic-number sn-current-age == castle) | |
(population >= max-civ) | |
(or (building-type-count castle >= 1) | |
(or (building-type-count university >= 1) | |
(building-type-count siege-workshop >= 1))) | |
(food-amount >= 767) | |
(gold-amount < 536) | |
(research-available imperial-age) | |
(can-sell-commodity food) | |
=> | |
(chat-local-to-self "Selling food to advance to the next age.") | |
(sell-commodity food)) | |
;================================================================ | |
(defrule | |
(strategic-number sn-current-age == castle) | |
(population >= max-civ) | |
(or (building-type-count castle >= 1) | |
(or (building-type-count university >= 1) | |
(building-type-count siege-workshop >= 1))) | |
(food-amount <= 577) | |
(gold-amount >= 666) | |
(research-available imperial-age) | |
(can-buy-commodity food) | |
;(or | |
(up-research-status c: ri-hand-cart >= research-pending) | |
; (wood-amount <= 100)) | |
=> | |
(chat-local-to-self "Buying food to advance to the next age.") | |
(buy-commodity food)) | |
;================================================================ | |
(defrule | |
(strategic-number sn-current-age == castle) | |
(population >= max-civ) | |
(or (building-type-count castle >= 1) | |
(or (building-type-count university >= 1) | |
(building-type-count siege-workshop >= 1))) | |
(food-amount >= 500); 667 | |
(gold-amount < 536) | |
(wood-amount > 300) | |
(research-available imperial-age) | |
(can-sell-commodity wood) | |
=> | |
(chat-local-to-self "Selling wood to advance to the next age.") | |
(sell-commodity wood)) | |
#else | |
(defrule | |
(strategic-number sn-current-age == castle) | |
(population >= max-civ) | |
(or (building-type-count castle >= 1) | |
(or (building-type-count university >= 1) | |
(building-type-count siege-workshop >= 1))) | |
(food-amount >= 1100) | |
(gold-amount < 800) | |
(research-available imperial-age) | |
(can-sell-commodity food) | |
=> | |
(chat-local-to-self "Selling food to advance to the next age.") | |
(sell-commodity food)) | |
;================================================================ | |
(defrule | |
(strategic-number sn-current-age == castle) | |
(population >= max-civ) | |
(or (building-type-count castle >= 1) | |
(or (building-type-count university >= 1) | |
(building-type-count siege-workshop >= 1))) | |
(food-amount <= 900) | |
(gold-amount >= 940) | |
(research-available imperial-age) | |
(can-buy-commodity food) | |
;(or | |
(up-research-status c: ri-hand-cart >= research-pending) | |
; (wood-amount <= 100)) | |
=> | |
(chat-local-to-self "Buying food to advance to the next age.") | |
(buy-commodity food)) | |
;================================================================ | |
(defrule | |
(strategic-number sn-current-age == castle) | |
(population >= max-civ) | |
(or (building-type-count castle >= 1) | |
(or (building-type-count university >= 1) | |
(building-type-count siege-workshop >= 1))) | |
(food-amount >= 800); 1000 | |
(gold-amount < 800) | |
(wood-amount > 300) | |
(research-available imperial-age) | |
(can-sell-commodity wood) | |
=> | |
(chat-local-to-self "Selling wood to advance to the next age.") | |
(sell-commodity wood)) | |
#end-if | |
#load-if-defined CAPTURE-THE-RELIC | |
(defrule | |
(gold-amount < 100) | |
(unit-type-count-total monk <= 0) | |
(unit-type-count-total 134 <= 0); dead monk | |
=> | |
(set-strategic-number sn-resource-control monk)) | |
(defrule | |
(unit-type-count-total monk < 1) | |
(can-train monk) | |
=> | |
(train monk)) | |
(defrule | |
(unit-type-count-total monk >= 1) | |
(strategic-number sn-resource-control == monk) | |
=> | |
(set-strategic-number sn-resource-control 0)) | |
#end-if | |
#load-if-not-defined WONDER-RACE | |
(defrule | |
(building-type-count dock > 0) | |
(strategic-number sn-resource-control <= 2) | |
(goal train-civ-goal 1) | |
(research-available ri-war-galley) | |
(goal enemy-boats-goal 1) | |
(or | |
(and | |
(unit-type-count fire-ship-line > 14) | |
(up-research-status c: ri-bow-saw >= research-pending) | |
) | |
(or | |
(civ-selected viking) | |
(unit-type-count galley-line > 6) | |
) | |
) | |
(food-amount < 230) | |
=> | |
(set-goal train-civ-goal navy) | |
(set-strategic-number sn-resource-control navy) | |
(chat-to-player my-player-number "save-resources for navy upgrades") | |
) | |
(defrule | |
(gold-amount > 300) | |
(food-amount < 200) | |
(strategic-number sn-resource-control == navy) | |
(or | |
(research-available ri-war-galley) | |
(research-available ri-careening) | |
) | |
(can-buy-commodity food) | |
=> | |
(buy-commodity food) | |
(chat-to-player my-player-number "3 buy food for navy-upgrades") | |
) | |
(defrule | |
(or | |
(strategic-number sn-resource-control == ri-long-swordsman) | |
(or | |
(goal train-civ-goal ri-chain-mail) | |
(goal train-civ-goal ri-pikeman) | |
) | |
) | |
(gold-amount > 300) | |
(food-amount < 150) | |
(can-buy-commodity food) | |
=> | |
(buy-commodity food) | |
) | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(unit-type-count skirmisher-line > 7) | |
(research-available ri-elite-skirmisher) | |
(nor | |
(and | |
(wood-amount < 150) | |
(and | |
(food-amount > 250); get eskirms over 2nd TC or monastery | |
(gold-amount > 250); but don't slow down all other researches | |
) | |
) | |
(and | |
(wood-amount > 400); better spend the wood on buildings as gold is low. | |
(gold-amount < 75) | |
) | |
) | |
(goal strategy-goal flush) | |
=> | |
(set-goal save-wood-goal 1) | |
(set-strategic-number sn-resource-control ri-elite-skirmisher) | |
;debug (chat-to-player my-player-number "Saving resources for ri-elite-skirmisher") | |
) | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(research-available ri-elite-skirmisher) | |
(or | |
(building-type-count-total town-center >= tc-level-three) | |
(strategic-number sn-archer-threat > 0) | |
) | |
(current-age-time > 120); don't immediately block everything | |
(unit-type-count skirmisher-line > 7) | |
(building-type-count archery-range > 0) | |
=> | |
(set-goal save-wood-goal 1) | |
(set-strategic-number sn-resource-control ri-elite-skirmisher) | |
;debug (chat-to-player my-player-number "Saving resources for ri-elite-skirmisher") | |
) | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(strategic-number sn-archer-threat >= 1) | |
(research-available ri-elite-skirmisher) | |
(or | |
(nand | |
(town-under-attack) | |
(strategic-number sn-military-level < 0) | |
) | |
(building-type-count-total town-center >= tc-level-four) | |
) | |
(building-type-count-total town-center >= tc-level-three) | |
(military-population > 14) | |
(building-type-count archery-range > 0) | |
=> | |
(set-goal save-wood-goal 1) | |
(set-strategic-number sn-resource-control ri-elite-skirmisher) | |
;debug (chat-to-player my-player-number "Saving resources for ri-elite-skirmisher") | |
) | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(strategic-number sn-archer-threat > 1) | |
(research-available ri-elite-skirmisher) | |
(or | |
(goal unit-goal archer) | |
(goal unit-goal cavalry-archer) | |
) | |
(or | |
(building-type-count-total town-center >= tc-level-two) | |
(building-type-count-total siege-workshop > 0) | |
) | |
(military-population > 19) | |
(building-type-count archery-range > 0) | |
=> | |
(set-goal save-wood-goal 1) | |
(set-strategic-number sn-resource-control ri-elite-skirmisher) | |
;debug (chat-to-player my-player-number "Saving resources for ri-elite-skirmisher") | |
) | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(strategic-number sn-archer-threat > 1) | |
(research-available ri-elite-skirmisher) | |
(or | |
(goal unit-goal eagle-warrior) | |
(and | |
(goal unit-goal knight) | |
(goal control-goal aggressive-rush) | |
) | |
) | |
(building-type-count archery-range > 0) | |
(military-population > 14) | |
(unit-type-count-total mangonel-line == 0) | |
=> | |
(set-goal save-wood-goal 1) | |
(set-strategic-number sn-resource-control ri-elite-skirmisher) | |
;debug (chat-to-player my-player-number "Saving resources for ri-elite-skirmisher") | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(strategic-number sn-resource-control <= 2) | |
(goal train-civ-goal 1) | |
(or | |
(goal unit-goal archer) | |
(and | |
(and | |
(goal unit-goal knight) | |
(goal ranged-unit-type-goal archer) | |
) | |
(goal anti-cavalry-threat-goal 1) | |
) | |
) | |
(research-available ri-crossbow) | |
(building-type-count archery-range >= 1) | |
=> | |
(set-goal train-civ-goal ri-crossbow) | |
(set-strategic-number sn-resource-control ri-crossbow) | |
;debug (chat-to-player my-player-number "Saving resources for ri-crossbow") | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(strategic-number sn-resource-control <= 2) | |
(goal train-civ-goal 1) | |
(goal ranged-unit-type-goal archer) | |
(or | |
(and | |
(wood-amount > 150) | |
(food-amount < 70) | |
) | |
(goal enemy-goal eagle-warrior) | |
) | |
(gold-amount > 250) | |
(research-available ri-crossbow) | |
(building-type-count archery-range >= 1) | |
=> | |
(set-goal train-civ-goal ri-crossbow) | |
(set-strategic-number sn-resource-control ri-crossbow) | |
;debug (chat-to-player my-player-number "Saving resources for ri-crossbow") | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(strategic-number sn-resource-control <= 2) | |
(current-age == castle-age) | |
(goal train-civ-goal 1) | |
(or | |
(and | |
(goal unit-goal archer) | |
(building-type-count archery-range >= 1) | |
) | |
(and | |
(unit-type-count ranged-unit-class > 8) | |
(goal unit-goal my-unique-unit-line) | |
) | |
) | |
(research-available ri-fletching) | |
=> | |
(set-goal train-civ-goal ri-fletching) | |
) | |
(defrule | |
(strategic-number sn-military-level >= 0) | |
(strategic-number sn-resource-control <= 2) | |
(goal train-civ-goal 1) | |
(unit-type-count ranged-unit-class >= mid-min-number-upgrade) | |
(goal strategy-goal flush) | |
(not (research-available ri-long-swordsman)) | |
(research-available ri-bodkin-arrow) | |
=> | |
(set-goal train-civ-goal ri-bodkin-arrow) | |
(set-strategic-number sn-resource-control ri-bodkin-arrow) | |
;debug (chat-to-player my-player-number "Saving resources for ri-bodkin-arrow") | |
) | |
#load-if-not-defined BRITON-CIV | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(goal train-civ-goal 1) | |
(goal unit-goal archer) | |
(research-available ri-bodkin-arrow) | |
(unit-type-count ranged-unit-class >= mid-min-number-upgrade) | |
(nand | |
(strategic-number sn-cavalry-threat >= 1) | |
(unit-type-count spearman-line < 10) | |
) | |
(nor | |
(research-available ri-crossbow) | |
(or | |
(goal strategy-goal boom) | |
(goal strategy-goal fast-imp) | |
) | |
) | |
=> | |
(set-goal train-civ-goal ri-bodkin-arrow) | |
(set-strategic-number sn-resource-control ri-bodkin-arrow) | |
;debug (chat-to-player my-player-number "Saving resources for ri-bodkin-arrow") | |
) | |
#else | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(goal train-civ-goal 1) | |
(goal unit-goal archer) | |
(research-available ri-bodkin-arrow) | |
(unit-type-count ranged-unit-class >= mid-min-number-upgrade) | |
(nand | |
(strategic-number sn-cavalry-threat >= 1) | |
(unit-type-count spearman-line < 10) | |
) | |
(up-research-status c: ri-crossbow >= research-pending) | |
(or | |
(building-type-count-total town-center == 1) | |
(unit-type-count villager > 55) | |
) | |
=> | |
(set-goal train-civ-goal ri-bodkin-arrow) | |
(set-strategic-number sn-resource-control ri-bodkin-arrow) | |
;debug (chat-to-player my-player-number "Saving resources for ri-bodkin-arrow") | |
) | |
#end-if | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(goal train-civ-goal 1) | |
(or | |
(unit-type-count-total war-galley > 0) | |
(and | |
(building-type-count-total stable < 2) | |
(unit-type-count cavalry-archer-class >= high-min-number-upgrade) | |
) | |
) | |
(research-available ri-bodkin-arrow) | |
=> | |
(set-goal train-civ-goal ri-bodkin-arrow) | |
(set-strategic-number sn-resource-control ri-bodkin-arrow) | |
;debug (chat-to-player my-player-number "Saving resources for ri-bodkin-arrow") | |
) | |
#load-if-defined BRITON-CIV | |
(defrule | |
(can-research-with-escrow my-unique-research) | |
=> | |
(release-escrow wood)(release-escrow gold) | |
(research my-unique-research) | |
) | |
#end-if | |
#load-if-defined CHINESE-CIV | |
(defrule | |
(or | |
(unit-type-count my-unique-unit-line > 9) | |
(unit-type-count scorpion-line > 9) | |
) | |
(can-research my-unique-research) | |
=> | |
(research my-unique-research) | |
) | |
#end-if | |
#load-if-defined FRANKISH-CIV | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(unit-type-count-total my-unique-unit-line > 10) | |
(can-research my-unique-research) | |
=> | |
(research my-unique-research) | |
) | |
#end-if | |
#load-if-defined GOTHIC-CIV | |
(defrule | |
(can-research-with-escrow ri-perfusion) | |
=> | |
(release-escrow wood)(release-escrow gold) | |
(research ri-perfusion) | |
) | |
#end-if | |
#load-if-defined MAYAN-CIV | |
(defrule | |
(not (research-available ri-elite-eagle-warrior)) | |
(can-research my-unique-research) | |
=> | |
(research my-unique-research) | |
) | |
#end-if | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(strategic-number sn-resource-control <= 2) | |
(strategic-number sn-current-age >= ci-transit) | |
(strategic-number sn-military-level >= 0) | |
(research-available ri-eagle-warrior) | |
(goal unit-goal eagle-warrior) | |
=> | |
(set-strategic-number sn-resource-control ri-elite-eagle-warrior) | |
;debug (chat-to-player my-player-number "Saving resources for ri-eagle-warrior") | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(strategic-number sn-resource-control <= 2) | |
(or | |
(and | |
(and | |
(strategic-number sn-current-age == ci-transit) | |
(strategic-number sn-military-level >= 0) | |
) | |
(nand | |
(food-amount > 800) | |
(gold-amount > 500) | |
) | |
) | |
(research-available ri-elite-eagle-warrior) | |
) | |
(goal unit-goal eagle-warrior) | |
=> | |
(set-strategic-number sn-resource-control ri-elite-eagle-warrior) | |
;debug (chat-to-player my-player-number "Saving resources for ri-elite-eagle-warrior") | |
) | |
(defrule | |
(strategic-number sn-resource-control == ri-elite-eagle-warrior) | |
(food-amount < 800) | |
(gold-amount > 600) | |
(research-available ri-elite-eagle-warrior) | |
=> | |
(set-goal train-civ-goal ri-elite-eagle-warrior) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(strategic-number sn-resource-control <= 2) | |
(research-available ri-arbalest) | |
(or | |
(and | |
(food-amount > 350) | |
(gold-amount < 300) | |
) | |
(food-amount < 350) | |
) | |
(goal unit-goal archer) | |
=> | |
(set-strategic-number sn-resource-control ri-arbalest) | |
;debug (chat-to-player my-player-number "Saving resources for ri-arbalest") | |
) | |
#load-if-not-defined TURKISH-CIV; they get chemistry for free | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(or | |
(research-available ri-chemistry) | |
(and | |
(strategic-number sn-current-age == ci-transit) | |
(or | |
(food-amount < 300) | |
(gold-amount < 200) | |
) | |
) | |
) | |
(building-type-count university > 0) | |
(goal unit-goal gunpowder-class) | |
=> | |
(set-strategic-number sn-resource-control ri-chemistry) | |
;debug (chat-to-player my-player-number "Saving resources for ri-chemistry") | |
) | |
#end-if | |
#load-if-not-defined RIVERS-MAP | |
#load-if-not-defined BALTIC-MAP | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock == water-islands) | |
(strategic-number sn-resource-control < 2) | |
(or | |
(soldier-count >= 45) | |
(game-time < 3600) | |
) | |
(soldier-count > 15) | |
(nand | |
(building-type-count dock == 0); we lost the naval battle so train more soldiers to defend | |
(and | |
(current-age >= castle-age) | |
(game-time > 1800) | |
) | |
) | |
(population-cap <= 250) | |
=> | |
(set-strategic-number sn-resource-control 1); train navy only | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock == water-islands) | |
(population >= del-civ-pop) | |
(or (civilian-population > 70) | |
(game-time > 5400)) | |
(players-unit-type-count every-enemy fire-ship-line < 12) | |
(players-unit-type-count every-enemy galley-line < 12) | |
(warboat-count > 40) | |
(or (and (soldier-count > 19) | |
(unit-type-count transport-ship < 2)) | |
(soldier-count < 21)) | |
(unit-type-count-total villager >= 12) | |
(population-cap <= 250) | |
=> | |
(set-goal train-civ-goal -1) | |
(delete-unit villager) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock == water-islands) | |
(population >= del-civ-pop) | |
(current-age == imperial-age) | |
(or (warboat-count < 45) | |
(and (unit-type-count transport-ship > 1) | |
(or (dropsite-min-distance wood > 20) | |
(cc-players-unit-type-count 0 tree-class < 20)))) | |
(building-type-count dock > 0) | |
(unit-type-count-total villager >= 12) | |
=> | |
(set-goal train-civ-goal -1) | |
(delete-unit villager) | |
) | |
#end-if | |
#end-if | |
#load-if-not-defined AZTEC-CIV | |
#load-if-not-defined MAYAN-CIV | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(goal train-civ-goal 1) | |
(goal strategy-goal rush) | |
(goal unit-goal knight) | |
(research-available ri-chain-barding) | |
(gold-amount >= 150) | |
(goal control-goal shot) | |
(strategic-number sn-military-level >= 0) | |
=> | |
(set-goal train-civ-goal ri-chain-barding) | |
(set-strategic-number sn-resource-control ri-chain-barding) | |
;debug (chat-to-player my-player-number "Saving resources for ri-chain-barding") | |
) | |
#end-if | |
#end-if | |
; Place TC upgrades always before villager training or they won't fire unless you reached max villager | |
(defrule | |
(strategic-number sn-resource-control == 3) | |
(or | |
(not (research-available ri-hand-cart)) | |
(unit-type-count-total villager < 55) | |
) | |
(research-completed ri-wheel-barrow) | |
=> | |
(release-escrow wood)(set-escrow-percentage wood 0) | |
(set-strategic-number sn-resource-control 0) | |
(set-goal train-civ-goal 1) | |
) | |
(defrule | |
(goal train-civ-goal 1) | |
(unit-type-count villager >= 40) | |
(can-train villager) | |
(research-available ri-wheel-barrow) | |
(can-buy-commodity food) | |
(food-amount >= 75) | |
(food-amount < 175) | |
(wood-amount >= 50); enough wood for it | |
=> | |
(buy-commodity food) | |
(chat-to-player my-player-number "Attempting to research ri-wheel-barrow: Buy Food") | |
(set-goal train-civ-goal 2) | |
(set-strategic-number sn-resource-control 3) | |
) | |
(defrule | |
(goal train-civ-goal 1) | |
(unit-type-count villager >= 50) | |
(research-available ri-wheel-barrow) | |
(strategic-number sn-military-level >= 0) | |
=> | |
(set-goal train-civ-goal 2) | |
(set-strategic-number sn-resource-control 3) | |
;debug (chat-to-player my-player-number "Saving resources for ri-wheel-barrow") | |
) | |
(defrule | |
(strategic-number sn-resource-control == 3) | |
(players-building-type-count any-ally market > 0) | |
(unit-type-count villager >= 60) | |
(research-available ri-hand-cart) | |
(food-amount > 300) | |
(wood-amount < 150) | |
=> | |
(set-goal tribute-goal 4) | |
) | |
(defrule | |
(nor | |
(town-under-attack) | |
(and | |
(building-type-count-total town-center == 1) | |
(up-research-status c: imperial-age == research-pending) | |
) | |
) | |
(goal train-civ-goal 1) | |
(strategic-number sn-resource-control < 4) | |
(unit-type-count villager >= 60) | |
(research-available ri-hand-cart) | |
(can-buy-commodity food) | |
(food-amount < 300) | |
=> | |
(set-escrow-percentage wood 100) | |
(buy-commodity food) | |
(chat-to-player my-player-number "Attempting to research ri-hand-cart: Buy Food") | |
(set-strategic-number sn-resource-control 3) | |
) | |
(defrule | |
(nor | |
(town-under-attack) | |
(and | |
(building-type-count-total town-center == 1) | |
(up-research-status c: imperial-age == research-pending) | |
) | |
) | |
(strategic-number sn-resource-control < 4) | |
(unit-type-count villager >= 60) | |
(research-available ri-hand-cart) | |
(can-buy-commodity wood) | |
(food-amount >= 300); enough food for it | |
(wood-amount >= 100) | |
(wood-amount < 200) | |
=> | |
(set-escrow-percentage wood 100) | |
(buy-commodity wood) | |
(chat-to-player my-player-number "Attempting to research ri-hand-cart: Buy Wood") | |
(set-strategic-number sn-resource-control 3) | |
) | |
(defrule | |
(strategic-number sn-resource-control == 3) | |
(research-available ri-hand-cart) | |
(escrow-amount wood >= 200) | |
=> | |
(set-escrow-percentage wood 0) | |
) | |
(defrule | |
(strategic-number sn-resource-control < 4) | |
(or | |
(or | |
(goal strategy-goal sling) | |
(goal strategy-goal flush) | |
) | |
(population-cap < 75) | |
) | |
(unit-type-count villager >= 16) | |
(can-research ri-wheel-barrow) | |
=> | |
(research ri-wheel-barrow) | |
(set-goal train-civ-goal 1) | |
(set-strategic-number sn-resource-control 0) | |
) | |
(defrule | |
(unit-type-count villager >= 29) | |
(strategic-number sn-resource-control < 4) | |
(or | |
(current-age >= castle-age) | |
(and | |
(current-age-time < 20) | |
(food-amount > 720) | |
) | |
) | |
(nand | |
(goal unit-goal my-unique-unit-line) | |
(research-available ri-stone-mining) | |
) | |
(can-research ri-wheel-barrow) | |
=> | |
(research ri-wheel-barrow) | |
(set-goal train-civ-goal 1) | |
(set-strategic-number sn-resource-control 0) | |
) | |
(defrule | |
(or | |
(unit-type-count-total villager >= 55) | |
(civilian-population >= max-civ) | |
) | |
(can-research-with-escrow ri-hand-cart) | |
=> | |
(release-escrow wood)(set-escrow-percentage wood 0) | |
(research ri-hand-cart) | |
(set-goal train-civ-goal 1) | |
(set-strategic-number sn-resource-control 0) | |
) | |
#end-if ; not WONDER-RACE | |
(defrule | |
(or | |
(or | |
(research-available ri-wheel-barrow) | |
(civ-selected viking) | |
) | |
(and | |
(gold-amount > 220) | |
(food-amount < 730) | |
) | |
) | |
(current-age >= feudal-age) | |
(can-research ri-loom) | |
=> | |
(research ri-loom) | |
) | |
#load-if-not-defined ALL-TECHS-ENABLED | |
(defrule | |
(can-research ri-loom) | |
(or | |
(civ-selected mayan) | |
(civ-selected chinese) | |
) | |
=> | |
(research ri-loom) | |
) | |
#end-if | |
#load-if-defined LOW-RESOURCES-START | |
#load-if-defined DIFFICULTY-HARDEST | |
#load-if-defined FORTRESS-MAP | |
(defrule | |
(goal train-civ-goal 1) | |
; (civilian-population < max-civ); hardest anyway | |
(or (and (current-age == feudal-age) | |
(gold-amount < 180)) | |
(and (unit-type-count villager < 31) | |
(current-age == dark-age))) | |
(can-train villager) | |
=> | |
(disable-timer FDrop) | |
(enable-timer FDrop 21) | |
(train villager) | |
) | |
#end-if | |
#end-if | |
#end-if | |
#load-if-not-defined WONDER-RACE | |
(defrule | |
(goal train-civ-goal 1) | |
(current-age == feudal-age) | |
(civilian-population < max-civ); difficulty | |
(or (goal strategy-goal rush) | |
(goal strategy-goal boom)) | |
(or (food-amount < 760) | |
(current-age-time < 30)) | |
(or (current-age-time < 55) | |
(starting-age == feudal-age)) | |
(can-train villager) | |
=> | |
(disable-timer FDrop) | |
(enable-timer FDrop 21) | |
(train villager) | |
) | |
#end-if | |
; try to push to castle age | |
(defrule | |
(goal strategy-goal flush) | |
(or | |
(or | |
(goal enemy-goal flush) | |
(goal enemy-goal eagle-warrior) | |
) | |
(current-age-time >= 720) | |
) | |
(research-available castle-age) | |
(strategic-number sn-resource-control == 0) | |
(strategic-number sn-military-level >= 0) | |
(goal under-attack-goal 0) | |
(game-time >= 1300) | |
=> | |
(set-strategic-number sn-resource-control 2) | |
;debug (chat-to-player my-player-number "Saving resources for castle-age") | |
) | |
(defrule | |
(goal strategy-goal flush) | |
(research-available castle-age) | |
(strategic-number sn-resource-control == 2) | |
(military-population < 15) | |
(goal under-attack-goal 1) | |
=> | |
(set-strategic-number sn-resource-control 0) | |
) | |
(defrule | |
(goal strategy-goal flush) | |
(strategic-number sn-current-age == feudal) | |
(strategic-number sn-resource-control == 0) | |
(strategic-number sn-minimum-water-body-size-for-dock >= water-mixed) | |
(wood-amount < 200) | |
(food-amount > 700) | |
(building-type-count-total blacksmith == 0) | |
=> | |
(set-strategic-number sn-resource-control 2) | |
;debug (chat-to-player my-player-number "Saving resources for castle-age") | |
) | |
(defrule | |
(players-military-population every-enemy < 5) | |
(goal strategy-goal flush) | |
(goal forward-threat-goal 1) | |
(strategic-number sn-current-age == feudal) | |
(strategic-number sn-resource-control == 0) | |
=> | |
(set-strategic-number sn-resource-control 2) | |
;debug (chat-to-player my-player-number "Saving resources for castle-age") | |
) | |
; try to push to imperial age | |
(defrule | |
(current-age-time > 600) | |
(strategic-number sn-current-age == castle) | |
(strategic-number sn-minimum-water-body-size-for-dock >= water-mixed) | |
(or (civilian-population >= 30) | |
(goal strategy-goal fast-imp)) | |
(food-amount > 500) | |
(gold-amount > 400) | |
=> | |
(set-strategic-number sn-resource-control 2) | |
;debug (chat-to-player my-player-number "Saving resources for imperial-age") | |
) | |
(defrule | |
(strategic-number sn-current-age == castle) | |
(goal strategy-goal rush) | |
(building-type-count-total town-center >= tc-level-three) | |
(goal unit-goal knight) | |
(players-building-type-count focus-player castle > 0) | |
(or | |
(players-building-type-count focus-player castle > 1) | |
(players-building-type-count focus-player stone-wall-line > 15) | |
) | |
=> | |
(set-goal strategy-goal fast-imp) | |
(disable-self) | |
) | |
(defrule | |
(research-available imperial-age) | |
(strategic-number sn-resource-control == 0) | |
(building-type-count town-center >= tc-level-two) | |
(strategic-number sn-military-level >= 0) | |
(or (civilian-population >= 130) | |
(or (and (civilian-population >= 115) | |
(strategic-number sn-military-level >= 1)) | |
(and (civilian-population >= 100) | |
(strategic-number sn-military-level >= 2)))) | |
(nor (town-under-attack) | |
(enemy-buildings-in-town)) | |
=> | |
(set-strategic-number sn-resource-control 2) | |
;debug (chat-to-player my-player-number "Saving resources for imperial-age") | |
) | |
(defrule | |
(research-available imperial-age) | |
(strategic-number sn-resource-control == 0) | |
(building-type-count town-center >= tc-level-two) | |
(population > 140) | |
(strategic-number sn-military-level >= 0) | |
(nor | |
(town-under-attack) | |
(and | |
(players-current-age focus-player == imperial-age) | |
(strategic-number sn-military-level >= 2) | |
) | |
) | |
=> | |
(set-strategic-number sn-resource-control 2) | |
;debug (chat-to-player my-player-number "Saving resources for imperial-age") | |
) | |
(defrule | |
(strategic-number sn-current-age == castle) | |
(strategic-number sn-resource-control == 0) | |
(or | |
(population >= 140) | |
(unit-type-count-total eagle-warrior-line > 40) | |
) | |
(or | |
(strategic-number sn-military-level >= -1) | |
(unit-type-count cavalry-unit-class > 20) | |
) | |
(goal under-attack-goal 0) | |
(or | |
(goal strategy-goal fast-imp) | |
(and | |
(goal strategy-goal boom) | |
(goal unit-goal knight) | |
) | |
) | |
=> | |
(set-strategic-number sn-resource-control 2) | |
;debug (chat-to-player my-player-number "Saving resources for imperial-age") | |
) | |
(defrule | |
(strategic-number sn-resource-control == 0) | |
(or | |
(and | |
(research-available ri-cavalier) | |
(or | |
(goal unit-goal knight-line) | |
(unit-type-count knight-line > 19) | |
) | |
) | |
(and | |
(research-available ri-hussar) | |
(nor | |
(goal unit-goal militiaman-line) | |
(civ-selected magyar) | |
) | |
) | |
) | |
(up-research-status c: ri-champion < research-pending) | |
=> | |
(set-strategic-number sn-resource-control 2) | |
) | |
(defrule | |
(strategic-number sn-resource-control == 0) | |
(or | |
(and | |
(or | |
(research-available ri-two-handed-swordsman) | |
(research-available ri-champion) | |
) | |
(or | |
(goal unit-goal militiaman-line) | |
(goal control-goal militiaman-line) | |
) | |
) | |
(and | |
(goal ranged-unit-type-goal archer) | |
(research-available ri-arbalest) | |
) | |
) | |
=> | |
(set-strategic-number sn-resource-control 2) | |
) | |
(defrule | |
(strategic-number sn-resource-control == 0) | |
(strategic-number sn-current-age >= ci-transit) | |
(or | |
(or | |
(research-available ri-blast-furnace) | |
(research-available ri-plate-mail) | |
) | |
(research-available ri-chain-mail) | |
) | |
(unit-type-count infantry-class > 12) | |
(or | |
(food-amount < 350) | |
(gold-amount < 225) | |
) | |
=> | |
(set-strategic-number sn-resource-control 2) | |
) | |
#load-if-not-defined AZTEC-CIV | |
#load-if-not-defined MAYAN-CIV | |
(defrule | |
(strategic-number sn-resource-control == 0) | |
(strategic-number sn-current-age >= ci-transit) | |
(or | |
(or | |
(research-available ri-blast-furnace) | |
(research-available ri-plate-barding) | |
) | |
(research-available ri-chain-barding) | |
) | |
(unit-type-count cavalry-unit-class > 12) | |
(or | |
(food-amount < 350) | |
(gold-amount < 225) | |
) | |
=> | |
(set-strategic-number sn-resource-control 2) | |
) | |
#load-if-defined UP-POCKET-POSITION | |
(defrule | |
(strategic-number sn-resource-control == 0) | |
(current-age == castle-age) | |
(building-type-count stone-wall > 5) | |
(goal unit-goal knight) | |
(or | |
(strategic-number sn-military-level >= 0) | |
(and | |
(unit-type-count cavalry-unit-class > 5) | |
(goal under-attack-goal 0) | |
) | |
) | |
=> | |
(set-strategic-number sn-resource-control 2) | |
) | |
(defrule | |
(strategic-number sn-resource-control == 0) | |
(strategic-number sn-current-age >= fc-transit) | |
(game-time < 1800) | |
(building-type-count stone-wall > 5) | |
(goal unit-goal skirmisher) | |
(building-type-count town-center < 3) | |
=> | |
(set-strategic-number sn-resource-control 2) | |
) | |
#end-if | |
(defrule | |
(strategic-number sn-resource-control == 0) | |
(current-age == castle-age) | |
(civilian-population > 90) | |
(goal unit-goal knight) | |
(or | |
(and | |
(strategic-number sn-military-level >= 0) | |
(unit-type-count cavalry-unit-class > 19) | |
) | |
(population >= eighty-five-percent-pop) | |
) | |
=> | |
(set-strategic-number sn-resource-control 2) | |
) | |
#load-if-defined PERSIAN-CIV | |
(defrule | |
(strategic-number sn-resource-control == 0) | |
(strategic-number sn-current-age >= ci-transit) | |
(goal unit-goal my-unique-unit-line) | |
(building-type-count castle > 0) | |
(or | |
(and | |
(up-research-status c: my-unique-unit-upgrade < research-pending); ri-elite-war-elephant | |
(or | |
(food-amount < 1600) | |
(gold-amount < 1200) | |
) | |
) | |
(research-available my-unique-unit-upgrade) | |
) | |
=> | |
(set-strategic-number sn-resource-control 2) | |
;debug (chat-to-player my-player-number "Saving resources for ewe") | |
) | |
#end-if | |
#load-if-not-defined INDIAN-CIV | |
#load-if-not-defined SARACEN-CIV | |
#load-if-not-defined TURKISH-CIV | |
#load-if-not-defined MONGOL-CIV | |
#load-if-not-defined CHINESE-CIV | |
(defrule | |
(strategic-number sn-resource-control == 0) | |
(strategic-number sn-current-age >= imperial); ci-transit | |
(goal unit-goal knight) | |
(unit-type-count knight-line > 16) | |
(or | |
(and | |
(up-research-status c: ri-cavalier == research-pending) | |
(or | |
(food-amount < 1300) | |
(gold-amount < 750) | |
) | |
) | |
(research-available ri-paladin) | |
) | |
=> | |
(set-strategic-number sn-resource-control 2) | |
;debug (chat-to-player my-player-number "Saving resources for ri-paladin") | |
) | |
#end-if | |
#end-if | |
#end-if | |
#end-if | |
#else | |
(defrule | |
(strategic-number sn-resource-control == 0) | |
(unit-type-count camel-line > 7) | |
(or | |
(research-available ri-heavy-camel) | |
(research-available ri-imperial-camel) | |
) | |
(population > eighty-five-percent-pop) | |
=> | |
(set-strategic-number sn-resource-control 2) | |
) | |
#end-if | |
#end-if | |
#end-if | |
(defrule | |
(strategic-number sn-resource-control == 0) | |
(or | |
(research-available ri-bracer) | |
(research-available ri-ring-archer-armor) | |
) | |
(or | |
(food-amount < 300) | |
(gold-amount < 250) | |
) | |
=> | |
(set-strategic-number sn-resource-control 2) | |
) | |
(defrule | |
(goal train-civ-goal ri-crossbow) | |
(strategic-number sn-resource-control == ri-crossbow) | |
(up-research-status c: ri-elite-skirmisher == research-pending) | |
(building-type-count archery-range == 1) | |
=> | |
(set-goal train-civ-goal 1) | |
(set-strategic-number sn-resource-control 0) | |
) | |
(defrule | |
(strategic-number sn-resource-control == 0) | |
(population > seventy-five-percent-pop) | |
(unit-type-count scorpion-line > 9) | |
(or | |
(research-available ri-heavy-scorpion) | |
(and | |
(civ-selected celtic) | |
(and | |
(building-type-count castle > 0) | |
(research-available my-unique-research) | |
) | |
) | |
) | |
=> | |
(set-strategic-number sn-resource-control 2) | |
(set-goal save-wood-goal 1) | |
) | |
(defrule | |
(goal uu-up-goal 1) | |
(population > eighty-five-percent-pop) | |
(research-available my-unique-unit-upgrade) | |
(building-type-count castle > 0) | |
(or | |
(or | |
(unit-type-count female-gold-miner > 0); don't start escrowing when gold income is low | |
(unit-type-count male-gold-miner > 0) | |
) | |
(unit-type-count trade-cart > 5) | |
) | |
=> | |
(set-escrow-percentage food 30)(set-escrow-percentage gold 30) | |
(set-goal escrow-purpose-goal my-unique-unit-line) | |
) | |
#load-if-not-defined AZTEC-CIV ; Jaguars aren't useful in trash wars | |
#load-if-not-defined BRITON-CIV ; Same as most ranged uu | |
#load-if-not-defined CHINESE-CIV | |
#load-if-not-defined MAYAN-CIV | |
#load-if-not-defined MONGOL-CIV | |
#load-if-not-defined KOREAN-CIV | |
(defrule | |
(goal escrow-purpose-goal my-unique-unit-line) | |
(unit-type-count female-gold-miner == 0) | |
(unit-type-count male-gold-miner == 0) | |
(unit-type-count trade-cart == 0) | |
=> | |
(release-escrow food) | |
(set-escrow-percentage food 0); pile up relic/market gold first, as this will take long | |
) | |
(defrule | |
(or | |
(and | |
(goal escrow-purpose-goal my-unique-unit-line) | |
(or | |
(escrow-amount food >= max-food-escrow) | |
(population < max-civ-pop) | |
) | |
) | |
(and | |
(research-available imperial-age) | |
(escrow-amount food >= imp-food) | |
) | |
) | |
=> | |
(set-escrow-percentage food 0) | |
) | |
(defrule | |
(or | |
(and | |
(goal escrow-purpose-goal my-unique-unit-line) | |
(escrow-amount gold >= max-gold-escrow) | |
) | |
(and | |
(research-available imperial-age) | |
(escrow-amount gold >= imp-gold) | |
) | |
) | |
=> | |
(set-escrow-percentage food 30) | |
(set-escrow-percentage gold 0) | |
) | |
#end-if | |
#end-if | |
#end-if | |
#end-if | |
#end-if | |
#end-if | |
(defrule | |
(goal escrow-purpose-goal my-unique-unit-line) | |
(or | |
(or | |
(not (research-available my-unique-unit-upgrade)) | |
(building-type-count castle == 0); not included in check above | |
) | |
(and | |
(population < 160) | |
(goal under-attack-goal 1) | |
) | |
) | |
=> | |
(set-escrow-percentage food 0)(set-escrow-percentage gold 0) | |
(release-escrow food)(release-escrow gold) | |
(set-goal escrow-purpose-goal 0) | |
) | |
#load-if-defined SPANISH-CIV | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(unit-type-count monastery-class > 12) | |
(up-research-status c: ri-theocracy >= research-pending) | |
(research-available ri-inquisition) | |
(building-type-count castle > 0) | |
=> | |
(set-strategic-number sn-resource-control ri-inquisition) | |
;debug (chat-to-player my-player-number "Saving resources for ri-inquisition") | |
) | |
#end-if | |
#load-if-defined SLAVIC-CIV | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(unit-type-count monastery-class > 12) | |
(or | |
(strategic-number sn-current-age >= ci-transit) | |
(goal hostilities-goal 1) | |
) | |
(building-type-count castle > 0) | |
(research-available ri-orthodoxy) | |
=> | |
(set-strategic-number sn-resource-control ri-orthodoxy) | |
;debug (chat-to-player my-player-number "Saving resources for ri-orthodoxy") | |
) | |
#end-if | |
(defrule | |
(strategic-number sn-resource-control == 0) | |
(or | |
(or | |
(goal unit-goal monk) | |
(goal ranged-unit-type-goal monk) | |
) | |
(players-unit-type-count focus-player war-elephant-line > 12) | |
) | |
(unit-type-count-total monk > 5) | |
(or | |
(or | |
(research-available ri-theocracy) | |
(research-available ri-illumination) | |
) | |
(research-available ri-block-printing) | |
) | |
=> | |
(set-strategic-number sn-resource-control 2) | |
) | |
(defrule | |
(current-age == imperial-age) | |
(unit-type-count monastery-class > 20) | |
(strategic-number sn-resource-control == 0) | |
(goal unit-goal monk) | |
(gold-amount < 300) | |
(unit-type-count-total trebuchet-set == 0) | |
(building-type-count castle > 0) | |
=> | |
(set-strategic-number sn-resource-control 2) | |
) | |
(defrule | |
(current-age == imperial-age) | |
(unit-type-count monastery-class > 20) | |
(goal unit-goal monk) | |
(wood-amount < 200) | |
(unit-type-count-total trebuchet-set == 0) | |
(building-type-count castle > 0) | |
=> | |
(set-goal save-wood-goal 1) | |
) | |
(defrule | |
(research-available imperial-age) | |
(strategic-number sn-resource-control == 0) | |
(goal unit-goal monk) | |
(unit-type-count-total monk > 20) | |
=> | |
(set-strategic-number sn-resource-control 2) | |
;debug (chat-to-player my-player-number "Saving resources for imperial-age") | |
) | |
(defrule | |
(food-amount >= 175) | |
(or | |
(goal train-civ-goal ri-crossbow) | |
(and | |
(food-amount >= 265) | |
(goal train-civ-goal ri-pikeman) | |
) | |
) | |
=> | |
(set-goal train-civ-goal 1) | |
) | |
#load-if-defined DEATH-MATCH | |
(defrule | |
(strategic-number sn-resource-control < 2) | |
(civilian-population < fourty-percent-pop) | |
(population >= eighty-five-percent-pop) | |
(game-time < 1200) | |
=> | |
(set-strategic-number sn-resource-control 2) | |
) | |
#load-if-defined DARK-AGE-START | |
(defrule | |
(strategic-number sn-resource-control > 2) | |
(food-amount > 2000) | |
(gold-amount > 2000) | |
(wood-amount > 2000) | |
=> | |
(set-strategic-number sn-resource-control 0); resource control not needed in DM | |
(set-goal save-wood-goal 0) | |
) | |
#end-if | |
#end-if | |
#load-if-not-defined WONDER-RACE | |
(defrule | |
(research-completed ri-coinage) | |
(food-amount > 170) | |
(taunt-detected any-human-ally 38) | |
=> | |
(tribute-to-player this-any-ally food 100) | |
) | |
(defrule | |
(building-type-count town-center > 0) | |
(research-completed ri-coinage) | |
(wood-amount > 200) | |
(taunt-detected any-human-ally 38) | |
=> | |
(tribute-to-player this-any-ally wood 100) | |
) | |
(defrule | |
(research-completed ri-coinage) | |
(gold-amount > 150) | |
(taunt-detected any-human-ally 38) | |
=> | |
(tribute-to-player this-any-ally gold 100) | |
) | |
(defrule | |
(research-completed ri-coinage) | |
(stone-amount > 220) | |
(taunt-detected any-human-ally 38) | |
=> | |
(tribute-to-player this-any-ally stone 100) | |
) | |
(defrule | |
(or | |
(or | |
(players-tribute-memory any-computer-ally food == 100) | |
(players-tribute-memory any-computer-ally food == 200) | |
) | |
(players-tribute-memory any-computer-ally gold == 100) | |
) | |
(players-population any-computer-ally >= del-civ-pop) | |
=> | |
(clear-tribute-memory every-computer food) | |
(clear-tribute-memory every-computer gold) | |
(enable-timer tribute-timer 2); some scripts send only 100 of one res, even if they have tons of it, so keep asking if necessary. | |
) | |
(defrule | |
(game-time > 1200) | |
(building-type-count town-center > 0) | |
(or | |
(unit-type-count villager < 15) | |
(and | |
(players-civilian-population any-ally > fourty-percent-pop) | |
(or | |
(unit-type-count villager < twenty-five-percent-pop) | |
(players-population any-ally > eighty-five-percent-pop) | |
) | |
) | |
) | |
(unit-type-count villager < fourty-percent-pop) | |
(food-amount < 250) | |
(goal under-attack-goal 0) | |
=> | |
(set-goal tribute-goal 3) | |
) | |
(defrule | |
(building-type-count town-center >= tc-level-two) | |
(players-building-type-count any-ally market > 0) | |
(game-time > 1800) | |
(or | |
(unit-type-count villager < 90) | |
(strategic-number sn-resource-control == 2) | |
) | |
(food-amount < 100) | |
(gold-amount > 200) | |
=> | |
(set-goal tribute-goal 3) | |
) | |
(defrule | |
(building-type-count town-center >= tc-level-two) | |
(players-building-type-count any-ally market > 0) | |
(strategic-number sn-resource-control == 2) | |
(food-amount > 500) | |
(gold-amount < 200) | |
=> | |
(set-goal tribute-goal 5) | |
) | |
(defrule | |
(players-building-type-count any-ally market > 0) | |
(strategic-number sn-resource-control < 4) | |
(food-amount > 500) | |
(gold-amount > 400) | |
(wood-amount < 150) | |
=> | |
(set-goal tribute-goal 4) | |
) | |
(defrule | |
(taunt-detected any-ally 3) | |
(food-amount > 1000) | |
(strategic-number sn-resource-control < 1) | |
(research-completed ri-banking) | |
(building-type-count market > 0) | |
(current-age == imperial-age) | |
=> | |
(acknowledge-taunt this-any-ally 3) | |
(tribute-to-player this-any-ally food 400) | |
(chat-to-player-using-id this-any-ally 22077) | |
(chat-local-to-self "tribute food")) | |
(defrule | |
(taunt-detected any-ally 3) | |
(food-amount > 300) | |
(or (research-completed ri-banking) | |
(food-amount > 500)) | |
(strategic-number sn-resource-control < 1) | |
(building-type-count market > 0) | |
=> | |
(acknowledge-taunt this-any-ally 3) | |
(tribute-to-player this-any-ally food 100) | |
(chat-to-player-using-id this-any-ally 22077) | |
(chat-local-to-self "tribute food")) | |
(defrule | |
(taunt-detected any-ally 4) | |
(wood-amount > 900) | |
(goal save-wood-goal 0) | |
(research-completed ri-banking) | |
(building-type-count market > 0) | |
=> | |
(acknowledge-taunt this-any-ally 4) | |
(tribute-to-player this-any-ally wood 400) | |
(chat-to-player-using-id this-any-ally 22076) | |
(chat-local-to-self "tribute wood")) | |
(defrule | |
(taunt-detected any-ally 4) | |
(wood-amount > 300) | |
(or (goal save-wood-goal 0) | |
(wood-amount > 1300)); just to be safe | |
(building-type-count market > 0) | |
=> | |
(acknowledge-taunt this-any-ally 4) | |
(tribute-to-player this-any-ally wood 100) | |
(chat-to-player-using-id this-any-ally 22076) | |
(chat-local-to-self "tribute wood")) | |
(defrule | |
(taunt-detected any-ally 5) | |
(gold-amount > 1500) | |
(research-completed ri-banking) | |
(building-type-count market > 0) | |
=> | |
(acknowledge-taunt this-any-ally 5) | |
(tribute-to-player this-any-ally gold 400) | |
(chat-to-player-using-id this-any-ally 22078) | |
(chat-local-to-self "tribute gold")) | |
(defrule | |
(taunt-detected any-ally 5) | |
(strategic-number sn-resource-control < 1) | |
(gold-amount > 300) | |
(or (research-completed ri-banking) | |
(gold-amount > 800)) | |
(building-type-count market > 0) | |
=> | |
(acknowledge-taunt this-any-ally 5) | |
(tribute-to-player this-any-ally gold 100) | |
(chat-to-player-using-id this-any-ally 22078) | |
(chat-local-to-self "tribute gold")) | |
(defrule | |
(taunt-detected any-ally 6) | |
(building-type-count-total town-center > 0) | |
(or (stone-amount > 750) | |
(or (building-type-count-total castle >= 4) | |
(and (players-building-type-count any-ally town-center == 0) | |
(stone-amount >= 130)))) | |
(building-type-count market > 0) | |
=> | |
(acknowledge-taunt this-any-ally 6) | |
(tribute-to-player this-any-ally stone 100) | |
(chat-to-player-using-id this-any-ally 22079) | |
(chat-local-to-self "tribute stone")) | |
(defrule | |
(or (taunt-detected any-ally 3) | |
(or (taunt-detected any-ally 4) | |
(or (taunt-detected any-ally 5) | |
(taunt-detected any-ally 6)))) | |
(building-type-count market == 0) | |
=> | |
(chat-to-player-using-id this-any-ally 22164) | |
(acknowledge-taunt this-any-ally 3) | |
(acknowledge-taunt this-any-ally 4) | |
(acknowledge-taunt this-any-ally 5) | |
(acknowledge-taunt this-any-ally 6) | |
) | |
(defrule | |
(or (taunt-detected any-ally 3) | |
(or (taunt-detected any-ally 4) | |
(or (taunt-detected any-ally 5) | |
(taunt-detected any-ally 6)))) | |
=> | |
(chat-to-allies-using-id 22118); "Alas, I cannot help that at this time." | |
(acknowledge-taunt this-any-ally 3) | |
(acknowledge-taunt this-any-ally 4) | |
(acknowledge-taunt this-any-ally 5) | |
(acknowledge-taunt this-any-ally 6) | |
) | |
(defrule | |
(up-compare-goal strategy-goal != sling) | |
(taunt-detected any-ally 130); cooperate with barbie's share resources | |
(wood-amount < 400) | |
(gold-amount > 800) | |
(food-amount > 1000) | |
=> | |
(chat-to-allies-using-id 22123) | |
(acknowledge-taunt this-any-ally 130) | |
) | |
(defrule | |
(up-compare-goal strategy-goal != sling) | |
(nand | |
(goal under-attack-goal 1) | |
(population < 45) | |
) | |
(taunt-detected any-ally 130) | |
(or | |
(food-amount < 1000) | |
(or | |
(wood-amount < 800) | |
(gold-amount < 700) | |
) | |
) | |
(building-type-count-total town-center > 0) | |
=> | |
(chat-to-allies "1") | |
(acknowledge-taunt this-any-ally 130) | |
(acknowledge-taunt my-player-number 1) | |
) | |
(defrule | |
(taunt-detected any-ally 130); if we need them, the other rules above would've triggered | |
=> | |
(chat-to-allies "2") | |
(acknowledge-taunt this-any-ally 130) | |
(acknowledge-taunt my-player-number 2) | |
) | |
(defrule | |
(up-timer-status tribute-timer != timer-running) | |
(goal tribute-goal 3) | |
(players-building-type-count any-ally market > 0) | |
=> | |
(enable-timer tribute-timer 120); 30 | |
(chat-to-allies-using-id 22122) | |
) | |
(defrule | |
(up-timer-status tribute-timer != timer-running) | |
(goal tribute-goal 4) | |
(players-building-type-count any-ally market > 0) | |
=> | |
(enable-timer tribute-timer 120); 30 | |
(chat-to-allies-using-id 22123) | |
) | |
(defrule | |
(up-timer-status tribute-timer != timer-running) | |
(goal tribute-goal 5) | |
(players-building-type-count any-ally market > 0) | |
=> | |
(enable-timer tribute-timer 120); 30 | |
(chat-to-allies-using-id 22124) | |
) | |
(defrule | |
(up-timer-status tribute-timer != timer-running) | |
(goal tribute-goal 6) | |
(players-building-type-count any-ally market > 0) | |
=> | |
(enable-timer tribute-timer 120); 30 | |
(chat-to-allies-using-id 22125) | |
) | |
#end-if ; NOT WONDER-RACE | |
;********************BASICS ******************** | |
(defrule | |
(resource-found food) | |
; (goal buildmill yes) | |
(building-type-count town-center >= 1) | |
(game-time >= 120) | |
(or (unit-type-count-total villager >= 18) | |
(or (wood-amount >= 200) | |
(building-type-count-total lumber-camp >= 1))) | |
(building-type-count-total mill < 1) | |
(can-build mill) | |
=> | |
(set-strategic-number sn-allow-adjacent-dropsites 0) | |
(build mill) | |
; (chat-local-to-self "Building emergency mill. 1") | |
(disable-self)) | |
(defrule | |
; (goal buildmill yes) | |
(building-type-count town-center >= 1) | |
(game-time >= 125) | |
(military-population >= 1); scout | |
(or (unit-type-count-total villager >= 18) | |
(or (wood-amount >= 200) | |
(building-type-count-total lumber-camp >= 1))) | |
(building-type-count-total mill < 1) | |
(can-build mill) | |
=> | |
(set-strategic-number sn-allow-adjacent-dropsites 0) | |
(set-strategic-number sn-mill-max-distance 17) | |
(build mill) | |
; (chat-local-to-self "Building emergency mill. 2") | |
(disable-self)) | |
(defrule | |
; (goal buildmill yes) | |
(building-type-count town-center >= 1) | |
(game-time >= 130) | |
(military-population <= 0); no scout | |
(or (unit-type-count-total villager >= 18) | |
(or (wood-amount >= 200) | |
(building-type-count-total lumber-camp >= 1))) | |
(building-type-count-total mill < 1) | |
(can-build mill) | |
=> | |
(set-strategic-number sn-allow-adjacent-dropsites 0) | |
(set-strategic-number sn-mill-max-distance 8) | |
(build mill) | |
; (chat-local-to-self "Building emergency mill. 3") | |
(disable-self)) | |
(defrule | |
; (goal buildmill yes) | |
(building-type-count town-center >= 1) | |
(game-time >= 150) | |
(or (unit-type-count-total villager >= 18) | |
(or (wood-amount >= 200) | |
(building-type-count-total lumber-camp >= 1))) | |
(building-type-count-total mill < 1) | |
(can-build mill) | |
=> | |
(set-strategic-number sn-allow-adjacent-dropsites 0) | |
(set-strategic-number sn-mill-max-distance 8) | |
(build mill) | |
; (chat-local-to-self "Building emergency mill. 4") | |
(disable-self)) | |
(defrule | |
(strategic-number sn-current-age == dark) | |
(building-type-count town-center > 0) | |
(building-type-count-total mill == 0) | |
(resource-found food) | |
(or (wood-amount >= 300) | |
(or | |
(or | |
(unit-type-count male-forager > 0) | |
(unit-type-count female-forager > 0) | |
) | |
(and | |
(death-match-game) | |
(current-age == dark-age) | |
) | |
)) | |
(can-build mill) | |
=> | |
(set-strategic-number sn-allow-adjacent-dropsites 0) | |
(build mill) | |
) | |
(defrule | |
(current-age == dark-age) | |
(building-type-count town-center > 0) | |
(building-type-count-total mill == 0); emergency mill for no berries | |
(game-time > 180) | |
(or | |
(unit-type-count-total villager >= 20); some other foood sources available | |
(and | |
(strategic-number sn-mill-max-distance > 30) | |
(building-type-count lumber-camp > 0) | |
) | |
) | |
(or | |
(wood-amount > 200) | |
(building-type-count lumber-camp > 0) | |
) | |
(can-build mill) | |
=> | |
(set-strategic-number sn-allow-adjacent-dropsites 0) | |
(build mill) | |
) | |
#load-if-defined SCANDANAVIA-MAP | |
(defrule | |
(building-type-count town-center > 0) | |
(strategic-number sn-current-age == dark) | |
(dropsite-min-distance deer-hunting > 8) | |
(dropsite-min-distance deer-hunting < 38) | |
(can-build mill) | |
(building-type-count-total mill < 1) | |
=> | |
(set-strategic-number sn-allow-adjacent-dropsites 1); test | |
(set-strategic-number sn-preferred-mill-placement 1); mill deer | |
(build mill) | |
) | |
#end-if | |
#load-if-not-defined DEATH-MATCH | |
(defrule | |
(building-type-count town-center >= 1); this idea from ER rarely fails | |
(game-time >= 15); increase lumber camp distance when we still found no wood after 15s | |
(or ; so the scout has some time to find a forest | |
(not (resource-found wood)) | |
(building-type-count-total stone-wall > 15); also increase in walled maps, as we may find the forest with the wall | |
) | |
(strategic-number sn-mill-max-distance < 30) | |
=> | |
(set-strategic-number sn-camp-max-distance 18) | |
(disable-self) | |
) | |
(defrule | |
(building-type-count town-center >= 1) | |
(game-time >= 18); and even further when still no wood after 18s | |
(not (resource-found wood)) | |
(strategic-number sn-mill-max-distance < 30) | |
=> | |
(set-strategic-number sn-camp-max-distance 21) | |
(disable-self) | |
) | |
(defrule | |
(building-type-count-total lumber-camp > 0) | |
(building-type-count-total stone-wall < 15) | |
(or (dropsite-min-distance gold > 12) | |
(building-type-count-total mining-camp > 0)) | |
=> | |
(set-strategic-number sn-maximum-food-drop-distance 15) | |
(set-strategic-number sn-camp-max-distance 30) | |
(set-strategic-number sn-wood-dropsite-distance 3); move wood gatherers from far stragglers to the camp | |
(disable-self) | |
) | |
(defrule | |
(building-type-count-total lumber-camp > 1) | |
(building-type-count-total mining-camp == 0) | |
(dropsite-min-distance gold > 3) | |
(dropsite-min-distance gold < 12); close gold like in gold rush maps | |
=> | |
(set-strategic-number sn-camp-max-distance 12); so only a small camp max distance is required, else the gold will be skipped. | |
(set-strategic-number sn-wood-dropsite-distance 3) | |
(disable-self) | |
) | |
(defrule | |
(current-age == dark-age); don't trigger this later when initial gold is gone. | |
(building-type-count town-center >= 1); mainly a fix for nomad map where gold may be farther away | |
(building-type-count-total lumber-camp > 0); as the computer doesn't care about resources when placing the initial TC. | |
(unit-type-count villager >= 24) | |
(dropsite-min-distance gold > 24) | |
(dropsite-min-distance gold < 64) | |
=> | |
(set-strategic-number sn-camp-max-distance 60) | |
(disable-self) | |
) | |
(defrule | |
; (up-pending-objects c: lumber-camp < 1) | |
(game-time > lumber-delay) | |
(resource-found wood) | |
(or (dropsite-min-distance wood >= 7) | |
(or (and (wood-amount >= 300) | |
(strategic-number sn-wood-gatherer-percentage >= 7)) | |
(or (building-type-count-total mill > 0) | |
(and (wood-amount > 200) | |
(strategic-number sn-mill-max-distance > 30))))) | |
(building-type-count-total lumber-camp == 0) | |
(can-build lumber-camp) | |
=> | |
(set-strategic-number sn-allow-adjacent-dropsites 1) | |
(build lumber-camp) | |
) | |
#end-if ; no DM | |
#load-if-not-defined DIFFICULTY-EASIEST | |
#load-if-not-defined DIFFICULTY-EASY | |
(defrule | |
(resource-found wood) | |
(unit-type-count villager >= 20) | |
(strategic-number sn-minimum-water-body-size-for-dock >= water-mixed) | |
(dropsite-min-distance wood < 4) | |
(wood-amount < 160) | |
(strategic-number sn-current-age == dark) | |
=> | |
(up-jump-rule 1) | |
) | |
(defrule ;build additional lumber camps | |
; (up-pending-objects c: lumber-camp < 1) | |
(resource-found wood) | |
(unit-type-count villager >= 20) | |
(or | |
(building-type-count-total lumber-camp < 2) | |
(unit-type-count villager >= 45) | |
) | |
(or | |
(building-type-count-total lumber-camp < 3) | |
(unit-type-count villager >= 60) | |
) | |
(building-type-count-total lumber-camp < 5) | |
(can-build lumber-camp) | |
=> | |
(set-strategic-number sn-allow-adjacent-dropsites 1) | |
(build lumber-camp) | |
(set-strategic-number sn-dropsite-separation-distance 3) | |
(set-strategic-number sn-maximum-wood-drop-distance 30) | |
) | |
#end-if | |
#end-if | |
; Lumber Camp Replacement when either fast when 1st lumber-camp placed really bad or in feudal-age when flushing or after castle-age is available | |
#load-if-not-defined POST-IMPERIAL-AGE-START | |
(defrule | |
(or (goal increase-town-size-goal 0) | |
(current-age <= feudal-age)) | |
(building-type-count town-center > 0) | |
(or (and (building-type-count lumber-camp > 0) | |
(dropsite-min-distance wood > 3)) | |
(and (unit-type-count-total villager >= villager-feudal) | |
(building-type-count-total lumber-camp == 0))); debug for no placement | |
(strategic-number sn-camp-max-distance < 35) | |
(can-build lumber-camp) | |
=> | |
(set-strategic-number sn-camp-max-distance 35) | |
(set-strategic-number sn-dropsite-separation-distance 3) | |
(chat-to-player my-player-number "bad lumber camp placement!: camp-max-distance 35") | |
) | |
(defrule | |
; (up-pending-objects c: mining-camp == 0) | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(or (up-compare-goal strategy-goal != flush) | |
(building-type-count-total dock > 0)) | |
(resource-found gold) | |
(strategic-number sn-current-age >= df-transit) | |
(can-build mining-camp) | |
(building-type-count-total mining-camp == 0) | |
=> | |
(set-strategic-number sn-allow-adjacent-dropsites 0) | |
(build mining-camp) | |
) | |
#end-if ; NOT PIDM | |
(defrule | |
; (up-pending-objects c: mining-camp == 0) | |
(strategic-number sn-current-age >= df-transit) | |
(resource-found gold) | |
(goal strategy-goal flush) | |
(or | |
(and | |
(or | |
(building-type-count-total stable > 0) | |
(building-type-count-total archery-range > 1) | |
) | |
(wood-amount > 135) | |
) | |
(and | |
(goal unit-goal militiaman-line) | |
(building-type-count-total barracks > 0) | |
) | |
) | |
(can-build mining-camp) | |
(building-type-count-total mining-camp == 0) | |
=> | |
(set-strategic-number sn-allow-adjacent-dropsites 0) | |
(build mining-camp) | |
) | |
(defrule | |
; (up-pending-objects c: mining-camp == 0) | |
(strategic-number sn-current-age >= feudal) | |
(resource-found gold) | |
(strategic-number sn-minimum-water-body-size-for-dock > water-mixed) | |
(building-type-count-total blacksmith > 0) | |
(building-type-count-total market > 0) | |
(can-build mining-camp) | |
(building-type-count-total mining-camp == 0) | |
=> | |
(set-strategic-number sn-allow-adjacent-dropsites 0) | |
(build mining-camp) | |
) | |
(defrule | |
(up-pending-objects c: mining-camp == 0) | |
(resource-found gold) | |
(or | |
(or | |
(unit-type-count-total 229 >= 1); dead miners detected | |
(unit-type-count-total 221 >= 1) | |
) | |
(strategic-number sn-gold-gatherer-percentage > 30) | |
) | |
(unit-type-count-total villager > 33) | |
(can-build mining-camp) | |
(building-type-count-total mining-camp < 2) | |
=> | |
(set-strategic-number sn-allow-adjacent-dropsites 0) | |
(build mining-camp) | |
(set-strategic-number sn-maximum-stone-drop-distance 40) | |
(set-strategic-number sn-stone-dropsite-distance 40) | |
(set-strategic-number sn-maximum-gold-drop-distance 3) | |
(set-strategic-number sn-gold-dropsite-distance 3) | |
) | |
(defrule | |
(up-pending-objects c: lumber-camp < 1) | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(resource-found wood) | |
(unit-type-count 979 > 0); lumberjack | |
(building-type-count-total lumber-camp < 1) | |
(or | |
(unit-type-count villager > 14) | |
(strategic-number sn-current-age > dark) | |
) | |
(wood-amount > 200) | |
(can-build lumber-camp) | |
=> | |
(set-strategic-number sn-allow-adjacent-dropsites 1) | |
(build lumber-camp) | |
) | |
(defrule | |
(up-pending-objects c: mining-camp < 1) | |
(resource-found gold) | |
(dropsite-min-distance gold > 5);rebuild bad camps | |
(dropsite-min-distance gold < 480) | |
(building-type-count mining-camp > 0) | |
(can-build mining-camp) | |
(or | |
(building-type-count mining-camp < 5) | |
(and | |
(strategic-number sn-camp-max-distance > 45) | |
(dropsite-min-distance gold > 13); don't spam camps if it's in an unreachable spot | |
) | |
) | |
(building-type-count-total mining-camp < 15) | |
=> | |
(set-strategic-number sn-allow-adjacent-dropsites 0) | |
(build mining-camp) | |
(set-strategic-number sn-dropsite-separation-distance 6) | |
) | |
(defrule | |
(up-pending-objects c: mining-camp < 1) | |
(resource-found stone) | |
(dropsite-min-distance stone > 5) | |
(dropsite-min-distance stone < 480) | |
(building-type-count mining-camp > 1) | |
(or | |
(building-type-count mining-camp < 4) | |
(and | |
(strategic-number sn-camp-max-distance > 45) | |
(dropsite-min-distance stone > 13) | |
) | |
) | |
(can-build mining-camp) | |
(strategic-number sn-stone-gatherer-percentage > 0) | |
(building-type-count-total mining-camp < 15) | |
=> | |
(set-strategic-number sn-allow-adjacent-dropsites 0) | |
(build mining-camp) | |
(set-strategic-number sn-dropsite-separation-distance 6) | |
) | |
(defrule | |
(up-pending-objects c: mining-camp < 1) | |
(wood-amount > 200) | |
(dropsite-min-distance gold > 1); build subsequent mining camps to avoid crowd | |
(dropsite-min-distance gold < 480); check for gold still on the map | |
(civilian-population > 80) | |
(game-time < 2400) | |
(can-build mining-camp) | |
(building-type-count-total mining-camp < 5) | |
=> | |
(set-strategic-number sn-allow-adjacent-dropsites 0) | |
(set-strategic-number sn-camp-max-distance 45) | |
(set-strategic-number sn-dropsite-separation-distance 12) | |
(build mining-camp) | |
) | |
#load-if-not-defined WONDER-RACE | |
(defrule | |
(up-pending-objects c: mining-camp < 1) | |
(strategic-number sn-resource-control != battering-ram) | |
(strategic-number sn-resource-control != ri-elite-skirmisher) | |
(or | |
(or | |
(up-research-status c: ri-bow-saw >= research-pending) | |
(building-type-count town-center >= tc-level-three) | |
) | |
(or | |
(strategic-number sn-stone-gatherer-percentage > 0) | |
(wood-amount > 210) | |
) | |
) | |
(stone-amount < 100) | |
(current-age-time > 90) | |
(building-type-count-total mining-camp < 4) | |
(dropsite-min-distance stone > 4) | |
(can-build mining-camp) | |
=> | |
(set-strategic-number sn-allow-adjacent-dropsites 0) | |
(build mining-camp) | |
) | |
#end-if | |
#load-if-defined SARACEN-CIV | |
(defrule | |
(up-pending-objects c: mining-camp < 1) | |
(strategic-number sn-resource-control <= 2) | |
(building-type-count-total market > 0) | |
(building-type-count-total blacksmith > 0) | |
(commodity-selling-price stone > 100) | |
(building-type-count-total mining-camp < 4) | |
(or | |
(and | |
(building-type-count-total mining-camp < 2) | |
(dropsite-min-distance stone > 5) | |
) | |
(and | |
(current-age == castle-age) | |
(building-type-count stable > 1) | |
) | |
) | |
(can-build mining-camp) | |
=> | |
(set-strategic-number sn-allow-adjacent-dropsites 0) | |
(build mining-camp) | |
) | |
#end-if | |
(defrule | |
(up-pending-objects c: mining-camp < 1) | |
(or | |
(goal unit-goal my-unique-unit-line) | |
(goal unit-goal wonder) | |
) | |
(building-type-count-total blacksmith > 0) | |
(building-type-count-total mining-camp == 1) | |
(dropsite-min-distance stone > 3) | |
(can-build mining-camp) | |
=> | |
(set-strategic-number sn-allow-adjacent-dropsites 0) | |
(build mining-camp) | |
) | |
#load-if-not-defined DEATH-MATCH | |
(defrule | |
(or | |
(game-time > 2100) | |
(dropsite-min-distance wood > 15) | |
) | |
(strategic-number sn-camp-max-distance < 60) | |
=> | |
(set-strategic-number sn-camp-max-distance 60) | |
) | |
(defrule | |
(game-time > 2700) | |
(goal ffa-game-goal -1) | |
(goal increase-town-size-goal 0) | |
(strategic-number sn-camp-max-distance < 90) | |
=> | |
(set-strategic-number sn-camp-max-distance 90) | |
) | |
#end-if | |
(defrule | |
(cc-players-unit-type-count 0 tree-class < heavy-wood) | |
(or | |
(game-time > 3600); 60min | |
(death-match-game) | |
) | |
(or | |
(goal ffa-game-goal -1) | |
(game-time > 5400); 90 min | |
) | |
(game-time > 900) | |
(goal increase-town-size-goal 0) | |
(strategic-number sn-camp-max-distance < 144) | |
=> | |
(set-strategic-number sn-camp-max-distance 144) | |
) | |
#load-if-not-defined DIFFICULTY-EASIEST | |
#load-if-not-defined DIFFICULTY-EASY | |
(defrule | |
(up-pending-objects c: lumber-camp < 1) | |
(dropsite-min-distance wood < 480) | |
(dropsite-min-distance wood > 3) | |
(strategic-number sn-current-age >= fc-transit) | |
(can-build lumber-camp) | |
; bug (cc-players-unit-type-count 0 tree-class > 25) | |
=> | |
(set-strategic-number sn-allow-adjacent-dropsites 1) | |
(build lumber-camp) | |
(set-strategic-number sn-dropsite-separation-distance 6) | |
) | |
(defrule | |
(up-pending-objects c: lumber-camp < 1) | |
(unit-type-count villager >= 75) | |
(can-build lumber-camp) | |
(dropsite-min-distance wood >= 0) | |
(dropsite-min-distance wood < 480) | |
(timer-triggered lumber-timer) | |
; bug (cc-players-unit-type-count 0 tree-class > 25) | |
=> | |
(set-strategic-number sn-allow-adjacent-dropsites 1) | |
(build lumber-camp) | |
(enable-timer lumber-timer 180) | |
(set-strategic-number sn-dropsite-separation-distance 4) | |
) | |
(defrule | |
(up-pending-objects c: lumber-camp < 1) | |
(or | |
(unit-type-count-total 219 >= 1) | |
(unit-type-count-total 228 >= 1) | |
) | |
(can-build lumber-camp) | |
(dropsite-min-distance wood > 1) | |
(dropsite-min-distance wood < 480) | |
(timer-triggered lumber-timer) | |
; bug (cc-players-unit-type-count 0 tree-class > 25) | |
=> | |
(set-strategic-number sn-allow-adjacent-dropsites 1) | |
(build lumber-camp) | |
(enable-timer lumber-timer 120) | |
(set-strategic-number sn-dropsite-separation-distance 12) | |
) | |
(defrule | |
(up-pending-objects c: lumber-camp == 0) | |
(resource-found wood) | |
(unit-type-count-total villager >= 10) | |
(dropsite-min-distance wood > 5) | |
(dropsite-min-distance wood < 255) | |
; bug (cc-players-unit-type-count 0 tree-class > 25) | |
(building-type-count-total mill >= 1) | |
(building-type-count-total town-center >= 1) | |
; (strategic-number sn-camp-max-distance < 30) | |
(strategic-number sn-camp-max-distance <= 476) | |
(can-build lumber-camp) | |
=> | |
(set-strategic-number sn-allow-adjacent-dropsites 1) | |
; (set-strategic-number sn-camp-max-distance 30) | |
(up-modify-sn sn-camp-max-distance c:+ 4) | |
(chat-local-to-self "Wood far away: New camp.") | |
(build lumber-camp)) | |
(defrule | |
(building-type-count-total town-center == 1) | |
(or | |
(goal strategy-goal flush) | |
(building-type-count farm > 18) | |
) | |
(building-type-count farm > 15) | |
(building-type-count-total mill < 2) | |
(can-build mill) | |
=> | |
(set-strategic-number sn-allow-adjacent-dropsites 0) | |
(set-strategic-number sn-mill-max-distance 17) | |
(set-strategic-number sn-dropsite-separation-distance 10) | |
(build mill) | |
) | |
(defrule | |
(building-type-count farm > 24) | |
(or | |
(building-type-count farm > 27) | |
(building-type-count-total town-center == 1) | |
) | |
(building-type-count-total mill < 3) | |
(can-build mill) | |
=> | |
(set-strategic-number sn-allow-adjacent-dropsites 0) | |
(set-strategic-number sn-mill-max-distance 20) | |
(set-strategic-number sn-dropsite-separation-distance 10) | |
(set-strategic-number sn-preferred-mill-placement 0) | |
(build mill) | |
) | |
(defrule | |
(building-type-count farm > 33) | |
(or | |
(building-type-count-total mill < 4) | |
(building-type-count farm > 45) | |
) | |
(building-type-count-total mill < 5) | |
(can-build mill) | |
=> | |
(set-strategic-number sn-allow-adjacent-dropsites 0) | |
(set-strategic-number sn-mill-max-distance 23) | |
(set-strategic-number sn-dropsite-separation-distance 10) | |
(build mill) | |
) | |
(defrule | |
(up-pending-objects c: lumber-camp < 1) | |
(resource-found wood) | |
(or (unit-type-count-total 219 >= 1) | |
(unit-type-count-total 228 >= 1)) | |
(or (building-type-count-total blacksmith > 0) | |
(strategic-number sn-current-age >= fc-transit)) | |
(game-time < 1800) | |
(can-build lumber-camp) | |
(building-type-count-total lumber-camp < 5) | |
(strategic-number sn-camp-max-distance <= 35) | |
=> | |
(set-strategic-number sn-allow-adjacent-dropsites 1) | |
(build lumber-camp) | |
(set-strategic-number sn-camp-max-distance 35) | |
(set-strategic-number sn-dropsite-separation-distance 10) | |
(chat-to-player my-player-number "Dead Lumberjacks found, relocate camp!") | |
) | |
#end-if | |
#end-if | |
#load-if-not-defined DIFFICULTY-MODERATE | |
#load-if-not-defined DIFFICULTY-HARD | |
#load-if-not-defined DIFFICULTY-HARDEST | |
(defrule ;build additional lumber camps | |
; (up-pending-objects c: lumber-camp < 1) | |
(resource-found wood) | |
(unit-type-count villager >= 15) | |
(building-type-count-total lumber-camp < 2) | |
(building-type-count-total mill > 0) | |
(can-build lumber-camp) | |
=> | |
(set-strategic-number sn-allow-adjacent-dropsites 1) | |
(build lumber-camp) | |
(set-strategic-number sn-dropsite-separation-distance 3) | |
(set-strategic-number sn-maximum-wood-drop-distance 30) | |
) | |
(defrule | |
(up-pending-objects c: lumber-camp < 1) | |
(dropsite-min-distance wood < 480) | |
(dropsite-min-distance wood > 7); on low difficulty only rebuild really bad camps | |
(timer-triggered lumber-timer) | |
(can-build lumber-camp) | |
; bug (cc-players-unit-type-count 0 tree-class > 25) | |
=> | |
(set-strategic-number sn-allow-adjacent-dropsites 1) | |
(build lumber-camp) | |
(enable-timer lumber-timer 190) | |
) | |
#end-if | |
#end-if | |
#end-if | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(or | |
(strategic-number sn-current-age == dark) | |
(civ-selected japanese) | |
) | |
(or | |
(unit-type-count male-hunter >= 1) | |
(unit-type-count female-hunter >= 1) | |
) | |
(can-build mill) | |
(building-type-count-total mill >= 1) | |
(building-type-count-total lumber-camp >= 1) | |
=> | |
(set-strategic-number sn-allow-adjacent-dropsites 1); test | |
(set-strategic-number sn-mill-max-distance 30) | |
(set-strategic-number sn-preferred-mill-placement 1); mill deer | |
(build mill) | |
(disable-self) | |
) | |
#load-if-not-defined DEATH-MATCH | |
(defrule | |
(strategic-number sn-current-age == dark) | |
(or (unit-type-count villager > 13) | |
(wood-amount >= 130)) | |
(or (unit-type-count villager < 20) | |
(building-type-count-total lumber-camp > 1)) | |
(or (unit-type-count villager < 30) | |
(wood-amount >= 130)) | |
(idle-farm-count < 1) | |
(building-type-count-total lumber-camp > 0) | |
=> | |
(set-goal farm-goal 1) | |
) | |
(defrule | |
(strategic-number sn-current-age == df-transit) | |
(wood-amount >= 385);175stable+150bs+60farm | |
(idle-farm-count < 1) | |
(building-type-count-total lumber-camp > 0) | |
=> | |
(set-goal farm-goal 1) | |
) | |
(defrule | |
(strategic-number sn-current-age == feudal) | |
(building-type-count-total market >= 1) | |
(or (building-type-count-total blacksmith >= 1) | |
(wood-amount >= 210)); test | |
(wood-amount >= 120) | |
(idle-farm-count < 1) | |
(building-type-count-total lumber-camp > 0) | |
=> | |
(set-goal farm-goal 1) | |
) | |
#end-if ; NOT DM | |
#load-if-not-defined WONDER-RACE | |
(defrule | |
(goal strategy-goal sling) | |
(strategic-number sn-current-age >= feudal) | |
(or (not (research-available ri-horse-collar)) | |
(research-completed ri-horse-collar)); just to be sure | |
(idle-farm-count < 2) | |
=> | |
(set-goal farm-goal 1) | |
) | |
(defrule | |
(goal strategy-goal flush) | |
(strategic-number sn-current-age == feudal) | |
(or (or (and (building-type-count-total archery-range > 1) | |
(building-type-count-total blacksmith > 0)) | |
(goal unit-goal militiaman-line)) | |
(building-type-count-total stable > 0)) | |
(building-type-count-total archery-range > 0) | |
=> | |
(set-goal farm-goal 1) | |
) | |
(defrule | |
(or (goal strategy-goal flush) | |
(food-amount < 400)) | |
(strategic-number sn-current-age == feudal) | |
(strategic-number sn-minimum-water-body-size-for-dock == water-islands) | |
(up-compare-goal position-goal == flank); hm | |
(idle-farm-count < 1) | |
(wood-amount > 150) | |
=> | |
(set-goal strategy-goal flush) | |
(set-goal farm-goal 1) | |
) | |
(defrule | |
(strategic-number sn-current-age == fc-transit) | |
(not (research-available ri-horse-collar)) | |
(or (or (building-type-count-total archery-range > 2) | |
(building-type-count-total stable > 1)) | |
(and (goal unit-goal eagle-warrior) | |
(building-type-count-total barracks > 0))) | |
(idle-farm-count < 2) | |
=> | |
(set-goal farm-goal 1) | |
) | |
(defrule | |
(strategic-number sn-current-age == fc-transit) | |
(up-research-status c: ri-horse-collar >= research-pending) | |
(building-type-count-total farm < farm-count) | |
(nor (or (goal unit-goal my-unique-unit-line); delay farms until castle age to have more workers for the castle with uu startegy | |
(goal control-goal shot)); get food from ally | |
(or (goal unit-goal knight); use rule above | |
(goal unit-goal default-ranged))) | |
(idle-farm-count < 2) | |
=> | |
(set-goal farm-goal 1) | |
) | |
#load-if-not-defined SARACEN-CIV ;buy food with them instead of farming | |
(defrule | |
(strategic-number sn-current-age == feudal) | |
(or (and (goal strategy-goal rush) | |
(building-type-count-total blacksmith > 0)) | |
(game-time > 1200)) | |
(not (goal unit-goal my-unique-unit-line)) | |
(idle-farm-count < 2) | |
=> | |
(set-goal farm-goal 1) | |
) | |
(defrule | |
(strategic-number sn-current-age == fc-transit) | |
(building-type-count-total blacksmith > 0) | |
(or (or (goal unit-goal mix) | |
(goal unit-goal skirmisher)) | |
(and (goal strategy-goal boom) | |
(up-research-status c: ri-horse-collar >= research-pending))) | |
(building-type-count-total farm < 14) | |
=> | |
(set-goal farm-goal 1) | |
) | |
(defrule | |
(building-type-count town-center >= 1) | |
(strategic-number sn-current-age >= castle) | |
(or (idle-farm-count < 2) | |
(or (building-type-count-total town-center >= tc-level-three) | |
(and (building-type-count-total town-center >= tc-level-two) | |
(or (wood-amount > 335); 275 for 3rd TC + 60 | |
(goal strategy-goal boom))))); build as many farms as possible after 2nd TC | |
=> | |
(set-goal farm-goal 1) | |
) | |
#else | |
(defrule | |
(building-type-count town-center >= 1) | |
(strategic-number sn-current-age >= castle) | |
(or (idle-farm-count < 2) | |
(building-type-count-total town-center >= tc-level-three)) | |
(or (or (commodity-buying-price food > 130) | |
(commodity-selling-price stone < 100)) | |
(or (or (goal strategy-goal boom) | |
(building-type-count farm < 8)) | |
(game-time > 1800))) | |
=> | |
(set-goal farm-goal 1) | |
) | |
#end-if ;SARACEN-CIV | |
#end-if ;no WONDER-RACE | |
(defrule | |
(or (and (strategic-number sn-current-age > feudal) | |
(building-type-count-total farm < 8)) | |
(and (building-type-count-total lumber-camp > 1) | |
(building-type-count-total farm < 4))); test | |
(food-amount < 50) | |
(idle-farm-count <= 0) | |
(building-type-count-total lumber-camp > 0) | |
=> | |
(set-goal farm-goal 1)) | |
(defrule | |
(strategic-number current-age == castle) | |
(or (goal strategy-goal fast-imp) | |
(goal strategy-goal boom)) | |
(not (research-available imperial-age)) | |
(wood-amount < 200) | |
(food-amount > 400) | |
(gold-amount > 400) | |
=> | |
(set-goal farm-goal 0) | |
) | |
#load-if-not-defined TURKISH-CIV | |
(defrule | |
(strategic-number current-age >= ci-transit) | |
(goal unit-goal gunpowder-class) | |
(building-type-count-total university == 0) | |
(not (research-completed ri-chemistry)) | |
(wood-amount < 200) | |
=> | |
(set-goal farm-goal 0) | |
) | |
#end-if | |
(defrule | |
(or (unit-type-count female-forager > 0) | |
(unit-type-count male-forager > 0)) | |
(building-type-count mill == 1) | |
(sheep-and-forage-too-far); save for 2nd mill on maps with more berries, eg. yucatan | |
(wood-amount < 100) | |
=> | |
(set-goal farm-goal 0) | |
) | |
(defrule | |
(goal farm-goal 1) | |
(current-age == dark-age) | |
(strategic-number sn-minimum-water-body-size-for-dock == water-islands) | |
(or (wood-amount < 210); place farms only if still enough wood left for dock | |
(and (building-type-count-total dock > 0) | |
(wood-amount < 135))) | |
=> | |
(set-goal farm-goal 0) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock == water-islands) | |
(or (and (strategic-number sn-current-age == df-transit) | |
(or (unit-type-count male-hunter > 0) | |
(unit-type-count female-hunter > 0))) | |
(or (and (current-age == feudal-age) | |
(up-compare-goal strategy-goal != flush)) | |
(and (current-age >= castle-age) | |
(idle-farm-count > 2)))) | |
=> | |
(set-goal farm-goal 0) | |
) | |
(defrule | |
(strategic-number sn-current-age == df-transit) | |
(wood-amount < 435); feudal buildings + (wheelbarrow) + farm | |
(or (building-type-count farm >= 4) | |
(idle-farm-count >= 1)); probably not necessary, but meh | |
(up-compare-goal farm-goal != 0) | |
=> | |
(set-goal farm-goal 0) | |
) | |
(defrule; esp for 'easiest' difficulty with barely any woodcutters | |
(strategic-number sn-current-age == feudal) | |
(building-type-count-total blacksmith < 1) | |
(wood-amount < 185); 150/160 | |
(or (building-type-count farm >= 4) | |
(idle-farm-count >= 1)); probably not necessary, but meh | |
(up-compare-goal farm-goal != 0) | |
=> | |
(set-goal farm-goal 0) | |
) | |
#load-if-defined POST-IMPERIAL-AGE-START | |
(defrule | |
(game-time < 480) | |
(or (death-match-game) | |
(game-time < 300)) | |
=> | |
(set-goal farm-goal 0) | |
) | |
#end-if | |
(defrule | |
(strategic-number sn-current-age == dark) | |
(or (or (map-type yucatan) | |
(and (building-type-count-total farm > 5) | |
(idle-farm-count > 0))) | |
(and (and (dropsite-min-distance deer-hunting > 15); deer found but not very close => save for hunting mill | |
(dropsite-min-distance deer-hunting < 32)) | |
(unit-type-count-total villager > 22))) | |
(wood-amount < 120); sometimes there was still no hunting | |
=> | |
(set-goal farm-goal 0) | |
) | |
(defrule | |
(or (and (strategic-number sn-minimum-water-body-size-for-dock >= water-mixed) | |
(and (current-age == dark-age) | |
(wood-amount < 210))); place farms only if still enough wood left for dock | |
(wood-amount < farm-wood)) | |
(goal farm-goal 1) | |
=> | |
(set-goal farm-goal 0) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock >= water-mixed) | |
(strategic-number sn-current-age == dark) | |
(wood-amount >= 250); high wood because dock was delayed for long | |
(goal farm-goal 1) | |
=> | |
(set-goal farm-goal 2); allow placing many farms, probably failed dock placement | |
) | |
(defrule | |
(strategic-number sn-current-age == df-transit) | |
(unit-type-count villager >= 30) | |
(unit-type-count villager > dark-age-villager) | |
(building-type-count-total farm < 12) | |
(or (building-type-count-total barracks > 0) | |
(civ-selected saracen)) | |
(or (wood-amount >= 385); feudal buildings + farm | |
(food-amount < 400)) | |
(or (goal strategy-goal rush) | |
(goal strategy-goal boom)) | |
(idle-farm-count < 1) | |
(food-amount < 600) | |
=> | |
(set-goal farm-goal 1) | |
) | |
(defrule | |
(goal farm-goal 1) | |
(idle-farm-count > 2) | |
=> | |
(set-goal farm-goal 0) | |
) | |
(defrule | |
(goal farm-goal 1) | |
(or (and (building-type-count-total monastery > 0) | |
(building-type-count-total town-center >= tc-level-three)) | |
(and (wood-amount > 120) | |
(and (building-type-count-total stable > 1) | |
(or (goal control-goal aggressive-rush) | |
(building-type-count town-center >= tc-level-two))))) | |
=> | |
(set-goal farm-goal 2) | |
) | |
(defrule | |
(or (strategic-number sn-current-age == dark) | |
(and (and (strategic-number sn-current-age == df-transit) | |
(wood-amount >= 435)); feudal buildings + (wheelbarrow) + farm | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed))) | |
(wood-amount >= 130) | |
(or (and (unit-type-count villager > 20) | |
(building-type-count-total lumber-camp > 1)) | |
(strategic-number sn-minimum-water-body-size-for-dock >= water-mixed)); fix if no docks could be placed | |
(can-build farm) | |
(goal farm-goal 1) | |
=> | |
(set-goal farm-goal 2) | |
) | |
(defrule | |
(wood-amount > 200) | |
(strategic-number sn-current-age == feudal) | |
(goal strategy-goal flush) | |
(current-age-time > 180); don't spend all wood into farms at the start of the age | |
(can-build farm) | |
(goal farm-goal 1) | |
=> | |
(set-goal farm-goal 2) | |
) | |
#load-if-not-defined WONDER-RACE | |
#load-if-not-defined POPULATION-CAP-25 | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock == water-mixed) | |
(players-unit-type-count every-enemy longboat-line == 0) | |
(players-unit-type-count every-enemy galley-line == 0) | |
(players-unit-type-count every-enemy fire-ship-line == 0) | |
(building-type-count-total dock > 0) | |
=> | |
(up-jump-rule 5) | |
) | |
(defrule | |
(goal position-goal flank) | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(building-type-count barracks < 3) | |
(building-type-count archery-range < 1) | |
(building-type-count stable < 1) | |
(building-type-count castle < 1) | |
(building-type-count siege-workshop < 2) | |
(building-type-count monastery < 2) | |
(wood-amount < 250) | |
(players-building-type-count target-player dock < 3) | |
(strategic-number sn-current-age < ci-transit) | |
(building-type-count-total dock >= 1); ! | |
=> | |
(up-jump-rule 4)) | |
(defrule | |
(goal save-wood-goal 0) | |
(goal enemy-boats-goal 1) | |
(building-type-count-total blacksmith > 0) | |
(building-type-count-total dock < 5) | |
(or (stone-amount < 200) | |
(building-type-count-total dock < 1)) | |
(or (building-type-count-total dock < 2) | |
(civilian-population > 60)) | |
(or (building-type-count-total dock < 4) | |
(civilian-population > 80)) | |
(can-build dock) | |
=> | |
(build dock) | |
) | |
(defrule | |
(goal save-wood-goal 0) | |
(strategic-number sn-current-age == dark) | |
(strategic-number sn-minimum-water-body-size-for-dock >= water-mixed) | |
(building-type-count-total lumber-camp > 0); fish boom instead of farming is better with UP | |
(building-type-count-total mill > 0) | |
(building-type-count-total dock < 2) | |
(or (building-type-count-total dock < 1) | |
(and (unit-type-count-total villager > 28); high villager => low food | |
(food-amount < 400))); probably stupid stuff happened like fishing ship going to the exact opposite side to fish (rarely) | |
(can-build dock) | |
=> | |
(build dock) | |
) | |
(defrule | |
(strategic-number sn-current-age < fc-transit) | |
(strategic-number sn-current-age >= df-transit) | |
(strategic-number sn-minimum-water-body-size-for-dock >= water-mixed) | |
(goal save-wood-goal 0) | |
(goal enemy-boats-goal 1) | |
(wood-amount > 400) | |
(food-amount < 550); less food to even place a blacksmith, mainly on poor maps with bugged fishing near mill. | |
(can-build dock) | |
(building-type-count-total dock < 2) | |
=> | |
(build dock) | |
) | |
(defrule | |
(strategic-number sn-current-age >= df-transit) | |
(or (strategic-number sn-minimum-water-body-size-for-dock == water-islands) | |
(or (players-unit-type-count any-enemy galley-line > 0) | |
(players-unit-type-count any-enemy fire-ship-line > 0))) | |
(goal save-wood-goal 0) | |
(building-type-count-total dock < 3) | |
(or (goal strategy-goal flush) | |
(building-type-count-total blacksmith > 0)) | |
(can-build dock) | |
=> | |
(build dock) | |
) | |
#end-if | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock == water-islands) | |
(or (building-type-count-total blacksmith > 0) | |
(starting-age == post-imperial-age)) | |
(building-type-count-total dock < 9) | |
(or (building-type-count-total dock < 3) | |
(building-type-count-total town-center >= tc-level-two)) | |
(or (building-type-count-total dock < 4) | |
(or (civilian-population > 80) | |
(death-match-game))) | |
(can-build dock) | |
=> | |
(build dock) | |
) | |
(defrule | |
(or (and (goal control-goal aggressive-rush) | |
(goal unit-goal knight)) | |
(goal unit-goal skirmisher)) | |
=> | |
(up-jump-rule 1) | |
) | |
(defrule | |
(current-age-time < 300) | |
(current-age == castle-age) | |
(building-type-count monastery == 1) | |
(strategic-number sn-resource-control <= 2) | |
(unit-type-count-total monk == 0) | |
(unit-type-count-total 134 == 0); dead monk | |
(unit-type-count-total 286 == 0); monk with relic | |
(building-type-count-total market == 0) | |
(cc-players-unit-type-count 0 relic > 0) | |
(gold-amount < 100) | |
=> | |
(set-strategic-number sn-resource-control monk) | |
;debug (chat-to-player my-player-number "Saving resources for monk") | |
) | |
(defrule | |
(current-age-time < 300) | |
(building-type-count monastery == 1) | |
(strategic-number sn-resource-control <= 2) | |
(unit-type-count-total monk == 0) | |
(unit-type-count-total 134 == 0); dead monk | |
(goal control-goal aggressive-rush) | |
(goal unit-goal knight) | |
(or | |
(strategic-number sn-cavalry-threat > 0); still get a monk if enemy is krushing, as they're good vs cavalry | |
(goal enemy-goal skirmisher); enemy spam trash so it's not likely we're going to attack quick | |
) | |
(cc-players-unit-type-count 0 relic > 0) | |
(gold-amount < 100) | |
=> | |
(set-strategic-number sn-resource-control monk) | |
;debug (chat-to-player my-player-number "Saving resources for monk") | |
) | |
(defrule | |
(strategic-number sn-resource-control == monk) | |
(or | |
(and | |
(unit-type-count female-gold-miner == 0) | |
(unit-type-count male-gold-miner == 0) | |
) | |
(and | |
(or | |
(town-under-attack) | |
(strategic-number sn-military-level < 0) | |
) | |
(strategic-number sn-military-level < 1) | |
) | |
) | |
=> | |
(set-strategic-number sn-resource-control 0) | |
) | |
(defrule | |
(current-age >= feudal-age); test | |
(strategic-number sn-camp-max-distance < 30) | |
=> | |
(set-strategic-number sn-camp-max-distance 30)) | |
(defrule | |
(or (game-time > 1640) | |
(building-type-count-total town-center >= 3)) | |
(or (game-time > 1200) | |
(and (goal under-attack-goal 0) | |
(strategic-number sn-military-level >= 1))) | |
(strategic-number sn-camp-max-distance < 40) | |
=> | |
(set-strategic-number sn-camp-max-distance 40)) | |
(defrule | |
(or (game-time > 3000) | |
(and (game-time > 2100) | |
(strategic-number sn-military-level >= 2))) | |
(strategic-number sn-military-level >= 0) | |
(strategic-number sn-camp-max-distance < 70) | |
=> | |
(set-strategic-number sn-camp-max-distance 70)) | |
(defrule | |
(game-time > 3150) | |
(or (game-time > 7800) | |
(or (strategic-number sn-military-level >= 2) | |
(up-compare-goal attack-goal >= 1))) | |
(or (population >= del-civ-pop) | |
(strategic-number sn-current-age >= imperial)) | |
(strategic-number sn-camp-max-distance < 100) | |
=> | |
(set-strategic-number sn-camp-max-distance 100)) | |
(defrule | |
(game-time > 3600) | |
(or (game-time > 12600) | |
(or (strategic-number sn-military-level >= 3) | |
(up-compare-goal attack-goal >= 1))) | |
(population >= del-civ-pop) | |
(strategic-number sn-camp-max-distance < 255) | |
=> | |
(set-strategic-number sn-camp-max-distance 255)) | |
(defrule | |
(game-time > 7200) | |
(or (game-time > 18000) | |
(or (strategic-number sn-military-level >= 3) | |
(up-compare-goal attack-goal >= 1))) | |
(population >= del-civ-pop) | |
(strategic-number sn-camp-max-distance < 480) | |
=> | |
(set-strategic-number sn-camp-max-distance 480)) | |
(defrule | |
(or (game-time > 1320) | |
(and (game-time > 1050) | |
(strategic-number sn-military-level >= 1))) | |
(or (strategic-number sn-maximum-wood-drop-distance < 22) | |
(strategic-number sn-maximum-food-drop-distance < 22)) | |
=> | |
;extend walking distances | |
(set-strategic-number sn-maximum-wood-drop-distance 22) | |
(set-strategic-number sn-maximum-food-drop-distance 22) | |
(set-strategic-number sn-maximum-hunt-drop-distance 24) | |
(set-strategic-number sn-maximum-gold-drop-distance 10) | |
(set-strategic-number sn-maximum-stone-drop-distance 14)) | |
(defrule | |
(or (game-time > 3000) | |
(and (game-time > 2400) | |
(strategic-number sn-military-level >= 1))) | |
(or (strategic-number sn-maximum-wood-drop-distance < 25) | |
(strategic-number sn-maximum-food-drop-distance < 25)) | |
=> | |
(set-strategic-number sn-maximum-wood-drop-distance 25) | |
(set-strategic-number sn-maximum-food-drop-distance 25) | |
(set-strategic-number sn-maximum-hunt-drop-distance 25) | |
(set-strategic-number sn-maximum-gold-drop-distance 11) | |
(set-strategic-number sn-maximum-stone-drop-distance 15)) | |
(defrule | |
(or (game-time > 3900) | |
(and (game-time > 3300) | |
(strategic-number sn-military-level >= 1))) | |
(or (strategic-number sn-maximum-wood-drop-distance < 30) | |
(strategic-number sn-maximum-food-drop-distance < 30)) | |
=> | |
(set-strategic-number sn-maximum-wood-drop-distance 30) | |
(set-strategic-number sn-maximum-food-drop-distance 30) | |
(set-strategic-number sn-maximum-hunt-drop-distance 26) | |
(set-strategic-number sn-maximum-gold-drop-distance 13) | |
(set-strategic-number sn-maximum-stone-drop-distance 16)) | |
(defrule | |
(or (game-time > 5100) | |
(and (game-time > 4500) | |
(strategic-number sn-military-level >= 2))) | |
(or (strategic-number sn-maximum-wood-drop-distance < 35) | |
(strategic-number sn-maximum-food-drop-distance < 35)) | |
=> | |
(set-strategic-number sn-maximum-wood-drop-distance 35) | |
(set-strategic-number sn-maximum-food-drop-distance 35) | |
(set-strategic-number sn-maximum-hunt-drop-distance 27) | |
(set-strategic-number sn-maximum-gold-drop-distance 16) | |
(set-strategic-number sn-maximum-stone-drop-distance 18)) | |
(defrule | |
(or (game-time > 7800) | |
(and (game-time > 7200) | |
(strategic-number sn-military-level >= 2))) | |
(or (strategic-number sn-maximum-wood-drop-distance < 40) | |
(strategic-number sn-maximum-food-drop-distance < 40)) | |
=> | |
(set-strategic-number sn-maximum-wood-drop-distance 40) | |
(set-strategic-number sn-maximum-food-drop-distance 40) | |
(set-strategic-number sn-maximum-hunt-drop-distance 28) | |
(set-strategic-number sn-maximum-gold-drop-distance 18) | |
(set-strategic-number sn-maximum-stone-drop-distance 19)) | |
(defrule | |
(or (game-time > 10200) | |
(and (game-time > 9600) | |
(strategic-number sn-military-level >= 2))) | |
(or (strategic-number sn-maximum-wood-drop-distance < 60) | |
(strategic-number sn-maximum-food-drop-distance < 50)) | |
=> | |
(set-strategic-number sn-maximum-wood-drop-distance 60) | |
(set-strategic-number sn-maximum-food-drop-distance 50) | |
(set-strategic-number sn-maximum-hunt-drop-distance 30) | |
(set-strategic-number sn-maximum-gold-drop-distance 22) | |
(set-strategic-number sn-maximum-stone-drop-distance 22)) | |
(defrule | |
(or (game-time > 12600) | |
(and (game-time > 12000) | |
(strategic-number sn-military-level >= 2))) | |
(or (strategic-number sn-maximum-wood-drop-distance < 255) | |
(strategic-number sn-maximum-food-drop-distance < 60)) | |
=> | |
(set-strategic-number sn-maximum-wood-drop-distance 255) | |
(set-strategic-number sn-maximum-food-drop-distance 60) | |
(set-strategic-number sn-maximum-hunt-drop-distance 60) | |
(set-strategic-number sn-maximum-gold-drop-distance 25) | |
(set-strategic-number sn-maximum-stone-drop-distance 25)) | |
(defrule | |
(or (game-time > 18000) | |
(and (game-time > 14400) | |
(strategic-number sn-military-level >= 3))) | |
(or (strategic-number sn-maximum-wood-drop-distance < 480) | |
(strategic-number sn-maximum-food-drop-distance < 75)) | |
=> | |
(set-strategic-number sn-maximum-wood-drop-distance 480) | |
(set-strategic-number sn-maximum-food-drop-distance 75) | |
(set-strategic-number sn-maximum-hunt-drop-distance 75) | |
(set-strategic-number sn-maximum-gold-drop-distance 40) | |
(set-strategic-number sn-maximum-stone-drop-distance 40)) | |
; ********** RESEARCH ********** | |
(defrule | |
(or | |
(strategic-number sn-resource-control <= 2) | |
(goal train-civ-goal ri-chain-barding) | |
) | |
(or | |
(unit-type-count cavalry-unit-class > mid-min-number-upgrade) | |
(and | |
(or | |
(civ-selected saracen) | |
(goal control-goal shot) | |
) | |
(goal unit-goal knight) | |
) | |
) | |
(can-research-with-escrow ri-chain-barding) | |
=> | |
(release-escrow food)(release-escrow gold) | |
(research ri-chain-barding) | |
) | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(can-research ri-bow-saw) | |
(goal train-civ-goal 1) | |
(or (goal position-goal pocket) | |
(or (current-age-time > 120) | |
(or (goal unit-goal my-unique-unit-line) | |
(or (goal unit-goal skirmisher) | |
(unit-type-count-total villager >= 55))))) | |
(up-compare-goal strategy-goal != fast-imp) | |
; test (building-type-count-total monastery > 0) | |
=> | |
(research ri-bow-saw) | |
) | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(can-research ri-bow-saw) | |
(goal train-civ-goal 1) | |
(or (and (goal strategy-goal fast-imp) | |
(or (strategic-number sn-current-age >= ci-transit) | |
(unit-type-count villager > 40))) | |
(goal strategy-goal boom)) | |
=> | |
(research ri-bow-saw) | |
) | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(goal train-civ-goal 1) | |
(or | |
(or | |
(goal position-goal pocket) | |
(goal strategy-goal boom) | |
) | |
(or | |
(current-age-time > 120) | |
(goal unit-goal my-unique-unit-line) | |
) | |
) | |
(nand | |
(goal unit-goal default-ranged) | |
(research-available ri-bodkin-arrow) | |
) | |
(can-research ri-heavy-plow) | |
=> | |
(research ri-heavy-plow) | |
) | |
(defrule | |
(nand | |
(research-available ri-war-galley) | |
(civ-selected viking) | |
) | |
(warboat-count > 12) | |
(goal enemy-boats-goal 1) | |
(or | |
(strategic-number sn-resource-control < 2) | |
(players-unit-type-count any-enemy galley-line > 0) | |
) | |
(can-research ri-careening) | |
=> | |
(research ri-careening) | |
) | |
(defrule | |
(or | |
(up-research-status c: ri-bow-saw >= research-pending) | |
(or | |
(civ-selected viking) | |
(unit-type-count galley-line > 4) | |
) | |
) | |
(can-research-with-escrow ri-war-galley) | |
=> | |
(release-escrow food)(release-escrow gold) | |
(research ri-war-galley) | |
) | |
(defrule | |
(can-research-with-escrow ri-fast-fire-ship) | |
=> | |
(release-escrow wood)(release-escrow gold) | |
(set-escrow-percentage wood 0)(set-escrow-percentage gold 0) | |
(research ri-fast-fire-ship) | |
) | |
(defrule | |
(can-research-with-escrow ri-galleon) | |
=> | |
(release-escrow wood)(release-escrow food) | |
(set-escrow-percentage wood 0)(set-escrow-percentage food 0) | |
(research ri-galleon) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock == water-islands) | |
(research-available ri-galleon) | |
(building-type-count dock > 0) | |
=> | |
(set-escrow-percentage wood 20)(set-escrow-percentage food 20) | |
(set-goal escrow-purpose-goal navy) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock == water-islands) | |
(research-available ri-fast-fire-ship) | |
(building-type-count dock > 0) | |
=> | |
(set-escrow-percentage wood 20)(set-escrow-percentage gold 20) | |
(set-goal escrow-purpose-goal navy) | |
) | |
(defrule | |
(strategic-number sn-resource-control < 2) | |
(nor | |
(research-available ri-fast-fire-ship) | |
(research-available ri-galleon) | |
) | |
(research-available ri-cannon-galleon) | |
(unit-type-count warship-class > 30) | |
(strategic-number sn-military-level >= 0) | |
(players-unit-type-count every-enemy galley-line < 20) | |
(players-unit-type-count every-enemy fire-ship-line < 20) | |
(players-building-type-count any-enemy castle > 0) | |
(building-type-count dock > 0) | |
=> | |
(set-escrow-percentage wood 20)(set-escrow-percentage food 20) | |
(set-goal escrow-purpose-goal navy) | |
(set-strategic-number sn-resource-control navy) | |
(up-jump-rule 1) | |
) | |
(defrule | |
(goal escrow-purpose-goal navy) | |
(or | |
(nor | |
(research-available ri-fast-fire-ship) | |
(research-available ri-galleon) | |
) | |
(building-type-count dock == 0) | |
) | |
=> | |
(set-goal escrow-purpose-goal 0) | |
(release-escrow wood)(release-escrow food)(release-escrow gold) | |
(set-escrow-percentage wood 0)(set-escrow-percentage food 0)(set-escrow-percentage gold 0) | |
) | |
(defrule | |
(nor | |
(research-available ri-galleon) | |
(research-available ri-fast-fire-ship) | |
) | |
(can-research-with-escrow ri-cannon-galleon) | |
=> | |
(release-escrow food)(release-escrow wood) | |
(research ri-cannon-galleon) | |
) | |
(defrule | |
(nor | |
(research-available ri-galleon) | |
(research-available ri-fast-fire-ship) | |
) | |
(or | |
(can-research-with-escrow ri-shipwright) | |
(or | |
(can-research-with-escrow ri-dry-dock) | |
(can-research-with-escrow ri-deck-guns) | |
) | |
) | |
=> | |
(release-escrow food)(release-escrow gold) | |
(research ri-shipwright) | |
(research ri-dry-dock) | |
(research ri-deck-guns) | |
) | |
(defrule | |
(strategic-number sn-resource-control <= 1) | |
(building-type-count-total town-center > 0) | |
(or | |
(goal strategy-goal sling) | |
(or | |
(strategic-number sn-current-age >= fc-transit) | |
(goal strategy-goal flush) | |
) | |
) | |
(nand | |
(goal unit-goal my-unique-unit-line) | |
(research-available ri-stone-mining) | |
) | |
(can-research ri-double-bit-axe) | |
=> | |
(research ri-double-bit-axe) | |
) | |
#load-if-not-defined SARACEN-CIV | |
(defrule | |
(strategic-number sn-resource-control <= 1) | |
(building-type-count-total town-center > 0) | |
(strategic-number sn-current-age >= fc-transit) | |
(nand (goal unit-goal my-unique-unit-line) | |
(research-available ri-stone-mining)) | |
(or (strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(up-research-status c: ri-bow-saw >= research-pending)) | |
(can-research ri-horse-collar) | |
=> | |
(research ri-horse-collar) | |
) | |
#else | |
(defrule | |
(strategic-number sn-resource-control <= 1) | |
(strategic-number sn-current-age >= fc-transit) | |
(or | |
(or | |
(commodity-selling-price stone < 100) | |
(commodity-buying-price food > 130) | |
) | |
(or | |
(dropsite-min-distance stone > 5) | |
(or | |
(strategic-number sn-stone-gatherer-percentage == 0) | |
(goal strategy-goal boom) | |
) | |
) | |
) | |
(or | |
(building-type-count-total barracks > 0) | |
(goal unit-goal my-unique-unit-line) | |
) | |
(can-research ri-horse-collar) | |
=> | |
(research ri-horse-collar) | |
) | |
#end-if | |
(defrule | |
(strategic-number sn-resource-control <= 1) | |
(building-type-count-total town-center > 0) | |
(or | |
(and | |
(goal strategy-goal flush) | |
(or | |
(not (research-available ri-man-at-arms)) | |
(or | |
(building-type-count-total archery-range > 1) | |
(building-type-count-total stable > 0) | |
) | |
) | |
) | |
(goal strategy-goal sling) | |
) | |
(can-research ri-horse-collar) | |
=> | |
(research ri-horse-collar) | |
) | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(civilian-population >= 42) | |
(or | |
(and | |
(goal strategy-goal flush) | |
(or | |
(and | |
(food-amount > 600) | |
(gold-amount < 75) | |
) | |
(goal unit-goal archer) | |
) | |
) | |
(goal strategy-goal sling) | |
) | |
(can-research ri-gold-mining) | |
=> | |
(research ri-gold-mining) | |
) | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(or | |
(or | |
(strategic-number sn-gold-gatherer-percentage >= 20) | |
(or | |
(and | |
(goal unit-goal knight) | |
(up-compare-goal position-goal == flank) | |
) | |
(goal unit-goal monk) | |
) | |
) | |
(civilian-population >= 50) | |
) | |
(strategic-number sn-current-age >= fc-transit) | |
(can-research ri-gold-mining) | |
=> | |
(research ri-gold-mining) | |
) | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(or | |
(or | |
(or | |
(unit-type-count cavalry-unit-class > low-min-number-upgrade) | |
(unit-type-count cavalry-archer-class > low-min-number-upgrade) | |
) | |
(strategic-number sn-current-age >= ci-transit) | |
) | |
(or | |
(unit-type-count scout-cavalry > mid-min-number-upgrade);scouts do not count as cavalry-unit-class(!) | |
(unit-type-count conquistador-line > mid-min-number-upgrade) | |
) | |
) | |
(can-research ri-bloodlines) | |
=> | |
(research ri-bloodlines) | |
) | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(strategic-number sn-current-age >= fc-transit) | |
(or | |
(goal unit-goal knight) | |
(goal unit-goal cavalry-archer) | |
) | |
(up-compare-goal strategy-goal != boom) | |
(can-research ri-bloodlines) | |
=> | |
(research ri-bloodlines) | |
) | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(or | |
(unit-type-count infantry-class > mid-min-number-upgrade) | |
(and | |
(goal unit-goal eagle-warrior) | |
(building-type-count-total barracks > 0); don't research too early on islands | |
) | |
) | |
(or | |
(and | |
(strategic-number sn-current-age >= fc-transit) | |
(up-research-status c: ri-gold-mining >= research-pending) | |
) | |
(or | |
(goal hostilities-goal 1) | |
(death-match-game) | |
) | |
) | |
(can-research ri-scale-mail) | |
=> | |
(research ri-scale-mail) | |
) | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(or | |
(or | |
(unit-type-count cavalry-unit-class > low-min-number-upgrade) | |
(unit-type-count scout-cavalry > mid-min-number-upgrade) | |
) | |
(and | |
(building-type-count-total stable > 1) | |
(food-amount > 300) | |
) | |
) | |
(strategic-number sn-current-age >= fc-transit) | |
(can-research ri-scale-barding) | |
=> | |
(research ri-scale-barding) | |
) | |
(defrule | |
(or | |
(and | |
(strategic-number sn-resource-control <= 2) | |
(or | |
(or | |
(and | |
(building-type-count-total siege-workshop > 0) | |
(nand | |
(goal enemy-goal eagle-warrior) | |
(strategic-number sn-archer-threat == 0) | |
) | |
) | |
(strategic-number sn-archer-threat >= 1) | |
) | |
(unit-type-count-total skirmisher-line > mid-min-number-upgrade) | |
) | |
) | |
(strategic-number sn-resource-control == ri-elite-skirmisher) | |
) | |
(can-research ri-elite-skirmisher) | |
=> | |
(research ri-elite-skirmisher) | |
) | |
(defrule | |
(or | |
(or | |
(unit-type-count eagle-warrior-line > 11) | |
(and | |
(not (civ-selected aztec)) | |
(current-age-time >= 300) | |
) | |
) | |
(goal unit-goal eagle-warrior) | |
) | |
(can-research-with-escrow ri-elite-eagle-warrior) | |
=> | |
(release-escrow food)(release-escrow gold) | |
(set-escrow-percentage food 0)(set-escrow-percentage gold 0) | |
(research ri-elite-eagle-warrior) | |
) | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(or | |
(unit-type-count monk > 4) | |
(and | |
(goal enemy-goal flush) | |
(goal ranged-unit-type-goal monk) | |
) | |
) | |
=> | |
(research ri-sanctity) | |
(research ri-theocracy) | |
(research ri-illumination) | |
(research ri-block-printing) | |
) | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(up-research-status c: ri-sanctity >= research-pending) | |
(unit-type-count monk > 4) | |
(or | |
(civ-selected aztec); bugged, movement speed bonus only counts for monks with relics in 1.0c | |
(goal aofe-game-goal 1); bug is fixed in AoFE | |
) | |
(can-research ri-fervor) | |
=> | |
(research ri-fervor) | |
) | |
#load-if-defined AZTEC-CIV | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(up-research-status c: ri-sanctity >= research-pending) | |
(unit-type-count monk > 4) | |
(can-research ri-fervor) | |
=> | |
(research ri-fervor) | |
) | |
(defrule | |
(strategic-number sn-resource-control < 1) | |
(building-type-count-total monastery > 2) | |
(unit-type-count monk > 19) | |
(current-age == imperial-age) | |
(population >= max-pop) | |
(can-research ri-herbal-medicine) | |
=> | |
(research ri-herbal-medicine) | |
) | |
#end-if | |
(defrule | |
(strategic-number sn-resource-control < 1) | |
(goal ranged-unit-type-goal monk); redemption will lure monks into death so avoid it unless enemy tries to counter monks with siege | |
(or | |
(players-unit-type-count any-enemy scorpion-line > 2) | |
(or | |
(players-unit-type-count any-enemy bombard-cannon > 0) | |
(players-unit-type-count any-enemy mangonel-line > 0) | |
) | |
) | |
(can-research ri-redemption) | |
=> | |
(research ri-redemption) | |
) | |
(defrule | |
(or | |
(strategic-number sn-resource-control < 1) | |
(strategic-number sn-resource-control == ri-heresy) | |
) | |
(or | |
(and | |
(and | |
(unit-type-count monk > 12) | |
(strategic-number sn-current-age >= ci-transit) | |
) | |
(unit-type-count monk > 5) | |
) | |
(and | |
(players-unit-type-count any-enemy monk > 3) | |
(goal ranged-unit-type-goal monk) | |
) | |
) | |
(can-research ri-atonement) | |
=> | |
(research ri-atonement) | |
) | |
#load-if-defined CELTIC-CIV | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(or | |
(can-research-with-escrow ri-heavy-scorpion) | |
(can-research-with-escrow my-unique-research) | |
) | |
=> | |
(release-escrow wood)(release-escrow food)(release-escrow gold) | |
(research ri-heavy-scorpion) | |
(research my-unique-research) | |
) | |
#else | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(or | |
(unit-type-count scorpion-line > low-min-number-upgrade) | |
(goal ranged-unit-type-goal scorpion) | |
) | |
(can-research ri-heavy-scorpion) | |
=> | |
(research ri-heavy-scorpion) | |
) | |
(defrule | |
(or | |
(civ-selected japanese) | |
(civ-selected viking) | |
) | |
(strategic-number sn-resource-control < 1) | |
(players-unit-type-count focus-player skirmisher-line > 20) | |
(unit-type-count trade-cart > 5) | |
(can-research ri-heavy-scorpion) | |
=> | |
(research ri-heavy-scorpion) | |
) | |
#end-if | |
(defrule | |
(or | |
(unit-type-count-total my-unique-unit-line >= high-min-number-upgrade) | |
(goal uu-up-goal 1) | |
) | |
(can-research-with-escrow my-unique-unit-upgrade) | |
=> | |
(release-escrow wood)(release-escrow food)(release-escrow gold) | |
(research my-unique-unit-upgrade) | |
(set-goal uu-up-goal 0) | |
) | |
(defrule | |
(current-age-time > 300) | |
(game-time > 1800); not in DM | |
(gold-amount > 2000) | |
(or (or (civ-selected saracen)(civ-selected turkish))(civ-selected japanese)) | |
(can-research-with-escrow my-unique-unit-upgrade) | |
=> | |
(release-escrow food)(release-escrow gold) | |
(research my-unique-unit-upgrade) | |
(set-goal uu-up-goal 0) | |
) | |
(defrule | |
(population >= del-civ-pop) | |
(current-age-time > 300) | |
(or (gold-amount > 2000) | |
(or (unit-type-count-total my-unique-unit-line >= 10) | |
(and (civ-selected saracen) | |
(unit-type-count-total camel-line >= 10)))) | |
(or (civ-selected saracen) | |
(civ-selected byzantine)) | |
(can-research-with-escrow my-unique-research) | |
=> | |
(release-escrow food)(release-escrow gold) | |
(research my-unique-research) | |
) | |
#load-if-defined TURKISH-CIV | |
(defrule | |
(population >= del-civ-pop) | |
(unit-type-count bombard-tower > 4) | |
(can-research-with-escrow my-unique-research) | |
=> | |
(release-escrow gold)(release-escrow stone) | |
(research my-unique-research) | |
) | |
#end-if | |
#load-if-defined GOTHIC-CIV | |
(defrule | |
(strategic-number sn-resource-control != ri-long-swordsman) | |
(goal unit-goal knight) | |
(building-type-count town-center < tc-level-three) | |
(unit-type-count-total militiaman-line < 6); test | |
(goal control-goal militiaman-line) | |
=> | |
(up-jump-rule 4) | |
) | |
#end-if | |
(defrule | |
(or (strategic-number sn-resource-control <= 2) | |
(strategic-number sn-resource-control == ri-long-swordsman)) | |
(or (unit-type-count-total militiaman-line >= 6) | |
(or (goal unit-goal militiaman-line) | |
(goal control-goal militiaman-line))) | |
(or (unit-type-count-total militiaman-line >= 6) | |
(or (goal strategy-goal flush) | |
(strategic-number sn-current-age >= fc-transit))) | |
(can-research ri-man-at-arms) | |
=> | |
(research ri-man-at-arms) | |
) | |
(defrule | |
(or (strategic-number sn-resource-control <= 2) | |
(strategic-number sn-resource-control == ri-long-swordsman)) | |
(or (unit-type-count-total militiaman-line >= 6) | |
(or (goal unit-goal militiaman-line) | |
(goal control-goal militiaman-line))) | |
(can-research ri-long-swordsman) | |
=> | |
(research ri-long-swordsman) | |
) | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(or (unit-type-count-total militiaman-line >= 6) | |
(or (goal unit-goal militiaman-line) | |
(goal control-goal militiaman-line))) | |
(can-research ri-two-handed-swordsman) | |
=> | |
(research ri-two-handed-swordsman) | |
) | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(or (unit-type-count-total militiaman-line >= 6) | |
(or (goal unit-goal militiaman-line) | |
(goal control-goal militiaman-line))) | |
(can-research ri-champion) | |
=> | |
(research ri-champion) | |
) | |
(defrule | |
(or (and (strategic-number sn-resource-control <= 2) | |
(or (goal strategy-goal flush) | |
(current-age-time > 240))) | |
(strategic-number sn-resource-control == ri-crossbow)) | |
(or (goal ranged-unit-type-goal archer) | |
(or (strategic-number sn-resource-control == ri-crossbow) | |
(and (unit-type-count archer > 8) | |
(goal hostilities-goal 1)))) | |
(can-research ri-crossbow) | |
=> | |
(research ri-crossbow) | |
) | |
(defrule | |
(or | |
(strategic-number sn-resource-control <= 2) | |
(strategic-number sn-resource-control == ri-arbalest) | |
) | |
(or | |
(goal ranged-unit-type-goal archer) | |
(and | |
(unit-type-count archer-line > 10) | |
(goal hostilities-goal 1) | |
) | |
) | |
(can-research ri-arbalest) | |
=> | |
(research ri-arbalest) | |
) | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(unit-type-count knight-line > 12) | |
(can-research ri-cavalier) | |
=> | |
(research ri-cavalier) | |
) | |
(defrule | |
(or (or (civ-selected slavic); get more uu instead | |
(civ-selected mongol)) | |
(civ-selected persian)) | |
(up-compare-goal unit-goal != knight) | |
=> | |
(up-jump-rule 1) | |
) | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(or (goal anti-cavalry-threat-goal 0) | |
(goal unit-goal knight)) | |
(or (up-research-status c: ri-bloodlines >= research-pending) | |
(civ-selected frankish)) | |
(can-research ri-cavalier) | |
=> | |
(research ri-cavalier) | |
) | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(or (up-research-status c: ri-bloodlines >= research-pending) | |
(civ-selected frankish)) | |
(can-research-with-escrow ri-paladin) | |
=> | |
(release-escrow food)(release-escrow gold) | |
(research ri-paladin) | |
) | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(or (unit-type-count ranged-unit-class > mid-min-number-upgrade) | |
(unit-type-count cavalry-archer-class > mid-min-number-upgrade)) | |
(or (or (gold-amount < 200) | |
(strategic-number sn-current-age >= ci-transit)) | |
(goal hostilities-goal 1)) | |
(can-research-with-escrow ri-thumb-ring) | |
=> | |
(release-escrow wood)(release-escrow food) | |
(research ri-thumb-ring) | |
) | |
#load-if-not-defined GOTHIC-CIV | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(or (up-research-status c: ri-bloodlines >= research-pending) | |
(research-available ri-bloodlines)) | |
(or (unit-type-count villager >= 40); dont research this at castle age start when rushing | |
(population >= del-civ-pop)) | |
(or (and (food-amount > 350) | |
(or (gold-amount < 200) | |
(strategic-number sn-current-age >= ci-transit))) | |
(unit-type-count scout-cavalry > 6)) | |
(can-research ri-light-cavalry) | |
=> | |
(research ri-light-cavalry) | |
) | |
(defrule | |
(or (goal monk-threat-goal 1) | |
(and (strategic-number sn-resource-control <= 2) | |
(and (and (food-amount > 400) | |
(gold-amount < 100)) | |
(or (civ-selected frankish) | |
(civ-selected briton))))) | |
(can-research ri-light-cavalry) | |
=> | |
(research ri-light-cavalry) | |
) | |
(defrule | |
(game-time < 1500) | |
(or (players-building-type-count every-enemy monastery > 1) | |
(and (players-building-type-count every-enemy castle > 0) | |
(players-unit-type-count every-enemy monk > 3))) | |
(can-research ri-light-cavalry) | |
=> | |
(research ri-light-cavalry) | |
) | |
#end-if | |
(defrule | |
(nand (civ-selected magyar) | |
(goal monk-threat-goal 0)); get UU instead | |
(strategic-number sn-resource-control <= 2) | |
(can-research ri-hussar) | |
=> | |
(research ri-hussar) | |
) | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(or (unit-type-count cavalry-archer-line >= high-min-number-upgrade) | |
(or (goal unit-goal cavalry-archer) | |
(and (civ-selected hun) | |
(unit-type-count trade-cart > 5)))) | |
(unit-type-count cavalry-archer-line >= mid-min-number-upgrade) | |
(can-research ri-heavy-cavalry-archer) | |
=> | |
(research ri-heavy-cavalry-archer) | |
) | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(or | |
(or | |
(up-research-status c: ri-crossbow >= research-pending) | |
(unit-type-count cavalry-archer-class > mid-min-number-upgrade) | |
) | |
(or | |
(or | |
(unit-type-count ranged-unit-class > mid-min-number-upgrade) | |
(goal strategy-goal flush) | |
) | |
(or | |
(unit-type-count galley-line > 4) | |
(up-research-status c: ri-chemistry >= research-pending) | |
) | |
) | |
) | |
(can-research ri-fletching) | |
=> | |
(research ri-fletching) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(or | |
(strategic-number sn-resource-control <= 2) | |
(strategic-number sn-resource-control == ri-fletching) | |
) | |
(strategic-number sn-current-age >= fc-transit) | |
(or | |
(or | |
(goal unit-goal cavalry-archer) | |
(goal unit-goal archer) | |
) | |
(goal unit-goal skirmisher) | |
) | |
(can-research ri-fletching) | |
=> | |
(research ri-fletching) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(or | |
(strategic-number sn-resource-control <= 2) | |
(strategic-number sn-resource-control == ri-fletching) | |
) | |
(current-age >= castle-age) | |
(building-type-count castle > 0) | |
(or | |
(unit-type-count ranged-unit-class > 0) | |
(unit-type-count cavalry-archer-class > 0) | |
) | |
(can-research ri-fletching) | |
=> | |
(research ri-fletching) | |
) | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(or | |
(or | |
(unit-type-count ranged-unit-class > mid-min-number-upgrade) | |
(unit-type-count cavalry-archer-class > mid-min-number-upgrade) | |
) | |
(or | |
(unit-type-count galley-line > 0) | |
(and | |
(goal unit-goal skirmisher) | |
(current-age-time > 60) | |
) | |
) | |
) | |
(can-research ri-bodkin-arrow) | |
=> | |
(research ri-bodkin-arrow) | |
) | |
(defrule | |
(or | |
(and | |
(goal strategy-goal rush) | |
(or | |
(goal unit-goal cavalry-archer) | |
(goal unit-goal archer) | |
) | |
) | |
(or | |
(and | |
(building-type-count castle > 1) | |
(population >= max-civ-pop) | |
) | |
(strategic-number sn-resource-control == ri-bodkin-arrow) | |
) | |
) | |
(can-research ri-bodkin-arrow) | |
=> | |
(research ri-bodkin-arrow) | |
) | |
(defrule | |
(or | |
(and | |
(unit-type-count infantry-class > mid-min-number-upgrade) | |
(strategic-number sn-resource-control <= 2) | |
) | |
(goal train-civ-goal ri-chain-mail) | |
) | |
(can-research-with-escrow ri-chain-mail) | |
=> | |
(release-escrow food)(release-escrow gold) | |
(research ri-chain-mail) | |
) | |
#load-if-not-defined DIFFICULTY-EASIEST; test | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(current-age-time > 60) | |
(can-research ri-conscription) | |
=> | |
(research ri-conscription) | |
) | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(population > sixty-percent-pop) | |
(unit-type-count cavalry-unit-class > high-min-number-upgrade) | |
(research-available ri-plate-barding) | |
=> | |
(set-escrow-percentage food 20)(set-escrow-percentage gold 20) | |
(set-goal escrow-purpose-goal blacksmith) | |
) | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(unit-type-count cavalry-unit-class > mid-min-number-upgrade) | |
(can-research-with-escrow ri-plate-barding) | |
=> | |
(release-escrow food)(release-escrow gold) | |
(set-escrow-percentage food 0)(set-escrow-percentage gold 0) | |
(set-goal escrow-purpose-goal 0) | |
(research ri-plate-barding) | |
) | |
#load-if-not-defined DIFFICULTY-EASY | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(population > sixty-percent-pop) | |
(not (can-research-with-escrow ri-bracer)) | |
(research-available ri-bracer) | |
=> | |
(set-escrow-percentage food 20)(set-escrow-percentage gold 20) | |
) | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(can-research-with-escrow ri-bracer) | |
=> | |
(release-escrow food)(release-escrow gold) | |
(set-escrow-percentage food 0)(set-escrow-percentage gold 0) | |
(research ri-bracer) | |
) | |
#end-if; test | |
#end-if | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(or | |
(unit-type-count infantry-class < low-min-number-upgrade) | |
(up-research-status c: ri-scale-mail >= research-pending) | |
) | |
(up-research-status c: ri-scale-barding >= research-pending) | |
(unit-type-count cavalry-unit-class > low-min-number-upgrade) | |
(strategic-number sn-current-age >= fc-transit) | |
(can-research ri-forging) | |
=> | |
(research ri-forging) | |
) | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(nand | |
(goal unit-goal eagle-warrior) | |
(research-available ri-chain-mail) | |
) | |
(or | |
(unit-type-count cavalry-unit-class < low-min-number-upgrade) | |
(up-research-status c: ri-scale-barding >= research-pending) | |
) | |
(unit-type-count infantry-class > low-min-number-upgrade) | |
(up-research-status c: ri-scale-mail >= research-pending) | |
(nand | |
(goal strategy-goal boom) | |
(goal hostilities-goal 0) | |
) | |
(strategic-number sn-current-age >= fc-transit) | |
(can-research ri-forging) | |
=> | |
(research ri-forging) | |
) | |
(defrule | |
(strategic-number sn-resource-control <= 0) | |
(or | |
(up-research-status c: ri-chain-barding >= research-pending) | |
(up-research-status c: ri-chain-mail >= research-pending) | |
) | |
(or | |
(or | |
(strategic-number sn-current-age >= ci-transit) | |
(goal hostilities-goal 1) | |
) | |
(and | |
(goal unit-goal eagle-warrior) | |
(up-compare-goal strategy-goal != fast-imp) | |
) | |
) | |
(can-research-with-escrow ri-iron-casting) | |
=> | |
(release-escrow food)(release-escrow gold) | |
(research ri-iron-casting) | |
) | |
#load-if-not-defined DIFFICULTY-EASIEST; test | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(population > sixty-percent-pop) | |
(or | |
(unit-type-count infantry-class > high-min-number-upgrade) | |
(unit-type-count cavalry-unit-class > high-min-number-upgrade) | |
) | |
(not (can-research-with-escrow ri-blast-furnace)) | |
(research-available ri-blast-furnace) | |
=> | |
(set-escrow-percentage food 20)(set-escrow-percentage gold 20) | |
(set-goal escrow-purpose-goal blacksmith) | |
) | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(nand | |
(research-available ri-plate-mail) | |
(unit-type-count infantry-class > high-min-number-upgrade) | |
) | |
(nand | |
(research-available ri-plate-barding) | |
(unit-type-count cavalry-unit-class > high-min-number-upgrade) | |
) | |
(can-research-with-escrow ri-blast-furnace) | |
=> | |
(release-escrow food)(release-escrow gold) | |
(set-escrow-percentage food 0)(set-escrow-percentage gold 0) | |
(research ri-blast-furnace) | |
(set-goal escrow-purpose-goal 0) | |
) | |
#end-if; test | |
(defrule | |
(goal unit-goal knight) | |
(unit-type-count knight-line > 12) | |
(game-time < 2700) | |
(not (up-research-status c: ri-paladin >= research-pending)) | |
=> | |
(up-jump-rule 2) | |
) | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(population > sixty-percent-pop) | |
(building-type-count university > 0) | |
(not (can-research-with-escrow ri-chemistry)) | |
(research-available ri-chemistry) | |
=> | |
(set-escrow-percentage food 20)(set-escrow-percentage gold 20) | |
) | |
(defrule | |
(or | |
(strategic-number sn-resource-control <= 2) | |
(strategic-number sn-resource-control == ri-chemistry) | |
) | |
(or | |
(current-age-time > 120) | |
(or | |
(goal unit-goal gunpowder-class) | |
(strategic-number sn-minimum-water-body-size-for-dock == water-islands) | |
) | |
) | |
(can-research-with-escrow ri-chemistry) | |
=> | |
(release-escrow food)(release-escrow gold) | |
(set-escrow-percentage food 0)(set-escrow-percentage gold 0) | |
(research ri-chemistry) | |
) | |
#load-if-not-defined PERSIAN-CIV | |
#load-if-not-defined SPANISH-CIV | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(or (unit-type-count cavalry-archer-line >= high-min-number-upgrade) | |
(or (goal unit-goal cavalry-archer) | |
(and (civ-selected hun) | |
(unit-type-count trade-cart > 5)))) | |
(unit-type-count cavalry-archer-line >= mid-min-number-upgrade) | |
(can-research ri-parthian-tactics) | |
=> | |
(research ri-parthian-tactics) | |
) | |
#end-if | |
#end-if | |
#load-if-not-defined DIFFICULTY-EASIEST; test | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(population > sixty-percent-pop) | |
(unit-type-count infantry-class > high-min-number-upgrade) | |
(research-available ri-plate-mail) | |
=> | |
(set-escrow-percentage food 20)(set-escrow-percentage gold 20) | |
(set-goal escrow-purpose-goal blacksmith) | |
) | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(unit-type-count infantry-class > mid-min-number-upgrade) | |
(can-research-with-escrow ri-plate-mail) | |
=> | |
(release-escrow food)(release-escrow gold) | |
(set-escrow-percentage food 0)(set-escrow-percentage gold 0) | |
(set-goal escrow-purpose-goal 0) | |
(research ri-plate-mail) | |
) | |
#end-if; test | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(or | |
(or | |
(unit-type-count gunpowder-class > low-min-number-upgrade) | |
(unit-type-count conquistador-line > low-min-number-upgrade) | |
) | |
(and | |
(up-research-status c: ri-fletching >= research-pending) | |
(or | |
(or | |
(unit-type-count ranged-unit-class > mid-min-number-upgrade) | |
(unit-type-count cavalry-archer-class > mid-min-number-upgrade) | |
) | |
(and | |
(goal hostilities-goal 1) | |
(goal strategy-goal flush) | |
) | |
) | |
) | |
) | |
(can-research ri-padded-archer-armor) | |
=> | |
(research ri-padded-archer-armor) | |
) | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(or | |
(unit-type-count ranged-unit-class > low-min-number-upgrade) | |
(unit-type-count cavalry-archer-class > low-min-number-upgrade) | |
) | |
(up-research-status c: ri-bodkin-arrow >= research-pending) | |
(or | |
(strategic-number sn-current-age >= ci-transit) | |
(goal hostilities-goal 1) | |
) | |
(can-research-with-escrow ri-leather-archer-armor) | |
=> | |
(release-escrow food)(release-escrow gold) | |
(research ri-leather-archer-armor) | |
) | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(or | |
(unit-type-count gunpowder-class > low-min-number-upgrade) | |
(unit-type-count conquistador-line > low-min-number-upgrade) | |
) | |
(or | |
(strategic-number sn-current-age >= ci-transit) | |
(goal hostilities-goal 1) | |
) | |
(can-research-with-escrow ri-leather-archer-armor) | |
=> | |
(release-escrow food)(release-escrow gold) | |
(research ri-leather-archer-armor) | |
) | |
#load-if-not-defined DIFFICULTY-EASIEST; test | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(not (research-available ri-bracer)) | |
(or | |
(or | |
(unit-type-count ranged-unit-class > low-min-number-upgrade) | |
(unit-type-count cavalry-archer-class > low-min-number-upgrade) | |
) | |
(or | |
(unit-type-count gunpowder-class > low-min-number-upgrade) | |
(unit-type-count conquistador-line > low-min-number-upgrade) | |
) | |
) | |
(can-research-with-escrow ri-ring-archer-armor) | |
=> | |
(release-escrow food)(release-escrow gold) | |
(research ri-ring-archer-armor) | |
) | |
#end-if; test | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(or | |
(strategic-number sn-current-age >= ci-transit) | |
(and | |
(gold-amount < 200) | |
(or | |
(food-amount > 500) | |
(goal hostilities-goal 1) | |
) | |
) | |
) | |
(unit-type-count infantry-class > mid-min-number-upgrade) | |
(can-research ri-squires) | |
=> | |
(research ri-squires) | |
) | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(or | |
(or | |
(gold-amount < 200) | |
(strategic-number sn-current-age >= ci-transit) | |
) | |
(goal hostilities-goal 1) | |
) | |
(or | |
(unit-type-count cavalry-unit-class > mid-min-number-upgrade) | |
(or | |
(unit-type-count cavalry-archer-class > mid-min-number-upgrade) | |
(unit-type-count conquistador-line > mid-min-number-upgrade) | |
) | |
) | |
(can-research ri-husbandry) | |
=> | |
(research ri-husbandry) | |
) | |
(defrule | |
(or | |
(unit-type-count spearman-line > 7) | |
(strategic-number sn-cavalry-threat >= 1) | |
) | |
(nand | |
(and | |
(goal unit-goal knight) | |
(game-time < 2400) | |
) | |
(or | |
(civ-selected indian) | |
(goal strategy-goal boom) | |
) | |
) | |
(can-research ri-pikeman) | |
=> | |
(research ri-pikeman) | |
) | |
(defrule | |
(unit-type-count spearman-line > high-min-number-upgrade) | |
(research-available ri-halberdier) | |
(not (goal escrow-purpose-goal blacksmith)) | |
=> | |
(set-escrow-percentage gold 67) | |
(set-goal escrow-purpose-goal ri-halberdier) | |
) | |
(defrule | |
(or | |
(and | |
(escrow-amount gold >= 225) | |
(not (goal escrow-purpose-goal ri-halberdier)) | |
) | |
(escrow-amount gold >= 600) | |
) | |
(not (goal escrow-purpose-goal my-unique-unit-line)) | |
(current-age == imperial-age) | |
=> | |
(set-escrow-percentage food 30) | |
(set-escrow-percentage gold 0); stop escrowing gold when we have enough | |
) | |
(defrule | |
(or | |
(unit-type-count spearman-line > mid-min-number-upgrade) | |
(strategic-number sn-minimum-water-body-size-for-dock > water-mixed) | |
) | |
(can-research-with-escrow ri-halberdier) | |
=> | |
(release-escrow food)(release-escrow gold) | |
(set-escrow-percentage food 0)(set-escrow-percentage gold 0) | |
(research ri-halberdier) | |
(set-goal escrow-purpose-goal 0) | |
) | |
(defrule | |
(or | |
(and | |
(unit-type-count spearman-line < 10) | |
(goal escrow-purpose-goal ri-halberdier) | |
) | |
(and | |
(and | |
(unit-type-count infantry-class < 10) | |
(unit-type-count cavalry-unit-class < 10) | |
) | |
(goal escrow-purpose-goal blacksmith) | |
) | |
) | |
=> | |
(release-escrow food)(release-escrow gold) | |
(set-escrow-percentage food 0)(set-escrow-percentage gold 0) | |
(set-goal escrow-purpose-goal 0) | |
) | |
(defrule | |
(up-research-status c: ri-elite-eagle-warrior >= research-pending); try to press advatange with as many EEW as possivle in early imp | |
(current-age-time < 600) | |
(population < del-civ-pop) | |
=> | |
(release-escrow food)(release-escrow wood)(release-escrow gold) | |
(set-escrow-percentage food 0)(set-escrow-percentage wood 0)(set-escrow-percentage gold 0) | |
(set-goal escrow-purpose-goal 0) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(current-age-time > 180) | |
(strategic-number sn-resource-control <= 2) | |
(can-research ri-capped-ram) | |
(unit-type-count-total battering-ram-line > 0) | |
=> | |
(research ri-capped-ram) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(population > max-civ-pop) | |
(strategic-number sn-resource-control <= 1) | |
(can-research ri-siege-ram) | |
(unit-type-count-total battering-ram-line > 3) | |
=> | |
(research ri-siege-ram) | |
) | |
(defrule | |
(goal save-wood-goal 0) | |
(strategic-number sn-resource-control <= 1) | |
(or | |
(strategic-number sn-current-age >= ci-transit) | |
(or | |
(building-type-count-total monastery > 2); mush | |
(and | |
(food-amount > 400) | |
(gold-amount < 200) | |
) | |
) | |
) | |
(can-research ri-gold-shaft-mining) | |
=> | |
(research ri-gold-shaft-mining) | |
) | |
(defrule | |
(or | |
(strategic-number sn-stone-gatherer-percentage > 9) | |
(strategic-number sn-current-age >= ci-transit) | |
) | |
(strategic-number sn-stone-gatherer-percentage > 3) | |
(strategic-number sn-current-age >= fc-transit) | |
(or | |
(building-type-count-total barracks > 0); for saracens, to finish the barracks first to drop the other military buildings before castle age | |
(or | |
(goal unit-goal my-unique-unit-line) | |
(strategic-number sn-current-age >= ci-transit) | |
) | |
) | |
(can-research ri-stone-mining) | |
=> | |
(research ri-stone-mining) | |
) | |
(defrule | |
(or | |
(can-research ri-crop-rotation) | |
(can-research ri-two-man-saw) | |
) | |
=> | |
(research ri-crop-rotation) | |
(research ri-two-man-saw) | |
) | |
#load-if-not-defined DIFFICULTY-EASIEST; test | |
#load-if-not-defined DIFFICULTY-EASY | |
(defrule; back-up blacksmith research rules | |
(strategic-number sn-resource-control != 0) | |
(strategic-number sn-resource-control != 2) | |
(strategic-number sn-number-attack-groups < 2) | |
(nand (strategic-number sn-maximum-town-size >= 40) | |
(enemy-buildings-in-town)) | |
(or (population < del-civ-pop) | |
(and (population < eighty-five-percent-pop) | |
(current-age < imperial-age))) | |
=> | |
(up-jump-rule 2)) | |
(defrule | |
(strategic-number sn-current-age >= fc-transit) | |
(or (building-type-count watch-tower >= 3) | |
(or (building-type-count castle >= 3) | |
(or (unit-type-count-total 900 >= high-min-number-upgrade) | |
(or (unit-type-count-total slinger >= high-min-number-upgrade) | |
(unit-type-count-total 936 >= high-min-number-upgrade))))) | |
=> | |
(research ri-fletching) | |
(research ri-bodkin-arrow) | |
(research ri-bracer)) | |
(defrule | |
(strategic-number sn-current-age >= fc-transit) | |
(or (unit-type-count-total scout-cavalry >= high-min-number-upgrade) | |
(or (unit-type-count-total 912 >= high-min-number-upgrade) | |
(or (unit-type-count-total magyar-huszar >= high-min-number-upgrade) | |
(unit-type-count-total boyar >= high-min-number-upgrade)))) | |
=> | |
(research ri-scale-barding) | |
(research ri-chain-barding) | |
(research ri-plate-barding)) | |
(defrule | |
(strategic-number sn-current-age >= fc-transit) | |
(or (unit-type-count-total 906 >= high-min-number-upgrade) | |
(or (unit-type-count-total kamayuk >= high-min-number-upgrade) | |
(unit-type-count-total condottiero >= high-min-number-upgrade))) | |
=> | |
(research ri-scale-mail) | |
(research ri-chain-mail) | |
(research ri-plate-mail)) | |
(defrule | |
(up-research-status c: ri-bodkin-arrow >= research-pending) | |
(or (unit-type-count-total 900 >= high-min-number-upgrade) | |
(or (unit-type-count-total 936 >= high-min-number-upgrade) | |
(or (unit-type-count-total slinger >= high-min-number-upgrade) | |
(or (unit-type-count-total elephant-archer >= high-min-number-upgrade) | |
(unit-type-count-total genoese-crossbowman >= high-min-number-upgrade))))) | |
=> | |
(research ri-padded-archer-armor) | |
(research ri-leather-archer-armor) | |
(research ri-ring-archer-armor)) | |
(defrule | |
(strategic-number sn-current-age >= fc-transit) | |
(or (unit-type-count-total 944 >= high-min-number-upgrade) | |
(unit-type-count-total conquistador-line >= high-min-number-upgrade)) | |
=> | |
(research ri-padded-archer-armor) | |
(research ri-leather-archer-armor) | |
(research ri-ring-archer-armor)) | |
(defrule | |
(up-research-status c: ri-chain-mail >= research-pending) | |
(or (unit-type-count-total 906 >= high-min-number-upgrade) | |
(or (unit-type-count-total kamayuk >= high-min-number-upgrade) | |
(unit-type-count-total condottiero >= high-min-number-upgrade))) | |
=> | |
(research ri-forging) | |
(research ri-iron-casting) | |
(research ri-blast-furnace)) | |
(defrule | |
(up-research-status c: ri-chain-barding >= research-pending) | |
(or (unit-type-count-total scout-cavalry >= high-min-number-upgrade) | |
(or (unit-type-count-total 912 >= high-min-number-upgrade) | |
(or (unit-type-count-total magyar-huszar >= high-min-number-upgrade) | |
(unit-type-count-total boyar >= high-min-number-upgrade)))) | |
=> | |
(research ri-forging) | |
(research ri-iron-casting) | |
(research ri-blast-furnace)) | |
#end-if; test | |
#end-if | |
;********** SIEGE UNITS ********** | |
#load-if-not-defined POPULATION-CAP-25 | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(goal enemy-fortifications-goal 1) | |
(building-type-count castle > 0) | |
(current-age == imperial-age) | |
(unit-type-count-total trebuchet-set < 3) | |
(population >= max-civ-pop) | |
(game-time < 1200) | |
=> | |
(set-goal save-wood-goal 1) | |
(set-strategic-number sn-resource-control 2) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(or | |
(unit-type-count battering-ram-line < 3) | |
(or | |
(players-building-type-count any-enemy castle > 1) | |
(players-building-type-count any-enemy stone-wall-line > 10) | |
) | |
) | |
(unit-type-count trebuchet-set == 0) | |
(building-type-count castle > 0) | |
(up-research-status c: ri-conscription != research-pending) | |
(current-age == imperial-age) | |
(unit-type-count trebuchet-set < 1) | |
(population >= max-civ-pop) | |
(wood-amount < 300) | |
=> | |
(set-goal save-wood-goal 1) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(or | |
(unit-type-count battering-ram-line < 3) | |
(or | |
(players-building-type-count any-enemy castle > 1) | |
(players-building-type-count any-enemy stone-wall-line > 10) | |
) | |
) | |
(unit-type-count trebuchet-set == 0) | |
(building-type-count castle > 0) | |
(up-research-status c: ri-conscription != research-pending) | |
(current-age == imperial-age) | |
(unit-type-count trebuchet-set < 1) | |
(population >= max-civ-pop) | |
(wood-amount < 300) | |
=> | |
(set-strategic-number sn-resource-control 2) | |
) | |
(defrule | |
(current-age >= imperial-age) | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(strategic-number sn-resource-control == 2) | |
(unit-type-count trebuchet-set < 3) | |
(or (goal enemy-fortifications-goal 1) | |
(unit-type-count-total trebuchet-set < 1)) | |
(population >= del-civ-pop) | |
=> | |
(set-goal save-wood-goal 1) | |
(set-goal train-civ-goal -1) | |
) | |
(defrule | |
(population >= del-civ-pop) | |
(population-cap <= 250) | |
(unit-type-count battering-ram-line < 4) | |
(building-type-count siege-workshop > 0) | |
(unit-type-count trebuchet-set < 1) | |
(current-age == imperial-age) | |
(current-age-time > 180) | |
(wood-amount > 175) | |
(gold-amount > 75) | |
(unit-type-count-total villager >= 12) | |
=> | |
(delete-unit villager) | |
(set-goal train-civ-goal -1) | |
(set-strategic-number sn-resource-control 2) | |
) | |
(defrule | |
(population-cap <= 250) | |
(players-building-count any-enemy > 0) | |
(population >= del-civ-pop) | |
(civilian-population > max-civ) | |
(gold-amount > 1500) | |
(food-amount > 1500) | |
(current-age == imperial-age) | |
(current-age-time > 300) | |
(unit-type-count-total villager >= 12) | |
=> | |
(delete-unit villager) | |
(set-goal train-civ-goal -1) | |
) | |
(defrule | |
(building-type-count castle > 0) | |
(current-age == imperial-age) | |
(population >= del-civ-pop) | |
(population-cap <= 250) | |
(unit-type-count-total trebuchet-set < 4) | |
(or (goal enemy-fortifications-goal 1) | |
(unit-type-count-total trebuchet-set < 1)) | |
(wood-amount > 200) | |
(gold-amount > 200) | |
(can-afford-unit trebuchet) | |
(unit-type-count-total villager >= 12) | |
=> | |
(delete-unit villager) | |
(set-goal train-civ-goal -1) | |
(set-strategic-number sn-resource-control 2) | |
) | |
#load-if-not-defined HIGHLAND-MAP | |
#load-if-not-defined YUCATAN-MAP | |
(defrule | |
(population-cap <= 250) | |
(strategic-number sn-minimum-water-body-size-for-dock >= water-mixed) | |
(building-type-count-total dock > 0) | |
(or (warboat-count < 25) | |
(and (civilian-population > 50) | |
(and (can-afford-unit cannon-galleon-line) | |
(unit-type-count cannon-galleon-line < 6)))) | |
(population >= max-pop) | |
(unit-type-count-total villager >= 12) | |
=> | |
(delete-unit villager) | |
(set-goal train-civ-goal -1) | |
(set-strategic-number sn-resource-control 1) | |
(chat-to-player my-player-number "Execute villagers to make room for a bigger navy.") | |
) | |
#end-if | |
#end-if | |
#else | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock >= water-mixed) | |
(building-type-count-total dock > 0) | |
(or (and (unit-type-count villager >= max-civ) | |
(current-age == castle-age)) | |
(up-research-status c: ri-cannon-galleon >= research-pending)) | |
(population >= max-pop) | |
(unit-type-count-total villager >= 12) | |
=> | |
(delete-unit villager) | |
(set-goal train-civ-goal -1) | |
(set-strategic-number sn-resource-control 1) | |
(chat-to-player my-player-number "Execute villagers to make room for a bigger navy.") | |
) | |
(defrule | |
(population >= max-pop) | |
(or (strategic-number sn-resource-control == battering-ram) | |
(and (or (goal forward-threat-goal 1) | |
(military-population > 5)) | |
(and (unit-type-count battering-ram-line < 2) | |
(unit-type-count trebuchet-set < 1)))) | |
(unit-type-count-total villager >= 12) | |
=> | |
(delete-unit villager) | |
(set-goal train-civ-goal -1) | |
) | |
(defrule | |
(current-age == imperial-age) | |
(current-age-time > 300) | |
(population > del-civ-pop) | |
(strategic-number sn-resource-control < 2); no siege required from rules above | |
(up-compare-goal uu-up-goal != 1) | |
(goal escrow-purpose-goal 0) | |
(unit-type-count villager >= max-civ) | |
(unit-type-count-total villager >= 12) | |
=> | |
(delete-unit villager) | |
(set-goal train-civ-goal -1) | |
) | |
#end-if | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock == water-islands) | |
(or (wood-amount >= 2000) | |
(or (food-amount >= 2000) | |
(gold-amount >= 2000))) | |
(unit-type-count-total fishing-ship > 1) | |
(unit-type-count-total transport-ship < 1) | |
(population >= max-pop) | |
(current-age >= imperial-age) | |
(building-type-count dock >= 1) | |
=> | |
(delete-unit fishing-ship)) | |
(defrule | |
(timer-triggered two-minute-timer) | |
(strategic-number sn-minimum-water-body-size-for-dock == water-islands) | |
(or (wood-amount >= 2000) | |
(or (food-amount >= 2000) | |
(gold-amount >= 2000))) | |
(unit-type-count-total fishing-ship < 1) | |
(unit-type-count-total transport-ship < 1) | |
(population >= max-pop) | |
(current-age >= imperial-age) | |
(building-type-count dock >= 1) | |
(unit-type-count-total villager >= 12) | |
=> | |
(delete-unit villager)) | |
(defrule | |
(unit-type-count fishing-ship > 0) | |
(population >= del-civ-pop) | |
(housing-headroom < 10) | |
(or | |
(and | |
(food-amount > 500) | |
(goal train-civ-goal -1) | |
) | |
(and | |
(cc-players-unit-type-count 0 sea-fish == 0) | |
(cc-players-unit-type-count 0 shore-fish == 0) | |
) | |
) | |
=> | |
(delete-unit fishing-ship) | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands); not on water maps | |
(dropsite-min-distance wood > 0) | |
(dropsite-min-distance wood < 20) | |
(goal train-civ-goal -1) | |
(strategic-number sn-resource-control < 1); no siege required from rules above | |
(civilian-population <= fourty-percent-pop); already deleted lots of villagers | |
=> | |
(set-goal train-civ-goal 1); restart villager training | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock == water-mixed) | |
(strategic-number sn-resource-control == 1) | |
(warboat-count >= 25) | |
(or | |
(up-research-status c: ri-cannon-galleon < research-pending) | |
(unit-type-count cannon-galleon-line > 7) | |
) | |
=> | |
(set-strategic-number sn-resource-control 0) | |
) | |
; order of rules does matter as 1st rule that will be executed 1st, so next rules may not spend the resources | |
; so put siege training above building | |
#load-if-not-defined AZTEC-CIV | |
#load-if-not-defined INCAN-CIV | |
#load-if-not-defined MAYAN-CIV | |
(defrule | |
(strategic-number sn-resource-control < 2) | |
(strategic-number sn-minimum-water-body-size-for-dock == water-islands) | |
(up-research-status c: ri-cannon-galleon < research-pending) | |
(warboat-count > 30) | |
(civilian-population > 100) | |
(strategic-number sn-military-level >= 0) | |
(players-building-type-count any-enemy castle > 0) | |
(nand | |
(up-compare-goal aofe-game-goal != 1) | |
(civ-selected briton) | |
) | |
(nand | |
(up-compare-goal aofe-game-goal == 1) | |
(civ-selected hun) | |
) | |
=> | |
(set-strategic-number sn-resource-control 2) | |
;debug (chat-to-player my-player-number "Saving resources for cannon-galleon") | |
) | |
#end-if | |
#end-if | |
#end-if | |
(defrule | |
(wood-amount < 200) | |
(gold-amount > 500) | |
(unit-type-count trade-cart > 4) | |
(or | |
(or | |
(strategic-number sn-resource-control == 2) | |
(gold-amount > 1500) | |
) | |
(and | |
(commodity-buying-price wood < 30) | |
(gold-amount > 800) | |
) | |
) | |
(commodity-buying-price wood < 80) | |
=> | |
(buy-commodity wood) | |
(chat-local-to-self "4 Buy cheap wood with trade cart gold") | |
) | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock >= water-mixed) | |
(warboat-count >= 17) | |
(or | |
(or | |
(cc-players-unit-type-count any-enemy castle-arrow > 0) | |
(cc-players-unit-type-count any-enemy castle-arrow-chemistry > 0) | |
) | |
(cc-players-unit-type-count any-enemy 506 > 0) | |
) | |
(unit-type-count cannon-galleon-line < 4) | |
(can-train-with-escrow cannon-galleon-line) | |
=> | |
(release-escrow wood)(release-escrow gold) | |
(train cannon-galleon-line) | |
) | |
#load-if-defined DEFEND-WONDER | |
(defrule | |
(building-type-count wonder == 0) | |
(unit-type-count-total trebuchet-set < 2) | |
(can-train trebuchet) | |
=> | |
(train trebuchet) | |
) | |
#end-if | |
(defrule | |
(unit-type-count-total trebuchet-set < 2) | |
(or | |
(unit-type-count-total monastery-class > 20) | |
(difficulty < moderate) | |
) | |
(can-train-with-escrow trebuchet) | |
=> | |
(release-escrow wood)(release-escrow gold) | |
(train trebuchet) | |
) | |
(defrule | |
(population > max-civ-pop) | |
(or | |
(or | |
(unit-type-count trebuchet-set < 2) | |
(game-time < 1200); start in DM | |
) | |
(or | |
(goal enemy-fortifications-goal 1) | |
(players-building-type-count any-enemy castle > 1) | |
) | |
) | |
(unit-type-count trebuchet-set < 5) | |
(can-train trebuchet) | |
=> | |
(train trebuchet) | |
) | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(unit-type-count-total battering-ram-line < number-rams) | |
(population >= seventy-five-percent-pop) | |
(can-train battering-ram-line) | |
=> | |
(train battering-ram-line) | |
) | |
#load-if-defined POPULATION-CAP-200 | |
(defrule | |
(building-type-count-total town-center < 3) | |
(or | |
(and | |
(strategic-number sn-military-level < 2) | |
(population-cap >= 225) | |
) | |
(goal unit-goal knight) | |
) | |
(strategic-number sn-military-level < 2) | |
=> | |
(up-jump-rule 1) | |
) | |
(defrule | |
(strategic-number sn-resource-control < 1) | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(or | |
(and | |
(building-type-count-total town-center >= 3) | |
(wood-amount > 300) | |
) | |
(and | |
(unit-type-count-total battering-ram-line < 2) | |
(strategic-number sn-military-level > 0) | |
) | |
) | |
(military-population > 10) | |
(or | |
(strategic-number sn-military-level >= 0) | |
(population >= del-civ-pop) | |
) | |
(unit-type-count-total battering-ram-line < 5) | |
(can-train battering-ram-line) | |
=> | |
(train battering-ram-line) | |
) | |
#end-if | |
(defrule | |
(strategic-number sn-current-age == castle) | |
(strategic-number sn-resource-control < 3) | |
(unit-type-count mangonel-line < 2) | |
(or | |
(unit-type-count ranged-unit-class > high-min-number-upgrade) | |
(unit-type-count cavalry-archer-class > mid-min-number-upgrade) | |
) | |
(players-unit-type-count focus-player skirmisher-line > 12) | |
(can-train mangonel-line) | |
=> | |
(train mangonel-line) | |
) | |
(defrule | |
(strategic-number sn-current-age == castle) | |
(strategic-number sn-resource-control < 3) | |
(unit-type-count mangonel-line < 2) | |
(building-type-count-total town-center >= tc-level-two) | |
(goal unit-goal my-unique-unit-line) | |
(players-current-age focus-player == feudal-age) | |
(wood-amount >= 200) | |
(current-age >= castle-age) | |
(can-train mangonel-line) | |
=> | |
(train mangonel-line) | |
) | |
(defrule | |
(strategic-number sn-resource-control < 3) | |
(unit-type-count mangonel-line < 1) | |
(or | |
(and | |
(goal unit-goal my-unique-unit-line); assume we have a ranged uu | |
(unit-type-count ranged-unit-class > mid-min-number-upgrade) | |
) | |
(goal unit-goal scorpion) | |
) | |
(or | |
(players-unit-type-count focus-player mangonel-line > 1) | |
(players-unit-type-count focus-player scorpion-line > 4) | |
) | |
(can-train mangonel-line) | |
=> | |
(train mangonel-line) | |
) | |
(defrule | |
(up-compare-goal control-goal != shot) | |
(strategic-number sn-minimum-water-body-size-for-dock < water-mixed) | |
(strategic-number sn-resource-control != battering-ram) | |
(strategic-number sn-resource-control != ri-elite-skirmisher) | |
(strategic-number sn-archer-threat > 1) | |
(current-age == castle-age) | |
(unit-type-count-total mangonel-line < 1) | |
(building-type-count siege-workshop >= 1) | |
(nor | |
(can-afford-unit mangonel-line) | |
(up-research-status c: ri-elite-skirmisher >= research-pending) | |
) | |
=> | |
(set-strategic-number sn-resource-control mangonel) | |
(set-goal save-wood-goal 1) | |
;debug (chat-to-player my-player-number "Saving resources for mangonel") | |
) | |
(defrule | |
(strategic-number sn-resource-control < 1) | |
(or | |
(strategic-number sn-archer-threat > 1) | |
(players-unit-type-count focus-player scorpion-line > 5) | |
) | |
(or | |
(current-age == castle-age) | |
(or | |
(strategic-number sn-archer-threat > 2) | |
(players-unit-type-count focus-player scorpion-line > 11) | |
) | |
) | |
(unit-type-count mangonel-line < 1) | |
(can-train mangonel-line) | |
=> | |
(train mangonel-line) | |
) | |
(defrule | |
(or | |
(strategic-number sn-resource-control < 3) | |
(and | |
(strategic-number sn-resource-control == ri-elite-eagle-warrior) | |
(food-amount < 700) | |
) | |
) | |
(up-research-status c: ri-elite-eagle-warrior < research-complete); EW die to massed ranged, EEW don't | |
(or | |
(strategic-number sn-archer-threat > 2) | |
(players-unit-type-count focus-player scorpion-line > 11) | |
) | |
(unit-type-count-total mangonel-line < 2) | |
(goal unit-goal eagle-warrior) | |
(up-compare-goal control-goal != shot) | |
(can-train mangonel-line) | |
=> | |
(train mangonel-line) | |
) | |
(defrule | |
(strategic-number sn-resource-control < 1) | |
(or | |
(or | |
(strategic-number sn-archer-threat > 3) | |
(players-unit-type-count focus-player scorpion-line > 15) | |
) | |
(and | |
(or | |
(strategic-number sn-archer-threat > 2) | |
(players-unit-type-count focus-player scorpion-line > 8) | |
) | |
(unit-type-count trade-cart > 15) | |
) | |
) | |
=> | |
(research ri-onager) | |
(research ri-siege-onager) | |
(research 445); ri-shinkichon | |
) | |
(defrule | |
(strategic-number sn-resource-control < 1) | |
(players-unit-type-count focus-player galley-line > 20) | |
(or | |
(warboat-count < 15) | |
(strategic-number sn-minimum-water-body-size-for-dock == water-mixed) | |
) | |
=> | |
(research ri-onager) | |
(research ri-siege-onager) | |
(research 445); ri-shinkichon | |
) | |
(defrule | |
(strategic-number sn-resource-control < 1) | |
(or | |
(strategic-number sn-archer-threat > 2) | |
(or | |
(players-unit-type-count focus-player scorpion-line > 8) | |
(players-unit-type-count focus-player galley-line > 15) | |
) | |
) | |
(up-research-status c: ri-onager >= research-pending) | |
(unit-type-count mangonel-line < 4) | |
(can-train mangonel-line) | |
=> | |
(train mangonel-line) | |
) | |
#load-if-not-defined POPULATION-CAP-25 | |
#load-if-defined DEATH-MATCH | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(strategic-number sn-resource-control < 1) | |
(military-population > 20) | |
(unit-type-count battering-ram-line < 5) | |
(or | |
(strategic-number sn-military-level >= 0) | |
(population > sixty-percent-pop) | |
) | |
(can-train battering-ram-line) | |
=> | |
(train battering-ram-line) | |
) | |
#else | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(strategic-number sn-resource-control < 1) | |
(goal unit-goal monk) | |
(nand | |
(unit-available trebuchet) | |
(unit-type-count trebuchet-set < 1) | |
) | |
(military-population > 20) | |
(unit-type-count battering-ram-line < 2) | |
(or | |
(strategic-number sn-military-level >= 0) | |
(population > sixty-percent-pop) | |
) | |
(can-train battering-ram-line) | |
=> | |
(train battering-ram-line) | |
) | |
#end-if | |
(defrule | |
(strategic-number sn-minimum-water-body-size-for-dock < water-islands) | |
(strategic-number sn-resource-control != ri-elite-skirmisher) | |
(population > max-civ-pop) | |
(or | |
(unit-type-count battering-ram-line < 4) | |
(up-research-status c: ri-siege-ram >= research-pending) | |
) | |
(or | |
(goal enemy-fortifications-goal 1) | |
(unit-type-count battering-ram-line < 6) | |
) | |
(unit-type-count battering-ram-line < 12) | |
(can-train battering-ram-line) | |
=> | |
(train battering-ram-line) | |
) | |
; Relic Monks | |
(defrule | |
(or (strategic-number sn-resource-control < 1) | |
(gold-amount > 250)) | |
(current-age == castle-age) | |
(current-age-time < 480) | |
(unit-type-count-total monk < 3) | |
(unit-type-count-total 134 == 0); 134 = dead monk; dont make monks when they're dying while trying to collect relics behind enemy bases. | |
(can-train monk) | |
=> | |
(train monk) | |
) | |
#end-if | |
(defrule | |
(or (strategic-number sn-resource-control < 1) | |
(strategic-number sn-resource-control == monk)) | |
(unit-type-count-total monk == 0) | |
(unit-type-count-total 134 == 0); 134 = dead monk; dont make monks when they're dying while trying to collect relics behind enemy bases. | |
(can-train monk) | |
=> | |
(train monk) | |
) | |
; Trade | |
(defrule | |
(nor (research-available ri-double-bit-axe) | |
(research-available ri-horse-collar)) | |
(goal strategy-goal sling) | |
(can-research ri-coinage) | |
=> | |
(research ri-coinage) | |
) | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(or (strategic-number sn-current-age >= ci-transit) | |
(and (and (food-amount > 500) | |
(gold-amount < 200)) | |
(unit-type-count villager > villager-coinage))) | |
(or (unit-type-count villager > villager-coinage) | |
(unit-type-count villager >= max-civ)) | |
(players-building-type-count any-ally market > 0) | |
(can-research ri-coinage) | |
=> | |
(research ri-coinage) | |
) | |
(defrule | |
(or (and (strategic-number sn-resource-control <= 2) | |
(strategic-number sn-current-age >= ci-transit)) | |
(strategic-number sn-resource-control == sling)) | |
(players-building-type-count any-ally market > 0) | |
(can-research ri-banking) | |
=> | |
(research ri-banking) | |
) | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(or (unit-type-count-total trade-cart >= 6) | |
(unit-type-count-total trade-cog >= 6)) | |
(can-research-with-escrow ri-caravan) | |
=> | |
(release-escrow food)(release-escrow gold) | |
(research ri-caravan) | |
) | |
#load-if-not-defined DEFEND-WONDER | |
#load-if-not-defined POPULATION-CAP-25 | |
#load-if-not-defined POPULATION-CAP-50 | |
#load-if-defined ITALIAN-CIV | |
(defrule | |
(unit-type-count trade-cart < 15) | |
(player-in-game any-ally) | |
(can-research ri-silk-road) | |
=> | |
(research ri-silk-road) | |
) | |
#end-if | |
(defrule | |
(or (or (not(player-in-game any-ally)) | |
(or (players-building-type-count every-ally market == 0) | |
(building-type-count town-center == 0))) | |
(or (unit-type-count-total trade-cart >= max-trade-pop); depending on popcap and difficulty | |
(unit-type-count-total trade-cart >= max-trade-cart))); depending on map size | |
=> | |
(up-jump-rule 2); rule too long | |
) | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(or (research-available imperial-age) | |
(strategic-number sn-current-age >= ci-transit)) | |
(or (strategic-number sn-minimum-water-body-size-for-dock <= water-mixed) | |
(map-type team-islands)) | |
(or (or (game-time > 2100);35 min | |
(and (unit-type-count battering-ram-line > 1) | |
(goal unit-goal monk))) | |
(death-match-game)) | |
(can-train trade-cart) | |
=> | |
(train trade-cart) | |
) | |
(defrule | |
(strategic-number sn-resource-control <= 2) | |
(goal strategy-goal sling) | |
(goal under-attack-goal 0) | |
(strategic-number sn-minimum-water-body-size-for-dock <= water-mixed) | |
(game-time > 1800) | |
(can-train trade-cart) | |
=> | |
(train trade-cart) | |
) | |
(defrule | |
(or (unit-type-count 178 > 0);dead trade cart (empty/loaded) | |
(unit-type-count 205 > 0)) | |
=> | |
(set-strategic-number sn-preferred-trade-distance 60) | |
) | |
(defrule | |
(unit-type-count 178 == 0) | |
(unit-type-count 205 == 0) | |
=> | |
(set-strategic-number sn-preferred-trade-distance trade-distance) | |
) | |
#end-if | |
#end-if | |
#end-if | |
#end-if ; NO WONDER-RACE | |
; VILLAGERS | |
(defrule | |
(strategic-number sn-current-age == dark) | |
(unit-type-count-total villager >= villager-feudal); object-type-count-total ; also for others below | |
(or (or (difficulty != hardest) | |
(game-type == 8)) | |
(or (starting-resources != low-resources) | |
(or (strategic-number sn-minimum-water-body-size-for-dock >= water-mixed) | |
(map-type yucatan)))) | |
=> | |
(set-strategic-number sn-enable-training-queue 0) | |
) | |
(defrule | |
(strategic-number sn-current-age == dark) | |
(unit-type-count-total villager >= villager-flush) | |
(or (goal strategy-goal flush) | |
(and (unit-type-count-total villager >= dark-age-villager) | |
(or (unit-type-count-total villager >= 32); allows better boom if pocket | |
(or (up-compare-goal position-goal == flank) | |
(or (goal unit-goal my-unique-unit-line); but don't do with UU, to get the castle faster (prevent rush) | |
(goal unit-goal monk)))))) | |
=> | |
(set-strategic-number sn-enable-training-queue 0) | |
) | |
(defrule | |
(or (and (current-age == feudal-age) | |
(or (food-amount > 500) | |
(strategic-number sn-current-age == fc-transit))) | |
(or (and (goal need-loom-goal 1) | |
(research-available ri-loom)) | |
(and (current-age < imperial-age) | |
(death-match-game)))) | |
=> | |
(set-strategic-number sn-enable-training-queue 0) | |
) | |
(defrule | |
(current-age >= castle-age) | |
(or (up-compare-goal strategy-goal != boom) | |
(or (strategic-number sn-resource-control > 2) | |
(and (research-available imperial-age); (strategic-number sn-current-age == castle) | |
(and (food-amount >= imp-f2) | |
(gold-amount >= imp-g2))))) | |
=> | |
(set-strategic-number sn-enable-training-queue 0) | |
) | |
(defrule | |
(current-age == castle-age) | |
(strategic-number sn-current-age == castle) | |
(research-available imperial-age) | |
(food-amount >= imp-food) | |
(gold-amount >= imp-gold) | |