home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C / Games / Xconq 7.1.0 / lib / modern.g < prev    next >
Encoding:
Text File  |  1996-04-04  |  3.7 KB  |  211 lines  |  [TEXT/XCNQ]

  1. (game-module "modern"
  2.   (title "Modern Times")
  3.   (blurb "Economics and politics of today's world")
  4.   (variants (see-all true))
  5.   )
  6.  
  7. ;; This could be a variant, but is implausible to have an unseen world.
  8. (set terrain-seen true)
  9.  
  10. (unit-type engrs (image-name "engineers"))
  11.  
  12. (unit-type fishing-boat (image-name "ap"))
  13. (unit-type cargo-ship (image-name "ap"))
  14.  
  15. (unit-type farm (image-name "farm"))
  16. (unit-type oil-field (image-name "oil-derrick"))
  17. (unit-type oil-platform (image-name "oil-derrick"))
  18.  
  19. (unit-type shipyard (image-name "facility"))
  20.  
  21. (unit-type base (image-name "airbase"))
  22. (unit-type port (image-name "port"))
  23. (unit-type town (image-name "town20"))
  24. (unit-type city (image-name "city20"))
  25.  
  26. (define ship-types (fishing-boat cargo-ship))
  27.  
  28. (define cities (town city))
  29.  
  30. (define places (farm oil-field oil-platform shipyard base port town city))
  31.  
  32. (material-type food)
  33. (material-type oil)
  34. (material-type iron)
  35. (material-type people)
  36.  
  37. (include "stdterr")
  38.  
  39. (define water (sea shallows river))
  40.  
  41. ;;; Static relationships.
  42.  
  43. (table unit-capacity-x
  44.   (cities engrs 16)
  45.   (city oil-field 1)
  46.   )
  47.  
  48. (table unit-storage-x
  49.   (farm food 100)
  50.   (cities food 900)
  51.   (u* oil 10)
  52.   (cities oil 400)
  53.   )
  54.  
  55. (table vanishes-on
  56.   (places water true)
  57.   (oil-platform shallows false)
  58.   )
  59.  
  60. (table unit-size-in-terrain
  61.   (u* t* 1)
  62.   (farm t* 4)
  63.   (oil-field t* 4)
  64.   (town t* 4)
  65.   (city t* 16)
  66.   )
  67.  
  68. (add t* capacity 16)
  69.  
  70. (table terrain-storage-x
  71.   (t* oil 100)
  72.   )
  73.  
  74. ;;; Actions.
  75.  
  76. (add engrs acp-per-turn 1)
  77.  
  78. (add cities acp-per-turn 1)
  79.  
  80. ;;; Movement.
  81.  
  82. (add places speed 0)
  83.  
  84. ;;; Construction.
  85.  
  86. (add engrs cp 2)
  87.  
  88. (add farm cp 48)
  89.  
  90. (add oil-field cp 48)
  91.  
  92. (add oil-platform cp 144)
  93.  
  94. (table acp-to-create
  95.   (engrs (farm oil-field oil-platform shipyard) 1)
  96.   (shipyard ship-types 1)
  97.   (cities engrs 1)
  98.   (city oil-field 1)
  99.   )
  100.  
  101. (table cp-on-creation
  102.   (engrs (farm oil-field oil-platform shipyard) 3)
  103.   (shipyard ship-types 1)
  104.   (cities engrs 1)
  105.   (city oil-field 1)
  106.   )
  107.  
  108. (table create-range
  109.   (engrs oil-platform 1)
  110.   (city oil-field 2)
  111.   )
  112.  
  113. (table acp-to-build
  114.   (engrs (farm oil-field oil-platform shipyard) 1)
  115.   (shipyard ship-types 1)
  116.   (cities engrs 1)
  117.   (city oil-field 1)
  118.   )
  119.  
  120. (table cp-per-build
  121.   (engrs (farm oil-field oil-platform shipyard) 3)
  122.   (shipyard ship-types 1)
  123.   (cities engrs 1)
  124.   (city oil-field 1)
  125.   )
  126.  
  127. (table build-range
  128.   (city oil-field 2)
  129.   )
  130.  
  131. ;;; Automatic production.
  132.  
  133. (table base-production
  134.   ((oil-field oil-platform city) oil (20 20 10))
  135.   )
  136.  
  137. (table base-consumption
  138.   (u* food 1)
  139.   ((town city) food (2 10))
  140.   (u* oil 1)
  141.   ((town city) oil (2 10))
  142.   )
  143.  
  144. (table hp-per-starve
  145.   (u* food 1.00)
  146.   (u* oil 1.00)
  147.   )
  148.  
  149. (table out-length
  150.   ((oil-field oil-platform) oil 5)
  151.   )
  152.  
  153. (table in-length
  154.   (farm oil 5)
  155.   (cities oil 5)
  156.   )
  157.  
  158. ;;; Terrain alteration.
  159.  
  160. (table acp-to-add-terrain
  161.   (engrs road 1)
  162.   )
  163.  
  164. (table acp-to-remove-terrain
  165.   (engrs road 1)
  166.   )
  167.  
  168. ;;; Initial random setup.
  169.  
  170. (add city start-with 1)
  171. (add town start-with 5)
  172. (add farm start-with 10)
  173. (set country-radius-min 3)
  174. (set country-separation-min 16)
  175. (set country-separation-max 48)
  176. ; Try to get countries on the coast.
  177. (add (sea plains) country-terrain-min (1 4))
  178.  
  179. (table favored-terrain
  180.   (u* t* 0)
  181.   (farm plains 100)
  182.   (cities plains 100)
  183.   (cities land-t* 20)
  184.   (cities plains 40)
  185.   )
  186.  
  187. (table independent-density (cities plains 100))
  188.  
  189. (add land-t* country-people-chance 90)
  190. (add plains country-people-chance 100)
  191.  
  192. (add land-t* independent-people-chance 50)
  193.  
  194. (table unit-initial-supply
  195.   (u* m* 9999)
  196.   (cities oil 400)
  197.   )
  198.  
  199. (table terrain-initial-supply
  200.   (t* oil 10d100)
  201.   )
  202.  
  203. (game-module (design-notes (
  204.   "A detailed game of modern problems."
  205.   "Scale is 1 week/turn, 50km/cell."
  206.   ""
  207.   "Although this is a lot like the net empire games, it does not
  208.    need to emulate them."
  209.   "(should have a many-nukes-available option)"
  210.   )))
  211.