1(game-module "bolodd3"
2  (title "AD&D Bolo v3")
3  (version "0.1")
4  (blurb "Tank battles, Dungeons-and-Dragons style. By Lincoln Peters.")
5  (instructions "If you build the deadliest arsenal the fastest, you will rule this little corner of the universe!")
6  (notes (
7"This game is loosely based on Bolo (an old tank game for Macintosh), and rebuilt in a high-tech fantasy/adventure setting, where showing any weakness toward an enemy could mean your quick and painful death.
8"
9"The style is that of Dungeons and Dragons, and as such, some units have special kinds of attack mechanisms such as fire and acid, which do varying amounts of damage to different units.  The fire robot, for example, can wreak havoc on a water-based unit whereas a frost cannon could wreak havoc on a fire-based unit, and whereas a ground unit such as a battledroid could easily wreck any piece of artillery if it gets close enough.
10"
11"It is important to colonize, just like in Civ, and it is important to conquer, just like in the Standard game.  However, it is foolhardy to put too much focus on either, as a horde of engineers cannot stand up against even a single helicopter, and there are not enough independent bases to effectively use all the land that you might own without building new bases.  One strategy is to focus on colonization early in the game, but to focus the efforts of all newly-built and captured bases on military units.  Depending on the specific game setup (especially the size of the map), the big show-down will likely be a great battle in which each side throws countless units of wondrous power against each other.  Of course, they must also guard their borders well, or risk that a surprise attack will capture their undefended homeland.
12"
13"It is impossible to acurately predict the outcome of any battle.  Of course, the odds could be heavily in favor of one side, depending on what kind of units are fighting each other (e.g. goblins vs. cacofiends), but there is almost always a chance that the underdog will prevail.  The only known exception to this rule is if one side runs out of ammo.  There are countless strategies that one could use in this game, many of which I am so far unaware of.  If anyone wants to create a strategy guide for this game, please let me know.
14"
15"The AI (as of January 2003) is incredibly bad at this game, and often fails to do any colonization, even if it builds a horde of engineers and no military!  For the best gaming experience, be sure to play against a human opponent.
16"
17"WARNING: This game will NOT work properly if played on any version of Xconq prior to 7.5!
18"
19" -- Lincoln Peters (sampln@sbcglobal.net)"
20  ))
21
22  (design-notes (
23"* This game uses a time.g-like upgrade mechanism to work around Xconq's inability to mix acp-independent units with tech and tooling.  If this could be fixed, the code (and the game) could be much simplified.
24"
25"* Additional complications that result from the time.g-like upgrade mechanism are that new bases do not inherit the supplies or tooling of old bases (let alone the size).  Perhaps if the change type mechanism worked, the upgrade process would be less difficult.
26"
27"* There is no way for Xconq to understand poison.  As a workaround, poisonous units (i.e. the spider) do quadruple damage; they should actually do 1d6 damage with each hit, plus 1d4 damage per turn thereafter until the victim is either destroyed or repaired.
28"
29"* Explosives such as the acid ball and firebomb should have effects on terrain that last for several turns.  For example, a firebomb that detonates in a forest should set the forest on fire, and any unit that survived the blast must either leave the forest or suffer 2d4 fire damage each turn it remains in the forest.  Firey units such as the phoenix should be immune to the forest fire damage.  Similar results should come from the acid ball, as well as anything that explodes on an ice tile.
30"
31"* Satellites (e.g. the meteor platform) and controllers (e.g. the meteor controller) do not interact correctly.  The satellite should automatically give everything it produces to a global treasury, and the controller should automatically take the material from the treasury when it fires at an opponent."
32"* Many of the higher-level units received little testing, as they are very difficult to build when play-testing.  It is possible that some of them will behave unexpectedly.
33"
34"* There are not enough high-level units.  Perhaps I should find a guide to the AD&D monsters and work from there.
35"
36
37"Otherwise, I tried to build this game in such a way that new units will be easy to add.  As long as the new units are categorized correctly, there should be little difficulty in ensuring that newly-defined units work as expected."
38  ))
39
40  (variants
41    ;; Many of these variants are enaled by default because the game tends to
42    ;; end long before anyone can gain access to the more powerful units.
43    ;; The default setup here will set the game up so that it is possible to
44    ;; build Level 4+ units before the end, but it is difficult to do so.
45    ;; (Perhaps the world size should be *really* big if one expects to gain
46    ;; access to the valar before the end).
47    (world-size (120 60 720))
48    (real-time)
49    (world-seen)
50    (see-all)
51    (sequential)
52    ("Fast development" fast-tech
53     "Perform technological development at 5x speed" true
54     (true
55       (table tech-per-develop (u* u* 5.00))))
56    ("Fast toolup" fast-toolup
57     "Perform toolup at 2x speed" true
58     (true
59       (table tp-per-toolup (u* u* 2))))
60    ("Fast construction" fast-build
61     "Perform construction at 2x speed" true
62     (true
63       (table cp-on-creation (u* u* 2))
64       (table cp-per-build (u* u* 2))))
65    ("Fast growth" fast-grow
66     "Allow bases to grow after stockpiling 10 food instead of 25" true
67     (true
68       (table unit-consumption-to-grow (bases food 10))))
69
70    ("Mostly water" mostly-water
71     "Generate a map that is 70% water" true
72     (true
73     		; Try to adjust the percentiles so that the world is 30% land
74
75     ;                               		sea 	lak	swa 	sal 	des 	sed	ste	pla 	for 	mou 	ice
76; ---------------------------------------------------------------------
77
78(add cell-t* alt-percentile-min 	(  	0  	69 	70  	70	71  	71  	71	71	71  	93  	99	))
79(add cell-t* alt-percentile-max 	( 	69  	70  	71  	71	93  	93  	93	93	93  	99 	100	))
80(add cell-t* wet-percentile-min 	(  	0   	0  	50   	50	0  	5	15  	20	80   	0   	0	))
81(add cell-t* wet-percentile-max 	(	100 	100 	100	100	5  	15	20 	80	100 	100 	100	))
82    ))
83#| This variant doesn't work correctly.
84    ("Half water" half-water
85     "Generate a map that is 50% water"
86     (true
87     		; Try to adjust the percentiles so that the world is 50% land
88
89     ;                               		sea 	lak	swa 	sal 	des 	sed	ste	pla 	for 	mou 	ice
90; ---------------------------------------------------------------------
91
92(add cell-t* alt-percentile-min 	(  	0  	49 	50  	50	51  	51  	51	51	51  	93  	99	))
93(add cell-t* alt-percentile-max 	( 	49  	50  	51  	51	73  	73  	73	73	73  	99 	100	))
94(add cell-t* wet-percentile-min 	(  	0   	0  	50   	50	0  	5	15  	20	80   	0   	0	))
95(add cell-t* wet-percentile-max 	(	100 	100 	100	100	5  	15	20 	80	100 	100 	100	))
96    ))
97|#
98    ("Day/Night" day-night
99     "Effect a day/night cycle every 24 turns" true
100     (true
101       (world (day-length 24))
102       (table vision-night-effect
103         (u* t* 50)			;; Most units have their visibility reduced by 50% at night...
104         (tower t* 100)			;; ...but not towers.
105       )
106
107       ;; Make the battlebots and undead ineffective during the day, just for variety.
108       (add battlebot-1 acp-per-turn 1)
109       (add battlebot-2 acp-per-turn 1)
110       (add battlebot-3 acp-per-turn 1)
111       (add undead acp-per-turn 1)
112       (table night-multiplies-acp add
113         (battlebot-1 t* 500)
114         (battlebot-2 t* 400)
115         (battlebot-3 t* 300)
116         (undead t* 400)	;; Might need unit-specific exceptions here.
117       )
118    ))
119    ("More bases" more-bases
120     "Generate a world with twice as many bases" true
121     (true
122       (table independent-density (base-1 plain 400))))
123    ("No surprises" no-surprises
124     "Produce a world with no minefields, walls, or towers" true
125     (true
126       (table independent-density add ((tower wall mine) t* 0))))
127    ("Paced development" paced-tech
128     "Restrict the development rate of certain important units"
129     (true
130       ;; Restrict the development speed of bases so that only up to 4 bases can
131       ;; develop a next-level base together (2 bases in the fast-tech variant).
132       (add base-1 tech-per-turn-max 4)
133       (add base-2 tech-per-turn-max 8)
134       (add base-3 tech-per-turn-max 12)
135       (add base-4 tech-per-turn-max 16)
136       (add base-5 tech-per-turn-max 20)
137       (add base-6 tech-per-turn-max 24)
138     ))
139    ("Alternate economy" model1
140     "Use a different algorithm for moving materials among units."
141     (true (set backdrop-model 1)))
142    ("AltEcon uses doctrine" model1doctrine
143     "When using alternate economy, don't drain units below doctrine levels."
144     (true (set backdrop-ignore-doctrine 0))
145     (false (set backdrop-ignore-doctrine 1)))
146
147  )
148)
149
150(include "ng-swedish")
151(include "ng-features")
152(include "advterr")
153
154(scorekeeper (do last-side-wins))
155
156(define t-water (sea lake))
157
158(define land (swamp salt-marsh desert semi-desert steppe plain forest mountain))
159
160;                               		sea 	lak	swa 	sal 	des 	sed	ste	pla 	for 	mou 	ice
161; ---------------------------------------------------------------------
162
163(add cell-t* alt-percentile-min 	(  	0  	89 	0  	20	21  	21  	21	21	21  	90  	99	))
164(add cell-t* alt-percentile-max 	( 	20  	90  	0  	23	90  	90  	90	90	89  	99 	100	))
165(add cell-t* wet-percentile-min 	(  	0   	0  	20   	20	0  	10	20  	30	70   	0   	0	))
166(add cell-t* wet-percentile-max 	(	100 	100 	100	100	10  	20	30 	70	100 	100 	100	))
167
168(add river subtype connection)	;; This allows ships to travel up and down rivers.
169
170
171;; Places
172
173#| There needs to be a better way to handle bases.  With the current setup, it
174   is virtually impossible to build any units of 4th level or higher before the
175   game ends.
176|#
177
178(unit-type base-1 (image-name "ancient-village1")
179  (hp-max 100) (acp-per-turn 1) (cp 50)
180  (help "Level 1 base")
181  (notes "This is the most basic kind of base, and as such it has the most basic abilities.  It is probably best to establish oneself with such bases and then upgrade as soon as possible."))
182(unit-type base-2 (image-name "ancient-green-city")
183  (hp-max 200) (acp-per-turn 2) (cp 50)
184  (help "Level 2 base"))
185(unit-type base-3 (image-name "ancient-blue-city")
186  (hp-max 300) (acp-per-turn 3) (cp 50)
187  (help "Level 3 base"))
188(unit-type base-4 (image-name "ancient-white-castle")
189  (hp-max 400) (acp-per-turn 4) (cp 50)
190  (help "Level 4 base"))
191(unit-type base-5 (image-name "ancient-yellow-castle")
192  (hp-max 500) (acp-per-turn 5) (cp 50)
193  (help "Level 5 base"))
194(unit-type base-6 (image-name "ancient-black-city")
195  (hp-max 600) (acp-per-turn 6) (cp 50)
196  (help "Level 6 base"))
197
198(unit-type tower (image-name "ancient-tower")
199  (hp-max 500) (acp-per-turn 4) (acp-min -3) (cp 25)
200  (help "Guards an area with deadly force")
201  (notes "Towers are very useful for fighting off invasions and for building stockpiles of explosives.  They have twice the vision range and firing range of any mobile unit, they are very hard to destroy, and can hold a rather large garrison.  Towers cannot be captured; the only way to take control of an area so guarded is to destroy the tower."))
202(unit-type wall (image-name "walltown")
203  (hp-max 1000) (acp-per-turn 0) (cp 25)
204  (description-format (side " wall at " position))
205  (help "Impedes enemy movement; very hard to destroy")
206  (notes "The most effective way to protect an area from invaders is to surround it with massive walls.  These walls are very expensive to build, but even the most powerful artillery would take quite a while to punch a hole in such walls.  Among the most formidable defenses one could build are a base and a tower surrounded by a ring of walls that is large enough that no enemies could fire over them and hit the base or tower, but still small enough that the tower could shoot back at anyone who might dare to attack."))
207
208;; Construction units
209
210(unit-type engineer (image-name "builder")
211  (hp-max 10) (acp-per-turn 3) (acp-min -2) (cp 20)
212  (help "Builds bases, towers, and walls")
213  (notes "Engineers are the only units that can build new bases, towers, and walls.  As such, they are indispensable to any empire.  An empire that neglects its engineers is likely to find that a rival will quickly grow larger and conquer it.  On the other hand, an empire that focuses entirely on engineering and neglects its military could be brought to ruin by a single battledroid!"))
214(unit-type miner (image-name "worker")
215  (hp-max 5) (acp-per-turn 3) (acp-min -2) (cp 10)
216  (help "Lays minefields")
217  (notes "One of the more sinister strategies to defend one's territory is to lay mines.  Anyone who knows where they are can easily avoid them, but any unsuspecting invader who sets off a mine is in for a painful surprise.  Care should be taken, however, when laying minefields, as they can turn fertile land into an inhospitable wasteland."))
218
219;; Transports
220
221(unit-type boat (image-name "ap")
222  (hp-max 10) (acp-per-turn 3) (acp-min -2) (cp 10)
223  (help "Carries anything across water, but doesn't defend well")
224  (notes "By far, the easiest way to travel across a body of water is by boat.  Boats are cheap, easy to build, and carry a lot.  However, they cannot defend themselves very well, and even the most formidable land army can be destroyed by a sinking boat."))
225(unit-type carrier (image-name "cv")
226  (hp-max 15) (acp-per-turn 4) (acp-min -3) (cp 20)
227  (help "Carries all aircraft except motherships")
228  (notes "Aircraft cannot take off from and land on ordinary boats.  The simplest way to bring an air force across a large body of water is to load the aircraft onto a carrier and sail to the destination.  The carrier is not quite as vulnerable as an ordinary boat, but it is still easily destroyed, especially by submarines."))
229(unit-type choplifter (image-name "cargo-chopper")
230  (hp-max 15) (acp-per-turn 6) (acp-min -5) (cp 15)
231  (help "Carries anything up to tank-size")
232  (notes "Choplifters have an advantage over boats simply because they are faster and therefore more difficult to intercept.  They can traverse both land and water with ease, but they have a shorter range than boats and cannot carry anything larger than a tank."))
233(unit-type platform (image-name "halftrack")
234  (hp-max 30) (acp-per-turn 3) (acp-min -2) (cp 20)
235  (help "Carries artillery and supplies into battle")
236  (notes "A few pieces of artillery can make short work of most opponents, but artillery alone moves slowly and has a relatively low capacity for fuel and ammunition.  The platform moves rather quickly, stores any kind of ammunition, and can carry dozens of guns.  Platforms can even be equipped to produce simple explosives during a battle!"))
237(unit-type mothership (image-name "mothership")
238  (hp-max 50) (acp-per-turn 8) (acp-min -7) (cp 100)
239  (help "Moves fast and carries anything anywhere")
240  (notes "The most effective invasions tend to be conducted using at least one mothership for moving equipment and supplies.  A mothership can carry any kind of ground units and aircraft, as well as lots of fuel and ammo.  It moves extremely quickly and is much more difficult to destroy than a boat or a carrier.  On the other hand, if a mothership is destroyed, whatever forces it was carrying either find themselves destroyed or stranded in enemy territory."))
241
242;; Level 1 military units
243
244(unit-type tank (image-name "tank")
245  (hp-max 50) (acp-per-turn 4) (acp-min -3) (cp 50)
246  (help "Your center of power")
247  (notes "An ordinary tank might seem primitive compared to some of the other machines of war available in this game, but it can gain combat experience and become as deadly as anything else.  It is theoretically possible for a tank to be so battle-hardened that it could destroy a cacofiend with a single shot."))
248(unit-type battledroid (image-name "mech")
249  (hp-max 25) (acp-per-turn 4) (acp-min -3) (cp 10)
250  (help "Simple robotic foot-soldiers")
251  (notes "Ordinary battledroids are useful for any combat on the ground, but as one might imagine, they fall easily in the shadow of greater machines.  Nevertheless, a swarm of battledroids could destroy even the biggest and meanest machines that might oppose it."))
252(unit-type destroyer (image-name "dd")
253  (hp-max 50) (acp-per-turn 4) (acp-min -3) (cp 20)
254  (help "Small, cheap combat-ready boats")
255  (notes "The destroyer is the least expensive naval fighting unit.  It excels at hunting down and destroying submarines, although it is not nearly as sneaky."))
256(unit-type minesweeper (image-name "hovercraft")
257  (hp-max 10) (acp-per-turn 4) (acp-min -3) (cp 15)
258  (help "Safely detonates enemy minefields, but otherwise vulnerable")
259  (notes "The minesweeper is the only unit that can step on a land mine and suffer no damage from the explosion.  It is a good idea to send at least one minesweeper into an area if you suspect it to be mined.  However, a minesweeper is quite vulnerable to everything other than mines, so they should always be used with discretion.  One strategy would be to use spy planes or helicopters to watch for enemies while the minesweepers do their thing."))
260
261;; Level 2 military units
262
263(unit-type spy-plane (image-name "delta")
264  (hp-max 10) (acp-per-turn 6) (acp-min -5) (cp 20)
265  (help "Useful for exploration and spying")
266  (notes "This long-range aircraft is fast and difficult to spot.  It is very useful for mapping out enemy territory when planning an invasion, although it can also be used to paradrop battlebots (goblins, orcs, ogres).  A few battlebots can wreak havoc (depending on how well-defended an area is) and distract the enemy while you gather your real invasion force on their border."))
267(unit-type helicopter (image-name "helicopter")
268  (hp-max 25) (acp-per-turn 5) (acp-min -4) (cp 25)
269  (help "Deadly against ground units")
270  (notes "A helicopter has as much firepower as a tank, but it moves quickly and is hard to hit.  Helicopters are very useful for surprise invasions, but they are far more vulnerable to fighters than ordinary tanks."))
271(unit-type bomber (image-name "4e")
272  (hp-max 15) (acp-per-turn 6) (acp-min -5) (cp 15)
273  (help "Carries explosives into the heart of the enemy")
274  (notes "Bombers are long-range aircraft that are not built for combat, but are well suited to carry all kinds of explosives.  They can quickly fly up close to a fortification, release up to a dozen missiles, and fly away."))
275(unit-type fighter (image-name "fighter")
276  (hp-max 10) (acp-per-turn 8) (acp-min -7) (cp 15)
277  (help "The best defense against air attacks")
278  (notes "Fighters are designed to excel at destroying all kinds of aircraft.  They are fast and accurate, and can make short work of any bomber or helicopter.  A small squadron of fighters could even destroy a mothership!"))
279(unit-type battleship (image-name "bb")
280  (hp-max 100) (acp-per-turn 4) (acp-min -3) (cp 50)
281  (help "The most powerful naval unit")
282  (notes "The battleship is a very powerful naval unit, being about twice as powerful as a tank.  It may not have much to fear from other naval units, but there are all sorts of higher-tech units that could spell its doom."))
283(unit-type submarine (image-name "sub")
284  (hp-max 20) (acp-per-turn 3) (acp-min -2) (cp 20)
285  (help "Sneaky underwater craft that blows up transport boats")
286  (notes "Submarines are quiet underwater craft that excel at hunting and destroying all kinds of boats.  A submarine has the potential to destroy an ordinary boat with a single shot, and an aircraft carrier with two shots!"))
287(unit-type battlebot-1 (image-name "monsters-ninja") (name "goblin")
288  (hp-max 10) (acp-per-turn 5) (acp-min -4) (cp 10)
289  (help "Small but fast battledroids")
290  (notes "These robots are smaller than ordinary battledroids, but they move and attack more quickly than any other kind of battledroid.  They can also be paradropped from spy planes, and so can be very effective at launching surprise attacks."))
291(unit-type battlebot-2 (image-name "monsters-orc3") (name "orc")
292  (hp-max 25) (acp-per-turn 4) (acp-min -3) (cp 10)
293  (help "Larger but slower battledroids")
294  (notes "These robots are roughly equivalent to ordinary battledroids, but they can be paradropped from spy planes, making them very effective at launching surprise attacks."))
295(unit-type battlebot-3 (image-name "monsters-ax-troll") (name "ogre")
296  (hp-max 50) (acp-per-turn 3) (acp-min -2) (cp 10)
297  (help "Huge, lumbering battledroids")
298  (notes "These robots are much larger than ordinary battledroids, but they move and attack more slowly as a result.  However, they can be paradropped from spy planes, and so can be very effective at launching surprise attacks."))
299
300#| Levels 3 and 4 needs more units.  Consider:
301Troll
302Wyvern
303Salamander
304|#
305
306;; Level 3 military units
307
308(unit-type werewolf (image-name "monsters-gorilla")
309  (hp-max 75) (acp-per-turn 5) (cp 40)
310  (help "Very fast and very deadly")
311  (notes "A werewolf is a battledroid that merges the abilities of a large humanoid battledroid with a canine.  It moves as almost as fast as a helicopter and it is tougher than most armored tanks!"))
312(unit-type spider (image-name "monsters-alien-spider")
313  (hp-max 40) (acp-per-turn 4) (cp 30)
314  (help "Walking rust-inducing machines")
315  (notes "Spiders are insect-like robots that have razor-sharp legs and teeth.  They also can pierce armor and inject an oxidizing (rusting) agent into an opponent, effectively poisoning it."))
316(unit-type doppleganger (image-name "monsters-blue-man")
317  (hp-max 25) (acp-per-turn 4) (cp 25)
318  (help "Illusory battledroids")
319  (notes "A doppleganger's most noteworthy ability is that it can trick enemies into thinking that it is something significantly less dangerous.  Once the enemy figures out what it's opponent REALLY is, however, the doppleganger has usually had enough time to rip the enemy to shreds."))
320(unit-type ankheg (image-name "beetle")	;; Need a better image
321  (hp-max 50) (acp-per-turn 3) (cp 50)
322  (help "Burrowing insectoid robot")
323  (notes "The ankheg is a veritable land submarine.  It is tremendously strong, and can burrow through earth like a submarine can float through water.  It is also nearly impossible to spot until its right in front of its opponent.  It has one drawback, however, in that it is only effective in open land, and is almost useless in forests and mountains."))
324
325;; Level 4 military units
326
327(unit-type centipede (image-name "monsters-giant-spider")
328  (hp-max 50) (acp-per-turn 3) (acp-min -2) (cp 40)
329  (help "Large fighting machine that feeds on enemy metal")
330  (notes "Centipedes are scavengers that can strip metal from any wreck and bring it to the nearest supply point for re-use.  It is also battle-ready so that it can create its own wrecks, rather than rely on its allies to produce wrecks for it.  Furthermore, it can be tooled to build undead units on the spot, using scrap metal collected from any wrecks it might find!"))
331(unit-type air (image-name "wiz-air")
332  (hp-max 100) (acp-per-turn 4) (acp-min -3) (cp 100)
333  (help "Robotic construct made of air")
334  (notes "This massive battledroid is actually a swirling mass of gases, held together by magnets and force-fields.  It is very hard to destroy, and it can fire lightning bolts at its enemies."))
335(unit-type water (image-name "monsters-octopus")
336  (hp-max 100) (acp-per-turn 4) (acp-min -3) (cp 100)
337  (help "Robotic construct made of water")
338  (notes "This massive battledroid is actually a mass of liquid (mostly water), held together by force-fields and surface tension.  It is very hard to destroy, and it can fire a lightning bolts at its enemies."))
339(unit-type earth (image-name "monsters-club-troll3")
340  (hp-max 200) (acp-per-turn 3) (acp-min -2) (cp 100)
341  (help "Robotic construct made of earth")
342  (notes "This massive battledroid is actually a mass of rock, held together by force-fields and muscle wires.  It is very hard to destroy, and it can do massive damage to enemies by punching them or by stepping on them."))
343(unit-type fire (image-name "monsters-balrog2")
344  (hp-max 150) (acp-per-turn 4) (acp-min -3) (cp 100)
345  (help "Robotic construct made of fire")
346  (notes "This massive battledroid is actually a mass of burning gases, held together by force-fields.  It is very hard to destroy, and it can spew an arc of searing flame at its enemies."))
347(unit-type cacofiend (image-name "monsters-vampire")
348  (hp-max 400) (acp-per-turn 3) (acp-min -2) (cp 200)
349  (help "A battledroid the size of the Empire State Building")
350  (notes "The sight of a cacofiend is sure to strike fear into one's enemies, unless the enemies have their own cacofiends (or worse!).  This battledroid is as tall as a tower, has wings that can carry it over water, and it has fists that do as much damage as falling 16-ton boulders.  It can even carry a few rockets!"))
351
352#| Level 5 needs some more powerful elemental units, otherworldly powers, and such.  Perhaps:
353Beholders
354Dragons
355Genies
356|#
357
358;; Level 5 military units
359
360(unit-type phoenix (image-name "monsters-pterodactyl")
361  (hp-max 100) (acp-per-turn 6) (acp-min -5) (cp 75)
362  (help "Firey aircraft; resistant to all except cold-based weapons")
363  (notes "The phoenix is as more to ground units than a helicopter, more deadly to other aircraft than a fighter, and nearly immune to every kind of weapon except cold-based artillery and explosives.  The frost cannon is among the few weapons that it fears."))
364(unit-type stormcloud (image-name "city30")
365  (hp-max 150) (acp-per-turn 4) (acp-min -3) (cp 100)
366  (help "Floating fortress that fires lightning bolts")
367  (notes "Any military force that lacks fighters or other anti-aircraft equipment will be in big trouble if attacked by a stormcloud.  It floats in the air at extremely high altitude, making it hard to see.  It also fires lightning bolts at everything below, making it a veritable flying submarine."))
368
369;; Level 6 military units
370
371(unit-type valar (image-name "monsters-red-sorcerer")
372  (hp-max 800) (acp-per-turn 8) (acp-min -7) (cp 400)
373  (help "A machine that can create (and destroy) virtually anything")
374  (notes "The valar is a machine that can alter any terrain, build allies for itself on-the-fly, and is in itself a juggernaut of destruction.  Only another valar or a huge army with numbers beyond reckoning could challenge a valar and hope to survive."))
375(unit-type dark-valar (image-name "monsters-nazgul")
376  (hp-max 800) (acp-per-turn 8) (acp-min -7) (cp 400)
377  (help "A machine built to destroy anything that opposes it")
378  (notes "A dark valar foregoes all of an ordinary valar's constructive abilities in order to become the ultimate destructive force.  It is even more destructive on its own than an ordinary valar, but it is unable to make terrain alterations or build allies for itself.  Few things other than another valar could face such a monster and survive."))
379  ;; (the dark valar isn't destructive enough!)
380
381#| There should be more undead units, just to keep it interesting.  Perhaps:
382Ghoul
383Skeleton
384Shadow
385Vampire
386Lich
387Banshee
388|#
389
390;; "Undead" military units
391
392(unit-type zombie (image-name "monsters-undead")
393  (hp-max 25) (acp-per-turn 4) (cp 3)
394  (help "Battledroid built on-the-fly from scrap metals")
395  (notes "One of the trickiest but potentially most deadly tactics available is to have a centipede collecting scrap metal from dead units and build an undead unit such as the zombie while the battle is still going!  It is difficult, however, as it is very important to protect the centipede so that it can do its job.  As with any unit, the zombie can be destroyed with a single blow if it is hit while under construction."))
396
397;; Artillery
398
399(unit-type howitzer (image-name "pz-how")
400  (hp-max 5) (acp-per-turn 1) (cp 20)
401  (help "Fires huge shells at enemies")
402  (notes "A typical howitzer fires large shells that are twice as powerful as those fired by tanks or helicopters."))
403(unit-type acid-gun (image-name "pz-at")
404  (hp-max 5) (acp-per-turn 1) (cp 20)
405  (help "Sprays acid at enemies")
406  (notes "This piece of artillery sprays its target with a powerful acid.  This is devastating to everything except air and water robots."))
407(unit-type flame-gun (image-name "pz-at")
408  (hp-max 5) (acp-per-turn 1) (cp 20)
409  (help "Shoots fireballs at enemies")
410  (notes "This piece of artillery shoots a searing fireball at its target.  This is especially devastating to water robots."))
411(unit-type lightning-gun (image-name "pz-at")
412  (hp-max 5) (acp-per-turn 1) (cp 20)
413  (help "Fires bolts of lightning at enemies")
414  (notes "This piece of artillery fires lightning bolts at its target.  This is devastating to everything except air and fire robots."))
415(unit-type frost-gun (image-name "pz-at")
416  (hp-max 5) (acp-per-turn 1) (cp 20)
417  (help "Fires extremely cold liquid at enemies")
418  (notes "This piece of artillery fires a column of numbing frost at its target.  This is especially devastating to fire robots."))
419(unit-type pulse-cannon (image-name "pz-at")
420  (hp-max 5) (acp-per-turn 1) (cp 20)
421  (help "Repels enemies using a shockwave")
422  (notes "This piece of artillery fires shockwaves at its target.  The shockwave does no damage (usually), but it throws the target away from the cannon, even into hostile terrain.  This could be used, for example, to throw enemy battledroids into a body of water, thereby instantly destroying them."))
423(unit-type anti-aircraft (image-name "pz-at")
424  (hp-max 5) (acp-per-turn 1) (cp 20)
425  (help "Built to kill aircraft")
426  (notes "An alternative to using fighters to protect one's airspace is to equip one's bases and towers with anti-aircraft artillery.  It is designed to excel at shooting down anything that flies, though it can also be effective against ground units."))
427
428;; (the controller/satellite system doesn't seem to work properly; and I don't
429;; know if it ever will.)
430
431;; Controllers
432
433(unit-type lightning-controller (image-name "pz-flak")
434  (hp-max 10) (acp-per-turn 4) (cp 40)
435  (help "Directs lightning to strike enemies")
436  (notes "If the appropriate satellites are put in place, this device can cause an enemy unit to be struck by lightning."))
437(unit-type meteor-controller (image-name "pz-flak")
438  (hp-max 10) (acp-per-turn 4) (cp 40)
439  (help "Directs meteors to pound enemies into dust")
440  (notes "If the appropriate satellites are put in place, this device can cause meteorites to come crashing down on an enemy.  This may very well be the ultimate weapon in this game!"))
441(unit-type hailstorm-controller (image-name "pz-flak")
442  (hp-max 10) (acp-per-turn 4) (cp 40)
443  (help "Directs large hailstones to bash enemies")
444  (notes "If the appropriate satellites are put in place, this device can create a hailstorm in the vicinity of an enemy unit."))
445
446;; Generic explosives
447
448(unit-type mine (image-name "minefield")
449  (hp-max 1) (acp-per-turn 0) (cp 3)
450  (help "Explodes when an enemy steps on it")
451  (notes "One of the more sinister strategies to defend one's territory is to lay mines.  Anyone who knows where they are can easily avoid them, but any unsuspecting invader who sets off a mine is in for a painful surprise.  Care should be taken, however, when laying minefields, as they can turn fertile land into an inhospitable wasteland."))
452(unit-type rocket (image-name "rocket")
453  (hp-max 1) (acp-per-turn 6) (cp 5)
454  (help "Cruise missile, does heaviest damage to point of impact")
455  (notes "A rocket moves fast, has a fairly long range, and can destroy most mobile units with a single blow.  Larger units, bases, and towers can be destroyed with multiple rockets.  Some mobile units, such as tanks and platforms, can even be equipped to build rockets during combat!"))
456(unit-type orb (image-name "wiz-manicon")
457  (hp-max 1) (acp-per-turn 4) (cp 10)
458  (help "Slower than a rocket, but twice as deadly")
459  (notes "An orb is slower than a rocket and has shorter range, but it does much more damage.  One orb can instantly vaporize any mobile unit (except a cacofiend or a Level 5+ unit), and five orbs are enough to level most bases."))
460
461;; Special explosives
462
463(unit-type acid-ball (image-name "fireball")
464  (hp-max 1) (acp-per-turn 6) (cp 8)
465  (help "Explodes into a ball of deadly acid")
466  (notes "This is an explosive, just like a rocket or orb, but its strength is that its explosion releases a huge cloud of acid that will eat away at anything it strikes.  A single acid ball can also transform a small island into a uninhabitable wasteland."))
467(unit-type firebomb (image-name "fireball")
468  (hp-max 1) (acp-per-turn 6) (cp 8)
469  (help "Incinerates virtually anything")
470  (notes "When a firebomb explodes, it releases an incredibly intense heat, capable of melting almost any metal and incinerating everything else.  It also has the destructive power to ruin land, but to a lesser degree than the acid ball."))
471
472;; (still need electrical and freezing explosives)
473
474(unit-type magma-drill (image-name "mininuke")
475  (hp-max 1) (acp-per-turn 4) (cp 16)
476  (help "Burrows into the core of the planet, releases magma onto the battlefield")
477  (notes "This weapon is at least as deadly as a meteor shower.  When it strikes the ground, it burrows into the Earth's core, creating an artificial volcano that can wipe out any military forces and any ecosystem.  It is even powerful enough to tranform the tallest mountains into rubble!"))
478
479;; Basic Facilities
480
481(unit-type granary (image-name "granary") (cp 15)
482  (help "Improves food production"))
483(unit-type refinery (image-name "oil-derrick") (cp 15)
484  (help "Improves fuel production"))
485(unit-type armory (image-name "fort") (cp 15)
486  (help "Improves ammo production"))
487
488;; Advanced Facilities
489
490(unit-type acid-factory (image-name "refinery") (cp 25)
491  (help "Chemical plant that produces refined acid"))
492(unit-type oil-plant (image-name "refinery") (cp 25)
493  (help "Chemical plant that produces explosive liquids"))
494(unit-type solar-complex (image-name "facility") (cp 25)
495  (help "Generates electricity"))
496(unit-type ice-factory (image-name "facility") (cp 25)
497  (help "Chemical plant that produces extremely cold liquids"))
498
499;; Satellites
500
501(unit-type lightning-platform (image-name "spysat") (cp 50)
502  (help "Orbital satellite that creates thunderstorms"))
503(unit-type ice-platform (image-name "spysat") (cp 50)
504  (help "Orbital satellite that creates hailstorms"))
505(unit-type meteor-platform (image-name "spysat") (cp 75)
506  (help "Orbital satellite that collects and hurls meteors"))
507
508;; Wrecks
509
510(unit-type ruins (image-name "ancient-ruins")
511  (hp-max 100) (acp-per-turn 0) (cp 1) (possible-sides "independent")
512  (description-format ("ruins of " name " at " position))
513  (help "Remains of a destroyed base or tower")
514  (notes "This is what remains after a base or tower has been subjected to a powerful enough attack that it has been completely leveled.  Ruins are  worthless to all but the centipedes; unless they are to be 'recycled,' they must be cleared or allowed to decay before the land can be re-used."))
515(unit-type small-wreck (image-name "tank-wrecked")	;; Need a better image
516  (hp-max 10) (acp-per-turn 0) (cp 1) (possible-sides "independent")
517  (description-format ("the small wreck at " position))
518  (help "Remains of a destroyed small unit"))
519(unit-type medium-wreck (image-name "tank-wrecked")
520  (hp-max 20) (acp-per-turn 0) (cp 1) (possible-sides "independent")
521  (description-format ("the medium wreck at " position))
522  (help "Remains of a destroyed mid-sized unit"))
523(unit-type large-wreck (image-name "tank-wrecked")
524  (hp-max 30) (acp-per-turn 0) (cp 1) (possible-sides "independent")
525  (description-format ("the large wreck at " position))
526  (help "Remains of a destroyed large unit"))
527
528(add (small-wreck medium-wreck large-wreck) notes "A wreck may be harvested for scrap metal by a centipede, but otherwise it is nothing more than a stumbling block that lingers after a battle.")
529
530;;; MATERIALS
531
532;;; Basic materials
533
534(material-type fuel (image-name "yellow") (resource-icon 2)
535  (help "Powers everything"))
536(material-type ammo (image-name "black") (resource-icon 3)
537  (help "Used by most ranged weapons"))
538(material-type metal (image-name "blue") (resource-icon 4)
539  (help "Used to build everything"))
540
541;; Advanced materials
542
543(material-type acid
544  (help "Dissolves anything except air and water"))
545(material-type flame
546  (help "Burns anything except metal"))
547(material-type electricity
548  (help "Burns electronics"))
549(material-type frost
550  (help "Extinguishes fire, freezes water"))
551(material-type meteors
552  (help "Huge boulders that smash anything!"))
553
554(material-type scrap
555  (help "Used to create undead units"))
556
557;; Backdrop materials
558
559(material-type food (image-name "green") (resource-icon 1)
560  (help "Used to feed and grow bases and towers"))
561
562(define places (base-1 base-2 base-3 base-4 base-5 base-6 tower wall))
563(define constructors (engineer miner))
564(define transports (boat carrier choplifter platform mothership))
565(define military-1 (tank battledroid destroyer minesweeper))
566(define military-2 (spy-plane helicopter bomber fighter battleship submarine battlebot-1 battlebot-2 battlebot-3))
567(define military-3 (werewolf spider doppleganger ankheg))
568(define military-4 (centipede air water earth fire cacofiend))
569(define military-5 (phoenix stormcloud))
570(define military-6 (valar dark-valar))
571(define undead (zombie))
572(define artillery (howitzer acid-gun flame-gun lightning-gun frost-gun pulse-cannon anti-aircraft))
573(define controllers (lightning-controller meteor-controller hailstorm-controller))
574(define explosives-1 (mine rocket orb))
575(define explosives-2 (acid-ball firebomb magma-drill))
576(define facilities (granary refinery armory acid-factory oil-plant solar-complex ice-factory))
577(define facilities-1 (granary refinery armory))
578(define facilities-2 (acid-factory oil-plant solar-complex ice-factory))
579(define satellites (lightning-platform ice-platform meteor-platform))
580(define wrecks (ruins small-wreck medium-wreck large-wreck))
581
582(define bases (base-1 base-2 base-3 base-4 base-5 base-6))
583(define naval (boat carrier destroyer battleship submarine))
584(define aircraft (choplifter mothership spy-plane helicopter bomber fighter phoenix stormcloud))
585(define walkers (engineer miner battledroid battlebot-1 battlebot-2 battlebot-3 werewolf spider doppleganger ankheg centipede air water earth fire cacofiend zombie))
586;; (should there be a special category of "diggers" for underground units like the ankheg?)
587(define wheeled (platform tank minesweeper))
588
589(define movers (engineer miner boat carrier choplifter platform mothership tank battledroid destroyer minesweeper spy-plane helicopter bomber fighter battleship submarine battlebot-1 battlebot-2 battlebot-3 werewolf spider doppleganger centipede air water earth fire cacofiend phoenix stormcloud valar dark-valar zombie howitzer acid-gun flame-gun lightning-gun frost-gun pulse-cannon anti-aircraft lightning-controller meteor-controller hailstorm-controller rocket orb acid-ball firebomb magma-drill))
590
591;; Units that use special weapons special combat methods fall under the following definitions...
592(define acidic (ankheg acid-gun acid-ball))
593(define burning (flame-gun meteor-controller firebomb fire phoenix))
594(define electrical (lightning-gun lightning-platform air water stormcloud))
595(define freezing (frost-gun hailstorm-controller))
596
597;; Units that are based on certain special materials fall under the following definitions...
598;; (There are no acid-based units yet)
599(define gaseous (air stormcloud))
600(define wet (water))
601(define firey (fire phoenix))
602(define nonmetallic (ankheg earth))
603
604;; Some elemental units have innate protections against certain weaponry.
605;; (needs to be further developed)
606(define fireshielded (phoenix))
607
608(define materials-1 (food fuel ammo metal))
609(define materials-2 (acid flame electricity frost meteors))
610
611(add bases notes "The base produces fuel and ammo, and it builds every kind of mobile unit.  Although some other units have limited construction capabilities, no empire of any size is complete without at least one base.")
612;; (should have some way to tack on specific notes for each level of base)
613
614;; Most places are advanced but NOT acp-independent.
615;; (They would be acp-independent if it would not interfere with tech and tooling.)
616(add bases advanced true)
617(add bases reach 2)
618
619(add bases wrecked-type ruins)
620(add tower wrecked-type ruins)
621
622;; In general, higher level units are larger, and so result in larger wrecks.
623(add constructors wrecked-type small-wreck)
624(add military-1 wrecked-type small-wreck)
625(add military-2 wrecked-type medium-wreck)
626(add military-3 wrecked-type medium-wreck)
627(add military-4 wrecked-type large-wreck)
628(add military-5 wrecked-type large-wreck)
629(add artillery wrecked-type small-wreck)
630
631;; There are a few exceptions, however...
632(add battlebot-1 wrecked-type small-wreck)
633(add battlebot-3 wrecked-type large-wreck)
634(add tank wrecked-type medium-wreck)
635
636(add places speed 0)
637(add facilities speed 0)
638(add satellites speed 0)
639
640(add movers free-mp 1)
641
642;;; INITIALIZATION
643
644(add tank start-with 1)
645(add base-1 start-with 1)
646(add engineer start-with 1)
647; (add boat start-with 1)
648
649(table favored-terrain
650  (u* t* 0)		;; Don't allow anyone to start in a place not explicitly allowed.
651  (bases plain 100)	;; Bases function best in the plains.
652  (tower mountain 100)	;; Towers are more effective on the high-ground.
653  (boat t-water 100)	;; Boats must be in the water.
654; (tank plain 100)	;; Tanks start in the open.
655  (engineer plain 100)	;; As do engineers.
656)
657
658(set country-radius-min 3)			;; Might need adjustment
659(set country-separation-min 50)			;; Might also need adjustment
660(set country-separation-max 9999)		;; This shouldn't be necessary, but country-separation-min doesn't seem to work without it.
661
662(add plain country-terrain-min 3)
663(add mountain country-terrain-min 1)
664(add lake country-terrain-min 1)
665(add sea country-terrain-min 2)
666
667
668(table independent-density
669  (base-1 plain 100)
670  ;; (tower mountain 50)
671
672  ;; Just to make it interesting...
673  (mine land 10)
674  (wall land 10)
675)
676
677
678;;; MOTION
679
680(table mp-to-enter-terrain
681  ;; By default, they can move on land but not water...
682  (u* land 1)
683  (u* t-water 99)
684  ;; But the opposite is the case for naval units...
685  (naval land 99)
686  (naval t-water 1)
687  (naval river 0)
688  ;; Aircraft and missiles can go anywhere...
689  (aircraft t* 1)
690  (explosives-1 t* 1)
691  (explosives-2 t* 1)
692  (aircraft river 0)
693  (explosives-1 river 0)
694  (explosives-2 river 0)
695
696  ;; The speed of a unit often depends on the terrain it's moving on...
697  (wheeled plain 1)
698  (wheeled steppe 1)
699  (wheeled semi-desert 2)
700  (wheeled desert 2)
701  (wheeled forest 3)
702  (wheeled mountain 4)
703  (wheeled swamp 4)
704  (wheeled salt-marsh 4)
705
706  (walkers plain 1)
707  (walkers steppe 1)
708  (walkers semi-desert 1)
709  (walkers desert 2)
710  (walkers forest 2)
711  (walkers mountain 2)
712  (walkers swamp 2)
713  (walkers salt-marsh 2)
714
715  (ankheg mountain 99)
716
717  ;; Very few units can handle ice.
718  (u* ice 99)
719  (engineer ice 2)
720  (aircraft ice 1)
721
722  ;; Air and water robots can go anywhere.
723  (air land 1)
724  (air t-water 2)
725
726  (water land 2)
727  (water t-water 1)
728
729  (cacofiend land 1)
730  (cacofiend t-water 3)
731
732  (fire river 2)		;; Fire robots must be especially careful when crossing rivers!
733  (cacofiend river 0)		;; The cacofiend can just step over a river!
734
735  ;; The valar can go anywhere unobstructed.
736  (valar t* 1)
737  (dark-valar t* 1)
738
739  ;; Controllers can fire rapidly, but cannot move so quickly.
740  (controllers t* 3)
741
742  ;; Roads make anything move around more easily.
743  (u* road 0)
744)
745
746(table mp-to-leave-terrain
747  ;; To prevent accidents...
748  (walkers t-water 99)
749  (wheeled t-water 99)
750  (naval land 99)
751
752  (u* river 2)
753  (naval river 0)
754
755  (air t* 0)
756
757  (water t* 0)
758
759  (fire river 3)		;; Fire robots must be especially careful when crossing rivers!
760  (cacofiend t* 0)		;; Cacofiends have wings.
761
762  (valar t* 0)			;; The valar can go anywhere unobstructed.
763)
764
765#| This is meant so that if a pulse cannon or other such force lands in
766   hostile terrain, it is instantly destroyed (tanks on a wrecked bridge, for
767   example).  However, there seem to be some bugs in the movement code that
768   demand that this behavior be temporarily disabled.
769(table vanishes-on
770  ;; In the event that a unit enters hostile terrain, it DIES!
771  (u* t-water true)
772  (aircraft t* false)
773  (explosives-1 t* false)
774  (explosives-2 t* false)
775  (naval t-water false)
776  (naval land true)
777  (air t* false)		;; They fly when they need to!
778  (water t* false)		;; They prefer to swim, but can walk!
779  (cacofiend t* false)		;; They have wings, although they can't fly as fast as they walk.
780  (valar t* false)
781)
782|#
783
784(table mp-to-traverse
785  (u* road 0)
786  (naval road 99)
787  (naval river 0)
788)
789
790;;; CAPACITANCE
791
792(add t* capacity 16)
793
794(table unit-size-in-terrain
795  (u* t* 1)
796  (aircraft t* 0)
797  (places t* 16)
798  (mine t* 99)		;; Mines are treated differently.
799)
800
801(table terrain-capacity-x
802  ;; Mines use exclusive terrain capacity so that:
803  ;; 1. One and only one mine may occupy a cell.
804  ;; 2. The mine does not interfere with the movement of friendly units.
805  (mine t* 1)
806
807)
808
809(add bases capacity 32)
810(add tower capacity 16)
811(add wall capacity 2)
812(add ruins capacity 16)
813(add boat capacity 8)
814(add carrier capacity 12)
815(add choplifter capacity 4)
816(add platform capacity 16)
817(add mothership capacity 32)
818
819(add tank capacity 8)
820(add battledroid capacity 4)
821(add destroyer capacity 4)
822(add spy-plane capacity 8)
823(add helicopter capacity 8)
824(add bomber capacity 12)
825(add battleship capacity 16)
826(add submarine capacity 16)
827(add centipede capacity 8)
828
829(add valar capacity 32)
830
831(table unit-size-as-occupant
832  (u* u* 99)
833  (u* places 1)
834  (facilities places 0)
835  (satellites places 0)
836  (places places 99)
837
838  (constructors transports 1)
839  (military-1 transports 1)
840  (military-2 transports 1)
841  (military-3 transports 1)
842  (military-4 transports 2)
843  (military-5 transports 2)
844  (military-6 transports 4)	;; Is this appropriate?
845  (artillery transports 1)
846
847  (aircraft choplifter 99)
848
849  (transports transports 99)	;; Generally, transports cannot carry other transports.
850  (platform transports 2)	;; But anything with space can carry a platform.
851  (platform platform 99)	;; Except other platforms.
852  (aircraft transports 99)	;; Few things can transport aircraft.
853  (aircraft mothership 1)	;; Among the few are motherships.
854  (mothership mothership 99)	;; But motherships cannot carry other motherships.
855  (naval transports 99)		;; Fewer things can transport ships.
856  (naval mothership 2)		;; Only motherships can carry ships.
857  (u* carrier 99)		;; By default, nothing is allowed on a carrier.
858  (aircraft carrier 1)		;; Carriers can carry any kind of aircraft.
859  (mothership carrier 99)	;; Except motherships.
860  ;; (choplifter boat 2)	;; Choplifters can easily land on any boat.
861  ;; (fighter boat 99)		;; But fighters cannot.
862  ;; (bomber boat 99)		;; Nor bombers.
863  (choplifter mothership 1)	;; Choplifters fit in a mothership easily.
864  (mothership places 4)		;; Motherships are really big!
865
866  (explosives-1 military-1 1)
867  (explosives-1 military-2 1)
868  (explosives-1 military-3 1)
869  (explosives-1 military-4 1)
870
871  (u* platform 99)
872  (wheeled platform 2)
873  (walkers platform 1)
874  (explosives-1 platform 1)
875  (explosives-2 platform 1)
876  (artillery platform 1)
877  (controllers platform 1)
878  (choplifter platform 2)
879  (helicopter platform 2)
880
881  (u* spy-plane 99)
882  (battlebot-1 spy-plane 1)
883  (battlebot-2 spy-plane 2)
884  (battlebot-3 spy-plane 4)
885
886  (u* valar 1)			;; A valar can carry anything...
887  (valar valar 99)		;; ...except other valars...
888  (dark-valar valar 99)		;; ...and dark valars.
889
890  (undead centipede 1)		;; Only centipedes can carry undead robots.
891
892  (engineer places 1)		;; Any place can hold an engineer.
893  (engineer transports 1)	;; As can any transport.
894
895  (mine u* 99)			;; Nobody in their right mind would carry active mines!
896)
897
898(table unit-capacity-x
899  (acid-gun acid-ball 4)
900  (flame-gun firebomb 4)
901  (tank magma-drill 1)
902  (platform magma-drill 1)
903  (cacofiend rocket 8)		;; Is this appropriate?
904
905  ;; Bases always have capacity for one base of the next level up (so that they can build it).
906  (base-1 base-2 1)
907  (base-2 base-3 1)
908  (base-3 base-4 1)
909  (base-4 base-5 1)
910  (base-5 base-6 1)
911)
912
913(table constructor-absorbed-by
914  (bases bases true)
915)
916
917(table hp-to-garrison
918  (bases bases 9999)	;; When a base has upgraded, the old base vanishes and is replaced by the new base.
919)
920
921;;; MATERIAL CAPACITANCE
922
923(table unit-storage-x
924  (places m* 9999)	;; Bases and towers can store anything...
925  (places scrap 0)	;; ...except scrap metal...
926  (places meteors 0)	;; ...and meteors.
927
928  (wall m* 0)
929
930  (engineer fuel 200)
931  (engineer metal 100)
932  (miner fuel 100)
933
934  (tank fuel 100)
935  (tank ammo 50)
936  (tank metal 25)
937
938  (battledroid fuel 50)
939  (battledroid ammo 25)
940
941  (destroyer fuel 200)
942  (destroyer ammo 50)
943
944  (minesweeper fuel 100)
945  (minesweeper ammo 25)
946
947  (boat fuel 200)
948  (boat ammo 100)
949  (boat metal 100)
950
951  (carrier fuel 800)
952  (carrier ammo 200)
953
954  (choplifter fuel 48)
955  (choplifter ammo 25)
956
957  (platform fuel 200)
958  (platform ammo 200)
959  (platform metal 100)
960  (platform acid 50)
961  (platform flame 50)
962  (platform electricity 50)
963  (platform frost 50)
964
965  (mothership fuel 400)
966  (mothership ammo 400)
967
968  (spy-plane fuel 96)
969  (spy-plane ammo 12)
970
971  (helicopter fuel 50)
972  (helicopter ammo 25)
973
974  (bomber fuel 36)
975  (bomber ammo 10)
976
977  (fighter fuel 48)
978  (fighter ammo 15)
979
980  (battleship fuel 400)
981  (battleship ammo 200)
982
983  (submarine fuel 100)
984  (submarine ammo 25)
985
986  (battlebot-1 fuel 50)
987  (battlebot-1 ammo 10)
988
989  (battlebot-2 fuel 100)
990  (battlebot-2 ammo 20)
991
992  (battlebot-3 fuel 200)
993  (battlebot-3 ammo 40)
994
995  (werewolf fuel 150)
996  (werewolf ammo 30)
997
998  (spider fuel 100)
999  (spider ammo 25)
1000
1001  (doppleganger fuel 50)
1002  (doppleganger ammo 15)
1003
1004  (ankheg fuel 100)
1005  (ankheg acid 50)
1006
1007  (centipede fuel 100)
1008  (centipede ammo 40)
1009  (centipede scrap 200)
1010
1011  (air fuel 400)
1012  (air electricity 100)		;; Shoots lightning bolts
1013
1014  (water fuel 400)
1015  (water electricity 100)	;; Shoots lightning bolts
1016
1017  (earth fuel 400)
1018  (earth ammo 100)
1019
1020  (fire fuel 400)
1021  (fire flame 100)		;; Shoots balls of fire
1022
1023  (cacofiend fuel 800)
1024  (cacofiend ammo 200)
1025
1026  (phoenix fuel 96)
1027  (phoenix flame 75)
1028
1029  (stormcloud fuel 400)
1030  (stormcloud electricity 150)
1031
1032  (valar fuel 2000)
1033  (valar ammo 1000)
1034  (valar metal 500)
1035
1036  (dark-valar fuel 2000)
1037  (dark-valar ammo 2000)
1038
1039  (howitzer fuel 80)
1040  (howitzer ammo 40)
1041
1042  (acid-gun fuel 40)
1043  (acid-gun acid 40)
1044
1045  (flame-gun fuel 40)
1046  (flame-gun flame 40)
1047
1048  (lightning-gun fuel 40)
1049  (lightning-gun electricity 40)
1050
1051  (frost-gun fuel 40)
1052  (frost-gun frost 40)
1053
1054  (pulse-cannon fuel 40)
1055  (pulse-cannon ammo 40)	;; Should the ammo be different?
1056
1057  (anti-aircraft fuel 80)
1058  (anti-aircraft ammo 40)	;; Should the ammo be different (perhaps scud missiles)?
1059
1060  (lightning-controller fuel 40)
1061  (lightning-controller electricity 40)
1062
1063  (hailstorm-controller fuel 40)
1064  (hailstorm-controller frost 40)
1065
1066  (meteor-controller fuel 40)
1067  (meteor-controller meteors 40)
1068
1069  (rocket fuel 24)
1070  (orb fuel 16)
1071  (acid-ball fuel 24)
1072  (firebomb fuel 24)
1073  (magma-drill fuel 16)
1074
1075  (lightning-platform electricity 100)
1076  (meteor-platform meteors 100)
1077  (ice-platform frost 100)
1078
1079  (ruins scrap 100)
1080  (small-wreck scrap 10)
1081  (medium-wreck scrap 20)
1082  (large-wreck scrap 30)
1083)
1084
1085(table production-from-terrain
1086  (plain food 3)
1087  (plain fuel 3)
1088  (plain metal 1)
1089
1090  (steppe food 2)
1091  (steppe fuel 4)
1092  (steppe metal 1)
1093
1094  (forest food 2)
1095  (forest fuel 4)
1096  (forest metal 2)
1097
1098  (semi-desert food 1)
1099  (semi-desert fuel 9)
1100  (semi-desert metal 1)
1101
1102  (desert fuel 12)
1103  (desert metal 1)
1104
1105  (swamp food 1)
1106  (swamp fuel 3)
1107
1108  (salt-marsh food 1)
1109  (salt-marsh fuel 3)
1110
1111  (mountain fuel 6)
1112  (mountain metal 4)
1113
1114  (lake food 3)
1115  (lake fuel 3)
1116
1117  (sea food 2)
1118  (sea fuel 6)
1119
1120  (river food 1)
1121
1122  (t* ammo 5)	;; Just to ensure that large bases produce more ammo than their smaller counterparts.
1123)
1124
1125(table base-production
1126  (acid-factory acid 3)
1127  (oil-plant flame 3)
1128  (solar-complex electricity 3)
1129  (ice-factory frost 3)
1130
1131  (lightning-platform electricity 10)
1132  (ice-platform frost 10)
1133  (meteor-platform meteors 1)
1134
1135  ;; Towers are equipped to be self-succicient if they need to be.
1136  (tower fuel 6)		;; (used to be 4, but didn't work well with "Fast construction" variant)
1137  (tower metal 2)
1138  (tower ammo 2)
1139
1140  ;; The valar are pretty much self-sufficient.
1141  (valar fuel 4)
1142  (valar ammo 4)
1143  (valar metal 4)
1144
1145  (dark-valar fuel 4)
1146  (dark-valar ammo 8)
1147)
1148
1149(table occupant-multiply-production
1150  (granary food 200)
1151  (refinery fuel 200)
1152  (armory ammo 200)
1153)
1154
1155;; Supplies may travel from orbital platforms to controllers.
1156;; Controllers, however, cannot give resources to any other units.
1157
1158#| This is (hopefully) being replaced by a more effective system...
1159(table out-length
1160  (satellites materials-2 9999)
1161  (controllers materials-2 -1)
1162)
1163
1164(table in-length
1165  (controllers materials-2 9999)
1166  (satellites materials-2 -1)
1167)
1168
1169|#
1170
1171(add electricity treasury true)
1172(add frost treasury true)
1173(add meteors treasury true)
1174
1175(table gives-to-treasury
1176  (u* m* false)					;; Only satellites can contribute to treasuries.
1177  (lightning-platform electricity true)
1178  (ice-platform frost true)
1179  (meteor-platform meteors true)
1180)
1181
1182(table takes-from-treasury
1183  (u* m* false)					;; Only control stations can draw from treasuries.
1184  (lightning-controller electricity true)
1185  (hailstorm-controller frost true)
1186  (meteor-controller meteors true)
1187)
1188
1189(table unit-consumption-per-size
1190  ;; Should have different consumption at different levels, but that would
1191  ;; require the entire food supply to be re-worked!
1192  (bases food 1)
1193)
1194
1195(table unit-consumption-to-grow
1196  ;; (bases food 25)		;; Might need to play around with this number.
1197
1198  (base-1 food 60)
1199  (base-2 food 50)
1200  (base-3 food 40)
1201  (base-4 food 30)
1202  (base-5 food 20)
1203  (base-6 food 10)
1204)
1205
1206(table base-consumption
1207  (u* fuel 1)			;; All units require fuel...
1208  (places m* 0)			;; ...except places...
1209  (undead m* 0)			;; ...and undead.
1210  (facilities fuel 0)
1211  (satellites fuel 0)
1212)
1213
1214(table consumption-as-occupant
1215  (u* fuel 0)
1216)
1217
1218(table material-to-move
1219  ;; This is supposed to be unnecessary, but without this declaration, units
1220  ;; can move around even if they run out of fuel.
1221  (movers fuel 1)
1222  (undead fuel 0)
1223)
1224
1225(table consumption-per-move
1226  (movers fuel 1)
1227  (undead fuel 0)
1228)
1229
1230(table consumption-per-attack
1231  (u* ammo 1)			;; Almost everything fires ordinary bullets up close.
1232
1233  ;; But some units can just punch their enemies with iron fists...
1234  (cacofiend ammo 0)
1235  (undead ammo 0)
1236
1237  ;; ...or they use a different ammunition...
1238  (acidic ammo 0)
1239  (burning ammo 0)
1240  (freezing ammo 0)
1241  (electrical ammo 0)
1242
1243  (acidic acid 1)
1244  (burning flame 1)
1245  (freezing frost 1)
1246  (electrical electricity 1)
1247
1248
1249  (engineer ammo 0)		;; Engineers don't attack; they "clear".
1250)
1251
1252(table consumption-per-fire
1253  (tower ammo 1)
1254  (military-1 ammo 1)
1255  (military-2 ammo 1)
1256
1257  ;; The Level 3 military units are a little more interesting!
1258  (air electricity 1)
1259  (water electricity 1)
1260  (fire flame 1)
1261
1262  ;; Every kind of artillery uses a different ammunition
1263  (howitzer ammo 1)
1264  (acidic acid 1)
1265  (burning flame 1)
1266  (electrical electricity 1)
1267  (freezing frost 1)
1268  (pulse-cannon ammo 1)
1269
1270  ;; Controllers work like artillery, but their ammunition comes from above.
1271  (lightning-controller electricity 1)
1272  (hailstorm-controller frost 1)
1273  (meteor-platform meteors 1)
1274)
1275
1276(table hit-by
1277  (u* ammo 1)
1278  (u* acid 1)
1279  (u* flame 1)
1280  (u* electricity 1)
1281  (u* frost 1)
1282)
1283
1284(table unit-initial-supply
1285  ;; Start fully armed and fueled, but work for the rest.
1286  ;; (may need some limitations)
1287  (u* fuel 1000)
1288  (u* ammo 1000)
1289
1290  ;; Wrecks are always full of scrap metal.
1291  (wrecks scrap 9999)
1292)
1293
1294(table supply-on-completion
1295  ;; This seems to be necessary because of the time.g-like upgrade mechanism.
1296  ;; If a newly-completed base does not start off with at least one unit of
1297  ;; food, it will starve before it can start farming.
1298  (bases food 1)
1299)
1300
1301(table hp-per-starve
1302  ;; Most units will not die if they run out of fuel; they will just be
1303  ;; immobilized.  Aircraft, however, crash and die instantly if they run out
1304  ;; of fuel and cannot land safely.  Helicopters are exempt because they can
1305  ;; land anywhere.
1306  ;; (shouldn't helicopters die if they run out of fuel over water?)
1307  (aircraft fuel 100.00)
1308  (choplifter fuel 0.00)
1309  (helicopter fuel 0.00)
1310
1311  (wrecks scrap 100.00)
1312)
1313
1314;; Centipedes gather metal by collecting it from wrecks.
1315;; They can then use them to create "undead" units.
1316
1317(table acp-to-extract
1318  (centipede scrap 1)
1319)
1320
1321;;; CONSTRUCTION
1322
1323(table can-create
1324  ;; A base can build anything except bases, towers, and undead robots.
1325  (bases places 0)
1326  (bases undead 0)
1327
1328  #| This has been obsoleted by the change-type mechanism.
1329  (base-1 base-2 1)
1330  (base-2 base-3 1)
1331  (base-3 base-4 1)
1332  (base-4 base-5 1)
1333  (base-5 base-6 1)
1334  |#
1335
1336  (bases facilities-1 1)
1337
1338  (bases constructors 1)
1339
1340  ;; (bases transports 1)
1341  (bases boat 1)
1342  ((base-2 base-3 base-4 base-5 base-6) carrier 1)
1343  ((base-2 base-3 base-4 base-5 base-6) choplifter 1)
1344  ((base-3 base-4 base-5 base-6) platform 1)
1345  ((base-4 base-5 base-5) mothership 1)
1346
1347  ((base-1 base-2 base-3 base-4 base-5 base-6) military-1 1)
1348  ((base-2 base-3 base-4 base-5 base-6) military-2 1)
1349  ((base-3 base-4 base-5 base-6) military-3 1)
1350  ((base-4 base-5 base-6) military-4 1)
1351  ((base-5 base-6) military-5 1)
1352  (base-6 military-6 1)
1353
1354  ;; Only Level 3 or higher bases have access to advanced artillery and supplies.
1355  (bases howitzer 1)
1356  ((base-3 base-4 base-5 base-6) artillery 1)
1357  ((base-3 base-4 base-5 base-6) facilities-2 1)
1358  (bases explosives-1 1)
1359  ((base-3 base-4 base-5 base-6) explosives-2 1)
1360  (base-3 magma-drill 0)
1361
1362  ((base-3 base-4 base-5 base-6) controllers 1)
1363  ((base-3 base-4 base-5 base-6) satellites 1)
1364
1365  ;; A valar can build anything that a base can (up to Level 4 military units).
1366  (valar u* 1)
1367  (valar places 0)
1368  (valar military-5 0)
1369  (valar military-6 0)
1370  (valar undead 0)
1371
1372  ;; A tower can only build explosives.
1373  (tower explosives-1 4)
1374  (tower explosives-2 4)
1375  (tower facilities-2 4)
1376
1377  ;; Engineers can build places.
1378  ; (engineer places 3)
1379  (engineer base-1 3)
1380  (engineer tower 3)
1381  (engineer ruins 0)
1382
1383  ;; Platforms can be equipped to produce some explosives.
1384  (platform explosives-1 3)
1385  (platform explosives-2 3)
1386  (platform orb 0)
1387
1388  ;; Only miners can lay minefields.
1389  (u* mine 0)
1390  (miner mine 3)
1391
1392  ;; Tanks can be equipped to build cruise missiles.
1393  (tank rocket 4)
1394
1395  ;; Centipedes collect scrap metal and create undead robots.
1396  (centipede undead 3)
1397
1398) ;  (anything else?)
1399
1400(table can-build
1401  ;; A base can build anything except bases and towers.
1402  (bases u* 1)
1403  (bases places 0)
1404  (bases undead 0)
1405
1406  #|
1407  (base-1 base-2 1)
1408  (base-2 base-3 1)
1409  (base-3 base-4 1)
1410  (base-4 base-5 1)
1411  (base-5 base-6 1)
1412  |#
1413
1414  ;; A valar can build anything that a base can (up to Level 4 military units).
1415  (valar u* 1)
1416  (valar places 0)
1417  (valar military-5 0)
1418  (valar military-6 0)
1419  (valar undead 0)
1420
1421  ;; A tower can only build explosives.
1422  (tower explosives-1 4)
1423  (tower explosives-2 4)
1424  (tower facilities-2 4)
1425
1426  ;; Engineers can build places.
1427  (engineer places 3)
1428  (engineer ruins 0)
1429
1430  ;; Only miners can lay minefields.
1431  (u* mine 0)
1432  (miner mine 3)
1433
1434  ;; Platforms can be equipped to produce some explosives.
1435  (platform explosives-1 3)
1436  (platform explosives-2 3)
1437  (platform orb 0)
1438
1439  ;; Tanks can be equipped to build cruise missiles.
1440  (tank rocket 4)
1441
1442  ;; Centipedes collect scrap metal and create undead robots.
1443  (centipede undead 3)
1444
1445) ;  (anything else?)
1446
1447(table acp-to-create
1448  ;; A base can build anything except bases, towers, and undead robots.
1449  (bases places 0)
1450  (bases undead 0)
1451
1452  #| This has been obsoleted by the change-type mechanism.
1453  (base-1 base-2 1)
1454  (base-2 base-3 1)
1455  (base-3 base-4 1)
1456  (base-4 base-5 1)
1457  (base-5 base-6 1)
1458  |#
1459
1460  (bases facilities-1 1)
1461
1462  (bases constructors 1)
1463
1464  ;; (bases transports 1)
1465  (bases boat 1)
1466  ((base-2 base-3 base-4 base-5 base-6) carrier 1)
1467  ((base-2 base-3 base-4 base-5 base-6) choplifter 1)
1468  ((base-3 base-4 base-5 base-6) platform 1)
1469  ((base-4 base-5 base-5) mothership 1)
1470
1471  ((base-1 base-2 base-3 base-4 base-5 base-6) military-1 1)
1472  ((base-2 base-3 base-4 base-5 base-6) military-2 1)
1473  ((base-3 base-4 base-5 base-6) military-3 1)
1474  ((base-4 base-5 base-6) military-4 1)
1475  ((base-5 base-6) military-5 1)
1476  (base-6 military-6 1)
1477
1478  ;; Only Level 3 or higher bases have access to advanced artillery and supplies.
1479  (bases howitzer 1)
1480  ((base-3 base-4 base-5 base-6) artillery 1)
1481  ((base-3 base-4 base-5 base-6) facilities-2 1)
1482  (bases explosives-1 1)
1483  ((base-3 base-4 base-5 base-6) explosives-2 1)
1484  (base-3 magma-drill 0)
1485
1486  ((base-3 base-4 base-5 base-6) controllers 1)
1487  ((base-3 base-4 base-5 base-6) satellites 1)
1488
1489  ;; A valar can build anything that a base can (up to Level 4 military units).
1490  (valar u* 1)
1491  (valar places 0)
1492  (valar military-5 0)
1493  (valar military-6 0)
1494  (valar undead 0)
1495
1496  ;; A tower can only build explosives.
1497  (tower explosives-1 4)
1498  (tower explosives-2 4)
1499  (tower facilities-2 4)
1500
1501  ;; Engineers can build places.
1502  ; (engineer places 3)
1503  (engineer base-1 3)
1504  (engineer tower 3)
1505  (engineer ruins 0)
1506
1507  ;; Platforms can be equipped to produce some explosives.
1508  (platform explosives-1 3)
1509  (platform explosives-2 3)
1510  (platform orb 0)
1511
1512  ;; Only miners can lay minefields.
1513  (u* mine 0)
1514  (miner mine 3)
1515
1516  ;; Tanks can be equipped to build cruise missiles.
1517  (tank rocket 4)
1518
1519  ;; Centipedes collect scrap metal and create undead robots.
1520  (centipede undead 3)
1521
1522) ;  (anything else?)
1523
1524(table acp-to-build
1525  ;; A base can build anything except bases and towers.
1526  (bases u* 1)
1527  (bases places 0)
1528  (bases undead 0)
1529
1530  #|
1531  (base-1 base-2 1)
1532  (base-2 base-3 1)
1533  (base-3 base-4 1)
1534  (base-4 base-5 1)
1535  (base-5 base-6 1)
1536  |#
1537
1538  ;; A valar can build anything that a base can (up to Level 4 military units).
1539  (valar u* 1)
1540  (valar places 0)
1541  (valar military-5 0)
1542  (valar military-6 0)
1543  (valar undead 0)
1544
1545  ;; A tower can only build explosives.
1546  (tower explosives-1 4)
1547  (tower explosives-2 4)
1548  (tower facilities-2 4)
1549
1550  ;; Engineers can build places.
1551  (engineer places 3)
1552  (engineer ruins 0)
1553
1554  ;; Only miners can lay minefields.
1555  (u* mine 0)
1556  (miner mine 3)
1557
1558  ;; Platforms can be equipped to produce some explosives.
1559  (platform explosives-1 3)
1560  (platform explosives-2 3)
1561  (platform orb 0)
1562
1563  ;; Tanks can be equipped to build cruise missiles.
1564  (tank rocket 4)
1565
1566  ;; Centipedes collect scrap metal and create undead robots.
1567  (centipede undead 3)
1568
1569) ;  (anything else?)
1570
1571(table create-range
1572  (places mine 3)
1573  (miner mine 1)
1574  (engineer wall 1)
1575)
1576
1577(table build-range
1578  (places mine 3)
1579  (miner mine 1)
1580  (engineer wall 1)
1581)
1582
1583(table consumption-per-built
1584  (u* metal 1)			;; by default
1585
1586  (constructors metal 1)
1587  (transports metal 1)
1588  (military-1 metal 1)
1589  (military-2 metal 2)
1590  (military-4 metal 3)
1591
1592  (undead metal 0)
1593  (undead scrap 1)
1594
1595  (artillery metal 2)
1596  (controllers metal 2)
1597  (explosives-1 metal 1)
1598  (acid-ball acid 2)
1599  (firebomb flame 2)
1600  (magma-drill metal 4)
1601
1602  (facilities metal 1)
1603  (satellites metal 2)
1604
1605  (places metal 1)
1606)
1607
1608;;; TECHNOLOGY
1609
1610;; Bases and towers can develop units; nothing else can.
1611
1612(table acp-to-develop
1613  (bases u* 1)
1614
1615  (bases bases 0)	;; By default
1616
1617  #| Obsoleted!
1618  (base-1 base-2 1)
1619  (base-2 base-3 1)
1620  (base-3 base-4 1)
1621  (base-4 base-5 1)
1622  (base-5 base-6 1)
1623  |#
1624
1625  (tower explosives-1 4)
1626  (tower explosives-2 4)
1627  (engineer base-1 3)
1628  (engineer tower 3)
1629  (centipede undead 3)
1630)
1631
1632(table tech-per-develop
1633  (u* u* 1.00)
1634)
1635
1636#| Obsoleted!
1637(add base-1 tech-to-build 100)
1638(add base-2 tech-to-build 150)
1639(add base-3 tech-to-build 200)
1640(add base-4 tech-to-build 250)
1641(add base-5 tech-to-build 300)
1642(add base-6 tech-to-build 350)
1643|#
1644
1645; (add tower tech-to-build 50)
1646
1647(add engineer tech-to-build 25)
1648(add miner tech-to-build 20)
1649
1650(add boat tech-to-build 10)
1651(add carrier tech-to-build 100)
1652(add choplifter tech-to-build 100)
1653(add platform tech-to-build 50)
1654(add mothership tech-to-build 200)
1655
1656(add tank tech-to-build 50)
1657(add battledroid tech-to-build 10)
1658(add destroyer tech-to-build 20)
1659(add minesweeper tech-to-build 20)
1660
1661(add spy-plane tech-to-build 60)
1662(add helicopter tech-to-build 125)
1663(add bomber tech-to-build 75)
1664(add fighter tech-to-build 50)
1665(add battleship tech-to-build 30)
1666(add submarine tech-to-build 50)
1667(add battlebot-1 tech-to-build 15)
1668(add battlebot-2 tech-to-build 20)
1669(add battlebot-3 tech-to-build 25)
1670
1671(add werewolf tech-to-build 75)
1672(add spider tech-to-build 100)
1673(add doppleganger tech-to-build 115)
1674(add ankheg tech-to-build 150)
1675
1676(add centipede tech-to-build 150)
1677(add air tech-to-build 200)
1678(add water tech-to-build 200)
1679(add earth tech-to-build 200)
1680(add fire tech-to-build 200)
1681(add cacofiend tech-to-build 400)
1682
1683(add phoenix tech-to-build 300)
1684(add stormcloud tech-to-build 400)
1685
1686(add valar tech-to-build 800)
1687(add dark-valar tech-to-build 800)
1688
1689(add zombie tech-to-build 20)
1690
1691(add howitzer tech-to-build 25)
1692(add acid-gun tech-to-build 80)
1693(add flame-gun tech-to-build 80)
1694(add lightning-gun tech-to-build 80)
1695(add frost-gun tech-to-build 80)
1696(add pulse-cannon tech-to-build 80)
1697(add anti-aircraft tech-to-build 40)
1698
1699(add lightning-controller tech-to-build 160)
1700(add meteor-controller tech-to-build 160)
1701(add hailstorm-controller tech-to-build 160)
1702
1703(add rocket tech-to-build 25)
1704(add orb tech-to-build 75)
1705
1706(add acid-ball tech-to-build 100)
1707(add firebomb tech-to-build 100)
1708(add magma-drill tech-to-build 200)
1709
1710(add acid-factory tech-to-build 20)
1711(add oil-plant tech-to-build 20)
1712(add solar-complex tech-to-build 20)
1713(add ice-factory tech-to-build 20)
1714
1715(add lightning-platform tech-to-build 150)
1716(add meteor-platform tech-to-build 150)
1717(add ice-platform tech-to-build 150)
1718
1719#|
1720(add base-1 tech-max 100)
1721(add base-2 tech-max 150)
1722(add base-3 tech-max 200)
1723(add base-4 tech-max 250)
1724(add base-5 tech-max 300)
1725(add base-6 tech-max 350)
1726
1727(add tower tech-max 50)
1728|#
1729
1730(add engineer tech-max 25)
1731(add miner tech-max 20)
1732
1733(add boat tech-max 10)
1734(add carrier tech-max 100)
1735(add choplifter tech-max 100)
1736(add platform tech-max 50)
1737(add mothership tech-max 200)
1738
1739(add tank tech-max 50)
1740(add battledroid tech-max 10)
1741(add destroyer tech-max 20)
1742(add minesweeper tech-max 20)
1743
1744(add spy-plane tech-max 60)
1745(add helicopter tech-max 125)
1746(add bomber tech-max 75)
1747(add fighter tech-max 50)
1748(add battleship tech-max 30)
1749(add submarine tech-max 50)
1750(add battlebot-1 tech-max 15)
1751(add battlebot-2 tech-max 20)
1752(add battlebot-3 tech-max 25)
1753
1754(add werewolf tech-max 75)
1755(add spider tech-max 100)
1756(add doppleganger tech-max 115)
1757(add ankheg tech-max 150)
1758
1759(add centipede tech-max 150)
1760(add air tech-max 200)
1761(add water tech-max 200)
1762(add earth tech-max 200)
1763(add fire tech-max 200)
1764(add cacofiend tech-max 400)
1765
1766(add phoenix tech-max 300)
1767(add stormcloud tech-max 400)
1768
1769(add valar tech-max 800)
1770(add dark-valar tech-max 800)
1771
1772(add zombie tech-max 20)
1773
1774(add howitzer tech-max 25)
1775(add acid-gun tech-max 80)
1776(add flame-gun tech-max 80)
1777(add lightning-gun tech-max 80)
1778(add frost-gun tech-max 80)
1779(add pulse-cannon tech-max 80)
1780(add anti-aircraft tech-max 40)
1781
1782(add lightning-controller tech-max 160)
1783(add meteor-controller tech-max 160)
1784(add hailstorm-controller tech-max 160)
1785
1786(add rocket tech-max 25)
1787(add orb tech-max 75)
1788
1789(add acid-ball tech-max 100)
1790(add firebomb tech-max 100)
1791(add magma-drill tech-max 200)
1792
1793(add acid-factory tech-max 20)
1794(add oil-plant tech-max 20)
1795(add solar-complex tech-max 20)
1796(add ice-factory tech-max 20)
1797
1798(add lightning-platform tech-max 150)
1799(add meteor-platform tech-max 150)
1800(add ice-platform tech-max 150)
1801
1802
1803(table can-toolup-for
1804  (bases u* true)
1805  (tower u* true)
1806  (engineer u* true)
1807  (platform u* true)
1808  (tank u* true)
1809  (valar u* true)
1810)
1811
1812(table acp-to-toolup
1813  (bases u* 1)
1814  (tower u* 4)
1815  (engineer u* 3)
1816  (platform u* 3)
1817  (tank u* 4)
1818  (valar u* 1)
1819)
1820
1821(table tp-per-toolup
1822  (u* u* 1)
1823)
1824
1825(table tp-to-build
1826  #| This didn't work very well anyway...
1827  (u* base-1 10)
1828  (u* base-2 12)
1829  (u* base-3 14)
1830  (u* base-4 16)
1831  (u* base-5 18)
1832  (u* base-6 20)
1833
1834  (u* tower 10)
1835  |#
1836
1837  (u* engineer 10)
1838  (u* miner 15)
1839
1840  (u* boat 2)
1841  (u* carrier 8)
1842  (u* choplifter 15)
1843  (u* mothership 50)
1844
1845  (u* tank 30)
1846  (u* battledroid 5)
1847  (u* destroyer 5)
1848  (u* minesweeper 10)
1849
1850  (u* spy-plane 30)
1851  (u* helicopter 20)
1852  (u* bomber 15)
1853  (u* fighter 10)
1854  (u* battleship 5)
1855  (u* submarine 6)
1856  (u* battlebot-1 1)
1857  (u* battlebot-2 2)
1858  (u* battlebot-3 3)
1859
1860  (u* werewolf 15)
1861  (u* spider 25)
1862  (u* doppleganger 25)
1863  (u* ankheg 30)
1864
1865  (u* centipede 40)
1866  (u* air 60)
1867  (u* water 60)
1868  (u* earth 60)
1869  (u* fire 60)
1870  (u* cacofiend 120)
1871
1872  (u* phoenix 120)
1873  (u* stormcloud 120)
1874
1875  (u* valar 200)
1876  (u* dark-valar 200)
1877
1878  (u* zombie 10)
1879
1880  (u* howitzer 10)
1881  (u* acid-gun 20)
1882  (u* flame-gun 20)
1883  (u* lightning-gun 20)
1884  (u* frost-gun 20)
1885  (u* pulse-cannon 20)
1886  (u* anti-aircraft 15)
1887
1888  (u* lightning-controller 40)
1889  (u* meteor-controller 40)
1890  (u* hailstorm-controller 40)
1891
1892  (u* rocket 20)
1893  (u* orb 30)
1894
1895  (u* acid-ball 50)
1896  (u* firebomb 50)
1897  (u* magma-drill 100)
1898
1899  ;; Just to make the "Help" screen a little clearer...
1900  (places places 0)
1901  (tower aircraft 0)
1902  (tower naval 0)
1903  (tower walkers 0)
1904  (tower wheeled 0)
1905
1906  (platform aircraft 0)
1907  (platform naval 0)
1908  (platform walkers 0)
1909  (platform wheeled 0)
1910)
1911
1912(table tp-max
1913  #|
1914  (u* base-1 10)
1915  (u* base-2 12)
1916  (u* base-3 14)
1917  (u* base-4 16)
1918  (u* base-5 18)
1919  (u* base-6 20)
1920
1921  (u* tower 10)
1922  |#
1923
1924  (u* engineer 10)
1925  (u* miner 15)
1926
1927  (u* boat 2)
1928  (u* carrier 8)
1929  (u* choplifter 15)
1930  (u* mothership 50)
1931
1932  (u* tank 30)
1933  (u* battledroid 5)
1934  (u* destroyer 5)
1935  (u* minesweeper 10)
1936
1937  (u* spy-plane 30)
1938  (u* helicopter 20)
1939  (u* bomber 15)
1940  (u* fighter 10)
1941  (u* battleship 5)
1942  (u* submarine 6)
1943  (u* battlebot-1 1)
1944  (u* battlebot-2 2)
1945  (u* battlebot-3 3)
1946
1947  (u* werewolf 15)
1948  (u* spider 25)
1949  (u* doppleganger 25)
1950  (u* ankheg 30)
1951
1952  (u* centipede 40)
1953  (u* air 60)
1954  (u* water 60)
1955  (u* earth 60)
1956  (u* fire 60)
1957  (u* cacofiend 120)
1958
1959  (u* phoenix 120)
1960  (u* stormcloud 120)
1961
1962  (u* valar 200)
1963  (u* dark-valar 200)
1964
1965  (u* zombie 10)
1966
1967  (u* howitzer 10)
1968  (u* acid-gun 20)
1969  (u* flame-gun 20)
1970  (u* lightning-gun 20)
1971  (u* frost-gun 20)
1972  (u* pulse-cannon 20)
1973  (u* anti-aircraft 15)
1974
1975  (u* lightning-controller 40)
1976  (u* meteor-controller 40)
1977  (u* hailstorm-controller 40)
1978
1979  (u* rocket 20)
1980  (u* orb 30)
1981
1982  (u* acid-ball 50)
1983  (u* firebomb 50)
1984  (u* magma-drill 100)
1985
1986  ;; Just to make the "Help" screen a little clearer...
1987  (places places 0)
1988  (tower aircraft 0)
1989  (tower naval 0)
1990  (tower walkers 0)
1991  (tower wheeled 0)
1992
1993  (platform aircraft 0)
1994  (platform naval 0)
1995  (platform walkers 0)
1996  (platform wheeled 0)
1997)
1998
1999;; Change-type; new to version 3.
2000
2001(add base-1 auto-upgrade-to base-2)
2002(add base-2 auto-upgrade-to base-3)
2003(add base-3 auto-upgrade-to base-4)
2004(add base-4 auto-upgrade-to base-5)
2005(add base-5 auto-upgrade-to base-6)
2006
2007;; Since I cannot use tech to restrict the use of change-type, I use base size
2008;; instead.  However, these numbers may need to be adjusted for playability.
2009
2010(table size-to-change-type
2011  (base-1 base-2 6)
2012  (base-2 base-3 12)
2013  (base-3 base-4 24)
2014  (base-4 base-5 48)
2015  (base-5 base-6 96)
2016)
2017
2018;;; TERRAIN ENGINEERING
2019
2020(table acp-to-add-terrain
2021  (engineer road 3)
2022  (engineer river 3)
2023  (engineer steppe 2)
2024  (engineer plain 2)
2025  (engineer forest 2)
2026
2027  (valar t* 1)
2028)
2029
2030(table acp-to-remove-terrain
2031  (engineer road 3)
2032  (engineer river 3)
2033
2034  (engineer semi-desert 1)
2035  (engineer desert 1)
2036
2037  (valar t* 1)
2038)
2039
2040;;; COMBAT
2041
2042(table acp-to-attack
2043  (u* u* 0)
2044  (tower u* 1)
2045  (military-1 u* 1)
2046  (military-2 u* 1)
2047  (military-3 u* 1)
2048  (military-4 u* 1)
2049  (military-5 u* 1)
2050  (military-6 u* 1)
2051
2052  (centipede wrecks 0)	;; Centipedes have more use for wrecks than anyone else.
2053
2054  (engineer wrecks 1)
2055  ;; Artillery, controllers, and explosives are excluded because they attack differently.
2056)
2057
2058(add tower acp-to-fire 2)
2059(add tank acp-to-fire 2)
2060(add helicopter acp-to-fire 2)
2061(add battleship acp-to-fire 2)
2062(add air acp-to-fire 2)
2063(add water acp-to-fire 2)
2064(add fire acp-to-fire 2)
2065(add phoenix acp-to-fire 2)
2066(add stormcloud acp-to-fire 2)
2067(add valar acp-to-fire 2)
2068(add dark-valar acp-to-fire 2)
2069
2070(add artillery acp-to-fire 1)
2071(add controllers acp-to-fire 1)
2072
2073(add tower range 8)
2074(add tank range 4)
2075(add helicopter range 3)
2076(add battleship range 4)
2077(add air range 4)
2078(add water range 4)
2079(add fire range 4)
2080(add phoenix range 4)
2081(add stormcloud range 6)
2082(add valar range 8)
2083(add dark-valar range 8)
2084
2085(add artillery range 6)
2086(add controllers range 8)
2087
2088(add tower fire-angle-max 100)
2089(add helicopter fire-angle-max 100)
2090(add artillery fire-angle-max 50)
2091(add anti-aircraft fire-angle-max 100)	;; Aircraft fly; the terrain doesn't protect them from enemy fire.
2092
2093(table weapon-height
2094  (tower t* 10000)
2095  (aircraft t* 10000)
2096)
2097
2098(add explosives-1 acp-to-detonate 1)
2099(add explosives-2 acp-to-detonate 1)
2100(add explosives-1 hp-per-detonation 1)
2101(add explosives-2 hp-per-detonation 1)
2102(add mine detonate-on-death 100)
2103;; Should some things explode when they die?
2104
2105(table hit-chance
2106  (u* u* 50)
2107  (u* aircraft 25)
2108
2109  ;; Certain units are built to kill aircraft.
2110  (fighter aircraft 75)
2111  (anti-aircraft aircraft 75)
2112
2113  (u* places 75)	;; Most stationery targets are very easy to hit.
2114  (u* wall 100)		;; Walls are stationery and very hard to miss.
2115  (u* ruins 100)	;; Likewise for ruins.
2116
2117  (u* mine 100)
2118) ; (should elaborate?)
2119
2120(table capture-chance
2121  ;; Undead are excluded because they (theoretically) only have the power to destroy.
2122  (military-1 bases 20)
2123  (military-2 bases 40)
2124  (military-3 bases 60)
2125  (military-4 bases 80)
2126  (military-5 bases 90)
2127  (military-6 bases 100)
2128  (tank bases 50)
2129
2130  ;; Whenever a place is captured, so are its facilities (but not its satellites).
2131  (military-1 facilities 100)
2132  (military-2 facilities 100)
2133  (military-3 facilities 100)
2134  (military-4 facilities 100)
2135  (military-5 facilities 100)
2136  (military-6 facilities 100)
2137
2138  ;; Boats and aircraft can't capture.
2139  (aircraft bases 0)
2140  (naval bases 0)
2141  ;; But helicopters can.
2142  (helicopter bases 50)
2143)
2144
2145(table independent-capture-chance
2146  ;; Anything without a commander is easy to take over.
2147  ;; (why doesn't this work?)
2148  (military-1 u* 100)
2149  (military-2 u* 100)
2150  (military-3 u* 100)
2151  (military-4 u* 100)
2152  (military-5 u* 100)
2153  (military-6 u* 100)
2154
2155  (aircraft u* 0)
2156  (naval u* 0)
2157  (helicopter u* 100)
2158)
2159
2160(table occupant-escape-chance
2161  ;; All units are smart enough to bail out if they're in something that's
2162  ;; about to be captured or destroyed.
2163  (u* u* 100)
2164)
2165
2166(table damage
2167  (u* u* 1d6)			;; By default
2168
2169
2170  (transports u* 1d4)		;; Most transports have minimal defensive capability.
2171  (mothership u* 1d6)		;; But motherships are built for survival.
2172
2173  (submarine naval 2d6)		;; Submarines use surprise to do double damage!
2174  (submarine submarine 1d6)	;; But they can't sneak up on other submarines so easily.
2175  (submarine destroyer 1d6)	;; Destroyers are built to hunt and kill subs; they are difficult to catch unaware.
2176
2177  (destroyer submarine 2d6)	;; Destroyers are most skilled at destryoing subs.
2178
2179  (fighter aircraft 3d4)	;; Fighters eat other aircraft for lunch!
2180
2181  (spider u* 4d6)		;; Spiders rust their opponents, making them quite dangerous.
2182  (spider gaseous 1d6)		;; But rust is not effective against gaseous creatures.
2183  (spider wet 1d6)		;; Nor against water-based creatures.
2184  (spider firey 1d6)		;; Nor against fire-bases creatures.
2185  (spider nonmetallic 1d6)	;; Nor against non-metallic creatures.
2186
2187  (doppleganger u* 3d6)		;; Dopplegangers have melee abilities far beyond those of ordinary battledroids.
2188
2189  (earth u* 4d4)		;; Earth robots can slam their foes.
2190  (cacofiend u* 6d4)		;; Cacofiends can slam their foes with 16-ton arms!
2191
2192  (valar u* 7d6)		;; The valar blasts everything it hits!
2193  (dark-valar u* 7d6)		;; As does the dark valar!
2194
2195  (engineer wall 6d6)		;; A skilled demolisher can destroy a wall very quickly.
2196  (engineer wrecks 6d6)		;; Likewise for wrecks and ruins.
2197
2198  (undead u* 2d4)		;; Undead are a little more fearsome than your ordinary battledroid.
2199
2200  (acidic u* 4d6)		;; Acid hurts almost everything.
2201  (acidic air 2d6)		;; But not air robots.
2202  (acidic water 2d6)		;; Nor water robots.
2203
2204  (burning u* 4d4)		;; Fire is slightly more painful to most things.
2205  (burning wet 7d4)		;; But especially to water robots.
2206
2207  (electrical u* 4d6)		;; Electricity is disastrous to electronics.
2208  (electrical wall 2d6)		;; But not to walls.
2209  (electrical firey 2d6)	;; Nor to fire.
2210  (electrical nonmetallic 2d6)	;; Nor to earth.
2211
2212  (freezing u* 2d6)		;; Frost is a minor hazard to most.
2213  (freezing gaseous 4d6)	;; But is very painful to air.
2214  (freezing wet 7d4)		;; And crippling to water.
2215  (freezing firey 7d6)		;; And devastating to fire.
2216
2217  (u* fireshielded 1d2)		;; Fire-shielded units are highly resistant to nearly everything.
2218  (acidic fireshielded 1d4)	;; Acid is somewhat more effective against them.
2219  (burning fireshielded 0)	;; Fire has no effect on such a unit.
2220  (freezing fireshielded 6d6)	;; Cold-based weapons are their natural enemy.
2221  (electrical fireshielded 1d6)	;; Electrical weapons are relatively effective against them.
2222)
2223
2224;; The numers below may need a little more work; so far, the games goes too fast to build and test any of the more powerful units.
2225(table fire-damage
2226  (u* u* 1d6)			;; By default
2227  (howitzer u* 2d6)		;; Howitzers are very painful vs. everything (although others may be even more so).
2228
2229  (pulse-cannon u* 200)		;; A shockwave will blast anything if it can't back away.
2230
2231  (anti-aircraft aircraft 3d4)	;; Anti-aircraft guns eat aircraft for lunch!
2232
2233  (acidic u* 4d6)		;; Acid hurts almost everything.
2234  (acidic gaseous 2d6)		;; But not air.
2235  (acidic wet 2d6)		;; Nor water.
2236
2237  (burning u* 4d4)		;; Fire is slightly more painful to most things.
2238  (burning wet 7d4)		;; But especially to water robots.
2239
2240  (electrical u* 4d6)		;; Electricity is disastrous to electronics.
2241  (electrical wall 2d6)		;; But not to walls.
2242  (electrical firey 2d6)	;; Nor to fire.
2243  (electrical nonmetallic 2d6)	;; Nor to earth.
2244
2245  (freezing u* 2d6)		;; Frost is a minor hazard to most.
2246  (freezing gaseous 4d6)	;; But is very painful to air.
2247  (freezing wet 7d4)		;; And crippling to water.
2248  (freezing firey 7d6)		;; And devastating to fire.
2249
2250  (meteor-platform u* 7d6)	;; Nothing is resistant to falling boulders!
2251
2252  (u* fireshielded 1d2)		;; Fire-shielded units are highly resistant to nearly everything.
2253  (acidic fireshielded 1d4)	;; Acid is somewhat more effective against them.
2254  (burning fireshielded 0)	;; Fire has no effect on such a unit.
2255  (freezing fireshielded 6d6)	;; Cold-based weapons are their natural enemy.
2256  (electrical fireshielded 1d6)	;; Electrical weapons are relatively effective against them.
2257)
2258
2259(table attack-terrain-effect
2260  ;; Few units are affected by terrain, combat-wise, but there are some that
2261  ;; cannot function properly in certain terrain.
2262
2263  ;; Ankhegs are only effective in the wide open spaces.
2264  (ankheg forest 0.25)
2265  (ankheg semi-desert 0.75)
2266  (ankheg desert 0.50)
2267  (ankheg mountain 0.05)
2268  (ankheg t-water 0.00)
2269)
2270
2271;; (should define defend-terrain-effect?)
2272
2273(table detonation-unit-range
2274  (mine u* 1)
2275  (rocket u* 1)
2276  (orb u* 2)
2277  (acidic u* 3)
2278  (firebomb u* 3)
2279  (magma-drill u* 4)
2280)
2281
2282(table retreat-chance
2283  ;; A pulse cannon pushes its target back using a shockwave!
2284  (pulse-cannon movers 100)
2285  (pulse-cannon undead 0)	;; Undead are too dumb to escape (Come on, they need some kind of weakness!)
2286)
2287
2288(table acp-for-retreat
2289  ;; A shockwave from a pulse cannon can even throw the target into hostile terrain!
2290  (pulse-cannon movers 999)
2291)
2292
2293;; Detonation damage should be a dice spec like everything else, but Xconq doesn't support it.
2294
2295(table detonation-damage-at
2296  (mine u* 25)
2297  (mine minesweeper 0)
2298  (rocket u* 50)
2299  (rocket places 100)
2300  (orb u* 100)
2301  (orb places 200)
2302
2303  (acidic u* 300)
2304  (acidic air 50)
2305  (acidic water 50)
2306
2307  (burning u* 150)
2308  (burning water 200)
2309
2310  (magma-drill u* 400)
2311)
2312
2313(table detonation-damage-adjacent
2314  (mine u* 10)
2315  (mine minesweeper 0)
2316  (rocket u* 25)
2317  (rocket places 50)
2318  (orb u* 50)
2319  (orb places 100)
2320
2321  (acidic u* 50)
2322  (acidic air 25)
2323  (acidic water 25)
2324
2325  (burning u* 50)
2326  (burning water 100)
2327
2328  (magma-drill u* 200)	;; Lava flows are quite deadly
2329
2330  (u* aircraft 0)	;; Aircraft cannot be collateral damage from a missile strike; they must be targeted directly.
2331)
2332
2333(table detonation-terrain-damage-chance
2334  (mine t* 25)
2335  (rocket t* 50)
2336  (orb t* 75)
2337  (acidic t* 75)
2338  (burning t* 50)
2339  (magma-drill t* 100)
2340
2341  ;; Desert is indestructible, but magma drills can level mountains.
2342  (u* desert 0)
2343  (u* mountain 0)
2344  (u* lake 0)
2345  (u* sea 0)
2346  (u* ice 0)
2347  (magma-drill mountain 50)
2348)
2349
2350(table detonation-terrain-range
2351  (rocket t* 0)
2352  (orb t* 1)
2353  (acidic t* 2)
2354  (burning t* 2)
2355  (magma-drill t* 3)
2356)
2357
2358(table terrain-damaged-type
2359  (plain semi-desert 50)
2360  (steppe semi-desert 50)
2361  (forest steppe 75)
2362  (semi-desert desert 25)
2363  (swamp semi-desert 50)
2364  (salt-marsh desert 50)
2365  (mountain desert 50)
2366  (lake swamp 50)
2367  (sea salt-marsh 50)
2368
2369  ;; Need some way to produce effects such as flooding, fire, acid pools, and lava flows.
2370  ;; (especially if a glacier is destroyed, everything surounding it should be flooded for several turns)
2371)
2372
2373(table protection
2374  ;; A place cannot be captured if it has armed defenders.
2375  (military-1 places 0.00)
2376  (military-2 places 0.00)
2377  (military-3 places 0.00)
2378  (military-4 places 0.00)
2379  (military-5 places 0.00)
2380  (military-6 places 0.00)
2381
2382  ;; Missiles cannot be shot down if they're occupying a launcher (but the launcher can be destroyed)
2383  (u* explosives-1 0.00)
2384  (u* explosives-2 0.00)
2385) ;; (this should not provide protection against firing attacks, but apparently it does)
2386
2387;;; REPAIR
2388
2389(table auto-repair
2390  (bases u* 4.00)	;; (maybe should have different rates for different levels?)
2391  (tower u* 1.00)
2392
2393  (valar u* 3.00)
2394)
2395
2396(add bases hp-recovery 0.5)
2397(add tower hp-recovery 0.75)
2398
2399;;; VISION
2400
2401(add places see-always true)
2402
2403(add u* vision-range 4)
2404(add tower vision-range 8)
2405(add mothership vision-range 8)
2406(add valar vision-range 8)
2407(add dark-valar vision-range 8)
2408(add artillery vision-range 6)
2409(add explosives-1 vision-range 1)
2410(add explosives-2 vision-range 2)
2411
2412(add u* can-see-behind false)
2413(add places can-see-behind true)
2414(add aircraft can-see-behind true)
2415(add air can-see-behind true)
2416(add valar can-see-behind true)
2417(add dark-valar can-see-behind true)
2418
2419(table see-chance
2420  ;; Some units are built to avoid being seen, but they all have a weakness...
2421
2422  (u* mine 5)
2423  (minesweeper mine 75)
2424
2425  (u* spy-plane 10)
2426  (fighter spy-plane 75)
2427
2428  (u* submarine 5)
2429  (destroyer submarine 75)
2430
2431  (u* ankheg 5)			;; Ankhegs remain nigh-invisible until adjacent to an opponent.
2432
2433  (u* stormcloud 10)
2434  (fighter stormcloud 75)
2435)
2436
2437(table visibility
2438  ;; Make everything a little harder to see in rough terrain.
2439  (u* forest 0.5)
2440  (u* mountain 0.75)
2441)
2442
2443(table see-chance-adjacent
2444  ;; Places and units cannot be masked by terrain if they're right next to enemy eyes!
2445  (u* u* 200)
2446  ;; Mines, spy planes, submarines, etc. are normally hard to see, even up close.
2447  (u* mine 5)
2448  (minesweeper mine 75)
2449
2450  (u* spy-plane 10)
2451  (fighter spy-plane 75)
2452
2453  (u* submarine 5)
2454  (destroyer submarine 75)
2455
2456  (u* ankheg 100)
2457
2458  (u* stormcloud 10)
2459  (fighter stormcloud 75)
2460)
2461
2462(table see-mistake-chance
2463  (u* doppleganger 75)		;; Doppleganger are illusory.
2464)
2465
2466(table looks-like
2467  (doppleganger battledroid 1)	;; And they're much more dangerous than ordinary battledroids.
2468)
2469
2470;;; COMBAT EXPERIENCE
2471
2472(add u* cxp-max 10000)
2473(add bases cxp-max 0)
2474(add transports cxp-max 0)
2475;; Should other units gain CXP?
2476
2477(table cxp-per-combat
2478  (u* u* 1)
2479)
2480
2481(table hit-cxp-effect
2482  (u* u* 10000)
2483)
2484
2485(table damage-cxp-effect
2486  (u* u* 10000)
2487)
2488
2489;; Somehow, CXP should give units additional hitpoints.
2490
2491;;; BACKDROP
2492
2493(table road-into-chance
2494  (land land 100)
2495  ;; No roads across ice fields.
2496  (land-t* ice 0)
2497  ;; Try to get a road back out into the plains.
2498  (cell-t* (plain steppe) 100)
2499  ;; Be reluctant to run through hostile terrain.
2500  (plain (semi-desert desert forest mountain) (35 40 30 20))
2501  )
2502
2503(table road-chance
2504  ;; (bases (tower bases) (80 100))
2505  ;; (tower (tower bases) ( 2   5))
2506  (places places 80)
2507  )
2508
2509(add places road-to-edge-chance 100)
2510(add places spur-chance 100)
2511(add places spur-range 5)
2512
2513(set edge-road-density 100)
2514
2515(table attrition
2516  (wrecks t* 1.00)
2517)
2518
2519(add bases namer "swedish-place-names")
2520(add tower namer "swedish-place-names")
2521
2522(set feature-types '(peaks islands lakes bays seas continents
2523			    (desert 10)(semi-desert 10)(forest 10)(mountain 5)))
2524
2525(set feature-namers
2526  '((islands generic-island-names) (lakes generic-lake-names) (bays generic-bay-names)
2527  	(seas generic-sea-names) (continents generic-continent-names)
2528  	(desert generic-desert-names) (forest generic-forest-names)
2529  	(mountains generic-mountain-names)))
2530
2531;; If a side gives up, its forces don't just vanish.
2532(add u* lost-vanish-chance 0)
2533(add u* lost-revolt-chance 10000)
2534
2535
2536