Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2003:
[Freeciv-Dev] Re: (PR#6132) New function can_unit_attack_all_at_tile
Home

[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]
To: Gregory.Berkolaiko@xxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#6132) New function can_unit_attack_all_at_tile
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 11 Sep 2003 09:42:43 -0700
Reply-to: rt@xxxxxxxxxxxxxx

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?

> 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.

jason




[Prev in Thread] Current Thread [Next in Thread]