Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2002:
[Freeciv-Dev] Re: RFC: Artillery Patch
Home

[Freeciv-Dev] Re: RFC: Artillery Patch

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Raahul Kumar <raahul_da_man@xxxxxxxxx>
Cc: Per I Mathisen <per@xxxxxxxxxxx>, freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: RFC: Artillery Patch
From: Raimar Falke <rf13@xxxxxxxxxxxxxxxxx>
Date: Fri, 28 Jun 2002 11:42:37 +0200

On Fri, Jun 28, 2002 at 01:39:28AM -0700, Raahul Kumar wrote:
> 
> --- Per I Mathisen <per@xxxxxxxxxxx> wrote:
> > On Sun, 23 Jun 2002, Raahul Kumar wrote:
> > > This patch allows units with the F_ARTILLERY flag to attack sea units(only
> > if they are next to the tile the artillery unit is on. The artillery unit is
> > still limited by whatever move type it is). Currently, I've only allowed the
> > > catapault unit to attack sea units. Version 2 will allow howitzer, cannon,
> > > artillery to join in the fun.
> > >
> > > Please comment on this patch.
> > 
> > I think this ought to be implemented in a more general way. See our
> > earlier discussion thread on generalising unit capabilities. I suggested
> > defining unit classes and enumerating all attack capabilities against such
> > classes, which could be extended to cover terrain as well. Other
> > possibilities exist, but adding a flag for each kind of can/cannot attack
> > potentiality does not seem right.
> 
> So exactly what were you thinking Per. Do unit classes only contain one unit,
> or numerous types of units combining for example sea/air/land units? It's a
> great idea. But I think currently working code beats an idea anyday.
> 
> I think a flag for each can/not can work. All that is needed are 6 flags:
> 
> Can/not attack sea
>                air
>                land

There are two extreme cases. The first is a simpler one of the current
code: you have only one set of stats (attack and defense) and you can
attack all other units. The other one is where you have one set of
stats for every unit type. (you can encode "cannot attack this type"
with "attack==0").

Any solution will be between these two cases. So we know have to
decide who much flexibility we want.

I would agrue that we give each unit type a set of stats. Each sets is
for a given class. A class is a non-empty set of unit types. So you
may have three classes for air/sea/land or you may have as many
classes as you have unit types (which would allow the flexible extrem
case from above). Or you may have the BattleIsle 2/3 case: deep
subs/subs/ships/land/low air/air/high air/orbit (this would make the
Stealth Bomber a high air unit and so much more valuable since there
aren't many other units which can attack high air units).

We also have modifiers. They can be devidied in improvement effects
(city, citywalls, SAM, SDI, costal, ...) and others (veteran,
fortress, terrain, ...). 

When we allow user defined classes the problem is that we can't
hardcode the classes in the code anymore. So we also have to make the
modifiers configurable.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Of course, someone who knows more about this will correct me if I'm
  wrong, and someone who knows less will correct me if I'm right."
    -- David Palmer (palmer@xxxxxxxxxxxxxxxxxx)


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