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: Sun, 30 Jun 2002 19:36:57 +0200 (MEST)

On Sat, 29 Jun 2002, Raimar Falke wrote:
> > 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.
>
> How does this differ from the classes created now by flags now?

It is clean and extensible.

For example, if we wanted to make a "Moat" improvement that, somehow, gave
+100% defence vs Horses, there is no way to do this with the current class
system & impr. gen., since there is no such class as "Horse".

Now, we could make it check both the flag strings and the ugly class
structure previously mentioned, to see if the string exists in either, but
that only makes the ugliness perfect. Furthermore, even then you must
change the code in order to introduce new classes, which is bad news for
modpacking.

My suggestion, on the other hand, removes the need for magic classes
derived partly from movement and type partly from flags as in the existing
class system - a system which isn't extensible and whose code is rather
awkward.

> I'm also not sure if it is a good to allow a unit type in multiple
> classes or if a unit type should have only one class.

Say you have twenty land-moving classes. Either they have one class each,
and a gen. impr. table for "City Walls" long as a bad year to include them
all, or you allow them all to be member of the "Land" class in addition to
their other class, so that gen. impr./gen. units tables can remain short
and to the point.

Not a big deal either way, but it is, IMHO, very convenient to be able to
denote that a unit is { "Land", "Horse" } or { "Sea", "Submarine"  } or {
"Air", "Helicopter" } or even { "Land", "Horse", "Knightly", "Templar" }

It is also makes rulesets simpler to read and understand.

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]