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

  1. (game-module "hobbit"
  2.   (title "Middle Earth")
  3.   (blurb "Tolkien's Middle Earth, version 1.0")
  4.   (variants (see-all true))
  5. )
  6.  
  7. (unit-type hobbit (image-name "hobbit") (possible-sides "good"))
  8. (unit-type dwarf (image-name "dwarf") (possible-sides "good"))
  9. (unit-type elf (image-name "elf") (possible-sides "good"))
  10. (unit-type man (image-name "swordman"))
  11. (unit-type rider (image-name "cavalry"))
  12. (unit-type ship (image-name "frigate") (possible-sides "evil"))
  13. (unit-type troll (image-name "troll") (possible-sides "evil"))
  14. (unit-type nazgul (image-name "nazgul") (possible-sides "evil"))
  15. (unit-type bridges (image-name "bridge"))
  16. (unit-type mine (image-name "mine2"))
  17. (unit-type village (image-name "walltown"))
  18. (unit-type town (image-name "city18")) ; or castle?
  19.  
  20. (define h hobbit)
  21. (define d dwarf)
  22. (define e elf)
  23. (define m man)
  24. (define R rider)
  25. (define S ship)
  26. (define T troll)
  27. (define N nazgul)
  28. (define b bridges)
  29. (define / mine)
  30. (define * village)
  31. (define @ town)
  32.  
  33. (material-type food (help "everybody needs it"))
  34. (material-type gold (help "everybody wants it"))
  35.  
  36. (define ! food)
  37. (define $ gold)
  38.  
  39. (terrain-type sea (color "deep sky blue"))
  40. (terrain-type river (color "cyan"))
  41. (terrain-type swamp (color "medium aquamarine"))
  42. (terrain-type plains (color "green"))
  43. (terrain-type forest (color "forest green"))
  44. (terrain-type wasteland (color "yellow") (image-name "desert"))
  45. (terrain-type mountains (color "sienna"))
  46. (terrain-type ice (color "gray"))
  47.  
  48. ; lots of forests in this period:
  49. ;                            sea riv swa pla for des mou ice
  50. (add t* alt-percentile-min (   0  53  55  55  55  55  93  99))
  51. (add t* alt-percentile-max (  53  55  93  93  93  93  99 100))
  52. (add t* wet-percentile-min (   0   0  97  12  47   0   0   0))
  53. (add t* wet-percentile-max ( 100 100 100  47  97  12 100 100))
  54.  
  55. ;65 alt-roughness
  56. ;70 wet-roughness
  57.  
  58. (set edge-terrain ice)
  59.  
  60. (define land (plains wasteland forest mountains))
  61. (define land-forces (h d e m R))
  62. (define movers (h d e m R S T N))
  63. (define places (/ * @))
  64.  
  65. (table vanishes-on
  66.   (u* (sea river) true)
  67.   (nazgul t* false)
  68.   (ship (sea river) false)
  69. )
  70.  
  71. ;true [ * @ ] named
  72. ;[ 1 2 10 25 ] [ N / * @ ] territory
  73.  
  74. (add (/ * @) start-with (0 0 1 #|1 5 1|#))
  75.  
  76. (table independent-density (places t* (10 80 20)))
  77.  
  78. (table favored-terrain
  79.   (u* t* 0)
  80.   (/ (plains forest mountains wasteland) (20 20 100 20))
  81.   (* (plains forest mountains) (100 40 20))
  82.   (@ (plains forest) (100 20))
  83. )
  84.  
  85. (set country-radius-min 5)
  86. (set country-separation-min 20)
  87.  
  88. #|
  89.  
  90. 25 [ / ] visibility
  91. 60 [ h e ] visibility
  92. 25 forest [ h d e m R T ] conceal 
  93. true [ b * @ ] always-seen
  94. true u* already-seen
  95.  
  96.  
  97. 2 u* [ * @ ] repair
  98.  
  99. 2 food land-forces produce
  100. 3 food R produce
  101. 1 food T produce
  102. 20 gold / produce
  103. [ 10 1 ] [ food gold ] * produce
  104. [ 20 2 ] [ food gold ] @ produce
  105. 100 plains land-forces productivity
  106.  50 forest land-forces productivity
  107. 100 [ forest mountains ] T productivity
  108. ;  h   d  e  m   R   S  T  N b    /   *    @
  109. [  4   8  8  8  15 100 20 20 0   10 500 1000 ] food u* storage
  110. [ 10 100 20 50  50  50 30 20 0 1000 500 1000 ] gold u* storage
  111. 100 food u* stockpile
  112.   0 gold u* stockpile
  113.  10 gold m stockpile
  114. 1 food u* consume
  115. 2 food R consume
  116. 0 r* [ b / ]  consume
  117. 100 t* / productivity 
  118. [ 100 50 20 20 ] land * productivity
  119. [ 100 50 20 20 ] land @ productivity
  120.  
  121. |#
  122.  
  123. ;                         h d e m R S T  N
  124. (add movers acp-per-turn (1 1 2 1 5 5 1 10))
  125.  
  126. (add (* @) acp-per-turn 1)
  127.  
  128. (add (* @) speed 0)
  129.  
  130. (table mp-to-enter-terrain
  131.   (u* t* 100)
  132.   (land-forces land 1)
  133.   (h swamp 1)
  134.   (e (river swamp mountains) 2)
  135.   (R (wasteland forest mountains) (2 4 4))
  136.   (S (sea river) (1 3))
  137.   (N t* 1)
  138.   (T (forest mountains) 1)
  139. )
  140.  
  141. (table unit-size-as-occupant
  142.   (movers b 1)
  143.   (movers (/ * @) 1)
  144.   (movers S 1)
  145. )
  146.  
  147. (add b capacity 1)
  148. (add (/ * @) capacity 10)
  149. (add S capacity 4)
  150.  
  151. ;  h d e m R S T N
  152. ;;[  8 6 6 4 2 1 1 1 ] movers * capacity
  153. ;[ 12 9 9 6 3 2 1 2 ] movers @ capacity
  154. ;[  1 5 0 1 0 ] land-forces / capacity
  155. ;[  4 3 3 2 1 ] land-forces S capacity
  156.  
  157. ;;; Construction parameters.
  158.  
  159. (table cp-on-creation
  160.   (@ movers 1)
  161.   (* movers 1)
  162. )
  163. ;  h  d  e  m  R  S  T  N
  164. ;[  8 12 12 12 20 20 25 40 ] movers @ make
  165. ;[ 16 24 24 24 40 40 50 80 ] movers * make
  166. ;  R   S   T   N
  167. ;[ 20 100 200 500 ] gold [ R S T N ] to-make
  168.  
  169. ;true [ * @ ] maker ; part of doctrine now
  170.  
  171. ;100 / d make
  172. ;0 u* startup
  173. ;100 N research
  174.  
  175. ;               h d e m R S T N b  /  *  @
  176. (add u* hp-max (1 1 1 2 2 3 4 4 8 20 20 40))
  177.  
  178. ;[ 0 0 0 1 1 2 2 2 4 10 10 20 ] u* crippled
  179.  
  180. (table hit-chance
  181. ;             h  d  e  m  R  S  T  N 
  182.   (h movers (30 20 20 20 20  0 20 50))
  183.   (d movers (50 50 40 40 40 10 30 10))
  184.   (e movers (50 40 30 40 30 10 40 10))
  185.   (m movers (50 40 40 50 50 15 25 20))
  186.   (R movers (50 40 30 50 60 20 50 30))
  187.   (T movers (30 50 20 50 50 30 50  0))
  188.   (N movers (70 90 60 80 70 50 60 50))
  189.   (S movers 0)
  190.   (S S 40)
  191.   ((b / * @) u* 0)
  192. )
  193.  
  194. ;true u* b bridge 
  195.  
  196. (table damage
  197.   (u* u* 1)
  198.   ((T N) u* 2)
  199.   (h N 2)
  200. )
  201.  
  202. (table capture-chance
  203.   (h places (20 30 20))
  204.   (d places (75 30 20))
  205.   (e places ( 0 50 35))
  206.   (m places (50 50 35))
  207.   (R places ( 0 30 20))
  208.   ;; Bridges are easy to capture
  209.   ;; (should just allow everybody to use, leave indep)
  210.   (movers b 100)
  211.   ((S N) b 30)
  212.   )
  213.  
  214. (add u* acp-to-disband 1)
  215. (add places acp-to-disband 0)
  216.  
  217. ;"kills" movers destroy-message
  218. ;"sinks" S destroy-message
  219.  
  220. ;-20 neutrality
  221.  
  222. ;; [ 90 60 80 ] [ R T N ] control
  223.  
  224. ; disasters: evil creatures lurk in forests and mountains
  225. ; trolls and nazguls are immune, being themselves evil
  226. ;200 swamp land-forces accident
  227. ;100 wasteland land-forces accident
  228. ;100 forest [ h d m R ] accident ; elves can defend themselves in the forest
  229. ;;100 mountains land-forces accident
  230. ;400 ice land-forces accident
  231. ;"is killed by evil creatures" land-forces accident-message
  232. ; 50 [ sea river ] S accident
  233. ;"is lost in a storm" S accident-message
  234.  
  235. (set side-library '(
  236.   ((noun "Numenorean") (class "good"))
  237.   ((noun "Dunadan") (class "good"))
  238.   ((noun "Ranger") (class "good"))    
  239.   ((noun "Corsair") (class "evil"))
  240.   ((noun "Gondorian") (class "good"))
  241.   ((noun "Rhovanian"))    
  242.   ((noun "Arnorian") (class "good"))
  243.   ((noun "Rohirrim") (class "good"))
  244.   ((noun "Lindonian"))    
  245.   ((noun "Southron"))
  246.   ((noun "Easterling"))
  247.   ((noun "Mordorian") (class "evil"))    
  248.   ((noun "Sindar") (class "good"))
  249.   ((noun "Breelander"))
  250.   ((noun "Variag"))        
  251.   ((noun "Haradrim") (class "evil"))    
  252. ))
  253.  
  254. (game-module (notes
  255.  "This period tries to reproduce Tolkien's Middle Earth."
  256.  "Orcs, Wizards, Dragons and RINGS are not implemented (due to lack of ideas)."
  257.  ""
  258.  "Please send comments, suggestions, fixes, and nicer bitmaps to the author:"
  259.  "Massimo Campostrini (campo@sunthpi1.difi.unipi.it)"
  260.  "Dipartimento di Fisica,  Piazza Torricelli 2,"
  261.  "I-56126 Pisa,  Italy"
  262. ))
  263.  
  264. (add hobbit notes (
  265.   "Easily produced, hobbits are good explorers but not very good"
  266.   "fighters."
  267. ))
  268.  
  269. (add dwarf notes (
  270.   "Dwarves are irreplaceable in digging, running and conquering mines."
  271. ))
  272.  
  273. (add elf notes (
  274.   "Good and fast explorers, elven can swim across rivers."
  275. ))
  276.  
  277. (add man notes (
  278.   "Men are the solid core of armies."
  279. ))
  280.  
  281. (add rider notes (
  282.   "The fast-moving riders can explore and fight (best used for"
  283.   "shock-effect)."
  284. ))
  285.  
  286. (add ship notes (
  287.   "Ships can quickly carry land forces across water and along rivers,"
  288.   "but are no good for fighting (except by themselves)."
  289. ))
  290.  
  291. (add troll notes (
  292.   "Trolls are powerful but cumbersome units, and cannot cross plains"
  293.   "or embark in ships."
  294. ))
  295.  
  296. (add nazgul notes (
  297.   "Ringwraiths or Nazguls are evil creatures moving very quickly upon"
  298.   "winged steeds.  They are superb fighters, but very vulnerable to hobbits!"
  299. ))
  300.  
  301. (add bridges notes (
  302.   "Very useful to cross rivers."
  303. ))
  304.  
  305. (add mine notes (
  306.   "Gold is obtained in quantity only in mines.  A lot of gold is needed"
  307.   "to produce trolls and nazguls.  Therefore try to build or capture mines." 
  308. ))
  309.  
  310. (add village notes (
  311.   "Small population center."
  312. ))
  313.  
  314. (add town notes (
  315.   "Larger population center."
  316. ))
  317.