Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2003:
[Freeciv-Dev] Re: (PR#6862) NonMil flag for transporters
Home

[Freeciv-Dev] Re: (PR#6862) NonMil flag for transporters

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] Re: (PR#6862) NonMil flag for transporters
From: "Arnstein Lindgard" <a-l@xxxxxxx>
Date: Sat, 15 Nov 2003 03:21:02 -0800
Reply-to: rt@xxxxxxxxxxx

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

"Christian Knoke" <chrisk@xxxxxxxxx> wrote:

> On Fri, Nov 14, 2003 at 03:00:28AM -0800, Arnstein Lindgard wrote:
> > Add "NonMil" flag to Galleons and Transporters for all 3 rulesets.

> Does this mean that transports inside of cities do not impose a ZOC anymore?

No, the galleon inside a city retains a ZoC, but looses the ability
to impose martial law, if we add the NonMil flag. Diplomats and
Explorers also impose ZoC.

I don't see why transporters should impose martial law, there's
already some code that implies that ships, whatever they are supposed
to simulate, are considered to be "in port" and are vulnerable.

But it was a very good question - what's the point of a flag if it
only denotes attack strength > 0. I could imagine someone would want
to create an English Man-O-War which is a troop ship, but also has
bombardment ability. So it would also have an attack strength...

We could remove the NonMil flag alltogether and set the function
is_military_unit() to check for attack strength. As with adding the
flag to the transports,  it will have some effects, including that
update_simple_ai_types() no longer counts transports, and I don't
know what the consequences are. So maybe Raimar was right:

> We should add new flags for F_MARTIAL_LAW and F_CAPTURE_CITY.


Attached: Patch to make auto-attack also check for attack strength.


Arnstein

--- freeciv/common/unit.c       Wed Oct 29 09:00:39 2003
+++ auto-attack/common/unit.c   Sat Nov 15 10:54:20 2003
@@ -507,7 +507,8 @@
 {
   if (unit_flag(punit, F_SETTLERS))
     return TRUE;
-  if (is_military_unit(punit) && map_get_city(punit->x, punit->y))
+  if (is_military_unit(punit) && unit_type(punit)->attack_strength > 0
+      && map_get_city(punit->x, punit->y))
     return TRUE;
   return FALSE;
 }



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