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]

Overrun actions (was: Consumption-per-fire?)


I have now looked into the overrun bug. The underlying problem is that the
godzillas in your game can attack as well as fire. The code in
check_overrun_action sees this and therefore allows the overrun attempt to
proceed. It does not even check for ability to fire, which I think is
logical (see below).

The code in do_overrun_action does however check for ability to fire, and
if the unit can fire it does so (and never attempts to attack) even if it
is out of ammo. The overrun action will of course fail in that case, and
you end up wasting ACPs.

There are at least two ways to fix this bug. One is to rewrite the code in
check_overrun_action so that it checks for both ability to fire and attack,
and fix do_overrun_action so that inability to fire does not preclude a
successful melee attack (and vice versa). Ideally, the unit should try the
attack mode that has the highest probability of success first, and then use
the other mode as backup, if necessary.

The other way to fix this bug is to eliminate the possibility of doing
overruns by fire. This would be consistent with Eric's recent comment that
only melee attacks should imply movement. I think this was also how the
overrun code originally worked, as revealed by check_overrun_action. The
firing code in do_overrun_action was probably added at a later point.

I think that the second solution might be more logical, but it would change
the interface behaviour. You would no longer be able to fire at a unit by
clicking on it in move mode. This is perhaps not much of a problem since
putting the cursor over the target and hitting "f" is just as easy (in
fact, I think it is even easier than doing the clickaton). And you have to
do this anyway if you want to fire from a distance, since clicking on the
target only works for adjacent units.

If we remove overrun by fire, units that can also attack will still be able
to overrun by attack. One example of this is the godzillas in your game.
They will use melee attacks if the overrun by fire code is commented out.
Everything then works as expected.

Hans



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