Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2002:
[Freeciv-Dev] Re: generalising units
Home

[Freeciv-Dev] Re: generalising units

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: generalising units
From: "Per I. Mathisen" <Per.Inge.Mathisen@xxxxxxxxxxx>
Date: Wed, 8 May 2002 23:13:55 +0200 (MEST)

On Wed, 8 May 2002, Ben Webb wrote:
>       Well, perhaps I'm biased, but unit_defend and terrain_bonus just
> look like cut-down[*] versions of the Unit_Defend effect already used in
> buildings.ruleset. Even if you don't want to use the code, it seems
> strange to me to not use the same ruleset syntax and C structs.
> unit_attack is, of course, a very simple extension of Unit_Defend.
>
> [*] For example, there appears to be no way to specify that a unit's
> attack against, say, aircraft is increased when on Ocean tiles, while
> the attack vs. other units is unaffected. You're also throwing away other
> useful stuff like tech dependencies.

I don't mind if the same code, same syntax or C structs are used. My
points are only
 - it is possible to combine flags with generalised units.ruleset which is
good because they are simple, fast and easy to extend, and we don't have
to rewrite everything at once
 - it is really useful to be able to break up the unit classes in smaller
categories in the ruleset instead of using only the categories "air",
"land", etc, that are hardcoded in the server. For instance the classes
Missile and Horse should be separated out. This way we can very easily
implement complex stuff without much overhead

I'm not volunteering to write the code in the foreseeable future, so I'm
mostly happy to leave this up to whoever does the coding. The only thing
I'm planning to implement is the building_req field (unless someone wants
to merge this into a more comprehensive effort).

Yours,
Per

"The only thing that keeps the system working at all is that the United
States, the richest country in the world, has become the "deficit of last
resort." This is the ultimate irony: the financial system allows the United
States to live year after year beyond its means, buying abroad far more
goods than it sells, even as the US Treasury, year after year, lectures
others on why they should not do so." -- Joseph Stiglitz



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