Complete.Org: Mailing Lists: Archives: freeciv: July 2004:
[Freeciv] Re: Unit within the radius of their home city don't
Home

[Freeciv] Re: Unit within the radius of their home city don't

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv@xxxxxxxxxxx
Subject: [Freeciv] Re: Unit within the radius of their home city don't
From: Per Inge Mathisen <per@xxxxxxxxxxx>
Date: Sat, 3 Jul 2004 15:04:45 +0000 (GMT)

On Fri, 2 Jul 2004, Eddie Anderson wrote:
> >Seems like it should be based on the nation's borders.
>
>   Yes!  That would be even better. Although that could get
> complicated when a border runs through part of a city.

I don't see why that should be complicated. Just use the border and forget
the city.

Anyway, this would make fortresses almost completely useless, since they
are robbed of one of their major uses (keeping units happy in the field).
Not that anyone build fortresses...

>   Nevertheless, IMO almost anything that frees units from being
> stuck in the city centers would improve Freeciv.

Well, you can try it out. Here is a patch:

diff -u -r1.211 unit.c
--- common/unit.c       25 Jun 2004 23:29:59 -0000      1.211
+++ common/unit.c       3 Jul 2004 14:53:05 -0000
@@ -1639,6 +1639,10 @@
     return FALSE;
   if (map_get_city(punit->x,punit->y))
     return FALSE;
+  if (game.borders > 0
+      && map_get_owner(punit->x, punit->y) == unit_owner(punit)) {
+    return FALSE;
+  }
   if (is_ground_unit(punit) &&
       map_has_special(punit->x, punit->y, S_FORTRESS))
     return !is_unit_near_a_friendly_city (punit);

  - Per



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