Kailric
Jack of All Trades
That is slow a bit slow, but sort of needed. The static water plotgroup could tell that two cities are connected, but the trader can't move through the pirate blocking the chokepoint. That can only be fixed by making real water plotgroups for each player. That might actually make sense as it would make sense as it would only spread across explored plots.
There could be a third plotgroup system for costal plots. I wonder if that is overdoing it though.
It does beg the question about "chokepoints" and the AI. As a Player could just steer around a blockade attempt. The AI however, would break automate once it spied an Enemy unit I would presume, so then the Player could decided what to do about it. Which reminds me, I need to add in the break automation code for AI Traders as I haven't done that yet. I left that out so it wouldn't mess with testing.
Looking at the code I remember one issue. I added code for Plotgroups to store all None Player city info, so you can tell what foreign Cities are connected to your Plotgroups. The code loops these cities only. This won't work well for Ships as some cities they could trade with won't be included. So, for Ships to be AI Traders I would need to write code for them. I would have to cycle all Player Cities and do qualifying checks to see if the city is accessible.