(mchr, plchr, lchr, nchr): Move initializer to new builtin config

files ship.config, plane.config, land.config, nuke.config.
(empfile): Declare the new config files.
(install, installdirs): Install them.
(builtins): New make variable.
This commit is contained in:
Markus Armbruster 2006-02-19 09:15:46 +00:00
parent dae17432ae
commit b4161cd7e2
11 changed files with 341 additions and 652 deletions

View file

@ -52,6 +52,7 @@ csrc := $(filter %.c, $(src))
tsrc := $(filter %.t, $(src))
man1 := $(filter man/%.1, $(src))
man6 := $(filter man/%.6, $(src))
builtins := $(filter src/lib/global/%.config, $(src))
# Info topics and subjects
-include subjects.mk
@ -169,6 +170,7 @@ distclean: clean
install: all installdirs
$(INSTALL_PROGRAM) $(util) $(server) $(sbindir)
$(INSTALL_PROGRAM) $(client) $(bindir)
$(INSTALL) -m 444 $(builtins) $(builtindir)
$(INSTALL_DATA) $(info.nr) $(einfodir)
$(INSTALL_DATA) $(addprefix $(srcdir)/, $(man1)) $(mandir)/man1
$(INSTALL_DATA) $(addprefix $(srcdir)/, $(man6)) $(mandir)/man6
@ -188,7 +190,7 @@ install: all installdirs
.PHONY: installdirs
installdirs:
mkdir -p $(bindir) $(sbindir) $(gamedir) $(einfodir) $(mandir)/man1 $(mandir)/man6 $(dir $(econfig))
mkdir -p $(sbindir) $(bindir) $(builtindir) $(einfodir) $(mandir)/man1 $(mandir)/man6 $(dir $(econfig)) $(gamedir)
.PHONY: install-html
install-html: html | $(ehtmldir)

View file

@ -35,12 +35,10 @@
/*
* STILL TO DO
*
* 1. Change other constants - such as Num Countries etc.
* Change other constants - such as MAXNOC etc.
* Just requires variables to be assigned, then dynamic allocation in
* a few places. Some checks needed in the server to check the world
* hasn't changed size etc.
* 2. Could look at loading in planes, units etc. Should be easy enough.
*
*/
#include <config.h>
@ -48,13 +46,13 @@
#include <assert.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h> /* atoi free atol */
#include <stdlib.h>
#include <string.h>
#include "misc.h"
#include "file.h"
#include "optlist.h"
#include "gen.h" /* parse */
#include "gen.h"
/* Dummy one */
static int emp_config_dummy;

View file

@ -145,18 +145,28 @@ struct empfile empfile[] = {
UNMAPPED_CACHE(struct realmstr, EFF_OWNER)},
/* Static game data (configuration) */
{EF_SECTOR_CHR, "sect-chr", NULL, dchr_ca, ARRAY_TABLE(dchr, EFF_CFG)},
{EF_SHIP_CHR, "ship-chr", NULL, mchr_ca, ARRAY_CACHE(mchr, EFF_CFG)},
{EF_PLANE_CHR, "plane-chr", NULL, plchr_ca, ARRAY_CACHE(plchr, EFF_CFG)},
{EF_LAND_CHR, "land-chr", NULL, lchr_ca, ARRAY_CACHE(lchr, EFF_CFG)},
{EF_NUKE_CHR, "nuke-chr", NULL, nchr_ca, ARRAY_CACHE(nchr, EFF_CFG)},
{EF_NEWS_CHR, "news-chr", NULL, rpt_ca, ARRAY_TABLE(rpt, EFF_CFG)},
{EF_ITEM, "item", NULL, ichr_ca, ARRAY_TABLE(ichr, EFF_CFG)},
{EF_SECTOR_CHR, "sect-chr", NULL, dchr_ca,
ARRAY_TABLE(dchr, EFF_CFG)},
{EF_SHIP_CHR, "ship-chr", "ship.config", mchr_ca,
ARRAY_CACHE(mchr, EFF_CFG)},
{EF_PLANE_CHR, "plane-chr", "plane.config", plchr_ca,
ARRAY_CACHE(plchr, EFF_CFG)},
{EF_LAND_CHR, "land-chr", "land.config", lchr_ca,
ARRAY_CACHE(lchr, EFF_CFG)},
{EF_NUKE_CHR, "nuke-chr", "nuke.config", nchr_ca,
ARRAY_CACHE(nchr, EFF_CFG)},
{EF_NEWS_CHR, "news-chr", NULL, rpt_ca,
ARRAY_TABLE(rpt, EFF_CFG)},
{EF_ITEM, "item", NULL, ichr_ca,
ARRAY_TABLE(ichr, EFF_CFG)},
{EF_INFRASTRUCTURE, "infrastructure", NULL, intrchr_ca,
ARRAY_TABLE(intrchr, EFF_CFG)},
{EF_PRODUCT, "product", NULL, pchr_ca, ARRAY_TABLE(pchr, EFF_CFG)},
{EF_TABLE, "table", NULL, empfile_ca, ARRAY_TABLE(empfile, EFF_CFG)},
{EF_META, "meta", NULL, mdchr_ca, PTR_CACHE(mdchr_ca, EFF_CFG)},
{EF_PRODUCT, "product", NULL, pchr_ca,
ARRAY_TABLE(pchr, EFF_CFG)},
{EF_TABLE, "table", NULL, empfile_ca,
ARRAY_TABLE(empfile, EFF_CFG)},
{EF_META, "meta", NULL, mdchr_ca,
PTR_CACHE(mdchr_ca, EFF_CFG)},
/* Symbol tables */
#define SYMTAB(type, name, tab) \

View file

