Support for Persians, should all work properly. Also makes territory expansion proportionally lower priority.
This was SVN commit r10561.
This commit is contained in:
parent
f80f1fb86b
commit
514b22a89e
@ -96,7 +96,7 @@ var EconomyManager = Class({
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
// Celt building list
|
// Iberian building list
|
||||||
else if (gameState.displayCiv() == "iber"){
|
else if (gameState.displayCiv() == "iber"){
|
||||||
this.villageBuildings = [
|
this.villageBuildings = [
|
||||||
{
|
{
|
||||||
@ -121,6 +121,31 @@ var EconomyManager = Class({
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
// Persian building list
|
||||||
|
else if (gameState.displayCiv() == "pers"){
|
||||||
|
this.villageBuildings = [
|
||||||
|
{
|
||||||
|
"template": "structures/{civ}_scout_tower",
|
||||||
|
"priority": 105,
|
||||||
|
"count": 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"template": "structures/{civ}_field",
|
||||||
|
"priority": 103,
|
||||||
|
"count": 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"template": "structures/{civ}_barracks",
|
||||||
|
"priority": 101,
|
||||||
|
"count": 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"template": "structures/{civ}_field",
|
||||||
|
"priority": 70,
|
||||||
|
"count": 2,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
// Fallback option just in case
|
// Fallback option just in case
|
||||||
else {
|
else {
|
||||||
@ -235,6 +260,26 @@ var EconomyManager = Class({
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Perian building list
|
||||||
|
else if (gameState.displayCiv() == "pers"){
|
||||||
|
this.targetBuildings = [
|
||||||
|
{
|
||||||
|
"template": "structures/pers_fortress",
|
||||||
|
"priority": 80,
|
||||||
|
"count": 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"template": "structures/pers_stables",
|
||||||
|
"priority": 75,
|
||||||
|
"count": 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"template": "structures/pers_apadana",
|
||||||
|
"priority": 50,
|
||||||
|
"count": 1,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
}
|
||||||
// Fallback option just in case
|
// Fallback option just in case
|
||||||
else {
|
else {
|
||||||
this.targetBuildings = [
|
this.targetBuildings = [
|
||||||
@ -424,6 +469,26 @@ var EconomyManager = Class({
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (gameState.displayCiv() == "pers"){
|
||||||
|
if (workNumMod < 0.95){
|
||||||
|
planGroups.economyPersonnel.addPlan(priority,
|
||||||
|
new UnitTrainingPlan(gameState,
|
||||||
|
"units/{civ}_support_female_citizen", 2, { "role": "worker" })
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else if (workNumMod > 1.6) {
|
||||||
|
planGroups.economyPersonnel.addPlan(priority,
|
||||||
|
new UnitTrainingPlan(gameState,
|
||||||
|
"units/{civ}_infantry_spearman_b", 2, { "role": "militia" })
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
planGroups.economyPersonnel.addPlan(priority,
|
||||||
|
new UnitTrainingPlan(gameState,
|
||||||
|
"units/{civ}_infantry_archer_b", 2, { "role": "militia" })
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
planGroups.economyPersonnel.addPlan(priority,
|
planGroups.economyPersonnel.addPlan(priority,
|
||||||
new UnitTrainingPlan(gameState,
|
new UnitTrainingPlan(gameState,
|
||||||
@ -699,7 +764,7 @@ var EconomyManager = Class({
|
|||||||
|
|
||||||
if (distcheckoldII > 5000 && foundationsyes == true){
|
if (distcheckoldII > 5000 && foundationsyes == true){
|
||||||
//JuBotAI.prototype.chat("Building Mill");
|
//JuBotAI.prototype.chat("Building Mill");
|
||||||
planGroups.economyConstruction.addPlan(150,
|
planGroups.economyConstruction.addPlan(100,
|
||||||
new BuildingConstructionPlanEcon(gameState, whatshallwebuild, 1, currentposformill)
|
new BuildingConstructionPlanEcon(gameState, whatshallwebuild, 1, currentposformill)
|
||||||
);
|
);
|
||||||
//JuBotAI.prototype.chat("Gathering");
|
//JuBotAI.prototype.chat("Gathering");
|
||||||
|
@ -603,6 +603,39 @@ var MilitaryAttackManager = Class({
|
|||||||
this.trainSomeTroops(gameState, planGroups, "units/{civ}_infantry_spearman_b");
|
this.trainSomeTroops(gameState, planGroups, "units/{civ}_infantry_spearman_b");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//Persians
|
||||||
|
else if (gameState.displayCiv() == "pers"){
|
||||||
|
if (this.attacknumbers < 0.15){
|
||||||
|
this.trainSomeTroops(gameState, planGroups, "units/pers_champion_infantry");
|
||||||
|
}
|
||||||
|
else if (this.attacknumbers < 0.25){
|
||||||
|
this.trainSomeTroops(gameState, planGroups, "units/pers_champion_cavalry");
|
||||||
|
}
|
||||||
|
else if (this.attacknumbers < 0.35){
|
||||||
|
this.trainSomeTroops(gameState, planGroups, "units/{civ}_infantry_archer_b");
|
||||||
|
}
|
||||||
|
else if (this.attacknumbers < 0.5){
|
||||||
|
this.trainSomeTroops(gameState, planGroups, "units/{civ}_infantry_spearman_b");
|
||||||
|
}
|
||||||
|
else if (this.attacknumbers < 0.55){
|
||||||
|
this.trainSomeTroops(gameState, planGroups, "units/{civ}_infantry_javelinist_b");
|
||||||
|
}
|
||||||
|
else if (this.attacknumbers < 0.65){
|
||||||
|
this.trainSomeTroops(gameState, planGroups, "units/{civ}_cavalry_swordsman_b");
|
||||||
|
}
|
||||||
|
else if (this.attacknumbers < 0.75){
|
||||||
|
this.trainSomeTroops(gameState, planGroups, "units/{civ}_cavalry_spearman_b");
|
||||||
|
}
|
||||||
|
else if (this.attacknumbers < 0.85){
|
||||||
|
this.trainSomeTroops(gameState, planGroups, "units/{civ}_cavalry_archer_b");
|
||||||
|
}
|
||||||
|
else if (this.attacknumbers < 0.9){
|
||||||
|
this.trainMachine(gameState, planGroups, "units/pers_champion_cavalry");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.trainSomeTroops(gameState, planGroups, "units/{civ}_infantry_spearman_b");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Cav raiders training list
|
// Cav raiders training list
|
||||||
else if (this.killstrat == 2){
|
else if (this.killstrat == 2){
|
||||||
@ -615,12 +648,24 @@ var MilitaryAttackManager = Class({
|
|||||||
else if (this.attacknumbers < 0.4 && gameState.displayCiv() == "iber"){
|
else if (this.attacknumbers < 0.4 && gameState.displayCiv() == "iber"){
|
||||||
this.trainSomeTroops(gameState, planGroups, "units/iber_super_cavalry");
|
this.trainSomeTroops(gameState, planGroups, "units/iber_super_cavalry");
|
||||||
}
|
}
|
||||||
|
else if (this.attacknumbers < 0.25 && gameState.displayCiv() == "pers"){
|
||||||
|
this.trainSomeTroops(gameState, planGroups, "units/pers_cavalry_archer_b");
|
||||||
|
}
|
||||||
else if (this.attacknumbers < 0.6 && gameState.displayCiv() == "celt"){
|
else if (this.attacknumbers < 0.6 && gameState.displayCiv() == "celt"){
|
||||||
this.trainSomeTroops(gameState, planGroups, "units/{civ}_cavalry_swordsman_b");
|
this.trainSomeTroops(gameState, planGroups, "units/{civ}_cavalry_swordsman_b");
|
||||||
}
|
}
|
||||||
else if (this.attacknumbers < 0.6 && gameState.displayCiv() == "hele"){
|
else if (this.attacknumbers < 0.6 && gameState.displayCiv() == "hele"){
|
||||||
this.trainSomeTroops(gameState, planGroups, "units/hele_champion_cavalry_mace");
|
this.trainSomeTroops(gameState, planGroups, "units/hele_champion_cavalry_mace");
|
||||||
}
|
}
|
||||||
|
else if (this.attacknumbers < 0.5 && gameState.displayCiv() == "pers"){
|
||||||
|
this.trainSomeTroops(gameState, planGroups, "units/pers_cavalry_javelinist_b");
|
||||||
|
}
|
||||||
|
else if (this.attacknumbers < 0.75 && gameState.displayCiv() == "pers"){
|
||||||
|
this.trainSomeTroops(gameState, planGroups, "units/pers_cavalry_swordsman_b");
|
||||||
|
}
|
||||||
|
else if (gameState.displayCiv() == "pers"){
|
||||||
|
this.trainSomeTroops(gameState, planGroups, "units/pers_cavalry_spearman_b");
|
||||||
|
}
|
||||||
else if (gameState.displayCiv() == "iber"){
|
else if (gameState.displayCiv() == "iber"){
|
||||||
this.trainSomeTroops(gameState, planGroups, "units/{civ}_cavalry_spearman_b");
|
this.trainSomeTroops(gameState, planGroups, "units/{civ}_cavalry_spearman_b");
|
||||||
}
|
}
|
||||||
@ -684,6 +729,18 @@ var MilitaryAttackManager = Class({
|
|||||||
this.trainSomeTroops3prong(gameState, planGroups, "units/{civ}_infantry_spearman_b");
|
this.trainSomeTroops3prong(gameState, planGroups, "units/{civ}_infantry_spearman_b");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//Pers
|
||||||
|
else if (gameState.displayCiv() == "pers"){
|
||||||
|
if (this.attacknumbers < 0.25){
|
||||||
|
this.trainSomeTroops3prong(gameState, planGroups, "units/{civ}_cavalry_spearman_b");
|
||||||
|
}
|
||||||
|
else if (this.attacknumbers < 0.55){
|
||||||
|
this.trainSomeTroops3prong(gameState, planGroups, "units/{civ}_infantry_archer_b");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.trainSomeTroops3prong(gameState, planGroups, "units/{civ}_infantry_spearman_b");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Generic training list
|
// Generic training list
|
||||||
else {
|
else {
|
||||||
@ -735,6 +792,18 @@ var MilitaryAttackManager = Class({
|
|||||||
this.trainSomeTroops3prong(gameState, planGroups, "units/{civ}_infantry_spearman_b");
|
this.trainSomeTroops3prong(gameState, planGroups, "units/{civ}_infantry_spearman_b");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//Pers
|
||||||
|
else if (gameState.displayCiv() == "pers"){
|
||||||
|
if (this.attacknumbers < 0.25){
|
||||||
|
this.trainSomeTroops3prong(gameState, planGroups, "units/{civ}_cavalry_spearman_b");
|
||||||
|
}
|
||||||
|
else if (this.attacknumbers < 0.55){
|
||||||
|
this.trainSomeTroops3prong(gameState, planGroups, "units/{civ}_infantry_archer_b");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.trainSomeTroops3prong(gameState, planGroups, "units/{civ}_infantry_spearman_b");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user