This is the mail archive of the xconq7@sources.redhat.com mailing list for the Xconq project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

empire.g


on 1/1/01 11:20 PM, Stan Shebs at shebs@shebs.cnchost.com wrote:

> Ari Rabkin wrote:
>> 
>> Once upon a time, I actually did some modification and coding on
>> empire.g
>> I was somewhat satisfied with the result, though YMMV.
>> I could email it to anyone who's interested.
> 
> Well, sure, post it to the list!  I think a number of people would
> be interested!

here goes...be warned, it's kinda long
this was for my own use, so some comments are perhaps unclear.  anyone who
wants can email me for clarification

----

(game-module "nempire"
  (title "New Empire")
  (version 4.2b)
  (blurb "Ari's Empire hack/improvement")
  (variants
  
   (world-seen false)
   
   (see-all false)
   
    (world-size (90 45 360))
    
   ("Last Side Wins" one-winner true
      (true
      (scorekeeper (do last-side-wins))
      ))
            
   ("More Starting Units" more-starters true
     (true
      (add harbor start-with 1)
      ))
   )
  )

(include "nat-names")

;Plans                       Fixme!!
#|
VERIFY
;fix trans planes
;let droids be in spacetrans?
;droids &food???  
;rethink droids entirely??
;let droids, etc. hit buildings (can they?)
;fix sh/gun handling&production; forts  (lower storage @ warehouses?)

;nukes--MIRVs!

tp crossover:  [mech,mot]inf/tank

FIX TECH CENTERS (sats)?

terrain?!
Trains on roads/rails (only)

ammo m-type (use shells?)


    It Would Be Nice If:

carrier-bombers?
hover-ferries on land?
rewrite disbanding?
extend light-bomber range?
less food on short-range ships (eg. destroyers, tpts) ?
make missile frigates cheaper, bigger diff 'tween them and m-cruisers?
(firing range?)

combat table status:

to>> LASN 
   L 2122
   A 2222
   S 1111
   N 1222

L=land
A=air
S=space
N=navy
2=done, 
1=done, but could be better

|#




(unit-type spysat (image-name "spysat") (hp-max 1) (acp-per-turn 1))
(unit-type SDI-sat (image-name "death-star") (hp-max 1) (acp-per-turn 1))
(unit-type sat-killer (image-name "landmine") (hp-max 1) (acp-per-turn 1))
(unit-type launcher (image-name "v2") (hp-max 2) (acp-per-turn 16))
(unit-type space-battleship (image-name "imperial-cruiser") (hp-max 5)
(acp-per-turn 16))
(unit-type space-transport (image-name "gxy-st") (hp-max 3) (acp-per-turn
16)
    (help "a space transport"))


(define sat-types (spysat SDI-sat sat-killer))
(define space-types (spysat SDI-sat sat-killer launcher space-battleship
space-transport))
(define space-ship-types (space-battleship space-transport launcher))

  
(unit-type battledroid (hp-max 3) (acp-per-turn 4) (image-name "mech-2")
  (help "self-motivated weapon")
  (notes (
  "The battledroid is a heavily armed robot whose sophisticated programming"
  "allows it to kill all armed opponents without harming civilians."
  "Battledroids refuse to attack phalanxes, due to a software bug.")))
  
(unit-type bolo (hp-max 5)  (acp-per-turn 3) (image-name "ogre-2")
  (help "heavy tank with massive computers")
  (notes (
  "Bolos are basically heavy tanks with a greater degree of computer
control"
  )))


(define tech-types (append space-types bolo battledroid ))
(define land-tech-types (bolo battledroid ))



