AI_civicValue and AI_unitCostPerMil to take inflation into account, so that expenses are estimated more accurately.
Increased and adjusted the figures in AI_maxUnitCostPerMil, to account for the fact that AI_unitCostPerMil is typically going to be a lot higher than before (because inflation is now counted).
Made several changes to AI_specialistValue to make city governers value great-people-points a bit more broadly. (ie. not quite as focused on having a single great-person city.)
Fixed an original BtS bug in CvGame::selectGroup which caused the game to use a domain hierarchy when selecting units by alt+clicking a tile. It would select air > sea > land. This has been fixed so that it always selects the unit graphically shown at the top of the stack.
Rewrote the culture section of AI_foundValue (and related fuctions). The AI will now be more willing to settle next to owned-but-unworkable plots, but less likely to settle next to unowned plots with a high amount of foreign culture. Ambitious AI leaders with easy access to culture may also deliberately try to settle next to foreign land.
Removed the espionage points information from the foreign advisor mouse-over text.
At-war and worst-enemy information will now be displayed for the currently selected leader's mouse-over text in the foreign advisor screen.
Leader names are now highlighted in various mouse-over texts.
The toggle War Plan mouse-over information will no longer be displayed in multiplayer games, or in when there is no one else on the team.
Added debug information for AI leader flavour and found-value traits.
Wrote a new section in AI_foundValue_bulk to discourage the AI from settling in amongst foreign cities, but to encourage them to settle near foreign borders.
(Removed the similar culture-based mechanism that I added recently.)
Fixed an original BtS bug in AI_foundValue_bulk which prevented the 'shaping' modifier from working correctly.
Fixed an original BtS bug which caused AI_foundValue to fail to recognise the value of certain bonuses. (it was using the wrong function to look for the bonus' improvement.)
Reduced the weight of the shaping modifer - to compensate for the fact that it actually works now!
Barbarians will no longer start making progress towards a tech until they have the prerequisites. (This may or may not significantly slow the barbarian tech rate. It'll need some testing.)
The barbarian tech rate now scales with game speed, world size, and starting era using the same scaling that applies to everyone else. (Originally, the tech rate was constant regardless of game settings.)
Rewrote some parts of AI_attackMove. In particular, the AI will now be a bit less likely to send solo units into enemy territory.
Deleted some obsolete code.
Emphasise production now decreases the value of commerce for the purpose of choosing plot improvements.
Tidied up some code.
Increased iClaimThreshold by a factor of 20. (!)
Added experimental code to delay the start of the barbarian's research. (currently disabled)
Right clicking on the +/- commerce rate buttons will now set the commerce rate to 100% / 0% respectively.
Changed the symmetry breaking mechanism in the pathfinder, again.
City growth & sabortage production no longer causes automated cities to reassess their production (because it's best not to clear a production order set explicitly by the player unless we have to).
For plot improvements, emphasise production now only devalues commerce if emphasise commerce isn't also set.
Fixed a bug which caused air units to automatically load themselves into a carrier if they are upgraded in a city which is at full air capacity.
Fixed a problem in CvPlayerAI::AI_unitUpdate which caused the game to hang when the above bug was triggered by the AI!
Edited CvUnit::joinGroup to improve readability.
Rewrote CvSelectionGroup::splitGroup to be faster and more accurate. (Note: although the new version is more accurate for splitting of unit AI types, it may be less accurate in splitting unit types themselves.)
Made some further adjustments to the value of drafting in AI_civicValue.
Implemented support for global happiness modifiers in civics. ("iExtraHappiness")
This includes a new line of xml in all the civics, a new item in the civics schema; dll code to load and save the new data, and to display info for it in the civic help text and civilopedia entry, and for the AI to have some awareness of how the new happiness modifier works. -- And, of course, some code to actually make the new happiness modifier do what it is meant to do in terms of happiness!
Added some more nuance to the evaluation of hurry types in AI_civicValue - rush buying will no longer be so sought-after by the AI unless it is particularly suited to their situation.
Adjusted a couple of the happiness values in AI_civicValue.
Changed the conditions the AI requires to choose a "best religion" - it no longer cares about the "purity" of religion in the civilization.
Fixed a problem which caused pathDestValid to return false if the group would need to attack a unit which is not visible. (This is an information leak.)
Tided up some code in pathDestValid.
Human-controlled workers will no longer be interrupted by border danger.
Made major changes to how food is evaluated in AI_plotValue, AI_yieldValue, and AI_specialistValue - including the addition of a new function, CvCityAI::AI_growthValuePerFood, which gives a rough scale to how beneficial food would be.
Fixed a bug which caused AI_countGoodSpecialists to return getPopulation whenever a single good specialist was available.
Restored a factor of 100 which had somehow went missing in the evaluation of great people points in AI_specialistValue.
Tweaked various numbers and formulas related to the evaluation of yields and specialists.
AI_omniGroup now (correctly) ignores the MOVE_DECLARE_WAR flag. (Previously, this could sometimes cause AI groups to choose an impossible move, and thus waste its 100 cycle maximum.)
AI_sneakAttackReady now returns false if the team is already at war.
Fixed a bug in AI_bestPlotBuild which prevented the AI from chopping jungles with camps on them.