settlers-remake
settlers-remake copied to clipboard
Make Computerplayer use ships to attack
When the Computerplayer has built a basic economy (e.g. 6 weapon smiths) and there is still space left on the map he should build a ferry and load it with swordsmen to attack the enemy from the hinterland.
This would give the game more tactical depth and increase the fun of the single player.
Maybe the computeryer's strength could influence a) ... whether the computerplayer attacks with ships b) ... with how many ships the computerplayer attacks
Computing if this is possible on the current map is not so easy.
For a start, every map could have some computer player hints about the strategy:
- Is building ships required to reach the enemy
- Could building ships make sense
- Should pioneers be transported with the ships
This does not solve the issue on where to transport them, but it would give the computer player an easy target on how many shipyards/ships to build.
At start of game you can do a path calculation from the AI starting position to one enemy starting position. If the calculation succeeds you can reach the enemy. If not, you are on an island.
Also at start of game you can once collect (e.g. with AiMapInformation) the water positions which are connected with position 0,0 (border of the map) .... this would be your attacking-water where you build yards and where you find the nearest position to some enemy tower. This don't need to be perfect. It is just to make fun for the singleplayer.