(unit-type infantry (image-name "soldiers-c") (hp-max 2))
(unit-type motor-infantry (image-name "truck") (hp-max 2))
(unit-type mech-infantry (image-name "halftrack") (hp-max 3))
(unit-type marines (image-name "soldier-acw") (hp-max 3))
(unit-type security (image-name "police") (hp-max 1))
(unit-type cavalry (image-name "tank") (hp-max 4) (help "armored cavalry,
that is"))
(unit-type light-armor (image-name "hetzer") (hp-max 3))
(unit-type armor (image-name "pz-4") (hp-max 4))
(unit-type heavy-armor (image-name "tiger-1") (hp-max 5))
(unit-type artillery (image-name "marder3") (hp-max 2) (help "The M-109 of
the year 4500"))
(unit-type light-artillery (image-name "field-gun") (hp-max 1) (help "light,
towed guns"))
(unit-type heavy-artillery (image-name "howitzer") (hp-max 2) (help "lots of
firepower, but slow"))
(unit-type rocket-artillery (image-name "maultier") (hp-max 2) (help "think
MLRS-2000"))
(unit-type aa (image-name "flak") (hp-max 2))
(unit-type supply (image-name "cart") (hp-max 1))
(unit-type engineers (image-name "worker") (hp-max 1))
(unit-type mech-engineers (image-name "tractor") (hp-max 2))
(unit-type mobile-radar (image-name "radar") (hp-max 1))

(define infantry-types (infantry motor-infantry mech-infantry marines
security))

(define armor-types (cavalry light-armor armor heavy-armor))

(define artillery-types (artillery light-artillery heavy-artillery
rocket-artillery aa))

(define heavy-types (mech-infantry armor artillery rocket-artillery supply
mech-engineers))
(define v-heavy-types (heavy-artillery heavy-armor bolo))

(define engineer-types (engineers mech-engineers))

(define land-types
  (append infantry-types armor-types artillery-types
   supply engineers mech-engineers mobile-radar battledroid  bolo
   ))

(add infantry-types acp-per-turn (2 3 3 2 2))
(add armor-types acp-per-turn (4 4 3 3))
(add artillery-types acp-per-turn (3 3 2 3 3))
(add engineer-types acp-per-turn (2 3))
(add mobile-radar acp-per-turn 2)
(add supply acp-per-turn 2)

(unit-type fishing-boat (image-name "ap") (hp-max 1) (help"fishing boats"))

(unit-type cargo-ship (image-name "cargo-ship") (hp-max 2) (help"big
freighters"))
(unit-type tanker (image-name "cargo-ship") (hp-max 1) (help"big slow
targets"))
(unit-type ore-ship (image-name "cargo-ship") (hp-max 2) (help"iron ore
carriers"))
(unit-type hover-ferry (image-name "ap") (hp-max 1) (help"a
hovercraft-transport"))
(unit-type troop-transport (image-name "ap") (hp-max 2) (help"former
oceanliners"))
(unit-type landing-craft (image-name "pt") (hp-max 1) (help"can make it to
the beach"))

(unit-type torpedo-boat (image-name "small-ship") (hp-max 1) (help "cheap
anti-surface craft"))
(unit-type destroyer (image-name "dd-c") (hp-max 3) (help"AAW/ASW craft"))
(unit-type frigate (image-name "dd-sims") (hp-max 2) (help"mini
destroyers"))
(unit-type light-cruiser (image-name "ca-myoko") (hp-max 5) (help"anti
surface craft"))
(unit-type heavy-cruiser (image-name "ca") (hp-max 7) (help"major guns"))
(unit-type battleship (image-name "bb-c") (hp-max 12) (help"monster guns"))

(unit-type light-carrier (image-name "cv-zuikaku") (hp-max 5) (help "micro
flatops"))
(unit-type escort-carrier (image-name "cve-shoho") (hp-max 3) (help "asw
craft--shoddily built"))
(unit-type carrier (image-name "cv") (hp-max 8) (help"the big
supercarriers"))
(unit-type missile-frigate (image-name "ca-myoko") (hp-max 2) (help"packed
with missiles"))
(unit-type missile-cruiser (image-name "cruiser") (hp-max 4) (help"even more
missiles"))
(unit-type missile-submarine (image-name "isub") (hp-max 3) (help"the large
boomers"))
(unit-type submarine (image-name "sub") (hp-max 3) (help"the prowler of the
seas"))
(unit-type asw-cruiser (image-name "bb-qe") (hp-max 4) (help "medium-sized
vessel designed to kill subs"))
(unit-type minesweeper (image-name "pt") (hp-max 1) (help"clear those pesky
mines"))

(define production-ship-types (fishing-boat))

(define material-transport-ship-types (cargo-ship tanker ore-ship))
(define transport-ship-types (troop-transport landing-craft hover-ferry))


(define unarmed-ship-types (append production-ship-types
material-transport-ship-types transport-ship-types))
    ;fishing-boat cargo-ship tanker ore-ship transport landing-craft
hover-ferry


(define surface-combat-ship-types
  (torpedo-boat destroyer frigate light-cruiser heavy-cruiser battleship))

(define carrier-ship-types
    (light-carrier escort-carrier carrier))

(define cruiser-ship-types
    (asw-cruiser heavy-cruiser light-cruiser missile-cruiser))
    
(define air-combat-ship-types
  (light-carrier escort-carrier carrier missile-frigate missile-cruiser))

(define combat-ship-types (append surface-combat-ship-types
air-combat-ship-types missile-submarine
   submarine asw-cruiser minesweeper))

(define sub-types (submarine missile-submarine))

(define ship-types
  (append production-ship-types material-transport-ship-types
   transport-ship-types surface-combat-ship-types air-combat-ship-types
missile-submarine
   submarine asw-cruiser minesweeper
   ))

(add ship-types acp-per-turn 4)

(add material-transport-ship-types acp-per-turn 3)
(add transport-ship-types acp-per-turn (3 2 6))
(add surface-combat-ship-types acp-per-turn (5 5 4 4 4 4))
(add air-combat-ship-types acp-per-turn 4)
(add sub-types acp-per-turn 3)
(add minesweeper acp-per-turn 3)

(unit-type fighter-1 (image-name "space-fighter") (help "short range
fighters"))
(unit-type fighter-2 (image-name "fighter-bomber") (help "longer range, less
firepower"))
(unit-type escort (image-name "stealth-bomber") (help "are also interceptors
(but not ground support)"))
(unit-type naval-fighter (image-name "stealth-bomber-2") (help "carrier
fighters"))
(unit-type light-bomber (image-name "4e-c") (help "ground support"))
(unit-type medium-bomber (image-name "bomber") (help "medium attack craft"))
(unit-type heavy-bomber (image-name "b-2") (help "intercontinental city
busters"))
(unit-type transport (image-name "cargo-plane") (help "over the hump"))
(unit-type attack-helicopter (image-name "helicopter") (help "tank
busters"))
(unit-type transport-helicopter (image-name "cargo-chopper") (help "good for
carrying light loads"))
(unit-type recon-plane (image-name "sr71") (help "find the enemy"))
(unit-type asw-plane (image-name "pby") (help "kill subs"))
(unit-type missile (image-name "missile") (help "little rockets"))
(unit-type icbm (image-name "icbm") (help "the big rockets"))
(unit-type sam (image-name "sam") (help "anti-missile missiles"))
(unit-type abm (image-name "missile-2") (help "no nukes here!"))

(define fighter-types (fighter-1 fighter-2 escort naval-fighter))

(define bomber-types (light-bomber medium-bomber heavy-bomber))

(define helicopter-types (attack-helicopter transport-helicopter))

(define missile-types (missile icbm sam abm))

(define air-types
  (append fighter-types
   bomber-types
   transport
   helicopter-types
   recon-plane 
    asw-plane
   missile-types
   ))

(define plane-types
(append fighter-types
   bomber-types
   transport
   helicopter-types
   recon-plane 
    asw-plane
))

(define movers (append air-types land-types ship-types tech-types))
(define transport-types (append transport-ship-types transport
transport-helicopter))

;; These are twice the plane's "range".

(add air-types acp-per-turn 16)

(add helicopter-types acp-per-turn (10 8))
(add recon-plane acp-per-turn 25)
(add asw-plane acp-per-turn 8)
(add transport acp-per-turn 8)

(add bomber-types acp-per-turn (12 24 20))


(add missile-types acp-per-turn (8 30 8 30))

(unit-type small-nuke (image-name "bomb-c") (hp-max 1) (help "under 100
kilotons"))
(unit-type medium-nuke (image-name "bomb-c") (hp-max 1) (help "100 kilotons
to 3 megatons"))
(unit-type large-nuke (image-name "bomb-c") (hp-max 1) (help "above 3
megatons"))

(define nuke-types (small-nuke medium-nuke large-nuke))

(add nuke-types acp-per-turn 5)


(unit-type radar (image-name "radar") (char ")")  (hp-max 10)
  (help "fixed radar station - has a long-range view"))
(unit-type mines (image-name "minefield") (hp-max 2)
  (help "useful for blocking land and sea passages"))

(define inert-types mines)

(add inert-types acp-per-turn 0)

(unit-type agribusiness (image-name "barn") (char "a"))
(unit-type mine (image-name "iron-mine") (char "m"))
(unit-type gold-mine (image-name "gold-mine") (char "g"))
(unit-type uranium-mine (image-name "uranium-mine") (char "u"))

(unit-type technical-center (image-name "facility") (char "t"))
(unit-type fortress  (image-name "fort") (char "f"))
(unit-type research-lab (image-name "facility") (char "r"))
(unit-type nuclear-plant (image-name "village") (char "n"))
(unit-type library/school (image-name "facility") (char "l"))
(unit-type enlistment (image-name "facility") (char "e"))
(unit-type headquarters (image-name "corps-hq") (char "!"))

(unit-type harbor (image-name "anchor") (char "h"))
(unit-type airfield (image-name "airbase") (char "*"))
(unit-type refinery (image-name "refinery") (char "%"))
(unit-type lcm-factory (image-name "facility") (char "j"))
(unit-type hcm-factory (image-name "facility") (char "k"))
(unit-type defense-plant (image-name "facility") (char "d"))
(unit-type shell-industry (image-name "shell") (char "i"))
(unit-type warehouse (image-name "facility") (char "w"))
(unit-type missile-silo (image-name "silo") (help "a bomb base"))
(unit-type spaceport (image-name "saucerpad") (help "where the spacecraft
hang out"))

(unit-type bank (image-name "bank") (char "b"))

(define base-types (fortress harbor airfield missile-silo spaceport))

(define facility-types
  (radar agribusiness mine gold-mine uranium-mine
   bank
   technical-center fortress research-lab
   nuclear-plant
   library/school  enlistment radar
   headquarters harbor airfield
   missile-silo spaceport
   refinery lcm-factory hcm-factory defense-plant shell-industry warehouse))
 

;;; Most facilities only produce or store materials, have no use for acp.

(add facility-types acp-per-turn 0)

;;; These build units, however, and need acp to do so.

(add (nuclear-plant headquarters harbor airfield defense-plant spaceport
technical-center) acp-per-turn 1)

;;; Fortresses can engage in combat.

(add fortress acp-per-turn 1)

(unit-type capital (image-name "city20") (char "c")
  (help "center of the country") (acp-per-turn 2))
(unit-type town (image-name "town20") (char "T")
  (help "a medium-sized town") (acp-per-turn 0) (cp 30))
  
(define city-types (town capital))


(material-type food (char "f")
  (help "food"))
(material-type sh (char "s")
  (help "shells - ammunition for guns"))
(material-type gun (char "g")
  (help "guns"))
(material-type pet (char "p")
  (help "petroleum - refined oil, used as fuel"))
(material-type iron (char "i")
  (help "iron ore"))
(material-type gold (char "b")
  (help "gold - refined gold, in bars (represents generic money)"))
(material-type oil (char "o")
  (help "crude oil"))
(material-type lcm (char "l")
  (help "light construction materials"))
(material-type hcm (char "h")
  (help "heavy construction materials"))
(material-type rad (char "r")
  (help "rads - radioactive materials"))
(material-type education
  (help "a class of graduates"))
 
(material-type civ
  (help "civilians"))
(material-type mil
  (help "military"))

;(define raw (iron oil))
(define manufactures (food sh gun pet lcm hcm gold rad));should plutonium be
movable by werehouse?
(define peoples (civ mil))

(add peoples people 1)

(terrain-type sea (char "."))
(terrain-type settled (image-name "clear") (char "-"))
(terrain-type wilderness (image-name "forest") (char "-"))
(terrain-type mountains (char "^"))
(terrain-type wasteland (char "/") (image-name "khaki")
  (help "uninhabitable due to radioactivity"))
(terrain-type highway (image-name "road") (char "+")
  (subtype connection))

(define land-t* (settled wilderness mountains wasteland highway))

(set edge-terrain wasteland)

;;; Static relationships.

;; Unit vs unit.

(table unit-capacity-x
  ;; Engineers can be inside any facility.
  (facility-types engineer-types 1)
  (movers mobile-radar 1)
  (movers missile 1)
  (missile-submarine icbm 6)
  (combat-ship-types missile 3)
  (escort-carrier asw-plane 2)
  )

(add transport-ship-types capacity (6 2 3))
(add transport-helicopter capacity 2)
(add transport capacity 4)
(add carrier-ship-types capacity (4 2 8))
(add bomber-types capacity (1 3 9))
(add missile-types capacity (1 9 0 1));;ABMs can carry nukes
(add headquarters capacity 8)
(add harbor capacity 8)
(add missile-silo capacity 6)
(add airfield capacity 8)
(add nuclear-plant capacity 8)
(add launcher capacity 2)
(add space-battleship capacity 10)
(add space-transport capacity 4)
(add spaceport capacity 10)
(add technical-center capacity 10)
(add defense-plant capacity 10)
(add fortress capacity 8)
(add capital capacity 16)

(table unit-size-as-occupant
  (u* u* 100)
  
  (land-types transport-types 1)

  (heavy-types transport-types  2)
  (v-heavy-types transport-types 3)
  
  (land-types troop-transport 1)
  (landing-craft troop-transport 2)
    
  (sat-types (launcher spaceport) 1)
  (spysat icbm 9)
  
;spysat SDI-sat sat-killer launcher space-battleship space-transport
  
  (space-types spaceport (1 1 1 2 4 3 ))
  (missile-types spaceport 2)
  (nuke-types spaceport 1)
  
  ((recon-plane asw-plane naval-fighter light-bomber) carrier-ship-types 1)
  (helicopter-types carrier-ship-types 1)
  (medium-bomber carrier 6)  ; remember the doolitle raid?
  (land-types carrier-ship-types 4) ; operation "magic carpet"
  
  (air-types airfield 1)
  (land-types fortress 1)
  (ship-types harbor 1)
  (land-types headquarters 1)
  (missile-types missile-silo 1)
  ((bolo mobile-radar supply battledroid) defense-plant 1)
  ((append sat-types missile-types) technical-center 1)
  
  (small-nuke bomber-types 1)
  (medium-nuke bomber-types 3)
  (large-nuke bomber-types 9)
  (small-nuke missile-types 1)
  (medium-nuke missile-types 3)
  (large-nuke missile-types 9)
  
  ((icbm sam abm missile large-nuke medium-nuke small-nuke) space-battleship
(4 1 1 1 2 2 1))
  
  (nuke-types nuclear-plant 1)
  
  ;; The capital has a bit of room for anything.
  (u* capital 1)
  (capital capital 100)
  )

;; Unit vs terrain.

(table vanishes-on
  (land-types sea true)
  (ship-types land-t* true)
  ;; (allow radar and mines to be placed in the sea)
  (facility-types sea true)
  (capital sea true)
 (town sea true)
  ;; Units normally die in wasteland.
  (u* wasteland true)
  ;; Planes can fly over wasteland safely.
  (air-types wasteland false)
)

(add t* capacity 16)

(table unit-size-in-terrain
  (u* t* 1)
  ;; Only fill 13/16 of the cell, so mobile units can pass through, but
  ;; don't let multiple facilities be in a cell.
  (inert-types t* 13)
  (facility-types t* 13)
  (town t* 13)
  (air-types t* 0)
  (space-types t* 0)
  (capital t* 13)
  )

(table terrain-storage-x
  ;; Room for raw materials
  (t* iron 100)
  (t* rad 10)
  ;; Room for peoples
  (settled peoples 999)
  )


(table unit-storage-x
  (land-types food 10)
  (air-types food 2)
  (heavy-bomber food 3)
  (ship-types food 100)
  ((torpedo-boat landing-craft hover-ferry) food (6 6 14)); short-range
ships
  (battledroid food 0)
  (facility-types food 30)
  ((space-battleship space-transport) food (20 30))
  
  ;; Special-function ships.
  (fishing-boat food 200)
  (tanker pet 400) 
  (ore-ship iron 100)
  (cargo-ship (sh gun lcm hcm) 100)
  
  (facility-types civ 10)
  (shell-industry sh 50)
    (lcm-factory lcm 200)
  (hcm-factory  hcm 200)
  (library/school education 300)
  (bank gold 200)
  (gold-mine gold 200)
  (supply (pet food gun sh) (60 30 20 50))
  
  ;; Special-function facilities.
  (agribusiness food 150)
  ;; What a facilities need to have on hand to build stuff.
  (harbor (lcm hcm) 200)
  (airfield (lcm hcm) 200)
  (defense-plant (lcm hcm) 200)
  (technical-center (lcm hcm) 200)
  
  (nuclear-plant (education lcm hcm rad pet) 999)
  (uranium-mine rad 160)
  
  
  (spaceport rad 50)
  
  ;; Fuel capacities.
  (land-types pet 10)
  ((battledroid bolo) pet (15 30))
  (air-types pet 16)
  ((naval-fighter escort fighter-2) pet (24 32 24))
  (space-types pet 200)
  (transport pet 48)
  (recon-plane pet 50)
  (sat-types pet 4)        ;sats can't move very far
  (space-types rad 10)
  (recon-plane pet 50)
  (bomber-types pet (24 48 60))
  (missile-types pet (8 60 8 30))
  (ship-types pet 125)
  (transport-ship-types pet (150 8 24))
  (torpedo-boat pet 50);; short ranged
  (battleship pet 200 )
  (cruiser-ship-types pet 175)
  (nuke-types (pet rad) 10)
  (carrier-ship-types pet 300)
  (sub-types pet 250)

  ;; Warehouses have lots of room, but only for manufactured goods.
  (warehouse manufactures 999)
  ;; Combat supplies.
  (artillery-types sh 20)
  (fortress sh 100)
  (artillery-types gun 9)
  (fortress gun 9)
  (land-types mil 1)
  (defense-plant (gun sh) 100)
  (shell-industry (gun sh) 100)
  
  (facility-types pet 10)
  (refinery pet 200)
  ;; Havens for ships and planes are able to refuel their occupants.
  
  (base-types (pet food) 200)
  
  ;; Everything centers on the capital.
  (capital m* 999)
  (town m* 250)
)

;;; (really need generic capacities for cargo ships)

;;; Vision.

(add mobile-radar vision-range 6)
(add radar vision-range 8)
(add (space-battleship spysat) vision-range 10)
(add fighter-types vision-range 2)
(add bomber-types vision-range 3) ;bombers can be fitted with more and
better sensors
(add recon-plane vision-range 4)

(table see-chance
  ;; do radars in empire not see ground units?
  (mobile-radar land-types 0)
  (radar land-types 0)
  )

;;; Actions.

(table material-to-act
  ;; Ground units need soldiers to run them.
  (land-types mil 1)
  ;; Facilities all need civilians to run them.
  (facility-types civ 1)
  )

;;; Movement.

(add u* free-mp 1)

(add inert-types speed 0)
(add facility-types speed 0)
(add capital speed 0)

(table mp-to-enter-terrain
  ;; Don't let land units drown themselves.
  (land-types sea 99)
  (land-types (wilderness mountains) 2)
  
  ((infantry marines engineers battledroid) (wilderness mountains) 1);some
units are quite mobile in bad terrain
  (space-types t* 1)
  ;; Or ships beach themselves.
  (ship-types land-t* 99)
  (ship-types highway 99)
  )

(table consumption-per-move
  (u* pet 1)    ;includes nukes
  )

;;; Construction.


(add u* cp 20)
(add infantry-types cp (3 4 4 4 2))
 (add armor-types cp (7 5 6 7))
 (add artillery-types cp (5 4 8 7 3))
 (add engineer-types cp (5 7))
(add (mobile-radar supply) cp (3 8))

(add fighter-types cp 6)
(add bomber-types cp (7 8 10))
(add helicopter-types cp 5)
(add recon-plane cp 8)
(add asw-plane cp 6)
(add transport cp 8)

(add sub-types cp 10)
(add missile-types cp (2 5 3 4))
(add facility-types cp 14)

;fishing-boat cargo-ship tanker ore-ship transport landing-craft hover-ferry
(add unarmed-ship-types cp (4 6 8 6 8 2 4))
(add combat-ship-types cp (4 7 5 9 12 15 12 8 13 6 8 10 8 8 5))

;spysat SDI-sat sat-killer launcher space-battleship space-transport bolo
battledroid 
(add tech-types cp (2 10 5 6 15 8 15 8))

(add nuke-types cp (4 6 8))
(add warehouse cp 6)
(add capital cp 32)
(add fortress cp 10)

(table acp-to-create
  (engineer-types facility-types 1)
  (engineer-types town 1)
  (headquarters land-types 1)
  (headquarters land-tech-types 0)
  (headquarters (supply mobile-radar) 0)
  
  (harbor ship-types 1)
  
  
  (airfield air-types 1)
  (airfield missile-types 0)
  
  (nuclear-plant nuke-types 1)
  (capital engineers 1)
  (spaceport space-ship-types 1)
  (technical-center (append sat-types missile-types) 1)
  (defense-plant (supply mobile-radar bolo battledroid) 1)
  )

(table acp-to-build
  (engineer-types facility-types 1)
  (engineer-types town 1)
  (headquarters land-types 1)
  (headquarters land-tech-types 0)
  (headquarters (supply mobile-radar) 0)
  (harbor ship-types 1)
  (airfield air-types 1)
  (airfield missile-types 0)
  (spaceport space-ship-types 1)
  (technical-center (append sat-types missile-types) 1)
  (defense-plant (supply mobile-radar bolo battledroid) 1)
  (nuclear-plant nuke-types 1)
  (capital engineers 1)
)



;; need pet/lcm/hcm to build things also.

(table consumption-per-build
  (ship-types lcm 20)
  (ship-types hcm 30)
  (air-types lcm 15)
  (air-types hcm 10)
  (missile-types lcm 20)
  (missile-types hcm 5)
  (nuke-types pet (25 30 35));;used for energy
  (nuke-types lcm (10 15 20))
  (nuke-types hcm (5 5 5))
  (nuke-types rad (30 40 50))
  (nuke-types education (40 40 40))
  (space-types lcm 40)
  )

(table material-to-build
  ;; Need people to operate the equipment.
  (u* civ 1)
  ;; But engineer units *are* the people, so no extra requirement here.
  (engineer-types civ 0)
  )

(table acp-to-toolup
  (nuclear-plant nuke-types 1)
  (technical-center (append sat-types missile-types) 1)
  (harbor ship-types 1)
  (spaceport space-ship-types 1)
  (headquarters land-types 1)
  (headquarters (supply mobile-radar) 0)
  (headquarters land-tech-types 0)
  (airfield plane-types 1)
  (defense-plant land-tech-types 1)
  (defense-plant (supply mobile-radar) 1)
  )

(table tp-to-build
  (nuclear-plant nuke-types 7)
  
  (harbor unarmed-ship-types 4)
     
   ;torpedo-boat destroyer frigate light-cruiser heavy-cruiser battleship
light-carrier escort-carrier
   ;carrier missile-frigate missile-cruiser missile-submarine submarine
asw-cruiser minesweeper
 (harbor combat-ship-types (4 9 7 10 11 15 10 12 17 10 12 6 6 10 5))
 
 ;spysat SDI-sat sat-killer launcher space-battleship space-transport bolo
battledroid 
 (spaceport space-ship-types (15 8 4))
 
 (headquarters infantry-types (2 2 3 2 3))
 (headquarters armor-types (10 4 6 8))
 (headquarters artillery-types 5)
 (headquarters engineer-types (4 5))
 
 (defense-plant (supply mobile-radar) (5 3))
 
 (technical-center sat-types (3 5 4))
 (technical-center missile-types (2 10 4 6))
 (defense-plant land-tech-types (10 8))

  ;fighter-1 fighter-2 escort naval-fighter light-bomber medium-bomber
heavy-bomber 
   ;transport attack-helicopter transport-helicopter recon-plane asw-plane

    (airfield plane-types (7 6 5 7 6 7 9 4 5 3 10 6))
    
)

(table tp-max
  (nuclear-plant nuke-types 7)
    
  (harbor unarmed-ship-types 4)
  (harbor combat-ship-types (4 9 7 11 12 15 10 12 17 10 12 6 6 10 5))
  
  (spaceport space-ship-types (15 8 4))
   
 (headquarters infantry-types (2 2 3 2 3))
 (headquarters armor-types (10 4 6 8))
 (headquarters artillery-types 5)
 (headquarters engineer-types (4 5))
   
 (technical-center sat-types (3 5 4))
 (defense-plant land-tech-types (10 8))
 (defense-plant (supply mobile-radar) (5 3))
 (technical-center missile-types (2 4 4 10))
 
 (airfield plane-types (7 6 5 7 6 7 9 4 5 3 10 6))
)

#|
(table tp-crossover

 (infantry             (motor-infantry mech-infantry marines security) 60)
 (motor-infantry     (infantry mech-infantry marines security) 60)
 (mech-infantry     (infantry motor-infantry marines security) 60)
 (marines            (infantry motor-infantry mech-infantry security) 60)
 (security             (infantry motor-infantry mech-infantry marines) 60)
 
; (armor-types armor-types 50)
 
; (air-types air-types 20)
; (fighter-types fighter-types 60)
; (bomber-types bomber-types 40)
 
; (cruiser-ship-types cruiser-ship-types 50)
 (cruiser-ship-types light-carrier 45)
 (unarmed-ship-types escort-carrier 65)
 (transport-ship-types escort-carrier 0)
 
 )
;;; Production (and consumption).
|#


(table material-to-act
  (land-types pet 1)
  (air-types pet 1)
  (space-types rad 5)
  (ship-types pet 1)
  (facility-types pet 1)
  (fortress mil 2)
  )

(add u* hp-recovery 0.50)
(add capital hp-recovery 1.00)


;;; Combat.

(add facility-types hp-max 10)
(add (capital town) hp-max (20 40))
(add air-types hp-max 3)

;fortress harbor airfield missile-silo spaceport
(add base-types hp-max (200 100 200 250 150))

(table acp-to-attack
(u* u* 1)
)

(table hit-chance
  
  ;    infantry motor-infantry mech-infantry marines security cavalry
  ;light-armor armor heavy-armor artillery light-artillery heavy-artillery
rocket-artillery aa
  ;supply engineers mech-engineers mobile-radar battledroid  bolo
  
   ;    L          A         NN    N  DDDD
   ;    L            AAA     N N   N  D   D
   ;    L        A   A    N  N  N  D   D
   ;    L         AAAAAAA     N   N N  D   D
   ;    LLLL  A       A     N    NN  DDDD


  (infantry land-types          (50 45 40 45 65 35#|<cavalry|#45 40 35
45#|<artillery|#60 65 45 70#|<aa|#70 75 65 70 55 30))
  (motor-infantry land-types (55 50 45 50 70 40#|<cavalry|#50 45 40
55#|<artillery|#65 75 55 65#|<aa|#75 80 70 80 60 35))
  (mech-infantry land-types  (60 55 50 55 75 45#|<cavalry|#55 50 45
60#|<artillery|#70 80 60 60#|<aa|#80 85 75 80 65 40))
  (marines land-types          (55 50 45 50 70 35#|<cavalry|#50 45 40
50#|<artillery|#65 65 50 70#|<aa|#70 80 70 75 60 35))
  (security land-types          (35 30 25 30 50 25#|<cavalry|#40 35 30
45#|<artillery|#50 55 45 40#|<aa|#70 65 55 60 40 20))
;  
‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹
‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹
  (cavalry land-types          (75 65 05 20 40 50#|<cavalry|#65 60 50
50#|<artillery|#80 85 75 75#|<aa|#90 90 85 95 75 45))
  (light-armor land-types     (40 60 35 60 80 40#|<cavalry|#50 30 20
70#|<artillery|#75 75 65 65#|<aa|#90 90 85 95 65 15))
  (armor land-types             (70 65 60 70 85 45#|<cavalry|#60 50 40
70#|<artillery|#80 80 70 70#|<aa|#90 85 80 90 70 35))
  (heavy-armor land-types     (40 60 35 60 90 55#|<cavalry|#70 60 50
70#|<artillery|#75 75 65 85#|<aa|#90 85 80 90 80 45))
;  
‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹
‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹
  (artillery land-types         (45 50 45 40 50 35#|<cavalry|#45 40 30
45#|<artillery|#65 45 45 45#|<aa|#80 65 70 65 70 25))
 (light-artillery land-types (40 40 35 35 45 25#|<cavalry|#35 30 15
40#|<artillery|#55 40 40 40#|<aa|#70 60 70 60 55 10))
 (heavy-artillery land-types (45 60 55 40 50 45#|<cavalry|#55 50 45
50#|<artillery|#60 50 50 50#|<aa|#90 65 80 70 85 40))
(rocket-artillery land-types (60 55 50 55 65 50#|<cavalry|#55 45 35
60#|<artillery|#75 60 60 60#|<aa|#95 80 85 90 75 30))
  (aa land-types             (10 15 20 10 15 20#|<cavalry|#35 25 10
30#|<artillery|#40 20 20 20#|<aa|#30 25 20 30 10 05))
  
;‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹
‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹
  (battledroid land-types     (70 65 60 65 60 40#|<cavalry|#50 45 35
60#|<artillery|#75 65 60 40#|<aa|#50 75 50 30 50 25))
  (bolo land-types         (60 65 70 55 65 55#|<cavalry|#65 60 55
60#|<artillery|#85 75 70 70#|<aa|#70 85 70 50 85 50))
   
  (land-types fortress          (25 30 35 30 15 30#|<cavalry|#15 25 40
40#|<artillery|#15 75 50 00#|<aa|#00 45 65 00 35 45))
 #|Notes:
       motorized units are more vulnerable to some artillery than foot
troops, as anti-armor rounds are devastating to vehicles.
    All artillery except light artillery have identical armor.
 |#
   
   (aa air-types         (45 50 45 45 65 70 50 80 35 55 25 70 35 0 0 0))
   
   (land-types ship-types 0)
   (artillery-types ship-types 40)
   
  (land-types space-types 0)
   
 
   
  ;fighter-1 fighter-2 escort naval-fighter light-bomber medium-bomber
heavy-bomber 
   ;transport attack-helicopter transport-helicopter recon-plane asw-plane
missile icbm sam abm
   
   
   ;    A        II     RRRR
   ;   A A        II     R   R
   ;  AAAAA     II     RRRRR
   ; A     A    II      R   R
   
   ;        AIR TO AIR
   
   
   (fighter-1 air-types     (50 55 60 50 65#|<light-bomber|#70 60 70 80 85
40#|<recon-plane|#75 30 02 20 00))
   (fighter-2 air-types     (45 50 55 45 60#|<light-bomber|#65 55 65 75 80
35#|<recon-plane|#65 25 01 15 15))
   (escort air-types         (55 60 65 55 65#|<light-bomber|#65 55 65 75 80
40#|<recon-plane|#65 25 01 15 15))
   (naval-fighter air-types (50 55 60 50 65#|<light-bomber|#70 60 70 80 85
40#|<recon-plane|#75 30 02 20 00))
   (light-bomber air-types    (50 55 60 50 25#|<light-bomber|#25 25 25 80 85
10#|<recon-plane|#25 00 00 00 00))
   (medium-bomber air-types (50 55 60 50 25#|<light-bomber|#25 25 25 80 85
10#|<recon-plane|#25 00 00 00 00))
   (heavy-bomber air-types     (50 55 60 50 25#|<light-bomber|#25 25 25 80
85 10#|<recon-plane|#25 00 00 00 00))
   (transport u* 0)
(attack-helicopter air-types (00 00 00 00 0#|<light-bomber|#00 00 00 00 00
00#|<recon-plane|#00 00 00 00 00))
   (transport-helicopter u*    0)
   (recon-plane air-types    (10 15 15 10 05#|<light-bomber|#00 00 00 00 00
00#|<recon-plane|#00 00 00 00 00))
   (asw-plane air-types        (05 10 10 05 00#|<light-bomber|#00 00 00 00
00 00#|<recon-plane|#00 00 00 00 00))
   (missile air-types         (00 00 00 00 00#|<light-bomber|#00 00 00 00 00
00#|<recon-plane|#00 00 00 00 00))
   (icbm air-types             (00 00 00 00 00#|<light-bomber|#00 00 00 00
00 00#|<recon-plane|#00 00 00 00 00))
   (sam air-types             (60 45 60 50 65#|<light-bomber|#60 40 70 90 95
30#|<recon-plane|#35 00 00 00 00))
   (abm air-types             (00 00 00 00 00#|<light-bomber|#00 00 00 00 00
00#|<recon-plane|#00 45 75 00 00))
  
  
;      AIR   TO LAND
    
   ;infantry motor-infantry mech-infantry marines security cavalry
  ;light-armor armor heavy-armor artillery light-artillery heavy-artillery
rocket-artillery aa
  ;supply engineers mech-engineers mobile-radar battledroid bolo
  
  
   (fighter-1 land-types     (10 15 20 10 15 30#|<cavalry|#40 35 15
20#|<artillery|#75 65 60 20#|<aa|#30 25 20 30 00 00))
   (fighter-2 land-types     (10 15 20 10 15 30#|<cavalry|#40 35 15
20#|<artillery|#75 65 60 20#|<aa|#30 25 20 30 00 00))
   (escort land-types     0)
  (naval-fighter land-types 0)
   (light-bomber land-types    (55 60 65 55 50 40#|<cavalry|#40 40 40
60#|<artillery|#75 65 60 20#|<aa|#60 40 50 30 20 05))
  (medium-bomber land-types (55 60 65 55 50 45#|<cavalry|#40 40 40
60#|<artillery|#75 65 60 20#|<aa|#60 40 50 30 20 05))
   (heavy-bomber land-types (45 50 55 45 40 35#|<cavalry|#30 30 30
50#|<artillery|#65 55 50 30#|<aa|#50 30 40 20 30 20))
;(transport-helicopter u* 0)
   (recon-plane land-types 0)
   (asw-plane land-types    0)
  (missile land-types         (10 15 20 10 15 30#|<cavalry|#40 40 40
60#|<artillery|#75 65 60 20#|<aa|#30 25 20 30 30 20))
   (icbm land-types     0)
   (sam land-types         0)
   (abm land-types         0)

    ;   AIR TO SEA

   (fighter-1 ship-types     (65 65 65 65 65 65 35 30#|<torp-boat|#25 30 40
35 30 45 45#|<escort-carrier|#40 35 25 05 10 40 55))
   (fighter-2 ship-types     (65 65 65 65 65 65 65 10#|<torp-boat|#00 00 00
00 00 00 00#|<escort-carrier|#00 00 00 00 00 00 00))
   (escort ship-types         0)
  (naval-fighter ship-types (00 00 00 00 00 00 00 10#|<torp-boat|#00 00 00
00 00 00 00#|<escort-carrier|#00 00 00 00 00 00 00))
   (light-bomber ship-types    (30 35 40 35 35 35 35 30#|<torp-boat|#30 35
45 40 35 50 50#|<escort-carrier|#45 40 30 05 10 45 60))
  (medium-bomber ship-types (35 40 45 40 70 65 60 25#|<torp-boat|#05 10 15
10 20 10 10#|<escort-carrier|#10 30 20 00 05 15 20))
   (heavy-bomber ship-types (25 30 35 30 30 30 30 20#|<torp-boat|#05 10 15
05 05 05 05#|<escort-carrier|#10 30 20 00 00 15 20))
(attack-helicopter ship-types (50 40 40 40 40 40 40 50#|<torp-boat|#40 45 35
30 20 10 10#|<escort-carrier|#10 40 30 0 05 15 40))
   (recon-plane ship-types    0)
   (asw-plane ship-types    (20 20 20 20 20 20 20 00#|<torp-boat|#00 00 00
00 00 00 00#|<escort-carrier|#00 00 00 10 20 00 00))
   (missile ship-types         (60 70 80 70 70 65 60 50#|<torp-boat|#40 45
40 30 20 10 10#|<escort-carrier|#10 40 30 00 05 15 40))
   (icbm ship-types     0)
   (sam ship-types         0)
   (abm ship-types         0)

; AIR TO SPACE

  (missile space-types (20 10 15 20 05 15))
  (icbm space-types (40 30 30 20 20 30))
  (sam space-types (20 10 15 30 05 15))
  (abm space-types (40 30 30 20 20 30))

;          SSSSS        EEEEEE        A
;          SS        E           AAA
;           SSSSS       EEEEE      A   A
;               S        E         AAAAAAA
;           SSSSS        EEEEEE    A        A
 
   #|fishing-boat cargo-ship tanker ore-ship hover-ferry troop-transport
landing-craft
   torpedo-boat destroyer frigate light-cruiser heavy-cruiser battleship
light-carrier escort-carrier carrier
   missile-frigate missile-cruiser missile-submarine submarine asw-cruiser
minesweeper|#
    
 
  (torpedo-boat ship-types    (90 90 95 90 70 85 90 50#|<torp-boat|#30 35 15
10 05 60 65#|<escort-carrier|#70 40 25 00 05 25 40))
  (destroyer ship-types        (65 65 85 85 65 75 95 75#|<torp-boat|#50 60
45 30 20 75 80#|<escort-carrier|#85 50 40 30 45 60 70))
  (frigate ship-types        (70 60 70 80 60 70 95 65#|<torp-boat|#40 50 40
30 15 70 75#|<escort-carrier|#80 45 35 25 30 55 65))
 (light-cruiser ship-types     (85 75 85 75 65 75 95 75#|<torp-boat|#60 65
50 30 25 80 85#|<escort-carrier|#90 55 45 15 20 65 75))
 (heavy-cruiser ship-types     (85 75 85 75 70 80 95 70#|<torp-boat|#65 70
65 50 35 80 85#|<escort-carrier|#90 55 45 10 15 70 75))
  (battleship ship-types     (85 75 85 75 80 90 95 75#|<torp-boat|#70 75 65
60 50 85 90#|<escort-carrier|#95 55 45 15 20 75 75))
  (light-carrier ship-types    0)
 (escort-carrier ship-types 0)
  (carrier       ship-types 0)
(missile-frigate ship-types    (70 80 90 80 80 75 70 60#|<torp-boat|#55 60
50 40 35 45 45#|<escort-carrier|#40 50 40 35 50 40 65))
(missile-cruiser ship-types    (75 85 95 85 85 80 75 65#|<torp-boat|#60 65
55 45 40 50 50#|<escort-carrier|#45 55 45 40 55 45 70))
(missile-submarine ship-types 10)
  (submarine ship-types        (70 80 90 80 80 75 70 60#|<torp-boat|#55 60
50 40 35 40 45#|<escort-carrier|#40 50 40 35 50 40 65))
  (asw-cruiser ship-types    (80 70 80 70 75 85 60 60#|<torp-boat|#45 50 40
30 20 40 45#|<escort-carrier|#40 50 45 60 60 50 55))
  (minesweeper      ship-types 0)

  ;fighter-1 fighter-2 escort naval-fighter light-bomber medium-bomber
heavy-bomber 
   ;transport attack-helicopter transport-helicopter recon-plane asw-plane
missile icbm sam abm


   ((fishing-boat cargo-ship tanker ore-ship hover-ferry troop-transport
landing-craft) air-types 2)
   (torpedo-boat air-types     5)
   (destroyer air-types     (30 35 30 30 45#|<light-bomber|#40 35 30 60 65
40#|<recon-plane|#55 30 00 00 00))
   (frigate air-types         (25 30 25 25 40#|<light-bomber|#35 30 25 55 60
35#|<recon-plane|#50 25 00 00 00))
   (light-cruiser air-types (20 25 20 25 35#|<light-bomber|#30 25 20 50 55
30#|<recon-plane|#45 20 00 00 00))
   (heavy-cruiser air-types (15 20 15 20 30#|<light-bomber|#25 20 15 45 50
25#|<recon-plane|#40 30 00 00 00))
   (battleship air-types     (20 25 20 25 35#|<light-bomber|#30 25 20 50 55
30#|<recon-plane|#45 40 00 00 00)) ; Battleships have a lot of guns.
   
  (escort-carrier air-types (45 50 55 45 60#|<light-bomber|#65 55 65 75 80
35#|<recon-plane|#70 40 00 00 00))
   (light-carrier air-types (45 50 55 45 60#|<light-bomber|#65 55 65 75 80
35#|<recon-plane|#70 40 00 00 00))
   (carrier air-types         (50 55 60 50 65#|<light-bomber|#70 60 70 80 85
40#|<recon-plane|#75 50 00 00 00))
   
 (missile-frigate air-types (55 55 60 55 65#|<light-bomber|#70 60 70 80 85
40#|<recon-plane|#75 60 00 00 00))
 (missile-cruiser air-types (65 65 70 65 75#|<light-bomber|#85 75 80 90 95
50#|<recon-plane|#75 65 00 00 00))
   (sub-types air-types     02)
   (asw-cruiser air-types   (20 25 20 25 35#|<light-bomber|#30 25 20 50 55
30#|<recon-plane|#45 20 00 00 00))
   
(surface-combat-ship-types land-types 60)

(ship-types space-types 0)
;    sssss    ppppp      a        cccccc   eeeeee
;   ss         p   p     aaa      c         e
;    sssss    ppppp    a   a     c         eeeee
;       ss    p       aaaaaaa    c         e
;    sssss    p      a          a    cccccc   eeeeee
;    
;    
    
    
    
;spysat SDI-sat sat-killer launcher space-battleship space-transport
    
  (SDI-sat             space-types (60 40 40 50 20 30))
  (sat-killer          space-types (70 45 45 20 10 20))
  (launcher            space-types (10 10 10 10 05 10))
  (space-battleship space-types (80 75 75 30 50 65))
  (space-transport u* 0)
  
  (SDI-sat (icbm missile) (75 20))

    
  (land-types facility-types 70)
  (infantry-types facility-types 90)
  (combat-ship-types facility-types 60)
  (bomber-types facility-types 50)
  
  (fortress u* 75)
  (land-types (capital town) 80)

) 


(table damage
    (u* u* 1)
    (land-types facility-types 2d6)
    (land-types capital 2d4)
    (battledroid capital 1)
    (battledroid facility-types 1)
    (heavy-types u* 2)
    (v-heavy-types u* 3)
    ;fortress harbor airfield missile-silo spaceport
    (artillery            base-types (40 25 20 25 75))
    (light-artillery     base-types 15)
    (heavy-artillery     base-types 75)
    (rocket-artillery     base-types (30 20 40 20 50))

    (battleship            (append land-types facility-types) 50)
    (cruiser-ship-types (append land-types facility-types) 25)
    
    (bomber-types u* (2 4 6))
    
  )
  
(table capture-chance
  (u* u* 0)
  ;; Most facilities can't prevent their own capture.
  (land-types facility-types 90)
  ;; Fortresses are tough.
  (infantry-types fortress 20)
  (infantry-types capital 40)
  (battledroid (town capital) (70 60))
  (battledroid facility-types 95)
  ((append armor-types bolo) fortress (30 20 25 35 40))

  ;; Capitols have people
  (armor-types capital 25);;could surround and siege
  ;; Nuclear weapons are supposedly not captureable.
  (land-types nuke-types 0)
  )

(table independent-capture-chance
  (u* u* 100)
  (infantry-types facility-types 100)
  (infantry-types fortress 80)
  (infantry-types capital 80)
  (armor-types facility-types 100)
  (armor-types fortress 90)
  (armor-types capital 90)
  )


(table protection ; actually ablation?
  ;; places offer some protection to occupants
  (fortress land-types 05)
  (capital u* 40)
  (airfield air-types 10)
  (harbor ship-types 60)
  (spaceport u* 20)
  (missile-silo missile-types 0)
  (facility-types land-types 40)
  )

(add (artillery heavy-artillery light-artillery rocket-artillery fortress
space-battleship SDI-sat) acp-to-fire 1)
(add (artillery heavy-artillery light-artillery rocket-artillery fortress
space-battleship SDI-sat) range (3 4 2 3 4 20 30))


(add (battleship light-cruiser heavy-cruiser asw-cruiser missile-cruiser
missile-frigate submarine) acp-to-fire 1)
(add (battleship light-cruiser heavy-cruiser asw-cruiser missile-cruiser
missile-frigate submarine) range (5 3 4 3 5 3 4))


(table consumption-per-attack
  (land-types mil 1)
)

(table hit-by
  ;(u* mil 1)
)

(table material-to-attack
  (land-types mil 1)
  (space-types rad 1)
  (ship-types mil 0)
  (air-types mil 0)
  (artillery-types gun 1)
  (fortress gun 1)
)

(add u* acp-to-disband 1)
(add battleship acp-to-disband 2)

(add u* hp-per-disband 4)

;; Takes a while to dismantle a base.

;(add / hp-per-disband 2)


;; Nuclear detonation results in the destruction of units and the
;; creation of wasteland.

(add nuke-types acp-to-detonate 1)

(add nuke-types hp-per-detonation 100)

(table detonation-unit-range
  (small-nuke u* 1)
  (medium-nuke u* 2)
  (large-nuke u* 3)
  )

(table detonation-damage-at
  (small-nuke u* 100)
  (medium-nuke u* 200)
  (large-nuke u* 300)
)
  
  
(table detonation-damage-adjacent
  ;; Ensure that all units except hardened ones within range are nailed.
  (small-nuke u* 25)
  (medium-nuke u* 50)
  (large-nuke u* 75)
)

(table detonation-terrain-range
  (small-nuke t* 0)
  (medium-nuke t* 1)
  (large-nuke t* 2)
  )

(table detonation-terrain-damage-chance
  (nuke-types t* (5 15 30))
  (nuke-types sea 0)
  )

(table terrain-damaged-type
  (t* wasteland 1)
)

;;; Terrain alteration.

(table acp-to-add-terrain
  (engineer-types settled 1)
  (engineer-types highway 1)
  (engineer-types wilderness 1)
  )

(table acp-to-remove-terrain
  (engineer-types wilderness 1)
  (engineer-types highway 1)
  (engineer-types mountains 1)
  )

;;; Backdrop.

(table base-production
  ((agribusiness fishing-boat) food (100 50))
  (enlistment mil 50)
  (refinery pet 100)
  (defense-plant gun 100)
  (lcm-factory lcm 100)
  (shell-industry sh 150);shells can be cranked out in large numbers
  (hcm-factory hcm 100)
  
  (research-lab education 20)
  (library/school education 45)
  (uranium-mine rad 55)
  (gold-mine gold 50)
  (town food 5)
  (bank gold 100)
  ;; The capital always has a few small farms and factories.
  (capital (food lcm hcm) (20 30 30))
  (capital (civ mil) 75)
  (town civ 50)
  )

(table base-consumption
  ;; Everything eats food.
  (u* food 1)
  
  (sat-types food 0)
  (nuke-types food 0)
  (nuke-types food 0)
  ((battledroid launcher) food 0) ;except hardware
  (agribusiness food 0)
  (air-types food 1)
  ;; Capital is self-supporting, but has no excess.
  (capital food 20)
  (town food 5)
  ;; Inert types don't consume anything at all.
  (inert-types m* 0)
  )

(table hp-per-starve
  ;; Going without food is potentially deadly.
  (u* food 1.00)
  (sat-types food 0)
  (nuke-types food 0)
  ((launcher battledroid) food 0)
  ;; Technology types really need their petroleum products.
  (ship-types pet 10.00)
  (air-types pet 100.00)
  )

(table out-length
  ;; This is to simplify basic game play.

  (u* m* 1)
  (air-types m* 0);;shouldn't give away material
  (town m* 2)
  (shell-industry sh 4)
  (defense-plant gun 4)
  (town civ 3)
  ;; Farming has a default supply infrastructure.
  (agribusiness food 5)
  (library/school education 4)
  ;; Fishing fleets must rely on land systems to redistribute.
  (fishing-boat food 1)
  ;; Civilians will tend to go where they're needed (looking for jobs).
  (facility-types civ 2)
  ;; Factories want to unload their manufactures as fast as possible.
  (refinery pet 5)
  (supply (pet food gun sh) 2)
  (bank gold 5)
  (gold-mine gold 3)
  (lcm-factory lcm 5)
  (hcm-factory hcm 5)
  ;; Warehouses are redistribution points.
  (warehouse m* 5)
  ;; Capital will be generous with nearby needy units.
  (capital m* 3)
  (capital (civ mil) 5)
  )



(table in-length
  ;; This is to simplify basic game play.
  (u* m* 1)
  ;; Every type of unit that needs food can get it from an nearby cell.
  (u* food 3)
  ;; Similarly for petroleum.
  (u* pet 3)
  (supply (pet food gun sh) 2)
  ;; Facilities want to pull in whatever they need for their work.
  (harbor m* 5)
  (missile-silo m* 4)
  (airfield m* 5)
  (shell-industry sh 3)
  (space-types rad 0)
  (bank gold 5)
  (gold-mine gold 3)
  ;; Warehouses are redistribution points.
  (nuclear-plant m* 4)
  (nuclear-plant (lcm hcm) 5)
  (nuclear-plant rad 3) ;hard to transport safely
  (warehouse m* 5)
  ;; The capital always gets special service if it needs something.
  (capital m* 5)
  (town m* 4)
  (u* (civ mil) 5)
  (air-types m* 0)
  (ship-types m* 1);;supplies can be boated out
  )

;;; Random setup.

;;; Everybody starts with just the one capital.

(add capital start-with 1)

(add (sea settled wilderness mountains) alt-percentile-min (  0  70 70  95))
(add (sea settled wilderness mountains) alt-percentile-max ( 70  75 95 100))
(add t* wet-percentile-min 0)
(add t* wet-percentile-max 100)
(add settled wet-percentile-min 40)
(add settled wet-percentile-max 60)

(set country-radius-min 1)
(add sea country-terrain-max 1)

(table favored-terrain
  (u* t* 0)
  (capital settled 100)
  (facility-types settled 100)
  )

;; A game's starting units will be full by default.
(table supply-on-creation
(u* m* 5);everyone has at least SOME supplies
(ship-types (pet food) 50);ships need a lot to be movable.
(fortress m* 50);forts have guns set up at the beginning

)

(table unit-initial-supply
  (u* m* 9999)
  (town civ 400)
  ;; ...but with minimal soldiers.
  (u* mil 1)
  )

(table terrain-initial-supply
  (t* iron 100)
  (t* rad 50)
  )

;; Allow from 1 to many sides to play.

(set sides-min 1)
(set sides-max 15)

(game-module (instructions (
  "Build up your country and materials."
  "Create engineers in your capital, then send them out to clear the"
  "land and build farms, factories, harbors, roads, and so forth."
  ""
  "If you can't live in peace with your neighbors,"
  "then be prepared to fight with them."
  )))

(game-module (design-notes (
  "Written by Ari Rabkin asrabkin@twcny.rr.com"
  "Scale is unimportant, this is an abstract game."
  "I found empire.g for version 7.1.0 intolerable so I edited it"
  "I fixed almost everything; deleted some material types, and added a bunch
more units"
  "        Actually, I completely rewrote the combat rules, and most of the
building rules, too!"
  ""
  "I would like to thank the designers of most of the library game files for
working examples" 
  ""
  "e-mail me at the above address with bug reports, comments, ideas..."
  ""
  "NOTE:    This game now bears limited remblence to empire,"
  "but so??"
  )))


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]