[Freeciv-Dev] (PR#2292) Patch: Artillery attack against sea units
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=2292 >
> [cazfi74@xxxxxxxxx - Fri Sep 22 18:31:03 2006]:
>
> Guest wrote:
> >
> > It seems that we have to tweak the handle_unit_move_request()
function
> > in the server/unithand.c file in new Freeciv versions.
> >
> > There is one thing I have not understood. The
handle_unit_move_request
> > () function checks whether an attacking unit is a bombarder. If
so, it
> > also checks that the attacked tile is not ocean. If we remove this
> > check, then we let all the bombarders attack sea units. However,
> > according to the units.ruleset file, the Bombarder flag is not
> > attached to any unit. Is it goining to be used someday? If so, is
it a
> > good idea to combine bombarder functionality with the sea attack
> > functionality or should we introduce a new flag for these
purposes?
>
> Some work for this has been done in #18481. Function
> can_attack_non_native() already exist, but needs to be called in
more
> places before it can be modified to this end. Also flag
F_NO_LAND_ATTACK
> should be renamed to be more generic and possibly reversed, such as
> F_ATTACK_NON_NATIVE. Actually I'd like it to be unit_class flag
rather
> than unit_type flag.
>
>
> - ML
>
>
>
Indeed, in the CVS version, can_attack_non_native() is called from the
handle_unit_move_request() function. It seems that everything we have
to do is just modify a little bit the can_attack_non_native() function.
If we introduce the F_ATTACK_NON_NATIVE flag attached to some units,
will it mean that some units, say Artillery, will be capable of
attacking air units? Maybe it is more reasonable to introduce
F_LAND_ATTACK and F_SEA_ATTACK flags. Furthermore, it will enable me
to introduce the patch that will add a new feature without changing
other flags and their meaning.
Sincerely,
Alexander Sayenko
|
|