Code: Select all
For each city
/* Get Hurry Production Cost for city */
current_hurry_production_cost = get_city_hurry_production_cost(city_name);
/* Get Treasury Total Gold */
current_gold = get_total_gold();
/* If the cost if hurrying production is less than 1% of total gold, buy the unit/building/wonder */
if (current_hurry_production_cost < current_gold / 100)
buy_city_item(city_name);
else
/* If city has no military units inside and it is building one of them, be less restrictive with money and use a 5% gold limit */
if (!city_has_military_units(city_name))
if (current_hurry_production_cost < current_gold / 20)
buy_city_item(city_name);
I have also noticed that the AI keeps researching science after having completed the Tech Tree. In my opinion, unless your goal is to increase score by having countless of useless Future Techs, taxes should be redirected towards Happiness or Gold. It is unbelievable how the AI keeps doing science even though it has to use 2 or 3 specialists to fight off unhappiness in cities, when it could build temples, colisseums, marketplaces, or increasing the tax on happiness, so that the citizens could be used to get food or production points.