;Princess Aida ;16 July 202 ;Aida as the Franks #load-if-defined FRANKISH-CIV (defrule (true) => (chat-local-to-self "The Princess will win at any cost") (disable-self) ) #end-if (defrule (true) => (set-strategic-number sn-maximum-town-size 50) (set-strategic-number sn-camp-max-distance 12) (set-strategic-number sn-mill-max-distance 12) (set-strategic-number sn-percent-enemy-sighted-response 100) (set-strategic-number sn-enemy-sighted-response-distance 20) (set-strategic-number sn-group-form-distance 10) (set-strategic-number sn-minimum-defend-group-size 8) (set-strategic-number sn-blot-exploration-map 1) (set-strategic-number sn-number-explore-groups 1) (set-strategic-number sn-total-number-explorers 1) (disable-self) ) ;//////////////////////////////Resign////////////////////////// (defrule (building-type-count town-center less-than 1) (unit-type-count-total villager < 1) (not(can-train villager)) => (resign) (disable-self) ) ;//////////////////////////Villager Assignment////////////////// (defrule (current-age == dark-age) => (set-strategic-number sn-percent-civilian-explorers 0) (set-strategic-number sn-percent-civilian-builders 15) (set-strategic-number sn-percent-civilian-gatherers 85) (set-strategic-number sn-cap-civilian-explorers 0) (set-strategic-number sn-cap-civilian-gatherers 100) (set-strategic-number sn-food-gatherer-percentage 70) (set-strategic-number sn-gold-gatherer-percentage 0) (set-strategic-number sn-wood-gatherer-percentage 30) (set-strategic-number sn-stone-gatherer-percentage 0) (set-strategic-number sn-maximum-gold-drop-distance 12) (set-strategic-number sn-maximum-food-drop-distance 12) (set-strategic-number sn-maximum-stone-drop-distance 12) (set-strategic-number sn-allow-civilian-defense 1) (disable-self) ) (defrule (unit-type-count-total mill less-than 1) (can-build mill) => (build mill) (chat-local-to-self "Mill is built Princess") ) (defrule (building-type-count-total lumber-camp less-than 1) (can-build lumber-camp) => (build lumber-camp) (chat-local-to-self "lumber camp here") ) (defrule (current-age == dark-age) (true) => (set-strategic-number sn-task-ungrouped-soldiers 0) (set-strategic-number sn-percent-attack-soldiers 0) (disable-self) ) (defrule (unit-type-count-total villager > 12) (current-age == dark-age) => (set-goal 16 96) (disable-self) ) (defrule (goal 16 96) (can-research-with-escrow feudal-age) => (release-escrow wood) (release-escrow food) (release-escrow stone) (release-escrow gold) (research feudal-age) (chat-local-to-self "Rising to the Feudal Age Your Highness") (set-goal 16 0) ) (defrule (goal 16 0) (can-research-with-escrow ri-wheel-barrow) => (release-escrow wood) (release-escrow food) (release-escrow gold) (release-escrow stone) (research ri-wheel-barrow) (chat-local-to-self "Researching wheelbarrow to make workers faster Your Highness") ) (defrule (current-age == feudal-age) => (set-strategic-number sn-percent-civilian-explorers 0) (set-strategic-number sn-percent-civilian-gatherers 75) (set-strategic-number sn-percent-civilian-builders 25) (set-strategic-number sn-cap-civilian-explorers 0) (set-strategic-number sn-cap-civilian-gatherers 100) (set-strategic-number sn-food-gatherer-percentage 47) (set-strategic-number sn-gold-gatherer-percentage 18) (set-strategic-number sn-wood-gatherer-percentage 30) (set-strategic-number sn-stone-gatherer-percentage 5) (set-strategic-number sn-maximum-gold-drop-distance 12) (set-strategic-number sn-maximum-food-drop-distance 12) (set-strategic-number sn-maximum-stone-drop-distance 12) (disable-self) ) (defrule (current-age == feudal-age) (true) => (set-strategic-number sn-task-ungrouped-soldiers 3) (set-strategic-number sn-percent-attack-soldiers 30) (set-strategic-number sn-group-form-distance 15) (disable-self) ) (defrule (unit-type-count-total villager less-than 25) (can-train villager) => (train villager) (chat-local-to-self "We trained another villager for you Princess") ) (defrule (building-type-count-total farm less-than 12) (can-build farm) => (build farm) (chat-local-to-self "Built a farm for you Princess") ) (defrule (building-type-count-total market less-than 1) (can-build market) => (build market) (chat-local-to-self "Ready to buy and sell things Your Highness") ) (defrule (goal 16 0) (can-research-with-escrow ri-guilds) => (release-escrow wood) (release-escrow food) (release-escrow gold) (release-escrow stone) (research ri-guilds) (chat-local-to-self "research guilds") ) (defrule (current-age == feudal-age) (building-type-count-total barracks less-than 1) (can-build barracks) => (build barracks) (chat-local-to-self "We are building up our army for you Your Highness") ) (defrule (current-age == feudal-age) (unit-type-count-total militiaman-line < 5) (can-train militiaman-line) => (train militiaman-line) (chat-local-to-self "militiaman") ) (defrule (unit-type-count militiaman > 3) (can-research-with-escrow ri-man-at-arms) => (release-escrow wood) (release-escrow food) (release-escrow gold) (release-escrow stone) (research ri-man-at-arms) ) (defrule (unit-type-count-total man-at-arms less-than 5) (can-train man-at-arms) => (train man-at-arms) (chat-local-to-self "man at arms") ) (defrule (unit-type-count-total spearman > 4) (can-train spearman) => (train spearman) (chat-local-to-self "spearman") ) (defrule (goal 16 0) (unit-type-count-total spearman > 3) (can-research-with-escrow ri-pikeman) => (release-escrow wood) (release-escrow food) (release-escrow gold) (release-escrow stone) (research ri-pikeman) ) (defrule (unit-type-count-total pikeman less-than 12) (can-train pikeman) => (train pikeman) (chat-local-to-self "Pikeman for you Princess") ) (defrule (housing-headroom less-than 5) (population-headroom greater-than 2) (can-build house) => (build house) (chat-local-to-self "We built another house for your workers Your Highness") ) (defrule (resource-found wood) (building-type-count-total lumber-camp < 2) (dropsite-min-distance wood > 5) (can-build lumber-camp) => (build lumber-camp) (chat-local-to-self "Wood here") ) (defrule (resource-found gold) (building-type-count-total mining-camp < 2) (dropsite-min-distance gold > 7) => (build mining-camp) (chat-local-to-self "We have built a mine for gold Princess") (disable-self) ) (defrule (building-type-count-total blacksmith less-than 1) (can-build blacksmith) => (build blacksmith) (chat-local-to-self "blacksmith built Your Highness") ) (defrule (building-type-count-total stable less-than 1) (can-build stable) => (build stable) (chat-local-to-self "Stable was built Princess") ) (defrule (unit-type-count-total scout-cavalry-line < 1) (can-train scout-cavalry-line) => (train scout-cavalry-line) (chat-local-to-self "I will look for the enemy your Highness") ) (defrule (goal 16 0) (unit-type-count-total scout-cavalry > 1) (can-research-with-escrow ri-light-cavalry) => (release-escrow wood) (release-escrow food) (release-escrow gold) (release-escrow stone) (research ri-light-cavalry) ) (defrule (unit-type-count-total knight-line > 12) (can-train knight-line) => (train knight-line) (chat-local-to-self "knights") ) (defrule (building-type-count-total archery-range less-than 1) (can-build archery-range) => (build archery-range) (chat-local-to-self "range built princess") ) (defrule (unit-type-count-total archer less-than 9) (can-train archer) => (train archer) (chat-local-to-self "Archer created Princess") ) (defrule (unit-type-count-total skirmisher less-than 5) (can-train skirmisher) => (train skirmisher) (chat-local-to-self "skirmisher") ) (defrule (unit-type-count-total cavalry-archer > 5) (can-train cavalry-archer) => (train cavalry-archer) (chat-local-to-self "Cavalry archer") ) (defrule (goal 16 0) (unit-type-count cavalry-archer > 3) (can-research-with-escrow ri-heavy-cavalry-archer) => (release-escrow wood) (release-escrow food) (release-escrow gold) (release-escrow stone) (research ri-heavy-cavalry-archer) (chat-local-to-self "heavy cavalry-archer") ) (defrule (unit-type-count-total heavy-cavalry-archer > 8) (can-train heavy-cavalry-archer) => (train heavy-cavalry-archer) (chat-local-to-self "Heavy cavalry archer") ) (defrule (building-type-count-total siege-workshop less-than 1) (can-build siege-workshop) => (build siege-workshop) (chat-local-to-self "We are building up our army for you Princess") ) (defrule (not(town-under-attack)) (unit-type-count-total battering-ram-line < 3) (can-train battering-ram-line) => (train battering-ram-line) (chat-local-to-self "ram those buildings/enemies") ) (defrule (unit-type-count-total scorpion > 5) (can-train scorpion) => (train scorpion) (chat-local-to-self "Scorpion") ) (defrule (goal 16 0) (unit-type-count scorpion > 5) (can-research-with-escrow ri-heavy-scorpion) => (release-escrow wood) (release-escrow food) (release-escrow gold) (release-escrow stone) (research ri-heavy-scorpion) (chat-local-to-self "research heavy scorpion") ) (defrule (goal 16 0) (unit-type-count battering-ram > 3) (can-research-with-escrow ri-capped-ram) => (release-escrow wood) (release-escrow food) (release-escrow gold) (release-escrow stone) (research ri-capped-ram) (chat-local-to-self "research capped ram") ) (defrule (food-amount less-than 150") (building-type-count-total farm less-than 10) (can-build farm) => (build farm) (chat-local-to-self "A farm was built for you Your Highness") ) (defrule (building-type-count-total dock less-than 1) (can-build dock) => (build dock) (chat-local-to-self "Dock built") ) (defrule (building-type-count-total dock > 0) (unit-type-count-total fishing-ship less-than 5) (can-train-with-escrow fishing-ship) => (release-escrow wood) (train fishing-ship) (chat-local-to-self "fishing ship") ) (defrule (current-age == feudal-age) (gold-amount >= 450) (food-amount >= 300) (commodity-buying-price food <= 110) (can-buy-commodity food) => (chat-local-to-self "We need food your Highness") (buy-commodity food) ) (defrule (current-age == feudal-age) (gold-amount >= 450) (wood-amount <= 300) (commodity-buying-price wood <= 110) (can-buy-commodity wood) => (chat-local-to-self "We need wood Princess") (buy-commodity wood) ) (defrule (current-age == feudal-age) (wood-amount >= 800) (or (food-amount <= 250) (gold-amount <= 150) ) (commodity-selling-price wood >= 40) (can-sell-commodity wood) => (chat-local-to-self "food panic sell wood Your Highness") (sell-commodity wood) ) (defrule (current-age == feudal-age) (food-amount >= 1300) (or (wood-amount < 200) (gold-amount < 200) ) (can-sell-commodity food) => (chat-local-to-self "Sell excess food Princess") (sell-commodity food) ) (defrule (current-age == feudal-age) (stone-amount >= 900) (or (wood-amount < 200) (gold-amount < 200) ) (can-sell-commodity stone) => (chat-local-to-self "Sell excess stone Your Highness") (sell-commodity stone) ) (defrule (true) => (enable-wall-placement 2) (disable-self) ) (defrule (building-type-count-total blacksmith > 0) (wall-completed-percentage 2 < 100) => (build-wall 2 stone-wall-line) ) (defrule (wall-completed-percentage 2 == 100) (building-type-count-total gate < 3) (can-build-gate-with-escrow 2) => (release-escrow stone) (build-gate 2) (chat-local-to-self "Building a gate.") ) ;escrow release excess supply (defrule (or (or (escrow-amount wood > 1500) (escrow-amount food > 1500)) (or (escrow-amount gold > 1500) (escrow-amount stone > 1500)) ) => (release-escrow wood) (release-escrow food) (release-escrow gold) (release-escrow stone) (set-goal 16 0) ) ;set initial goal for escrow to make sure there are villagers (defrule (true) => (set-goal 16 0) (disable-self) ) (defrule (unit-type-count villager >= 10) => (set-goal 16 0) (disable-self) ) ;sets escrow (defrule (true) => (set-escrow-percentage wood 30) (set-escrow-percentage food 30) (set-escrow-percentage gold 30) (set-escrow-percentage stone 30) ) (defrule (resource-found gold) (building-type-count-total mining-camp < 2) (dropsite-min-distance gold > 7) (can-build mining-camp) => (build mining-camp) (chat-local-to-self "Place gold here") ) (defrule (resource-found stone) (building-type-count-total mining-camp < 2) (dropsite-min-distance stone > 8) (can-build mining-camp) => (build mining-camp) (chat-local-to-self "Place rocks here") ) (defrule (goal 16 0) (or (players-stance any-computer ally) (players-stance any-human ally) ) (can-research-with-escrow ri-coinage) => (release-escrow wood) (release-escrow food) (release-escrow gold) (release-escrow stone) (research ri-coinage) (chat-local-to-self "research coinage") ) (defrule (goal 16 0) (or (players-stance any-computer ally) (players-stance any-human ally) ) (can-research-with-escrow ri-banking) => (release-escrow wood) (release-escrow food) (release-escrow gold) (release-escrow stone) (research ri-banking) (chat-local-to-self "research banking") ) ;feudal to castle age (defrule (unit-type-count-total villager > 22) (current-age == feudal-age) => (set-goal 16 98) (disable-self) ) (defrule (goal 16 98) (wood-amount greater-than 900) (can-sell-commodity wood) => (chat-local-to-self "selling wood for castle gold") (sell-commodity wood) ) (defrule (goal 16 98) (food-amount greater-or-equal 1300) (can-sell-commodity food) => (chat-local-to-self "selling food for castle gold") (sell-commodity food) ) (defrule (goal 16 98) (stone-amount greater-than 900) (commodity-selling-price stone greater-than 40) (can-sell-commodity stone) => (chat-local-to-self "selling stone for castle gold") (sell-commodity stone) ) (defrule (goal 16 98) (gold-amount greater-or-equal 1000) (commodity-buying-price food greater-than 110) (can-buy-commodity food) => (chat-local-to-self "buying castle food") (buy-commodity food) ) (defrule (goal 16 98) (can-research-with-escrow castle-age) => (release-escrow wood) (release-escrow food) (release-escrow gold) (release-escrow stone) (research castle-age) (chat-local-to-self "Rising to Castle age") (set-goal 16 0) ) (defrule (current-age == castle-age) => (set-strategic-number sn-percent-civilian-explorers 0) (set-strategic-number sn-percent-civilian-gatherers 75) (set-strategic-number sn-percent-civilian-builders 25) (set-strategic-number sn-cap-civilian-explorers 0) (set-strategic-number sn-cap-civilian-gatherers 100) (set-strategic-number sn-food-gatherer-percentage 38) (set-strategic-number sn-gold-gatherer-percentage 22) (set-strategic-number sn-wood-gatherer-percentage 35) (set-strategic-number sn-stone-gatherer-percentage 5) (set-strategic-number sn-maximum-gold-drop-distance 12) (set-strategic-number sn-maximum-food-drop-distance 12) (set-strategic-number sn-maximum-stone-drop-distance 12) (disable-self) ) (defrule (building-type-count-total monastery less-than 1) (can-build monastery) => (build monastery) (chat-local-to-self "Monastery for Relics Princess") ) (defrule (unit-type-count-total monk > 3) (can-train monk) => (train monk) (chat-local-to-self "Monk get relics") ) (defrule (building-type-count-total university less-than 1) (can-build university) => (build university) (chat-local-to-self "here's a university for you Princess") ) (defrule (unit-type-count-total villager less-than 35) (can-train villager) => (train villager) (chat-local-to-self "We trained another villager for you Princess") ) (defrule (current-age == castle-age) (building-type-count-total castle less-than 1) (can-build castle) => (build castle) (chat-local-to-self "Here's a Castle for you Princess") ) (defrule (unit-type-count-total my-unique-unit-line < 20) (can-train my-unique-unit-line) => (train my-unique-unit-line) (chat-local-to-self "Aida's army") ) (defrule (goal 16 0) (can-research-with-escrow my-unique-unit-upgrade) => (release-escrow wood) (release-escrow food) (release-escrow gold) (release-escrow stone) (research my-unique-unit-upgrade) (chat-local-to-self "research elite uniques") ) (defrule (current-age == castle-age) (true) => (set-strategic-number sn-task-ungrouped-soldiers 3) (set-strategic-number sn-percent-attack-soldiers 70) (set-strategic-number sn-special-attack-type1 1) (set-strategic-number sn-group-form-distance 15) (disable-self) ) (defrule (current-age == castle-age) (gold-amount >= 900) (wood-amount <= 150) (commodity-buying-price wood <= 150) (can-buy-commodity wood) => (chat-local-to-self "wood panic") (buy-commodity wood) ) (defrule (current-age == castle-age) (gold-amount >= 600) (wood-amount <= 300) (can-buy-commodity wood) => (chat-local-to-self "wood panic") (buy-commodity wood) ) (defrule (current-age == castle-age) (gold-amount >= 800) (food-amount <= 300) (commodity-buying-price food <= 150) (can-buy-commodity food) => (chat-local-to-self "food panic") (buy-commodity food) ) (defrule (current-age == castle-age) (gold-amount >= 700) (wood-amount <= 250) (can-buy-commodity wood) => (chat-local-to-self "wood panic") (buy-commodity wood) ) (defrule (current-age == castle-age) (gold-amount >= 1000) (stone-amount <= 150) (commodity-buying-price stone <= 150) (can-buy-commodity stone) => (chat-local-to-self "stone panic") (buy-commodity stone) ) (defrule (current-age == castle-age) (wood-amount >= 1000) (or (food-amount < 300) (gold-amount < 400) ) (commodity-buying-price wood >= 45) (can-sell-commodity wood) => (chat-local-to-self "gold panic sell wood Princess") (sell-commodity wood) ) (defrule (current-age == castle-age) (food-amount >= 1300) (or (gold-amount < 200) (wood-amount < 300) ) (can-sell-commodity food) => (chat-local-to-self "sell excess food princess") (sell-commodity food) ) (defrule (current-age == castle-age) (stone-amount >= 800) (or (gold-amount < 200) (wood-amount < 300) ) (can-sell-commodity stone) => (chat-local-to-self "sell excess stone princess") (sell-commodity stone) ) (defrule (current-age == castle-age) (building-type-count town-center less-than 1) (can-build town-center) => (build town-center) ) ;castle to imperial age (defrule (unit-type-count-total villager > 25) (current-age == castle-age) => (set-goal 16 99) (disable-self) ) (defrule (goal 16 99) (wood-amount greater-than 950) (can-sell-commodity wood) => (chat-local-to-self "selling wood for imperial gold") (sell-commodity wood) ) (defrule (goal 16 99) (food-amount greater-or-equal 1400) (can-sell-commodity food) => (chat-local-to-self "selling food for imperial gold") (sell-commodity food) ) (defrule (goal 16 99) (gold-amount greater-or-equal 1000) (commodity-buying-price food less-than 150) (can-buy-commodity food) => (chat-local-to-self "buying food for the imperial age") (buy-commodity food) ) (defrule (goal 16 99) (stone-amount greater-than 800) (commodity-selling-price stone greater-than 40) (can-sell-commodity stone) => (chat-local-to-self "selling stone for imperial gold") (sell-commodity stone) ) (defrule (goal 16 99) (can-research-with-escrow imperial-age) => (release-escrow wood) (release-escrow food) (release-escrow gold) (release-escrow stone) (research imperial-age) (chat-local-to-self "rising to imperial age") (set-goal 16 0) ) (defrule (current-age == imperial-age) => (set-strategic-number sn-percent-civilian-explorers 0) (set-strategic-number sn-percent-civilian-gatherers 87) (set-strategic-number sn-percent-civilian-builders 13) (set-strategic-number sn-cap-civilian-explorers 0) (set-strategic-number sn-cap-civilian-gatherers 100) (set-strategic-number sn-food-gatherer-percentage 40) (set-strategic-number sn-gold-gatherer-percentage 25) (set-strategic-number sn-wood-gatherer-percentage 30) (set-strategic-number sn-stone-gatherer-percentage 5) (set-strategic-number sn-maximum-gold-drop-distance 12) (set-strategic-number sn-maximum-food-drop-distance 12) (set-strategic-number sn-maximum-stone-drop-distance 12) (disable-self) ) (defrule (current-age == imperial-age) (true) => (set-strategic-number sn-task-ungrouped-soldiers 5) (set-strategic-number sn-percent-attack-soldiers 90) ) (defrule (building-type-count-total trebuchet < 3) (can-train trebuchet) => (train trebuchet) (chat-local-to-self "Created a trebuchet Princess") ) (defrule (gold-amount >= 1300) (wood-amount <= 350) (can-buy-commodity wood) => (chat-local-to-self "wood panic") (buy-commodity wood) ) (defrule (gold-amount >= 1200) (food-amount <= 300) (can-buy-commodity food) => (chat-local-to-self "food panic") (buy-commodity food) ) (defrule (gold-amount >= 1200) (stone-amount <= 100) (can-buy-commodity stone) => (chat-local-to-self "stone panic") (buy-commodity stone) ) (defrule (wood-amount >= 1200) (or (gold-amount < 300) (food-amount < 300) ) (can-sell-commodity wood) => (chat-local-to-self "gold panic sell wood princess") (sell-commodity wood) ) (defrule (food-amount >= 1300) (or (gold-amount < 300) (wood-amount < 300) ) (can-sell-commodity food) => (chat-local-to-self "sell excess food princess") (sell-commodity food) ) (defrule (stone-amount >= 900) (or (or (gold-amount < 200) (wood-amount < 250) ) (food-amount < 300) ) (can-sell-commodity food) => (chat-local-to-self "sell excess stone princess") (sell-commodity stone) ) ;/////////////ATTACK THE ENEMY//////////// (defrule (game-time > 1600) => (attack-now) (enable-timer 10 1600) (disable-self) (chat-local-to-self "Prepare for the 1st attack") ) (defrule (timer-triggered 10) (defend-soldier-count >= 20) => (attack-now) (disable-timer 10) (enable-timer 10 1700) (chat-local-to-self "Next attack") ) ;////////////////////////////RESEARCH TO UPGRADE/////////////// (defrule (goal 16 0) (can-research ri-forging) => (release-escrow wood) (release-escrow food) (release-escrow gold) (release-escrow stone) (research ri-forging) (chat-local-to-self "research forging") ) (defrule (goal 16 0) (can-research ri-fletching) => (release-escrow wood) (release-escrow food) (release-escrow gold) (release-escrow stone) (research ri-fletching) (chat-local-to-self "research fletching") ) (defrule (goal 16 0) (can-research-with-escrow ri-siege-engineers) => (release-escrow wood) (release-escrow food) (release-escrow gold) (release-escrow stone) (research ri-siege-engineers) (chat-local-to-self "research siege-engineers") ) (defrule (goal 16 0) (can-research-with-escrow ri-hoardings) => (release-escrow wood) (release-escrow food) (release-escrow gold) (release-escrow stone) (research ri-hoardings) (chat-local-to-self "research hoardings") ) (defrule (goal 16 0) (can-research-with-escrow ri-chemistry) => (release-escrow wood) (release-escrow food) (release-escrow gold) (release-escrow stone) (research ri-chemistry) (chat-local-to-self "research chemistry") ) (defrule (goal 16 0) (can-research-with-escrow ri-conscription) => (release-escrow wood) (release-escrow food) (release-escrow gold) (release-escrow stone) (research ri-conscription) (chat-local-to-self "research conscription") ) ;///////////Unit Upgrades////////// (defrule (goal 16 0) (or (unit-type-count-total militiaman-line > 3) (unit-type-count-total spearman-line > 3) ) (can-research-with-escrow ri-plate-mail) => (release-escrow wood) (release-escrow food) (release-escrow gold) (release-escrow stone) (research ri-plate-mail) ) (defrule (goal 16 0) (or (unit-type-count-total militiaman-line > 3) (unit-type-count-total spearman-line > 3) ) (can-research-with-escrow ri-squires) => (release-escrow wood) (release-escrow food) (release-escrow gold) (release-escrow stone) (research ri-squires) (chat-local-to-self "research squires") ) (defrule (goal 16 0) (unit-type-count man-at-arms > 3) (can-research-with-escrow ri-long-swordsman) => (release-escrow wood) (release-escrow food) (release-escrow gold) (release-escrow stone) (research ri-long-swordsman) (chat-local-to-self "reserach long swordsman") ) (defrule (unit-type-count-total long-swordsman less-than 6) (can-train long-swordsman) => (train long-swordsman) (chat-local-to-self "Long swordsman") ) (defrule (goal 16 0) (unit-type-count long-swordsman > 5) (can-research-with-escrow ri-two-handed-swordsman) => (release-escrow wood) (release-escrow food) (release-escrow gold) (release-escrow stone) (research ri-two-handed-swordsman) ) (defrule (goal 16 0) (unit-type-count two-handed-swordsman > 3) (can-research-with-escrow ri-champion) => (release-escrow wood) (release-escrow food) (release-escrow gold) (release-escrow stone) (research ri-champion) ) (defrule (unit-type-count-total two-handed-swordsman > 5) (can-train two-handed-swordsman) => (train two-handed-swordsman) (chat-local-to-self "Two handed swordsman") ) (defrule (goal 16 0) (or (unit-type-count-total archer-line > 3) (or (unit-type-count-total skirmisher-line > 2) (unit-type-count-total cavalry-archer-line > 2) ) ) (can-research-with-escrow ri-padded-archer-armor) => (release-escrow wood) (release-escrow food) (release-escrow gold) (release-escrow stone) (research ri-padded-archer-armor) ) (defrule (goal 16 0) (or (unit-type-count-total archer-line > 3) (or (unit-type-count-total skirmisher-line > 2) (unit-type-count-total cavalry-archer-line > 3) ) ) (can-research-with-escrow ri-leather-archer-armor) => (release-escrow wood) (release-escrow food) (release-escrow gold) (release-escrow stone) (research ri-leather-archer-armor) ) (defrule (goal 16 0) (unit-type-count archer > 3) (can-research-with-escrow ri-crossbow) => (release-escrow wood) (release-escrow food) (release-escrow gold) (release-escrow stone) (research ri-crossbow) (chat-local-to-self "research crossbow") ) (defrule (unit-type-count-total crossbowman less-than 9) (can-train crossbowman) => (train crossbowman) (chat-local-to-self "Here's a crossbowman for your army Princess") ) (defrule (goal 16 0) (unit-type-count crossbowman > 3) (can-research-with-escrow ri-arbalest) => (release-escrow wood) (release-escrow food) (release-escrow gold) (release-escrow stone) (research ri-arbalest) (chat-local-to-self "research arbalest") ) (defrule (goal 16 0) (or (unit-type-count-total knight-line > 3) (unit-type-count-total scout-cavalry-line > 1) ) (can-research-with-escrow ri-scale-barding) => (release-escrow wood) (release-escrow food) (release-escrow gold) (release-escrow stone) (research ri-scale-barding) ) (defrule (goal 16 0) (or (unit-type-count-total cavalry-archer-line > 3) (or (unit-type-count-total knight-line > 3) (unit-type-count-total scout-cavalry-line > 1) ) ) (can-research-with-escrow ri-husbandry) => (release-escrow wood) (release-escrow food) (release-escrow gold) (release-escrow stone) (research ri-scale-barding) ) (defrule (goal 16 0) (unit-type-count-total camel > 3) (can-research-with-escrow ri-heavy-camel) => (release-escrow wood) (release-escrow food) (release-escrow gold) (release-escrow stone) (research ri-heavy-camel) ) (defrule (unit-type-count-total heavy-camel > 6) (can-train heavy-camel) => (train heavy-camel) (chat-local-to-self "Heavy camel") ) (defrule (goal 16 0) (unit-type-count-total knight > 3) (can-research-with-escrow ri-cavalier) => (release-escrow wood) (release-escrow food) (release-escrow gold) (release-escrow stone) (research ri-cavalier) ) (defrule (unit-type-count-total cavalier > 9) (can-train cavalier) => (train cavalier) ) (defrule (unit-type-count-total cavalier > 5) (can-research-with-escrow ri-paladin) => (release-escrow wood) (release-escrow food) (release-escrow gold) (release-escrow stone) (research ri-paladin) ) (defrule (unit-type-count-total paladin > 8) (can-train paladin) => (train paladin) (chat-local-to-self "Paladin Princess") ) ;///////////////////////////////ECONOMIC ASSETS////////////// (defrule (goal 16 0) (can-research-with-escrow ri-gold-mining) => (release-escrow wood) (release-escrow food) (release-escrow gold) (release-escrow stone) (research ri-gold-mining) (chat-local-to-self "research gold mining") ) (defrule (goal 16 0) (building-type-count mining-camp > 5) (can-research-with-escrow ri-stone-mining) => (release-escrow wood) (release-escrow food) (release-escrow gold) (release-escrow stone) (research ri-stone-mining) (chat-local-to-self "research stone mining") ) (defrule (goal 16 0) (can-research-with-escrow ri-horse-collar) => (release-escrow wood) (release-escrow food) (release-escrow gold) (release-escrow stone) (research ri-horse-collar) (chat-local-to-self "research horse collar") ) (defrule (goal 16 0) (can-research-with-escrow ri-crop-rotation) => (release-escrow wood) (release-escrow food) (release-escrow gold) (release-escrow stone) (research ri-crop-rotation) (chat-local-to-self "research crop rotation") ) (defrule (goal 16 0) (can-research-with-escrow ri-bow-saw) => (release-escrow wood) (release-escrow food) (release-escrow gold) (release-escrow stone) (research ri-bow-saw) (chat-local-to-self "research bow-saw") ) (defrule (goal 16 0) (can-research-with-escrow ri-two-man-saw) => (release-escrow wood) (release-escrow food) (release-escrow gold) (release-escrow stone) (research ri-two-man-saw) (chat-local-to-self "research two-man-saw") ) (defrule (goal 16 0) (can-research-with-escrow ri-masonry) => (release-escrow wood) (release-escrow food) (release-escrow gold) (release-escrow stone) (research ri-masonry) (chat-local-to-self "research masonry") ) (defrule (goal 16 0) (can-research-with-escrow ri-architecture) => (release-escrow wood) (release-escrow food) (release-escrow gold) (release-escrow stone) (research ri-architecture) (chat-local-to-self "research architecture") ) (defrule (goal 16 0) (can-research-with-escrow ri-guilds) => (release-escrow wood) (release-escrow food) (release-escrow gold) (release-escrow stone) (research ri-guilds) (chat-local-to-self "research guilds") ) (defrule (goal 16 0) (current-age == dark-age) (can-research-with-escrow ri-loom) => (release-escrow wood) (release-escrow food) (release-escrow gold) (release-escrow stone) (research ri-loom) (chat-local-to-self "research loom") ) ;//////////////////////////MONK ITEMS//////////////////////// (defrule (goal 16 0) (unit-type-count-total monk > 3) (can-research-with-escrow ri-block-printing) => (release-escrow wood) (release-escrow food) (release-escrow gold) (release-escrow stone) (research ri-block-printing) (chat-local-to-self "research block-printing") ) (defrule (building-type-count-total watch-tower less-than 3) (can-build watch-tower) => (build watch-tower) (chat-local-to-self "Watch tower") ) (defrule (goal 16 0) (building-type-count-total watch-tower > 1) (can-research-with-escrow ri-guard-tower) => (release-escrow wood) (release-escrow food) (release-escrow gold) (release-escrow stone) (research ri-guard-tower) (chat-local-to-self "research guard tower") ) (defrule (building-type-count-total guard-tower > 1) (can-build guard-tower) => (build guard-tower) (chat-local-to-self "built guard tower Princess") ) (defrule (goal 16 0) (or (building-type-count-total castle > 0) (building-type-count-total watch-tower-line > 3) ) (can-research-with-escrow ri-murder-holes) => (release-escrow wood) (release-escrow food) (release-escrow gold) (release-escrow stone) (research ri-murder-holes) (chat-local-to-self "research murder holes") ) (defrule (goal 16 0) (building-type-count-total castle > 0) (can-research-with-escrow ri-fortified-wall) => (release-escrow wood) (release-escrow food) (release-escrow gold) (release-escrow stone) (research ri-fortified-wall) (chat-local-to-self "research fortified wall") )