home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Games / Xconq 7.0d16 / lib / old-empire.g < prev    next >
Encoding:
Text File  |  1993-12-20  |  3.9 KB  |  216 lines  |  [TEXT/MPS ]

  1. (game-module "old-empire"
  2.   (title "Old Empire")
  3.   (blurb "An emulation of `old Empire', a distant ancestor of Xconq.")
  4.   ;; No variants were available.
  5. )
  6.  
  7. ;;; Types.
  8.  
  9. (unit-type army (char "A") (image-name "soldiers"))
  10. (unit-type fighter (char "F") (image-name "jets"))
  11. (unit-type destroyer (char "D") (image-name "dd"))
  12. (unit-type submarine (char "S") (image-name "sub"))
  13. (unit-type troop-transport (char "T") (image-name "ap"))
  14. (unit-type cruiser (char "R") (image-name "ca"))
  15. (unit-type carrier (char "C") (image-name "cv"))
  16. (unit-type battleship (char "B") (image-name "bb"))
  17. (unit-type city (char "@") (image-name "city20"))
  18.  
  19. ;;; avgas is used only to constrain fighter range.
  20.  
  21. (material-type avgas)
  22.  
  23. (terrain-type sea (color "sky blue") (char "."))
  24. (terrain-type land (color "green") (char "+"))
  25.  
  26. (define A army)
  27. (define F fighter)
  28. (define D destroyer)
  29. (define S submarine)
  30. (define T troop-transport)
  31. (define R cruiser)
  32. (define C carrier)
  33. (define B battleship)
  34. (define @ city)
  35.  
  36. (define ship (D S T R C B))
  37.  
  38. ;;; Static relationships.
  39.  
  40. (table vanishes-on
  41.   ((A @) sea true)
  42.   (ship land true)
  43.   )
  44.  
  45. ;;; Unit-unit capacities.
  46.  
  47. (table unit-capacity-x
  48.   (T A 6)
  49.   (C F 8)
  50.   )
  51.  
  52. (add @ capacity 100)
  53.  
  54. (table unit-size-as-occupant
  55.   (A @ 50)
  56.   (F @ 1)
  57.   (ship @ 1)
  58.   ;; Cities can't occupy each other.
  59.   (@ @ 200)
  60.   )
  61.  
  62. ;;; Unit-terrain capacity is the default of 1 unit, 1 cell.
  63.  
  64. ;;; Unit-material capacities.
  65.  
  66. (table unit-storage-x
  67.   (F avgas 20)
  68.   ;; Carriers and cities have effectively infinite capacity.
  69.   ((C @) avgas 9999)
  70.   )
  71.  
  72. ;;; Actions.
  73.  
  74. (add (A F) acp-per-turn (1 4))
  75. (add ship acp-per-turn 2)
  76. (add @ acp-per-turn 1)
  77.  
  78. ;;; Movement.
  79.  
  80. (add @ speed 0)
  81.  
  82. (table mp-to-enter-terrain
  83.   (army sea 10)
  84.   (ship land 10)
  85.   )
  86.  
  87. ;4 u* F enter-time
  88.  
  89. (table consumption-per-move
  90.   (F avgas 1)
  91.   )
  92.  
  93. ;;; Construction.
  94.  
  95. (add u* cp (5 10 20 30 25 50 60 75 1))
  96.  
  97. (table acp-to-create
  98.   (@ u* 1)
  99.   (@ @ 0)
  100.   )
  101.  
  102. (table cp-on-creation
  103.   (@ u* 1)
  104.   )
  105.  
  106. (table acp-to-build
  107.   (@ u* 1)
  108.   )
  109.  
  110. (table cp-per-build
  111.   (@ u* 1)
  112.   )
  113.  
  114. ;20 u* startup              ; why does original empire doc list out the numbers?
  115. ;1 ship @ repair
  116.  
  117. ;;; Combat.
  118.  
  119. (add u* hp-max (1 1 3 3 2 8 8 12 1))
  120.  
  121. ;[ 0 0 2 2 1 4 4  6 0 ] u* crippled
  122.  
  123. (table hit-chance
  124.   (u* u* 50)
  125.   ;; Cities don't participate in combat.
  126.   (u* @ 0)
  127.   (@ u* 0)
  128.   ;; except vs armies.
  129.   (A @ 50)
  130.   (@ A 50)
  131.   )
  132.  
  133. (table damage
  134.   (u* u* 1)
  135.   ;; Subs hit ships harder.
  136.   (S ship 3)
  137.   ;; Armies don't damage cities.
  138.   (A @ 0)
  139.   )
  140.  
  141. (table capture-chance
  142.   (A @ 50)
  143.   )
  144.  
  145. (table hp-to-garrison
  146.   ;; Use up the capturing army.
  147.   (A @ 1)
  148.   )
  149.  
  150. ;"shoots down" F destroy-message
  151. ;"sinks" ship destroy-message
  152. ;"runs out of fuel and crashes" F starve-message
  153.  
  154. ;;; Backdrop.
  155.  
  156. (table base-consumption
  157.   (F avgas 4)
  158.   )
  159.  
  160. (table base-production
  161.   ((C @) avgas 9999)
  162.   )
  163.  
  164. (table hp-per-starve
  165.   (F avgas 1.00)
  166.   )
  167.  
  168. ;;; Scoring.
  169.  
  170. (add u* point-value 0)
  171. (add @ point-value 1)
  172.  
  173. (scorekeeper (do last-side-wins))
  174.  
  175. ;;; Random setup.
  176.  
  177. (add t* alt-percentile-min (0 70))
  178. (add t* alt-percentile-max (70 100))
  179. (add t* wet-percentile-min 0)
  180. (add t* wet-percentile-max 100)
  181.  
  182. (set country-radius-min 3)
  183.  
  184. (set country-separation-min 15)
  185.  
  186. (add t* country-terrain-min (2 1))
  187.  
  188. (add city start-with 1)
  189. (add city independent-near-start 3)
  190.  
  191. (table favored-terrain
  192.   (city (sea land) (0 100))
  193.   )
  194.  
  195. (table independent-density
  196.   (city land 200)
  197.   )
  198.  
  199. (table unit-initial-supply
  200.   (@ avgas 9999)
  201.   )
  202.  
  203. (game-module (notes (
  204.   "Of course, this will not be exactly like old Empire - for one thing, Xconq maps"
  205.   "are composed of hexes and not squares!  However, we can reproduce the details"
  206.   "of the playing pieces fairly well."
  207.   ""
  208.   "The chief defects are that combat is always mutual, rather than"
  209.   "one-side-at-a-time hits, and that cities must have capacity for armies."
  210.   "In the latter case, this period fixes an annoying defect of the original"
  211.   "empire game!  Also, some of the messages are a little weird."
  212.   ""
  213.   "There is also an imbalance in that ships defeating armies don't run"
  214.   "aground, so they are more useful than in the original."
  215. )))
  216.