Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2004:
[Freeciv-Dev] Re: (PR#6972) Wishlist: units lost on arctic
Home

[Freeciv-Dev] Re: (PR#6972) Wishlist: units lost on arctic

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: mburda@xxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#6972) Wishlist: units lost on arctic
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 4 May 2004 12:12:15 -0700
Reply-to: rt@xxxxxxxxxxx

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

Marcelo Burda wrote:
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=6972 >
> 
> There is a updated and a litle cleaned version of 2 patch merged.
> there is a TER_XX type patch. i think you can unblok it,
> the xanges are very litle in classic topo, poles are no very interestin
> there, exept for the trireme periode, where trireme no more can make big
> travels at bottom or top of the map. this is more realistic.

OK, it's not blocked on any design or gameplay issue.  We just have to 
agree on the details.

- is_safeline is no good as a name.  I suggest is_safe_ocean().  This 
should only be called for ocean terrains and handles tririeme loss.  In 
fact it probably shouldn't be in map.h but should be moved into unit.c 
and made static.

- Normal unit loss is handled directly by the TER_UNSAFE flag.  If this 
flag is set there is a chance of loss.  Don't check for adjacent safe 
coasts here.

- Eventually we should merge tririeme_loss_pct and 
unsafe_terrain_loss_pct into a single function.  unit_loss_pct or 
something like that.  This function should do _all_ the work, checking 
the terrain and the unit flags.  Maybe this shouldn't happen immediately.

- Your base_unsafe_terrain_loss_pct should be static.  And it needs a 
return type; currently the code doesn't compile properly.

- This AI code:

-             move_cost = SINGLE_MOVE;
+             move_cost = (unsafe_terrain_loss_pct>0)
+                 ?(2*SINGLE_MOVE+1)
+                 :SINGLE_MOVE;

needs an explanatory comment.

- near_ok_city_places should use a city iterator (from common/city.h), 
not square_iterate.  I can't quite figure out what this function does. 
It returns true if there is any tile within city range that is not an 
unsafe coast terrain?  What's the point of that?  Is this just a clever 
way of special-casing arctic?

- is_near_land is a good function.

jason




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