Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2004:
[Freeciv-Dev] Re: (PR#7213) is_attack_unit(punit)
Home

[Freeciv-Dev] Re: (PR#7213) is_attack_unit(punit)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: a-l@xxxxxxx
Subject: [Freeciv-Dev] Re: (PR#7213) is_attack_unit(punit)
From: "Raimar Falke" <i-freeciv-lists@xxxxxxxxxxxxx>
Date: Thu, 8 Jan 2004 13:28:32 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=7213 >

On Thu, Jan 08, 2004 at 12:59:06PM -0800, Jason Short wrote:
> 
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=7213 >
> 
> Raimar Falke wrote:
> > <URL: http://rt.freeciv.org/Ticket/Display.html?id=7213 >
> 
> >>-  if (is_military_unit(punit) && unit_type(punit)->attack_strength > 0
> >>-      && map_get_city(punit->x, punit->y))
> >>+  }
> >>+  if (is_attack_unit(punit) && map_get_city(punit->x, punit->y)) {
> >>     return TRUE;
> >>+  }
> > 
> > 
> > This doesn't seem an equivalent transformation.
> 
> is_attack_unit implies is_military_unit. 

Because?

> But some military units may 
> have 0 attack.
> 
> What if a non-military unit had nonzero attack rating?

Exactly such questions should be answered in the function
headers. Just list all the implications of an attack-unit and a
military-unit.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
  "brand memory are for windows users that think their stability
   problems come from the memory"
    -- bomek in #freeciv




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