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: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 8 Jan 2004 12:59:06 -0800
Reply-to: rt@xxxxxxxxxxx

<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.  But some military units may 
have 0 attack.

What if a non-military unit had nonzero attack rating?

jason




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