Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2002:
[Freeciv-Dev] Re: patch: port attacks!

[Freeciv-Dev] Re: patch: port attacks!

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: "Per I. Mathisen" <Per.Inge.Mathisen@xxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: patch: port attacks!
From: Gregory Berkolaiko <Gregory.Berkolaiko@xxxxxxxxxxxx>
Date: Tue, 12 Mar 2002 14:41:41 +0000 (GMT)

On Tue, 12 Mar 2002, Per I. Mathisen wrote:

> On Tue, 12 Mar 2002, Jason Short wrote:
> > This patch gives a great offensive advantage to submarines.  No amount
> > of land units in a city will be able to protect a transport from the
> > submarine.  This is clearly Not Right.
> I don't see why. Port attacks have, historically, been a significant part
> of modern warfare, and subs were very much part of that. Unfortunately, we
> don't have torpedo bombers (or whatever they are called), but this code
> enables them for future rulesets.

You are both right.  The problem is that with Per's patch there is no 
escape from subs, while in real life there are defenses like mine fields.
So if we make a new improvement 
Anti-sub Mine Field (cost: 80, maintainance: 0), it's gonna be fine.
Or, indeed, say that coastal fortress implies mine field.

As for the code, I object slightly to +10000 hack.  This way get_defender 
might still return a land unit as a defender against a sub (if there are 
no se units), with possibly undefined consequences.

And yes, AI has to be taught about such things.

> >  Perhaps if there is a coastal
> > fortress, the submarine cannot attack?  This at least gives the
> > transport some possible defense.
> Ok. I see the need to balance this, and this suggestion would balance it
> out nicely, I think. After all, it is not like submarines are very
> powerful as is. Ironclads and battleships rule the seas.
> The AI doesn't need to learn about this, it already knows that coastal
> fortresses work against seaborne units.
> On Tue, 12 Mar 2002, Raahul Kumar wrote:
> > The only alternative I want to have is that airbased units, especially
> > helicopters, have big defensive bonuses against subs. A lot easier to
> > code than your suggestions.
> Hmm, not really. Anyway, it may not only be subs, but any unit with
> F_NO_LAND_ATTACK, which may even be another aircraft. Of course, you might
> say that aircraft get bonuses against any _seaborne_ F_NO_LAND_ATTACK
> unit, but then the rules start becoming rather complex.
> You can always sink the sub with your airplanes/helicopters afterwards.
> That's even more realistic, come to think of it :)
> > I like the look of it. You realise the AI needs to know about this little
> > change. I'm also amazed that these are the only lines that need changing.
> > I'm sure there are various flags in the code that check if no_land_attack.
> The AI isn't told. Correct. It currently ignores F_NO_LAND_ATTACK units
> completely, and don't count them as a threat. Obviously, that would have
> to be changed, and all that needs to be done is to delete the last line
> below.
> advmilitary.c:
> > static int assess_danger_unit(struct city *pcity, struct unit *punit)
> > {
> >   int v;
> >   bool sailing;
> >
> >   if (unit_flag(punit, F_NO_LAND_ATTACK)) return(0);
> The other reference to F_NO_LAND_ATTACK in ai/ is fine as is.
> Yours,
> Per
> "My mother never saw the irony in calling me a son-of-a-bitch."
>  -- Jack Nicholson

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