Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2005:
[Freeciv-Dev] Re: (PR#13334) [Patch] Unit class structure with move para
Home

[Freeciv-Dev] Re: (PR#13334) [Patch] Unit class structure with move para

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] Re: (PR#13334) [Patch] Unit class structure with move parameters
From: "Marko Lindqvist" <marko.lindqvist@xxxxxxxxxxx>
Date: Sun, 26 Jun 2005 09:19:22 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=13334 >

Benoit Hudson wrote:
> 
> On Sun, Jun 26, 2005 at 08:11:51AM -0700, Marko Lindqvist wrote:
> 
>>+  /* TODO: These effects should not be hardcoded to unit class enumeration */
>>+  if(pclass->id == UCL_SEA) {
>>     /* Add on effects bonus (Magellan's Expedition, Lighthouse,
>>      * Nuclear Power). */
>>     move_rate += (get_unit_bonus(punit, EFT_SEA_MOVE)
> 
> 
> Maybe add a list of effects (or a set of booleans) to look up in the
> move_params?
> 
>     struct move_params {
>       ...
>       Effect_Type_Id *effects; /* terminated by -1 */
>     };
> 
> then 
>     static Effect_Type_Id sea_unit[] = { EFT_SEA_MOVE, -1 };
>     static Effect_Type_Id other_units[] = { -1 };
> until we write up how to load these from rulesets.

  That's the idea. EFT_SEA_MOVE should be replaced by generic 
EFT_MOVE_BONUS which targets to unit class.
  Also triremes probably deserve their own unit class and 
EFT_NO_SINK_DEEP should target to one unit class only.


  - ML





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