I implemented a division by time needed and found out that staying where you are is highly valuable in these conditions, so I changed the divider to (number of ticks per turn + ticks needed). This allows distance to be taken into consideration, but not too much. Without adding the value of intermediary squares, I don't see any change in the ai so I'm not really keen to do more coding on that topic until I have a scenario where we can see an effect of the code.
I also finally implemented the possibility to have different military attitudes for a single ai. Thus Carthago spends 5 task forces on attack and 1 on defense.
The implementation is rough (I commit a number of task forces, but don't care about their actual strength), but should do for now. What this means is essentially that orders of wait, owncity can be removed from offensive attitudes, and the ai will commit units to various attitudes, alwas leaving defenders thanks to those taskforces with stonewall attitude for example.
I will flesh out this a bit more (I must allow a taskforce to specify its attitude through xml so Hannibal always "attacks"). After that, I think it should be worth checking whether to continue on the ai now or to code something else (like saves).
I also finally implemented the possibility to have different military attitudes for a single ai. Thus Carthago spends 5 task forces on attack and 1 on defense.
The implementation is rough (I commit a number of task forces, but don't care about their actual strength), but should do for now. What this means is essentially that orders of wait, owncity can be removed from offensive attitudes, and the ai will commit units to various attitudes, alwas leaving defenders thanks to those taskforces with stonewall attitude for example.
I will flesh out this a bit more (I must allow a taskforce to specify its attitude through xml so Hannibal always "attacks"). After that, I think it should be worth checking whether to continue on the ai now or to code something else (like saves).
Comment