K 10 svn:author V 7 freeciv K 8 svn:date V 27 1998-08-16T01:29:55.000000Z K 7 svn:log V 1316 Fixing almost all the typos and other discrepancies between f_s_t_k and k_s_w attacker-want equations, partly as preparation for modularizing that junk. Adding some util functs, assess_distance, assess_danger_unit. Treating units that are about to be produced in enemy cities as danger in assess_danger. Limiting p_d_w to costs <= shield_stock + 40; it was annoying having the AI insist on using battleships for defense. Changing unit_desira so that def=1 units are penalized elsewhere instead. Changing p_a_w to allow overrides of the chosen attacker in case we need something with more defense or more speed or something. Doing ugly things to k_s_w that I can't even discern from the diffs. Fixing more bugs than I can count, or explain - no one else noticed them since they merely caused suboptimal AI behavior. Want for military techs and handling of unhap is standard and as intended now. Fixing bug that caused AI warships to yoyo. Implementing ai.invasion. Forcing the AI to build defenders instead of attackers when it's in danger. Forcing the AI to build barracks before ground attackers. Preventing the AI from building units it can't upkeep. Treating all unbuilt ground attackers as vet, which encourages making barracks and ground attackers. I did a lot, and I probably forgot something. -- Syela END