@ -38,180 +38,8 @@
#include "misc.h"
#include "land.h"
struct lchrstr lchr[] = {
/* name
lcm, hcm, mil, gun, shell, tech, $,
att, def, vul, spd, vis, spy, rad, frg, acc, dam, amm, aaf, fc, fu, xpl, mxl
flags, nv
cargo
*/
{{0, 20, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0},
"cav cavalry",
10, 5, 0, 0, 0, 30, 500,
1.2, 0.5, 80, 32, 18, 4, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,
L_RECON | L_LIGHT,
},
{{0, 25, 1, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0},
"linf light infantry",
8, 4, 0, 0, 0, 40, 300,
1.0, 1.5, 60, 28, 15, 2, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0,
L_ASSAULT | L_LIGHT,
},
{{0, 100, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0},
"inf infantry",
10, 5, 0, 0, 0, 50, 500,
1.0, 1.5, 60, 25, 15, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
L_ASSAULT | L_LIGHT,
},
{{0, 100, 8, 0, 0, 0, 0, 0, 60, 0, 0, 0, 0, 0},
"mtif motor inf",
15, 10, 0, 0, 0, 190, 400,
1.2, 2.2, 60, 33, 17, 1, 3, 0, 0, 0, 2, 3, 13, 1, 0, 0,
L_LIGHT,
},
{{0, 100, 8, 0, 0, 0, 0, 0, 60, 0, 0, 0, 0, 0},
"mif mech inf",
15, 10, 0, 0, 0, 190, 800,
1.5, 2.5, 50, 33, 17, 1, 3, 0, 0, 0, 2, 3, 13, 1, 0, 0,
L_LIGHT,
},
{{0, 100, 4, 0, 0, 0, 0, 0, 60, 0, 0, 0, 0, 0},
"mar marines",
10, 5, 0, 0, 0, 140, 1000,
1.4, 2.4, 60, 25, 14, 2, 1, 0, 0, 0, 1, 2, 0, 0, 0, 0,
L_MARINE | L_ASSAULT | L_LIGHT,
},
{{0, 25, 200, 10, 300, 100, 100, 10, 300, 0, 200, 100, 0, 0},
"sup supply",
10, 5, 0, 0, 0, 50, 500,
0.1, 0.2, 80, 25, 20, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
L_LIGHT | L_SUPPLY,
},
{{0, 990, 990, 200, 990, 500, 500, 100, 990, 990, 990, 990, 0, 150},
"tra train",
100, 50, 0, 0, 0, 40, 3500,
0.0, 0.0, 120, 10, 25, 3, 0, 0, 0, 0, 0, 0, 0, 0, 5, 12,
L_TRAIN | L_HEAVY | L_SUPPLY,
},
{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
"spy infiltrator",
10, 5, 0, 0, 0, 40, 750,
0.0, 0.0, 80, 32, 18, 4, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,
L_ASSAULT | L_RECON | L_LIGHT | L_SPY,
},
{{0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
"com commando",
10, 5, 0, 0, 0, 55, 1500,
0.0, 0.0, 80, 32, 18, 4, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,
L_ASSAULT | L_RECON | L_LIGHT | L_SPY,
},
{{0, 20, 5, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0},
"aau aa unit",
20, 10, 0, 0, 0, 70, 500,
0.5, 1.0, 60, 18, 20, 1, 1, 0, 0, 0, 1, 2, 0, 0, 0, 0,
L_FLAK | L_LIGHT,
},
{{0, 25, 40, 10, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0},
"art artillery",
20, 10, 0, 0, 0, 35, 800,
0.1, 0.4, 70, 18, 20, 1, 0, 8, 50, 5, 2, 1, 0, 0, 0, 0,
L_LIGHT,
},
{{0, 25, 20, 6, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0},
"lat lt artillery",
20, 10, 0, 0, 0, 70, 500,
0.2, 0.6, 60, 30, 18, 1, 1, 5, 10, 3, 1, 1, 0, 0, 0, 0,
L_LIGHT,
},
{{0, 25, 80, 12, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0},
"hat hvy artillery",
40, 20, 0, 0, 0, 100, 800,
0.0, 0.2, 60, 12, 20, 1, 0, 11, 99, 8, 4, 1, 0, 0, 0, 0,
0,
},
{{0, 25, 40, 10, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0},
"mat mech artillery",
20, 10, 0, 0, 0, 200, 1000,
0.2, 0.6, 50, 35, 17, 1, 1, 8, 35, 6, 3, 3, 13, 1, 0, 0,
L_LIGHT,
},
{{0, 20, 3, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0},
"eng engineer",
10, 5, 0, 0, 0, 130, 3000,
1.2, 2.4, 50, 25, 14, 2, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0,
L_ENGINEER | L_ASSAULT | L_LIGHT,
},
{{0, 20, 4, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0},
"meng mech engineer",
10, 5, 0, 0, 0, 260, 4500,
1.8, 3.5, 45, 33, 15, 3, 3, 0, 0, 0, 1, 5, 25, 2, 0, 0,
L_ENGINEER | L_ASSAULT | L_LIGHT,
},
{{0, 50, 4, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0},
"lar lt armor",
10, 5, 0, 0, 0, 150, 600,
2.0, 1.0, 50, 42, 15, 4, 4, 0, 0, 0, 1, 2, 25, 1, 0, 0,
L_RECON | L_LIGHT,
},
{{0, 100, 3, 0, 0, 0, 0, 0, 48, 0, 0, 0, 0, 0},
"har hvy armor",
20, 10, 0, 0, 0, 120, 500,
2.0, 0.8, 50, 18, 17, 1, 1, 0, 0, 0, 2, 1, 10, 2, 0, 0,
0,
},
{{0, 50, 4, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0},
"arm armor",
20, 10, 0, 0, 0, 170, 1000,
3.0, 1.5, 40, 33, 16, 2, 2, 0, 0, 0, 1, 2, 13, 1, 0, 0,
L_LIGHT,
},
{{0, 50, 4, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0},
"sec security",
10, 5, 0, 0, 0, 170, 600,
1.0, 2.0, 60, 25, 15, 2, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0,
L_SECURITY | L_LIGHT,
},
{{0, 10, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0},
"rad radar unit",
10, 5, 0, 0, 0, 270, 1000,
0.0, 0.0, 50, 33, 15, 3, 0, 0, 0, 0, 0, 2, 25, 2, 1, 0,
L_RADAR | L_LIGHT,
},
/* name
lcm, hcm, mil, gun, shell, tech, $,
att, def, vul, spd, vis, spy, rad, frg, acc, dam, amm, aaf, fc, fu, xpl,
flags, nv
cargo
*/
{{0},
NULL,
0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0,
}
};
/*
* Table of land unit types
* Initialized on startup from land.config and deity custom config (if any).
*/
struct lchrstr lchr[];

View file

@ -0,0 +1,66 @@
#
# Empire - A multi-player, client/server Internet based war game.
# Copyright (C) 1986-2006, Dave Pare, Jeff Bailey, Thomas Ruschak,
# Ken Stevens, Steve McClure
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# ---
#
# See files README, COPYING and CREDITS in the root of the source
# tree for related information and legal notices. It is expected
# that future projects/authors will amend these files as needed.
#
# ---
#
# land.config: Land unit characteristics
#
# Known contributors to this file:
# Markus Armbruster, 2006
#
# Derived from land.c; known contributors:
# Thomas Ruschak, 1992
# Ken Stevens, 1995
# Steve McClure, 1998-2000
#
# Available flags are in land_chr_flags[]. info Unit-types should
# document them all.
config land-chr
name civ mil she gun pet iro dus bar foo oil lcm hcm uw rad l_b h_b g_b s_b tech cost att def vul spd vis spy rm frg acc dam amm aaf fuelc fuelu nx nl flags
"cav cavalry" 0 20 0 0 0 0 0 0 12 0 0 0 0 0 10 5 0 0 30 500 1.2 0.5 80 32 18 4 3 0 0 0 0 0 0 0 0 0 (light recon)
"linf light infantry" 0 25 1 0 0 0 0 0 15 0 0 0 0 0 8 4 0 0 40 300 1.0 1.5 60 28 15 2 1 0 0 0 1 1 0 0 0 0 (light assault)
"inf infantry" 0 100 0 0 0 0 0 0 24 0 0 0 0 0 10 5 0 0 50 500 1.0 1.5 60 25 15 2 1 0 0 0 0 0 0 0 0 0 (light assault)
"mtif motor inf" 0 100 8 0 0 0 0 0 60 0 0 0 0 0 15 10 0 0 190 400 1.2 2.2 60 33 17 1 3 0 0 0 2 3 13 1 0 0 (light)
"mif mech inf" 0 100 8 0 0 0 0 0 60 0 0 0 0 0 15 10 0 0 190 800 1.5 2.5 50 33 17 1 3 0 0 0 2 3 13 1 0 0 (light)
"mar marines" 0 100 4 0 0 0 0 0 60 0 0 0 0 0 10 5 0 0 140 1000 1.4 2.4 60 25 14 2 1 0 0 0 1 2 0 0 0 0 (light marine assault)
"sup supply" 0 25 200 10 300 100 100 10 300 0 200 100 0 0 10 5 0 0 50 500 0.1 0.2 80 25 20 1 0 0 0 0 0 0 0 0 0 0 (supply light)
"tra train" 0 990 990 200 990 500 500 100 990 990 990 990 0 150 100 50 0 0 40 3500 0.0 0.0 120 10 25 3 0 0 0 0 0 0 0 0 5 12 (supply train heavy)
"spy infiltrator" 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10 5 0 0 40 750 0.0 0.0 80 32 18 4 3 0 0 0 0 0 0 0 0 0 (recon light assault spy)
"com commando" 0 0 3 0 0 0 0 0 0 0 0 0 0 0 10 5 0 0 55 1500 0.0 0.0 80 32 18 4 3 0 0 0 0 0 0 0 0 0 (light recon assault spy)
"aau aa unit" 0 20 5 0 0 0 0 0 12 0 0 0 0 0 20 10 0 0 70 500 0.5 1.0 60 18 20 1 1 0 0 0 1 2 0 0 0 0 (light flak)
"art artillery" 0 25 40 10 0 0 0 0 24 0 0 0 0 0 20 10 0 0 35 800 0.1 0.4 70 18 20 1 0 8 50 5 2 1 0 0 0 0 (light)
"lat lt artillery" 0 25 20 6 0 0 0 0 12 0 0 0 0 0 20 10 0 0 70 500 0.2 0.6 60 30 18 1 1 5 10 3 1 1 0 0 0 0 (light)
"hat hvy artillery" 0 25 80 12 0 0 0 0 24 0 0 0 0 0 40 20 0 0 100 800 0.0 0.2 60 12 20 1 0 11 99 8 4 1 0 0 0 0 ()
"mat mech artillery" 0 25 40 10 0 0 0 0 15 0 0 0 0 0 20 10 0 0 200 1000 0.2 0.6 50 35 17 1 1 8 35 6 3 3 13 1 0 0 (light)
"eng engineer" 0 20 3 0 0 0 0 0 12 0 0 0 0 0 10 5 0 0 130 3000 1.2 2.4 50 25 14 2 1 0 0 0 1 1 0 0 0 0 (engineer light assault)
"meng mech engineer" 0 20 4 0 0 0 0 0 15 0 0 0 0 0 10 5 0 0 260 4500 1.8 3.5 45 33 15 3 3 0 0 0 1 5 25 2 0 0 (engineer light assault)
"lar lt armor" 0 50 4 0 0 0 0 0 30 0 0 0 0 0 10 5 0 0 150 600 2.0 1.0 50 42 15 4 4 0 0 0 1 2 25 1 0 0 (light recon)
"har hvy armor" 0 100 3 0 0 0 0 0 48 0 0 0 0 0 20 10 0 0 120 500 2.0 0.8 50 18 17 1 1 0 0 0 2 1 10 2 0 0 ()
"arm armor" 0 50 4 0 0 0 0 0 30 0 0 0 0 0 20 10 0 0 170 1000 3.0 1.5 40 33 16 2 2 0 0 0 1 2 13 1 0 0 (light)
"sec security" 0 50 4 0 0 0 0 0 30 0 0 0 0 0 10 5 0 0 170 600 1.0 2.0 60 25 15 2 1 0 0 0 1 1 0 0 0 0 (security light)
"rad radar unit" 0 10 0 0 0 0 0 0 7 0 0 0 0 0 10 5 0 0 270 1000 0.0 0.0 50 33 15 3 0 0 0 0 0 2 25 2 1 0 (light radar)
/config

View file

@ -36,21 +36,8 @@
#include "misc.h"
#include "nuke.h"
struct nchrstr nchr[] = {
/* name lcm hcm oil rads blst dam cost tech lbs flags */
{"10kt fission", 50, 50, 25, 70, 3, 70, 10000, 280, 4, 0},
{"15kt fission", 50, 50, 25, 80, 3, 90, 15000, 290, 5, 0},
{"50kt fission", 60, 60, 30, 90, 3, 100, 25000, 300, 6, 0},
{"100kt fission", 75, 75, 40, 120, 4, 125, 30000, 310, 8, 0},
{"5kt fusion", 15, 15, 15, 30, 2, 80, 12500, 315, 1, 0},
{"75kt fusion", 40, 40, 35, 50, 3, 90, 20000, 320, 3, 0},
{"250kt fusion", 50, 50, 45, 60, 4, 110, 25000, 330, 4, 0},
{"500kt fusion", 60, 60, 50, 80, 5, 120, 35000, 340, 5, 0},
{"1mt fusion", 75, 75, 50, 110, 6, 150, 40000, 350, 5, 0},
{"60kt neutron", 60, 60, 30, 100, 3, 30, 30000, 355, 2, N_NEUT},
{"3mt fusion", 100, 100, 75, 130, 7, 170, 45000, 360, 6, 0},
{"5mt fusion", 120, 120, 100, 150, 8, 190, 50000, 370, 8, 0},
{"120kt neutron", 75, 75, 40, 120, 5, 50, 36000, 375, 3, N_NEUT},
{NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
};
/*
* Table of nuke types
* Initialized on startup from nuke.config and deity custom config (if any).
*/
struct nchrstr nchr[];

View file

@ -0,0 +1,54 @@
#
# Empire - A multi-player, client/server Internet based war game.
# Copyright (C) 1986-2006, Dave Pare, Jeff Bailey, Thomas Ruschak,
# Ken Stevens, Steve McClure
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# ---
#
# See files README, COPYING and CREDITS in the root of the source
# tree for related information and legal notices. It is expected
# that future projects/authors will amend these files as needed.
#
# ---
#
# nuke.c: Nuke characteristics
#
# Known contributors to this file:
# Markus Armbruster, 2006
#
# Derived from nuke.c.
#
# Available flags are in nuke_chr_flags[]. info Nuke-types should
# document them all.
config nuke-chr
name l_b h_b o_b r_b bla dam cost tech wei flags
"10kt fission" 50 50 25 70 3 70 10000 280 4 ()
"15kt fission" 50 50 25 80 3 90 15000 290 5 ()
"50kt fission" 60 60 30 90 3 100 25000 300 6 ()
"100kt fission" 75 75 40 120 4 125 30000 310 8 ()
"5kt fusion" 15 15 15 30 2 80 12500 315 1 ()
"75kt fusion" 40 40 35 50 3 90 20000 320 3 ()
"250kt fusion" 50 50 45 60 4 110 25000 330 4 ()
"500kt fusion" 60 60 50 80 5 120 35000 340 5 ()
"1mt fusion" 75 75 50 110 6 150 40000 350 5 ()
"60kt neutron" 60 60 30 100 3 30 30000 355 2 (neutron)
"3mt fusion" 100 100 75 130 7 170 45000 360 6 ()
"5mt fusion" 120 120 100 150 8 190 50000 370 8 ()
"120kt neutron" 75 75 40 120 5 50 36000 375 3 (neutron)
/config

View file

@ -35,276 +35,13 @@
* Steve McClure, 1998
*/
/*
* plane characteristics
* flags indicate capabilities of craft...
* P_T: tactical, P_F: fighter/interceptor, P_B: bomber,
* P_C: cargo, P_G: glider, P_V: vtol, P_M: (one-shot) missile
* P_L: light, can land on carriers.
* P_O: orbits (sat's & anti-sats), P_N: nuke killer (SDI)
* P_X: stealthy
* P_E: Extra light
* P_K: Chopper
* P_P: Can paratroop
* P_A: ASW plane, can find subs when reconning, can bomb subs
* P_R: recon plane, gets some info
* P_I: Image capability (advanced spying)
*
* Note if a plane is P_M (a missile) then it will automatically be made
* P_V (vtol) in init_global()
*/
#include <config.h>
#include "misc.h"
#include "plane.h"
struct plchrstr plchr[] = {
/* name lcm hcm $$$ tch acc ld at/df ran mil gas stlth flags */
{
"f1 Sopwith Camel",
8, 2, 400, 50, 90, 1, 1, 1, 4, 1, 1,
0,
P_V | P_T | P_F},
/* name lcm hcm $$$ tch acc ld at/df ran mil gas stlth flags */
{
"f2 P-51 Mustang",
8, 2, 400, 80, 80, 1, 4, 4, 8, 1, 1,
0,
P_L | P_T | P_F},
/* name lcm hcm $$$ tch acc ld at/df ran mil gas stlth flags */
{
"jf1 F-4 Phantom",
12, 4, 1000, 125, 45, 1, 14, 14, 11, 2, 3,
0,
P_T | P_F | P_L},
/* name lcm hcm $$$ tch acc ld at/df ran mil gas stlth flags */
{
"jf2 AV-8B Harrier",
12, 4, 1400, 195, 30, 1, 17, 17, 14, 2, 3,
0,
P_T | P_F | P_L | P_V},
/* name lcm hcm $$$ tch acc ld at/df ran mil gas stlth flags */
{
"sf F-117A Nighthawk",
15, 5, 3000, 325, 45, 3, 19, 19, 20, 2, 4,
80,
P_T | P_F | P_L},
/* name lcm hcm $$$ tch acc ld at/df ran mil gas stlth flags */
{
"es P-38 Lightning",
9, 3, 700, 90, 60, 1, 5, 5, 15, 1, 2,
0,
P_ESC | P_T},
/* name lcm hcm $$$ tch acc ld at/df ran mil gas stlth flags */
{
"jes F-14E jet escort",
14, 8, 1400, 160, 60, 1, 10, 10, 25, 2, 3,
0,
P_ESC | P_T},
/* name lcm hcm $$$ tch acc ld at/df ran mil gas stlth flags */
{
"lb TBD-1 Devastator",
10, 3, 550, 60, 50, 2, 0, 3, 7, 1, 1,
0,
P_L | P_V | P_T | P_B},
/* name lcm hcm $$$ tch acc ld at/df ran mil gas stlth flags */
{
"jl A-6 Intruder",
14, 4, 1000, 130, 25, 3, 0, 9, 11, 2, 3,
0,
P_T | P_B | P_L},
/* name lcm hcm $$$ tch acc ld at/df ran mil gas stlth flags */
{
"mb medium bomber",
14, 5, 1000, 80, 45, 4, 0, 5, 14, 3, 3,
0,
P_T | P_B},
/* name lcm hcm $$$ tch acc ld at/df ran mil gas stlth flags */
{
"jfb FB-111 Aardvark f/b",
20, 10, 1800, 140, 30, 7, 8, 8, 20, 5, 5,
0,
P_T | P_B},
{
"hb B-26B Marauder",
20, 6, 1100, 90, 90, 5, 0, 4, 15, 2, 2,
0,
P_B},
/* name lcm hcm $$$ tch acc ld at/df ran mil gas stlth flags */
{
"jhb B-52 Strato-Fortress",
26, 13, 3200, 150, 80, 12, 0, 11, 35, 5, 6,
0,
P_B},
/* name lcm hcm $$$ tch acc ld at/df ran mil gas stlth flags */
{
"sb B-2 stealth bomber",
15, 5, 4000, 325, 25, 8, 0, 15, 28, 2, 5,
80,
P_T | P_B},
/* name lcm hcm $$$ tch acc ld at/df ran mil gas stlth flags */
{
"as anti-sub plane",
10, 3, 550, 100, 85, 2, 0, 3, 15, 2, 2,
0,
P_SWEEP | P_MINE | P_T | P_A},
/* name lcm hcm $$$ tch acc ld at/df ran mil gas stlth flags */
{
"np naval plane",
20, 10, 1800, 135, 70, 3, 0, 4, 28, 4, 2,
0,
P_SWEEP | P_MINE | P_C | P_T | P_A | P_L},
/* name lcm hcm $$$ tch acc ld at/df ran mil gas stlth flags */
{
"nc AH-1 Cobra",
8, 2, 800, 160, 55, 2, 0, 3, 11, 2, 2,
0,
P_V | P_SWEEP | P_T | P_A | P_K},
/* name lcm hcm $$$ tch acc ld at/df ran mil gas stlth flags */
{
"ac AH-64 Apache",
8, 2, 800, 200, 15, 1, 0, 9, 11, 2, 2,
40,
P_V | P_T | P_K},
/* name lcm hcm $$$ tch acc ld at/df ran mil gas stlth flags */
{
"tc transport chopper",
8, 2, 800, 135, 0, 5, 0, 3, 7, 2, 2,
40,
P_V | P_C | P_P | P_L | P_K},
/* name lcm hcm $$$ tch acc ld at/df ran mil gas stlth flags */
{
"tr C-56 Lodestar",
14, 5, 1000, 85, 0, 7, 0, 2, 15, 3, 3,
0,
P_C | P_P},
/* name lcm hcm $$$ tch acc ld at/df ran mil gas stlth flags */
{
"jt C-141 Starlifter",
18, 5, 1500, 160, 0, 16, 0, 9, 35, 3, 4,
0,
P_C | P_P},
/* name lcm hcm $$$ tch acc ld at/df ran mil gas stlth flags */
{
"zep Zeppelin",
6, 2, 1000, 70, 60, 2, 0, -3, 15, 3, 2,
0,
P_S | P_V | P_T | P_C},
/* name lcm hcm $$$ tch acc ld at/df ran mil gas stlth flags */
{
"re recon",
12, 4, 800, 130, 0, 0, 0, 4, 15, 2, 2,
20,
P_S},
/* name lcm hcm $$$ tch acc ld at/df ran mil gas stlth flags */
{
"sp E2-C Hawkeye",
15, 5, 2000, 190, 0, 0, 0, 11, 32, 2, 5,
50,
P_S},
/* name lcm hcm $$$ tch acc ld at/df ran mil gas stlth flags */
{
"lst landsat",
20, 20, 2000, 245, 0, 0, 0, 3, 41, 0, 9,
0,
P_O},
/* name lcm hcm $$$ tch acc ld at/df ran mil gas stlth flags */
{
"ss KH-7 spysat",
20, 20, 4000, 305, 0, 0, 0, 3, 61, 0, 9,
0,
P_I | P_O | P_S},
/* name lcm hcm $$$ tch acc ld at/df ran mil gas stlth flags */
{
"mi Harpoon",
8, 2, 300, 160, 50, 6, 0, 5, 6, 0, 0,
0,
P_L | P_T | P_M | P_MAR},
/* name lcm hcm $$$ tch acc ld at/df ran mil gas stlth flags */
{
"sam Sea Sparrow",
3, 1, 200, 180, 0, 0, 0, 18, 2, 0, 0,
0,
P_L | P_F | P_E | P_M},
/* name lcm hcm $$$ tch acc ld at/df ran mil gas stlth flags */
{
"ssm V2",
15, 15, 800, 145, 60, 3, 0, 3, 4, 0, 0,
0,
P_T | P_M},
/* name lcm hcm $$$ tch acc ld at/df ran mil gas stlth flags */
{
"srbm Atlas",
20, 20, 1000, 200, 60, 6, 0, 5, 9, 0, 0,
0,
P_T | P_M},
/* name lcm hcm $$$ tch acc ld at/df ran mil gas stlth flags */
{
"irbm Titan",
20, 20, 1500, 260, 60, 8, 0, 10, 15, 0, 0,
0,
P_T | P_M},
/* name lcm hcm $$$ tch acc ld at/df ran mil gas stlth flags */
{
"icbm Minuteman",
20, 20, 3000, 310, 60, 10, 0, 15, 41, 0, 0,
0,
P_T | P_M},
/* name lcm hcm $$$ tch acc ld at/df ran mil gas stlth flags */
{
"slbm Trident",
20, 20, 2000, 280, 60, 8, 0, 6, 23, 0, 0,
0,
P_T | P_L | P_M},
/* name lcm hcm $$$ tch acc ld at/df ran mil gas stlth flags */
{
"asat anti-sat",
20, 20, 2000, 305, 50, 6, 0, 7, 13, 0, 4,
0,
P_O | P_M},
/* name lcm hcm $$$ tch acc ld at/df ran mil gas stlth flags */
{
"abm Patriot",
16, 8, 1500, 270, 50, 0, 0, 31, 12, 0, 0,
0,
P_N | P_M},
{
NULL,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0,
0}
};
/*
* Table of plane types
* Initialized on startup from plane.config and deity custom config (if any).
*/
struct plchrstr plchr[];

View file

@ -0,0 +1,84 @@
#
# Empire - A multi-player, client/server Internet based war game.
# Copyright (C) 1986-2006, Dave Pare, Jeff Bailey, Thomas Ruschak,
# Ken Stevens, Steve McClure
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# ---
#
# See files README, COPYING and CREDITS in the root of the source
# tree for related information and legal notices. It is expected
# that future projects/authors will amend these files as needed.
#
# ---
#
# plane.config: Plane characteristics
#
# Known contributors to this file:
# Markus Armbruster, 2006
#
# Derived from plane.c; known contributors:
# Dave Pare, 1986
# Jeff Bailey
# Thomas Ruschak, 1992
# Ken Stevens, 1995
# Steve McClure, 1998
#
# Available flags are in plane_chr_flags[]. info Plane-types should
# document them all.
#
# Note if a flag missile is set, then flag VTOL will automatically be
# set by init_plchr().
config plane-chr
name l_b h_b cost tech acc loa att def ran cr fu ste flags
"f1 Sopwith Camel" 8 2 400 50 90 1 1 1 4 1 1 0 (tactical intercept VTOL)
"f2 P-51 Mustang" 8 2 400 80 80 1 4 4 8 1 1 0 (tactical intercept light)
"jf1 F-4 Phantom" 12 4 1000 125 45 1 14 14 11 2 3 0 (tactical intercept light)
"jf2 AV-8B Harrier" 12 4 1400 195 30 1 17 17 14 2 3 0 (tactical intercept VTOL light)
"sf F-117A Nighthawk" 15 5 3000 325 45 3 19 19 20 2 4 80 (tactical intercept light)
"es P-38 Lightning" 9 3 700 90 60 1 5 5 15 1 2 0 (tactical escort)
"jes F-14E jet escort" 14 8 1400 160 60 1 10 10 25 2 3 0 (tactical escort)
"lb TBD-1 Devastator" 10 3 550 60 50 2 0 3 7 1 1 0 (bomber tactical VTOL light)
"jl A-6 Intruder" 14 4 1000 130 25 3 0 9 11 2 3 0 (bomber tactical light)
"mb medium bomber" 14 5 1000 80 45 4 0 5 14 3 3 0 (bomber tactical)
"jfb FB-111 Aardvark f/b" 20 10 1800 140 30 7 8 8 20 5 5 0 (bomber tactical)
"hb B-26B Marauder" 20 6 1100 90 90 5 0 4 15 2 2 0 (bomber)
"jhb B-52 Strato-Fortress" 26 13 3200 150 80 12 0 11 35 5 6 0 (bomber)
"sb B-2 stealth bomber" 15 5 4000 325 25 8 0 15 28 2 5 80 (bomber tactical)
"as anti-sub plane" 10 3 550 100 85 2 0 3 15 2 2 0 (tactical ASW mine sweep)
"np naval plane" 20 10 1800 135 70 3 0 4 28 4 2 0 (tactical cargo light ASW mine sweep)
"nc AH-1 Cobra" 8 2 800 160 55 2 0 3 11 2 2 0 (tactical VTOL helo ASW sweep)
"ac AH-64 Apache" 8 2 800 200 15 1 0 9 11 2 2 40 (tactical VTOL helo)
"tc transport chopper" 8 2 800 135 0 5 0 3 7 2 2 40 (cargo VTOL light helo para)
"tr C-56 Lodestar" 14 5 1000 85 0 7 0 2 15 3 3 0 (cargo para)
"jt C-141 Starlifter" 18 5 1500 160 0 16 0 9 35 3 4 0 (cargo para)
"zep Zeppelin" 6 2 1000 70 60 2 0 -3 15 3 2 0 (tactical cargo VTOL spy)
"re recon" 12 4 800 130 0 0 0 4 15 2 2 20 (spy)
"sp E2-C Hawkeye" 15 5 2000 190 0 0 0 11 32 2 5 50 (spy)
"lst landsat" 20 20 2000 245 0 0 0 3 41 0 9 0 (satellite)
"ss KH-7 spysat" 20 20 4000 305 0 0 0 3 61 0 9 0 (spy image satellite)
"mi Harpoon" 8 2 300 160 50 6 0 5 6 0 0 0 (tactical VTOL missile light marine)
"sam Sea Sparrow" 3 1 200 180 0 0 0 18 2 0 0 0 (intercept VTOL missile light x-light)
"ssm V2" 15 15 800 145 60 3 0 3 4 0 0 0 (tactical VTOL missile)
"srbm Atlas" 20 20 1000 200 60 6 0 5 9 0 0 0 (tactical VTOL missile)
"irbm Titan" 20 20 1500 260 60 8 0 10 15 0 0 0 (tactical VTOL missile)
"icbm Minuteman" 20 20 3000 310 60 10 0 15 41 0 0 0 (tactical VTOL missile)
"slbm Trident" 20 20 2000 280 60 8 0 6 23 0 0 0 (tactical VTOL missile light)
"asat anti-sat" 20 20 2000 305 50 6 0 7 13 0 4 0 (VTOL missile satellite)
"abm Patriot" 16 8 1500 270 50 0 0 31 12 0 0 0 (VTOL missile SDI)
/config

View file

@ -35,178 +35,13 @@
* Steve McClure, 1998
*/
/*
* marine characteristics -- ship capabilities descriptions
*
* Note, that you should not set the flags M_XLIGHT or M_CHOPPER
* here. They will be automatically set by init_global() when the server
* starts if the ship can carry a non-zero amount of those things.
* Also note that if nplanes > 0 and M_FLY is not set, then M_MSL will
* automatically be set.
*/
#include <config.h>
#include "misc.h"
#include "ship.h"
struct mchrstr mchr[] = {
/* a s v v f E K f f */
/* r p i r r g | | u u */
/* l h m e s n n l x V e e */
/* c c o e i g g i p p l l */
/* m m r d b e e m l l c u name tech Cost*/
{{300, 10, 0, 0, 0, 0, 0, 0, 900, 0, 0, 0, 15, 0},
25, 15, 10, 10, 15, 2, 0, 0, 0, 0, 0, 0, "fb fishing boat",
0, 180, M_FOOD | M_CANAL, 0, 0},
{{300, 10, 0, 0, 0, 0, 0, 0, 900, 0, 0, 0, 15, 0},
25, 15, 10, 25, 15, 2, 0, 0, 0, 0, 20, 1, "ft fishing trawler",
35, 300, M_FOOD | M_CANAL, 0, 0},
{{600, 50, 300, 50, 0, 0, 0, 0, 900, 0,1400, 900, 250, 0},
60, 40, 20, 25, 35, 3, 0, 0, 1, 0, 0, 0, "cs cargo ship",
20, 500, M_SUPPLY, 0, 2},
{{30, 5, 0, 0, 0, 990, 990, 0, 200, 0, 0, 0, 45, 990},
60, 40, 20, 25, 35, 3, 0, 0, 1, 0, 30, 1, "os ore ship",
20, 500, 0, 0, 0},
{{20, 80, 0, 0, 0, 0, 0, 0, 200, 0, 0, 0,1200, 0},
60, 40, 20, 10, 35, 3, 0, 0, 1, 0, 0, 0, "ss slave ship",
0, 300, 0, 0, 0},
{{50, 50, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0},
200, 100, 20, 25, 35, 3, 0, 0, 1, 0, 30, 1, "ts trade ship",
30, 1750, M_TRADE, 0, 0},
{{0, 60, 10, 2, 0, 0, 0, 0, 60, 0, 0, 0, 0, 0},
30, 30, 50, 25, 25, 3, 1, 1, 1, 0, 0, 0, "frg frigate",
0, 600, M_SEMILAND, 0, 2},
{{10, 5, 0, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0},
25, 15, 10, 25, 15, 2, 0, 0, 0, 0, 20, 1, "oe oil exploration boat",
40, 800, M_OIL | M_CANAL, 0, 0},
{{990, 80, 0, 0, 0, 0, 0, 0, 990, 990, 0, 0, 990, 0},
60, 60, 30, 15, 65, 3, 0, 0, 2, 0, 0, 0, "od oil derrick",
50, 1500, M_OIL, 0, 0},
{{0, 2, 12, 2, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0},
20, 10, 10, 38, 10, 2, 1, 1, 0, 0, 4, 1, "pt patrol boat",
40, 300, M_TORP | M_CANAL, 0, 0},
{{0, 100, 40, 5, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0},
30, 40, 50, 30, 30, 5, 6, 3, 1, 0, 40, 1, "lc light cruiser",
45, 800, M_MINE, 0, 2 },
{{0, 120, 100, 8, 0, 0, 0, 0, 200, 0, 0, 0, 0, 0},
40, 50, 70, 30, 30, 5, 8, 4, 1, 0, 30, 1, "hc heavy cruiser",
50, 1200, 0, 0, 4},
{{0, 120, 20, 4, 0, 0, 0, 0, 120, 0, 0, 0, 0, 0},
50, 50, 60, 20, 35, 3, 1, 2, 1, 0, 0, 0, "tt troop transport",
10, 800, M_SEMILAND, 0, 2 },
{{0, 200, 200, 10, 0, 0, 0, 0, 900, 0, 0, 0, 0, 0},
50, 70, 95, 25, 35, 6, 10, 7, 1, 0, 50, 2, "bb battleship",
45, 1800, 0, 0, 2},
{{0, 180, 100, 10, 0, 0, 0, 0, 400, 0, 0, 0, 0, 0},
50, 60, 55, 30, 35, 6, 10, 6, 1, 0, 60, 2, "bbc battlecruiser",
75, 1500, 0, 0, 2},
{{30, 5, 0, 0, 990, 0, 0, 0, 200, 990, 0, 0, 25, 0},
60, 40, 75, 25, 45, 3, 0, 0, 1, 0, 30, 1, "tk tanker",
35, 600, M_OILER | M_SUPPLY, 0, 0},
{{0, 10, 100, 1, 0, 0, 0, 0, 90, 0, 0, 0, 0, 0},
25, 15, 10, 25, 15, 2, 0, 0, 0, 0, 20, 1, "ms minesweeper",
40, 400, M_MINE | M_SWEEP | M_CANAL, 0, 0},
{{0, 60, 40, 4, 0, 0, 0, 0, 80, 0, 0, 0, 0, 0},
30, 30, 45, 35, 20, 4, 6, 3, 1, 0, 30, 1, "dd destroyer",
70, 600, M_MINE | M_DCH | M_SONAR, 0, 1},
{{0, 25, 36, 5, 0, 0, 0, 0, 80, 0, 0, 0, 0, 0},
30, 30, 25, 20, 5, 4, 3, 3, 0, 0, 30, 1, "sb submarine",
60, 650, M_TORP | M_SUB | M_MINE | M_SONAR, 0, 0},
{{5, 10, 104, 20, 100, 0, 0, 0, 900, 0, 500, 300, 0, 0},
40, 40, 50, 30, 2, 3, 0, 0, 0, 0, 50, 2, "sbc cargo submarine",
150, 1200, M_SUPPLY | M_OILER | M_SUB | M_SONAR, 0, 0},
{{0, 175, 250, 4, 300, 0, 0, 0, 180, 0, 0, 0, 0, 0},
50, 60, 60, 30, 40, 5, 2, 2, 4, 20, 50, 2, "cal light carrier",
80, 2700, M_FLY, 20, 0},
{{0, 350, 500, 4, 500, 0, 0, 0, 900, 0, 0, 0, 0, 0},
60, 70, 80, 35, 40, 7, 2, 2, 10, 40, 120, 3, "car aircraft carrier",
160, 4500, M_FLY, 40, 0},
{{0, 350, 999, 4, 999, 0, 0, 0, 900, 0, 0, 0, 0, 0},
70, 80, 100, 45, 40, 9, 2, 2, 20, 4, 0, 0, "can nuc carrier",
305, 8000, M_OILER | M_FLY | M_SUPPLY, 60, 0},
{{0, 400, 10, 1, 0, 0, 0, 0, 300, 0, 0, 0, 0, 0},
60, 40, 40, 30, 30, 2, 0, 0, 2, 0, 30, 1, "ls landing ship",
145, 1000, M_LAND, 0, 6},
{{0, 60, 60, 4, 0, 0, 0, 0, 120, 0, 0, 0, 0, 0},
40, 30, 50, 35, 30, 5, 2, 2, 4, 0, 40, 1, "af asw frigate",
220, 800, M_TORP | M_SUBT | M_DCH | M_SONAR, 0, 0},
{{0, 25, 60, 6, 0, 0, 0, 0, 500, 0, 0, 0, 0, 0},
30, 40, 45, 40, 3, 6, 5, 3, 0, 0, 0, 0, "na nuc attack sub",
260, 1200, M_TORP | M_SUB | M_MINE | M_SONAR | M_SUBT, 0, 0},
{{0, 100, 80, 6, 40, 0, 0, 0, 500, 0, 0, 0, 0, 0},
40, 40, 60, 40, 35, 6, 8, 3, 10, 2, 80, 2, "ad asw destroyer",
240, 1500, M_TORP | M_SUBT | M_DCH | M_SONAR, 0, 0},
{{0, 25, 200, 1, 0, 0, 0, 0, 500, 0, 0, 0, 0, 0},
30, 40, 55, 35, 2, 6, 0, 0, 0, 0, 0, 0, "nm nuc miss sub",
270, 1500, M_SUB | M_SONAR, 20, 0},
{{0, 25, 100, 1, 0, 0, 0, 0, 500, 0, 0, 0, 0, 0},
30, 30, 35, 30, 3, 3, 0, 0, 0, 0, 30, 1, "msb missile sub",
230, 1200, M_SUB | M_SONAR, 10, 0},
{{0, 5, 100, 3, 0, 0, 0, 0, 500, 0, 0, 0, 0, 0},
20, 20, 15, 40, 15, 3, 2, 2, 0, 0, 7, 1, "mb missile boat",
180, 500, 0, 10, 0},
{{0, 60, 220, 4, 0, 0, 0, 0, 120, 0, 0, 0, 0, 0},
40, 30, 50, 35, 30, 5, 2, 2, 2, 0, 30, 1, "mf missile frigate",
280, 1000, 0, 20, 0},
{{0, 120, 500, 6, 160, 0, 0, 0, 200, 0, 0, 0, 0, 0},
50, 50, 70, 35, 35, 8, 8, 6, 8, 8, 35, 1, "mc missile cruiser",
290, 1500, M_ANTIMISSILE, 40, 0},
{{0, 100, 100, 15, 0, 0, 0, 0, 200, 0, 0, 0, 0, 0},
50, 60, 80, 35, 30, 6, 1, 8, 1, 0, 60, 2, "aac aa cruiser",
130, 1500, M_ANTIMISSILE, 0, 4},
{{0, 200, 400, 25, 40, 0, 0, 0, 900, 0, 0, 0, 0, 0},
50, 60, 80, 35, 30, 6, 1, 16, 30, 2, 0, 0, "agc aegis cruiser",
265, 4000, M_ANTIMISSILE, 32, 0},
{{0, 200, 400, 8, 40, 0, 0, 0, 900, 0, 0, 0, 0, 0},
50, 50, 100, 45, 35, 6, 14, 7, 10, 2, 0, 0, "ncr nuc cruiser",
325, 1800, M_ANTIMISSILE, 20, 0},
{{0, 200, 120, 6, 160, 0, 0, 0, 500, 0, 0, 0, 0, 0},
50, 50, 80, 45, 35, 9, 10, 4, 25, 8, 0, 0, "nas nuc asw cruiser",
330, 1800, M_TORP | M_SUBT | M_DCH | M_SONAR, 0, 0},
/* c m s g p i d b f o l h u r */
{{50, 50, 600, 50, 999, 0, 0, 0, 999, 0,1500, 900, 0, 0},
60, 40, 40, 45, 35, 6, 0, 0, 10, 2, 0, 0, "nsp nuc supply ship",
360, 1500, M_SUPPLY, 0, 2},
{{0},
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL,
0, 0, 0, 0, 0}
};
/*
* Table of ship types
* Initialized on startup from ship.config and deity custom config (if any).
*/
struct mchrstr mchr[];

View file

@ -0,0 +1,88 @@
#
# Empire - A multi-player, client/server Internet based war game.
# Copyright (C) 1986-2006, Dave Pare, Jeff Bailey, Thomas Ruschak,
# Ken Stevens, Steve McClure
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# ---
#
# See files README, COPYING and CREDITS in the root of the source
# tree for related information and legal notices. It is expected
# that future projects/authors will amend these files as needed.
#
# ---
#
# ship.config: Ship characteristics
#
# Known contributors to this file:
# Markus Armbruster, 2006
#
# Derived from ship.c; known contributors:
# Dave Pare, 1986
# Jeff Bailey
# Thomas Ruschak, 1992
# Ken Stevens, 1995
# Steve McClure, 1998
#
# Available flags are in ship_chr_flags[]. info Ship-types should
# document them all.
#
# Note that you can't set the flags M_XLIGHT or M_CHOPPER here. They
# will be automatically set by init_mchr() if the ship can carry a
# non-zero amount of those things. Also note that if nplanes > 0 and
# flag plane is not set, then flag miss will automatically be set.
config ship-chr
name l_b h_b tec cost ar spe vi vr fr gl nx nc fuelc fuelu np nl civ mil she gun pet iro dus bar foo oil lcm hcm uw rad flags
"fb fishing boat" 25 15 0 180 10 10 15 2 0 0 0 0 0 0 0 0 300 10 0 0 0 0 0 0 900 0 0 0 15 0 (fish canal)
"ft fishing trawler" 25 15 35 300 10 25 15 2 0 0 0 0 20 1 0 0 300 10 0 0 0 0 0 0 900 0 0 0 15 0 (fish canal)
"cs cargo ship" 60 40 20 500 20 25 35 3 0 0 1 0 0 0 0 2 600 50 300 50 0 0 0 0 900 0 1400 900 250 0 (supply)
"os ore ship" 60 40 20 500 20 25 35 3 0 0 1 0 30 1 0 0 30 5 0 0 0 990 990 0 200 0 0 0 45 990 ()
"ss slave ship" 60 40 0 300 20 10 35 3 0 0 1 0 0 0 0 0 20 80 0 0 0 0 0 0 200 0 0 0 1200 0 ()
"ts trade ship" 200 100 30 1750 20 25 35 3 0 0 1 0 30 1 0 0 50 50 0 0 0 0 0 0 100 0 0 0 0 0 (trade)
"frg frigate" 30 30 0 600 50 25 25 3 1 1 1 0 0 0 0 2 0 60 10 2 0 0 0 0 60 0 0 0 0 0 (semi-land)
"oe oil exploration boat" 25 15 40 800 10 25 15 2 0 0 0 0 20 1 0 0 10 5 0 0 0 0 0 0 100 1 0 0 0 0 (oil canal)
"od oil derrick" 60 60 50 1500 30 15 65 3 0 0 2 0 0 0 0 0 990 80 0 0 0 0 0 0 990 990 0 0 990 0 (oil)
"pt patrol boat" 20 10 40 300 10 38 10 2 1 1 0 0 4 1 0 0 0 2 12 2 0 0 0 0 5 0 0 0 0 0 (torp canal)
"lc light cruiser" 30 40 45 800 50 30 30 5 6 3 1 0 40 1 0 2 0 100 40 5 0 0 0 0 100 0 0 0 0 0 (mine)
"hc heavy cruiser" 40 50 50 1200 70 30 30 5 8 4 1 0 30 1 0 4 0 120 100 8 0 0 0 0 200 0 0 0 0 0 ()
"tt troop transport" 50 50 10 800 60 20 35 3 1 2 1 0 0 0 0 2 0 120 20 4 0 0 0 0 120 0 0 0 0 0 (semi-land)
"bb battleship" 50 70 45 1800 95 25 35 6 10 7 1 0 50 2 0 2 0 200 200 10 0 0 0 0 900 0 0 0 0 0 ()
"bbc battlecruiser" 50 60 75 1500 55 30 35 6 10 6 1 0 60 2 0 2 0 180 100 10 0 0 0 0 400 0 0 0 0 0 ()
"tk tanker" 60 40 35 600 75 25 45 3 0 0 1 0 30 1 0 0 30 5 0 0 990 0 0 0 200 990 0 0 25 0 (oiler supply)
"ms minesweeper" 25 15 40 400 10 25 15 2 0 0 0 0 20 1 0 0 0 10 100 1 0 0 0 0 90 0 0 0 0 0 (mine sweep canal)
"dd destroyer" 30 30 70 600 45 35 20 4 6 3 1 0 30 1 0 1 0 60 40 4 0 0 0 0 80 0 0 0 0 0 (dchrg sonar mine)
"sb submarine" 30 30 60 650 25 20 5 4 3 3 0 0 30 1 0 0 0 25 36 5 0 0 0 0 80 0 0 0 0 0 (torp sonar mine sub)
"sbc cargo submarine" 40 40 150 1200 50 30 2 3 0 0 0 0 50 2 0 0 5 10 104 20 100 0 0 0 900 0 500 300 0 0 (sonar sub oiler supply)
"cal light carrier" 50 60 80 2700 60 30 40 5 2 2 4 20 50 2 20 0 0 175 250 4 300 0 0 0 180 0 0 0 0 0 (plane)
"car aircraft carrier" 60 70 160 4500 80 35 40 7 2 2 10 40 120 3 40 0 0 350 500 4 500 0 0 0 900 0 0 0 0 0 (plane)
"can nuc carrier" 70 80 305 8000 100 45 40 9 2 2 20 4 0 0 60 0 0 350 999 4 999 0 0 0 900 0 0 0 0 0 (plane oiler supply)
"ls landing ship" 60 40 145 1000 40 30 30 2 0 0 2 0 30 1 0 6 0 400 10 1 0 0 0 0 300 0 0 0 0 0 (land)
"af asw frigate" 40 30 220 800 50 35 30 5 2 2 4 0 40 1 0 0 0 60 60 4 0 0 0 0 120 0 0 0 0 0 (torp dchrg sonar sub-torp)
"na nuc attack sub" 30 40 260 1200 45 40 3 6 5 3 0 0 0 0 0 0 0 25 60 6 0 0 0 0 500 0 0 0 0 0 (torp sonar min sub sub-torp)
"ad asw destroyer" 40 40 240 1500 60 40 35 6 8 3 10 2 80 2 0 0 0 100 80 6 40 0 0 0 500 0 0 0 0 0 (torp dchrg sonar sub-torp)
"nm nuc miss sub" 30 40 270 1500 55 35 2 6 0 0 0 0 0 0 20 0 0 25 200 1 0 0 0 0 500 0 0 0 0 0 (sonar sub)
"msb missile sub" 30 30 230 1200 35 30 3 3 0 0 0 0 30 1 10 0 0 25 100 1 0 0 0 0 500 0 0 0 0 0 (sonar sub)
"mb missile boat" 20 20 180 500 15 40 15 3 2 2 0 0 7 1 10 0 0 5 100 3 0 0 0 0 500 0 0 0 0 0 ()
"mf missile frigate" 40 30 280 1000 50 35 30 5 2 2 2 0 30 1 20 0 0 60 220 4 0 0 0 0 120 0 0 0 0 0 ()
"mc missile cruiser" 50 50 290 1500 70 35 35 8 8 6 8 8 35 1 40 0 0 120 500 6 160 0 0 0 200 0 0 0 0 0 (anti-missile)
"aac aa cruiser" 50 60 130 1500 80 35 30 6 1 8 1 0 60 2 0 4 0 100 100 15 0 0 0 0 200 0 0 0 0 0 (anti-missile)
"agc aegis cruiser" 50 60 265 4000 80 35 30 6 1 16 30 2 0 0 32 0 0 200 400 25 40 0 0 0 900 0 0 0 0 0 (anti-missile)
"ncr nuc cruiser" 50 50 325 1800 100 45 35 6 14 7 10 2 0 0 20 0 0 200 400 8 40 0 0 0 900 0 0 0 0 0 (anti-missile)
"nas nuc asw cruiser" 50 50 330 1800 80 45 35 9 10 4 25 8 0 0 0 0 0 200 120 6 160 0 0 0 500 0 0 0 0 0 (torp dchrg sonar sub-torp)
"nsp nuc supply ship" 60 40 360 1500 40 45 35 6 0 0 10 2 0 0 0 2 50 50 600 50 999 0 0 0 999 0 1500 900 0 0 (supply)
/config