billr@saab.CNA.TEK.COM (Bill Randle) (08/29/90)
Submitted-by: VANCLEEF@mps.ohio-state.edu
Posting-number: Volume 11, Issue 41
Archive-name: gb3/Patch2c
Patch-To: gb3: Volume 10, Issue 1-14
#! /bin/sh
# This is a shell archive. Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file". To overwrite existing
# files, type "sh file -c". You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g.. If this archive is complete, you
# will see the following message at the end:
# "End of archive 3 (of 9)."
# Contents: patches02c server/welcome.txt
# Wrapped by billr@saab on Tue Aug 28 08:54:54 1990
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'patches02c' -a "${1}" != "-c" ; then
echo shar: Renaming existing file \"'patches02c'\" to \"'patches02c.orig'\"
mv -f 'patches02c' 'patches02c.orig'
fi
echo shar: Extracting \"'patches02c'\" \(57315 characters\)
sed "s/^X//" >'patches02c' <<'END_OF_FILE'
X*** /usr/cna/billr/games/gb3/server/Makefile Fri Jun 1 11:46:32 1990
X--- server/Makefile Tue Aug 28 08:59:20 1990
X***************
X*** 1,13 ****
X # Galactic Bloodshed (Robert Chansky, smq@b)
X # Makefile (modified by billr@saab.cna.tek.com)
X
X- # (the -pipe -g are for development.)
X # $UV, if used, is generally defined in the top level makefile. It's set
X # to -DBSD4_2 for BSD 4.2 derived systems (e.g. SunOS 3.X) that don't
X # have tm_zone as a member of the "tm" struct (see <time.h>).
X # $(HP) comes from top level makefile for host and port info.
X! CFLAGS = -O $(UV) $(HP)
X! #CFLAGS = -g $(HP)
X #CFLAGS = -pipe -g
X
X # objects for shell
X--- 1,14 ----
X # Galactic Bloodshed (Robert Chansky, smq@b)
X # Makefile (modified by billr@saab.cna.tek.com)
X
X # $UV, if used, is generally defined in the top level makefile. It's set
X # to -DBSD4_2 for BSD 4.2 derived systems (e.g. SunOS 3.X) that don't
X # have tm_zone as a member of the "tm" struct (see <time.h>).
X # $(HP) comes from top level makefile for host and port info.
X! # Define NO_LOG1P if your system does not have log1p(x).
X! # (The -pipe -g are for development.)
X! DEFINES = #-DNO_LOG1P
X! CFLAGS = -O $(UV) $(HP) $(DEFINES)
X #CFLAGS = -pipe -g
X
X # objects for shell
X***************
X*** 30,38 ****
X--- 31,41 ----
X perm.o \
X prof.o \
X GB_server.o \
X+ disolve.o \
X name.o \
X fire.o \
X land.o \
X+ dock.o \
X tech.o \
X map.o \
X max.o \
X***************
X*** 66,71 ****
X--- 69,75 ----
X
X # depend on vars.h and races.h
X VROBJS = getplace.o \
X+ disolve.o \
X autoreport.o \
X order.o \
X mobiliz.o \
X***************
X*** 107,112 ****
X--- 111,117 ----
X
X # depend on ships.h and vars.h
X SHIPOBJS = autoreport.o \
X+ dissolve.o \
X order.o \
X shootblast.o \
X makeplanet.o \
X***************
X*** 122,127 ****
X--- 127,133 ----
X enrol.o \
X fire.o \
X land.o \
X+ dock.o \
X map.o \
X max.o \
X move.o \
X***************
X*** 150,156 ****
X doturn.o \
X enrol.o \
X files.o \
X! GB.o \
X build.o \
X power.o \
X daemon.o \
X--- 156,162 ----
X doturn.o \
X enrol.o \
X files.o \
X! GB_server.o \
X build.o \
X power.o \
X daemon.o \
X***************
X*** 192,205 ****
X ${SHIPOBJS}: vars.h ships.h
X ${FOBJS}: files.h
X build.o : vars.h ships.h races.h shipdata.h
X! power.o files_shl.o : power.h
X! doturn.o doship.o doplanet.o moveship.o moveplanet.o : doturn.h
X moveship.o : vars.h ships.h shipdata.h
X doturn.o doplanet.o doship.o : power.h
X
X #fix it program
X fix : ${FIXOBJS}
X! cc -o fix ${FIXOBJS} -lcurses -ltermcap -lm
X
X #sizes : vars.h ships.h races.h
X # sizes.c
X--- 198,211 ----
X ${SHIPOBJS}: vars.h ships.h
X ${FOBJS}: files.h
X build.o : vars.h ships.h races.h shipdata.h
X! power.o dissolve.o files_shl.o : power.h
X! dissolve.o doturn.o doship.o doplanet.o moveship.o moveplanet.o : doturn.h
X moveship.o : vars.h ships.h shipdata.h
X doturn.o doplanet.o doship.o : power.h
X
X #fix it program
X fix : ${FIXOBJS}
X! ${CC} -o fix ${FIXOBJS} -lcurses -ltermcap -lm
X
X #sizes : vars.h ships.h races.h
X # sizes.c
X***************
X*** 206,231 ****
X
X # make data files program
X makeuniv : makeuniv.o makeplanet.o rand.o perm.o
X! cc -o makeuniv makeuniv.o makeplanet.o rand.o perm.o files.o -lm
X makeuniv.o : power.h
X
X
X # the daemon (actually it calls the update)
X GB_daemon : daemon.o
X! cc -o GB_daemon daemon.o
X
X # the enrollment program
X GB_enroll : ${EOBJS}
X! cc -o GB_enroll ${EOBJS} -lcurses -ltermcap -lm
X enrol.o : vars.h ships.h shipdata.h races.h
X
X # more clone
X! mor : more.c
X! cc -g -o mor more.c
X
X! #trav
X! trav : traverse.o files_rw.o files_shl.o files.o
X! cc -o trav traverse.o files_rw.o files_shl.o files.o
X
X chmod:
X chmod ag+xs GB
X--- 212,236 ----
X
X # make data files program
X makeuniv : makeuniv.o makeplanet.o rand.o perm.o
X! ${CC} -o makeuniv makeuniv.o makeplanet.o rand.o perm.o files.o -lm
X makeuniv.o : power.h
X
X
X # the daemon (actually it calls the update)
X GB_daemon : daemon.o
X! ${CC} -o GB_daemon daemon.o
X
X # the enrollment program
X GB_enroll : ${EOBJS}
X! ${CC} -o GB_enroll ${EOBJS} -lcurses -ltermcap -lm
X enrol.o : vars.h ships.h shipdata.h races.h
X
X # more clone
X! # mor : more.c
X! # ${CC} -g -o mor more.c
X
X! # trav : traverse.o files_rw.o files_shl.o files.o
X! # ${CC} -o trav traverse.o files_rw.o files_shl.o files.o
X
X chmod:
X chmod ag+xs GB
X***************
X*** 251,257 ****
X shar:
X /bin/cp Docs/*.doc* .
X # -uncompress enroll.dat.Z *.doc*
X! shar README Makefile *.script *.doc *.h *.c planet.list *.dat > GB.shar
X # -compress enroll.dat
X # compress GB.shar
X /bin/rm -f *.doc
X--- 256,262 ----
X shar:
X /bin/cp Docs/*.doc* .
X # -uncompress enroll.dat.Z *.doc*
X! shar README Makefile *.doc *.h *.c planet.list *.dat > GB.shar
X # -compress enroll.dat
X # compress GB.shar
X /bin/rm -f *.doc
X*** /usr/cna/billr/games/gb3/server/VN.c Wed May 30 15:12:50 1990
X--- server/VN.c Thu Aug 23 16:54:36 1990
X***************
X*** 24,29 ****
X--- 24,30 ----
X planettype *p;
X char buf[300];
X
X+
X if (ship->on) {
X
X if (ship->whatorbits==LEVEL_PLAN)
X***************
X*** 163,168 ****
X--- 164,170 ----
X planettype *planet;
X {
X reg int i;
X+ float getmass();
X
X if (ship->on) {
X
X***************
X*** 213,224 ****
X
X s2->armor = Shipdata[shipbuild][ABIL_ARMOR];
X s2->guns = Shipdata[shipbuild][ABIL_GUNS];
X- s2->size = Shipdata[shipbuild][ABIL_TARGET];
X s2->max_crew = Shipdata[shipbuild][ABIL_MAXCREW];
X s2->max_resource = Shipdata[shipbuild][ABIL_CARGO];
X s2->max_fuel = Shipdata[shipbuild][ABIL_FUELCAP];
X s2->max_destruct = Shipdata[shipbuild][ABIL_DESTCAP];
X s2->max_speed = Shipdata[shipbuild][ABIL_SPEED];
X s2->base_mass = getmass(s2);
X
X s2->mass = s2->base_mass;
X--- 215,226 ----
X
X s2->armor = Shipdata[shipbuild][ABIL_ARMOR];
X s2->guns = Shipdata[shipbuild][ABIL_GUNS];
X s2->max_crew = Shipdata[shipbuild][ABIL_MAXCREW];
X s2->max_resource = Shipdata[shipbuild][ABIL_CARGO];
X s2->max_fuel = Shipdata[shipbuild][ABIL_FUELCAP];
X s2->max_destruct = Shipdata[shipbuild][ABIL_DESTCAP];
X s2->max_speed = Shipdata[shipbuild][ABIL_SPEED];
X+ s2->size = ship_size(s2);
X s2->base_mass = getmass(s2);
X
X s2->mass = s2->base_mass;
X***************
X*** 237,242 ****
X--- 239,248 ----
X s2->bombard = 1;
X s2->protect.self = 1;
X s2->protect.planet = 1;
X+ /* set a course for the offending player's system */
X+ s2->whatdest = LEVEL_STAR;
X+ s2->deststar = random()&01 ? Sdata.VN_index1[VN_brain.Most_mad-1] :
X+ Sdata.VN_index2[VN_brain.Most_mad-1];
X } else {
X fprintf(stderr,"VN #%d constructed VN #%d.\n",shipno,Num_ships);
X s2->tech = ship->tech + 1.0;
X*** /usr/cna/billr/games/gb3/server/autoshoot.c Wed May 30 15:12:51 1990
X--- server/autoshoot.c Thu Aug 23 16:54:37 1990
X***************
X*** 49,55 ****
X sprintf(buf, "Bombardment of %s cancelled, PDNs are present.\n",
X prin_ship_orbits(ship));
X if(!notify(ship->owner, buf))
X! push_message(TELEG_PLAYER_AUTO, ship->owner, buf);
X return;
X }
X
X--- 49,55 ----
X sprintf(buf, "Bombardment of %s cancelled, PDNs are present.\n",
X prin_ship_orbits(ship));
X if(!notify(ship->owner, buf))
X! push_message(TELEG_PLAYER_AUTO, ship->owner, buf, TELEGRAM);
X return;
X }
X
X***************
X*** 168,174 ****
X
X
X /* execute attack */
X!
X numdest2 = shoot(1, to, &from, i, planet, (planettype *)NULL,x,y,stren,
X &dist, tech/numretal, telegram_buf, 0); /* (0=dont get smap) */
X
X--- 168,174 ----
X
X
X /* execute attack */
X! if(numretal)
X numdest2 = shoot(1, to, &from, i, planet, (planettype *)NULL,x,y,stren,
X &dist, tech/numretal, telegram_buf, 0); /* (0=dont get smap) */
X
X*** /usr/cna/billr/games/gb3/server/daemon.c Wed May 30 16:08:24 1990
X--- server/daemon.c Fri Aug 24 09:08:03 1990
X***************
X*** 42,47 ****
X--- 42,53 ----
X updtime = DEFAULT_UPDATE_TIME;
X
X /* initialize the data file to feed telnet */
X+ /*
X+ * This is here in case a new DAEMON_PASSWORD is defined, in which
X+ * case, the daemon.dat file must be updated. This costs very little
X+ * in overhead (only run once) and ensure that the file is always
X+ * uptodate if the password changes. (billr@saab.cna.tek.com)
X+ */
X if ((fd = fopen(DAEMONFL, "w")) == NULL)
X perror("GB_daemon open of daemon.dat failed");
X else
X***************
X*** 60,68 ****
X update = t->tm_hour;
X printf("Requesting update\n");
X /* this will trigger the update */
X- /*
X- exstat = system("telnet pooh 2010 < daemon.dat");
X- */
X sprintf(buf,"telnet %s %d < %s", GB_HOST, GB_PORT, DAEMONFL);
X exstat = system(buf);
X
X--- 66,71 ----
X*** /usr/cna/billr/games/gb3/server/makeuniv.c Wed May 30 15:13:27 1990
X--- server/makeuniv.c Thu Aug 23 16:55:11 1990
X***************
X*** 15,20 ****
X--- 15,22 ----
X #include <math.h>
X
X
X+ short list[1000];
X+
X FILE *fopen();
X planettype Makeplanet();
X char *Numbers[] = { "1","2","3","4","5","6","7","8","9","10","11",
X***************
X*** 25,41 ****
X char *argv[];
X {
X FILE *teledata,*racedata,*stardata,*planetdata,*sectordata,*shipdata;
X planettype planet;
X startype *Star;
X int star,e,e2,type,lowp,hip, roll, temperature;
X register int i,y,x;
X! char str[200];
X float att,xspeed[NUMSTARS],yspeed[NUMSTARS], dist, dummy;
X float xpos, ypos;
X
X srandom(getpid());
X
X! Bzero(Sdata);
X printf("# of stars(1-%d):",NUMSTARS-1);
X scanf("%d",&(Sdata.numstars));
X printf("low # of planets (1-%d):",MAXPLANETS);
X--- 27,81 ----
X char *argv[];
X {
X FILE *teledata,*racedata,*stardata,*planetdata,*sectordata,*shipdata;
X+ FILE *planetlist;
X planettype planet;
X startype *Star;
X int star,e,e2,type,lowp,hip, roll, temperature;
X register int i,y,x;
X! char str[200], c;
X float att,xspeed[NUMSTARS],yspeed[NUMSTARS], dist, dummy;
X float xpos, ypos;
X+ int autoname, numlist, namecount, t;
X+ char Names[1000][20];
X
X srandom(getpid());
X
X! printf("\nDo you wish to use the file '%s' for names (y/n)\?",
X! PLANETLIST);
X! c = getchr();
X! getchr();
X!
X! autoname = (c=='y');
X!
X! if(autoname) {
X! if( (planetlist = fopen(PLANETLIST, "r"))==NULL) {
X! printf("unable to open %s\n", PLANETLIST);
X! exit(-1);
X! }
X!
X! numlist=0;
X! t = 0;
X! while( (c=getc(planetlist)) != EOF) {
X! if(c!='\n') {
X! Names[numlist][t++] = c;
X! } else {
X! numlist++;
X! t = 0;
X! }
X!
X! }
X! numlist--;
X! close(planetlist);
X!
X! printf("%d names listed in %s\n", numlist, PLANETLIST);
X!
X! rand_list(numlist);
X!
X! }
X!
X! namecount = 0;
X!
X! Bzero(Sdata);
X printf("# of stars(1-%d):",NUMSTARS-1);
X scanf("%d",&(Sdata.numstars));
X printf("low # of planets (1-%d):",MAXPLANETS);
X***************
X*** 56,62 ****
X exit(-1);
X }
X
X! /* get names, positions of stars first */
X for (star=0; star<Sdata.numstars; star++) {
X Stars[star]=(startype *)malloc(sizeof(startype));
X Bzero(*Stars[star]);
X--- 96,103 ----
X exit(-1);
X }
X
X!
X! /* get names, positions of stars first */
X for (star=0; star<Sdata.numstars; star++) {
X Stars[star]=(startype *)malloc(sizeof(startype));
X Bzero(*Stars[star]);
X***************
X*** 65,70 ****
X--- 106,115 ----
X Star->temperature=int_rand(0, 4)+int_rand(1, 5);
X /* heat of the star */
X Star->gravity = int_rand(10000,100000) / 100.0;
X+
X+ if(autoname && (namecount <= numlist)) {
X+ sprintf(Star->name, "%s", Names[list[namecount++]]);
X+ } else {
X printf("[%d] name of star (%d planets):",star, Star->numplanets);
X for (i=0; i<NAMESIZE-4; i++)
X putchr('.');
X***************
X*** 72,77 ****
X--- 117,124 ----
X putchr('\010'); /* ^H */
X scanf("%14[^\n]",Star->name);
X getchr();
X+ }
X+
X Star->xpos=(float)int_rand(-UNIVSIZE,UNIVSIZE);
X xspeed[star] = 0;
X Star->ypos=(float)int_rand(-UNIVSIZE,UNIVSIZE);
X***************
X*** 83,90 ****
X Star = Stars[star];
X
X for (i=0; i<Star->numplanets; i++) {
X- sprintf(Star->pnames[i],"%s",Numbers[i]);
X
X dist = -1.0;
X while (dist >= SYSTEMSIZE || dist <= 100.0) {
X xpos=(float)int_rand(-SYSTEMSIZE,SYSTEMSIZE);
X--- 130,141 ----
X Star = Stars[star];
X
X for (i=0; i<Star->numplanets; i++) {
X
X+ if(autoname && (namecount <= numlist))
X+ sprintf(Star->pnames[i],"%s", Names[list[namecount++]]);
X+ else
X+ sprintf(Star->pnames[i],"%s",Numbers[i]);
X+
X dist = -1.0;
X while (dist >= SYSTEMSIZE || dist <= 100.0) {
X xpos=(float)int_rand(-SYSTEMSIZE,SYSTEMSIZE);
X***************
X*** 114,124 ****
X else
X type = TYPE_WATER;
X } else if(temperature > -10 && temperature <= 30) {
X! if(roll <=25)
X type = TYPE_ASTEROID;
X! else if(roll > 25 && roll <=50)
X type = TYPE_AIRLESS;
X! else if(roll > 50 && roll <=75)
X type = TYPE_EARTH;
X else
X type = TYPE_WATER;
X--- 165,175 ----
X else
X type = TYPE_WATER;
X } else if(temperature > -10 && temperature <= 30) {
X! if(roll <=10)
X type = TYPE_ASTEROID;
X! else if(roll > 15 && roll <=40)
X type = TYPE_AIRLESS;
X! else if(roll > 40 && roll <=70)
X type = TYPE_EARTH;
X else
X type = TYPE_WATER;
X***************
X*** 285,291 ****
X chmod(TELEGRAMDIR, 00770);
X
X /* make telegram files for each player */
X! for (i=1; i<=MAXPLAYERS; i++) {
X sprintf(str, "%s.%d", TELEGRAMFL, i );
X if ((teledata = fopen(str, "w+"))==NULL) {
X printf(" unable to open %s\n",str);
X--- 336,342 ----
X chmod(TELEGRAMDIR, 00770);
X
X /* make telegram files for each player */
X! for (i=1; i<MAXPLAYERS; i++) {
X sprintf(str, "%s.%d", TELEGRAMFL, i );
X if ((teledata = fopen(str, "w+"))==NULL) {
X printf(" unable to open %s\n",str);
X***************
X*** 293,297 ****
X fchmod(teledata,00660);
X fclose(teledata);
X }
X! }
X }
X--- 344,407 ----
X fchmod(teledata,00660);
X fclose(teledata);
X }
X! }
X!
X! sprintf(str, "/bin/mkdir %s", NEWSDIR );
X! system(str);
X! chmod(NEWSDIR, 00770);
X!
X! /* make news files for each player */
X! for (i=1; i<MAXPLAYERS; i++) {
X! sprintf(str, "%s.%d", DECLARATIONFL, i );
X! if ((teledata = fopen(str, "w+"))==NULL)
X! printf(" unable to open %s\n",str);
X! else {
X! fchmod(teledata,00660);
X! fclose(teledata);
X! }
X! sprintf(str, "%s.%d", TRANSFERFL, i );
X! if ((teledata = fopen(str, "w+"))==NULL)
X! printf(" unable to open %s\n",str);
X! else {
X! fchmod(teledata,00660);
X! fclose(teledata);
X! }
X! sprintf(str, "%s.%d", COMBATFL, i );
X! if ((teledata = fopen(str, "w+"))==NULL)
X! printf(" unable to open %s\n",str);
X! else {
X! fchmod(teledata,00660);
X! fclose(teledata);
X! }
X! sprintf(str, "%s.%d", ANNOUNCEFL, i );
X! if ((teledata = fopen(str, "w+"))==NULL)
X! printf(" unable to open %s\n",str);
X! else {
X! fchmod(teledata,00660);
X! fclose(teledata);
X! }
X! }
X!
X!
X! printf("%d bodies named.\n", namecount);
X! }
X!
X! rand_list(n) /* mix up the numbers 0 thru n */
X! int n;
X! {
X! short nums[1000], i, j, k;
X! for(i=0; i<1000; i++)
X! nums[i]=i;
X!
X! /* create mix up the list */
X! j = 0;
X! while(j<=n) {
X! k=int_rand(0, n-j);
X! list[j]=nums[k];
X!
X! for(i=k; i<n-j; i++)
X! nums[i]=nums[i+1];
X!
X! j++;
X! }
X }
X*** /usr/cna/billr/games/gb3/server/max.c Wed May 30 15:13:29 1990
X--- server/max.c Fri Aug 24 16:40:34 1990
X***************
X*** 27,36 ****
X {
X int val;
X float a,b;
X! a=FACTOR_FERT_SUPPORT * (log1p((double)1.*p->eff) * log1p((double)p->fert)+1.0);
X! b=.01 * ((r==NULL) ? 0.0 : r->likes[p->des])
X! * (MAX(0.0, MIN(100.0, c+20.0*(r->number_sexes-2))));
X!
X
X val = (int)( a * b * .01 * (100.0 - (float)toxic) );
X
X--- 27,34 ----
X {
X int val;
X float a,b;
X! a=FACTOR_FERT_SUPPORT * (log1p((double)p->eff+1.0) * log1p((double)p->fert)+1.0);
X! b=.01 * c *((r==NULL) ? 0.0 : MAX(0.0, MIN(r->likes[p->des] + 0.2*(r->number_sexes - 2), 1.0)) );
X
X val = (int)( a * b * .01 * (100.0 - (float)toxic) );
X
X*** /usr/cna/billr/games/gb3/server/mobiliz.c Wed May 30 15:13:31 1990
X--- server/mobiliz.c Thu Aug 23 16:55:14 1990
X***************
X*** 49,54 ****
X--- 49,55 ----
X sprintf(buf, "Current mobilization: %d Quota: %d\n",
X p->info[Playernum-1].comread, p->info[Playernum-1].mob_set);
X notify(Playernum, buf);
X+ free(p);
X return;
X }
X
X***************
X*** 59,71 ****
X if (sum_mob > 100 || sum_mob < 0) {
X sprintf(buf,"Illegal value.\n");
X notify(Playernum, buf);
X return;
X }
X
X
X p->info[Playernum-1].mob_set = sum_mob;
X! openpdata(&mobilize_pdata);
X! putplanet(mobilize_pdata,p,Stars[Dir[Playernum-1].snum]->planetpos[Dir[Playernum-1].pnum]);
X close_file(mobilize_pdata);
X
X deductAPs(Playernum,APcount, Dir[Playernum-1].snum, 0);
X--- 60,73 ----
X if (sum_mob > 100 || sum_mob < 0) {
X sprintf(buf,"Illegal value.\n");
X notify(Playernum, buf);
X+ free(p);
X return;
X }
X
X
X p->info[Playernum-1].mob_set = sum_mob;
X! openpdata(&mobilize_pdata);
X! putplanet(mobilize_pdata,p,Stars[Dir[Playernum-1].snum]->planetpos[Dir[Playernum-1].pnum]);
X close_file(mobilize_pdata);
X
X deductAPs(Playernum,APcount, Dir[Playernum-1].snum, 0);
X*** /usr/cna/billr/games/gb3/server/planet.list Wed May 30 15:13:58 1990
X--- server/planet.list Thu Aug 23 16:55:40 1990
X***************
X*** 1,4 ****
X-
X Arioch
X Amaterasu
X Azagthoth
X--- 1,3 ----
X***************
X*** 82,88 ****
X Granis
X Gungnir
X Halloway
X- Harry'sWorld
X Halvec
X Hal
X Hadad
X--- 81,86 ----
X***************
X*** 150,157 ****
X Mandara
X Manitou
X Marduk
X! (Mashyane
X! Mashye)
X Megara
X Menrua
X Metis
X--- 148,155 ----
X Mandara
X Manitou
X Marduk
X! Mashyane
X! Mashye
X Megara
X Menrua
X Metis
X***************
X*** 159,165 ****
X Mulungu
X Nyarlathotep
X Nessus
X- NewBeginnings
X Nuada
X Nebo
X Ninhursag
X--- 157,162 ----
X***************
X*** 180,187 ****
X Oro
X Orunila
X Otus
X- PlanetX
X- Planet10
X Pleides
X Pachacutil
X Pandavas
X--- 177,182 ----
X***************
X*** 292,294 ****
X--- 287,563 ----
X Zethus
X Zocho
X Zurvan
X+ Pegasus
X+ Cylon
X+ Ares
X+ Taurus
X+ Gemini
X+ Cancer
X+ Leo
X+ Virgo
X+ Libra
X+ Scorpio
X+ Sagittarius
X+ Capricorn
X+ Aquarius
X+ Pisces
X+ Mercury
X+ Venus
X+ Terra
X+ Mars
X+ Jupiter
X+ Saturn
X+ Uranus
X+ Neptune
X+ Pluto
X+ Galactica
X+ Andromeda
X+ Perseus
X+ Dalos
X+ Erusa
X+ Lamarna
X+ Deneb
X+ Cygnus
X+ Rigel
X+ Regulus
X+ Aldebran
X+ Lyra
X+ Vega
X+ Aquila
X+ Procyon
X+ Sirius
X+ Trantor
X+ Caneb
X+ Indis
X+ Cetelus
X+ Cetus
X+ Citurnae
X+ Sardonis
X+ Zarg
X+ Urdanis
X+ Tarkus
X+ Crux
X+ Fantor
X+ Zog
X+ Xantor
X+ Qrdus
X+ Mordus
X+ Remulak
X+ Meepzorp
X+ Zot
X+ Varnak
X+ Klingon
X+ Romulus
X+ Remus
X+ Vulcan
X+ Sarnak
X+ Tarsus
X+ Gamorae
X+ Delphia
X+ Uhura
X+ Logan
X+ Primax
X+ Ectoprimax
X+ Endoprimax
X+ Orthoprimax
X+ Oz
X+ Jhurna
X+ Karnak
X+ Og
X+ Io
X+ Tarnesus
X+ Huron
X+ Ophiucus
X+ Andor
X+ Chaos
X+ Cthulhu
X+ Persephone
X+ Sagurak
X+ Oliphant
X+ Olympus
X+ Imperium
X+ Illiam
X+ Athena
X+ Apollo
X+ Dionysus
X+ Bacchus
X+ Zeus
X+ Hera
X+ Aphrodite
X+ Hephiastes
X+ Yrga
X+ Reggae
X+ Crassus
X+ Draco
X+ Ephraites
X+ Betelgeuse
X+ Magna
X+ Nardis
X+ Nemesis
X+ Centauri
X+ Shax
X+ Xerxes
X+ Piithar
X+ Ibanis
X+ Carthage
X+ Eldorado
X+ Pymeria
X+ Ursa
X+ Interigon
X+ Rol
X+ Pollux
X+ Castor
X+ Sedaria
X+ Iki
X+ Hestia
X+ Polaris
X+ Medusa
X+ Hyperion
X+ Fredux
X+ Gabora
X+ Val
X+ Gnur
X+ Jena
X+ Resida
X+ Ghal
X+ Cranus
X+ Zaaxon
X+ Cassiopeia
X+ Ergos
X+ Sega
X+ Tranus
X+ Oox
X+ Sekasis
X+ Alpha
X+ Beta
X+ Gamma
X+ Delta
X+ Epsilon
X+ Zeta
X+ Eta
X+ Theta
X+ Iota
X+ Kappa
X+ Lambda
X+ Mu
X+ Nu
X+ Xi
X+ Omicron
X+ Pi
X+ Rho
X+ Sigma
X+ Tau
X+ Upsilon
X+ Phi
X+ Chi
X+ Psi
X+ Omega
X+ Claire
X+ Pthura
X+ Deganus
X+ Bora
X+ Cepheus
X+ Hercules
X+ Magellan
X+ Galileo
X+ Americos
X+ Britannia
X+ Lupus
X+ Lugundum
X+ Atlantis
X+ Suboceana
X+ Oceana
X+ Eurasia
X+ Peace
X+ War
X+ Tyrrea
X+ Poseiden
X+ Vurat
X+ Drak
X+ Rimahad
X+ Lod
X+ Troll
X+ Dearth
X+ Ulka
X+ Vesta
X+ Eegos
X+ Sal
X+ Proteus
X+ Boz
X+ Lhard
X+ Nada
X+ Miriam
X+ Xrka
X+ Ord
X+ Jazdarnil
X+ Kepa
X+ Zrd
X+ Ixmirsis
X+ Megnazon
X+ Terl
X+ Naiad
X+ Thalassa
X+ Despoina
X+ Galatea
X+ Larissa
X+ Proteus
X+ Triton
X+ Nereid
X+ Charon
X+ Cordelia
X+ Ophelia
X+ Bianca
X+ Cressida
X+ Desdemona
X+ Juliet
X+ Rosalind
X+ Belinda
X+ Puck
X+ Miranda
X+ Ariel
X+ Umbriel
X+ Titania
X+ Oberon
X+ Atlas
X+ Prometheus
X+ Pandora
X+ Janus
X+ Epimetheus
X+ Mimas
X+ Enceladus
X+ Tethys
X+ Telesto
X+ Calypso
X+ Dione
X+ Helene
X+ Titan
X+ Iapetus
X+ Hyperion
X+ Phoebe
X+ Sinope
X+ Pasiphae
X+ Carme
X+ Ananke
X+ Elara
X+ Lysithea
X+ Himalia
X+ Leda
X+ Callisto
X+ Ganymede
X+ Europa
X+ Thebe
X+ Amalthea
X+ Metis
X+ Adrastea
X+ Phobos
X+ Deimos
X+ Chiron
X+ Mercury
X+ Venus
X+ Terra
X+ Mars
X+ Jupiter
X+ Saturn
X+ Uranus
X+ Neptune
X+ Pluto
X*** /usr/cna/billr/games/gb3/server/prof.c Wed May 30 15:13:43 1990
X--- server/prof.c Thu Aug 23 16:55:24 1990
X***************
X*** 24,29 ****
X--- 24,30 ----
X char args[MAXARGS][COMMANDSIZE];
X {
X int i, j, numraces;
X+ racetype *Race;
X
X if(argn <= 1) {
X notify(Playernum, "You must give a list of player numbers.\n");
X***************
X*** 31,47 ****
X }
X numraces = Numraces();
X
X for(i=1; i<=argn-1; i++) {
X j=atoi(args[i]);
X if(!(j<1 || j>numraces)) {
X! free(Race);
X! openracedata(&prof_racedata);
X! getrace(prof_racedata, &Race, j);
X! close_file(prof_racedata);
X sprintf(buf, "[%2d] %s\n", j, Race->name);
X notify(Playernum, buf);
X! }
X }
X
X }
X
X--- 32,49 ----
X }
X numraces = Numraces();
X
X+
X+ openracedata(&prof_racedata);
X for(i=1; i<=argn-1; i++) {
X j=atoi(args[i]);
X if(!(j<1 || j>numraces)) {
X! getrace(prof_racedata, &Race, (int)j);
X sprintf(buf, "[%2d] %s\n", j, Race->name);
X notify(Playernum, buf);
X! free(Race);
X }
X+ }
X+ close_file(prof_racedata);
X
X }
X
X***************
X*** 52,60 ****
X char args[MAXARGS][COMMANDSIZE];
X {
X int i, p, numraces;
X! racetype *r;
X
X- free(Race);
X openracedata(&prof_racedata);
X getrace(prof_racedata, &Race,Playernum);
X close_file(prof_racedata);
X--- 54,61 ----
X char args[MAXARGS][COMMANDSIZE];
X {
X int i, p, numraces;
X! racetype *r, *Race;
X
X openracedata(&prof_racedata);
X getrace(prof_racedata, &Race,Playernum);
X close_file(prof_racedata);
X***************
X*** 139,145 ****
X
X GetPlayer(args[1], &p, &r);
X
X! if (p== -1) {
X sprintf(buf,"Player does not exist.\n");
X notify(Playernum, buf);
X return;
X--- 140,146 ----
X
X GetPlayer(args[1], &p, &r);
X
X! if (p < 1 || p > Numraces() ) {
X sprintf(buf,"Player does not exist.\n");
X notify(Playernum, buf);
X return;
X***************
X*** 191,210 ****
X notify(Playernum, buf);
X sprintf(buf," atmosphere concentrations:\n");
X notify(Playernum, buf);
X! sprintf(buf," Methane %2s%% Oxygen %2s%%\n",
X! Estimate_i((int)r->conditions[METHANE],Race,p),
X Estimate_i((int)r->conditions[OXYGEN],Race,p) );
X notify(Playernum, buf);
X! sprintf(buf," CO2 %2s%% Hydrogen %2s%%\n",
X! Estimate_i((int)r->conditions[CO2],Race,p),
X Estimate_i((int)r->conditions[HYDROGEN],Race,p) );
X notify(Playernum, buf);
X! sprintf(buf," Nitrogen %2s%% Sulfur %2s%%\n",
X! Estimate_i((int)r->conditions[NITROGEN],Race,p),
X Estimate_i((int)r->conditions[SULFUR],Race,p) );
X notify(Playernum, buf);
X! sprintf(buf," Helium %2s%% Other %2s%%\n",
X! Estimate_i((int)r->conditions[HELIUM],Race,p),
X Estimate_i((int)r->conditions[OTHER],Race,p) );
X
X notify(Playernum, buf);
X--- 192,219 ----
X notify(Playernum, buf);
X sprintf(buf," atmosphere concentrations:\n");
X notify(Playernum, buf);
X! sprintf(buf," Methane %2s%%",
X! Estimate_i((int)r->conditions[METHANE],Race,p));
X! notify(Playernum, buf);
X! sprintf(buf, " Oxygen %2s%%\n",
X Estimate_i((int)r->conditions[OXYGEN],Race,p) );
X notify(Playernum, buf);
X! sprintf(buf," CO2 %2s%%",
X! Estimate_i((int)r->conditions[CO2],Race,p));
X! notify(Playernum, buf);
X! sprintf(buf, " Hydrogen %2s%%\n",
X Estimate_i((int)r->conditions[HYDROGEN],Race,p) );
X notify(Playernum, buf);
X! sprintf(buf," Nitrogen %2s%%",
X! Estimate_i((int)r->conditions[NITROGEN],Race,p));
X! notify(Playernum, buf);
X! sprintf(buf, " Sulfur %2s%%\n",
X Estimate_i((int)r->conditions[SULFUR],Race,p) );
X notify(Playernum, buf);
X! sprintf(buf," Helium %2s%%",
X! Estimate_i((int)r->conditions[HELIUM],Race,p));
X! notify(Playernum, buf);
X! sprintf(buf," Other %2s%%\n",
X Estimate_i((int)r->conditions[OTHER],Race,p) );
X
X notify(Playernum, buf);
X***************
X*** 212,219 ****
X Race->translate[p-1]>80 ? Desnames[r->likesbest] : " ? " );
X notify(Playernum, buf);
X
X! sprintf(buf,"\nTelescope ranges: ground: %s, space: %s\n",
X! Estimate_f(tele_range(OTYPE_GTELE,r->tech), Race,p),
X Estimate_f(tele_range(OTYPE_STELE,r->tech), Race,p) );
X notify(Playernum, buf);
X sprintf(buf,"Gun range: %s\n",
X--- 221,230 ----
X Race->translate[p-1]>80 ? Desnames[r->likesbest] : " ? " );
X notify(Playernum, buf);
X
X! sprintf(buf,"\nTelescope ranges: ground: %s,",
X! Estimate_f(tele_range(OTYPE_GTELE,r->tech), Race,p));
X! notify(Playernum, buf);
X! sprintf(buf, "space: %s\n",
X Estimate_f(tele_range(OTYPE_STELE,r->tech), Race,p) );
X notify(Playernum, buf);
X sprintf(buf,"Gun range: %s\n",
X***************
X*** 220,226 ****
X--- 231,239 ----
X Estimate_f(gun_range(r, NULL), Race,p) );
X notify(Playernum, buf);
X
X+ free(r);
X }
X+ free(Race);
X
X }
X
X*** /usr/cna/billr/games/gb3/server/read_teleg.c Wed May 30 15:13:44 1990
X--- server/read_teleg.c Thu Aug 23 16:55:25 1990
X***************
X*** 23,34 ****
X
X char telegram_file[PATHLEN];
X
X! teleg_read(Playernum)
X int Playernum;
X {
X char *p;
X
X sprintf(telegram_file,"%s.%d", TELEGRAMFL, Playernum);
X if((teleg_read_fd = fopen(telegram_file, "r")) != 0) {
X while(fgets(buf, sizeof buf, teleg_read_fd)) {
X for(p = buf; *p; p++) if(*p == '\n') {
X--- 23,53 ----
X
X char telegram_file[PATHLEN];
X
X! teleg_read(Playernum, type)
X int Playernum;
X+ int type;
X {
X char *p;
X
X+ switch(type) {
X+ case TELEGRAM:
X sprintf(telegram_file,"%s.%d", TELEGRAMFL, Playernum);
X+ break;
X+ case DECLARATION:
X+ sprintf(telegram_file,"%s.%d", DECLARATIONFL, Playernum);
X+ break;
X+ case TRANSFER:
X+ sprintf(telegram_file,"%s.%d", TRANSFERFL, Playernum);
X+ break;
X+ case COMBAT:
X+ sprintf(telegram_file,"%s.%d", COMBATFL, Playernum);
X+ break;
X+ case ANNOUNCE:
X+ sprintf(telegram_file,"%s.%d", ANNOUNCEFL, Playernum);
X+ break;
X+ default: return;
X+ }
X+
X if((teleg_read_fd = fopen(telegram_file, "r")) != 0) {
X while(fgets(buf, sizeof buf, teleg_read_fd)) {
X for(p = buf; *p; p++) if(*p == '\n') {
X*** /usr/cna/billr/games/gb3/server/relation.c Wed May 30 15:13:45 1990
X--- server/relation.c Thu Aug 23 16:55:26 1990
X***************
X*** 24,35 ****
X {
X int numraces;
X int p;
X! racetype *r;
X
X! free(Race);
X openracedata(&relation_racedata);
X getrace(relation_racedata, &Race, Playernum);
X- numraces = Numraces();
X
X sprintf(buf,"\n Racial Relations Report for %s\n\n",Race->name);
X notify(Playernum, buf);
X--- 24,35 ----
X {
X int numraces;
X int p;
X! racetype *r, *Race;
X
X! numraces = Numraces();
X!
X openracedata(&relation_racedata);
X getrace(relation_racedata, &Race, Playernum);
X
X sprintf(buf,"\n Racial Relations Report for %s\n\n",Race->name);
X notify(Playernum, buf);
X***************
X*** 40,46 ****
X if(argn==1) {
X for (p=1; p<=numraces; p++)
X if (p != Race->Playernum) {
X! getrace(relation_racedata, &r, p);
X sprintf(buf,"%2d %s (%3d%%) %20.20s : %10s %10s\n", p,
X ((Race->God || Race->translate[p-1] > 30) && r->Thing) ?
X "Meso" : " ", Race->translate[p-1], r->name,
X--- 40,46 ----
X if(argn==1) {
X for (p=1; p<=numraces; p++)
X if (p != Race->Playernum) {
X! getrace(relation_racedata, &r, (int)p);
X sprintf(buf,"%2d %s (%3d%%) %20.20s : %10s %10s\n", p,
X ((Race->God || Race->translate[p-1] > 30) && r->Thing) ?
X "Meso" : " ", Race->translate[p-1], r->name,
X***************
X*** 51,58 ****
X }
X } else {
X GetPlayer(args[1], &p, &r);
X! if(p==-1) {
X notify(Playernum, "No such player.\n");
X return;
X }
X sprintf(buf,"%2d %s (%3d%%) %20.20s : %10s %10s\n", p,
X--- 51,59 ----
X }
X } else {
X GetPlayer(args[1], &p, &r);
X! if(p < 1 || p > numraces) {
X notify(Playernum, "No such player.\n");
X+ free(Race);
X return;
X }
X sprintf(buf,"%2d %s (%3d%%) %20.20s : %10s %10s\n", p,
X***************
X*** 63,68 ****
X--- 64,70 ----
X notify(Playernum, buf);
X free(r);
X }
X+ free(Race);
X close_file(relation_racedata);
X
X
X*** /usr/cna/billr/games/gb3/server/shlmisc.c Wed May 30 15:13:48 1990
X--- server/shlmisc.c Thu Aug 23 16:55:29 1990
X***************
X*** 78,101 ****
X *rnum = -1;
X return;
X } else {
X! openracedata(&shl_racedata);
X getrace(shl_racedata, race, *rnum);
X! close_file(shl_racedata);
X return;
X }
X } else {
X l = strlen(name);
X! openracedata(&shl_racedata);
X for (i=1; !(*rnum) && i<=numraces; i++) {
X! getrace(shl_racedata, race, i);
X if (!strncmp(name, (*race)->name, l)) {
X *rnum = i;
X! close_file(shl_racedata);
X return;
X! } else
X free(*race);
X! }
X! close_file(shl_racedata);
X *rnum = -1;
X }
X }
X--- 78,101 ----
X *rnum = -1;
X return;
X } else {
X! openracedata(&shl_racedata);
X getrace(shl_racedata, race, *rnum);
X! close_file(shl_racedata);
X return;
X }
X } else {
X l = strlen(name);
X! openracedata(&shl_racedata);
X for (i=1; !(*rnum) && i<=numraces; i++) {
X! getrace(shl_racedata, race, (int)i);
X if (!strncmp(name, (*race)->name, l)) {
X *rnum = i;
X! close_file(shl_racedata);
X return;
X! } else
X free(*race);
X! }
X! close_file(shl_racedata);
X *rnum = -1;
X }
X }
X***************
X*** 134,140 ****
X }
X Sdata.AP[Playernum-1] -= alloc;
X putsdata(stardatafile,&Sdata);
X! getstar(stardatafile, &Stars[Dir[Playernum-1].snum], Dir[Playernum-1].snum);
X Stars[Dir[Playernum-1].snum]->AP[Playernum-1] = MIN(99,Stars[Dir[Playernum-1].snum]->AP[Playernum-1]
X +alloc);
X putstar(stardatafile, Stars[Dir[Playernum-1].snum], Dir[Playernum-1].snum);
X--- 134,141 ----
X }
X Sdata.AP[Playernum-1] -= alloc;
X putsdata(stardatafile,&Sdata);
X! free(Stars[Dir[Playernum-1].snum]);
X! getstar(stardatafile, &Stars[Dir[Playernum-1].snum], Dir[Playernum-1].snum);
X Stars[Dir[Playernum-1].snum]->AP[Playernum-1] = MIN(99,Stars[Dir[Playernum-1].snum]->AP[Playernum-1]
X +alloc);
X putstar(stardatafile, Stars[Dir[Playernum-1].snum], Dir[Playernum-1].snum);
X***************
X*** 175,183 ****
X }
X } else {
X getsdata(deductAPs_stardata,&Sdata);
X! Sdata.AP[Playernum-1] -= n;
X! if (Sdata.AP[Playernum-1] < 0)
X! Sdata.AP[Playernum-1] = 0;
X putsdata(deductAPs_stardata,&Sdata);
X
X if (Dir[Playernum-1].level==LEVEL_UNIV) {
X--- 176,182 ----
X }
X } else {
X getsdata(deductAPs_stardata,&Sdata);
X! Sdata.AP[Playernum-1] = MAX(0,Sdata.AP[Playernum-1]-n);
X putsdata(deductAPs_stardata,&Sdata);
X
X if (Dir[Playernum-1].level==LEVEL_UNIV) {
X***************
X*** 239,244 ****
X--- 238,244 ----
X break;
X case LEVEL_STAR:
X openstardata(&fix_stardata);
X+ free(Stars[Dir[Playernum-1].snum]);
X getstar(fix_stardata, &Stars[Dir[Playernum-1].snum], Dir[Playernum-1].snum);
X close_file(fix_stardata);
X sh = Stars[Dir[Playernum-1].snum]->ships;
X***************
X*** 248,253 ****
X--- 248,254 ----
X getplanet(fix_pdata, &p, Stars[Dir[Playernum-1].snum]->planetpos[Dir[Playernum-1].pnum]);
X close_file(fix_pdata);
X sh = p->ships;
X+ free(p);
X break;
X case LEVEL_SHIP:
X sh = Dir[Playernum-1].shipno;
X*** /usr/cna/billr/games/gb3/server/shootblast.c Wed May 30 15:13:49 1990
X--- server/shootblast.c Thu Aug 23 16:55:30 1990
X***************
X*** 34,44 ****
X char *msg;
X int getmap;
X {
X- shiptype *ship;
X double xfrom,yfrom,xto,yto;
X float nd;
X int casualties;
X! sprintf(msg,""); /* 'zero' it out */
X if (from.level==LEVEL_PLAN) {
X xfrom = Stars[from.snum]->xpos + fpl->xpos;
X yfrom = Stars[from.snum]->ypos + fpl->ypos;
X--- 34,45 ----
X char *msg;
X int getmap;
X {
X double xfrom,yfrom,xto,yto;
X float nd;
X int casualties;
X! racetype *alien;
X!
X! sprintf(msg,""); /* 'zero' it out */
X if (from.level==LEVEL_PLAN) {
X xfrom = Stars[from.snum]->xpos + fpl->xpos;
X yfrom = Stars[from.snum]->ypos + fpl->ypos;
X***************
X*** 99,108 ****
X
X nd = blast(Playernum,&from, to, fromplayer, tpl, sectorx, sectory, *dist, tech,strength, getmap);
X
X! if (from.level==LEVEL_SHIP && from.shipptr->type==OTYPE_GR)
X sprintf(buf,"%.0f points radiation damage given\n", nd);
X else if (to->level==LEVEL_SHIP) {
X- racetype *alien;
X sprintf(buf,"%.0f%% total damage done\n", nd);
X
X str_cat(msg, buf);
X--- 100,109 ----
X
X nd = blast(Playernum,&from, to, fromplayer, tpl, sectorx, sectory, *dist, tech,strength, getmap);
X
X! if (from.level==LEVEL_SHIP && from.shipptr->type==OTYPE_GR
X! && !from.shipptr->mode)
X sprintf(buf,"%.0f points radiation damage given\n", nd);
X else if (to->level==LEVEL_SHIP) {
X sprintf(buf,"%.0f%% total damage done\n", nd);
X
X str_cat(msg, buf);
X***************
X*** 116,126 ****
X casualties = to->shipptr->popn;
X
X to->shipptr->popn -= casualties;
X openracedata(&shoot_racedata);
X! getrace(shoot_racedata, &alien, to->shipptr->owner);
X close_file(shoot_racedata);
X to->shipptr->mass -= casualties * alien->mass;
X free(alien);
X if (casualties) {
X sprintf(buf,"%d crew casualties\n", casualties);
X str_cat(msg, buf);
X--- 117,129 ----
X casualties = to->shipptr->popn;
X
X to->shipptr->popn -= casualties;
X+
X openracedata(&shoot_racedata);
X! getrace(shoot_racedata, &alien, (int)to->shipptr->owner);
X close_file(shoot_racedata);
X to->shipptr->mass -= casualties * alien->mass;
X free(alien);
X+
X if (casualties) {
X sprintf(buf,"%d crew casualties\n", casualties);
X str_cat(msg, buf);
X***************
X*** 157,165 ****
X int getmap; /* whether to get smap or not */
X {
X register int x2,y2;
X! reg float r; /* radius of blast */
X float d,damage,str;
X! int numdest = 0,lowx,lowy,hix,hiy,crithits,critdam,dam;
X int arm,body,fevade,tevade,fspeed,tspeed;
X int i, col, row, die, effect, kills;
X register sectortype *s;
X--- 160,168 ----
X int getmap; /* whether to get smap or not */
X {
X register int x2,y2;
X! reg float r; /* radius of blast/penetration probability*/
X float d,damage,str;
X! int numdest = 0,lowx,lowy,hix,hiy,crithits,critdam,dam,penetrate,hits;
X int arm,body,fevade,tevade,fspeed,tspeed;
X int i, col, row, die, effect, kills;
X register sectortype *s;
X***************
X*** 167,173 ****
X sectortype *s2;
X register float fac;
X int shfdata,sectdata;
X! int checkcrit = 0;
X
X if (to->level==LEVEL_SHIP) {
X
X--- 170,176 ----
X sectortype *s2;
X register float fac;
X int shfdata,sectdata;
X! int checkcrit = 0, damage_multiplier;
X
X if (to->level==LEVEL_SHIP) {
X
X***************
X*** 188,256 ****
X tspeed = to->shipptr->speed;
X tevade=to->shipptr->protect.evade;
X }
X!
X! body = Size(to->shipptr);
X
X! str = Num_hits(Playernum,dist,strength,tech,fevade,tevade,fspeed,tspeed,body);
X!
X! arm = Armor(to->shipptr);
X! sprintf(buf,"NUMBER OF HITS: %.0f ARMOR: %d BODY: %d \n",
X! str,arm,body);
X! notify(Playernum, buf);
X!
X! numdest = round_rand (40.*((float)str - (float)arm)/(float)body) *
X! (1 + 2*(to->shipptr->type == STYPE_MIRROR)); /*mirrors are easier to damage */
X
X! if(numdest < 0)
X! numdest = 0;
X!
X! sprintf(buf,"%d %% structural damage inflicted! \n",numdest);
X! notify(Playernum, buf);
X! /* evaluate critical hits */
X! checkcrit = 1;
X
X- if(from->level == LEVEL_SHIP) {
X- if((from->shipptr->type == OTYPE_GR) )
X- checkcrit = 0;
X- }
X
X
X! if(checkcrit)
X! {
X critdam = 0;
X crithits = 0;
X! for(i=1; i<=str; i++)
X! if(!int_rand(0, 15*body))
X! {
X crithits++;
X dam=int_rand(0,100);
X critdam += dam;
X }
X
X! if(critdam > 100)critdam = 100;
X! if(crithits)
X! {
X! sprintf(buf,"%d CRITICAL HIT(S) for %d %% additional damage!!!\n",
X crithits,critdam);
X notify(Playernum, buf);
X! numdest += critdam;
X }
X
X }
X
X! if (numdest < 0) numdest = 0;
X! else
X! if (numdest > 100) numdest = 100;
X
X! if (from->level==LEVEL_SHIP && from->shipptr->type==OTYPE_GR) {
X /* gamma-ray lasers irradiate targets */
X to->shipptr->rad = numdest;
X! if(int_rand(1,100) <= numdest)
X to->shipptr->active = 0;
X } else {
X
X if (to->shipptr->damage+numdest >= 100) {
X! kill_ship(to->shipptr);
X /* mess up the planet a bit. */
X if (to->shipptr->type==OTYPE_TOXWC &&
X to->shipptr->whatorbits==LEVEL_PLAN)
X--- 191,290 ----
X tspeed = to->shipptr->speed;
X tevade=to->shipptr->protect.evade;
X }
X! if(from->level==LEVEL_SHIP)
X! fac=tanh((double)((from->shipptr->tech+1.0)/(to->shipptr->tech+1.0)));
X! else
X! fac=tanh((double)((100.0+1.0)/(to->shipptr->tech+1.0)));
X
X! sprintf(buf, "fac = %f/%f\n", fac, to->shipptr->tech);
X! notify(Playernum, buf);
X! body=Size(to->shipptr);
X! arm=Armor(to->shipptr);
X! hits=Num_hits(Playernum,dist,strength,
X! tech,fevade,tevade,fspeed,tspeed,body);
X! penetrate = 0;
X! r = 1.0;
X! for(i=1; i<=arm; i++) r *= fac;
X
X! for(i=1; i<=hits; i++) /* check to see how many hits penetrate */
X! if(float_rand() <= r) penetrate += 1;
X
X
X+ switch(to->shipptr->type) {
X+ case STYPE_MIRROR:
X+ case STYPE_STATION:
X+ case STYPE_HABITAT:
X+ damage_multiplier = 2;
X+ break;
X+ case STYPE_CARGO:
X+ case STYPE_TANKER:
X+ case STYPE_ASS:
X+ damage_multiplier = 1;
X+ break;
X+ default:
X+ damage_multiplier = 0;
X+ break;
X+ }
X+
X+ numdest = round_rand (40.*(float)penetrate/(float)body) *
X+ (1 + damage_multiplier);
X
X! sprintf(buf, "%d hits\n", hits);
X! notify(Playernum, buf);
X! if(hits) {
X! sprintf(buf, "%d penetrated armor causing %d%% damage.\n",
X! penetrate, numdest);
X! notify(Playernum, buf);
X! }
X! if(!(from->level==LEVEL_SHIP && from->shipptr->type==OTYPE_GR
X! && !from->shipptr->mode)) {
X critdam = 0;
X crithits = 0;
X! for(i=1; i<=penetrate; i++)
X! if(!int_rand(0, body)) {
X crithits++;
X dam=int_rand(0,100);
X critdam += dam;
X }
X
X! critdam = MIN(100,critdam);
X! if(crithits) {
X! sprintf(buf,"%d CRITICAL HIT(S) for %d%% additional damage!\n",
X crithits,critdam);
X notify(Playernum, buf);
X! numdest += critdam;
X }
X
X }
X
X! numdest=MIN(100,numdest);
X
X! if(!(from->level==LEVEL_SHIP && from->shipptr->type==OTYPE_GR
X! && !from->shipptr->mode)) {
X! sprintf(buf,"%d%% total structural damage inflicted!\n",
X! numdest);
X! notify(Playernum, buf);
X! } else {
X! sprintf(buf,"%d%% total radiation level inflicted!\n",numdest);
X! notify(Playernum, buf);
X! }
X!
X! if (from->level==LEVEL_SHIP && from->shipptr->type==OTYPE_GR
X! && !from->shipptr->mode) {
X /* gamma-ray lasers irradiate targets */
X+ if(numdest > to->shipptr->rad)
X to->shipptr->rad = numdest;
X!
X! if(int_rand(1,100) <= numdest)
X to->shipptr->active = 0;
X+ if(!to->shipptr->active) {
X+ notify(Playernum, "Target ship INACTIVE.\n");
X+ }
X+
X } else {
X
X if (to->shipptr->damage+numdest >= 100) {
X! kill_ship(Playernum, to->shipptr);
X /* mess up the planet a bit. */
X if (to->shipptr->type==OTYPE_TOXWC &&
X to->shipptr->whatorbits==LEVEL_PLAN)
X***************
X*** 270,277 ****
X to->shipptr->whatdest = LEVEL_UNIV;
X to->shipptr->destshipno = 0;
X }
X! } else
X to->shipptr->damage += numdest;
X }
X
X Nuked[to->shipptr->owner-1] = 1;
X--- 304,314 ----
X to->shipptr->whatdest = LEVEL_UNIV;
X to->shipptr->destshipno = 0;
X }
X! } else {
X to->shipptr->damage += numdest;
X+ sprintf(buf, "%d%% total damage.\n", to->shipptr->damage);
X+ notify(Playernum, buf);
X+ }
X }
X
X Nuked[to->shipptr->owner-1] = 1;
X***************
X*** 296,309 ****
X for (x2=lowx; x2<=hix; x2++) {
X if ( (d = Distmap(x,y,x2,y2) ) <= r) {
X s = &Sector(*pl,x2,y2);
X! fac = ((float)str) * logscale(100 - s->mobilization)/(d+1);
X! /* factor of destruction */
X /* printf("%d,%d dist = %.2f,dest fac %.2f \n",x2,y2,d,fac);*/
X if (fac > 1.0) {
X- Nuked[s->owner-1] = 1; /* for retaliating */
X
X kills = int_rand(0,((int)fac))/(1+(s->des==DES_PLATED));
X! if(kills >= s->popn)
X {
X s->popn = 0;
X s->owner = 0;
X--- 333,350 ----
X for (x2=lowx; x2<=hix; x2++) {
X if ( (d = Distmap(x,y,x2,y2) ) <= r) {
X s = &Sector(*pl,x2,y2);
X! fac = (float)str * log10(100.0 - (float)s->mobilization + 2.0)
X! /(d+1.);
X!
X! /* factor of destruction */
X /* printf("%d,%d dist = %.2f,dest fac %.2f \n",x2,y2,d,fac);*/
X if (fac > 1.0) {
X
X kills = int_rand(0,((int)fac))/(1+(s->des==DES_PLATED));
X! if(kills >= int_rand(1,100))
X! Nuked[s->owner-1] = 1; /* for retaliating */
X!
X! if(kills >= s->popn)
X {
X s->popn = 0;
X s->owner = 0;
X***************
X*** 329,342 ****
X (s+1)->des==DES_GAS || (s-1)->des==DES_GAS)
X s->des=DES_GAS;
X }
X! if(fac >= 5.0)
X! if(((float)int_rand(0,10))*fac > 50.0)
X! {
X s->popn = 0;
X s->owner = 0;
X s->eff = 0;
X s->mobilization = 0;
X s->fert = 0; /*all is lost !*/
X s->is_wasted = 1;
X numdest++;
X }
X--- 370,385 ----
X (s+1)->des==DES_GAS || (s-1)->des==DES_GAS)
X s->des=DES_GAS;
X }
X!
X! if( (int)fac >= int_rand(0,100) ) {
X! if(s->owner) Nuked[s->owner-1] = 1;
X!
X s->popn = 0;
X s->owner = 0;
X s->eff = 0;
X s->mobilization = 0;
X s->fert = 0; /*all is lost !*/
X+ s->crystals = int_rand(0, s->crystals);
X s->is_wasted = 1;
X numdest++;
X }
X*** /usr/cna/billr/games/gb3/server/survey.c Wed May 30 15:13:51 1990
X--- server/survey.c Thu Aug 23 16:55:32 1990
X***************
X*** 30,38 ****
X "Stage 8: ecologically poisonous --below birth threshold",
X "Stage 9: WARNING: nearing 100% toxicity",
X "Stage 10: WARNING: COMPLETELY TOXIC!!!",
X! "???"
X };
X! int survey_racedata;
X
X
X survey(Playernum,APcount, argn,args)
X--- 30,38 ----
X "Stage 8: ecologically poisonous --below birth threshold",
X "Stage 9: WARNING: nearing 100% toxicity",
X "Stage 10: WARNING: COMPLETELY TOXIC!!!",
X! "\?\?\?"
X };
X! int survey_racedata, survey_pdata, survey_sectdata;
X
X
X survey(Playernum,APcount, argn,args)
X***************
X*** 45,53 ****
X char d;
X sectortype *s;
X planettype *p;
X! int tindex,survey_pdata,survey_sectdata;
X placetype where;
X float compat;
X
X if (argn==1) { /* no args */
X
X--- 45,54 ----
X char d;
X sectortype *s;
X planettype *p;
X! int tindex;
X placetype where;
X float compat;
X+ racetype *Race;
X
X if (argn==1) { /* no args */
X
X***************
X*** 76,82 ****
X
X }
X
X- free(Race);
X openracedata(&survey_racedata);
X getrace(survey_racedata, &Race, Playernum);
X close_file(survey_racedata);
X--- 77,82 ----
X***************
X*** 83,89 ****
X
X if (where.level==LEVEL_PLAN) {
X
X-
X openpdata(&survey_pdata);
X getplanet(survey_pdata,&p,Stars[where.snum]->planetpos[where.pnum]);
X close_file(survey_pdata);
X--- 83,88 ----
X***************
X*** 104,110 ****
X lowy = MAX(0, lowy);
X hiy = MIN(hiy, p->Maxy-1);
X
X! sprintf(buf," x,y des ( type ) owner eff mob frt res popn ^popn\n");
X notify(Playernum, buf);
X
X for (; lowy<=hiy; lowy++)
X--- 103,109 ----
X lowy = MAX(0, lowy);
X hiy = MIN(hiy, p->Maxy-1);
X
X! sprintf(buf," x,y des ( type ) owner eff mob frt res popn ^popn crystals\n");
X notify(Playernum, buf);
X
X for (; lowy<=hiy; lowy++)
X***************
X*** 117,130 ****
X sprintf(buf,"? ( ? )\n");
X notify(Playernum, buf);
X } else {
X! sprintf(buf,"%c (%11s) %6u%4u%4u%4u%4u%5u%6d\n",
X d, Desnames[s->des], s->owner, s->eff,
X s->mobilization, s->fert, s->resource, s->popn,
X! maxsupport(Race,s,compat,p->conditions[TOXIC]) );
X notify(Playernum, buf);
X }
X }
X- free(p);
X
X } else {
X
X--- 116,129 ----
X sprintf(buf,"? ( ? )\n");
X notify(Playernum, buf);
X } else {
X! sprintf(buf,"%c (%11s) %6u%4u%4u%4u%4u%5u%6d%s\n",
X d, Desnames[s->des], s->owner, s->eff,
X s->mobilization, s->fert, s->resource, s->popn,
X! maxsupport(Race,s,compat,p->conditions[TOXIC]),
X! (s->crystals ? " yes" : " " ));
X notify(Playernum, buf);
X }
X }
X
X } else {
X
X***************
X*** 186,195 ****
X sprintf(buf,"This planet ENSLAVED to player %d!\n", p->slaved_to);
X notify(Playernum, buf);
X }
X free(p);
X
X- }
X-
X } else if (where.level==LEVEL_STAR) {
X
X sprintf(buf,"Star %s\n",Stars[where.snum]->name);
X--- 185,193 ----
X sprintf(buf,"This planet ENSLAVED to player %d!\n", p->slaved_to);
X notify(Playernum, buf);
X }
X+ }
X free(p);
X
X } else if (where.level==LEVEL_STAR) {
X
X sprintf(buf,"Star %s\n",Stars[where.snum]->name);
X***************
X*** 227,233 ****
X--- 225,371 ----
X notify(Playernum, buf);
X
X } else {
X+ sprintf(buf,"Illegal scope.\n");
X+ notify(Playernum, buf);
X+ }
X+ free(Race);
X+ }
X+
X+ production(Playernum,APcount, argn,args)
X+ int Playernum;
X+ int APcount;
X+ int argn;
X+ char args[MAXARGS][COMMANDSIZE];
X+ {
X+ planettype *p;
X+
X+ if(Dir[Playernum-1].level != LEVEL_PLAN) {
X+ notify(Playernum, "You have to 'cs' to an explored planet to get this data.\n");
X+ return;
X+ }
X+ openpdata(&survey_pdata);
X+ getplanet(survey_pdata,&p,Stars[Dir[Playernum-1].snum]->planetpos[Dir[Playernum-1].pnum]);
X+ close_file(survey_pdata);
X+ sprintf(buf, "Last update this planet produced %dr %df %dd.\n", p->info[Playernum-1].prod_res,
X+ p->info[Playernum-1].prod_fuel, p->info[Playernum-1].prod_dest);
X+ notify(Playernum, buf);
X+ free(p);
X+
X+ }
X+
X+
X+ repair(Playernum,APcount, argn,args)
X+ int Playernum;
X+ int APcount;
X+ int argn;
X+ char args[MAXARGS][COMMANDSIZE];
X+ {
X+ int lowx,hix,lowy,hiy,x2, ok, sectors, cost;
X+ sectortype *s;
X+ planettype *p;
X+ placetype where;
X+ racetype *Race;
X+
X+ if (argn==1) { /* no args */
X+
X+ where.level = Dir[Playernum-1].level;
X+ where.snum = Dir[Playernum-1].snum;
X+ where.pnum = Dir[Playernum-1].pnum;
X+
X+ } else {
X+
X+ /* repairing a sector */
X+ if (isdigit(args[1][0]) && index(args[1],',')!=NULL) {
X+ if (Dir[Playernum-1].level!=LEVEL_PLAN) {
X+ sprintf(buf,"There are no sectors here.\n");
X+ notify(Playernum, buf);
X+ return;
X+ } else {
X+ where.level = LEVEL_PLAN;
X+ where.snum = Dir[Playernum-1].snum;
X+ where.pnum = Dir[Playernum-1].pnum;
X+ }
X+ } else {
X+ where = Getplace(Playernum,args[1],0);
X+ if (where.err)
X+ return;
X+ }
X+
X+ }
X+
X+ openracedata(&survey_racedata);
X+ getrace(survey_racedata, &Race, Playernum);
X+ close_file(survey_racedata);
X+
X+ if (where.level==LEVEL_PLAN) {
X+
X+
X+ openpdata(&survey_pdata);
X+ getplanet(survey_pdata,&p,Stars[where.snum]->planetpos[where.pnum]);
X+ close_file(survey_pdata);
X+
X+ if(!p->info[Playernum-1].numsectsowned) {
X+ notify(Playernum, "You don't own any sectors on this planet.\n");
X+ free(p);
X+ free(Race);
X+ return;
X+ }
X+
X+ opensectdata(&survey_sectdata);
X+ getsmap(survey_sectdata,Smap,p);
X+ close_file(survey_sectdata);
X+
X+ if (isdigit(args[1][0]) && index(args[1],',')!=NULL) {
X+ get4args(args[1],&x2,&hix,&lowy,&hiy);
X+ /* ^^^ translate from lowx:hix,lowy:hiy */
X+ x2 = MAX(0, x2);
X+ hix = MIN(hix, p->Maxx-1);
X+ lowy = MAX(0, lowy);
X+ hiy = MIN(hiy, p->Maxy-1);
X+
X+ } else {
X+ /* repair entire planet */
X+ x2 = 0;
X+ hix = p->Maxx-1;
X+ lowy = 0;
X+ hiy = p->Maxy-1;
X+ }
X+
X+ sectors = 0;
X+ cost = 0;
X+
X+ opensectdata(&survey_sectdata);
X+ for (; lowy<=hiy; lowy++)
X+ for (lowx=x2; lowx<=hix; lowx++) {
X+ if(p->info[Playernum-1].resource >= SECTOR_REPAIR_COST) {
X+ s = &Sector(*p, lowx, lowy);
X+ if (s->is_wasted && (s->owner==Playernum || !s->owner)){
X+ s->is_wasted = 0;
X+ s->fert = MIN(100, s->fert+20);
X+ p->info[Playernum-1].resource -= SECTOR_REPAIR_COST;
X+ cost += SECTOR_REPAIR_COST;
X+ sectors += 1;
X+ putsector(survey_sectdata, s, p->sectormappos
X+ +(lowy*p->Maxx+lowx)*sizeof(sectortype) );
X+ }
X+ }
X+ }
X+ close_file(survey_sectdata);
X+
X+ openpdata(&survey_pdata);
X+ putplanet(survey_pdata,p,Stars[where.snum]->planetpos[where.pnum]);
X+ close_file(survey_pdata);
X+ free(p);
X+
X+ sprintf(buf, "%d sectors repaired at a cost of %d resources.\n", sectors, cost);
X+ notify(Playernum, buf);
X+
X+ } else {
X sprintf(buf,"scope must be a planet.\n");
X notify(Playernum, buf);
X }
X+ free(Race);
X }
X+
X+
X+
X*** /usr/cna/billr/games/gb3/server/tweakables.h Wed May 30 15:12:45 1990
X--- server/tweakables.h Tue Aug 28 12:05:35 1990
X***************
X*** 48,53 ****
X--- 48,54 ----
X #define CHAR_GAS '~'
X #define CHAR_CLOAKED ' '
X #define CHAR_ICE '#'
X+ #define CHAR_CRYSTAL 'x'
X
X #define NAMESIZE 18
X #define RNAMESIZE 35
X***************
X*** 68,73 ****
X--- 69,76 ----
X #define SYSTEMSIZE 2000
X #define PLORBITSIZE 50
X
X+ #define WEEKLY 300
X+ #define DAILY 180
X
X #define AUTO_TELEG_SIZE 2000
X #define UNTRANS_MSG "[ ? ]"
X***************
X*** 90,96 ****
X #define LAND_GRAV_MASS_FACTOR 0.29
X
X #define FUEL_GAS_ADD 5.0 /* amt of fuel to add to ea ships tanks */
X! #define FUEL_GAS_ADD_TANKER 10.0
X #define FUEL_GAS_ADD_HABITAT 20.0
X #define FUEL_GAS_ADD_STATION 20.0
X #define FUEL_USE 0.02 /* fuel use per ship mass pt. per speed
X--- 93,99 ----
X #define LAND_GRAV_MASS_FACTOR 0.29
X
X #define FUEL_GAS_ADD 5.0 /* amt of fuel to add to ea ships tanks */
X! #define FUEL_GAS_ADD_TANKER 100.0
X #define FUEL_GAS_ADD_HABITAT 20.0
X #define FUEL_GAS_ADD_STATION 20.0
X #define FUEL_USE 0.02 /* fuel use per ship mass pt. per speed
X***************
X*** 97,104 ****
X factor */
X
X #define REPAIR_RATE 25.0 /* rate at which ships get repaired */
X
X-
X #define CREAT_UNIV_ITERAT 10 /* iterations for star movement */
X
X
X--- 100,107 ----
X factor */
X
X #define REPAIR_RATE 25.0 /* rate at which ships get repaired */
X+ #define SECTOR_REPAIR_COST 10 /* how much it costs to remove a wasted status from a sector */
X
X #define CREAT_UNIV_ITERAT 10 /* iterations for star movement */
X
X
X***************
X*** 109,124 ****
X /* # of people/fert pt sector supports*/
X #define EFF_PROD 0.20 /* production of effcncy/pop*/
X #define RESOURCE_PRODUCTION 0.00008 /* adjust these to change prod*/
X! #define FUEL_PRODUCTION 0.00004
X
X #define DEST_PRODUCTION 0.00008
X #define POPN_PROD 0.3
X
X #define HYPER_DRIVE_READY_CHARGE 1
X! #define HYPER_DRIVE_FUEL_USE 1.0
X! #define HYPER_DIST_FACTOR 20000.
X
X! #define TECH_INVEST 0.10 /* invest factor */
X
X #define MOB_COST 0.010 /* mobiliz.c, doplanet.c cost/mob points*/
X /*#define RESOURCE_DEPLETION 0.015 */
X--- 112,129 ----
X /* # of people/fert pt sector supports*/
X #define EFF_PROD 0.20 /* production of effcncy/pop*/
X #define RESOURCE_PRODUCTION 0.00008 /* adjust these to change prod*/
X! #define FUEL_PRODUCTION 0.00008
X
X #define DEST_PRODUCTION 0.00008
X #define POPN_PROD 0.3
X
X #define HYPER_DRIVE_READY_CHARGE 1
X! #define HYPER_DRIVE_FUEL_USE 5.0
X! #define HYPER_DIST_FACTOR 200.0
X
X! #define TECH_LASER 100.0 /* minimum tech for constructing lasers */
X! #define TECH_INVEST 0.005 /* invest factor */
X! #define TECH_SCALE 2.0 /* investment scale */
X
X #define MOB_COST 0.010 /* mobiliz.c, doplanet.c cost/mob points*/
X /*#define RESOURCE_DEPLETION 0.015 */
X***************
X*** 141,148 ****
X
X
X #define FUEL_MANEUVER 0.3 /* order.c-- fuel it costs to change aim */
X! #define DIST_TO_LAND 10.0 /* moveship.c,land.c --
X! distance ship has to be to land */
X /*#define DIST_TO_BURN 50 /* distance from sun needed to destroy ship */
X
X
X--- 146,154 ----
X
X
X #define FUEL_MANEUVER 0.3 /* order.c-- fuel it costs to change aim */
X! #define DIST_TO_LAND 10.0 /* moveship.c,land.c -- */
X! #define DIST_TO_DOCK 45.0
X!
X /*#define DIST_TO_BURN 50 /* distance from sun needed to destroy ship */
X
X
X***************
X*** 154,160 ****
X #define POPN_MOVE_SCALE_1 400 /* limit at which popn moves to all */
X #define POPN_MOVE_SCALE_2 3000 /* " " " popn moves to 2 adj. spaces */
X /* otherwise move to only 1 adj. space*/
X! #define SHIP_MOVE_SCALE 1.0
X
X #define reg register
X /* to save object code */
X--- 160,166 ----
X #define POPN_MOVE_SCALE_1 400 /* limit at which popn moves to all */
X #define POPN_MOVE_SCALE_2 3000 /* " " " popn moves to 2 adj. spaces */
X /* otherwise move to only 1 adj. space*/
X! #define SHIP_MOVE_SCALE 3.0
X
X #define reg register
X /* to save object code */
X***************
X*** 172,177 ****
X--- 178,187 ----
X #define swap(a, b) ((a) ^= (b), (b) ^= (a), (a) ^= (b))
X /* euclidean distance */
X #define Distsq(x1,y1,x2,y2) ( ((x1)-(x2))*((x1)-(x2)) + ((y1)-(y2))*((y1)-(y2)) )
X+ #ifdef NO_LOG1P
X+ /* log(x+1) */
X+ #define log1p(x) ( log((x) + 1.0) )
X+ #endif
X
X /* look up sector */
X #define Sector(pl,x,y) (Smap[(x) + (y)*(pl).Maxx])
X*** /usr/cna/billr/games/gb3/server/vars.h Wed May 30 15:12:46 1990
X--- server/vars.h Thu Aug 23 16:54:30 1990
X***************
X*** 41,58 ****
X unsigned short fuel; /* fuel for powering things */
X unsigned short destruct; /* destructive potential */
X unsigned short resource; /* resources in storage */
X! unsigned short numsectsowned;
X
X unsigned comread : 7; /* combat readiness (mobilization)*/
X unsigned explored : 1; /* 1 bit: explored by each player */
X unsigned mob_set : 7; /* mobilization target */
X unsigned autorep : 1; /* player wants autoreport */
X- unsigned tech_invest : 7; /* amt of res. to spend on tech */
X unsigned spied_on : 1; /* spied on */
X unsigned tox_thresh : 7; /* min to build a waste can */
X- unsigned dummy : 1; /* dummy bit for development */
X
X! unsigned int unused; /* more dummy bits for development */
X };
X
X struct sector {
X--- 41,69 ----
X unsigned short fuel; /* fuel for powering things */
X unsigned short destruct; /* destructive potential */
X unsigned short resource; /* resources in storage */
X! unsigned popn;
X! unsigned short crystals;
X
X+ unsigned tech_invest;
X+
X+ unsigned short prod_res; /* shows last update production */
X+ unsigned short prod_fuel;
X+ unsigned short prod_dest;
X+ unsigned short prod_crystals;
X+ float prod_tech;
X+
X+ unsigned numsectsowned : 9;
X unsigned comread : 7; /* combat readiness (mobilization)*/
X unsigned explored : 1; /* 1 bit: explored by each player */
X unsigned mob_set : 7; /* mobilization target */
X unsigned autorep : 1; /* player wants autoreport */
X unsigned spied_on : 1; /* spied on */
X unsigned tox_thresh : 7; /* min to build a waste can */
X
X! unsigned dummy1;
X! unsigned dummy2;
X! unsigned dummy3;
X! unsigned dummy4;
X };
X
X struct sector {
X***************
X*** 66,72 ****
X unsigned owner : BITS_MAXPLAYERS; /* owner of place */
X unsigned is_wasted : 1; /* 1 bit: is a wasted sector */
X unsigned VN : 1; /* has a VN machine on it */
X! unsigned dummy : 6; /* extra bits for development */
X };
X
X
X--- 77,85 ----
X unsigned owner : BITS_MAXPLAYERS; /* owner of place */
X unsigned is_wasted : 1; /* 1 bit: is a wasted sector */
X unsigned VN : 1; /* has a VN machine on it */
X! unsigned crystals : 6; /* number of crystals the sector currently has (these are mined out) */
X!
X! unsigned short dummy;
X };
X
X
X***************
X*** 116,124 ****
X percent AP[MAXPLAYERS]; /* Action pts for each player */
X unsigned short VN_hitlist[MAXPLAYERS];
X /* # of ships destroyed by each player */
X! percent VN_index1[MAXPLAYERS];
X! percent VN_index2[MAXPLAYERS]; /* VN's record of destroyed ships
X systems where they bought it */
X };
X
X EXTERN struct stardata Sdata;
X--- 129,138 ----
X percent AP[MAXPLAYERS]; /* Action pts for each player */
X unsigned short VN_hitlist[MAXPLAYERS];
X /* # of ships destroyed by each player */
X! char VN_index1[MAXPLAYERS];
X! char VN_index2[MAXPLAYERS]; /* VN's record of destroyed ships
X systems where they bought it */
X+ unsigned dummy;
X };
X
X EXTERN struct stardata Sdata;
X***************
X*** 150,155 ****
X--- 164,170 ----
X
X EXTERN int tot_resdep, prod_eff, prod_res[MAXPLAYERS];
X EXTERN int prod_fuel[MAXPLAYERS], prod_destruct[MAXPLAYERS];
X+ EXTERN int prod_crystals[MAXPLAYERS];
X EXTERN int tot_captured, prod_mob, populations[MAXPLAYERS];
X EXTERN float avg_mob[MAXPLAYERS];
X EXTERN char sects_gained[MAXPLAYERS], sects_lost[MAXPLAYERS];
X***************
X*** 156,161 ****
X--- 171,178 ----
X EXTERN boolean Claims;
X
X EXTERN planettype *planets[NUMSTARS][MAXPLANETS];
X+ EXTERN int inhabited[NUMSTARS];
X+ EXTERN int place[MAXPLAYERS];
X EXTERN float Compat[MAXPLAYERS];
X EXTERN int Num_races, Num_ships;
X
END_OF_FILE
if test 57315 -ne `wc -c <'patches02c'`; then
echo shar: \"'patches02c'\" unpacked with wrong size!
fi
# end of 'patches02c'
if test -f 'server/welcome.txt' -a "${1}" != "-c" ; then
echo shar: Renaming existing file \"'server/welcome.txt'\" to \"'server/welcome.txt.orig'\"
mv -f 'server/welcome.txt' 'server/welcome.txt.orig'
fi
echo shar: Extracting \"'server/welcome.txt'\" \(560 characters\)
sed "s/^X//" >'server/welcome.txt' <<'END_OF_FILE'
X
X *** Connected to the GB server ***
X
XThe client/server source/docs can be obtained via anon
X ftp from 'scam.berkeley.edu' (128.32.138.0)
X in src/games/gb.
X
XType 'who' to see who is currently logged on. Type' help' for help.
X
X**** UPDATES HAVE BEEN SET AT 6 HOURS! (12 & 6 am/pm PDT)
X
X*** Do 'help time' for some new information ***
X
XNew command 'standby'. Do 'help standby' for details.
X
XNew newsgroup 'alt.games.gb' is for real.
X Check it out if you can get it.
X
X>>> NEW news! do 'read news' and 'help read' for details.
X
XPlease enter your password.
END_OF_FILE
if test 560 -ne `wc -c <'server/welcome.txt'`; then
echo shar: \"'server/welcome.txt'\" unpacked with wrong size!
fi
# end of 'server/welcome.txt'
echo shar: End of archive 3 \(of 9\).
cp /dev/null ark3isdone
MISSING=""
for I in 1 2 3 4 5 6 7 8 9 ; do
if test ! -f ark${I}isdone ; then
MISSING="${MISSING} ${I}"
fi
done
if test "${MISSING}" = "" ; then
echo You have unpacked all 9 archives.
rm -f ark[1-9]isdone ark[1-9][0-9]isdone
else
echo You still need to unpack the following archives:
echo " " ${MISSING}
fi
## End of shell archive.
exit 0