This is the mail archive of the xconq7@sources.redhat.com mailing list for the Xconq project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: To fire or not to fire?


>On Sun, 2002-10-27 at 02:29, Hans Ronne wrote:
>> 2. Unit that can fire from a distance are supposed to do that and avoid
>> close combat (where they may get killed) as far as possible.
>
>I guess I should look into the code that determines whether the AI
>decides to "hit" an enemy unit or "capture" it.  It seems to me that if
>it wants to hit, it should fire, but if it wants to capture, it should
>attack normally.

Capture can be either the byproduct of an attempt to "hit" an adjacent unit
or the result of an attempt to capture it directly (without hitting it
first). Units that can capture directly and have an adjacent enemy unit
will usually try that first instead of hitting the unit. This is a problem
in the current code, since occs (which may make a city immune to capture)
are not usually visible to other sides. Accordingly, the AI will believe
that a city is empty and therefore subject to capture, an thus try to
capture it directly, always failing. One way to work around this is to
disable direct capture and only permit indirect capture.

OTOH, units that can fire at a distance will usually do that, as I already
pointed out. Direct capture is therefore not an option for these units,
unless you disable their ability to fire or make firing work only on
adjacent units (set range to 1).

BTW, the rule "capture first if possible, else attack" applies also to the
human player. Thus, if you just click on an adjacent enemy unit, your
current unit will always attempt to capture, overrun, attack, fire at or
move towards the target, in that specific order. This has consequences for
the game play. You can to some extent overrule this default behaviour by
giving the unit an explicit command, such as "fire" instead, and then
select the target.

Hans



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]