[Freeciv-Dev] Re: [Freeciv] rfc: autoattack
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Sun, Nov 17, 2002 at 10:40:28PM +0100, Thomas Strub wrote:
> On Fri, Nov 15, 2002 at 07:57:31PM +0100, Thomas Strub wrote:
> > On Fri, Nov 15, 2002 at 06:39:16PM +0000, Per I. Mathisen wrote:
> > >
> > > Since my suggestion of dropping the autoattack code didn't meet with
> > > approval, I want to change it so that it actually works and is useful.
> > >
> > > So my new suggestion is:
> > > For any unit that is moved, check adjacent squares for autoattack units.
> > > For each of these, if the moved unit is hostile (at war) and weaker,
> > > attack it. If the autoattack unit is a diplomat/spy, instead try bribing
> > > the moved unit, and if that is impossible, try sabotage.
> > >
> > > This should at least make autoattack useful. The question is: Too useful?
> >
> > wow :-)
> >
> > This helps players with slow connections. I like it.
> > Its a big step against clientsidescripting, and would help the AI too.
> >
> > And perhaps it should be configurablei.
> >
> > a = chance to win
> > b = value of attacking unit
> > c = value of attacked unit
> >
> > And if d = a*c/b bigger than a tuned value -> autoattack.
>
> Tried that out and think the calculation in my patch is better.
>
> I use the key "k" for the autoattac"k".
> Think only a sprite for the "k" is missing.
Had to exchange
372,373c364,365
> + send_unit_info(NULL, penemy);
> + enemy_unit_auto_attack(penemy, punit);
---
< + enemy_unit_auto_attack(penemy, punit);
< + send_unit_info(NULL, penemy);
Because the unit can be killed before sending the inforamtion.
And the using of the gotoconstrution should only be used for units more
than 1 tile away. For units nearer it only creates errors.
Thomas
- [Freeciv-Dev] rfc: autoattack, Per I. Mathisen, 2002/11/15
- [Freeciv-Dev] Re: [Freeciv] rfc: autoattack, Paul Zastoupil, 2002/11/15
- [Freeciv-Dev] Re: [Freeciv] rfc: autoattack, Thomas Strub, 2002/11/15
- [Freeciv-Dev] Re: [Freeciv] rfc: autoattack, Thomas Strub, 2002/11/17
- [Freeciv-Dev] Re: [Freeciv] rfc: autoattack,
Thomas Strub <=
- [Freeciv-Dev] Re: [Freeciv] rfc: autoattack, Per I. Mathisen, 2002/11/17
- [Freeciv-Dev] Re: [Freeciv] rfc: autoattack, Gregory Berkolaiko, 2002/11/18
- [Freeciv-Dev] Re: [Freeciv] rfc: autoattack, Per I. Mathisen, 2002/11/18
- [Freeciv-Dev] Re: [Freeciv] rfc: autoattack, Raimar Falke, 2002/11/18
- [Freeciv-Dev] Re: [Freeciv] rfc: autoattack, Gregory Berkolaiko, 2002/11/18
- [Freeciv-Dev] Re: [Freeciv] rfc: autoattack, Per I. Mathisen, 2002/11/18
- [Freeciv-Dev] Re: rfc: autoattack, Mike Kaufman, 2002/11/18
- [Freeciv-Dev] Re: rfc: autoattack, Ross W. Wetmore, 2002/11/23
- [Freeciv-Dev] Re: [Freeciv] rfc: autoattack, Raahul Kumar, 2002/11/18
- [Freeciv-Dev] Re: [Freeciv] rfc: autoattack, Jason Dorje Short, 2002/11/19
|
|