Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2002:
[Freeciv-Dev] Re: (PR#2329) Portattacks 7
Home

[Freeciv-Dev] Re: (PR#2329) Portattacks 7

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: raahul_da_man@xxxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#2329) Portattacks 7
From: "Per I. Mathisen via RT" <rt@xxxxxxxxxxxxxx>
Date: Fri, 15 Nov 2002 17:44:22 -0800
Reply-to: rt@xxxxxxxxxxxxxx

Some of us discussed this on irc today. What we came up with is this idea
of units being in "layers" on the battlefield. Some units are up in the
air, some are on ground, others are in the sea. Killstack should only work
within one layer at a time. So if you kill a fighter, all air units
stacked with it die, but not a mech inf. get_defender() should prefer
units in the same layer as your own before trying to attack units in
another layer.

The exception to this are airfields and cities. In cities, all units are
considered "grounded", and so best defender defends regardless of which
layer the unit would otherwise be at. Aircraft are "grounded" in
airfields, so that ground units will defend them, and killstack will
destroy them if a ground unit dies there.

(We discussed carriers, but came to the conclusion that it didn't deserve
an exception. Instead, it should use the greater range of its aircraft to
kill hostile ships before they get too close. Maybe carriers or aircraft
should get higher visilibity radius, though. But if you are caught flat
footed with your carrier, you did something wrong.)

So
 - if you attack with a tank against a tile with a bomber and a militia,
the tank will attack the militia, and the bomber will survive.
 - if you attack with a fighter against a tile with a bomber and a mech
inf, the fighter will attack the bomber and the mech inf will survive.
attack again and you will target the mech inf (since there are no more air
units to attack).
 - if you attack with a battleship against a carrier full of fighters, the
battleship will whack the carrier and the fighters will survive.
 - etc

As to the patch, I think the new abilities should be controlled a new
global game option in game.ruleset. The subs change should be a new unit
flag which says that for this unit, cities don't "ground" sea units in
cities, thus they will be in the "sea" layer when it attacks. This flag
can be used for normal ships too, which means they'll attack ships first,
then other units. F_PORTATTACK can be a name.

I hope I got this right. What do other people think?

  - Per




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