Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2002:
[Freeciv-Dev] Re: new patch: autoattack
Home

[Freeciv-Dev] Re: new patch: autoattack

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: new patch: autoattack
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Mon, 25 Nov 2002 18:16:44 +0000 (GMT)

On Fri, 22 Nov 2002, Jason Dorje Short wrote:
> This will not get us to attack diplomats or other near-helpless units
> that we may want to attack. So perhaps
>
>  if (penemywin > 1.0 - punitwin || penemywin > 0.99) {
>    /* ...autoattack... */
>  }

Note that it is actually rare that we have such good odds, even against
diplomats. And if we lower the threshold we may make bad decisions. So I
am not sure which is best, but after some consideration, I ended up with

   if (penemywin > 1.0 - punitwin || unit_flag(punit, F_DIPLOMAT))

which doesn't attack explorers and always attacks diplomat flag
units, even if they are (in a modpack) giant hulks, since this kept
things nice and simple. Modpackers shouldn't make the incredible hulk
diplomats anyway...

New patch attached.

  - Per

Attachment: autoattack4.diff
Description: Text document


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