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: Major bug and what to do about it (long)


>On Mon, 16 Aug 2004, Hans Ronne wrote:
>
>> Now the ball returns to the AI, who should find something else for our unit
>> to do. However, the AI still sees the same unit view and doesn't know that
>> the task failed, so it sets the same hit_unit task again.
>
>If the action check failed because the unit view doesn't not
>correspond to an actual unit at the given position, then the task
>logic should make a callback to the AI or UI to remove the unit
>view, IMO. This would break the cycle.

Yes, I thought about that. However, since failed tasks do not consume acps,
this would provide a cost-free way to probe the terrain for real vs. bogus
enemy units. A better solution is therefore to use do_fire_into_action
instead, which will not fail because of the intended target being a bogus
unit, and clear the stale unit view if nothing is hit. It was this line of
thought that made me think that we perhaps should do away with
do_fire_at_action altogether, and, by analogy, also do_attack_action.

>However, the unit should be penalized (in terms of ACP,
>material expenditure, etc...) for attempting the action on a
>"ghost" unit. I believe I have mentioned this before, either in
>private email or on the list. In that case, what motivated me to
>mention it was the fire-at-ghost-unit / fire-into cell case. I
>believe this was shortly after I made a fix so that one could not
>probe from cell to cell using the fire command to discover where
>hidden enemy units were.

Letting the failed task consume acps might work in this specific case, but
it would go against how Xconq works in all other situations. For example,
if you click where your unit cannot move, you don't spend any acps. Plans
and tasks are supposed to be only brainchilds of the AI, so it makes sense
to consume acps and materials only when it actually does someting, i.e.
performs an action.

Hans




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