[Freeciv-Dev] Re: generalising units
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Wed, May 08, 2002 at 04:14:47PM +0200, Per I. Mathisen wrote:
> 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"
> ...
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.
> 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 also makes it easier to implement alternative combat
systems, e.g. for CTP or SMAC modes.
Ben
--
ben@xxxxxxxxxxxxxxxxxxxxxx http://bellatrix.pcl.ox.ac.uk/~ben/
"And the man with the golden gun thinks he knows so much"
|
|