-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add AI visibility handling logic and fix some bugs
Add mechanism for AI to keep track of what plots other AI players can see. Now instead of cheating by checking what another player can see directly, it will now base its knowledge on known enemy terrory and unit placements. Currently does not handle the case where an enemy unit moves during your turn (retreating). Shouldn't have a big impact overall. Fix AI sometimes not clearing their route caches if they only have one city. Fix AI never building improvements near their own capital if they are at war with a civ with a spy there (part of new visibility mechanism). Possibly fixes AI mistakenly cancelling sneak operations based on bad information. Fix AI never building lower level roads even when it's supposed to. Fix vassals removing their master's roads. Masters will now build routes through vassals' lands when needed. Fix AI being less prone to remove roads when losing gold, rather than the other way round. Minor cleanup regarding road building and removing. Should fix potential Iroquis and Songhai issues. Fix incorrect planned road maintenance cost calculation. AI will no longer build villages on roads that are about to be removed. AI can build routes through minor civs even if they don't have a quest for it. AI will now not avoid building routes through their vassals' lands. Routes between non-capital cities also benefit villages and towns, update pathfinding to take this into account. Up route removal priority a little bit. Remove unused variables. Include Towns in route pathfinding logic. Clean up some route logic, always build profitable roads, even if we are losing gold. Don't build railroads for city state quests.
- Loading branch information
1 parent
ca2e5f6
commit d8e4a29
Showing
11 changed files
with
328 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.