billr@saab.CNA.TEK.COM (Bill Randle) (09/15/89)
Submitted-by: VANCLEEF@mps.ohio-state.edu
Posting-number: Volume 8, Issue 29
Archive-name: GB2/Patch1d
Patch-To: GB2: Volume 7, Issue 44-51
[Because the doc files are in a subdirectory, you must use
the '-p' option to patch(1) when applying this patch file:
e.g., patch -p <patches01d. -br]
#! /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 4 (of 4)."
# Contents: patches01d
# Wrapped by billr@saab on Fri Sep 15 08:22:30 1989
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'patches01d' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'patches01d'\"
else
echo shar: Extracting \"'patches01d'\" \(51327 characters\)
sed "s/^X//" >'patches01d' <<'END_OF_FILE'
X*** ../../GB2/perm.c Wed Jul 5 15:15:43 1989
X--- perm.c Fri Sep 15 07:28:39 1989
X***************
X*** 1,5 ****
X
X-
X /*
X * Galactic Bloodshed (Robert Chansky, smq@ucscb.ucsc.edu)
X * perm.c -- randomly permute a sector list
X--- 1,4 ----
X*** ../../GB2/power.c Wed Jul 5 15:15:43 1989
X--- power.c Fri Sep 15 07:28:40 1989
X***************
X*** 1,5 ****
X
X-
X /*
X * Galactic Bloodshed (Robert Chansky, smq@ucscb.ucsc.edu)
X * power.c -- display power report
X--- 1,4 ----
X*** ../../GB2/power.h Wed Jul 5 15:14:54 1989
X--- power.h Fri Sep 15 07:27:37 1989
X***************
X*** 1,5 ****
X
X-
X /* for power report */
X struct power {
X ul popn; /* total population */
X--- 1,4 ----
X*** ../../GB2/prof.c Wed Jul 5 15:15:44 1989
X--- prof.c Fri Sep 15 07:28:41 1989
X***************
X*** 1,5 ****
X
X-
X /*
X * Galactic Bloodshed (Robert Chansky, smq@b)
X * prof.c -- print out racial profile
X--- 1,4 ----
X*** ../../GB2/rst.c Wed Jul 5 15:15:49 1989
X--- rst.c Fri Sep 15 07:28:45 1989
X***************
X*** 104,111 ****
X case LEVEL_SHIP:
X openshdata(&shdata);
X Getrship(shdata,rd, Dir.shipno);
X- close(shdata);
X ship_report(rd,0); /* first ship report */
X break;
X }
X
X--- 104,130 ----
X case LEVEL_SHIP:
X openshdata(&shdata);
X Getrship(shdata,rd, Dir.shipno);
X ship_report(rd,0); /* first ship report */
X+
X+ if(rd[0].s->type == STYPE_CARRIER) /* list attached fighter groups */
X+ {
X+ openshdata(&shdata);
X+ shn = rd[0].s->object.number;
X+ Num_ships = 0;
X+ while (shn) {
X+ Getrship(shdata,rd, shn);
X+ shn = rd[Num_ships-1].s->object.number;
X+ }
X+ close(shdata);
X+
X+ for (i=0; i<Num_ships; i++)
X+ ship_report(rd,i);
X+
X+
X+
X+ }
X+
X+ close(shdata);
X break;
X }
X
X***************
X*** 120,126 ****
X {
X shiptype *s;
X planettype *p;
X! int shipno;
X reg int i;
X placetype where;
X char orb[PLACENAMESIZE];
X--- 139,145 ----
X {
X shiptype *s;
X planettype *p;
X! int shipno,test;
X reg int i;
X placetype where;
X char orb[PLACENAMESIZE];
X***************
X*** 133,153 ****
X
X
X /* launched canister, non-owned ships don't show up */
X! if ( (rd[indx].type==PLANET && p->info[Playernum-1].numsectsowned)
X! || (rd[indx].type!=PLANET && s->owner==Playernum &&
X! !(s->type==OTYPE_CANIST && !s->is_docked) && !s->is_dead) ) {
X
X-
X if (rd[indx].type!=PLANET && Stock) {
X if (first) {
X! printf(" # mass res ^res dest ^dest fuel ^fuel crew ^crew dock\n");
X if (!Ship && !Object)
X first=0;
X }
X! /*if (is_object(s) == Object)*/
X! if (s->owner == Playernum || God) {
X! printf("%3d %c%5.1f%4u%6d%6u%6d%7.1f%6d%6u%6d%5s",
X! shipno, Shipltrs[s->type], s->mass,
X s->resource, Shipdata[s->type][ABIL_CARGO],
X s->destruct, Shipdata[s->type][ABIL_DESTCAP],
X s->fuel, Shipdata[s->type][ABIL_FUELCAP],
X--- 152,171 ----
X
X
X /* launched canister, non-owned ships don't show up */
X! if ( (rd[indx].type==PLANET && p->info[Playernum-1].numsectsowned)
X! || (rd[indx].type!=PLANET && s->owner==Playernum &&
X! !(s->type==OTYPE_CANIST && !s->is_docked) && s->is_alive) ) {
X
X if (rd[indx].type!=PLANET && Stock) {
X if (first) {
X! printf(" # own mass res ^res dest ^dest fuel ^fuel crew ^crew dock\n");
X if (!Ship && !Object)
X first=0;
X }
X!
X!
X! printf("%3d %c%3d %5.1f%4u%6d%6u%6d%7.1f%6d%6u%6d%5s",
X! shipno, Shipltrs[s->type], s->owner,s->mass,
X s->resource, Shipdata[s->type][ABIL_CARGO],
X s->destruct, Shipdata[s->type][ABIL_DESTCAP],
X s->fuel, Shipdata[s->type][ABIL_FUELCAP],
X***************
X*** 154,199 ****
X s->popn, Shipdata[s->type][ABIL_MAXCREW],
X (s->is_docked) ? ((s->whatdest==LEVEL_PLAN) ? "land" : "dock") :" ");
X if (s->type==OTYPE_VN)
X! printf(" * %d",s->orders.object.number);
X if (s->rad)
X printf(" INACTIVE(%d)",s->rad);
X putchr('\n');
X
X- }
X }
X if (rd[indx].type!=PLANET && Report) {
X if (first) {
X! printf(" # own crew dam dest fuel speed orbits destination\n");
X if (!Ship && !Object)
X first=0;
X }
X
X! if (s->owner == Playernum || God) {
X! /*if (is_object(s) == Object) */
X! printf("%3d %c%5u%4u%4u%5u%7.1f%4u%5s%20s%20s",
X! shipno, Shipltrs[s->type],
X! s->owner, s->popn, s->damage, s->destruct, s->fuel, s->speed,
X (s->is_docked) ? ( (s->whatdest==LEVEL_SHIP) ? "dock"
X : "land") : " ",
X prin_ship_orbits(s), prin_ship_dest(s) );
X! if (s->type==OTYPE_VN) printf("* %d",s->orders.object.number);
X if (s->rad)
X printf(" INACTIVE(%d)",s->rad);
X putchr('\n');
X
X- }
X }
X
X if (Tactical) {
X
X! printf("\n # typ GUNS dest fuel dam x,y abs x,y rel orbits\n");
X
X if (rd[indx].type==PLANET) {
X /* tac report from planet */
X! printf("(planet)%4d%5u%6u %7.0f,%-7.0f %7.0f,%-7.0f%10s\n",
X PLAN_FIRE_LIM, p->info[Playernum-1].destruct,
X p->info[Playernum-1].fuel,
X- rd[indx].x , rd[indx].y, p->xpos, p->ypos,
X Stars[rd[indx].star]->pnames[rd[indx].pnum]);
X
X } else {
X--- 172,215 ----
X s->popn, Shipdata[s->type][ABIL_MAXCREW],
X (s->is_docked) ? ((s->whatdest==LEVEL_PLAN) ? "land" : "dock") :" ");
X if (s->type==OTYPE_VN)
X! printf(" * %d",s->object.number);
X if (s->rad)
X printf(" INACTIVE(%d)",s->rad);
X putchr('\n');
X
X }
X+
X+
X+
X if (rd[indx].type!=PLANET && Report) {
X if (first) {
X! printf(" # crew dam dest fuel speed orbits destination\n");
X if (!Ship && !Object)
X first=0;
X }
X
X! printf("%3d %c%11s%4u%4u%5u%7.1f%4u%5s%17s%17s",
X! shipno, Shipltrs[s->type], s->name,
X! s->popn, s->damage, s->destruct, s->fuel, s->speed,
X (s->is_docked) ? ( (s->whatdest==LEVEL_SHIP) ? "dock"
X : "land") : " ",
X prin_ship_orbits(s), prin_ship_dest(s) );
X! if (s->type==OTYPE_VN) printf("* %d",s->object.number);
X if (s->rad)
X printf(" INACTIVE(%d)",s->rad);
X putchr('\n');
X
X }
X
X if (Tactical) {
X
X! printf("\n # typ name GUNS dest fuel dam orbits\n");
X
X if (rd[indx].type==PLANET) {
X /* tac report from planet */
X! printf("(planet) %4d%5u%6u %10s\n",
X PLAN_FIRE_LIM, p->info[Playernum-1].destruct,
X p->info[Playernum-1].fuel,
X Stars[rd[indx].star]->pnames[rd[indx].pnum]);
X
X } else {
X***************
X*** 202,213 ****
X where.snum = s->storbits;
X where.pnum = s->pnumorbits;
X sprintf(orb, "%.30s", Dispplace(&where));
X! printf("%3d %c%6d%5u%6.1f%4u%7.0f,%-7.0f %7.0f,%-7.0f%10s",
X! shipno, Shipltrs[s->type], Shipdata[s->type][ABIL_GUNS],
X! s->destruct, s->fuel, s->damage,
X! s->xpos, s->ypos, s->xpos-rd[indx].x, s->ypos-rd[indx].y, orb );
X if (s->type == OTYPE_VN)
X! printf(" * %d", s->orders.object.number);
X if (s->rad)
X printf(" INACTIVE(%d)",s->rad);
X putchr('\n');
X--- 218,228 ----
X where.snum = s->storbits;
X where.pnum = s->pnumorbits;
X sprintf(orb, "%.30s", Dispplace(&where));
X! printf("%3d %c%15s%6d%5u%6.1f%4u %10s",
X! shipno, Shipltrs[s->type], s->name,Shipdata[s->type][ABIL_GUNS],
X! s->destruct, s->fuel, s->damage, orb );
X if (s->type == OTYPE_VN)
X! printf(" * %d", s->object.number);
X if (s->rad)
X printf(" INACTIVE(%d)",s->rad);
X putchr('\n');
X***************
X*** 215,243 ****
X }
X
X /* tactical display */
X! printf(" Tac display: # own typ rng %%dam %%dam given\n");
X for (i=0; i<Num_ships; i++) {
X if (i!=indx && (Dist = sqrt(Distsq(rd[indx].x, rd[indx].y,
X rd[i].x, rd[i].y))) < gun_range(Race, NULL))
X if (rd[i].type==PLANET) {
X /* tac report at planet */
X! printf(" %13s(planet)%8.1f %13.1f\n",
X! Stars[rd[i].star]->pnames[rd[i].pnum], Dist,
X! Kill_factor(Dist, rd[indx].type==PLANET ? PLAN_FIRE_LIM
X! : Shipdata[s->type][ABIL_GUNS])
X! * FACTOR_DESTPLANET );
X } else {
X /* tac report at ship */
X
X if (rd[i].s->owner!=Playernum) {
X! printf(" %15d%4d %c%9.1f%8u%11.1f%%",
X! rd[i].n, rd[i].s->owner, Shipltrs[rd[i].s->type], Dist,
X! rd[i].s->damage,
X! Kill_factor(Dist, rd[indx].type==PLANET ? PLAN_FIRE_LIM
X! : Shipdata[s->type][ABIL_GUNS]) /
X! (float)Shipdata[rd[i].s->type][ABIL_ARMOR]);
X if (rd[i].s->type==OTYPE_VN)
X! printf(" * %d", rd[i].s->orders.object.number);
X putchr('\n');
X }
X }
X--- 230,253 ----
X }
X
X /* tactical display */
X! printf(" Tac display: # own typ name rng %%dam \n");
X for (i=0; i<Num_ships; i++) {
X if (i!=indx && (Dist = sqrt(Distsq(rd[indx].x, rd[indx].y,
X rd[i].x, rd[i].y))) < gun_range(Race, NULL))
X if (rd[i].type==PLANET) {
X /* tac report at planet */
X! printf(" %13s(planet) %8.1f\n",
X! Stars[rd[i].star]->pnames[rd[i].pnum], Dist);
X!
X } else {
X /* tac report at ship */
X
X if (rd[i].s->owner!=Playernum) {
X! printf(" %15d%4d %c%15s%9.1f%8u",
X! rd[i].n, rd[i].s->owner, Shipltrs[rd[i].s->type],
X! rd[i].s->name, Dist, rd[i].s->damage);
X if (rd[i].s->type==OTYPE_VN)
X! printf(" * %d", rd[i].s->object.number);
X putchr('\n');
X }
X }
X***************
X*** 260,268 ****
X int shdata,pdata;
X
X openpdata(&pdata);
X- Locks(1);
X getplanet(pdata, &rd[Num_ships].p, Stars[snum]->planetpos[pnum]);
X- Locks(0);
X close(pdata);
X p = rd[Num_ships].p;
X /* add this planet into the ship list */
X--- 270,276 ----
X***************
X*** 279,284 ****
X--- 287,293 ----
X openshdata(&shdata);
X shn = p->ships;
X while (shn) {
X+
X Getrship(shdata, rd, shn);
X /* add offsets for docked ships */
X if (rd[Num_ships-1].s->is_docked &&
X***************
X*** 303,308 ****
X--- 312,318 ----
X reg int shn;
X int i,shdata;
X
X+
X if (isset(Stars[snum]->inhabited, Playernum)) {
X openshdata(&shdata);
X shn = Stars[snum]->ships;
X***************
X*** 324,336 ****
X {
X int noerr;
X
X- Locks(1);
X noerr = getship(shdata,&rd[Num_ships].s,shipno);
X! Locks(0);
X rd[Num_ships].type = 0;
X rd[Num_ships].n = shipno;
X rd[Num_ships].x = rd[Num_ships].s->xpos;
X rd[Num_ships].y = rd[Num_ships].s->ypos;
X if (noerr)
X Num_ships++;
X }
X--- 334,348 ----
X {
X int noerr;
X
X noerr = getship(shdata,&rd[Num_ships].s,shipno);
X!
X!
X rd[Num_ships].type = 0;
X rd[Num_ships].n = shipno;
X rd[Num_ships].x = rd[Num_ships].s->xpos;
X rd[Num_ships].y = rd[Num_ships].s->ypos;
X+
X+
X if (noerr)
X Num_ships++;
X }
X*** ../../GB2/scrap.c Wed Jul 5 15:15:50 1989
X--- scrap.c Fri Sep 15 07:28:46 1989
X***************
X*** 1,5 ****
X
X-
X /*
X * Galactic Bloodshed (Robert Chansky, smq@ssyx.ucsc.edu)
X * scrap.c -- turn a ship to junk
X--- 1,4 ----
X***************
X*** 42,48 ****
X scrap_handler();
X }
X
X! if (s->owner!=Playernum || s->is_dead) {
X DontOwnErr(shipno);
X free(s);
X scrap_handler();
X--- 41,47 ----
X scrap_handler();
X }
X
X! if (s->owner!=Playernum || !s->is_alive) {
X DontOwnErr(shipno);
X free(s);
X scrap_handler();
X***************
X*** 57,63 ****
X
X
X if (s->whatorbits==LEVEL_PLAN && s->type==OTYPE_TOXWC)
X! printf("WARNING: This will release %d toxin points back into the atmosphere!!\n", s->orders.object.number);
X
X
X if ( !(s->is_docked && s->whatdest==LEVEL_PLAN)) {
X--- 56,62 ----
X
X
X if (s->whatorbits==LEVEL_PLAN && s->type==OTYPE_TOXWC)
X! printf("WARNING: This will release %d toxin points back into the atmosphere!!\n", s->object.number);
X
X
X if ( !(s->is_docked && s->whatdest==LEVEL_PLAN)) {
X***************
X*** 83,91 ****
X }
X
X scrapval = Shipdata[s->type][ABIL_COST] * .75;
X! if ( s->type!=OTYPE_VN ) scrapval += s->resource;
X if (s->type==OTYPE_VN)
X! scrapval += .75 * (s->orders.object.number-1) * Shipdata[s->type][ABIL_COST];
X
X if (s->is_docked && s->whatdest==LEVEL_PLAN) {
X tty_on();
X--- 82,92 ----
X }
X
X scrapval = Shipdata[s->type][ABIL_COST] * .75;
X! /* if ( s->type != OTYPE_VN ) scrapval += s->resource;
X! if ( s->type == OTYPE_VN ) scrapval = 0;
X! */
X if (s->type==OTYPE_VN)
X! scrapval += .25 * (s->object.number-1) * Shipdata[s->type][ABIL_COST];
X
X if (s->is_docked && s->whatdest==LEVEL_PLAN) {
X tty_on();
X***************
X*** 120,129 ****
X
X /* distribute poison over planet even if orbiting */
X if (s->type==OTYPE_TOXWC) {
X! if (planet->conditions[TOXIC] > 100 - s->orders.object.number)
X planet->conditions[TOXIC] = 100;
X else
X! planet->conditions[TOXIC] += s->orders.object.number;
X printf("Planetary toxin concentration is now %d.\n",
X planet->conditions[TOXIC]);
X }
X--- 121,130 ----
X
X /* distribute poison over planet even if orbiting */
X if (s->type==OTYPE_TOXWC) {
X! if (planet->conditions[TOXIC] > 100 - s->object.number)
X planet->conditions[TOXIC] = 100;
X else
X! planet->conditions[TOXIC] += s->object.number;
X printf("Planetary toxin concentration is now %d.\n",
X planet->conditions[TOXIC]);
X }
X*** ../../GB2/shipdata.h Wed Jul 5 15:14:55 1989
X--- shipdata.h Fri Sep 15 07:27:39 1989
X***************
X*** 2,68 ****
X * Galactic Bloodshed (Robert Chansky, smq@b)
X */
X
X! char Shipltrs[]={ 'p','s','D','B','I','C','d','f','c','e','t','S','O','$',
X! '+','m','H','=','/','T','A','g','V','^',' ','L','w','Y','G','&',
X! '-','>','"','[' };
X
X int Shipdata[NUMSTYPES][NUMABILS] = {
X! /* cargo destcap guns fuelcap tech crew armr cost mass lnd sw sp*/
X! /*SPd*/1, 0, 0, 20, 1, 1, 1, 10, 3, 1, 0, 1,
X! /*Shu*/10, 2, 1, 20, 10, 25, 1, 50, 2, 1, 0, 2,
X! /*Drn*/100, 500, 60, 500, 500, 60, 20, 2000, 40, 0, 0, 2,
X! /*BB */35, 300, 30, 200, 200, 100, 15, 500, 20, 1, 0, 2,
X! /*Int*/10, 120, 40, 200, 500, 20, 10, 1000, 5, 1, 0, 4,
X! /*CA */15, 200, 20, 120, 150, 60, 10, 300, 10, 1, 0, 3,
X! /*DD */10, 100, 10, 80, 100, 30, 5, 200, 5, 1, 0, 4,
X! /*FF */0, 50, 10, 10, 200, 1, 2, 30, 1, 1, 0, 4,
X! /*Crg*/1000, 1000, 5, 1000, 100, 100, 3, 200, 20, 1, 0, 2,
X! /*Exp*/0, 15, 5, 35, 20, 2, 1, 100, 1, 1, 0, 4,
X! /*Tnk*/15, 10, 5, 5000, 100, 50, 3, 400, 20, 1, 0, 2,
X! /*Stn*/5000, 250, 40, 500, 100, 1000, 10, 400, 100, 1, 0, 2,
X! /*OSP*/1000, 1000, 50, 1000, 200, 1000, 8, 800, 100, 0, 0, 2,
X! /*GOD*/50000, 50000, 50000, 50000, 5000, 50000, 100,100, 1, 1, 0, 4,
X! /*SMn*/0, 50, 0, 20, 50, 0, 5, 50, 10, 1, 1, 2,
X! /* cargo destcap guns fuelcap tech crew armr cost mass mv sw */
X! /*mir*/200, 10, 1, 20, 200, 15, 1, 100, 100, 0, 0, 1,
X! /*Hab*/5000, 500, 20, 5000, 100, 2000, 9, 1000, 100, 0, 0, 1,
X! /*Stc*/0, 0, 0, 20, 50, 5, 1, 50, 2, 1, 0, 2,
X! /*Tsc*/0, 0, 0, 0, 5, 10, 1, 10, 5, 1, 0, 0,
X! /*T-R*/0, 0, 0, 1000, 100, 15, 1, 120, 10, 1, 1, 1,
X! /*APr*/0, 0, 0, 200, 50, 10, 1, 80, 40, 1, 1, 0,
X! /*CD */0, 0, 0, 1, 40, 0, 1, 20, 5, 1, 0, 1,
X! /*VN */20, 0, 0, 50, 80, 0, 1, 15, 10, 1, 1, 1,
X! /*PB */0, 20, 0, 5, 300, 0, 1, 100, 5, 1, 1, 1,
X! /*ClD*/0, 10, 0, 0, 250, 0, 1, 25, 6, 1, 1, 0,
X! /*OMCL*/0, 100, 10, 100, 350, 5, 1, 100, 4, 1, 1, 2,
X! /*TWC*/0, 0, 0, 20, 25, 0, 1, 50, 15, 1, 0, 1,
X! /*AY */0, 10, 0, 0, 90, 0, 1, 25, 6, 1, 0, 0,
X! /*Gr */0, 100, 25, 0, 80, 5, 1, 25, 6, 1, 0, 0,
X! /*SA */5000, 5000, 100, 50000, 10000, 0, 55, 1, 500, 1, 0, 1,
X! /*LTr*/100, 5, 5, 20, 0, 20, 2, 1, 4, 1, 1, 0,
X! /*Otr*/ 100, 5, 5, 20, 0, 20, 2, 3, 3, 1, 0, 0,
X! /*DgT*/1000, 1000, 0, 1000, 200, 1000, 1, 800, 80, 1, 1, 0,
X! /*TD */1000, 1000, 0, 1000, 400, 1000, 2, 1200, 80, 1, 1, 0
X };
X
X char *Shipnames[NUMSTYPES] = {
X "Spore pod",
X "Shuttle",
X "Dreadnaught",
X "Battleship",
X "Interceptor",
X "Cruiser",
X "Destroyer",
X! "Fighter",
X! "Cargo ship",
X "Explorer",
X! "Tanker",
X "Station",
X "Ob Asst Pltfrm",
X "GODSHIP",
X "Space mine",
X "Space mirror",
X- "Habitat",
X "Space telescope",
X "Ground telescope",
X "* T-R beam",
X--- 2,73 ----
X * Galactic Bloodshed (Robert Chansky, smq@b)
X */
X
X! char Shipltrs[]={ 'p','s','$','D','B','I','C','d','f','e','H','S','O','c',
X! 't','!','+','m',
X! '=','/','T','A','g','V','^',' ','L','w','Y','G','&',
X! '-','>','"','[','R'};
X
X int Shipdata[NUMSTYPES][NUMABILS] = {
X! /* carg dest guns fuelcap tech crew armr targ cost mass lnd sw sp dm*/
X! /*SPd*/ 1, 0, 0, 20, 1, 1, 1, 2, 10, 3, 1, 0, 1, 0,
X! /*Shu*/ 10, 2, 1, 20, 10, 5, 1, 2, 50, 2, 1, 0, 2, 0,
X! /*Car*/ 200, 800, 20, 1000, 250, 30, 10, 2,1200, 100, 0, 0, 2, 50,
X! /*Drn*/ 100, 500, 60, 500, 500, 20, 20, 0, 800, 40, 0, 0, 4, 50,
X! /*BB */ 35, 350, 30, 200, 200, 15, 15, 0, 400, 15, 1, 0, 4, 50,
X! /*Int*/ 10, 120, 30, 200, 350, 3, 10, 1, 400, 5, 1, 0, 4, 50,
X! /*CA */ 15, 200, 20, 120, 150, 10, 8, 1, 300, 10, 1, 0, 4, 50,
X! /*DD */ 10, 100, 10, 80, 100, 5, 5, 2, 200, 5, 1, 0, 4, 50,
X! /*FF */ 0, 30, 30, 10, 200, 1, 2, 2, 30, 1, 1, 0, 4, 0,
X! /*Exp*/ 0, 15, 5, 35, 20, 2, 2, 2, 100, 1, 1, 0, 4, 0,
X! /*Hab*/5000, 500, 20, 500, 100, 2000, 10, 0,1000, 100, 0, 0, 1, 0,
X! /*Stn*/5000, 250, 40, 500, 100, 50, 12, 0, 500, 100, 1, 0, 2, 0,
X! /*OSP*/1000, 1000, 50, 1000, 200, 200, 10, 0, 800, 100, 0, 0, 2, 0,
X! /*Crg*/1000, 1000, 5, 1000, 100, 10, 5, 0, 200, 20, 1, 0, 2, 0,
X! /*Tnk*/ 15, 10, 5, 5000, 100, 10, 5, 0, 400, 20, 1, 0, 2, 0,
X! /*GOD*/50000,50000,50000, 50000, 5000, 100, 20, 1, 100, 1, 1, 0, 4, 0,
X! /*SMn*/ 0, 50, 0, 20, 50, 0, 5, 2, 50, 10, 1, 1, 2, 0,
X! /* cargo destcap guns fuelcap tech crew armr targ cost mass lnd sw sp dm*/
X! /*mir*/ 200, 10, 1, 20, 200, 5, 2, 0, 100, 100, 0, 0, 1, 0,
X! /*Stc*/ 0, 0, 0, 20, 50, 2, 3, 1, 50, 2, 1, 0, 2, 0,
X! /*Tsc*/ 0, 0, 0, 0, 5, 2, 3, 2, 10, 5, 1, 0, 0, 0,
X! /*T-R*/ 0, 0, 0, 1000, 100, 5, 1, 2, 400, 10, 1, 1, 1, 0,
X! /*APr*/ 0, 0, 0, 200, 50, 10, 3, 0, 80, 40, 1, 1, 0, 0,
X! /*CD */ 0, 0, 0, 1, 40, 0, 1, 2, 20, 5, 1, 0, 1, 0,
X! /*VN */ 20, 0, 0, 50, 80, 0, 1, 2, 15, 10, 1, 1, 1, 0,
X! /*PB */ 0, 20, 0, 5, 300, 0, 1, 2, 100, 5, 1, 1, 1, 0,
X! /*ClD*/ 0, 10, 0, 0, 250, 0, 1, 2, 25, 6, 1, 1, 0, 0,
X! /*OMCL*/ 0, 100, 10, 100, 350, 2, 8, 1, 100, 4, 1, 1, 2, 0,
X! /*TWC*/ 0, 0, 0, 20, 25, 0, 1, 0, 50, 15, 1, 0, 1, 0,
X! /*AY */ 0, 10, 0, 0, 90, 0, 1, 2, 25, 6, 1, 0, 0, 0,
X! /* cargo destcap guns fuelcap tech crew armr targ cost mass lnd sw sp*/
X! /*GRL */ 0, 100, 25, 0, 80, 5, 5, 2, 25, 6, 1, 0, 0, 0,
X! /*SA */5000, 5000, 100, 50000,10000, 0, 20, 0, 1, 500, 1, 0, 1, 0,
X! /*LTr*/ 100, 5, 5, 20, 0, 20, 2, 2, 1, 4, 1, 1, 0, 0,
X! /*Otr*/ 100, 5, 5, 20, 0, 20, 2, 2, 3, 3, 1, 0, 0, 0,
X! /*DgT*/1000, 1000, 0, 1000, 200, 50, 2, 2, 8, 80, 1, 1, 0, 0,
X! /*TD */1000, 1000, 0, 1000, 400, 100, 2, 1, 600, 80, 1, 1, 0, 0,
X! /*SRp*/ 0, 0, 0, 0, 400, 0, 1, 2, 45, 0, 1, 0, 0, 0
X };
X
X char *Shipnames[NUMSTYPES] = {
X "Spore pod",
X "Shuttle",
X+ "Carrier",
X "Dreadnaught",
X "Battleship",
X "Interceptor",
X "Cruiser",
X "Destroyer",
X! "Fighter Group",
X "Explorer",
X! "Habitat",
X "Station",
X "Ob Asst Pltfrm",
X+ "Cargo ship",
X+ "Tanker",
X "GODSHIP",
X "Space mine",
X "Space mirror",
X "Space telescope",
X "Ground telescope",
X "* T-R beam",
X***************
X*** 79,83 ****
X "* Land Transport",
X "* Ocean Transport",
X "* Dirigable Trans.",
X! "audio-vibatory-\n physio-molecular\n transport device",
X };
X--- 84,92 ----
X "* Land Transport",
X "* Ocean Transport",
X "* Dirigable Trans.",
X! "AVPM transporter",
X! "Sector Repair"
X };
X+
X+
X+
X*** ../../GB2/ships.h Wed Jul 5 15:14:56 1989
X--- ships.h Fri Sep 15 07:27:40 1989
X***************
X*** 5,46 ****
X
X #define STYPE_POD 0
X #define STYPE_SHUTTLE 1
X! #define STYPE_DREADNT 2
X! #define STYPE_BATTLE 3
X! #define STYPE_INTCPT 4
X! #define STYPE_CRUISER 5
X! #define STYPE_DESTROYER 6
X! #define STYPE_FIGHTER 7
X! #define STYPE_CARGO 8
X #define STYPE_EXPLORER 9
X! #define STYPE_TANKER 10
X #define STYPE_STATION 11
X #define STYPE_ASS 12
X! #define STYPE_GOD 13
X! #define STYPE_MINE 14
X! #define STYPE_MIRROR 15
X! #define STYPE_HABITAT 16
X
X! #define OTYPE_STELE 17
X! #define OTYPE_GTELE 18
X! #define OTYPE_TRACT 19
X! #define OTYPE_AP 20
X! #define OTYPE_CANIST 21
X! #define OTYPE_VN 22
X! #define OTYPE_PLBOMB 23
X! #define OTYPE_CLOAK 24
X! #define OTYPE_OMCL 25
X! #define OTYPE_TOXWC 26
X! #define OTYPE_AMULET 27
X! #define OTYPE_GR 28
X! #define OTYPE_AMOEBA 29
X! #define OTYPE_LANDTR 30
X! #define OTYPE_OCTR 31
X! #define OTYPE_DIRTR 32
X! #define OTYPE_TRANSDEV 33
X
X #define ABIL_CARGO 0
X- /*#define ABIL_STEALTH 1*/
X #define ABIL_DESTCAP 1
X #define ABIL_GUNS 2
X #define ABIL_FUELCAP 3
X--- 5,47 ----
X
X #define STYPE_POD 0
X #define STYPE_SHUTTLE 1
X! #define STYPE_CARRIER 2
X! #define STYPE_DREADNT 3
X! #define STYPE_BATTLE 4
X! #define STYPE_INTCPT 5
X! #define STYPE_CRUISER 6
X! #define STYPE_DESTROYER 7
X! #define STYPE_FIGHTER 8
X #define STYPE_EXPLORER 9
X! #define STYPE_HABITAT 10
X #define STYPE_STATION 11
X #define STYPE_ASS 12
X! #define STYPE_CARGO 13
X! #define STYPE_TANKER 14
X! #define STYPE_GOD 15
X! #define STYPE_MINE 16
X! #define STYPE_MIRROR 17
X
X! #define OTYPE_STELE 18
X! #define OTYPE_GTELE 19
X! #define OTYPE_TRACT 20
X! #define OTYPE_AP 21
X! #define OTYPE_CANIST 22
X! #define OTYPE_VN 23
X! #define OTYPE_PLBOMB 24
X! #define OTYPE_CLOAK 25
X! #define OTYPE_OMCL 26
X! #define OTYPE_TOXWC 27
X! #define OTYPE_AMULET 28
X! #define OTYPE_GR 29
X! #define OTYPE_AMOEBA 30
X! #define OTYPE_LANDTR 31
X! #define OTYPE_OCTR 32
X! #define OTYPE_DIRTR 33
X! #define OTYPE_TRANSDEV 34
X! #define OTYPE_REPAIR 35
X
X #define ABIL_CARGO 0
X #define ABIL_DESTCAP 1
X #define ABIL_GUNS 2
X #define ABIL_FUELCAP 3
X***************
X*** 47,80 ****
X #define ABIL_TECH 4
X #define ABIL_MAXCREW 5
X #define ABIL_ARMOR 6
X! #define ABIL_COST 7
X! #define ABIL_MASS 8
X! #define ABIL_CANLAND 9
X! #define ABIL_HASSWITCH 10
X! #define ABIL_SPEED 11
X
X! #define NUMSTYPES (OTYPE_TRANSDEV+1)
X! #define NUMABILS (ABIL_SPEED+1)
X
X
X typedef struct ship shiptype;
X- typedef struct orders ordertype;
X typedef struct place placetype;
X
X- struct orders { /* standing orders for ships, planets */
X- unsigned bombard : 1; /* bombard planet we're on */
X- };
X
X struct ship {
X float xpos,ypos;
X float fuel,mass;
X! /*char name[NAMESIZE];*/
X! /*us abils[NUMABILS-2]; /* only certain abilities are kept track*/
X unsigned short destshipno; /* destination ship # */
X unsigned short nextship; /* next ship in orbit around whatever */
X unsigned short prevship; /* prev ship in orbit around whatever */
X! union {
X! ordertype o; /* standing orders for ship */
X struct a { /* if the ship is a Space Mirror */
X short shipno; /* aimed at what ship */
X char snum; /* aimed at what star */
X--- 48,78 ----
X #define ABIL_TECH 4
X #define ABIL_MAXCREW 5
X #define ABIL_ARMOR 6
X! #define ABIL_TARGET 7
X! #define ABIL_COST 8
X! #define ABIL_MASS 9
X! #define ABIL_CANLAND 10
X! #define ABIL_HASSWITCH 11
X! #define ABIL_SPEED 12
X! #define ABIL_DAMAGE 13
X
X! #define NUMSTYPES (OTYPE_REPAIR+1)
X! #define NUMABILS (ABIL_DAMAGE+1)
X
X
X typedef struct ship shiptype;
X typedef struct place placetype;
X
X
X struct ship {
X float xpos,ypos;
X float fuel,mass;
X! char name[18]; /* name of ship (optional) */
X unsigned short destshipno; /* destination ship # */
X unsigned short nextship; /* next ship in orbit around whatever */
X unsigned short prevship; /* prev ship in orbit around whatever */
X! unsigned bombard : 1; /* bombard planet we're on */
X!
X struct a { /* if the ship is a Space Mirror */
X short shipno; /* aimed at what ship */
X char snum; /* aimed at what star */
X***************
X*** 82,91 ****
X--- 80,114 ----
X unsigned pnum : BITS_MAXPLANETS; /* aimed at what planet */
X unsigned level : 2; /* aimed at what level */
X } aimed_at;
X+
X struct o2 {
X short number; /* for misc functions */
X short number2; /* again */
X+ short number3; /* again. don't use this in this version!!
X+ there is some strange bug with the order
X+ command which modifies it for some reason.
X+ someone needs to figure this problem out */
X+ short number4; /* again */
X } object;
X+
X+ struct m {
X+ unsigned mode : 1; /* 0 for radiation, 1 for damage */
X+ } mine;
X+
X+ struct nv {
X+ unsigned on : 1; /* toggles navigate mode */
X+ unsigned speed : 3; /* speed for navigate command */
X+ unsigned turns : 3; /* number turns left in maneuver */
X+ unsigned bearing : 16; /* course */
X+ } navigate;
X+
X+ struct prot {
X+ float maxrng; /* maximum range for autoshoot */
X+ unsigned on : 1; /* toggle on/off */
X+ unsigned planet : 1; /* planet defender */
X+ unsigned ship : 14; /* ship it is protecting */
X+ } protect;
X+
X struct am {
X char psuedo1x,psuedo1y; /* x,y loc for psuedopods */
X char psuedo2x,psuedo2y;
X***************
X*** 94,100 ****
X unsigned dest : 1; /* has a destination in mind */
X unsigned div : 1; /* trying to divide in two */
X } amoeba;
X! } orders;
X char storbits; /* what star # orbits */
X char deststar; /* destination star */
X unsigned destpnum : BITS_MAXPLANETS; /* destination planet */
X--- 117,123 ----
X unsigned dest : 1; /* has a destination in mind */
X unsigned div : 1; /* trying to divide in two */
X } amoeba;
X!
X char storbits; /* what star # orbits */
X char deststar; /* destination star */
X unsigned destpnum : BITS_MAXPLANETS; /* destination planet */
X***************
X*** 106,112 ****
X unsigned popn : 16; /* crew */
X unsigned owner : BITS_MAXPLAYERS; /* owner of ship */
X unsigned speed : 3; /* what speed to travel at */
X- /*unsigned augmented : 4; /* # of times augmented (max 10) ? */
X unsigned whatdest : 2; /* where going (same as Dir) */
X unsigned whatorbits : 2; /* where orbited (same as Dir) */
X unsigned type : 6; /* what type ship is */
X--- 129,134 ----
X***************
X*** 114,120 ****
X unsigned is_sheep : 1; /* 1 bit: is under influence of mind control */
X unsigned is_docked : 1; /* 1 bit: is landed on a planet or docked */
X unsigned notified : 1; /* 1bit: has been notified of something */
X! unsigned is_dead : 1; /* 1 bit: is destroyed ship */
X unsigned is_examined : 1; /* 1 bit: has been examined */
X unsigned on : 1; /* on or off */
X };
X--- 136,142 ----
X unsigned is_sheep : 1; /* 1 bit: is under influence of mind control */
X unsigned is_docked : 1; /* 1 bit: is landed on a planet or docked */
X unsigned notified : 1; /* 1bit: has been notified of something */
X! unsigned is_alive : 1; /* 1 bit: ship is alive */
X unsigned is_examined : 1; /* 1 bit: has been examined */
X unsigned on : 1; /* on or off */
X };
X***************
X*** 141,152 ****
X #define can_bombard(s) \
X ( ((s)->type < STYPE_MIRROR) && Shipdata[(s)->type][ABIL_GUNS])
X
X /* can aim at things. */
X #define can_aim(s) ((s)->type>=STYPE_MIRROR && (s)->type<=OTYPE_TRACT)
X
X /* macro for killing a ship. !notified means we have not yet written it
X to the dead_ship file. */
X! #define kill_ship(s) ((s)->is_dead = 1, (s)->notified = 0)
X
X extern placetype Getplace();
X extern char *Dispplace(),*Dispshiporbits(),*prin_ship_orbits(),
X--- 163,177 ----
X #define can_bombard(s) \
X ( ((s)->type < STYPE_MIRROR) && Shipdata[(s)->type][ABIL_GUNS])
X
X+ /* can navigate */
X+ #define can_navigate(s) (Shipdata[(s)->type][ABIL_SPEED] > 0 && (s)->type != OTYPE_VN)
X+
X /* can aim at things. */
X #define can_aim(s) ((s)->type>=STYPE_MIRROR && (s)->type<=OTYPE_TRACT)
X
X /* macro for killing a ship. !notified means we have not yet written it
X to the dead_ship file. */
X! #define kill_ship(s) ((s)->is_alive = 0, (s)->damage = 100, (s)->notified = 0)
X
X extern placetype Getplace();
X extern char *Dispplace(),*Dispshiporbits(),*prin_ship_orbits(),
X*** ../../GB2/shootblast.c Wed Jul 5 15:15:51 1989
X--- shootblast.c Fri Sep 15 07:28:48 1989
X***************
X*** 19,24 ****
X--- 19,61 ----
X
X float Kill_factor();
X
X+ static int damage_table[8][9] = {
X+ 1, 3, 6, 10, 15, 21, 28, 37, 48,
X+ 0, 2, 4, 7, 11, 16, 22, 29, 38,
X+ 0, 1, 3, 5, 8, 12, 17, 23, 30,
X+ 0, 0, 2, 4, 6, 9, 13, 18, 24,
X+ 0, 0, 1, 3, 5, 7, 10, 14, 19,
X+ 0, 0, 0, 2, 4, 6, 8, 11, 15,
X+ 0, 0, 0, 1, 3, 5, 7, 9, 12,
X+ 0, 0, 0, 0, 2, 4, 6, 8, 10
X+ };
X+
X+ static int combat_table[6][11] = {
X+ 0, 0, 0, 0, 0, 20, 20, 20, 20, 40, 60,
X+ 0, 0, 0, 0, 20, 20, 20, 20, 40, 60, 80,
X+ 0, 0, 20, 20, 20, 20, 20, 40, 60, 80, 100,
X+ 0, 10, 20, 20, 20, 20, 40, 60, 80, 100, 100,
X+ 10, 20, 20, 20, 20, 40, 60, 80, 100, 100, 100,
X+ 20, 20, 20, 20, 40, 60, 80, 90, 100, 100, 100
X+ };
X+
X+ static int crew_casualties[6][11] = {
X+ 0, 0, 0, 0, 0, 2, 3, 4, 5, 6, 7,
X+ 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
X+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
X+ 0, 1, 3, 4, 5, 6, 7, 9, 10, 11, 12,
X+ 1, 2, 4, 5, 6, 8, 9, 11, 12, 13, 17,
X+ 3, 4, 6, 7, 8, 9, 10, 12, 15, 17, 20
X+ };
X+
X+ static int column[9] = {
X+ 1, 2, 4, 8, 14, 21, 31, 51, 81
X+ };
X+
X+ static float column1[11] = {
X+ 0.25, 0.33, 0.5, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0
X+ };
X+
X int shoot(from,to,fpl,tpl,sectorx,sectory,strength, dist, msg, getmap)
X placetype from,*to;
X planettype *fpl,*tpl;
X***************
X*** 58,64 ****
X if (to->shipptr->is_docked && to->shipptr->whatdest==LEVEL_PLAN) {
X xto = Stars[to->shipptr->storbits]->xpos + tpl->xpos;
X yto = Stars[to->shipptr->storbits]->ypos + tpl->ypos;
X- printf(" xto %g yto %g, tpl %g,%g\n", xto, yto, tpl->xpos,tpl->ypos);
X if (from.level==LEVEL_SHIP &&
X from.shipptr->is_docked && from.shipptr->whatdest==LEVEL_PLAN) {
X xto += to->shipptr->xpos;
X--- 95,100 ----
X***************
X*** 71,77 ****
X }
X
X *dist = sqrt( (double)Distsq(xfrom, yfrom, xto, yto));
X! if (*dist > SYSTEMSIZE*2.0) {
X /* out of range */
X return -1;
X } else {
X--- 107,113 ----
X }
X
X *dist = sqrt( (double)Distsq(xfrom, yfrom, xto, yto));
X! if (*dist > SYSTEMSIZE*3.0) {
X /* out of range */
X return -1;
X } else {
X***************
X*** 91,97 ****
X teleg_add(buf, msg);
X teleg_add(".\n\n", msg);
X
X! if (to->level==LEVEL_SHIP && to->shipptr->is_dead) {
X sprintf(buf,"%s #%d DESTROYED.\n", Shipnames[to->shipptr->type],
X to->shipno);
X teleg_add(buf,msg);
X--- 127,133 ----
X teleg_add(buf, msg);
X teleg_add(".\n\n", msg);
X
X! if (to->level==LEVEL_SHIP && !to->shipptr->is_alive) {
X sprintf(buf,"%s #%d DESTROYED.\n", Shipnames[to->shipptr->type],
X to->shipno);
X teleg_add(buf,msg);
X***************
X*** 115,122 ****
X {
X register int x2,y2;
X reg float r; /* radius of blast */
X! float d,str;
X int numdest = 0,lowx,lowy,hix,hiy;
X register sectortype *s;
X register float fac;
X int shfdata,sectdata;
X--- 151,159 ----
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;
X+ int i, col, row, die, kills;
X register sectortype *s;
X register float fac;
X int shfdata,sectdata;
X***************
X*** 125,141 ****
X str = Kill_factor(dist, strength);
X
X if (to->level==LEVEL_SHIP) {
X! numdest = int_rand(round_rand((float)str / Shipdata[to->shipptr->type][ABIL_ARMOR])-10, round_rand((float)str / Shipdata[to->shipptr->type][ABIL_ARMOR])+10);
X! if (numdest > 100)
X! numdest = 100;
X! if (numdest < 0)
X! numdest = 0;
X
X if (from->level==LEVEL_SHIP && from->shipptr->type==OTYPE_GR) {
X /* gamma-ray lasers irradiate targets */
X if (to->shipptr->type==OTYPE_VN) {
X /* damage spread around the machine herd */
X! numdest = round_rand((float)numdest / (to->shipptr->orders.object.number * 0.3) );
X /* radiation is not accumulated */
X to->shipptr->rad = numdest;
X } else {
X--- 162,206 ----
X str = Kill_factor(dist, strength);
X
X if (to->level==LEVEL_SHIP) {
X! /* calculate combat result based on attack strength, defense strenght,
X! target class and current target speed. */
X
X+ /* get damage points */
X+ /*find column to use */
X+ col = 0;
X+
X+ for (i=0; i<9; i++)
X+ if((int)str >= column[i]) col = i;
X+
X+ /*locate damage points */
X+ die = int_rand(1,6);
X+ row = Shipdata[to->shipptr->type][ABIL_TARGET] + die - 1;
X+ damage = ((float)damage_table[row][col]) /Shipdata[to->shipptr->type][ABIL_ARMOR];
X+
X+ /*get damage */
X+ col = -1;
X+ for (i=0; i<11; i++)
X+ if(damage >= column1[i])col = i;
X+
X+
X+ numdest = 0;
X+
X+ if (col >= 0)
X+ {
X+ die = int_rand(1,6);
X+ row = die - 1;
X+ numdest = combat_table[row][col]+int_rand(-10,10);
X+ if(numdest < 0)numdest = 0;
X+ if(numdest > 100)numdest = 100;
X+
X+ }
X+
X+
X if (from->level==LEVEL_SHIP && from->shipptr->type==OTYPE_GR) {
X /* gamma-ray lasers irradiate targets */
X if (to->shipptr->type==OTYPE_VN) {
X /* damage spread around the machine herd */
X! numdest = round_rand((float)numdest / (to->shipptr->object.number * 0.3) );
X /* radiation is not accumulated */
X to->shipptr->rad = numdest;
X } else {
X***************
X*** 151,166 ****
X to->shipptr->whatdest==LEVEL_PLAN)
X pl->conditions[TOXIC] =
X MIN(pl->conditions[TOXIC]+
X! to->shipptr->orders.object.number,
X 100);
X } else
X to->shipptr->damage += numdest;
X } else {
X numdest = round_rand((float)numdest / Shipdata[OTYPE_VN][ABIL_ARMOR]);
X! if (to->shipptr->orders.object.number - numdest < 1)
X kill_ship(to->shipptr);
X else
X! to->shipptr->orders.object.number -= numdest;
X }
X }
X Nuked[to->shipptr->owner] = 1;
X--- 216,231 ----
X to->shipptr->whatdest==LEVEL_PLAN)
X pl->conditions[TOXIC] =
X MIN(pl->conditions[TOXIC]+
X! to->shipptr->object.number,
X 100);
X } else
X to->shipptr->damage += numdest;
X } else {
X numdest = round_rand((float)numdest / Shipdata[OTYPE_VN][ABIL_ARMOR]);
X! if (to->shipptr->object.number - numdest < 1)
X kill_ship(to->shipptr);
X else
X! to->shipptr->object.number -= numdest;
X }
X }
X Nuked[to->shipptr->owner] = 1;
X***************
X*** 168,174 ****
X
X } else if (to->level==LEVEL_PLAN) {
X
X! r = str * FACTOR_DESTPLANET;
X if (getmap) {
X opensectdata(§data);
X getsmap(sectdata,Smap,pl);
X--- 233,239 ----
X
X } else if (to->level==LEVEL_PLAN) {
X
X! r = .2 * str;
X if (getmap) {
X opensectdata(§data);
X getsmap(sectdata,Smap,pl);
X***************
X*** 181,215 ****
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*FACTOR_DESTPLANET/10) * logscale(100 - s->mobilization)/(d+1);
X /* factor of destruction */
X! /*printf("%d,%d dist = %.2f,dest fac %.2f",x2,y2,d,fac);*/
X! if (fac > 1.00) {
X Nuked[s->owner] = 1; /* for retaliating */
X! s->popn = s->owner = 0;
X /* mutate the sector. */
X if (s->des==DES_ICE)
X s->des==DES_SEA;
X else if (s->des==DES_PLATED)
X! s->des==DES_LAND;
X else if (s->des==DES_SEA)
X s->des==DES_LAND;
X else if (s->des==DES_MOUNT)
X! s->des=DES_LAND;
X else if (s->des==DES_LAND &&
X (s+1)->des==DES_SEA || (s-1)->des==DES_SEA)
X s->des=DES_SEA;
X else if (s->des==DES_LAND &&
X (s+1)->des==DES_GAS || (s-1)->des==DES_GAS)
X s->des=DES_GAS;
X! s->is_wasted = 1;
X! numdest++;
X! /* add some resources to be fair */
X s->resource = (percent)round_rand(s->resource * fac);
X! s->fert = (percent)round_rand(s->fert / fac);
X s->mobilization = (percent)(round_rand(s->mobilization / fac) );
X! /*printf("::%d,%d killed %d.\n",x2,y2,round_rand(s->popn * fac) );*/
X! s->eff = (percent)round_rand(s->eff / fac);
X }
X }
X }
X--- 246,295 ----
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; /* for retaliating */
X!
X! kills = int_rand(0,((int)fac))/(1+(s->des==DES_PLATED));
X! if(kills >= s->popn)
X! {s->popn = 0;
X! s->owner = 0;}
X! else {
X! s->popn -= kills;}
X /* mutate the sector. */
X+ if(((float)int_rand(0,20))*fac > 100.)
X+ {
X if (s->des==DES_ICE)
X s->des==DES_SEA;
X else if (s->des==DES_PLATED)
X! if(int_rand(0,100) > 30)s->des==DES_LAND;
X else if (s->des==DES_SEA)
X s->des==DES_LAND;
X else if (s->des==DES_MOUNT)
X! if(int_rand(0,100) > 20)s->des=DES_LAND;
X else if (s->des==DES_LAND &&
X (s+1)->des==DES_SEA || (s-1)->des==DES_SEA)
X s->des=DES_SEA;
X+
X else if (s->des==DES_LAND &&
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->is_wasted = 1;
X! numdest++;
X! }
X! /* not sure why this is necessary (gvc)
X s->resource = (percent)round_rand(s->resource * fac);
X! s->fert = (percent)round_rand(s->fert / fac);
X s->mobilization = (percent)(round_rand(s->mobilization / fac) );
X! s->eff = (percent)round_rand(s->eff / fac); */
X }
X }
X }
X***************
X*** 235,241 ****
X {
X reg float str;
X
X! str = strength * FACTOR_DAMAGE / (dist+50.0);
X return str;
X }
X
X--- 315,322 ----
X {
X reg float str;
X
X! str = strength * FACTOR_DAMAGE * exp(-dist/FACTOR_DAMAGE_DISTANCE);
X!
X return str;
X }
X
X*** ../../GB2/sizes.c Wed Jul 5 15:15:51 1989
X--- sizes.c Fri Sep 15 07:28:49 1989
X***************
X*** 14,20 ****
X
X printf(" size racetype is %d\n",sizeof(racetype));
X printf(" size placetype is %d\n",sizeof(placetype));
X- printf(" size ordertype is %d\n",sizeof(ordertype));
X printf(" size struct plinfo is %d\n\n",sizeof(struct plinfo));
X printf(" size struct power [15] is %d\n\n",sizeof(P));
X
X--- 14,19 ----
X*** ../../GB2/telegram.c Wed Jul 5 15:15:53 1989
X--- telegram.c Fri Sep 15 07:28:52 1989
X***************
X*** 75,80 ****
X--- 75,81 ----
X getchr();
X i += strlen(tbuf);
X teleg_add(tbuf, telegram_buf);
X+ teleg_add("\n", telegram_buf);
X printf("%d : ",TELEGRAM_SIZE - i );
X }
X
X*** ../../GB2/tweakables.h Wed Jul 5 15:14:56 1989
X--- tweakables.h Fri Sep 15 07:27:41 1989
X***************
X*** 5,13 ****
X * the functions using them are not recompiled so be careful.
X */
X
X! #define VERS "1.0" /* game version */
X
X! #define UPDATE_TIME 1 /* 1 hour update time */
X
X
X #define LOGIN_NAME_SIZE 13
X--- 5,13 ----
X * the functions using them are not recompiled so be careful.
X */
X
X! #define VERS "1.1" /* game version */
X
X! #define UPDATE_TIME 1 /* update time (hours) */
X
X
X #define LOGIN_NAME_SIZE 13
X***************
X*** 33,54 ****
X #define OTHER 9
X #define TOXIC 10
X
X- #define CHAR_OWNED_THING '@'
X #define CHAR_LAND '*'
X- #define CHAR_OWNED_LAND 'x'
X #define CHAR_SEA '.'
X- #define CHAR_OWNED_SEA 'x'
X #define CHAR_MOUNT '^'
X #define CHAR_DIFFOWNED '?'
X #define CHAR_PLATED 'o'
X #define CHAR_WASTELAND '%'
X- #define CHAR_OWNED_WASTELAND '!'
X #define CHAR_GAS '~'
X- #define CHAR_OWNED_GAS 'x'
X #define CHAR_CLOAKED ' '
X #define CHAR_ICE '#'
X- #define CHAR_OWNED_ICE 'x'
X- #define CHAR_OWNED_MOUNT 'X'
X
X #define NAMESIZE 18
X #define RNAMESIZE 35
X--- 33,47 ----
X***************
X*** 72,79 ****
X
X #define AUTO_TELEG_SIZE 5000
X #define TELEGRAM_SIZE 500
X! #define MAX_TELEGRAMS 50
X! #define UNTRANS_MSG "[untranslateable]"
X /*#define TELEG_TRANS_APCOST 1*/
X #define TELEG_TRANS_RPCOST 20
X #define TELEG_TRANS_AMT 0.45
X--- 65,72 ----
X
X #define AUTO_TELEG_SIZE 5000
X #define TELEGRAM_SIZE 500
X! #define MAX_TELEGRAMS 100
X! #define UNTRANS_MSG "[ ? ]"
X /*#define TELEG_TRANS_APCOST 1*/
X #define TELEG_TRANS_RPCOST 20
X #define TELEG_TRANS_AMT 0.45
X***************
X*** 107,116 ****
X
X #define FACTOR_FERT_SUPPORT 150
X /* # of people/fert pt sector supports*/
X! #define EFF_PROD 0.28 /* production of effcncy/pop*/
X! #define RESOURCE_PRODUCTION 0.10 /* adjust these to change prod*/
X! #define FUEL_PRODUCTION 0.05
X! #define DEST_PRODUCTION 0.07
X #define MOB_COST 0.10 /* mobiliz.c, doplanet.c cost/mob point*/
X #define RESOURCE_DEPLETION 0.015
X #define FACTOR_MOBPROD 0.06 /* mobilization production/person */
X--- 100,109 ----
X
X #define FACTOR_FERT_SUPPORT 150
X /* # of people/fert pt sector supports*/
X! #define EFF_PROD 0.30 /* production of effcncy/pop*/
X! #define RESOURCE_PRODUCTION 0.05 /* adjust these to change prod*/
X! #define FUEL_PRODUCTION 0.02
X! #define DEST_PRODUCTION 0.05
X #define MOB_COST 0.10 /* mobiliz.c, doplanet.c cost/mob point*/
X #define RESOURCE_DEPLETION 0.015
X #define FACTOR_MOBPROD 0.06 /* mobilization production/person */
X***************
X*** 122,128 ****
X #define TECH_SEE_STABILITY 10 /* min tech to see star stability */
X #define TECH_EXPLORE 15 /* min tech to see your whole planet */
X
X! #define ENVIR_DAMAGE_TOX 70 /* min tox to damage planet */
X
X #define PLANETGRAVCONST 0.05
X #define SYSTEMGRAVCONST 0.05
X--- 115,122 ----
X #define TECH_SEE_STABILITY 10 /* min tech to see star stability */
X #define TECH_EXPLORE 15 /* min tech to see your whole planet */
X
X! #define ENVIR_DAMAGE_TOX 85
X! /* min tox to damage planet */
X
X #define PLANETGRAVCONST 0.05
X #define SYSTEMGRAVCONST 0.05
X***************
X*** 134,142 ****
X /*#define DIST_TO_BURN 50 /* distance from sun needed to destroy ship */
X
X
X! #define FACTOR_DAMAGE 688.0
X #define FACTOR_DESTPLANET 0.35
X! #define FACTOR_DAMAGE_DISTANCE 1.00
X
X /* various compiler options that may save cpu time/disk space */
X #define SHELL_DOTURN 1 /* put doturn() in shell */
X--- 128,136 ----
X /*#define DIST_TO_BURN 50 /* distance from sun needed to destroy ship */
X
X
X! #define FACTOR_DAMAGE 2.0
X #define FACTOR_DESTPLANET 0.35
X! #define FACTOR_DAMAGE_DISTANCE 300.00
X
X /* various compiler options that may save cpu time/disk space */
X #define SHELL_DOTURN 1 /* put doturn() in shell */
X***************
X*** 174,180 ****
X /* look up sector */
X #define Sector(pl,x,y) (Smap[(x) + (y)*(pl).Maxx])
X /* adjust temperature to displayed */
X! #define Temp(x) (((int)(x))*25)
X
X /* number of AP's to add to each player in ea. system */
X /* (look in doturn) */
X--- 168,174 ----
X /* look up sector */
X #define Sector(pl,x,y) (Smap[(x) + (y)*(pl).Maxx])
X /* adjust temperature to displayed */
X! #define Temp(x) ((int)(x))
X
X /* number of AP's to add to each player in ea. system */
X /* (look in doturn) */
X*** ../../GB2/vars.h Wed Jul 5 15:14:57 1989
X--- vars.h Fri Sep 15 07:27:42 1989
X***************
X*** 14,19 ****
X--- 14,20 ----
X #define Bzero(x) bzero( (char *)&(x), sizeof(x) )
X #define Malloc(x) (x *)malloc( sizeof(x) )
X
X+
X #include "files.h"
X #include "tweakables.h"
X #include <sys/types.h>
X***************
X*** 24,30 ****
X #define LEVEL_UNIV 0
X #define LEVEL_STAR 1
X #define LEVEL_PLAN 2
X- /*#define LEVEL_MOON 3*/
X #define LEVEL_SHIP 3
X
X #define MAXPLAYERS 30
X--- 25,30 ----
X***************
X*** 42,50 ****
X unsigned numsectsowned : 10;
X unsigned comread : 7; /* combat readiness */
X unsigned mob_set : 7; /* mobilization target */
X- /*unsigned quota_resource : 7;
X- unsigned quota_destruct : 7;
X- unsigned quota_fuel : 7;*/
X unsigned explored : 1; /* 1 bit: explored by each player */
X unsigned autorep : 3; /* player wants autoreport */
X unsigned spied_on : 1; /* spied on */
X--- 42,47 ----
X***************
X*** 68,75 ****
X struct planet {
X float xpos,ypos; /* x,y relative to orbit */
X char conditions[TOXIC+1]; /* atmospheric conditions for terraforming */
X- /*int nummoons;*/
X- /*int moonpos[MAXMOONS]; /* filepos moons or ast around it */
X us ships; /* first ship in orbit (to be changed) */
X percent Maxx,Maxy; /* size of map */
X int sectormappos; /* file posn for sector map */
X--- 65,70 ----
X***************
X*** 88,94 ****
X struct star {
X float xpos,ypos;
X char stability; /* how close to nova it is */
X! char name[NAMESIZE];
X char numplanets; /* # of same */
X char pnames[MAXPLANETS][NAMESIZE]; /* names of planets */
X int planetpos[MAXPLANETS]; /* file posns of planets */
X--- 83,89 ----
X struct star {
X float xpos,ypos;
X char stability; /* how close to nova it is */
X! char name[NAMESIZE]; /* name of star */
X char numplanets; /* # of same */
X char pnames[MAXPLANETS][NAMESIZE]; /* names of planets */
X int planetpos[MAXPLANETS]; /* file posns of planets */
X***************
X*** 115,121 ****
X int snum; /* what star system obj # (level=0) */
X int pnum; /* number of planet */
X int shipno; /* # of ship */
X- /*int moon; /* ptr to moon of planet obj # (lev=2)*/
X char prompt[NAMESIZE+NAMESIZE+NAMESIZE+5]; /* just to be safe */
X float lastx, lasty, zoom; /* last coords for zoom */
X } Dir;
X--- 110,115 ----
X*** ../../GB2/Docs/actionpoints.doc Wed Jul 5 15:14:28 1989
X--- Docs/actionpoints.doc Fri Sep 15 07:29:04 1989
X***************
X*** 16,22 ****
X to the following formula:
X
X AP[player] = AP[player] + (ships in system) / 10 +
X! (total system population) / 5000 + 1
X
X Unless that system has not been explored, in which case the player will get
X none. No player can have more than 99 action points in one system, or the
X--- 16,22 ----
X to the following formula:
X
X AP[player] = AP[player] + (ships in system) / 10 +
X! (total system population) / 3000 + 1
X
X Unless that system has not been explored, in which case the player will get
X none. No player can have more than 99 action points in one system, or the
X***************
X*** 31,35 ****
X
X SEE ALSO
X cs
X-
X
X--- 31,34 ----
X*** ../../GB2/Docs/god.doc Wed Jul 5 15:14:37 1989
X--- Docs/god.doc Fri Sep 15 07:27:17 1989
X***************
X*** 2,8 ****
X
X
X NAME
X! god -- turn off deity privileges
X
X SYNTAX
X god
X--- 2,8 ----
X
X
X NAME
X! god -- turn off diety priveledges
X
X SYNTAX
X god
X***************
X*** 9,14 ****
X
X DESCRIPTION
X
X! If the user had deity privileges before, this revokes them, for
X development purposes.
X
X--- 9,14 ----
X
X DESCRIPTION
X
X! If the user had diety priveledges before, this revokes them, for
X development purposes.
X
X*** ../../GB2/Docs/map.doc Wed Jul 5 15:14:41 1989
X--- Docs/map.doc Fri Sep 15 07:27:22 1989
X***************
X*** 23,29 ****
X '~' -- Gas (such as might be found on a gas giant planet)
X '%' -- Wasteland (uninhabitable)
X ' ' -- (Under certain circumstances the sector may be blank)
X! 'o' -- A steel (or whatever) plated sector, much like the planet
X Trantor (from Asimov's _Foundation_)
X
X
X--- 23,29 ----
X '~' -- Gas (such as might be found on a gas giant planet)
X '%' -- Wasteland (uninhabitable)
X ' ' -- (Under certain circumstances the sector may be blank)
X! '|' -- A steel (or whatever) plated sector, much like the planet
X Trantor (from Asimov's _Foundation_)
X
X
X***************
X*** 32,38 ****
X 'x' -- Area owned by the player
X '?' -- Area owned by another player
X 'pscbdfgetSDM%#+mACV^ EYBG[' -- a ship of that type is landed on the sector
X! 'o' -- Area that has been developed to 100% efficiency (steel plated)
X
X
X
X--- 32,38 ----
X 'x' -- Area owned by the player
X '?' -- Area owned by another player
X 'pscbdfgetSDM%#+mACV^ EYBG[' -- a ship of that type is landed on the sector
X! '|' -- Area that has been developed to 100% efficiency (steel plated)
X
X
X
X***************
X*** 115,119 ****
X
X SEE ALSO
X orbit, cs, scope
X-
X
X--- 115,118 ----
X*** ../../GB2/Docs/order.doc Wed Jul 5 15:14:46 1989
X--- Docs/order.doc Fri Sep 15 07:27:24 1989
X***************
X*** 19,25 ****
X specified.
X
X (s)peed -- Typing a '?' at this point gives help on the speed settings.
X- speed cannot be higher than the speed rating of the ship.
X
X The following order can not be made on space mirror ships:
X
X--- 19,24 ----
X***************
X*** 38,44 ****
X--- 37,65 ----
X
X (i)ntensity -- change degree of focus for a space mirror.
X
X+ The following orders can be made for most ships:
X
X+ (n)avigate -- while this is on the destination described above is
X+ ignored and instead, the ship will travel in the direction
X+ specified by the course. The directions are specified with
X+ degrees between 0 and 360 where 0 is 'up', 90 is 'right',
X+ 180 is 'down' etc. You must also specify the number of turns
X+ to do the maneuver. After every move the turn count is decremented
X+ one until it becomes zero. After the maneuver the navigate
X+ setting is automatically turned off and if a destination
X+ has been set the ship will then proceed in that direction.
X+
X+ (p)rotect -- this allows a ship to protect another ship. Suppose, for
X+ example, ship A is set to protect ship B. If another ship C
X+ fires at B then both B *and* A will retaliate. This allows
X+ players to design their own defense networks.
X+
X+ p(l)anetary defense -- If this is set 'on' it will retaliate
X+ if the planet that it is in orbit around or landed on is
X+ attacked. If it is set 'off' the ship will not retaliate if
X+ its host planet is attacked.
X+
X+
X Action Points are deducted from the root and each star. No more than
X the normal AP cost will be deducted from the root or each star, no matter
X how many ship's orders are changed in each.
X***************
X*** 53,56 ****
X--- 74,78 ----
X
X SEE ALSO
X scope, actionpoints
X+
X
END_OF_FILE
if test 51327 -ne `wc -c <'patches01d'`; then
echo shar: \"'patches01d'\" unpacked with wrong size!
fi
# end of 'patches01d'
fi
echo shar: End of archive 4 \(of 4\).
cp /dev/null ark4isdone
MISSING=""
for I in 1 2 3 4 ; do
if test ! -f ark${I}isdone ; then
MISSING="${MISSING} ${I}"
fi
done
if test "${MISSING}" = "" ; then
echo You have unpacked all 4 archives.
rm -f ark[1-9]isdone
else
echo You still need to unpack the following archives:
echo " " ${MISSING}
fi
## End of shell archive.
exit 0