Complete.Org: Mailing Lists: Archives: freeciv-ai: January 2003:
[freeciv-ai] stay_and_defend() and is_my_turn() cleanup

[freeciv-ai] stay_and_defend() and is_my_turn() cleanup

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-ai@xxxxxxxxxxx
Subject: [freeciv-ai] stay_and_defend() and is_my_turn() cleanup
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Thu, 2 Jan 2003 14:39:53 +0000 (GMT)

This is a small fix to stay_and_defend() and a larger rewrite of
is_my_turn(), taken from the remnants of the massive ai patch.

stay_and_defend() now doesn't allow ships and helicopters to be city
defenders, and uses a simpler algorithm to check if a unit is a possible
defender or not. This function is still a hack that sucks a lot, though.

is_my_turn() is also an ugly hack, IMHO. Its usefulness will largely be
replaced by AI-only autoattack, so I guess it should go away then. I
cleaned up the code and removed some dubious assumptions.

  - Per

Attachment: minor1.diff
Description: Text document

[Prev in Thread] Current Thread [Next in Thread]
  • [freeciv-ai] stay_and_defend() and is_my_turn() cleanup, Per I. Mathisen <=