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

  1. (game-module "panzer"
  2.   (title "Panzer")
  3.   (blurb "WW II, the Eastern Front")
  4.   (variants
  5.    (see-all true)
  6.    (world-size 80 40)
  7.    ("One-Minute Turns" one-minute-turns (set real-time-per-turn 60))
  8.    ("Capture the Town" capture-the-town
  9.     (add town start-with 1)
  10.     (add u* point-value 0)
  11.     (add town point-value 1)
  12.     )
  13.    ("Minefields" minefields
  14.     ;; if this is enabled, the AI gets confused...
  15.     (table independent-density
  16.       (minefield clear 500)
  17.       (minefield woods 100)
  18.       )
  19.     )
  20.    )
  21. )
  22.  
  23. (terrain-type water (color "sky blue") (image-name "water") (char ".")
  24.   (help ""))
  25. (terrain-type swamp (color "yellow green") (char "=")
  26.   (help ""))
  27. (terrain-type gully (color "sienna") (char "&")  ; require explicit icon?
  28.   (help ""))
  29. (terrain-type woods (color "green") (image-name "forest") (char "%")
  30.   (help ""))
  31. (terrain-type slope (color "goldenrod") (char "/")
  32.   (help ""))
  33. (terrain-type clear (color "khaki") (char "+")
  34.   (help ""))
  35. (terrain-type thick-forest (color "forest green") (image-name "forest")
  36.   (subtype border)
  37.   (help "impassable to both wheeled and tracked vehicles"))
  38. (terrain-type stream (color "blue") (image-name "water")
  39.   (subtype connection) (subtype-x river-x)
  40.   (help ""))
  41. (terrain-type road (color "gray")
  42.   (subtype connection) (subtype-x road-x)
  43.   (help ""))
  44.  
  45. (add (water swamp) liquid true)
  46.  
  47. (define cell-t* (water swamp gully woods slope clear))
  48.  
  49. ;;; Ground is what doesn't require swimming.
  50.  
  51. (define ground (swamp gully clear woods slope))
  52.  
  53. ;;; Vehicles require solid ground.
  54.  
  55. (define solid (gully clear woods slope))
  56.  
  57. ;;; Wheeled vehicles can't deal with woods.
  58.  
  59. (define drivable (gully clear slope))
  60.  
  61. (add t* elevation-min 100)
  62. (add t* elevation-max 300)
  63.  
  64. (add clear river-chance 5.00)
  65.  
  66. ;;; Definitions of all the unit types.
  67.  
  68. ;;; Random gen should do these in clumps?
  69. (unit-type town (image-name "town20"))
  70. (unit-type block)
  71. (unit-type minefield)
  72. (unit-type cmdpost (name "command post") (image-name "cmd-post")
  73.   (acp-per-turn 1))
  74.  
  75. (add (town block minefield) speed 0)
  76.  
  77. ;;; Russian unit types.
  78.  
  79. (unit-type rmg (name "MG")
  80.   (help "Russian 12.7mm machine gun"))
  81. (unit-type r45 (name "45mm AT")
  82.   (help "Russian 45mm anti-tank"))
  83. (unit-type r57 (name "57mm AT")
  84.   (help "Russian 45mm anti-tank"))
  85. (unit-type r76at (name "76.2mm AT")
  86.   (help "Russian 76.2mm anti-tank"))
  87. (unit-type r76h (name "76.2mm H")
  88.   (help "Russian 76.2mm howitzer"))
  89. (unit-type r122 (name "122mm AT")
  90.   (help "Russian 122mm anti-tank - has a long reach"))
  91. (unit-type r82m (name "82mm M (Mot)")
  92.   (help "Russian motorized 82mm mortar"))
  93. (unit-type r82 (name "82mm M")
  94.   (help "Russian 82mm mortar"))
  95. (unit-type r120 (name "120mm M")
  96.   (help "Russian 120mm mortar - a powerful long-range hitter"))
  97.  
  98. (define r-arty (rmg r45 r57 r76at r76h r122 r82m r82 r120))
  99.  
  100. (add (r45 r57 r76at r122) image-name "pz-at")
  101. (add rmg image-name "pz-flak")
  102. (add r76h image-name "pz-how")
  103. (add (r82 r82m r120) image-name "pz-mortar")
  104.  
  105. (add r-arty acp-per-turn 1)
  106. (add r-arty speed 0)
  107. (add (r82m r82) speed 200)
  108.  
  109. (add r-arty acp-to-fire 1)
  110.  
  111. (add r-arty range ( 6  3  4  5 10 20 12 12 20))
  112.  
  113. (unit-type rengrs (name "engineers(r)") (image-name "engineers"))
  114. (unit-type rrecon (name "recon(r)") (image-name "inf-cpy"))
  115. (unit-type rrifle (name "rifle(r)") (image-name "inf-cpy"))
  116. (unit-type rguard (name "guards(r)") (image-name "inf-cpy"))
  117. (unit-type rsmg (name "submachinegun(r)") (image-name "inf-cpy"))
  118.  
  119. (define r-inf (rengrs rrecon rrifle rguard rsmg))
  120.  
  121. (add r-inf acp-per-turn 2)
  122.  
  123. (unit-type rcav (name "cavalry") (image-name "cavalry")
  124.   (acp-per-turn 6))
  125.  
  126. (unit-type rwag (name "wagon(r)"))
  127. (unit-type rtruck (name "truck(r)"))
  128. (unit-type rhalf (name "halftrack(r)"))
  129.  
  130. (define r-transport (rwag rtruck rhalf))
  131.  
  132. (add r-transport acp-per-turn (6 24 20))
  133.  
  134. (unit-type su-152 (name "SU-152") (image-name "su-152"))
  135. (unit-type su-76 (name "SU-76") (image-name "su-76"))
  136. (unit-type su-85 (name "SU-85") (image-name "su-85"))
  137. (unit-type su-100 (name "SU-100") (image-name "su-100"))
  138. (unit-type jsu-122 (name "JSU-122") (image-name "jsu-122"))
  139.  
  140. (define r-td (su-152 su-76 su-85 su-100 jsu-122))
  141.  
  142. (add r-td acp-per-turn (14 18 22 16 14))
  143. (add r-td acp-min (-14 -18 -22 -16 -14))
  144.  
  145. (add r-td acp-to-fire  (14 18 22 16 14))
  146. (add r-td range        (10  5  8  8 10))
  147.  
  148. (unit-type kv85 (name "KV85") (image-name "kv85")
  149.   (help "Early heavy tank"))
  150. (unit-type t34 (name "T-34c") (image-name "t-34c")
  151.   (help "The most common type of Russian tank"))
  152. (unit-type t34/85 (name "T-34/85") (image-name "t-34-85")
  153.   (help "A better T-34"))
  154. (unit-type js2 (name "JS II") (image-name "js-2")
  155.   (help "Heaviest Russian tank, but slow"))
  156.  
  157. (define r-tank (kv85 t34 t34/85 js2))
  158.  
  159. (add r-tank acp-per-turn (20 22 22 16))
  160. (add r-tank acp-min (-20 -22 -22 -16))
  161.  
  162. (add r-tank acp-to-fire  (20 22 22 16))
  163. (add r-tank range        ( 8  6  8  8))
  164.  
  165. (define r-wheeled (rwag rtruck))
  166.  
  167. (define r-tracked (append rhalf r-td r-tank))
  168.  
  169. (define r-vehicle (append r-wheeled r-tracked))
  170.  
  171. (define r-armored (append rhalf r-td r-tank))
  172.  
  173. (define russian (append r-arty r-inf rcav r-transport r-td r-tank))
  174.  
  175. (add russian possible-sides "russian")
  176.  
  177. ;;; German unit types.
  178.  
  179. (unit-type g50 (name "50mm AT")
  180.   (help ""))
  181. (unit-type g75 (name "75mm AT")
  182.   (help ""))
  183. (unit-type g88 (name "88mm AT")
  184.   (help "German 88mm anti-tank"))
  185. (unit-type g20 (name "20mm F")
  186.   (help "German 20mm flak"))
  187. (unit-type g20q (name "20mmQUAD")
  188.   (help "German 20mm quad flak"))
  189. (unit-type g75h (name "75mm H")
  190.   (help ""))
  191. (unit-type g150 (name "150mm H")
  192.   (help "German 150mm howitzer - hard-hitting but shortish range"))
  193. (unit-type g81 (name "81mm M")
  194.   (help ""))
  195. (unit-type g120 (name "120mm M(g)")
  196.   (help ""))
  197.  
  198. (define g-arty (g50 g75 g88 g20 g20q g75h g150 g81 g120))
  199.  
  200. (add (g50 g75 g88) image-name "pz-at")
  201. (add (g75h g150) image-name "pz-how")
  202. (add (g20 g20q) image-name "pz-flak")
  203. (add (g81 g120) image-name "pz-mortar")
  204.  
  205. (add g-arty acp-per-turn 1)
  206. (add g-arty speed 0)
  207.  
  208. (add g-arty acp-to-fire 1)
  209. (add g-arty range ( 5  6 20 10 10 12 12 12 20))
  210.  
  211. (unit-type gengrs (name "engineers(g)") (image-name "engineers"))
  212. (unit-type gsec (name "security(g)") (image-name "inf-plt"))
  213. (unit-type grifle (name "rifle(g)") (image-name "inf-plt"))
  214. (unit-type gsmg (name "submachinegun(g)") (image-name "inf-plt"))
  215.  
  216. (define g-inf (gengrs gsec grifle gsmg))
  217.  
  218. (add g-inf acp-per-turn 2)
  219.  
  220. (unit-type gwag (name "wagon(g)"))
  221. (unit-type gtruck (name "truck(g)"))
  222. (unit-type ghalf (name "halftrack(g)"))
  223.  
  224. (define g-transport (gwag gtruck ghalf))
  225.  
  226. (add (rwag gwag) image-name "wagon")
  227. (add (rtruck gtruck) image-name "truck")
  228. (add (rhalf ghalf) image-name "halftrack")
  229.  
  230. (add g-transport acp-per-turn (6 24 20))
  231.  
  232. (unit-type sdkfz/1 (name "SdKfz 234/1") (image-name "sdkfz-234-1")
  233.   (help "Weak, but fastest unit in the game"))
  234. (unit-type puma (name "Puma"))
  235. (unit-type sdkfz/4 (name "SdKfz 234/4") (image-name "sdkfz-234-4"))
  236.  
  237. (define g-car (sdkfz/1 puma sdkfz/4))
  238.  
  239. (add g-car acp-per-turn (32 28 28))
  240. (add g-car acp-min (-32 -28 -28))
  241.  
  242. (add g-car acp-to-fire  (32 28 28))
  243. (add g-car range        ( 2  6 13))
  244.  
  245. (unit-type maultier (name "Maultier")
  246.   (help "Second-deadliest in the game, but very vulnerable"))
  247. (unit-type wespe (name "Wespe")
  248.   (help "Longest range in the game, but vulnerable"))
  249. (unit-type hummel (name "Hummel")
  250.   (help "Deadliest unit in the game, but vulnerable"))
  251.  
  252. (define g-spa (maultier wespe hummel))
  253.  
  254. (add g-spa acp-per-turn (20 16 16))
  255. (add g-spa acp-min (-20 -16 -16))
  256.  
  257. (add g-spa acp-to-fire  (20 16 16))
  258. (add g-spa range        (12 32 24))
  259.  
  260. (unit-type gw38 (name "Gw 38"))
  261. (unit-type wirbelwind (name "Wirbelwind"))
  262. (unit-type stuh42 (name "Stu H 42"))
  263. (unit-type marder3 (name "Marder III"))
  264. (unit-type stug3 (name "StuG III"))
  265. (unit-type hetzer (name "Hetzer"))
  266. (unit-type nashorn (name "Nashorn")
  267.   (help "Longer-range TD"))
  268. (unit-type jgdpz4 (name "Jgd Pz IV"))
  269. (unit-type jgdpz5 (name "Jgd Pz V"))
  270. (unit-type jgdpz6 (name "Jgd Pz VI"))
  271.  
  272. (define ww wirbelwind)
  273.  
  274. (define g-td (gw38 ww stuh42 marder3 stug3 hetzer nashorn jgdpz4 jgdpz5 jgdpz6))
  275.  
  276. (add g-td acp-per-turn (12 16 16 16 16 12 16 16 18 10))
  277. (add g-td acp-min (-12 -16 -16 -16 -16 -12 -16 -16 -18 -10))
  278.  
  279. (add g-td acp-to-fire  (12 16 16 16 16 12 16 16 18 10))
  280. (add g-td range        (12 10 12  8  8  8 20 12 12 12))
  281.  
  282. (unit-type lynx (name "Lynx")
  283.   (help "Weak but speedy"))
  284. (unit-type pz4 (name "PzKpfw IV") (image-name "pz-4")
  285.   (help "Most common type of Panzer"))
  286. (unit-type panther (name "Panther")
  287.   (help "All-around best tank"))
  288. (unit-type tiger1 (name "Tiger I") (image-name "tiger-1")
  289.   (help "Powerful but slow tank"))
  290. (unit-type tiger2 (name "Tiger II") (image-name "tiger-2"))
  291.  
  292. (define g-tank (lynx pz4 panther tiger1 tiger2))
  293.  
  294. (add g-tank acp-per-turn (20 16 20 16 12))
  295. (add g-tank acp-min (-20 -16 -20 -16 -12))
  296.  
  297. (add g-tank acp-to-fire  (20 16 20 16 12))
  298. (add g-tank range        ( 4  8 12 10 12))
  299.  
  300. (define g-wheeled (append gwag gtruck g-car))
  301.  
  302. (define g-tracked (append ghalf g-spa g-td g-tank))
  303.  
  304. (define g-vehicle (append g-wheeled g-tracked))
  305.  
  306. (define g-armored (append ghalf g-car g-spa g-td g-tank))
  307.  
  308. (define german (append g-arty g-inf g-transport g-car g-spa g-td g-tank))
  309.  
  310. (add german possible-sides "german")
  311.  
  312. ;;; Non-side-specific type lists.
  313.  
  314. (define engrs (rengrs gengrs))
  315.  
  316. (define wheeled (append r-wheeled g-wheeled))
  317.  
  318. (define tracked (append r-tracked g-tracked))
  319.  
  320. (define vehicle (append r-vehicle g-vehicle))
  321.  
  322. (define armored (append r-armored g-armored))
  323.  
  324. ;;; What happens to tanks that get wrecked.
  325.  
  326. (unit-type wreck (acp-per-turn 0))
  327.  
  328. ;;; Wrecks don't belong to either side.
  329.  
  330. (add wreck possible-sides "independent")
  331.  
  332. ;; This should be the end of type definitions.
  333.  
  334. ;;; Static relationships.
  335.  
  336. (table vanishes-on
  337.   (u* water true)
  338.   (vehicle swamp true)
  339.   )
  340.  
  341. ;; Russian units are larger than German units, so we can only stack two in a hex
  342. ;; instead of three.
  343.  
  344. (add ground capacity 6)
  345.  
  346. (table unit-size-in-terrain
  347.   (russian solid 3)
  348.   (german solid 2)
  349.   ((block town) ground 6)  ; towns and blocks fill entire hex
  350.   )
  351.  
  352. ;;; Trucks, tanks, etc can carry one infantry or artillery unit.
  353.  
  354. (add town capacity 6)
  355. (add vehicle capacity 1)
  356.  
  357. (table unit-size-as-occupant
  358.   (u* u* 2)  ; can't be occupants usually
  359.   (r-arty r-vehicle 1)
  360.   (r-inf r-vehicle 1)
  361.   (g-arty g-vehicle 1)
  362.   (g-inf g-vehicle 1)
  363.   (r-vehicle town 3)
  364.   (g-vehicle town 2)
  365. )
  366.  
  367. ;;; Movement parameters.
  368.  
  369. (table mp-to-enter-terrain
  370.   (u* t* 1)
  371.   (u* slope 2)
  372.   (u* road 0)
  373.   (u* water 99)
  374.   (vehicle swamp 99)
  375.   )
  376.  
  377. (table mp-to-leave-terrain
  378.   (u* t* 1)
  379.   (wheeled gully 20)
  380.   (tracked gully 3)
  381.   (u* road 0)
  382.   )
  383.  
  384. (table mp-to-traverse
  385.   (u* road 1)
  386.   )
  387.  
  388. (table mp-to-enter-zoc
  389.   (u* u* -1)
  390.   (u* wreck 10)
  391. ;  (u* minefield 20)
  392.   )
  393.  
  394. ;;; Need high cost of entry, takes entire turn, including transport's acp.
  395.  
  396. ;;; Combat parameters.
  397.  
  398. (table acp-to-attack
  399.   (u* u* 2) ; for now
  400.   )
  401.  
  402. (table acp-to-defend
  403.   (u* u* 2) ; for now
  404.   )
  405.  
  406. ;; In general, hp of 2 is healthy, 1 is crippled, 0 is dead or disappeared.
  407. ;; However, armored equipment can absorb more punishment.
  408.  
  409. (add u* hp-max 2)
  410. (add town hp-max 30)
  411. (add minefield hp-max 1)
  412. (add armored hp-max 4)
  413.  
  414. (table hit-chance
  415.   ;; By default, don't allow combat.
  416.   (u* u* 0)
  417.   ;; Minefields almost always hit.
  418.   (minefield u* 90)
  419.   (minefield engrs 0)
  420.   (r-arty u* 100)
  421.   (r-inf  u* 100)
  422.   (r-inf  g-armored 50)
  423.   (r-td   u* 100)
  424.   (r-tank u* 100)
  425.   (r-tank g-inf (50 40 50 60))
  426.   (g-arty u* 100)
  427.   (g-inf  u* 100)
  428.   (g-inf  r-tank 10)
  429.   (g-car  u*  70)
  430.   (g-spa  u* 100)
  431.   (g-td   u* 100)
  432.   (g-td r-inf 50)
  433.   (g-tank u* 100)
  434.   (g-tank r-inf 60)
  435.   ;; Nobody can do anything to a burning wreck.
  436.   (u* wreck 0)
  437.   ;; Only engineers can clear minefields.
  438.   (u* minefield 0)
  439.   (engrs minefield 20)
  440.   )
  441.  
  442. (table damage
  443.   (u* u* 0)
  444.   (minefield u* 1)
  445.   (r-arty u* 1)
  446.   (r-inf  u* 1)
  447.   ((rcav rhalf) u* 1)
  448.   (r-td   u* 2)
  449.   (su-152 u* 2)
  450.   (r-tank u* 1)
  451.   (g-arty u* 1)
  452.   (g-inf  u* 1)
  453.   (g-car  u* 1)
  454.   (g-spa  u* 1)
  455.   (g-spa  r-inf 1d2+1)
  456.   (wespe  u* 1d2+2)
  457.   (hummel u* 2d2+2)
  458.   (g-td   u* 1)
  459.   (g-tank u* 1)
  460.   ;; Heavy tanks are more deadly when they connect
  461.   ((js2 tiger1 tiger2) u* 2)
  462.   ;; Nobody can do anything to a burning wreck.
  463.   (u* wreck 0)
  464.   ;; Only engineers can clear minefields.
  465.   (u* minefield 0)
  466.   (engrs minefield 1)
  467.   )
  468.  
  469. ;;; Units eventually bounce back.
  470.  
  471. (add u* hp-recovery 0.50)
  472.  
  473. ;;; Wrecked armored vehicles continue to be obstacles.
  474.  
  475. (add armored wrecked-type wreck)
  476.  
  477. ;;; Towns are easy to capture, that's why they should be protected.
  478.  
  479. (table capture-chance
  480.   (u* town 100)
  481.   )
  482.  
  483. ;; Minefields clobber any unit trying to pass over them.
  484.  
  485. (add minefield acp-to-detonate 1)
  486.  
  487. (add minefield hp-per-detonation 0)
  488.  
  489. (table detonation-damage-at (minefield u* 1))
  490.  
  491. ;;; Visibility parameters.
  492.  
  493. (add u* vision-range 8)
  494.  
  495. ;(add wespe vision-range 32)
  496.  
  497. ;;; All games will have exactly one Russian and one German side.
  498.  
  499. (set side-library '(
  500.   ((name "Russia") (noun "Russian") (adjective "Russian") (class "russian")
  501.    (color-scheme "red") (emblem-name "soviet-star") (names-locked true))
  502.   ((name "Germany") (noun "German") (adjective "German") (class "german")
  503.    (color-scheme "gray") (emblem-name "german-cross") (names-locked true))
  504.   ))
  505.  
  506. (set sides-min 2)
  507. (set sides-max 2)
  508.  
  509. ;;; The following sets up a simple game for testing;
  510. ;;; usually this module should be used in a well-defined scenario.
  511.  
  512. (set alt-blob-height 1000)
  513. (set alt-blob-size 100)
  514. (set alt-smoothing 10)
  515.  
  516. (add cell-t* alt-percentile-min (  0   5  10  20  90   5))
  517. (add cell-t* alt-percentile-max (  5  10  15  80 100 100))
  518. (add cell-t* wet-percentile-min (  0  50   0  90   0   0))
  519. (add cell-t* wet-percentile-max (100 100  50 100 100 100))
  520.  
  521. (set edge-terrain clear)
  522.  
  523. ;;; This is sort of a "sampler" OB, not particularly realistic.
  524.  
  525. (add (g75 r76at) start-with 2)
  526.  
  527. (add (g150 r122) start-with 1)
  528.  
  529. (add rrifle start-with 4)
  530.  
  531. (add grifle start-with 4)
  532.  
  533. (add (t34 su-76 su-85 su-152) start-with (8 2 2 2))
  534.  
  535. (add (pz4 panther tiger1 wespe hummel) start-with (4 2 1 1 1))
  536.  
  537. (set country-radius-min 5)
  538.  
  539. (set country-separation-min 25)
  540. (set country-separation-max 30)
  541.  
  542. (table road-chance
  543.   (town town 100)
  544.   )
  545.  
  546. (table road-into-chance
  547.   (t* t* 100)
  548.   (t* gully 20)
  549.   (gully t* 20)
  550.   (t* water 10)
  551.   (water water 0)
  552.   )
  553.  
  554. (add u* point-value 1)
  555.  
  556. (scorekeeper (do last-side-wins))
  557.  
  558. (game-module (instructions "Move fast or die!"))
  559.  
  560. (game-module (design-notes (
  561.   "make shooting be LOS for armor, specify alts for artillery."
  562.   )))
  563.  
  564.