]> granicus.if.org Git - xconq/blob - ChangeLog
commits for 7.5.0 pre-release tarball
[xconq] / ChangeLog
1 2005-06-12  22:02  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
2
3         Fix create check, so that some games will work properly again.
4         * actions.c (could_create): Allow creation with 0 CP to occur.
5
6         Fix bug with oproles not being unassigned when units change side.
7         * unit.c (change_unit_side): Release operational role of unit 
8         from old side.
9
10         Fix bug with construction from Tkconq UI.
11         * tkcmd.c (aux_build2): Help ensure that we are not trying to build 
12         in an invalid or incorrect transport.
13
14         Improve occs-on-completion feature.
15         * actions.c (make_unit_complete): Add incomplete occs with 0 CP 
16         instead of 1 CP.
17         * init.c (check_occs_on_completion): No longer check for cycles 
18         with incomplete units that only need 1 CP to be complete.
19
20         Polish up the Default game some more.
21         * standard.g (variant density2): Rename to 'density1' and turn it 
22         on by default.
23
24 2005-06-10  02:05  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
25
26         Add SF Battles Testbed to 'bitrot' archive.
27         * battles-test.g: Add to archive.
28         * game.dir: Add "battles-test" entry.
29
30 2005-06-08  03:01  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
31
32         Add occs-on-completion feature.
33         (Requested by Elijah and myself.)
34         * table.def (uu_complete_occs_on_completion): New TableUU,
35         'complete-occs-on-completion'.
36           (uu_incomplete_occs_on_completion): New TableUU, 
37         'incomplete-occs-on-completion'.
38         * refman.texi (complete-occs-on-completion): New entry.
39           (incomplete-occs-on-completion): New entry.
40         * actions.c (make_unit_complete): Add occs-on-completion 
41         functionality.
42         * init.c (check_occs_on_completion): Look for cycles in 
43         occs-on-completion graphs and produce an init error if any found.
44           (check_game_validity): Call 'check_occs_on_completion'.
45
46         Bring docs up-to-date.
47         * refman.texi (constructor-absorbed-by): New entry.
48
49         Polish Default game a little bit.
50         * standard.g (variant model1): Rename.
51           (variant model1doctrine): Rename.
52           (density1): Remove.
53         * stdunit.g: Remove creation-related tables, since they are no 
54         longer used.
55
56         Remove StarFleet Battles test from games lib.
57         * battle-test.g: Delete.
58
59 2005-06-07  02:38  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
60
61         Fix colonizer-doesn't-garrision-anymore bug.
62         (I knowingly created this bug with the intent of making a new feature 
63          to fix it. This patch contains the new feature.)
64         * table.def (uu_constructor_absorbed_by): New TableUU, 
65         'constructor-absorbed-by'.
66         * actions.c (do_create_common_2): Only absorb creator into creation 
67         if 'uu_constructor_absorbed_by' is set.
68           (do_build_action): Only absorb builder into completed unit 
69         if 'uu_constructor_absorbed_by' is set.
70         * 3rd-age.g (constructor-absorbed-by): New table.
71         * advances.g: Likewise.
72         * bolodd2.g: Likewise.
73         * bolodd3.g: Likewise.
74         * civ2.g: Likewise.
75         * solar.g: Likewise.
76         * time.g: Likewise.
77         
78         Add test for merge "action" to AI.
79         * aiunit.cc (can_create_in): Check whether colonizer can merge 
80         into colonists or not.
81
82 2005-06-07  00:17  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
83
84         Fix crashing bug in skelconq.
85         (Reported by an anonymous user.)
86         * skelconq.c (main): Only check command-line args for auto-tester 
87         invocation, if there are command-line args. (I could have sworn 
88         that this bug had been reported and fixed before.)
89
90 2005-06-06  02:50  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
91
92         Merge from 'MPT_EMCDONALD_AI_6' to 'MPT_EMCDONALD_AI_7'.
93         Many non-AI-related changes included in this merge.
94         * changelogs/ChangeLog-EMCDONALD_AI: Move from top-level dir. 
95         Branch can continue using this file in top-level, but we wish to 
96         stow it away in 'changelogs' dir in the trunk.
97
98 2005-05-01  13:08  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
99
100         Fixes to Opal Heroes.
101         (From Elijah.)
102         * opal-heroes.g
103
104 2005-05-01  01:40  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
105
106         New make targets.
107         * Makefile.in (bz2dist): New target. Creates a .tar.bz2 dist of 
108         the latest CVS sources.
109           (lzmadist): New target. Creates a .7z (7-Zip LZMA) dist of the 
110         latest CVS sources.
111
112         Make some Sdlconq-related config changes.
113         * configure.in: Comment out tests for Freetype or ParaGUI. 
114         * configure: Regenerated from 'configure.in'.
115         * sdl/Makefile.in: Use SDL compiler and linker flags directly 
116         from the SDL variables rather than from the ParaGUI variables.
117         * sdlconq.h: Ifdef out ParaGUI includes.
118
119 2005-04-30  23:20  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
120
121         Merge from 'MPT_EMCDONALD_AI_5' to 'MPT_EMCDONALD_AI_6'.
122         Many non-AI-related changes included in this merge.
123         * changelogs/ChangeLog-EMCDONALD_AI: Move from top-level dir. 
124         Branch can continue using this file in top-level, but we wish to 
125         stow it away in 'changelogs' dir in the trunk.
126
127 2005-04-19  02:13  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
128
129         Fix compilation with optimization flags set.
130         (Bug reported by David Ronis. Thanks David.)
131         * unit.c (could_be_on): Remove 'inline' inidicator.
132
133 2005-04-16  02:34  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
134
135         Updated image from Elijah.
136         * battles1.gif
137
138 2005-04-16  01:13  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
139
140         Merge from 'MPT_EMCDONALD_AI_4' to 'MPT_EMCDONALD_AI_5'.
141         * changelogs/ChangeLog-EMCDONALD_AI: Move from top-level dir. 
142         Branch can continue using this file in top-level, but we wish to 
143         stow it away in 'changelogs' dir in the trunk.
144
145 2005-04-09  16:03  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
146
147         Help the AI consider the new 'detonate-with-attack' uprop.
148         * ai.c (offensive_worth): Consider automatic detonations with 
149         attack in addition to explicit detonation actions.
150
151 2005-04-09  05:25  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
152
153         Vastly improve AI performance.
154         * plan.c (plan_offense): Free up any goals that have been met 
155         or cannot be met. Give 1/5 chance for replan and 4/5 chance for 
156         reserve if nothing was able to be done in the given plan. (This 
157         may be need to be adjusted. Also, mobile units should be given 
158         the opportunity to shift theaters once plan-like logic is on 
159         AI side.)
160           (plan_offense_support): Likewise.
161           (plan_defense): Likewise.
162           (plan_explore): Likewise.
163           (plan_explorer_support): Likewise.
164           (plan_colonizer): Likewise.
165           (plan_colonization_support): Likewise.
166           (plan_improve): Likewise.
167           (execute_plan): Reduce cap on per-turn executions of a plan from 
168         1000 to 200.
169         * run.c (move_one_unit_multiple): Restore old logic structure for 
170         dealing with ACP-indep units. This makes sure that ACP-indep units 
171         return 0, whether or not they can build.
172
173 2005-04-06  02:16  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
174
175         New features: enhance unit combat experience and side treasuries 
176         depending on combat outcomes.
177         (Patch from Elijah Meeks; modified by me.)
178         * table.def (uu_cxp_per_destroy): New table, 'cxp-per-destroy'.
179           (um_treasury_gain_per_destroy): New table, 
180         'treasury-gain-per-destroy'.
181           (um_treasury_gain_per_create): New table, 
182         'treasury-gain-per-create'.
183           (um_treasury_gain_per_capture): New table,
184         'treasury-gain-per-capture'.
185           (um_treasury_loss_per_destroyed): New table,
186         'treasury-loss-per-destroyed'.
187           (um_treasury_loss_per_create): New table,
188         'treasury-loss-per-create'.
189           (um_treasury_loss_per_captured): New table,
190         'treasury-loss-per-captured'.
191         * utype.def (u_detonate_with_attack): New uprop, 
192         'detonate-with-attack'.
193         * refman.texi (treasury-gain-per-create): New entry. Not yet 
194         implemented.
195           (treasury-loss-per-create): New entry. Not yet implemented.
196           (cxp-per-destroy): New entry. 
197           (treasury-gain-per-destroy): New entry. 
198           (treasury-loss-per-destroyed): New entry.
199           (treasury-gain-per-capture): New entry.
200           (treasury-loss-per-captured): New entry.
201           (detonate-on-attack): New entry.
202         * combat.c (maybe_hit_unit): Add support for detonation upon 
203         melee attack.
204           (hit_unit): Add support for treasury bonuses and penalties as a 
205         result of unit destruction. Also add support for attacker gaining 
206         combat experience as a result of destroying another unit.
207           (capture_unit): Add support for treasury bonueses and penalties 
208         as a result of unit capture.
209
210 2005-04-05  01:51  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
211
212         Merge from 'MPT_EMCDONALD_AI_3' to 'MPT_EMCDONALD_AI_4'.
213         * changelogs/ChangeLog-EMCDONALD_AI: Move from top-level dir. 
214         Branch can continue using this file in top-level, but we wish to 
215         stow it away in 'changelogs' dir in the trunk.
216
217 2005-04-01  02:17  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
218
219         Merge from 'MPT_EMCDONALD_AI_2' to 'MPT_EMCDONALD_AI_3'.
220         * changelogs/ChangeLog-EMCDONALD_AI: Move from top-level dir. 
221         Branch can continue using this file in top-level, but we wish to 
222         stow it away in 'changelogs' dir in the trunk.
223
224 2005-03-29  Matthew Skala  <mskala@ansuz.sooke.bc.ca>
225
226         Fix crashing bug when no isometric image nor tile has been defined
227         for a terrain type.
228         * imf.c (best_image_in_range): As a last resort, try to make a flat
229         colour when there's no tile nor scaling candidate.
230
231 2005-03-28  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
232
233         Add support for developing with Dev-C++ on Windows.
234         * pkg/README_devcpp_w32.rtf: New documentation file.
235         * pkg/devcpp_w32_SFX.exe: New Win32 self-extractor program.
236
237 2005-03-28  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
238
239         Merge from 'MPT_EMCDONALD_AI_1' to 'MPT_EMCDONALD_AI_2'.
240         * changelogs/ChangeLog-EMCDONALD_AI: Move from top-level dir. 
241         Branch can continue using this file in top-level, but we wish to 
242         stow it away in 'changelogs' dir in the trunk.
243
244 2005-03-21  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
245
246         Merge from root of 'BRANCH_EMCDONALD_AI' to 'MPT_EMCDONALD_AI_1'.
247         * changelogs/ChangeLog-EMCDONALD_AI: Move from top-level dir. 
248         Branch can continue using this file in top-level, but we wish to 
249         stow it away in 'changelogs' dir in the trunk.
250
251 2005-03-21  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
252
253         Merge from 'MPT_MSKALA_SUPPLY_2' to 'MPT_MSKALA_SUPPLY_3'.
254         * changelogs/ChangeLog-MSKALA_SUPPLY: Move from top-level dir. 
255         Branch can continue using this file in top-level, but we wish to 
256         stow it away in 'changelogs' dir in the trunk.
257
258 2005-03-14  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
259
260         Merge from 'MPT_MSKALA_SUPPLY_1' to 'MPT_MSKALA_SUPPLY_2'.
261         * changelogs/ChangeLog-MSKALA_SUPPLY: Move from top-level dir. 
262         Branch can continue using this file in top-level, but we wish to 
263         stow it away in 'changelogs' dir in the trunk.
264
265 2005-03-12  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
266
267         Fix crashing bug with restored games that have only one side.
268         * cmdline.c (set_players_from_options): Do not attempt to access 
269         the 'next' member of a NULL player.
270
271         Partially fix a bug with the scaling of connections.
272         (Bug reported by Matthew.)
273         * imf.c (scale_image): Copy over 'isconnection' and other fields 
274         from original image to scaled image. (Note: The bug is still not 
275         fixed, but at least now the behavior is consistent whether grid 
276         is on or not. Also, the SDL interface now correctly displays the 
277         scaled image (as opposed to drawing nothing as it would have 
278         before this fix), and so it would not appear to be a problem with 
279         the interface-indep code. The remaining problem could be in the 
280         'tkimg' that corresponds to the generic Image.)
281
282         Fix crashing bugs with uviews that have no associated images.
283         * ui.c (can_use_oversized_img): Return FALSE if the uview has 
284         no IMF.
285         * sdlmap.cc (draw_unit_image): Do not attempt to draw image 
286         effects or decorations if the image is NULL.
287         * tkmap.c (draw_unit_image): Likewise.
288
289 2005-03-08  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
290
291         Fix isometric drawing of connections on Windows.
292         (Bug reported by Elijah.)
293         * tkmap.c (draw_connections_iso): Align "mask" with image so that 
294         connections do not appear to float.
295
296 2005-03-06  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
297
298         Make Windows installer install doc files with '.html' extension 
299         rather '.htm' extension.
300         * xconq.nsi.in: Do not rename files from '.html' to '.htm'.
301
302         Updates from Elijah.
303         * battles1.gif, dg_abyss.gif, awls-rules.g, battles.g, conquest.g, 
304         opal-heroes.g, opal-rules.g, opal.g, u-opal.g, u-val-beach-2.g, 
305         u-val-beach.g, valhalla-beach.g, valhalla.g: Update.
306
307 2005-03-05  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
308
309         Continue building up AI analysis of scorekeepers.
310         * aiscore.h (AI_SKANode_UpropInt): Replace 'uprop_int' member with 
311         'upropname' member.
312           (AI_SKANode_UpropInt::construct): Add 3 parameters.
313           (AI_SKANode_UpropInt::merge_or_insert_into_list): New prototype.
314           (AI_SKAnalysis): Many new members.
315         * aiscore.cc (AI_SKANode_UpropInt::init): Use uprop name instead 
316         of getter function.
317           (AI_SKANode_UpropInt::construct): Add 3 parameters to constructor 
318         for initializing the side-and-utypes table, and for setting the 
319         uprop name.
320           (AI_SKANode_UpropInt::copy_to): Use uprop name instead of getter 
321         function.
322           (AI_SKANode_UpropInt::merge_or_insert_into_list): New static 
323         function. Add a new 'AI_SKANode_UpropInt' if no existing one matches 
324         its upropname or if the list if NULL. Else, merge the side-and-utype 
325         tables between new node and existing node.
326           (AI_SKAnalysis::init): Properly init all members.
327           (AI_SKAnalysis::copy_to): Properly deep copy all members.
328           (AI_SKAnalysis::destroy): Properly dealloc all members.
329           (analyze_sk_sum_uprop_test): Implement.
330
331 2005-03-04  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
332
333         Fix bug in the reporting of the nearest unit under mouse cursor.
334         (This fix is a bit hackish. It will hopefully be improved during 
335         the development of the formal UI API.)
336         * ui.h (find_uview_at_pixel): New prototype.
337           (find_uview_at_pixel): New prototype.
338         * ui.c (find_uview_at_pixel): New function. Recursively check 
339         occ uviews to see if any are at pixel. If not, then check uview 
340         itself to see if it is at pixel.
341           (find_uview_at_pixel): New function. Check all members of a uview 
342         stack to if any are at pixel.
343           (nearest_unit_view): Call 'find_uview_at_pixel' instead of 
344         'find_unit_view_at'.
345         * sdlmap.cc (x_nearest_unit): Call 'nearest_unit_view' and then 
346         return associated unit. Ifdef out code that attempts to do 
347         duplicate 'nearest_unit'.
348         * tkmap.c (x_nearest_unit): Likewise.
349
350 2005-03-01  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
351
352         Fix bug in automatic repair materials consumption.
353         (I woke up embarassed by it this morning.)
354         * run2.c (auto_repair_unit): Do not consume any materials until 
355         all materials checks have passed.
356
357 2005-03-01  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
358
359         Make sure that 'consumption-per-repair' is applied during 
360         auto-repair.
361         (Bug reported by Matthew.)
362         * run2.c (auto_repair_unit): Check to see if any material 
363         consumed while repairing is sufficient for the repair to take 
364         place. If yes, then consume the correct amount of that material 
365         if the consumption requirement is > 0. (Note: ACP-indep/automatic 
366         repair should be handled through the regular action code in the 
367         same way that automatic upgrades are handled through the change-
368         type code.)
369
370 2005-03-01  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
371
372         Attempt a fix to a transport entry bug.
373         (Bug reported by Matthew.)
374         * move.c (total_entry_cost): If movement is within same cell, then 
375         do not charge a cell departure cost. However, a cell entry cost 
376         may still be charged; this allows a game designer to simulate 
377         a charge for an unit moving from one transport to another within 
378         the cell. (These changes should not affect existing games.)
379
380 2005-02-28  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
381
382         Do some housecleaning.
383         * score.c (eval_sk_form): Delete old ifdeffed out version.
384           (sum_property): Likewise.
385           (eval_sk_test): Likewise.
386
387 2005-02-28  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
388
389         Continue building the AI's scorekeeper analysis.
390         * aiscore.h (struct AI_SKAnalysis): Many new members.
391           (analyze_sk_arith_gt_test): New prototype.
392           (analyze_sk_arith_ge_test): Likewise.
393           (analyze_sk_arith_lt_test): Likewise.
394           (analyze_sk_arith_le_test): Likewise.
395           (analyze_sk_arith_ne_test): Likewise.
396           (analyze_sk_arith_eq_test): Likewise.
397           (analyze_sk_bool_and_test): Likewise.
398           (analyze_sk_bool_or_test): Likewise.
399         * aiscore.cc (AI_SKAnalysis::init): Initialize more new fields.
400           (AI_SKAnalysis:;destroy): Free dynamic arrays.
401           (AI_SKAnalysis::search_test_ops_for): New member function. 
402         Search the stack/list of test ops.
403           (analyze_sk_sum_uprop_test): Make parameter list conform to 
404         draft 2 framework. (Still need to implement.)
405           (analyze_sk_turn_test): Rewrite according to draft 2 framework.
406           (analyze_sk_score_test): Rewrite according to draft 2 framework.
407           (analyze_sk_arith_op_test): Implement. Analyze arithmetic 
408         operators forms in scorekeeper.
409           (analyze_sk_arith_gt_test): New function. Analyze '>' forms in 
410         scorekeeper.
411           (analyze_sk_artih_ge_test): New function. Analyze '>=' forms in 
412         scorekeeper.
413           (analyze_sk_arith_lt_test): New function. Analyze '<' forms in 
414         scorekeeper.
415           (analyze_sk_arith_le_test): New function. Analyze '<=' forms in 
416         scorekeeper.
417           (analyze_sk_arith_ne_test): New function. Analyze '/=' forms in 
418         scorekeeper.
419           (analyze_sk_arith_eq_test): New function. Analyze '=' forms in 
420         scorekeeper.
421           (analyze_sk_arith_comp_test): Finish implementing. Analyze 
422         arithmetic comparison forms in scorekeeper.
423
424 2005-02-27  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
425
426         Provide unimplemented 'free-acp' feature.
427         ("Unimplementedness" reported by Matthew.)
428         * actions.c (has_enough_acp): Add 'free-acp' to current ACP when 
429         checking action's ACP debt.
430         * refman.texi (free-acp): Rewrite entry for clarity.
431
432 2005-02-26  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
433
434         Fix bug which caused combat experience and morale to be recycled 
435         from a previous dead unit.
436         (Cxp bug reported by Elijah.)
437         * unit.c (create_unit): Zero combat experience and morale.
438
439 2005-02-25  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
440
441         Properly fix Texinfo sources.
442         * refman.texi (backdrop-ignore-doctrine): Use the 'code' keyword 
443         to wrap the name in the definition.
444
445 2005-02-25  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
446
447         Fix bug in Texinfo sources so that they compile again.
448         * refman.texi (backdrop-ignore-doctrine): Remove stray "in-length" 
449         in front of definition name.
450
451 2005-02-23  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
452
453         Add 'economy.c' from 'BRANCH_MSKALA_SUPPLY'. I forgot to remove 
454         its sticky tag before committing the merge.
455         * economy.c: New file.
456
457 2005-02-23  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
458
459         Merge from root of 'BRANCH_MSKALA_SUPPLY' to 
460         'MPT_MSKALA_SUPPLY_1'.
461         * changelogs/ChangeLog-MSKALA_SUPPLY: Move from top-level dir. 
462         Branch can continue using this file in top-level, but we wish to 
463         stow it away in 'changelogs' dir in the trunk.
464
465 2005-02-23  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
466
467         Fix freezing on some versions of multithreaded Tcl.
468         * tkamin.c (ui_mainloop): Block on 'Tcl_DoOneEvent'.
469
470 2005-02-22  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
471
472         Continue building up the AI's scorekeeper analysis.
473         (Second draft. Much cleaner. Getting fairly close to the point 
474          where things can be hooked in.)
475         * ai.c (create_ai_sk_analysis): Delete. No longer needed.
476         * ai.h (struct a_ai_sk_analysis): Transplant to 'aiscore.h' with 
477         major rewrite.
478           (AI_SKA_*): Transplant these macros to 'aiscore.h'.
479           (AI_SKT_*): Likewise.
480           (AI_SKT_ARITH_COMPARISONS): Transplant to 'aiscore.h'.
481           (AI_SKT_ARITH_OPERATIONS): Likewise.
482         * mplayer.c (analyze_sk_turn_test): Transplant to 'aiscore.cc'.
483           (analyze_sk_score_test): Likewise.
484           (analyze_sk_sum_uprop_test): Likewise.
485           (analyze_sk_test): Transplant most parts to 'aiscore.cc'. Ifdef 
486         out rest, awaiting transplant.
487           (analyze_sk_action): Transplant to 'aiscore.cc'.
488           (analyze_scorekeeper): Transplant to 'aiscore.cc'.
489         * aiscore.h: New header file. Fully "Doxgenated" documentation 
490         included.
491           (enum AI_SKANKind): Kinds of AI scorekeeper analysis nodes.
492           (struct AI_SKANode): Abstract base struct for scorekeeper analysis 
493         nodes.
494           (struct AI_SKANode_UpropInt): Public subclass of 'AI_SKANode'. 
495         Scorekeeper analysis node for integer uprops with side/utype filters.
496           (struct AI_SKANode_TestOp): Public subclass of 'AI_SKANode'.
497         Scorekeeper analysis node for test operators.
498           (struct AI_SKAnalysis): Transplant from 'ai.h' with major 
499         rewrite.
500           (AI_SK_*): Macros related to general properties of a scorekeeper 
501         analysis.
502           (AI_SKA_*): Transplant from 'ai.h'.
503           (AI_SKT_*): Likewise.
504           (analyze_sk_turn_test): Function prototype.
505           (analyze_sk_score_test): Likewise.
506           (analyze_sk_sum_uprop_test): Likewise.
507           (analyze_sk_artih_op_test): Likewise.
508           (analyze_sk_arith_comp_test): Likewise.
509           (analyze_sk_bool_comp_test): Likewise.
510           (analyze_sk_when_test): Likewise.
511           (analyze_sk_always_true_test): Likewise.
512           (analyze_sk_test): Likewise.
513           (analyze_sk_if_action): Likewise.
514           (analyze_sk_action): Likewise.
515           (analyze_scorekeeper): Likewise.
516         * aiscore.cc: New implementation file. Fully "Doxygenated" 
517         documenation included.
518           (AI_SKANode::init): Static function. Initializer.
519           (AI_SKANode::copy_to): Member function. Deep copier.
520           (AI_SKANode_UpropInt::init): Static function. Initializer.
521           (AI_SKANode_UpropInt::construct): Static function. 'xmalloc'-using 
522         "constructor". (Note: We are not yet in a position to intercept 
523         a 'bad_alloc' object should one be thrown. Also, 'xmalloc' tracks 
524         memory allocation stats for us. 'new' does not.)
525           (AI_SKANode_UpropInt::copy_to): Member function. Deep copier.
526           (AI_SKANode_UpropInt::clone): Member function. "Copy constructor".
527           (AI_SKANode_UpropInt::clone_list): Member function. List 
528         "copy constructor".
529           (AI_SKANode_UpropInt::destroy): Static function. "Destructor".
530           (AI_SKANode_UpropInt::destroy_list): Static function. List 
531         "destructor".
532           (AI_SKANode_TestOp::init): Static function. Initializer.
533           (AI_SKANode_TestOp::construct): Static function. 'xmalloc'-using 
534         "constructor". 
535           (AI_SKANode_TestOp::copy_to): Member function. Deep copier.
536           (AI_SKANode_TestOp::clone): Member function. "Copy constructor".
537           (AI_SKANode_TestOp::clone_list): Member function. List 
538         "copy constructor".
539           (AI_SKANode_TestOp::destroy): Static function. "Destructor".
540           (AI_SKANode_TestOp::destroy_list): Static function. List 
541         "destructor".
542           (AI_SKAnalysis::init): Static function. Initializer.
543           (AI_SKAnalysis::construct): Static function. "Constructor".
544           (AI_SKAnalysis::copy_to): Member function. Deep copier.
545           (AI_SKAnalysis::clone): Member function. "Copy constructor".
546           (AI_SKAnalysis::destroy): Static function. "Destructor".
547           (AI_SKAnalysis::push_test_op): Member function. Push an operator 
548         onto the stack of test operators.
549           (AI_SKAnalysis::pop_test_op): Member function. Pop an operator 
550         from the stack of test operators.
551           (analyze_sk_turn_test): Transplant from 'mplayer.c'. (Needs to 
552         be rewritten for the new "draft 2" framework.)
553           (analyze_sk_score_test): Likewise.
554           (analyze_sk_sum_uprop_test); Likewise.
555           (analyze_sk_arith_op_test): Analyze arithmetic operator forms. 
556         (Needs to be implemented.)
557           (analyze_sk_arith_comp_test): Analyze arithmetic comparison forms.
558         (Needs to be implemented.)
559           (analyze_sk_bool_or_test): Analyze boolean 'or' form.
560           (analyze_sk_bool_and_test): Analyze boolean 'and' form.
561           (analyze_sk_bool_comp_test): Analyze boolean comparison forms.
562           (analyze_sk_when_test): Analyze "when" conditions. (Needs to 
563         be implemented.)
564           (analyze_sk_always_true_test): Analyze actions/outcomes in light 
565         of a test always yielding true.
566           (analyze_sk_test): Transplant from 'mplayer.c'. Major rewrite.
567           (analyze_sk_if_action): Analyze 'if' forms.
568           (analyze_sk_action): Transplant from 'mplayer.c'. Major rewrite.
569           (analyze_scorekeeper): Transplant from 'mplayer.c'. Minor rewrite.
570
571 2005-02-20  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
572
573         Continue building up the AI's scorekeeper analysis.
574         (Note that I will likely be moving this mass of new code to a 
575          separate, new file or two.)
576         (Also note that this is the first draft. We will likely need to 
577          handle disjoint sets of utypes and whatnot in the future. We will 
578          also probably want to make things more accurate and less like 
579          guesswork by passing additonal analysis info up and down the 
580          parse tree.)
581         * ai.h (AI_SKAnalysis): New fields for tracking more quantities of 
582         interest. (This will probably be reworked soon.)
583           (AI_SKActionType): Delete. Replace with individual power-of-2 
584         macros.
585           (AI_SKTestType): Likewise.
586           (AI_SKT_ARITH_COMPARISONS): Inclusive-or of all arithmetic 
587         comparison flags.
588           (AI_SKT_ARITH_OPERATIONS): Inclusive-or of all arithmetic 
589         operation flags.
590         * mplayer.c (analyze_sk_turn_test): New analyzer for handling 
591         actions related to a test on the 'turn' keyword.
592           (analyze_sk_score_test): New analyzer for handling actions 
593         related to a test on the 'score' keyword.
594           (analyze_sk_sum_uprop_test): New analyzer for handling actions 
595         related to a test on the 'sum-uprop' keyword. (Need to finish 
596         implementing.)
597           (analyze_sk_test): Fill out. Handle all sorts of things based on 
598         action flags. Plenty of recursive analysis into subforms. 
599         (Need to break this function up. It is a monster.)
600           (analyze_sk_action): Tweak a few things as far as giving arguments 
601         is concerned.
602           (analyze_scorekeeper): Tweak the giving of arguments so that the 
603         "master test" object is 't'.
604
605 2005-02-19  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
606
607         Improve documentation wrt construction consuming from treasury.
608         * refman.texi (takes-from-treasury): Mention how this works when 
609         an unit has storage capacity for a material and when it doesn't.
610
611 2005-02-19  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
612
613         Improve wrt the sun position calculation.
614         * refman.texi (axial-tilt): Mention how this affects the sun's 
615         initial position.
616           (initial-year-part): Likewise.
617           (initial-day-part): Likewise.
618         * run2.c (compute_sun): Remove some ifdeffed out code. Simplify the 
619         latitudinal correction. Account for 'initial-year-part'.
620
621 2005-02-19  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
622
623         Fix long-standing issue with not being able to add values lists 
624         as properties to each element of types lists.
625         (Complaint made by Lincoln Peters. This has also bothered me for 
626         ages. Don't know why I didn't address it sooner.)
627         * lisp.h (is_quoted_lisp): New prototype.
628         * lisp.c (is_quoted_lisp): New function. Is the GDL object a 
629         quoted one?
630         * read.c (add_properties): Do not eval quoted GDL objects.
631           (add_to_utypes): Only process a values list if it is unquoted, 
632         otherwise treat it like an atom after unwrapping it from 'quote'.
633           (add_to_mtypes): Likewise.
634           (add_to_ttypes): Likewise.
635           (add_to_atypes): Likewise.
636
637         Quoting the 'possible-sides' list has not been needed since an earlier 
638         fix to the boolean expression evaluator, IIRC. Now that the new 
639         quoted list property handling is in place, it is important to 
640         demand that the 'possible-sides' list is unquoted. Therefore, fix 
641         games in the library where this is an issue.
642         * cave2.g: Remove quote in front of boolean expression form.
643         * lhsunit.g: Likewise.
644         * logunit.g: Likewise.
645         * postmodern.g: Likewise.
646         * russian-rev.g: Likewise.
647         * stdunit.g: Likewise.
648
649         Add new IMF for a purely blank image.
650         (Thanks to Simon Cox for this contribution.)
651         * imf.dir (blank): Find in 'province.imf'.
652         * province.imf: New file. Defines a purely blank image.
653
654 2005-02-19  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
655
656         Fix bug with potential colonizers falling into the passive plan 
657         because they cannot yet create anything that can create them.
658         (Bug reported by Elijah.)
659         * ai.h (assign_to_colonize): Return int instead of nothing.
660         * ai.c (assign_to_colonize): Return int indicating whether 
661         assignment was successful or not. Do not assign passive plan upon 
662         failure.
663         * iplayer.c (iplayer_decide_plan): Only return if a colonization 
664         plan was successfully assigned.
665         * mplayer.c (mplayer_decide_plan): Likewise.
666
667 2005-02-15  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
668
669         Fix bug that prevented death-by-detonation from having the 
670         'wrecked-type-if-killed' table apply.
671         (Bug reported by Elijah.)
672         * kernel.h (reckon_damage_around): Take additional parameter.
673         * combat.c (reckon_damage_around): Take additional parameter for 
674         the detonating unit. Set the static variable 'tmp_unit_detonator' 
675         to the detonating unit. (Note: This should be replaced with the 
676         parambox stuff.)
677           (reckon_damage_here): Use the 'tmp_unit_detonator' variable 
678         when calling 'damage_unit'.
679           (do_detonate_action): Call 'reckon_damage_around' with the 
680         detonating unit as the new argument.
681         * move.c (detonate_on_approach_around): Likewise.
682         * run2.c (run_detonation_accidents): Likewise.
683
684         Lay foundation for scorekeeper analysis by AI.
685         * ai.h (struct a_strategy): Add 'sk_analyses' slot.
686           (struct a_ai_sk_analysis): New struct for AI scorekeeper record.
687         Typedef to 'AI_SKAnalysis'.
688           (enum a_ai_sk_action_type): New enum for AI scorekeeper analysis.
689         Typedef to 'AI_SKActionType'.
690           (enum a_ai_sk_test_type): New enum for AI scorekeeper analysis.
691         Typedef to 'AI_SKTestType'.
692           (create_ai_sk_analysis): New prototype.
693         * ai.c (create_ai_sk_analysis): New function. Create and initialize 
694         a new scorekeeper analysis record for an AI.
695         * mplayer.c (analyze_the_game): Make the AI still try even if no 
696         scorekeepers apply to it.
697           (analyze_sk_test): New function. Analyze a scorekeeper test 
698         on behalf of the AI, and fill out a scorekeeper analysis according 
699         to what is learned from the test and the action flags. 
700         [Still needs to filled out.]
701           (analyze_sk_action): New function. Analyze a scorekeeper action 
702         on behalf of the AI, and set action flags accordingly.
703           (analyze_scorekeeper): New function. Analyze a scorekeeper on 
704         behalf of the AI.
705           (determine_subgoals): A few tweaks which are likely to replaced 
706         once the new scorekeeper analysis functionality is hooked in.
707         * score.h (should_try_to_win): Delete prototype. No longer used.
708         * score.c (should_try_to_win): Delete function. No longer used.
709
710         Fix bug in scorekeeper parsing.
711         * score.c (eval_sk_form): Properly handle else clause of 'if' 
712         keyword.
713
714         Fix bug in documenation of 'change-type' action.
715         (Bug reported by Simon Cox.)
716         * refman.texi (material-to-change-type): Rewrite so that the 
717         correct unit is indicated.
718
719 2005-02-14  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
720
721         Fix crashing bug in unit view code.
722         (Bug reported by Elijah.)
723         * side.c (see_cell): Make sure that we do not attempt to mistake 
724         an unit view that is not new.
725
726         Fix small calculation error in solar yearlong latitude correction.
727         * run2.c (compute_sun): Latitude cells should be computed out of 
728         1/4 circumference not 1/2.
729
730 2005-02-13  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
731
732         Add documentation for the 'vision-bend' replacement.
733         * refman.texi (Line of Sight): Remove entry for 'vision-bend'. 
734         Replace with 'can-see-behind'.
735
736 2005-02-13  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
737
738         Fix bug in ACP-indep construction.
739         (Bug reported by Matthew.)
740         * run.c (run_construction): If an unit is out of some material 
741         and has built on the unit that turn, then report this as a 
742         problem and cease attempting to build. (If the builder later gets 
743         more of the necessary supply, then building can be resumed.) Also, 
744         fix another bug that I found while working on Matthew's bug: 
745         materials are consumed before it is certain that the build action 
746         succeeds. To fix this, we simply move the consumption of any 
747         materials to after the action, and only consume if it was 
748         successful.
749
750         (Note: The ACP-indep construction code in its present form is a 
751         pile of crap. It is in need of a serious rewrite.)
752
753 2005-02-13  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
754
755         Fix oddity with the 'vision-bend' uprop.
756         (Oddity reported by Matthew Skala.)
757         * utype.def (u_vision_bend): Rename to 'u_can_see_behind', 
758         'can-see-behind'.
759         * help.c (describe_utype): Use 'u_can_see_behind' instead of 
760         'u_vision_bend'.
761         * side.c (init_view): Likewise.
762           (cover_area_1): Likewise.
763         * battles.g, beirut.g, bolodd2.g, bolodd3.g, cav.g, cave2.g, 
764         colonizer.g, gettysburg.g, metz-1994.g, panzer.g, pgu.g, 
765         solar.g, space.g: Replace 'vision-bend' with 'can-see-behind'.
766
767 2005-02-12  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
768
769         Fix bugs in calculation of sunlit regions.
770         (Bug report from Lincoln Peters.)
771         * run2.c (compute_sun): Make sure that the sun position wraps in 
772         the x direction. There was a problem with the sun going off map in 
773         that direction, which should never happen. Also, ifdef out wacky 
774         sun y position calculation. Make new sun y position calc based on 
775         yearlength rather than daylength; use triangle wave approx to 
776         sine wave.
777
778 2005-02-12  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
779
780         One last mod to 'transfer-parts'.
781         * table.def (uu_can_transfer_parts): Change default from true to 
782         false, since the default for 'u_acp_to_transfer_parts' was 0 when 
783         0 prevented the action from occuring. This does not appear to 
784         affect existing games, since Napoleon is the only one that 
785         actually uses parts. (Voyages and WWII Pacific - Division Level 
786         declare some units as having parts but apparently do not use the 
787         parts in the parts transfer context.)
788
789 2005-02-12  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
790
791         Modify transfer parts action some more.
792         * table.def (uu_transfer_parts): Rename to 'uu_can_transfer_parts_to', 
793         'can-transfer-parts-to'.
794         * actions.c (check_transfer_part_action): Use 
795         'can-transfer_parts_to' instead of old table name. Remove 
796         restriction that the action must require ACP.
797         * napoleon.g (transfer-parts): Use 'can-transfer-parts-to' instead 
798         of old name.
799
800         Relax the "ACP left" check.
801         * actions.c (has_acp_left): If the action does not require ACP, 
802         then we don't care if the actor has ACP. (Note: This may cause bugs. 
803         I ran a few test games and didn't see any problems, but that 
804         doesn't mean that there aren't any.)
805
806         Update documentation.
807         * refman.texi (Scorekeeper Examples): Polish a few examples.
808           (Transfer Parts Action): Document 'can-transfer-parts-to', and 
809         update other parts of this documentation.
810
811 2005-02-11  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
812
813         Fix bug with the 'transfer-part' action.
814         (Bug report from Lincoln Peters.)
815         * table.def (uu_transfer_parts): New TableUU, 'transfer-parts', 
816         which determines which units can transfer parts to one another. 
817         True by default, for backward compatibility.
818         * actions.c (check_transfer_part_action): If the target unit is 
819         not NULL, then verify that is of type that is compatible with the 
820         donor unit. Also, check if the target unit can even have parts. 
821         If not, then it should not be a recipient? Maybe. For now, this 
822         is true, probably until someone complains that he/she would like to 
823         be able to reinforce a non-partitioned unit from a partitioned one.
824         * napoleon.g (transfer-parts): New table. Restrict part transfers 
825         to units of the same type since the parts take different amounts of 
826         CP to produce and they are militarily dissimilar.
827
828 2005-02-10  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
829
830         Fix bug with 'see-always' units not being seen when terrain is 
831         known.
832         (Bug report from ksbrace00 and Elijah Meeks.)
833         * side.c (side_sees_unit): Test to see if the unit is always seen 
834         and if it is on known terrain.
835           (side_sees_image): Likewise.
836           (see_cell): Remove some old ifdeffed out code.
837
838 2005-02-07  Matthew Skala  <mskala@ansuz.sooke.bc.ca>
839
840         Fix bug in adjacent-terrain-border and adjacent-terrain-connection.
841         * mkterr.c (fix_adjacent_terrain): Don't delete borders/connections
842         from layers that don't already exist and so force layer creation.
843
844 2005-02-07  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
845
846         Updates from Elijah's families of games.
847         (Thanks Elijah.)
848         * battles1.gif: Update.
849         * u-val-beach-2.g: New support file for Valhalla Beach.
850         * u-val-beach.g: Update.
851         * awls-rules.g: Update.
852         * valhalla.g: Update.
853         * korea-2006.g: Update.
854         * valhalla-beach.g: Update. Includes a 2-player variant.
855
856         New solar system terrain generator, star namer, and images.
857         (Thanks Matthew.)
858         * solar.g: Solar system generator.
859         * ng-star.g: Name generator for various celestial objects.
860         * solar.gif: New "space" images.
861         * thinline.gif: Solar system orbit connectors.
862
863 2005-02-07  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
864
865         Finish scorekeeper improvements (for now).
866         * refman.texi (Scorekeepers): Clean up various sections. Add more 
867         examples. Document new 'score' keyword.
868         * keyword.def (K_SCORE): New keyword, 'score'.
869         * score.h (sum_property): Delete prototype.
870           (sum_uprop): New prototype.
871         * score.c (sum_uprop): New function. Sums an uprop over all of 
872         specified utypes.
873           (eval_sk_test): Hook in support for 'K_SUM_UPROP' and 'K_SCORE'.
874           (eval_sk_form): Hook in support for 'K_SET_SCORE',
875         'K_ADD_SCORE', 'K_WIN', 'K_LOSE', and 'K_END'.
876           (sum_property): Ifdef out.
877
878         New util function for flagging an array of utypes based on a GDL 
879         object.
880         * kernel.h (fill_utype_array_from_lisp): New prototype.
881         * unit.c (fill_utype_array_from_lsip): New function.
882
883 2005-02-06  Matthew Skala  <mskala@ansuz.sooke.bc.ca>
884
885         Automated generation of connections based on adjacent terrain.
886         * table.def (adjacent-terrain-connection): New table.
887           (adjacent-terrain-connection-chance): New table.
888         * refman.texi (Terrain Compatibility): Document new tables.
889         * mkterr.c (fix_adjacent_terrain): Implement new feature.
890
891 2005-02-06  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
892
893         More scorekeeper improvements.
894         * refman.texi (Language Syntax): Add new menu nodes and subsections 
895         for "Arithmetic Comparisons" and "Boolean Comparisons". Change 
896         "Arithmetic Expressions" to "Arithmetic Operations". Document 'not', 
897         'and', 'or', '=', '/=', '<', '<=', '>', and '>=' in the new 
898         subsections.
899           (Scorekeepers): Various corrections and rearrangements of the 
900         text. New entry for 'keep-score'. Rename 'initial' to 
901         'initial-score'. Rename 'sum' to 'sum-uprop'. Rename 'set' to 
902         'set-score'. Rename 'add' to 'add-score'. Remove boolean and 
903         arithmetic comparison functions from list of scorekeeper functions 
904         since they are now generic. Add new example showing how 
905         arithmetic operation and comparison may be used in a "when 
906         expression".
907         * keyword.def: Sort things pertaining to advanced units into their 
908         proper slots; I shouldn't have had to do this, but apparently the 
909         implementer of that feature was too lazy to do so.
910           (K_ADD_SCORE): New GDL keyword, 'add-score'.
911           (K_INITIAL): Change to 'K_INITIAL_SCORE', 'initial-score'.
912           (K_SET_SCORE): New GDL keyword, 'set-score'.
913           (K_SUM): Change to 'K_SUM_UPROP', 'sum-uprop'.
914         * score.h (struct a_scorekeeper): Add 'keepscore' field.
915         * mplayer.c (determine_subgoals): Replace 'K_SUM' with 
916         'K_SUM_UPROP'.
917         * nlang.c (side_score_desc): Return an empty buffer when the 
918         scorekeeper is not keeping numeric score.
919         * read.c (interp_scorekeeper): Repalce 'K_INITIAL' with 
920         'K_INITIAL_SCORE'. Handle 'K_KEEP_SCORE' case.
921         * score.c (create_scorekeeper): Change initial score value from 
922         the forbidden '-10001' to '0'. Set the 'keepscore' field to 
923         'TRUE' by default.
924           (init_scores): Only increment the number of scorekeepers if the 
925         the scorekeeper is flagged as keeping score.
926         * write.c (write_scorekeepers): Handle 'K_KEEP_SCORE' case. Change 
927         default value of 'K_INITIAL_SCORE' from '-10001' to '0'.
928         * tkmain.c (update_side_score_display): Only get a scorekeeper 
929         description and display if a numeric score is being kept.
930
931 2005-02-05  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
932
933         Hoist boolean and arithmetic comparison keywords out of 
934         scorekeeper logic into general GDL evaluator.
935         * lisp.h (eval_boolean_expression): New prototype.
936           (eval_arithmetic_comparison_expression): New prototype.
937         * lisp.c (eval): Handle cases for 'K_NOT', 'K_AND', 'K_OR', 
938         'K_EQ', 'K_NE', 'K_LT', 'K_LE', 'K_GT', and 'K_GE'. Dispatch 
939         boolean comparisons to 'eval_boolean_expression' function. 
940         Dispatch arithmetic comparisons to 
941         'eval_arithmetic_comparison_expression' function.
942           (eval_boolean_expression): New function. Evaluates 'not', 'and', 
943         and 'or' keywords.
944           (eval_arithmetic_comparison_expression): New function. 
945         Evaluates '=', '/=', '<', '<=', '>', and '>=' keywords.
946
947         Ensure that GDL bool constants always match the value of the macros 
948         we use in hacking.
949         * read.c (init_predefined_symbols): Set the value of the 'K_FALSE' 
950         symbol to 'FALSE' rather than 0. Set the value of the 'K_TRUE' 
951         symbol to 'TRUE' rather than 1.
952
953         Rearchitect scorekeeper logic to walk the expression tree and 
954         expand any scorekeeper specific keywords, and then run the general 
955         GDL evaluator on the tree afterwords.
956         * score.h (eval_sk_test): Replace old prototype with one that 
957         returns 'Obj *' instead of 'int'.
958           (eval_sk_form): Likewise.
959         * score.c (generate_effective_sk_whomask): Check the scorekeeper 
960         test result against 'nil' instead of 'FALSE'.
961           (eval_sk_test): Rewrite.
962           (eval_sk_form): Likewise.
963
964 2005-01-30  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
965
966         Restore the 'u_size_min' and 'u_size_max' properties.
967         * run.c (run_population): Put code segments back in proper order.
968         Restore checks against 'u_size_min' and 'u_size_max'.
969         * utype.def (u_size_min): New property (restored, actually), 
970         'size-min'.
971           (u_size_max): New property (restored), 'size_max'.
972
973 2005-01-30  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
974
975         Fix bug in ACP-indep construction.
976         (Reported by Matthew.)
977         * run.c (run_construction): Invalidate the just-executed action 
978         so that it cannot be run again. The bug was that a create action 
979         would be run, and then, in the next loop pass, it would be 
980         determined that there was not enough materials to re-execute the 
981         task, and a goto the end of the function would take place. The 
982         recently executed action (custom execution, instead of through 
983         normal machinery) would still be considered a valid next action. 
984         Next time the function was called, the create action would then 
985         be re-executed. (Note: this _crap_ code must be cleaned up; it is 
986         ridiculous both in its spaghetti layout and in its demented logic; 
987         it should be reconciled with the regular build code as much as 
988         possible. Also, this alternate consumption 
989         ('unit-consumption-per-cp') for ACP-indep units is a bad idea; I 
990         see no reason why the regular 'consumption-per-build' cannot be used 
991         for ACP-indep units; that consumption calculation actually is done
992         on a per-CP basis. Having two competing tables is a Bad Idea.)
993
994         Fix obscure bug with AI-controlled sides not finishing their turns.
995         * run.c (move_one_unit_multiple): Ifdef out what appears to be a 
996         premature break if the unit is AI-controlled and might have done 
997         something last past. Under special circumstances, if this code is 
998         left in, it can cause a premature return with the indication that 
999         something was done, when, in fact, nothing was done.
1000
1001         Add a short circuit to one of the ACP-indep construction util 
1002         functions.
1003         * unit.c (incomplete_build_target): If the creator/builder has a 
1004         valid creation ID, then just use the unit from that ID.
1005
1006 2005-01-24  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
1007
1008         Further improvements to scorekeepers.
1009         * refman.texi: New section, "Scorekeeper Examples". Updates on 
1010         the current status of the various scorekeeper properties and 
1011         forms.
1012         * keyword.def (K_TURN): New keyword, 'turn'.
1013         * score.c (generate_effective_sk_whomask): New function. Generate 
1014         an effective whomask based on whether the scorekeeper can run 
1015         at the current time for the given side. Handles various 'when' 
1016         conditions.
1017           (check_post_turn_scorekeeper): Use the effective whomask to 
1018         determine which sides to run the scorekeeper on. (Note that this 
1019         has no effect on the 'last-side-wins' and 'last-alliance-wins' 
1020         scorekeepers at this time.)
1021           (eval_sk_form): Return current turn number for 'K_TURN'.
1022         * side.c (fn_test_side_in_sideclass): Fix bug that caused only 
1023         the first element of a side-and-sideclass list to be evaluated.
1024
1025 2005-01-23  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
1026
1027         Generate sidemask for 'known-to' property of scorekeepers.
1028         * init.c (finalize_scorekeepers): Generate sidemask from 
1029         'known-to' in a manner identical to 'applies-to'.
1030         * score.c (create_scorekeeper): Initialize 'knowntomask' 
1031         field of scorekeeper to 'ALLSIDES'.
1032
1033         Improve sideclass membership tester to handle side ID numbers and 
1034         mixed lists of side ID numbers and sideclasses.
1035         * side.c (fn_test_side_in_sideclass)
1036
1037         Use the new sideclass membership tester to check whether an unit 
1038         can belong on a given side. 
1039         * unit.c (test_class_membership): Delete function.
1040           (tmpside_classtest): Delete static variable.
1041           (type_allowed_on_side): Evaluate "possible sides" list with 
1042         'fn_test_side_in_sideclass' rather than 'test_class_membership'.
1043
1044 2005-01-23  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
1045
1046         Unimplement 'last-regular-side-wins' as separate scorekeeper.
1047         Instead, just make the 'applies-to' property meaningful.
1048         (Sometimes I can be so shortsighted....)
1049         * keyword.def (K_LAST_REGULAR_SIDE_WINS): Delete GDL keyword.
1050         * help.c (describe_scorekeepers): Remove references to 
1051         'K_LAST_REGULAR_SIDE_WINS'.
1052         * mplayer.c (determine_subgoals): Likewise.
1053         * nlang.c (side_score_desc): Likewise.
1054         * score.c (check_post_turn_scores): Likewise.
1055           (eval_sk_form): Likewise.
1056           (eval_sk_last_side_wins): Likewise. Honor scorekeeper's 'applies-to' 
1057         mask.
1058           (eval_sk_last_alliance_wins): Honor scorekeeper's 'applies-to' mask.
1059         * init.c (finalize_scorekeepers): New function. Finish filling out 
1060         any parts of the scorekeepers that need to be filled out.
1061           (calculate_globals): Call 'finalize_scorekeepers'. This seems to be 
1062         the best place because it is before the start of the game but after 
1063         everything has been read in.
1064
1065         Another implementation of Lisp boolean evaluator that uses 
1066         parameter boxes.
1067         * lisp.h (eval_boolean_expression): New prototype.
1068         * lisp.c (eval_boolean_expression): New function. Pass a parambox to 
1069         predicate function.
1070         * side.h (fn_test_side_in_sideclass): New prototype.
1071         * side.c (fn_test_side_in_sideclass): New function. Check if a 
1072         given side's sideclass matches a given sideclass.
1073
1074         New parambox for sides.
1075         * parambox.h (PBOX_TYPE_SIDE): New enum constant.
1076         * side.h (struct ParamBoxSide): New parambox.
1077
1078 2005-01-22  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
1079
1080         Implement new scorekeeper, 'last-regular-side-wins'.
1081         (NOTE: Still needs to be tested.)
1082         * keyword.def (K_LAST_REGULAR_SIDE_WINS): New GDL keyword.
1083         * help.c (describe_scorekeepers): Add description of new scorekeeper.
1084         * mplayer.c (determine_subgoals): Consider the new scorekeeper.
1085         * nlang.c (side_score_desc): Describe new scorekeeper.
1086         * read.c (interp_variant_defns): Increase length of default variants 
1087         list.
1088         * score.c (check_post_turn_scores): Handle new scorekeeper.
1089           (eval_sk_form): Handle new scorekeeper.
1090           (eval_sk_last_side_wins): Handle new scorekeeper.
1091
1092 2005-01-22  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
1093
1094         Fix crashing bug in ACP-indep construction.
1095         (Bug report from Matthew Skala.)
1096         * run.c (run_construction): If unit has no plan, then do not attempt 
1097         to run constuction, and do not attempt to pay for construction. This 
1098         can happen if the 'time.g' upgrade mechanism is used.
1099
1100 2005-01-17  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
1101
1102         Add Elijah's Valhalla family of games to the games library.
1103         * game.dir: Add Valhalla and Valhalla Beach.
1104
1105 2005-01-17  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
1106
1107         Fix bug in games where all unit see chances were the default (100%).
1108         * side.c (compute_see_chances): Calculate 'max_see_chance_range' 
1109         independently of whether or not any see chance is not the default.
1110           (see_cell): Always roll the dice whether or not we have a 
1111         perfect see chance against something, because other modifiers such 
1112         as terrain visibility and night effects must be considered.
1113
1114 2005-01-16  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
1115
1116         Fix bug in unit view flushing that caused 'see-always' uviews to 
1117         be flushed.
1118         * side.c (see_cell): Do not remove aged uviews if the 
1119         corresponding type is a "see always" unit.
1120
1121         Fix network sync errors and long timeouts.
1122         * tp.c (receive_data): Restore Hans' ack hack for the time being. 
1123         Apparently, he was on to something, even though I still wonder if 
1124         this truly addresses the underlying problem and if it is the best to 
1125         go about it.
1126           (send_packet): Restore the timeout code to only apply to the master, 
1127         and not the other peers.
1128
1129         Fix >2 networked AI's from immediately falling out of sync on 
1130         localhost. (Note that they still eventually fall out of sync; I 
1131         still wonder if there are not more timing issues lurking in the 
1132         noxious Tkconq/networking combination.) (Also note that setting the 
1133         AI player after setup will cause desync almost immediately.)
1134         * tkmain.c (check_network): Apply the delay hack on localhost for 
1135         all setup stages, and not just specific ones.
1136
1137 2005-01-16  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
1138
1139         Fix bug in setup of some games with more than one remote player.
1140         * init.c (make_trial_assignments): Initialize a number of sides 
1141         equal to the max of 'numremotes' and 'g_sides_min', and not just 
1142         'g_sides_min'. The bug came about because the default 'g_sides_min' 
1143         is 2, but if more than 2 peers were participating in a game that 
1144         used the default min, then 'numsides' and 'numtotsides' counts 
1145         would come up short, which would cause problems later on, such as 
1146         when players were being processed, because 'numplayers' would have 
1147         the correct count.
1148
1149 2005-01-16  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
1150
1151         Fix bug with unit views in "see all" mode.
1152         * ui.c (xform_unit_view): Always start from beginning of uvstack when 
1153         counting position. Never start at the position of the uview in 
1154         question.
1155
1156         Fix SDL interface to actually set the main viewport's "show all" 
1157         flag so that units can be seen when the "see all" variant is in 
1158         effect or when designing.
1159         * sdlmain.cc (set_show_all): Fill out empty function. Toggle the 
1160         flag on the main viewport of the map of the screen.
1161
1162         Fix the SDL interface just like the Tcl/Tk interface regarding the 
1163         showing of uviews in designer mode.
1164         * sdlmap.cc (draw_uviews_in_cell, draw_unit_view_and_occs, 
1165         draw_current): Handle master uviews as well as side uviews.
1166
1167 2005-01-15  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
1168
1169         New family of games, Valhalla, from Elijah Meeks.
1170         * valhalla.g: New game module file.
1171         * valhalla-beach.g: New game module file. Cool scenario for 
1172         Valhalla.
1173         * t-val-beach.g: Aux module for Valhalla Beach.
1174         * u-val-beach.g: Likewise.
1175         * korea.gif: Update.
1176         * battles1.gif: Update.
1177
1178         Fix bug with unit views in designer mode.
1179         (Bug reported by Elijah.)
1180         * side.h (for_all_uvstack): New macro. Iterates through an uvstack, 
1181         starting from the given uview. Can handle both master and side 
1182         uvstacks.
1183           (query_uvstack_from_unit): New prototype.
1184           (query_uvstack_at): New prototype.
1185         * side.c (unit_view_next): Handle a NULL side as an indicator of a 
1186         master uview.
1187           (find_unit_view): Likewise.
1188           (query_uvstack_from_unit): New function. Get an uvstack from a 
1189         given unit, updating the master views, if necessary.
1190           (query_uvstack_at): New function. Get an uvstack from the first 
1191         unit at a given location.
1192           (fill_out_uview): New function. Fill out an uview, whether it is a 
1193         master uview or a side uview.
1194           (update_master_uview): New function. Initialize a master uview if 
1195         it is uninitialized. Fill out the master uview with most recent 
1196         information from the unit. Update the uview's links to other master 
1197         uviews, updating those views as well.
1198           (add_unit_view): Call 'fill_out_uview' to fill out the uview.
1199         * unit.c (create_unit): Set the 'uview' field of an unit to NULL.
1200         * tcltk/tkmap.c (draw_uviews_in_cell): Handle master uviews as well 
1201         as side uviews.
1202           (draw_unit_view_and_occs): Handle master uviews as well as side 
1203         uviews.
1204           (draw_current): Handle master uview as well as side uview.
1205
1206         Fix bug with overwatch in designer mode.
1207         (Bug reported by Elijah.)
1208         * kernel.h, init.c (suppress_reactions): New global variable in 'Xconq' 
1209         namespace.
1210         * side.c (all_see_occupy): Do not invoke overwatch, if 
1211         'suppress_reactions' is set.
1212           (xform_unit_view): Allow NULL sides, but check to make sure that 
1213         designer mode is in effect. Handle master uviews as appropriate.
1214         * unit.c (designer_create_unit): Set 'suppress_reactions' to TRUE 
1215         before doing any shuffling. Reset the flag after the shuffling.
1216           (designer_teleport): Likewise.
1217
1218         Continue fixing uview lookups to match new uview code.
1219         * side.c (find_unit_or_occ_view): Handle master uviews.
1220
1221 2005-01-09  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
1222
1223         Make sure DLL's needed for ParaGUI are included by installer.
1224         * pkg/xconq.nsi.in: Add 'freetype6.dll' and 'zlib1.dll' to files in 
1225         manifest for SDL interface.
1226
1227 2005-01-08  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
1228
1229         Improve AI handling of transports.
1230         (Patch from Brian Dunn with minor mods by me.)
1231         * ai.c (ai_go_after_victim): If victim seeker is a transport, is 
1232         empty, and is better defensively than offensively, then don't 
1233         bother looking for victims.
1234
1235         Do not apply hex masks to borders.
1236         (Patch from Matthew Skala.)
1237         * imf.c (add_scaled_image): Do not consider borders for hex masking.
1238           (make_image_from_file_image): Likewise.
1239
1240         Networking fixes/improvements.
1241         * kpublic.h (broadcast_randstate): New prototype.
1242         * tp.c (broadcast_randstate): New function. Broadcast a randstate 
1243         value.
1244           (send_packet): For now, create a run error no matter master or 
1245         peer gets too tired of waiting for an ack. (This solution is not 
1246         ideal, and needs to be revisted.)
1247           (receive_data): Comment out Hans' "fix" for packets that 
1248         arrive while we are waiting for an ack. The "fix" is dubious, and 
1249         does not improve overall stability/synchronization apparently.
1250         * tkmain.c (hndl_network_timer): New 'Tcl_TimerToken' var. Used for 
1251         tracking the timer handler so that it can be deleted when no longer 
1252         needed (i.e., when 'net_run_game' passes are being scheduled).
1253           (check_network): Check to see the network timer should be reloaded. 
1254         If not, then do not set up a new timer.
1255           (sync_randstate): Flush queues, broadcast randstate, and flush 
1256         queues again.
1257           (launch_game): Delete any network timer scheduled to fire by using 
1258         the most recent 'hndl_network_timer'. We delete the timer when it is 
1259         no longer needed to cut down on extraneous event handling, and to 
1260         make sure that its queue flushing is not causing any undesired side 
1261         effects in the operation of the network code. Also, do not execute 
1262         a 'net_run_game' pass at the end of this function; it seems to be 
1263         premature and not all state is correctly initialized. It causes the 
1264         first few turns to be skipped when they should not, and this 
1265         results in immediate sync errors since the peers do not skip those 
1266         turns.
1267
1268         Attempt to make the AI a little bit better at building things with 
1269         mobile units.
1270         * plan.c (plan_defense): Disable 1 in 5 chance for construction.
1271         Always try to constuct when nothing better to do.
1272
1273         Stabilize unit views so that they are again updated on a per-turn 
1274         granularity, except in cases where transport/occupant status or 
1275         position has changed. (In the long run, we would like to have 
1276         more flexible granularity, ranging from per-seeing to 
1277         per-every-view-older-than-n-days.)
1278         (Thanks to Robert Goulding for helping confirm the unstable views 
1279         issue.)
1280         * side.c (see_cell): Do not blast unit views which have not 
1281         changed this turn.
1282
1283         Fix some occupant/transport display glitches, and improve occupant 
1284         visibility.
1285         * ui.c (max_uviews_in_rect): Do not report 0 uviews if rect is less 
1286         than 32 px wide. Let the interface decide how to handle this.
1287         * sdlmap.cc, tkmap.c (draw_current): If occ less than 16 px wide, 
1288         boost its width to that of the first transport in chain that is >= 
1289         16 px wide. If isometric view, boost width to that of top transport 
1290         in chain.
1291           (draw_unit_view_and_occs): If transport >= 16 px wide, but < 32 px 
1292         wide, then draw grouping box around just the unshrunken transport 
1293         image.
1294
1295 2005-01-06  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
1296
1297         Fix compilation errors on some older systems.
1298         (Bug reported by Brian Dunn.)
1299         * conq.h: Remove the 'iostream' include.
1300         * sdl/sdlpreconq.h: New file. Contains includes of anything 
1301         that must come before 'config.h' in the SDL interface implementation 
1302         files.
1303         * sdl/Makefile.in (SDL_H): Add 'sdlpreconq.h' to the list.
1304         * sdl/sdlcltbl.cc, sdl/sdlcmd.cc, sdl/sdlimf.cc, sdl/sdlinit.cc, 
1305           sdl/sdlmac.cc, sdl/sdlmain.cc, sdl/sdlmap.cc, sdl/sdlscreen.cc, 
1306           sdl/sdluact.cc, sdl/sdlunix.cc, sdl/sdlwin32.cc: Include 
1307         'sdlpreconq.h'.
1308
1309         Get rid of unused Mac resource file.
1310         * sdl/sdlmac.r: Delete file.
1311
1312 2005-01-05  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
1313
1314         Fix unit reach bug. (Reported by Lincoln Peters.)
1315         * unit.c (change_unit_type): No longer just consider the case of 
1316         a non-advanced type becoming an advanced type. In the case of an 
1317         advanced type changing into another advanced type, the unit reach 
1318         (and possibly other advanced props) need to considered.
1319
1320 2005-01-04  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
1321
1322         Add profiling support to Xconq configurator options.
1323         * configure.in (enable-profiling): New command line switch.
1324         * misc/runbuild.sh: Take advantage of new switch if desired.
1325
1326         Fix bug when testing networking on 'localhost' in certain X11 
1327         environements.
1328         * socket.c (host_is_localhost): New global variable in 'Xconq' 
1329         namespace.
1330           (open_remote_connection): Set 'host_is_localhost' to true, if 
1331         name of remote host is 'localhost'.
1332         * tkmain.c (check_network): Call 'run_ui_idler' before processing 
1333         network stuff. Sleep for 1000 ms times RID - 1 of peer, if peer is on 
1334         'localhost' along with master.
1335
1336         More tweaking of Tkconq CPU usage.
1337         * tkconq.tcl (run_game_cmd): Schedule the next run of 'run_game_cmd' 
1338         to be the interval output from 'run_game'.
1339         * tkmain.c (tk_run_game): Set non-idle interval return value to 1.
1340         Set idle interval retun value to 50.
1341           (ui_mainloop): Set event wait timeout to 1000 ms.
1342
1343         Fix crashing bug in Tkconq help window display. (Reported by 
1344         Lincoln Peters.)
1345         * tkmain.c (tk_help_goto): Get rid of static 'tclbuf'. Replace with 
1346         obstack. Grow obstack rather than performing a sprintf into a static 
1347         buf. The buf cannot be truncated with 'snprintf' since all parts our 
1348         crucial. The crash was coming from an overflow in the static buf; 
1349         this was not noticed until now because no game had been large 
1350         enough to push the limits.
1351
1352 2005-01-02  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
1353
1354         Reactivated feature: unit and uview stack ordering.
1355         Bug fix: cycles in uview lists.
1356         Also some cleanup from earlier uview/vision hacking.
1357         * side.c (is_at_correct_uvstack_position): New function. Compares 
1358         an out-of-stack uview to an in-stack one to see if the out-of-stack 
1359         one could be spliced in before the in-stack one.
1360           (add_uview_to_uvstack): New function. Splices an uview into a 
1361         transport uview's occ stack.
1362           (add_unit_view): Call 'add_uview_to_uvstack' instead of containing 
1363         that bulk of code in the function. Fix bug whereby occupant views 
1364         were being incorrectly altered after creation.
1365           (add_unit_view_raw): Call 'is_at_correct_uvstack_position' to help 
1366         ascertain the correct position of the uview being spliced into the 
1367         list for a given cell coord hash.
1368           (test_for_successful_viewer): Delete function. No longer needed or 
1369         used.
1370           (test_for_possible_viewer): Likewise.
1371           (tmpunittosee): Delete variable. No longer needed or used.
1372           (tmpseer): Likewise.
1373         * unit.c (is_at_correct_ustack_position): New function. Compares 
1374         an out-of-stack unit to an in-stack one to see if the out-of-stack 
1375         one could be spliced in before the in-stack one.
1376           (add_unit_to_ustack): Renamed from 'add_unit_to_stack'.
1377           (add_unit_to_ustack): New function. Splices an unit into a 
1378         transport's occ stack.
1379           (remove_unit_from_ustack): Renamed from 'remove_unit_from_stack'.
1380           (enter_transport): Call 'add_unit_to_ustack' instead of keeping 
1381         the equivalent code in the function.
1382         * unit.h (a_unit): Add an unit view pointer to struct. This is for 
1383         keeping track of a master uview associated with the unit. The master 
1384         uview concept is born of the need to represent the unit when an 
1385         interface is on 'show_all' mode (such as when deisigning). This 
1386         concept will hopefully be implemented soon.
1387
1388 2005-01-01  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
1389
1390         New feature: zone-of-overwatch (ZOO) and overwatch firing.
1391         (Almost local midnight... I still have more breathing room than last 
1392         year though. That commit made it in with 18 seconds to spare.)
1393         * doc/refman.texi (zoo-range): New entry.
1394           (zoo-range-min): New entry.
1395           (acp-for-overwatch): New entry.
1396         * side.c (namespace Xconq): New variables: 'any_overwatch_cache', 
1397         'any_overwatch_chances', 'overwatch_against_range_max', 
1398         'overwatch_against_range_min'.
1399           (compute_overwatch_cache): New function. Sets up a cache of some 
1400         useful overwatch-related values the first time it is needed.
1401           (can_overwatch): New function. Checks to see if an unit can 
1402         perform overwatch fire against another unit.
1403           (try_overwatch_from): New function. Checks to see if any units 
1404         (including occs) in a stack at a given location can perform 
1405         overwatch fire against a given unit.
1406           (try_overwatch_against): New function. Checks to see if any 
1407         units can perform overwatch fire against a given unit.
1408           (occupy_see_all): If any overwatch is available at all and 
1409         available against the current unit type, then attempt to get some 
1410         overwatch fire against the unit.
1411         * table.def (uu_acp_overwatch): New GDL table. How much extra ACP 
1412         does an unit get to perform overwatch fire against another unit?
1413           (uu_zoo_range); New GDL table. Out to how far can an unit 
1414         extend a ZOO against another unit?
1415           (uu_zoo_range_min): New GDL table. How close can an unit extend 
1416         a ZOO against another unit?
1417
1418 2005-01-01  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
1419
1420         Fix date problem with configuration scripts.
1421         * configure.in: Change the year format field for the date 
1422         command from 'G' to 'Y'. 'G' still thinks it's 2004 in Greenwich.
1423         * misc/runconfig.sh: Likewise.
1424
1425         Fix bug in overrun action. (Thanks to Elijah for reporting this bug.)
1426         * combat.c (do_overrun_action): Use 'check_fire_at_action' instead 
1427         of the rather lame 'can_fire' function to check if the attacker can 
1428         fire upon the defender. Likewise, use 'check_attack_action' instead 
1429         of 'can_attack'.
1430
1431 2005-01-01  Eric McDonald  <eric_mcdonald@users.sourceforge.net>
1432
1433         Happy New Year.
1434
1435         Rotate 2004 changelog out to the 'changelogs' dir.
1436         * ChangeLog-2004: New file.
1437         * ChangeLog: Refresh for the new year.
1438
1439         Make SDL interface compile including ParaGUI headers.
1440         * config.h: Include 'iostream' before the C stdio headers.
1441         * sdlconq.h: Remove ifdef (0) from around ParaGUI headers.
1442
1443         Hack around a palette colors bug so that emblems show up correctly 
1444         in SDL interface. (Bug reported by Elijah Meeks.)
1445         * imf.c (blacken_masked_area): Test to see if UL corner matches 
1446         LL and UR corners in terms of color. If not, then replace the LR 
1447         corner's palette entry with the mask color.