[freeciv-ai] Re: Coordinate naval attacks with enemy attacked cities
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Sun, 27 Oct 2002, Jordi Negrevernis i Font wrote:
> This patch makes the naval attack units look for an invaded coastal
> city. And if it find it go there to help allied invasion forces.
>
> I think it follows the style code. It's againt cvs Sep 25 +
> massiveai2.diff.
>
> I don't use unit_do_goto - or something like this - after finding
> the cities - find_coastal_enemy_city_attacked -. Surprissintly goes
> there to attack!!!!
You have reinvented the wheel - there has been in cvs which is supposed to
do this for many years, it has just never really worked.
See find_something_to_kill() and reinforcements_cost_and_value() and
and invasion_funct().
Granted, your code is much cleaner, and probably works (as opposed to the
existing code) but duplicating this code doesn't seem like a very good
idea. I would much rather have a total rewrite of the attack code.
(If you want to read find_something_to_kill() I really recommend reading
the massive-AI version.)
- Per
|
|