forked from brentjohnson/xconq
-
Notifications
You must be signed in to change notification settings - Fork 1
/
ChangeLog
2343 lines (2042 loc) · 100 KB
/
ChangeLog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
2005-09-17 17:25 Eric McDonald <[email protected]>
Long overdue fix to game design manual.
(Thanks to Roger Martin.)
* design.texi: Mention the need to change the ZOC table in order
to get a monster to cross rubble.
2005-09-17 16:17 Eric McDonald <[email protected]>
Fix non-adjacent movement from transport bug.
(Reported by Matthew.)
* task.c (do_approach_subtask): Comment out a piece of code
intended to cause units to use mobile transports to go places
rather than going there themselves. This change will likely have
some side effects on AI play, but those will be dealt with
separately.
2005-09-17 15:41 Eric McDonald <[email protected]>
Fix construction bug in UI.
(Bug reported by Matthew.)
* ui.c (impl_build): An UI may pass a "transport" as the target in
which to build; however the target unit may not actually be a valid
transport in which to build. If this is the case, be sure to actually
try building in the cell that the target unit is located in.
2005-08-28 00:44 Matthew Skala <[email protected]>
Fix segfault with "idle" command
* task.c (do_sentry_task): check that next task isn't null
2005-08-13 20:04 Matthew Skala <[email protected]>
Remove superfluous "Done" button from tkconq design palette
* tkconq.tcl (popup_design_palette, ok_preferences): comment out
references to "Done" button
2005-08-06 19:55 Matthew Skala <[email protected]>
Fix tkconq crash on examining non-unit cell
* tkmap.c (move_look): Initialize "unit" variable to NULL
Fix "incomplete units participate in economy" bug
* economy.c (make_mh_from_unit): Exclude incomplete units.
Add Delta Clipper image to SRE
* solar.g: imf definition
* solunits.gif: added unit image
2005-08-06 19:25 Eric McDonald <[email protected]>
Mention when and why an unit's task agenda is being canceled.
(Issue brought up by Matthew.)
* plan.c (plan_passive): Notify unit's side when task agenda is
being cleared due to a low supply.
2005-08-06 15:29 Eric McDonald <[email protected]>
Fix UI bug that caused new units to be prefered over incomplete ones.
(Reported by Matthew.)
* ui.c (impl_build): Iterate through occs in container or units
at given location, seeking incomplete one that matches type of
what we wish to build.
Update to terrain images.
(From Elijah.)
* castle-terr32x32.gif: Update.
* castle-terr44x48.gif: Update.
2005-07-28 03:22 Matthew Skala <[email protected]>
New version of SRE
* solar.g: several new features and improvements.
* solunits.gif: added some unit images.
Quick-and-dirty fix to ZOC code
* move.c (check_move_action): include ZOC-related extra cost when
computing cost of the move; correctly compute extra ACP.
* refman.texi (mp-to-enter-zoc): clarify current behaviour
(mp-to-leave-zoc): clarify current behaviour
(mp-to-traverse-zoc): clarify current behaviour
2005-07-10 02:52 Eric McDonald <[email protected]>
Update and extend image library.
(Update from Elijah.)
* battles1.gif: Update.
* blank-border44x48.gif: New image file.
* castle-terr32x32.gif: New image file.
* castle-terr44x48.gif: New image file.
Improvement of AI tactical response.
(Note: These changes probably should have been made on a branch.)
* config.h (Z8): Typedef 'signed char'.
* conq.h (max_u_detonate_effect_range): Delete.
(fire_range): New function decl.
Maximum fire range of u against u2.
(fire_range_best): New function decl.
Best fire range of u against u2.
(fire_range_max): New function decl.
Maximum fire range of u.
(attack_range): New function decl.
Attack range of u against u2.
(attack_range_max): New function decl.
Maximum attack range of u.
(could_detonate): New function decl.
Could u detonate?
(could_damage_by_0dist_detonation): New function decl.
Could u damage u2 by a detonation in same cell?
(could_damage_by_ranged_detonation): New function decl.
Could u damage u2 by a detonation at range?
(could_damage_by_detonation): New function decl.
Could u damage u2 by a detonation?
(detonate_urange): New function decl.
Blast radius of detonation from u against u2.
(detonate_urange_max): New function decl.
Max blast radius of detonation from u.
(detonate_urange_max): New function decl.
Max blast radius of detonation from any utype.
(hit_range): New function decl.
Hit range of u against u2.
(hit_range_max): New function decl.
Maximum hit range of u.
(hit_range_max): New function decl.
Maximum hit range of all utypes.
(direct_capture_range): New function decl.
Direct capture range of u against u2.
* aitact.h (choose_best_hit_method): New function decl.
Given various combat stats, which hit method is preferred?
(choose_best_hit_method): New function decl.
Which hit method should given unit use to hit given uview?
(guess_best_hit_method_used_by): New function decl.
Which hit method should given uview use to hit given unit?
(choose_best_capture_method): New function decl.
Given various combat stats, which capture method is preferred?
(choose_best_capture_method): New function decl.
Which capture method should given unit use to capture given uview?
(guess_best_capture_method_used_by): New function decl.
Which capture method should given uview use to hit given unit?
(seems_safe_against): New function decl.
Does given unit seem safe from given uview?
(is_frightened_by): New function decl.
Is given unit deathly afraid of given uview?
(is_harassed_by): New function decl.
Is given unit possibly being harassed by given uview?
(choose_flee_direction): New function decl.
Choose best direction, if any, to flee from fears.
* aitact.cc: Include 'kpublic.h'.
(choose_best_hit_method): New function.
(choose_best_hit_method): New function, second variant.
(guess_best_hit_method_used_by): New function.
(choose_best_capture_method): New function.
(choose_best_capture_method): New function, second variant.
(guess_best_capture_method_used_by): New function.
(turns_to_defeat_best_ratio): New function.
(seems_safe_against): New function.
(is_frightened_by): New function.
(is_harassed_by): New function.
(choose_flee_direction): New function.
(handle_immediate_danger): Fill out.
(handle_tactical_situation): Couple of tweaks.
* aiunit.h: Change '*_by_explosions' to '*_by_detonations'.
(fire_damage_mean): New function decl.
Mean fire damage that u does to u2.
(attack_damage_mean): New function decl.
Mean attack damage that u does to u2.
(detonate_0dist_damage_mean): New function decl.
Mean detonate damage that u does to u2 in same cell.
(detonate_ranged_damage_mean): New function decl.
Mean detonate damage that u does to u2 at range.
(detonate_damage_mean): New function decl.
Mean detonate damage that u does to u2.
(n_detonations_available): New function decl.
Number of detonations available to u before expiring.
* aiunit.cc: Use 'Xconq' and 'Xconq::AI' namespaces.
Change '*_by_explosions' to '*_by_detonations'
in all places.
(fire_damage_mean): New function.
(attack_damage_mean): New function.
(detonate_0dist_damage_mean): New function.
(detonate_ranged_damage_mean): New function.
(detonate_damage_mean): New function.
(n_detonations_available): New function.
* aiunit.h (firings_per_turn_est): New function decl.
Estimated number of times u can fire at u2 in a turn.
(attacks_per_turn_est): New function decl.
Estimated number of times u can attack u2 in a turn.
(detonations_per_turn_est): New function decl.
Estimated number of times u can detonate against u2 in a turn.
(capture_attempts_per_turn_est): New function decl.
Estimated number of times u can attempt capture of u2 in a turn.
(firings_mean_to_destroy): New function decl.
Mean number of firings for u to destroy u2 with given modifiers.
(firings_mean_to_destroy): New function decl.
Mean number of firings for u to destroy given uview.
(firings_mean_to_destroy): New function decl.
Mean number of firings for u2 to destroy given unit.
(fire_turns_mean_to_destroy): New function decl.
Mean number of turns for u to destroy given uview by firing.
(fire_turns_mean_to_destroy): New function decl.
Mean number of turns for u2 to destroy given unit by firing.
(attacks_mean_to_destroy): New function decl.
Mean number of attacks for u to destroy u2 with given modifiers.
(attacks_mean_to_destroy): New function decl.
Mean number of attacks for u to destroy given uview.
(attacks_mean_to_destroy): New function decl.
Mean number of attacks for u2 to destroy given unit.
(attack_turns_mean_to_destroy): New function decl.
Mean number of turns for u to destroy given uview by attacks.
(attack_turns_mean_to_destroy): New function decl.
Mean number of turns for u2 to destroy given unit by attacks.
(detonations_mean_to_destroy): New function decl.
Mean number of detonations for u to destroy u2 with given modifiers.
(detonations_mean_to_destroy): New function decl.
Mean number of detonations for u to destroy given uview.
(detonations_mean_to_destroy): New function decl.
Mean number of detonations for u2 to destroy given unit.
(detonate_turns_mean_to_destroy): New function decl.
Mean number of turns for u to destroy given uview by detonations.
(detonate_turns_mean_to_destroy): New function decl.
Mean number of turns for u2 to destroy given unit by detonations.
(firings_mean_to_capture): New function decl.
Mean number of attempts u needs to capture u2 by firing.
(firings_mean_to_capture): New function decl.
Mean number of attempts u needs to capture given uview by firing.
(firings_mean_to_capture): New function decl.
Mean number of attempts u2 needs to capture given unit by firing.
(fire_turns_mean_to_capture): New function decl.
Mean number of turns u needs to capture given uview by firing.
(fire_turns_mean_to_capture): New function decl.
Mean number of turns u2 needs to capture given unit by firing.
(attacks_mean_to_capture): New function decl.
Mean number of attempts u needs to capture u2 by attacks.
(attacks_mean_to_capture): New function decl.
Mean number of attempts u needs to capture given uview by attacks.
(attacks_mean_to_capture): New function decl.
Mean number of attempts u2 needs to capture given unit by attacks.
(attack_turns_mean_to_capture): New function decl.
Mean number of turns u needs to capture given uview by attacks.
(attack_turns_mean_to_capture): New function decl.
Mean number of turns u2 needs to capture given unit by attacks.
(attempts_mean_to_capture): New function decl.
Mean number of attempts u needs to directly capture u2.
(attempts_mean_to_capture): New function decl.
Mean number of attempts u needs to directly capture given uview.
(attempts_mean_to_capture): New function decl.
Mean number of attempts u2 needs to directly capture given unit.
(capture_turns_mean_to_capture): New function decl.
Mean number of turns u needs to directly capture given uview.
(capture_turns_mean_to_capture): New function decl.
Mean number of turns u2 needs to directly capture given unit.
* aiunit2.cc: Use 'Xconq' and 'Xconq::AI' namespaces.
(firings_per_turn_est): New function.
(attacks_per_turn_est): New function.
(detonations_per_turn_est): New function.
(capture_attempts_per_turn_est): New function.
(firings_mean_to_destroy): New function.
(firings_mean_to_destroy): New function, second variant.
(firings_mean_to_destroy): New function, third variant.
(fire_turns_mean_to_destroy): New function.
(fire_turns_mean_to_destroy): New function, second variant.
(attacks_mean_to_destroy): New function.
(attacks_mean_to_destroy): New function, second variant.
(attacks_mean_to_destroy): New function, third variant.
(attack_turns_mean_to_destroy): New function.
(attack_turns_mean_to_destroy): New function, sceond variant.
(detonations_mean_to_destroy): New function.
(detonations_mean_to_destroy): New function, second variant.
(detonations_mean_to_destroy): New function, third variant.
(detonate_turns_mean_to_destroy): New function.
(detonate_turns_mean_to_destroy): New function, second variant.
(firings_mean_to_capture): New function.
(firings_mean_to_capture): New function, second variant.
(firings_mean_to_capture): New function, third variant.
(fire_turns_mean_to_capture): New function.
(fire_turns_mean_to_capture): New function, second variant.
(attacks_mean_to_capture): New function.
(attacks_mean_to_capture): New function, second variant.
(attacks_mean_to_capture): New function, third variant.
(attack_turns_mean_to_capture): New function.
(attack_turns_mean_to_capture): New function, second variant.
(attempts_mean_to_capture): New function.
(attempts_mean_to_capture): New function, second variant.
(attempts_mean_to_capture): New function, third variant.
(capture_turns_mean_to_capture): New function.
(capture_turns_mean_to_capture): New function, second variant.
* aiutil.h (type_attack_range_max): Delete.
(type_fire_range_max): Delete.
* aiutil.c (type_attack_range_max): Delete.
(type_fire_range_max): Delete.
(type_hit_range_max): Call 'attack_range' and 'fire_range', instead
of 'type_attack_range_max' and 'type_fire_range_max'.
(type_ideal_attack_range): Call 'attack_range' instead of
'type_attack_range'.
* combat.c (max_u_detonate_effect_range): Delete.
(could_fire_at_any): Add caching.
(fire_range): New function.
(fire_range_best): New function.
(fire_range_max): New function.
(could_attack_any): Add caching.
(attack_range): New function.
(attack_range_max): New function.
(could_detonate): New function.
(could_damage_by_0dist_detonation): New function.
(could_damage_by_ranged_detonation): New function.
(could_damage_by_detonation): New function.
(detonate_urange): New function.
(detonate_urange_max): New function.
(detonate_urange_max): New function, second variant.
(could_hit): New function.
(hit_range): New function.
(hit_range_max): New function.
(hit_range_max): New function, second variant.
(direct_capture_range): New function.
(detonate_unit): Do not cache max detonation urange here.
* init.c: Use namespace 'Xconq'.
* mplayer.c (mplayer_decide_plan): If unit is not active, then
immediately place it in reserve.
* plan.c (plan_defense): Only acquire constructor oprole, if
unit is active.
* task.c (push_move_dir_task): New function.
* tp.c (net_push_move_dir_task): New function.
2005-07-04 00:38 Eric McDonald <[email protected]>
Simplify and improve capture logic.
Further improve hit-unit logic.
Allow fire to capture out to ZOC range, plus 1.
* task.def (TASK_CAPTURE): Revise parameters.
(TASK_HIT_UNIT): Add max task tries to parameter list.
* conq.h (HIT_TRIES_DEFAULT): New data macro.
Default number of times ot run 'hit-unit' task.
(CAPTURE_METHOD_NONE): New data macro.
Do not capture via any method?
(CAPTURE_METHOD_CAPTURE): New data macro.
Capture via direct capture?
(CAPTURE_METHOD_ATTACK): New data macro.
Capture via attack?
(CAPTURE_METHOD_FIRE): New data macro.
Capture via adjacent fire?
(CAPTURE_METHOD_DETONATE): New data macro.
Capture via detonation?
(CAPTURE_METHOD_TRANSPORT): New data macro.
Capture via transport?
(CAPTURE_METHOD_OCCUPANT): New data macro.
Capture via occupants?
(CAPTURE_METHOD_ANY): New data macro.
Capture via any method?
(CAPTURE_TRIES_DFLT): New data macro.
Default number of times ot run 'capture' task.
* ai.c (check_current_target): Deal with revised args of
'hit-unit' and 'capture' tasks.
(keep_defensive_goal): Likewise.
(ai_go_after_victim): Likewise.
(attack_blockage): Likewise.
* aiutil.c (planning_to_capture_type_at): Likewise.
* combat.c (do_fire_at_action): Allow fire to capture out to
ZOC range, plus 1.
* nlang.c (task_desc): Deal with revised args of 'capture' task.
* task.c (do_capture_task): Rewrite.
(do_hit_unit): Deal with revised args.
(create_capture_task): Likewise.
(set_capture_task): Likewise.
(push_capture_task): Likewise.
(create_hit_unit_task): Likewise.
(set_hit_unit_task): Likewise.
(push_hit_unit_task): Likewise.
* tp.c (net_set_capture_task): Likewise.
(net_push_hit_unit_task): Likewise.
(net_set_hit_unit_task): Likewise.
2005-07-03 01:52 Eric McDonald <[email protected]>
Simplify and improve hit-unit logic.
* task.def (TASK_HIT_UNIT): Revise parameters.
* conq.h (HIT_METHOD_NONE): New data macro.
Do not hit via any method?
(HIT_METHOD_ATTACK): New data macro.
Hit via attack?
(HIT_METHOD_FIRE): New data macro.
Hit via fire?
(HIT_METHOD_DETONATE): New data macro.
Hit via detonation?
(HIT_METHOD_TRANSPORT): New data macro.
Hit via transport?
(HIT_METHOD_OCCUPANT): New data macro.
Hit via occupants?
(HIT_METHOD_ANY): New data macro.
Summation of all the hit methods.
* ai.c (check_current_target): Deal with revised args of
'hit-unit' task.
(keep_defensive_goal): Likewise.
(victim_id): New global variable.
(ai_go_after_victim): Deal with revised args of 'hit-unit' task.
(attack_blockage): Likewise.
* aiutil.c (planning_to_hit_type_at): Likewise.
(planning_to_capture_type_at): Likewise.
* nlang.c (task_desc): Revise task description for 'hit-unit'.
* plan.c (plan_offense): Disable target reacquisition (for now).
(do_for_occupants): Deal with revised args of 'hit-unit' task.
(ai_find_victim_here): Set 'victim_id' in addition to other
victim data.
(go_after_victim): Delete ifdeffed out version.
(plan_repair): Delete.
* task.c (do_hit_unit_task): Rewrite.
(create_hit_unit_task): Rewrite.
(set_hit_unit_task): Rewrite.
(push_hit_unit_task): Rewrite.
* tp.c (net_push_hit_unit_task): Deal with revised args of
'hit-unit' task.
(net_set_hit_unit_task): Likewise.
2005-07-02 21:50 Eric McDonald <[email protected]>
Improve calculation of constructor worths.
* ai.c (ai_init_shared): Consider occs-on-completion and their
effects on the type of behavior in question.
Try to mobile transports more responsive to their occs.
* plan.c (plan_passive): Call 'do_for_occupants' on
AI-controlled units.
Attempt to fix crashing bug in overwatch fire.
* side.c (try_overewatch_from): Return immediately if cell is not
inside area.
2005-07-02 20:07 Eric McDonald <[email protected]>
Fix bug in materials requirements checking.
(Reported by Elijah.)
* actions.c (can_create_common): Perform deep copy from special
materials req array to regular materials req array.
(can_build): Likewise.
Split out completion and repair evaluation in the AI.
* aioprt.cc (choose_unit_to_build_upon): New function.
Choose best unit to complete.
(choose_unit_to_repair): New function.
Choose best unit to repair.
(choose_unit_construction_or_repair): Remove logic for
choosing best units to complete or repair.
Attempt to fix crashing bug in overwatch fire.
* side.c (all_see_occupy): Only perform overwatch fire against
in-play units.
Update to Starfleet Battles game. (From Elijah.)
* battles.g
2005-07-02 16:17 Eric McDonald <[email protected]>
Update images. (From Elijah.)
* battles1.gif
Add Doxygen config file for kernel docs.
* doc/kernel.dox: New Doxygen config file.
2005-07-02 02:28 Eric McDonald <[email protected]>
Fix bug in occs-on-completion functionality.
* conq.h (can_create_common): New parameter, 'could', defaults to
FALSE, so that 'could_create' is checked.
(can_build): New parameter, 'could', defaults to FALSE, so that
'could_build' is checked.
* actions.c (can_create_common): New parameter.
(can_build): New parameter.
(grant_occs_on_completion): Call 'can_create_common' with
'could' set to TRUE.
2005-06-27 00:57 Eric McDonald <[email protected]>
Update Dev-C++ dev pack.
* devcpp_w32_SFX.exe
2005-06-26 22:05 Eric McDonald <[email protected]>
Allow colonizers to merge into units of utypes that they can create.
* unit.c (unit_can_build_type_at): Handle special case.
2005-06-26 15:43 Eric McDonald <[email protected]>
Cleanup and fix various autoconf and make issues.
(Thanks to Phil Reid for pointing out a Gentoo ebuild problem.)
* configure.in: Do not define 'XCONQDATA'.
(AC_PREREQ): Check against version 2.57 of Autoconf.
* Makefile.in (appdefaultsdir): Delete. No longer used.
(datadir): Set to the value of the 'xconq_data_dir' macro.
(SELFILE): Delete. No longer used.
(SUBDIRS): Get rid of 'tcl', 'tk', and '$(SELFILE)'.
(FLAGS_TO_PASS): Get rid of 'appdefaultsdir'. No longer used.
Add in 'datadir'.
* curses/Makefile.in (datadir): Set to the value of the
'xconq_data_dir' macro.
* doc/Makefile.in: Likewise.
* images/Makefile.in: Likewise.
* lib/Makefile.in: Likewise.
* sdl/Makefile.in: Likewise.
* tcltk/Makefile.in: Likewise.
* kernel/Makefile.in: Likewise.
(KDEFS): Define 'XCONQDATA' and 'XCONQSCORES' on the command line
(i.e., the way it used to be done).
(ALL_CFLAGS): Add in 'KDEFS'.
* acdefs.h.in: Do not define 'XCONQDATA' and 'XCONQSCORES'.
* xconq.spec.in: Make the main changelog get installed in 'changelogs'
directory in the docs hierarchy.
2005-06-25 22:42 Eric McDonald <[email protected]>
Remove multi-part units functionality.
* utype.def (u_parts): Delete.
* refman.texi (parts-max): Delete.
* unit.h (completed): Check CP against whole completeness rahter
than part completeness.
(fullsized): Delete.
(completenesses): Delete.
* actions.c (can_build): Check CP up to whole completeness
rather than part completeness.
(do_build_action_1): Increment CP up to whole completeness
rather than part completeness.
(check_build_action): Call 'completed' instead of 'fullsized'.
(make_unit_complete): Fill out unit CP and HP to whole
completeness levels rather than part completeness levels.
* help.c (describe_utype): No longer describe how many parts
an utype has.
* init.c (check_game_validity): No longer check sanity of
parts-related things.
* mplayer.c (mplayer_review_unit): Call 'completed' instead of
'fullsized'.
* run2.c (new_acp_for_turn_if_at): Check against completed
unit CP rather than part CP.
(run_self_builds): Call 'completed' instead of 'fullsized'.
* task.c (test_for_buildable): Likewise.
(do_build_task): Likewise.
(find_unit_to_complete): Likewise.
* unit.c (completenesses): Delete.
(create_unit): Do not attempt to initialize the completenesses
vector.
(incomplete_build_target): Call 'completed' instead of 'fullsized'.
(unit_can_build_type_at): Likewise.
* sdlmap.cc (draw_uview_health_bar): Remove check for whether unit
is multi-part or not.
* tkmap.c: Likewise.
2005-06-25 21:44 Eric McDonald <[email protected]>
Fix bug introduced by previous bug fix.
* ui.c (xform_unit_view): Calculate offset adjustments using
correct widths, depending on whether unit is of regular size or is
oversized.
2005-06-25 21:10 Eric McDonald <[email protected]>
Fix bug in offsets of oversized unit images on isometric maps.
(Reported by Elijah.)
* ui.c (can_use_oversized_img): Be more specific about when an
image is oversized.
(xform_unit_view): Properly adjust image offsets in both
overhead and isometric views for both standard and oversized images.
Archive another game in 'bitrot'.
* game.dir: Remove '1805'.
* 1805.g: This is a scenario for Napoleon which is already in
the bitrot archive. Move to there.
* bitrot/game.dir: Add '1805'.
Prepare for the removal of multi-part unit functionality.
* voyages.g (parts-max): Comment out.
* ww2-div-pac.g: Comment out.
2005-06-21 01:17 Eric McDonald <[email protected]>
Fix typos in reference manual.
* refman.texi
Remove outdated comment.
(Thanks to an anonymous user for bringing this to attention.)
* kernel/Makefile.in: Remove comment about what things are passed
in 'CFLAGS'.
Fix bug in dice scaling.
* util.c (multiply_dice2): Scale correct quantity.
Remove 'transfer-part' action.
* action.def (ACTION_TRANSFER_PART): Delete.
* cmd.def (ctrl-D): Unbind from 'do_detach' and comment out.
* table.def (uu_can_transfer_parts_to): Delete.
* utype.def (u_acp_to_transfer_part): Delete.
* actions.c (prep_transfer_part_action): Delete.
(do_transfer_part_action): Delete.
(check_transfer_part_action): Delete.
(execute_action): No longer handle 'ACTION_TRANSFER_PART' cases.
* cmd.c (do_one_detach): Delete.
(do_detach): Delete.
* help.c (describe_utype): Remove description of 'transfer-part'.
* tp.c (net_prep_transfer_part_action): Delete.
* ui.c (advance_into_cell): No longer handle 'transfer-part' actions.
* tkconq.tcl: Remove all instances of 'can_detach' and remove the
"Detach" menu item.
* tkinit.c (update_action_controls_info): Remove check for
'transfer-part' action and the setting of the 'can_detach' flag.
2005-06-20 02:02 Eric McDonald <[email protected]>
Fix construction-related bugs.
* actions.c (can_build): Make sure that the buildee is in
build range of the builder.
* aioprt.cc (choose_transport_to_construct_in): Reject mobile
occs as transport to construct in.
2005-06-19 23:33 Eric McDonald <[email protected]>
Fix serious bugs in the encoding of negative dice reps.
* lisp.c (read_form_aux): Cast dice rep to short before
performing an assignemnt (with widening to int) to 'num'.
Also, ensure that the 14th bit is correct for negative dice reps.
* table.def: Make sure that all Type 1 dice tables start at
'TABLO' rather than a greater number.
Add support of occs-on-completion for initial units placement.
* mkunits.c (grant_initial_occs): New function.
Add occs-on-completion to just-placed unit.
(place_unit): Call 'grant_initial_occs' to possibly place initial
occs in unit. Also, take new parameters for when being called
by 'grant_initial_occs'.
2005-06-19 20:04 Eric McDonald <[email protected]>
Refine support of occs-on-completion.
Various bits of cleanup.
* action.def (ACTION_CREATE_IN): Improve parameter list.
(ACTION_CREATE_AT): Likewise.
(ACTION_BUILD): Likewise.
(ACTION_REPAIR): Likewise.
* table.def (uu_alt_complete_occs_on_completion): New Type 1 dice
TableUU, 'alt-complete-occs-on-completion'.
(uu_alt_incomplete_occs_on_completion): New Type 1 dice TableUU,
'alt-incomplete-occs-on-completion'.
* refman.texi (alt-complete-occs-on-completion): New entry.
(alt-incomplete-occs-on-completion): New entry.
(complete-occs-on-completion): Modify.
(incomplete-occs-on-completion): Modify.
* conq.h (can_meet_materials_requirement): Delete one variation.
(consume_materials): New function decl.
Consume materials of a given unit according to given consumption vector.
(can_create_common): Modify parameter list.
(can_build): Modify parameter list.
* actions.c: Use namespace 'Xconq'.
(can_meet_materials_requirement): Delete one variation.
(consume_materials): New variation of function.
(consume_materials): Call new variation after constructing
materials vector using getter.
(can_create_common): Add new optional parameters for specifying
ACP and materials costs. Check against those costs, if they are
not their defaults values.
(can_build): Likewise.
(can_change_type_to): Use the preferred variation of
'can_meet_materials_requirement' since the non-preferred variation
is being deleted.
(do_create_action_common_1): Add new optional parameters for
specifying CP to be gained and for ACP and materials costs. Deduct
the costs, and add the specified CP, if they are not their default
values.
(do_build_action_1): New function. Handle optional parameters as
above.
(do_build_action): Call 'do_build_action_1'.
(grant_occs_on_completion): New function. Handle
occs-on-completion functionality. Use enhanced action checking and
and performance functions to simplify code. Also handle new behavior
of the regular occs-on-completion tables, and handle alternative
Type 1 dice occs-on-completion tables.
(make_unit_complete): Move occs-on-completion functionality to
'grant_occs_on_completion', and call that function.
2005-06-19 13:05 Eric McDonald <[email protected]>
Add some additional info on synthetic dice encoding.
* refman.texi (Arithmetic Operations): Give the complete encoding
formula for positive dice, and provide a couple of examples.
2005-06-19 02:44 Eric McDonald <[email protected]>
Finally write docs on how to synthesize dice encodings in GDL.
* refman.texi (Arithmetic Operations): Add new paragraph group
that describes the process. Get rid of "TODO".
2005-06-18 23:07 Eric McDonald <[email protected]>
Alter the way dice specs work.
Honor dice specs for unit explosion damage.
* table.def (ut_accident_damage): Change type from 'TABINT' to
'TABDICE1'.
(uu_damage): Change type from 'TABDICE' to 'TABDICE1'.
(uu_detonation_damage_adj): Change type from 'TABINT' to 'TABDICE1'.
(uu_detonation_damage_at): Change type from 'TABINT' to 'TABDICE1'.
(uu_fire_damage): Change type from 'TABINT' to 'TABDICE1'.
(uu_tp_damage): Change type from 'TABDICE' to 'TABDICE1'.
* refman.texi (Lexical Elements): Rewrite documentation on dice
specs.
(damage): Rewrite.
(fire-damage): Rewrite.
(tp-damage): Rewrite.
(detonation-damage-at): Rewrite.
(detonation-damage-adj): Rewrite.
* conq.h (dice_desc): Delete.
* game.h (TABDICE): Delete.
(TABDICE1): New data macro. Type 1 dice table.
(TABDICE2): New data macro. Type 2 dice table.
* misc.h (DICE): Delete.
(dice1): New function macro.
Decompose dice representation into Type 1 dice parts.
(dice2): New function macro.
Decompose dice representation into Type 2 dice parts.
(roll_dice): Delete.
(multiply_dice): Delete.
(typedef DiceRep): Typedef from 'short'.
(dice1_roll_min): New function decl.
Minimum value from Type 1 dice.
(dice2_roll_min): New function decl.
Minimum value from Type 2 dice.
(dice1_roll_mean): New function decl.
Mean value from Type 1 dice.
(dice2_roll_mean): New function decl.
Mean value from Type 2 dice.
(dice1_roll_max): New function decl.
Maximum value from Type 1 dice.
(dice2_roll_max): New function decl.
Maximum value from Type 2 dice.
(roll_dice1): New function decl. Roll Type 1 dice.
(roll_dice2): New function decl. Roll Type 2 dice.
(multiply_dice1): New function decl.
Scale Type 1 dice by a percentage.
(multiply_dice2): New function decl.
Scale Type 2 dice by a percentage.
* ai.c: Use namespace 'Xconq'.
(average_damage): Call 'dice1_roll_mean' instead of 'dice_roll_mean'.
(offensive_worth): Wrap detonation damage reps with calls to
'dice1_roll_mean'.
* aiutil.h (dice_roll_min): Delete.
(dice_roll_mean): Delete.
(dice_roll_max): Delete.
* aiutil.c: Use name 'Xconq'.
(dice_roll_min): Delete.
(dice_roll_mean): Delete.
(dice_roll_max): Delete.
(type_attack_damage_max): Call 'dice1_roll_max' instead of
'dice_roll_max'.
(type_attack_damage_min): Call 'dice1_roll_min' instead of
'dice_roll_min'.
(type_fire_damage_max): Call 'dice1_roll_max' instead of
'dice_roll_max'.
(type_fire_damage_min): Call 'dice1_roll_min' instead of
'dice_roll_min'.
* combat.c: Use namespace 'Xconq'.
(model_1_attack): Call 'roll_dice1' instead of 'roll_dice',
and make sure the result is at least 0.
(maybe_hit_unit): Call 'roll_dice1' instead of 'roll_dice',
and make sure the result is at least 0.
(detonate_unit): Honor Type 1 dice for detonation damage.
* help.c: Use namespace 'Xconq'.
(tb_dice_desc): Call 'dice2_desc' instead of 'dice_desc'.
(TODO: Display both Type 1 and Type 2 dice correctly.)
* lisp.h (dice1_desc): New function decl.
Get Type 1 dice spec from internal dice representation.
(dice2_desc): New function decl.
Get Type 2 dice spec from internal dice representation.
* lisp.c: Use namespace 'Xconq'.
(dice1_desc): New function.
(dice2_desc): New function.
(read_form_aux): Parse the revised dice specs. Be pickier about
what is allowed.
(fprint_num_or_dice): Handle both Type 1 and Type 2 dice, and
use their respective dice description functions, instead of
re-inventing the wheel.
* nlang.c (dice_desc): Delete.
* run2.c: Use namespace 'Xconq'.
(run_accidents): Call 'roll_dice1' instead of 'roll_dice', and
ensure that value is not less than 0.
* util.c: Use namespace 'Xconq'.
(roll_dice): Delete.
(multiply_dice): Delete.
(dice1_roll_min): New function.
(dice2_roll_min): New function.
(dice1_roll_mean): New function.
(dice2_roll_mean): New function.
(dice1_roll_max): New function.
(dice2_roll_max): New function.
(roll_dice1): New function.
(roll_dice2): New function.
(multiply_dice1): New function.
(multiply_dice2): New function.
* write.c: Use namespace 'Xconq'.
(add_num_or_dice_to_form): Handle 'TABDICE1' and 'TABDICE2', calling
their dice desc functions as appropriate.
* beruit.g (table damage): Remove +1 offsets.
* mormon.g: Likewise.
* flattop.g (table damage): Subtract 1 from offsets.
* ww2-adv.g: Likewise.
Move another game to the bitrot archive.
* africa.g: Move to 'bitrot'.
* africa-1850.g: Likewise.
* game.dir: Remove entry for 'africa-1850'.
* bitrot/game.dir: Add entry for 'africa-1850'.
2005-06-17 03:07 Eric McDonald <[email protected]>
Fix up games library to account for loss of 'indepside-can-build'.
* 3rd-age.g (indepside-can-build): Change to 'indepside-has-ai'.
* advances.g (indepside-can-build): Change to 'indepside-has-ai'.
* anc-near-east.g (indepside-has-ai): Set to 'true'.
(indepside-can-build): Remove.
* lord-rings.g (indepside-can-build): Remove.
2005-06-17 02:28 Eric McDonald <[email protected]>
Implement per-side general action restrictions.
Implement per-side construction restrictions.
Decommision Iplayer.
* gvar.def (g_indepside_can_build): Delete.
* keyword.def (K_COULD_ACT): Change to 'K_COULD_ACT_WITH',
'could-act-with'.
(K_COULD_BUILD): Change to 'K_COULD_BUILD', 'could-build'.
* refman.texi (Side Action Restrictions): New subsection and
menu entry.
(could-act-with): New entry.
(could-construct): New entry.
* kernel/Makefile.in: Remove references to iplayer.
* kernel/iplayer.c: Delete.
* actions.c (can_act): Check whether the actor's side can with
an unit of the agent's type.
(can_create_common): Likewise.
(can_build): Likewise.
* ai.c (register_iplayer): Remove references to this function.
* init.c (set_ai_for_player): Ensure that 'indepside-has-ai' is
set, if indepside was assigned an AI. And unset, if no AI.
* plan.c (ai_victim_here): Don't check 'indepside-can-build'.
* read.c (fill_in_side): Handle 'K_COULD_ACT_WITH' instead of
'K_COULD_ACT', and 'K_COULD_CONSTRUCT' instead of 'K_COULD_BUILD'.
Fix 'K_COULD_RESEARCH' to handle atype-value list instead of
utype-value list.
* run.c (init_movement): Only finish indpeside's turn if
it does not have an AI.
(unit_still_acting): Preclude unit action if side is not
permitted to act with unit of its type.
(unit_still_acting_without_plan): Likewise.
* side.h (struct a_side): Rename 'could_act' to 'could_act_with'.
Rename 'could_build' to 'could_construct'. Fix comment for
'could_research'.
* side.c (create_side): Alloc and fill out 'could_act_with',
'could_construct', 'could_develop', and 'could_research' fields.
* unit.c (can_build): Get rid of 'indepside_can_build' check.
(type_can_build): Likewise.
(can_build_or_help): Likewise.
(can_build_type): Add check against side's 'could_construct'
vector.
* write.c (write_side_properties): Handle 'could_act_with' instead
of 'could_act', and 'could_construct' instead of 'could_build'.
Fix 'could_research' case so that atype-value list is written out.
* tkconq.tcl (add_player_dialog_items): Change button name from
"Reveal" to "Activate".
(set_indepside): Ensure that the utypes can act on a side, if the
side is shown, and cannot act if the side is not shown. Change
button name from "Reveal" to "Activate", and "Hide" to "Deactivate".
(popup_indepside_config): Handle "Act with any units" button.
(ok_indepside): Likewise.
(create_map_menus): Remove "Iplayer" as a choice of AI.
* tkmain.c (tk_set_indepside_options): Handle "Can act" button
results. Also, only handle those buttons which we have args for.
(tk_start_player_setup_stage): Set the value of Tcl var
'set_indepside_act' based on whether indepside could act with
any unit.
2005-06-15 03:07 Eric McDonald <[email protected]>
Prepare for some new side-based action-restriction properties.
* keyword.def (K_COULD_ACT): New keyword, "could-act".
(K_COULD_BUILD): New keyword, "could-build".
(K_COULD_DEVELOP): New keyword, "could-develop".
(K_COULD_RESEARCH): New keyword, "could-research".
* refman.texi: Update some of the documentation on side forms.
* side.h (struct a_side): New short int arrays: 'could_act',
'could_build', 'could_develop', and 'could_research'.
* read.c (fill_in_side): Handle cases for new keywords by
interpeting utype-value lists.
* write.c (write_side_properties): Handle cases for new keywords
by writing out utype-value lists.
Restrict damaged terrain outcomes based on detonator type.
(Feature requested by Elijah.)
* table.def (ut_blasts_into_ttype): New TableUU, 'blasts-into-ttype'.
* refman.texi (blasts-into-ttype): New entry.
* combat.c (damaged_terrain_type): Modify to accept utype argument.
Use utype to look up whether the outcome ttype is valid in the
particular situation.
(damage_terrain): Call 'damaged_terrain_type' with utype argument.
2005-06-12 22:02 Eric McDonald <[email protected]>
Fix create check, so that some games will work properly again.
* actions.c (could_create): Allow creation with 0 CP to occur.
Fix bug with oproles not being unassigned when units change side.
* unit.c (change_unit_side): Release operational role of unit
from old side.
Fix bug with construction from Tkconq UI.
* tkcmd.c (aux_build2): Help ensure that we are not trying to build
in an invalid or incorrect transport.
Improve occs-on-completion feature.
* actions.c (make_unit_complete): Add incomplete occs with 0 CP
instead of 1 CP.
* init.c (check_occs_on_completion): No longer check for cycles
with incomplete units that only need 1 CP to be complete.
Polish up the Default game some more.
* standard.g (variant density2): Rename to 'density1' and turn it
on by default.
2005-06-10 02:05 Eric McDonald <[email protected]>
Add SF Battles Testbed to 'bitrot' archive.
* battles-test.g: Add to archive.
* game.dir: Add "battles-test" entry.
2005-06-08 03:01 Eric McDonald <[email protected]>
Add occs-on-completion feature.
(Requested by Elijah and myself.)
* table.def (uu_complete_occs_on_completion): New TableUU,
'complete-occs-on-completion'.
(uu_incomplete_occs_on_completion): New TableUU,
'incomplete-occs-on-completion'.
* refman.texi (complete-occs-on-completion): New entry.
(incomplete-occs-on-completion): New entry.
* actions.c (make_unit_complete): Add occs-on-completion
functionality.
* init.c (check_occs_on_completion): Look for cycles in
occs-on-completion graphs and produce an init error if any found.
(check_game_validity): Call 'check_occs_on_completion'.
Bring docs up-to-date.
* refman.texi (constructor-absorbed-by): New entry.
Polish Default game a little bit.
* standard.g (variant model1): Rename.
(variant model1doctrine): Rename.
(density1): Remove.
* stdunit.g: Remove creation-related tables, since they are no
longer used.
Remove StarFleet Battles test from games lib.
* battle-test.g: Delete.
2005-06-07 02:38 Eric McDonald <[email protected]>
Fix colonizer-doesn't-garrision-anymore bug.
(I knowingly created this bug with the intent of making a new feature
to fix it. This patch contains the new feature.)
* table.def (uu_constructor_absorbed_by): New TableUU,
'constructor-absorbed-by'.
* actions.c (do_create_common_2): Only absorb creator into creation
if 'uu_constructor_absorbed_by' is set.
(do_build_action): Only absorb builder into completed unit
if 'uu_constructor_absorbed_by' is set.
* 3rd-age.g (constructor-absorbed-by): New table.
* advances.g: Likewise.
* bolodd2.g: Likewise.
* bolodd3.g: Likewise.
* civ2.g: Likewise.
* solar.g: Likewise.
* time.g: Likewise.
Add test for merge "action" to AI.
* aiunit.cc (can_create_in): Check whether colonizer can merge
into colonists or not.
2005-06-07 00:17 Eric McDonald <[email protected]>
Fix crashing bug in skelconq.
(Reported by an anonymous user.)
* skelconq.c (main): Only check command-line args for auto-tester
invocation, if there are command-line args. (I could have sworn
that this bug had been reported and fixed before.)
2005-06-06 02:50 Eric McDonald <[email protected]>
Merge from 'MPT_EMCDONALD_AI_6' to 'MPT_EMCDONALD_AI_7'.
Many non-AI-related changes included in this merge.
* changelogs/ChangeLog-EMCDONALD_AI: Move from top-level dir.
Branch can continue using this file in top-level, but we wish to
stow it away in 'changelogs' dir in the trunk.
2005-05-01 13:08 Eric McDonald <[email protected]>
Fixes to Opal Heroes.
(From Elijah.)
* opal-heroes.g
2005-05-01 01:40 Eric McDonald <[email protected]>