public void UpdateDevelopmentPriorities(Nation player) { AdminAI admin = player.getAI().GetAdmin(); int turn = State.turn; int numFactories = PlayerCalculator.getNumberOfFactories(player); // int d = 5 - this.metaProgressPriorities[MyEnum.progressPriorities.investment]; int possFact = admin.getPotentialFactoryUpgradeOptions(player).Count; if (possFact > 0) { adjustDevelopmentPriorityInLightOfPotential(player); } else { this.developmentPriorities[MyEnum.developmentPriorities.buildFactory]--; } if (numFactories / turn > 5 && possFact > 0) { this.developmentPriorities[MyEnum.developmentPriorities.buildFactory]++; this.metaPriorities[MyEnum.metaPriorities.development]++; } int provDevOpts = admin.getProviceDevelopmentOptions(player).Count; if (provDevOpts > 0) { adjustDevelopmentPriorityInLightOfPotential(player); this.developmentPriorities[MyEnum.developmentPriorities.developProvince]++; this.metaPriorities[MyEnum.metaPriorities.development]++; if (this.topPriority == MyEnum.staticPriorities.industry) { this.developmentPriorities[MyEnum.developmentPriorities.developProvince]++; } else if (this.secondPriory == MyEnum.staticPriorities.industry) { this.developmentPriorities[MyEnum.developmentPriorities.developProvince]++; } } else { this.developmentPriorities[MyEnum.developmentPriorities.developProvince]--; } if (PlayerCalculator.canUpgradeFort(player)) { { this.developmentPriorities[MyEnum.developmentPriorities.fortification]++; this.metaPriorities[MyEnum.metaPriorities.development]++; } } else { this.developmentPriorities[MyEnum.developmentPriorities.fortification]--; } if (player.GetTechnologies().Contains("steam_locomotive")) { adjustDevelopmentPriorityInLightOfPotential(player); int numberRailroads = PlayerCalculator.getNumberProvRailRoads(player); if (numberRailroads < (player.getProvinces().Count + player.getColonies().Count)) { this.metaPriorities[MyEnum.metaPriorities.development]++; } { this.developmentPriorities[MyEnum.developmentPriorities.railroad]++; if (this.topPriority == MyEnum.staticPriorities.industry) { this.developmentPriorities[MyEnum.developmentPriorities.railroad]++; } else if (this.secondPriory == MyEnum.staticPriorities.industry) { this.developmentPriorities[MyEnum.developmentPriorities.railroad]++; } } } if (PlayerCalculator.canUpgradeShipyard(player)) { this.developmentPriorities[MyEnum.developmentPriorities.shipyard]++; if (this.topPriority == MyEnum.staticPriorities.colonies) { this.developmentPriorities[MyEnum.developmentPriorities.shipyard]++; } } if ((PlayerCalculator.calculateTotalResourceProduction(player) - (player.getProvinces().Count + player.getColonies().Count)) > player.industry.getNumberOfTrains()) { this.developmentPriorities[MyEnum.developmentPriorities.trains]++; if (this.topPriority == MyEnum.staticPriorities.industry) { this.developmentPriorities[MyEnum.developmentPriorities.trains]++; } else if (this.secondPriory == MyEnum.staticPriorities.industry) { this.developmentPriorities[MyEnum.developmentPriorities.trains]++; } } if (player.numberOfResourcesAndGoods() + PlayerCalculator.calculateTotalResourceProduction(player) > player.GetCurrentWarehouseCapacity()) { this.developmentPriorities[MyEnum.developmentPriorities.warehouse] += 3; } else { this.developmentPriorities[MyEnum.developmentPriorities.warehouse]--; } }