[Freeciv-Dev] Re: (PR#2581) Layers proposal redux
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Fri, May 23, 2003 at 02:12:55PM -0700, Per I. Mathisen wrote:
> The layers change means:
> Change to units.ruleset and unit struct:
> - Every unit gets a "layer" variable (of type char)
> - In civ1 and civ2 rulesets, it is set to 1 for all units (default)
> - In default ruleset, air units get 2, subs 0 and all others 1.
> New attack rules:
> - You cannot attack a tile which contains any not-at-war units or a
> not-at-war city. (Treaty sanity rule.)
> - You cannot attack a tile if your own layer contains one or more units
> but you cannot attack any of them. (Layer superiority rule.)
> - Otherwise, if there is any unit on target tile that you can attack, you
> can attack the tile.
> - Layers as such neither allow nor prevent attack.
> - can_unit_attack_unit_at_tile() remains unchanged.
> New killstack rules:
> - If you kill any unit on target tile, all units in the same layer on
> that tile are destroyed. Units in other layers are unaffected.
> - Exception: Cities, airbases and fortresses. As before.
You can remove this if you move
- Cities, airbases and fortresses flatten layers, and all units in them
are treated as being in a single layer.
> Additional choose best defender rules:
> - A unit always attacks an opponent in the same layer, if there is any.
Looks like an implication of
You cannot attack a tile if your own layer contains one or more
units but you cannot attack any of them.
> - Otherwise, a unit always attacks a unit in the highest layer where it
> can find a unit that it can attack.
No. My plan still stands that there will at some point different
attack power for different layers. This would mean that an
sub-hunter-plane will attack the ship with its weak bombs instead of
using the very dangerous water-bombs for the subs.
The rule should be similar to the defender: you attack the layer which
is "best" for you. We still have to define what "best" here means but
in the above case it should be the subs.
So if the attack is allowed the server does this:
if enemy in own layer:
attacked layer = own layer
attacked layer = choose best layer to attack
choose best defender in the attacked layer
do the combat
> - Cities, airbases and fortresses flatten layers, and all units in them
> are treated as being in a single layer.
> - Cargo transported by a transporter which resides in a different layer
> are unaffected if their transporter is killed, so they should be
> un-sentried. We assume that they scramble into their own layer when
> attacked. At the moment, this only applies to carriers and air units.
If we have an carry-all plane with two armors the armors should
die. Same for ships with land-units. Only planes on a ship surrive.
> (If we want to extend this at a later date to cover
> which-unit-can-attack-which-unit, then these points apply:
> - By default, units can attack their own layer and only that.
> - You still must be able to move into (in principle) a tile in order to
> be able to attack a unit there.
> - Unit effects can specify additional attack properties, such as ability
> to attack other layers, additional defense power against attacks from
> specified layer, additional attack power when attacking a specified layer,
> I think that should cover everything. Comments?
I still think that we should give each unit a different attack power
for each target layer. This way we can for example remove the aegis
special case. And we can add a ship-buster plane. Or an anti-aircraft
Living on earth may be expensive, but it includes an annual free trip
around the sun.