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: Question on combat procedures


>1) Is the above lists in action.def the series of functions that get
>called for a particular attack?

Yes. The normal sequence is that the AI, interface or task code makes two
calls:

1. check_some_action. Checks that the action is possible.

2. Either prep_some_action or net_prep_some_action. Schedules the action
for execution. The net_ functions also broadcast the action, so that every
computer in the game schedules it. For an explanation of the difference
between the two and when to use broadcast functions, see my reply to Peter
Garrone last year:

http://sources.redhat.com/ml/xconq7/2003/msg00918.html

Next time something happens is when the run_game code calls execute_action.
It also makes two calls:

3. check_some_action (in case things changed and the action is no longer
possible).

4. do_some_action, which finally does the job.

BTW, the task code (next abstraction layer above the actions) is quite
similar. See task.def.

Hans




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