Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2002:
[Freeciv-Dev] Re: RFC: Artillery Patch
Home

[Freeciv-Dev] Re: RFC: Artillery Patch

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: RFC: Artillery Patch
From: Per I Mathisen <per@xxxxxxxxxxx>
Date: Sat, 29 Jun 2002 20:57:25 +0200 (MEST)

On Fri, 28 Jun 2002, Raahul Kumar wrote:
> So exactly what were you thinking Per. Do unit classes only contain one unit,
> or numerous types of units combining for example sea/air/land units? It's a
> great idea. But I think currently working code beats an idea anyday.

A unit must be able to be member of several classes at once. A horseman
must be both "Land" and "Horse". Bonuses/penalties should be cumulative.

For example:

[unit_horsemen]
name          = _("Horsemen")
move_type     = "Land"
classes       = "Land", "Horse"

This should replace the following (unused gen. impr.) ugliness:

/* Classes for unit types.
 * (These must correspond to unit_class_names[] in unit.c.)
 */
enum unit_class_id {
  UCL_AIR,
  UCL_HELICOPTER,
  UCL_LAND,
  UCL_MISSILE,
  UCL_NUCLEAR,
  UCL_SEA,
  UCL_LAST      /* keep this last */
};

This should be done as we add gen. impr., and once that is in place, it
shouldn't be too much bother to extend it to enable "gen. units" using
the same class system.

> > This is something that could well be handled by a "gen. units" patch.
>
> Where is the developer for this patch. It's not going to be me.

I'm hoping Ben will jump to the challenge once gen. impr. is in :)

Yours
Per

"If the Nuremberg laws were applied today, then every
Post-War American president would have to be hanged."
 - Noam Chomsky



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