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

[Freeciv-Dev] generalising units

[Top] [All Lists]

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

Bringing a discussion from freeciv-ai over here.

I believe most of the capabilities we will ever want units to have can be
represented with unit flags, and the following new fields:

[unit]
...
unit_class = ""
unit_attack = { "class", "bonus"
                "aircraft", 200
                "land, "0" }
unit_defend = { "class", "bonus"
                "aircraft", -200 }
terrain_bonus = { "terrain", "attack", "defense"
                  "city",    200,      50 }
transport_classes = "class1", "class2" ; ... up to 4 classes
building_req = "palace"
govt_req     = "fundamentalism"
...

An attack must be in unit_attack table to be valid. If a stack contains
one unit that can be attacked and one that cannot be, the valid target is
always chosen as defender (as per port attacks patch behaviour).

These fields should be able to make the following flags superfluous:
"Carrier", "Missile_Carrier", "Pikemen", "Horse", "AEGIS", "Fighter",
"No_Land_Attack", "Fanatic" and we don't need to add "CityBuster",
"CityDefend", "ShipBuster" etc as planned (by me and Raahul).

It is also means we don't have extend flags and roles as of now, if we do
this first.

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]