Complete.Org: Mailing Lists: Archives: freeciv-ai: November 2002:
[freeciv-ai] Re: patch/rfc: goto and move/attack test wrapping

[freeciv-ai] Re: patch/rfc: goto and move/attack test wrapping

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: "Per I. Mathisen" <per@xxxxxxxxxxx>
Cc: freeciv-ai@xxxxxxxxxxx
Subject: [freeciv-ai] Re: patch/rfc: goto and move/attack test wrapping
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Sat, 23 Nov 2002 00:25:53 +0000 (GMT)

On Mon, 18 Nov 2002, Per I. Mathisen wrote:
> Taken from massive ai. Unless I get disagreeing comments, I will commit
> these wrappers and the associated changes in the rest of the code.
> This is an important API decision so please consider it carefully.
> gothere is used for goto over several turns and goto with ferries, and is
> the one which should eventually be expanded into a replacement for
> military and settler gothere with associated ferrying capability. Before
> calling it, always set goto destination explicitly.
> goto is for one-turn gotos, for example run off and attack a target of
> opportunity. It will _retain_ existing goto destination and role, ie it is
> non-destructive for existing missions.
> can_move is a wrapper which enables you to test for movement _without
> going ACTIVITY_IDLE first_. This way, if you decide not to move after all,
> your fortify status remains unchanged.
> can_attack is the same for attack tests.
> (The two latter are necessary but not sufficient to avoid the AI's
> always-break fortification syndrome.)

Attached is a full patch. Please read. Will commit it in a week or so
(when I get some time again), unless someone beat me to it ... *wink*

  - Per

Attachment: wrapgoto1.diff
Description: Text document

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