Roland Johansen
Deity
I like Roland's model, but I would suggest a slight modification: Let's make the patrol's behaviour not a function of its hitpoints but of the actual combat odds.
Thanks.
I understand that you would want to change it in that way. It is in line with the rest of your logic, the way you want the patrol function to work. However, I don't know if it will work too well in this game. Some units will have to behave somewhat suicidal in order that others may be victorious.
My C++-skills are also very limited, but in my tests I haven't encountered any problems yet. Maybe there are better ways to implement it. So what do you think about that? How would you adjust the "coward-threshold" (40%)? Did I miss any loopholes for exploits?
Every game rule can be exploited, the only thing that we can achieve is to limit the amount of exploitation. In this case a single battleship (or missile cruiser) could pillage the sea food resources protected by several destroyers while those destroyers just watch. In civ4, even a small strength difference leads to lopsided combat odds.
The reason that I would go with the hitpoint based percentage is because it is based on the idea already used in aerial interception. It allows softening of the enemy (which is sometimes needed), but it stops severely hurt units from automatically intercepting (in a suicidal manner). I also don't mind the situation where a single pillaging destroyer kills several healthy frigates on patrol duty (or the other way where a single destroyer on patrol duty kills several pillaging frigates). So I don't try to stop that situation which you do try to stop.