Complete.Org: Mailing Lists: Archives: freeciv-ai: December 2002:
[freeciv-ai] Re: (PR#2633) ai_military_attack() bug#1

[freeciv-ai] Re: (PR#2633) ai_military_attack() bug#1

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Cc: freeciv-ai@xxxxxxxxxxx
Subject: [freeciv-ai] Re: (PR#2633) ai_military_attack() bug#1
From: "Per I. Mathisen via RT" <rt@xxxxxxxxxxxxxx>
Date: Tue, 24 Dec 2002 23:35:16 -0800
Reply-to: rt@xxxxxxxxxxxxxx

On Tue, 24 Dec 2002, Gregory Berkolaiko via RT wrote:
> I looked at the code some more and came to the conclusion that this line 
> doesn't
> belong there at all.At best it is redundant (for example we-are-on-the-ferry
> case is detected by can_unit_attack_), but I think it's plain wrong.If there
> is an enemy there, could_unit_move will return 0.But there should be an enemy
> -- that's why fstk selected it!

I guess so, too.

> And also the idea of repeating twice.Well suppose we killed the enemy the
> first time, then (if the code was right which it isn't) it would push us to
> occupy the spot.But this could be dangerous and also we could be doing
> something useful instead.
> Also, it wouldn't hurt to check for moves left before calling fstk.Remeber,
> fstk generates warmap.

Right on both counts.

> P.S. On a completely different issue.
> aidata.h line 40:
> static struct ai_data aidata[MAX_NUM_PLAYERS * MAX_NUM_BARBARIANS];
> Should it not be "+" instead of "*"?

Yes. Another blooper of mine...

  - Per

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