[Freeciv-Dev] Re: (PR#6132) New function can_unit_attack_all_at_tile
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Thu, 11 Sep 2003, Jason Short wrote:
> Gregory Berkolaiko wrote:
> > On Wed, 10 Sep 2003, Jason Short wrote:
> >
> >
> >>Gregory Berkolaiko wrote:
> >>
> >>>It checks whether a unit can attack all units at the target tile, which is
> >>>the rule now for a successful attack.
> >>>
> >>>It should also be used in almost all cases instead of the direct call to
> >>>can_unit_attack_unit_at_tile, which is done in the patch.
> >>>
> >>>One direct call is still left, where we are checking wheter a unit, which
> >>>is not there yet, can be attacked.
> >>>
> >>>As a side effect, the loop in ai_manage_airunit (6123) would be prevented.
> >>
> >>It seems like this completely conflicts with the layers concept?
> >
> >
> > In fact I would view it as a cleanup before the layers. When layers come
> > they just alter the loop in the new function to cycle through the relevant
> > layers. But maybe the name isn't good. Please make suggestions.
>
> How about just can_unit_attack_tile?
This function already exists and incorporates both checks from below.
> > You should keep in mind that there are two sorts of checks:
> > 1. Diplomatic (are we at war with everyone there).
> > 2. Physical (can we physically attack units there).
>
> The diplomatic checks must all pass (on a unit-by-unit basis), but only
> one of the pysical checks must pass.
The rules have changed (and are more correct now). Until we adopt layer,
one must be able to attack all units on a tile. You can see it as if the
unit you cannot attack is the defender.
G.
- [Freeciv-Dev] Re: (PR#6132) New function can_unit_attack_all_at_tile,
Gregory Berkolaiko <=
[Freeciv-Dev] Re: (PR#6132) New function can_unit_attack_all_at_tile, Gregory Berkolaiko, 2003/09/12
|
|