From decwrl!purdue!ames!lll-winken!uunet!tektronix!tekgen!tekred!games Thu May 4 20:28:17 PDT 1989 Article 567 of comp.sources.games: Path: decwrl!purdue!ames!lll-winken!uunet!tektronix!tekgen!tekred!games From: games@tekred.CNA.TEK.COM Newsgroups: comp.sources.games Subject: v06i058: GB - Galactic Bloodshed, an empire-like war game, Part07/07 Message-ID: <3895@tekred.CNA.TEK.COM> Date: 26 Apr 89 21:55:01 GMT Sender: billr@tekred.CNA.TEK.COM Lines: 1565 Approved: billr@saab.CNA.TEK.COM Submitted-by: Robert Chansky Posting-number: Volume 6, Issue 58 Archive-name: GB/Part07 #! /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 'Docs/actionpoints.doc' <<'END_OF_FILE' Xactionpoints Galactic Bloodshed actionpoints X X XCONCEPT: actionpoints X X Action Points are built up slowly by the player's presence in a solar Xsystem. They are a mechanism to represent the ``bureaucratic grind'' of Xa star-spanning government. X X Every command uses a certain number of action points; some commands, Xbeing observatory in nature, use none. A list can be found in the X``help'' section of the Galactic Bloodshed docs. X X Each player receives a number of action points, each turn and in each solar Xsystem he occupies as well as an amount in the ``universal'' scope, according Xto the following formula: X X AP[player] = AP[player] + (ships in system) / 5 + X (total system population) / 10000 + 1 X X Unless that system has not been explored, in which case the player will get Xnone. X X A player's action points for each system are displayed in his prompt when Xhis scope is in that system (changed by the ``cs'' command). X X The action point cost of each command can be found just before it's listing Xin each document entry. X X XSEE ALSO X cs X END_OF_FILE if test 1056 -ne `wc -c <'Docs/actionpoints.doc'`; then echo shar: \"'Docs/actionpoints.doc'\" unpacked with wrong size! fi # end of 'Docs/actionpoints.doc' fi if test -f 'Docs/assault.doc' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Docs/assault.doc'\" else echo shar: Extracting \"'Docs/assault.doc'\" \(1320 characters\) sed "s/^X//" >'Docs/assault.doc' <<'END_OF_FILE' XASSAULT Galactic Bloodshed ASSAULT X X XNAME X [1] assault -- attempt capture of planet X XSYNTAX X assault [#shipnum] X XDESCRIPTION X This command may be used when a player wishes to capture a planet intact Xinstead of laying waste to it. To perform an assault, the ship involved Xmust be 5 units of distance to it or closer (much like ``land''.) X X The player will receive a combat readiness bonus of 100 on the disputed Xplanet only if he does not have extensive colonies there. Combat Xreadiness represents how ready and willing the inhabitants are to fight. XOver time, this combat readiness will tend towards the average mobilization Xof the sectors each player owns. The mobilization of the assaulted sector Xwill be set to 100, as will the mobilization quota (see ``mobilize''). X X Each turn sectors bordered by two opposing players will be contested, both Xraces will receive casualties in disputed sectors and the winner, if there is Xone, moving in. Being possibly outnumbered by the planet's original Xinhabitants, the attacking player may have to resort to orbital bombardment Xbefore the natives wise up and surrender. (see the section on ``slavery''). XThis, however, carries it's own price -- sectors may be rendered permanently Xuninhabitable and of no use to anyone. X X XSEE ALSO X enslave, land, fire X END_OF_FILE if test 1320 -ne `wc -c <'Docs/assault.doc'`; then echo shar: \"'Docs/assault.doc'\" unpacked with wrong size! fi # end of 'Docs/assault.doc' fi if test -f 'Docs/cs.doc' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Docs/cs.doc'\" else echo shar: Extracting \"'Docs/cs.doc'\" \(488 characters\) sed "s/^X//" >'Docs/cs.doc' <<'END_OF_FILE' XCS Galactic Bloodshed CS X X XNAME X [0] cs -- change scope X XSYNOPSIS X cs [-d] [path] X where path = ``:'' | ``/[path]'' | ``..[/path]'' | [name] X XDESCRIPTION X cs changes from the current ``operative scope'' to the specified one. XIf no scope is specified, cs will change to the ``default scope''. X If the ``-d'' option is specified, cs will make [path] the new ``default Xscope''. X You cannot cs into areas that have not yet been explored by you. X X XSEE ALSO X scope, orbit END_OF_FILE if test 488 -ne `wc -c <'Docs/cs.doc'`; then echo shar: \"'Docs/cs.doc'\" unpacked with wrong size! fi # end of 'Docs/cs.doc' fi if test -f 'Docs/dock.doc' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Docs/dock.doc'\" else echo shar: Extracting \"'Docs/dock.doc'\" \(188 characters\) sed "s/^X//" >'Docs/dock.doc' <<'END_OF_FILE' X XDOCK Galactic Bloodshed DOCK X X XNAME X [1] dock -- land a ship X XSYNTAX X dock [#shipnum] X XDESCRIPTION X This command is a synonym for land. X XSEE ALSO X land, dock, launch, undock END_OF_FILE if test 188 -ne `wc -c <'Docs/dock.doc'`; then echo shar: \"'Docs/dock.doc'\" unpacked with wrong size! fi # end of 'Docs/dock.doc' fi if test -f 'Docs/examine.doc' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Docs/examine.doc'\" else echo shar: Extracting \"'Docs/examine.doc'\" \(551 characters\) sed "s/^X//" >'Docs/examine.doc' <<'END_OF_FILE' XEXAMINE Galactic Bloodshed EXAMINE X X XNAME X [1] examine -- look at a ship/object X XSYNTAX X examine [#shipnum] X XDESCRIPTION X X ``Examine'' gives the user a short paragraph-summary description of a ship or Xobject and how it can be used. This command can be applied to any ship or Xobject that player owns, as well as ships/objects that are landed on planet Xsectors that player owns. X X This command deducts 1 AP for the time and research spent in examination, Xhowever subsequent examinations of the same ship/object use no AP's. X X XSEE ALSO X build X END_OF_FILE if test 551 -ne `wc -c <'Docs/examine.doc'`; then echo shar: \"'Docs/examine.doc'\" unpacked with wrong size! fi # end of 'Docs/examine.doc' fi if test -f 'Docs/fire.doc' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Docs/fire.doc'\" else echo shar: Extracting \"'Docs/fire.doc'\" \(1370 characters\) sed "s/^X//" >'Docs/fire.doc' <<'END_OF_FILE' XFIRE Galactic Bloodshed FIRE X X XNAME X [2] fire -- shoot at an enemy planet or ship X XSYNOPSIS X fire [ ( [#shipnum]|[path] ) ( [[#shipnum]|[path] ) [strength] ] X XDESCRIPTION X Fire attempts to use stockpiled destructive capacity from the specified Xsource to give damage to the destination. X X If no source and destination paths are specified, fire will prompt the Xuser for them. The damage given is proportional to the amount of destructive Xcapacity used, and inversely proportional to the distance between them and Xthe armor class (if the defender is a ship) of the victim ship. X X If the object being fired upon is a planet fire will prompt for a sector Xat which to aim; If the object being fired from is a planet, fire will ask for Xa sector from which to fire (this must be a sector owned by the player.) XThe player will be informed how badly damaged the target is (if this is a Xplanet, the blast radius.) Badly damaged sectors can be rendered uninhabitable Xfor some time. X X At this point the target will attempt to fire back at the originating Xarea (ship or sector) with twice the strength of the attacking player, if Xit can. If more then one player inhabits a planet, each player that was Xaffected by the attack, and does not belong to the attacking player, Xwill attempt to return fire at twice the attacking strength. X X XSEE ALSO X tactical, mobilize END_OF_FILE if test 1370 -ne `wc -c <'Docs/fire.doc'`; then echo shar: \"'Docs/fire.doc'\" unpacked with wrong size! fi # end of 'Docs/fire.doc' fi if test -f 'Docs/land.doc' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Docs/land.doc'\" else echo shar: Extracting \"'Docs/land.doc'\" \(660 characters\) sed "s/^X//" >'Docs/land.doc' <<'END_OF_FILE' XLAND Galactic Bloodshed LAND X X XNAME X [1] land -- land a ship X XSYNTAX X land [#shipnum] X XDESCRIPTION X This command lands ships on planets. To do so the ship must be Xcloser than 5 distance units away from the planet it is orbiting. Land Xwill prompt the player for what sector on which to land. X X This maneuver costs an amount of fuel proportional to the mass of the Xship. If the ship does not have enough fuel it will crash. This will give Xdamage to the planet in proportion to the mass of the ship, the gravitational Xfield of the planet, and the amount of destructive capacity the ship happens Xto be carrying. X X XSEE ALSO X dock, launch, undock END_OF_FILE if test 660 -ne `wc -c <'Docs/land.doc'`; then echo shar: \"'Docs/land.doc'\" unpacked with wrong size! fi # end of 'Docs/land.doc' fi if test -f 'Docs/launch.doc' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Docs/launch.doc'\" else echo shar: Extracting \"'Docs/launch.doc'\" \(423 characters\) sed "s/^X//" >'Docs/launch.doc' <<'END_OF_FILE' XLAUNCH Galactic Bloodshed LAUNCH X X XNAME X [1] launch -- launch a ship X XSYNOPSIS X launch [#shipnum] X XDESCRIPTION X This command attempts to launch ships that are landed on planets. X X To do so a ship must have an amount of fuel proportional to the Xgravitational field of the planet and the mass of the ship. If the ship does Xnot have enough fuel, it will not be able to launch. X X XSEE ALSO X undock, land, dock END_OF_FILE if test 423 -ne `wc -c <'Docs/launch.doc'`; then echo shar: \"'Docs/launch.doc'\" unpacked with wrong size! fi # end of 'Docs/launch.doc' fi if test -f 'Docs/load.doc' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Docs/load.doc'\" else echo shar: Extracting \"'Docs/load.doc'\" \(943 characters\) sed "s/^X//" >'Docs/load.doc' <<'END_OF_FILE' XLOAD Galactic Bloodshed LOAD X X XNAME X [0] load -- load/unload commodities to/from a ship X XSYNTAX X load [ #shipnum d|p|r|f amt ] X XDESCRIPTION X The load command is used for the resupplying of ships, and the disembarking Xof colonies. X X If no arguments are specified, the program will prompt the user for: X X #shipnum -- What ship to load from/to X X d|p|r|f -- specify destructive potential, people, resources, or fuel to load/ Xunload. destructive potential, resources and fuel are taken from that user's Xstockpiles, while people are taken from the sector the ship is landed on. If Xthe ship is docked with another ship and not a planet, the tranfers will be Xdirect. X X amt -- the amount to load (if negative, the amount will be subtracted). X X If the ship is neither landed at a planet nor docked with another vessel, Xthe player will be prompted whether or not to jettison its cargo / passengers Xto deep space, never to be recovered. X END_OF_FILE if test 943 -ne `wc -c <'Docs/load.doc'`; then echo shar: \"'Docs/load.doc'\" unpacked with wrong size! fi # end of 'Docs/load.doc' fi if test -f 'Docs/makeuniv.doc' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Docs/makeuniv.doc'\" else echo shar: Extracting \"'Docs/makeuniv.doc'\" \(783 characters\) sed "s/^X//" >'Docs/makeuniv.doc' <<'END_OF_FILE' XMAKEUNIV Galactic Bloodshed MAKEUNIV X X XNAME X makeuniv -- construct data files for ``Galactic Bloodshed'' X XSYNTAX X makeuniv [-v] { from UNIX shell only } X XDESCRIPTION X X This command constructs the data files used in the game. The ``-v'' Xoption causes makeuniv to print out sector maps and information about planets, Xsystems, etc. otherwise the construction will be relatively silent. X X Makeuniv asks for the number of stars (which cannot exceed the maximum Xlisted there without dire consequences), a lower and upper range of planets Xthat the program will not exceed, and the name of each star system. The Xplanets of each system will be named according to the star and a roman Xnumeral representing its position. X X Makeuniv will destroy any game previously in operation. X END_OF_FILE if test 783 -ne `wc -c <'Docs/makeuniv.doc'`; then echo shar: \"'Docs/makeuniv.doc'\" unpacked with wrong size! fi # end of 'Docs/makeuniv.doc' fi if test -f 'Docs/mobilize.doc' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Docs/mobilize.doc'\" else echo shar: Extracting \"'Docs/mobilize.doc'\" \(1351 characters\) sed "s/^X//" >'Docs/mobilize.doc' <<'END_OF_FILE' X XMOBILIZE Galactic Bloodshed MOBILIZE X X XNAME X mobilize [1] -- Increase military mobilization in sectors X XSYNOPSIS X mobilize X XDESCRIPTION X X This command sets quotas for mobilization in sectors, for the production Xof ``destructive capability'' which represents weapons in Galactic Bloodshed. X X The ``mobilization'' of a sector represents its military readiness; the Xgreater the percentage (up to 100) the higher the mobilization. XSectors that have this quality produce quantities of destructive capacity Xaccording to the degree of mobilization, the amount of population, and the Xamount of resource deposits in the sector. X X As a side effect, Because the sectors being mobilized have to be hardened Xand citizens given training in the military arts, the sector will become Xmuch more resistant to attack than an un-mobilized one. X X This command only sets a quota, it does not do any actual work. XMobilization will be built up by the citizenry a small amount at a time X(the rate will be proportional to the population of each sector and Xthe resource deposits there) as the population works to organize things Xand set up factories and shelters and so forth. Each mobilization point Xon each sector costs 0.1 resource points to produce. This amount is Xdeducted from the resource points available on the planet. X X XSEE ALSO X map, census, fire END_OF_FILE if test 1351 -ne `wc -c <'Docs/mobilize.doc'`; then echo shar: \"'Docs/mobilize.doc'\" unpacked with wrong size! fi # end of 'Docs/mobilize.doc' fi if test -f 'Docs/name.doc' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Docs/name.doc'\" else echo shar: Extracting \"'Docs/name.doc'\" \(786 characters\) sed "s/^X//" >'Docs/name.doc' <<'END_OF_FILE' XNAME Galactic Bloodshed NAME X X XDESCRIPTION X [2] name -- rename an object (ship, star, planet) X XSYNTAX X name [path] [name] X XDESCRIPTION X ``name'' attempts to rename the specified path to the name. If X[path] is a star or planet you must have explored that area; if [path] is Xa ship you must own that ship. X X If [path] is the word ``race'', name will prompt for a new racial name. X X An additional constraint against the player is that he have more AP's Xthan any other player in the system in which he is naming (only if the Xobject is a star or planet). The AP cost will be deducted from that system, Xunless the object named is the racial name or a ship in interstellar space, Xin which case the AP cost will be deducted from the ``universal'' scope. X X XSEE ALSO X cs, actionpoints END_OF_FILE if test 786 -ne `wc -c <'Docs/name.doc'`; then echo shar: \"'Docs/name.doc'\" unpacked with wrong size! fi # end of 'Docs/name.doc' fi if test -f 'Docs/object.doc' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Docs/object.doc'\" else echo shar: Extracting \"'Docs/object.doc'\" \(1408 characters\) sed "s/^X//" >'Docs/object.doc' <<'END_OF_FILE' XOBJECT Galactic Bloodshed OBJECT X X XNAME X [0] object -- survey objects the user owns X XSYNOPSIS X object [#objnum] X XDESCRIPTION X This command allows users to survey objects in their possession. XObjects differ from ships in that (generally) they cannot go anywhere, Xand each performs a specialized function. Some low-tech object types Xare: X X Space Mirror -- A large, delicate, reflective field of metal X which can be aimed at a specific object. When aimed at a X planet, the mirror raises its ambient X temperature according to the focus applied. When aimed X at a ship, the ship will take a certain amount of damage X each turn. When aimed at a star, the star may become X more unstable. X X Canister of dust -- When constructed and launched into the atmosphere X of a planet, the canister will explode, causing dust to X prevent solar rays from reaching the planet and thus lowering X its ambient temperature. This may be used for terraforming X purposes. X X Atmosphere processor -- A machine that can alter the atmosphere X of a planet to better suit its owner. These machines X work slowly, and require fuel to operate. X X X X Orders for certain objects (e.g. destination for the space mirror) can Xbe changed with the ``order'' command. X X Additional information on ships or objects can be obtained with the X``examine'' command. X X XSEE ALSO X examine, order, ship, stock, report, tactical X END_OF_FILE if test 1408 -ne `wc -c <'Docs/object.doc'`; then echo shar: \"'Docs/object.doc'\" unpacked with wrong size! fi # end of 'Docs/object.doc' fi if test -f 'Docs/read.doc' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Docs/read.doc'\" else echo shar: Extracting \"'Docs/read.doc'\" \(1542 characters\) sed "s/^X//" >'Docs/read.doc' <<'END_OF_FILE' XREAD Galactic Bloodshed READ X X XNAME X [0] read -- read messages from other players X XSYNTAX X read X XDESCRIPTION X X Read allows the player to look over messages sent to him by the other Xusers in the game. The player will be given a list of the most recent Xmessages, and a '&' prompt: X X 1 (50%) Cetella(#3): "You will [untranslateable] [untranslateable] now." X X The first field is the message number, the second, the translation modifier Xfor the sending player. The rest of the line is the first line of the message. X X At the prompt the user may: X 'r #' -- Read message # X 'd #' -- Delete message # X 't #' -- Translate message # X 'm' -- Give a list of translation modifiers X 'q' -- Quit read X X 'r' will print the contents of the message to the screen. Note that with Xthe communication difficulties inherent between any two disparate alien Xraces, some parts of the message (or even all of it) may be listed as Xuntranslateable. X 'd' will delete the message from the user's files. X 't' will attempt to translate a message into the user's own language. This Xuses resources, equipment and personnel that would otherwise be employed Xelsewhere, to the tune of 4 resources and 1 Action Point per translation Xattempt. The expenditure is deducted from wherever the ``Current Scope'' is Xat the moment; thus a user can shuffle his expenses around. This effort will Xincrease the translation modifier for the sending player (note that this does Xnot need to be done for each message.) X X XSEE ALSO X telegram X END_OF_FILE if test 1542 -ne `wc -c <'Docs/read.doc'`; then echo shar: \"'Docs/read.doc'\" unpacked with wrong size! fi # end of 'Docs/read.doc' fi if test -f 'Docs/report.doc' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Docs/report.doc'\" else echo shar: Extracting \"'Docs/report.doc'\" \(590 characters\) sed "s/^X//" >'Docs/report.doc' <<'END_OF_FILE' XREPORT Galactic Bloodshed REPORT X X XNAME X [0] report -- navigational ship report X XSYNTAX X report [#shipnum] X XDESCRIPTION X This command allows users to survey their ships. Where ``stock'' gives Xinformation about what a ship is carrying, ``report'' will give Xinformation about where the ship is and where it is going. X X If given with no arguments, ``report'' will start with the current scope Xand give reports on all ships from there down. X X Additional information about the ship can be obtained with the ``examine'' Xcommand. X X XSEE ALSO X examine, ship, stock, tactical, scope X END_OF_FILE if test 590 -ne `wc -c <'Docs/report.doc'`; then echo shar: \"'Docs/report.doc'\" unpacked with wrong size! fi # end of 'Docs/report.doc' fi if test -f 'Docs/scrap.doc' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Docs/scrap.doc'\" else echo shar: Extracting \"'Docs/scrap.doc'\" \(466 characters\) sed "s/^X//" >'Docs/scrap.doc' <<'END_OF_FILE' XSCRAP Galactic Bloodshed SCRAP X X XNAME X [1] scrap -- junk a ship X XSYNTAX X scrap [#shipnum] X XDESCRIPTION X X Scrap allows users to reclaim the resources consumed in building Xa ship or object. Because of labor costs, only 75% of the original cost of Xthe ship/object can be reclaimed. X X Upon scrapping the ship, its reclamation value plus any commodities it may Xhave in its hold, are added to the stockpiles of the planet it is on. X XSEE ALSO X load, stock, build X END_OF_FILE if test 466 -ne `wc -c <'Docs/scrap.doc'`; then echo shar: \"'Docs/scrap.doc'\" unpacked with wrong size! fi # end of 'Docs/scrap.doc' fi if test -f 'Docs/ship.doc' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Docs/ship.doc'\" else echo shar: Extracting \"'Docs/ship.doc'\" \(492 characters\) sed "s/^X//" >'Docs/ship.doc' <<'END_OF_FILE' X XSHIP Galactic Bloodshed SHIP X X XNAME X [0] ship -- ship report X XSYNTAX X ship [#shipnum] X XDESCRIPTION X This command allows users to survey their ships. It is equivalent to Xrequesting a stock, report, and tactical report for each ship. This command Xuses scoping in the same way the other commands do. Ship types are detailed Xin the ``build'' docs. X X Additional information about ships can be obtained with the ``examine'' Xcommand. X X X XSEE ALSO X examine, report, tactical, scope X END_OF_FILE if test 492 -ne `wc -c <'Docs/ship.doc'`; then echo shar: \"'Docs/ship.doc'\" unpacked with wrong size! fi # end of 'Docs/ship.doc' fi if test -f 'Docs/stock.doc' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Docs/stock.doc'\" else echo shar: Extracting \"'Docs/stock.doc'\" \(385 characters\) sed "s/^X//" >'Docs/stock.doc' <<'END_OF_FILE' XSTOCK Galactic Bloodshed STOCK X X XNAME X [0] stock -- stockpile report X XSYNTAX X stock [#shipnum] X XDESCRIPTION X This command allows users to survey their ships. It gives basic Xinformation about cargo and crew. X X If given with no arguments, ``stock'' will start with the current scope Xand give reports on all ships from there down. X X XSEE ALSO X ship, report, tactical, scope X END_OF_FILE if test 385 -ne `wc -c <'Docs/stock.doc'`; then echo shar: \"'Docs/stock.doc'\" unpacked with wrong size! fi # end of 'Docs/stock.doc' fi if test -f 'Docs/tactical.doc' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Docs/tactical.doc'\" else echo shar: Extracting \"'Docs/tactical.doc'\" \(500 characters\) sed "s/^X//" >'Docs/tactical.doc' <<'END_OF_FILE' XTACTICAL Galactic Bloodshed TACTICAL X X XNAME X [0] tactical -- tactical ship report X XSYNTAX X tactical [#shipnum] X XDESCRIPTION X This command allows users to survey their ships. Where ``stock'' and X``report'' give information about what the ship is carrying and where it Xis going, ``tactical'' reports the ship's battle readiness. X X If given with no arguments, ``tactical'' will start with the current scope Xand give reports on all ships from there down. X X XSEE ALSO X report, stock, scope X END_OF_FILE if test 500 -ne `wc -c <'Docs/tactical.doc'`; then echo shar: \"'Docs/tactical.doc'\" unpacked with wrong size! fi # end of 'Docs/tactical.doc' fi if test -f 'Docs/telegram.doc' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Docs/telegram.doc'\" else echo shar: Extracting \"'Docs/telegram.doc'\" \(1050 characters\) sed "s/^X//" >'Docs/telegram.doc' <<'END_OF_FILE' XTELGRAM Galactic Bloodshed TELGRAM X X XNAME X [2] telegram -- send messages to other players X XSYNTAX X telegram [Playername | Playernumber | place] X XDESCRIPTION X X This command allows users to communicate with each other. The player Xmust specify who/what they wish to contact, and a message to send to Xthat player. To specify a place instead of a single player, the string Xmust begin with one of the following characters: / : . # If the string Xis specified in this way, all players that currently occupy the area Xspecified will be sent the telegram. If the area is a ship, only the owner Xof that ship will be the recipient. X X Note that the transmission will identify your location to them, so it is Xexpedient to choose carefully whom you send messages to. X X Note also that with first contact between any two races utterly alien to Xeach other, there is likely to be communication difficulties between the Xtwo at first. The receiving player will have to use valuable resources and Xequipment to translate your message. X XSEE ALSO X read X END_OF_FILE if test 1050 -ne `wc -c <'Docs/telegram.doc'`; then echo shar: \"'Docs/telegram.doc'\" unpacked with wrong size! fi # end of 'Docs/telegram.doc' fi if test -f 'Docs/undock.doc' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Docs/undock.doc'\" else echo shar: Extracting \"'Docs/undock.doc'\" \(196 characters\) sed "s/^X//" >'Docs/undock.doc' <<'END_OF_FILE' XUNDOCK Galactic Bloodshed UNDOCK X X XNAME X [1] undock -- undock a ship X XSYNOPSIS X undock [#shipnum] X XDESCRIPTION X this command is a synonym for launch. X X XSEE ALSO X launch, land, dock X END_OF_FILE if test 196 -ne `wc -c <'Docs/undock.doc'`; then echo shar: \"'Docs/undock.doc'\" unpacked with wrong size! fi # end of 'Docs/undock.doc' fi if test -f 'Docs/zoom.doc' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Docs/zoom.doc'\" else echo shar: Extracting \"'Docs/zoom.doc'\" \(844 characters\) sed "s/^X//" >'Docs/zoom.doc' <<'END_OF_FILE' XZOOM Galactic Bloodshed ZOOM X X XNAME X [0] zoom -- declare zoom values X XSYNTAX X zoom (amount) X XDESCRIPTION X X This command allows users to alter the scale used in an orbit display. XThe lower the number, the larger the display will be. X X ``Amount'' can be specified in one of two ways: a floating-point format, Xin which case the amount will be the amount given, or an x/y format, in Xwhich case the amount will be the numerator (x) divided by the denominator (y). X X At a zoom scale of 1.0, the display will be equal to the screen size. At Xa scale of greater than 1.0, the display will be smaller than the screen; Xsmaller than 1.0, and the screen will zoom in to the displayed map. X X Display is centered around the current ``lastx,lasty'' coordinates (see Xorbit). X X At game start, the zoom value is declared as 1.0. X XSEE ALSO X orbit END_OF_FILE if test 844 -ne `wc -c <'Docs/zoom.doc'`; then echo shar: \"'Docs/zoom.doc'\" unpacked with wrong size! fi # end of 'Docs/zoom.doc' fi if test -f 'daemon.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'daemon.c'\" else echo shar: Extracting \"'daemon.c'\" \(1127 characters\) sed "s/^X//" >'daemon.c' <<'END_OF_FILE' X/* X * Galactic Bloodshed (Robert Chansky, smq@b) X * daemon.c -- sleep for awhile, then do a turn X */ X X#include "tweakables.h" X#include X#include X#include X#include X#include X#include X#include X Xmain() X{ X struct tm *t; X long clk; X int turn=0,update=0,fd2; X FILE *fd; X X if (fork()) exit(); /* detach from shell */ X X sigblock(SIGHUP|SIGINT|SIGQUIT); /* ignore signal from owner logging out */ X X X fd2 = open("/dev/tty", O_RDWR); /* disassociate from tty */ X ioctl(fd2, TIOCNOTTY, 0); X close(fd2); X X while (1) { X X clk = time(0); X t = localtime(&clk); X X printf("day %d,hour %d,min %d,sec %d\n", X t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec); X X if ( (t->tm_hour % UPDATE_TIME)==0 && update!=t->tm_hour) { X update = t->tm_hour; X doturn(0); /* not from shell */ X fd = fopen(PROFDATAFL, "a"); X clk = time(0); X t = localtime(&clk); X fprintf(fd,"turn %d @ day %d,hour %d,min %d,sec %d, time=%d secs\n", X turn++, t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec, X t->tm_min * 60 + t->tm_sec); X fclose(fd); X } else X sleep(600); X } X X} END_OF_FILE if test 1127 -ne `wc -c <'daemon.c'`; then echo shar: \"'daemon.c'\" unpacked with wrong size! fi # end of 'daemon.c' fi if test -f 'doturn.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'doturn.h'\" else echo shar: Extracting \"'doturn.h'\" \(707 characters\) sed "s/^X//" >'doturn.h' <<'END_OF_FILE' X Xstruct stinfo { X char temp_add; /* addition to temperature to each planet */ X unsigned Thing_add : BITS_MAXPLAYERS; X /* new Thing colony on this planet */ X} Stinfo[NUMSTARS][MAXPLANETS]; X Xstruct sectinfo { X bool explored[MAXPLAYERS]; X unsigned VN : 1; X} Sectinfo[MAX_X][MAX_Y]; X Xextern char telegram_buf[AUTO_TELEG_SIZE]; Xextern float compatibility(); Xextern shiptype *ships[MAXTOTALSHIPS]; Xextern planettype *planets[NUMSTARS][MAXPLANETS]; Xextern racetype *races[MAXPLAYERS]; Xextern us Sdatanumships[MAXPLAYERS]; Xextern ul Sdatapopns[MAXPLAYERS]; Xextern us starnumships[NUMSTARS][MAXPLAYERS]; Xextern ul starpopns[NUMSTARS][MAXPLAYERS]; Xextern float Compat[MAXPLAYERS]; Xextern int Num_races, Num_ships; END_OF_FILE if test 707 -ne `wc -c <'doturn.h'`; then echo shar: \"'doturn.h'\" unpacked with wrong size! fi # end of 'doturn.h' fi if test -f 'examine.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'examine.c'\" else echo shar: Extracting \"'examine.c'\" \(1451 characters\) sed "s/^X//" >'examine.c' <<'END_OF_FILE' X X X/* X * Galactic Bloodshed (Robert Chansky, smq@b) X * examine -- check out an object X */ X X#include "vars.h" X#include "ships.h" Xextern int Shipdata[NUMSTYPES][NUMABILS]; Xextern char *Shipnames[]; X Xexamine(APcount, argn,args) Xint APcount; Xint argn; Xchar args[MAXARGS][COMMANDSIZE]; X{ X shiptype *ship; X int c,t,shdata,shipno; X FILE *fd; X X if (argn==1) { X printf("ship #"); X scanf("%d",&shipno); X getchr(); X } else X sscanf(args[1] + ((*args[1]=='#') ? 1 : 0),"%d",&shipno); X X openshdata(&shdata); X if (!getship(shdata,&ship,shipno)) X return; X X if (ship->owner!=Playernum || ship->is_dead) { X DontOwnErr(shipno); X free(ship); X return; X } X X if ((fd=fopen(EXAM_FL, "r"))==NULL) { X perror(EXAM_FL); X exit(-1); X } X X /* look through ship data file */ X for (t=0; ttype; t++) X while (fgetc(fd) != '~') ; X X /* give report */ X while ((c=fgetc(fd)) != '~') X putchr(c); X X fclose(fd); X X if (!ship->is_examined) { X if (ship->whatorbits==LEVEL_UNIV) X deductAPs(APcount, 0, 1); /* ded from sdata */ X else X deductAPs(APcount, ship->storbits, 0); X X ship->is_examined = 1; X putship(shdata,ship,shipno); X X } X close(shdata); X X if (has_switch(ship)) X printf("This device has an on/off switch that can be set with order.\n"); X if (ship->rad) X printf("This device has been irradiated;\nit's crew is dying and it cannot move for the time being.\n"); X X free(ship); X X} END_OF_FILE if test 1451 -ne `wc -c <'examine.c'`; then echo shar: \"'examine.c'\" unpacked with wrong size! fi # end of 'examine.c' fi if test -f 'files.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'files.h'\" else echo shar: Extracting \"'files.h'\" \(878 characters\) sed "s/^X//" >'files.h' <<'END_OF_FILE' X/* X * Galactic Bloodshed (Robert Chansky, smq@b) X */ X X#ifdef VER_4.3 X X/*#define PATH(file) "/home/ssyx/smq/GB/file"*/ X#define PATH(file) "/usr/games/lib/GB/file" X X#else X X/*#define PATH(file) "/b/f/smq/GB/file" /* running on different hosts*/ X#define PATH(file) "/usr/games/lib/GB/file" X X#endif X X#define DATADIR PATH(Data) X#define DOCS PATH(Docs) X#define EXAM_FL PATH(exam.dat) X X#define DFILE(fl) PATH(Data/fl) X X#define STARDATAFL DFILE(star) X#define SECTORDATAFL DFILE(sector) X#define PLANETDATAFL DFILE(planet) X#define RACEDATAFL DFILE(race) X#define SHIPDATAFL DFILE(ship) X#define SHIPFREEDATAFL DFILE(shipfree) X#define PLAYERDATAFL DFILE(players) X#define TELEGRAMDIR DFILE(Tele) X#define TELEGRAMFL DFILE(Tele/tele) X#define PROFDATAFL DFILE(spitup) X#define POWFL DFILE(power) X X X#define PLAYER_GOD "smq" X#define PLAYER_GROUP_ID 937 X#define LOCK_ALL "/tmp/Ex29935 " END_OF_FILE if test 878 -ne `wc -c <'files.h'`; then echo shar: \"'files.h'\" unpacked with wrong size! fi # end of 'files.h' fi if test -f 'get4args.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'get4args.c'\" else echo shar: Extracting \"'get4args.c'\" \(500 characters\) sed "s/^X//" >'get4args.c' <<'END_OF_FILE' X/* X * Galactic Bloodshed (Robert Chansky, smq@b) X */ X Xget4args(s,xl,xh,yl,yh) Xchar *s; Xint *xl,*xh,*yl,*yh; X{ Xchar *p,s1[17],s2[17]; X p=s; X X sscanf(p,"%[^,]",s1); X while ( (*p!=':') && (*p!=',') ) p++; X if (*p==':') { X sscanf(s1,"%d:%d",xl,xh); X while (*p!=',') p++; X } X else if (*p==',') { X sscanf(s1,"%d",xl); X *xh=(*xl); X } X X sscanf(p,"%s",s2); X while ( (*p!=':') && (*p!='\0') ) p++; X if (*p==':') { X sscanf(s2,",%d:%d",yl,yh); X } X else { X sscanf(s2,",%d,",yl); X *yh=(*yl); X } X X} END_OF_FILE if test 500 -ne `wc -c <'get4args.c'`; then echo shar: \"'get4args.c'\" unpacked with wrong size! fi # end of 'get4args.c' fi if test -f 'help.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'help.c'\" else echo shar: Extracting \"'help.c'\" \(816 characters\) sed "s/^X//" >'help.c' <<'END_OF_FILE' X X/* X * Galactic Bloodshed (Robert Chansky, smq@b) X * help.c -- help on certain topics X */ X X#include "tweakables.h" X Xhelp(APcount, argn,args) Xint APcount; Xint argn; Xchar args[MAXARGS][COMMANDSIZE]; X{ X char s[MAXCOMMSTRSIZE]; X X if (argn==1) { X printf("usage: help [topic]\n"); X printf(" valid topics are:\n concepts:\n%s", X "overview help scope actionpoints makeuniv\n" ); X printf("\n commands:\n%s\n%s\n%s\n%s\n%s\n", X "cs map survey orbit zoom autoreport\n", X "build ship stock report order object examine", X "land launch dock undock assault build scrap\n", X "declare telegram read profile power", X "tactical fire name mobilize telegram\n" X ); X } else { X sprintf(s,"%s %s/%s.doc*", PAGER, DOCS, args[1] ); X system(s); X } X X} END_OF_FILE if test 816 -ne `wc -c <'help.c'`; then echo shar: \"'help.c'\" unpacked with wrong size! fi # end of 'help.c' fi if test -f 'misc.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'misc.c'\" else echo shar: Extracting \"'misc.c'\" \(333 characters\) sed "s/^X//" >'misc.c' <<'END_OF_FILE' X/* X * Galactic Bloodshed (Robert Chansky, smq@b) X * scales used in production efficiency etc. X * input both: int 0-100 X * output both: float 0.0 - 1.0 (logscale 0.5 - .95) X */ X Xfloat powscale(x) Xregister int x; X{ X register float f; X return (f=(float)x/100.0)*f; X} X Xfloat logscale(x) Xregister int x; X{ X return (x+5.0) / (x+10.0); X} X END_OF_FILE if test 333 -ne `wc -c <'misc.c'`; then echo shar: \"'misc.c'\" unpacked with wrong size! fi # end of 'misc.c' fi if test -f 'power.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'power.c'\" else echo shar: Extracting \"'power.c'\" \(1177 characters\) sed "s/^X//" >'power.c' <<'END_OF_FILE' X X/* X * Galactic Bloodshed (Robert Chansky, smq@ucscb.ucsc.edu) X * power.c -- display power report X */ X X#include "vars.h" X#include "races.h" X#include "power.h" X#include Xextern int errno; Xextern int God; X Xpower(APcount, argn,args) Xint APcount, argn; Xchar *args[]; X{ Xregister int i,n; Xint power_fd; Xracetype *r; Xstruct power p[MAXPLAYERS]; X X if (argn>1) { X printf("usage: power\n"); X return; X } X X printf(" ========== Galactic Bloodshed Power Report ==========\n"); X printf(" # Name sects popn eff mob #shp #plan res fuel dest\n"); X X if ( (power_fd = open(POWFL, O_RDONLY, 0777)) < 0) { X perror("open power data"); X } else { X read(power_fd, (char *)p, sizeof(*p)*MAXPLAYERS); X close(power_fd); X X n = Numraces(); X for (i=1; i<=n; i++) { X getrace(&r,i); X printf("%2d %-17.17s%5u%7u%4.0f%4.0f%5u%6u%7u%7u%7u\n", X i, r->name, X p[i].sectors_owned, p[i].popn, X p[i].sectors_owned ? X (float)p[i].sum_eff/p[i].sectors_owned : 0.0, X p[i].sectors_owned ? X (float)p[i].sum_mob/p[i].sectors_owned : 0.0, X p[i].ships_owned, p[i].planets_owned, X p[i].resource, p[i].fuel, p[i].destruct); X free(r); X } X } X} END_OF_FILE if test 1177 -ne `wc -c <'power.c'`; then echo shar: \"'power.c'\" unpacked with wrong size! fi # end of 'power.c' fi if test -f 'power.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'power.h'\" else echo shar: Extracting \"'power.h'\" \(322 characters\) sed "s/^X//" >'power.h' <<'END_OF_FILE' X X /* for power report */ Xstruct power { X ul popn; /* total population */ X ul resource; /* total resource in stock */ X ul fuel; X ul destruct; /* total dest in stock */ X us ships_owned; /* # of ships owned */ X us planets_owned; X ul sectors_owned; X ul sum_mob; /* total mobilization */ X ul sum_eff; /* total efficiency */ X}; END_OF_FILE if test 322 -ne `wc -c <'power.h'`; then echo shar: \"'power.h'\" unpacked with wrong size! fi # end of 'power.h' fi if test -f 'races.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'races.h'\" else echo shar: Extracting \"'races.h'\" \(803 characters\) sed "s/^X//" >'races.h' <<'END_OF_FILE' X/* X * Galactic Bloodshed (Robert Chansky, smq@b) X */ X Xstruct race { X float tech; /* technology */ X float birthrate; X float overbirthrate; X percent fighters; X percent IQ; X percent number_sexes; X float mass; X float metabolism; X float nonhomebodies; X char conditions[OTHER+1]; /* planetary conditions you like */ X char homelevel,homesystem,homeplanetnum; /* home place */ X char deflevel,defsystem,defplanetnum; /* current default */ X int Playernum; X char name[RNAMESIZE]; X percent translate[MAXPLAYERS]; /* translation mod for ea player */ X char atwar[howmanybytes(MAXPLAYERS)]; /* war */ X char allied[howmanybytes(MAXPLAYERS)]; /* allies */ X unsigned Thing : 1; /* your race is like "The Thing" */ X}; X Xtypedef struct race racetype; Xracetype *Race; END_OF_FILE if test 803 -ne `wc -c <'races.h'`; then echo shar: \"'races.h'\" unpacked with wrong size! fi # end of 'races.h' fi if test -f 'rand.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'rand.c'\" else echo shar: Extracting \"'rand.c'\" \(777 characters\) sed "s/^X//" >'rand.c' <<'END_OF_FILE' X/* X** Galactic Bloodshed (Robert Chansky, smq@b) X** Random number generator X** X** float float_rand() this returns a random number between 0 and 1 X** X** int int_rand(low,hi) - this returns an integer random number X** between hi and low, inclusive. X** X** int round_rand(float) - returns float rounded to integer, with X** proportional chance of rounding up or X** down. X** X** int rposneg() - either -1 or 1 X*/ X X Xlong random(); X X Xfloat float_rand() X{ X return (-(float)random()/ 2147483648); X} X Xint int_rand(low,hi) Xregister int low,hi; X{ X return( (hi<=low) ? low : (float_rand() * (hi - low + 1)) + low ); X} X X Xint round_rand(x) Xregister float x; X{ X return ( (float_rand() > (x-(int)x)) ? (int)x : (int)(x+1) ); X} X Xint rposneg() X{ X return( (random()%1) ? -1 : 1 ); X} END_OF_FILE if test 777 -ne `wc -c <'rand.c'`; then echo shar: \"'rand.c'\" unpacked with wrong size! fi # end of 'rand.c' fi if test -f 'sizes.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'sizes.c'\" else echo shar: Extracting \"'sizes.c'\" \(957 characters\) sed "s/^X//" >'sizes.c' <<'END_OF_FILE' X/* X * Galactic Bloodshed (Robert Chansky, smq@b) X */ X X#include "vars.h" X#include "ships.h" X#include "races.h" X#include "power.h" Xstruct power P[MAXPLAYERS]; Xmain() { X printf(" size startype is %d\n",sizeof(startype)); X printf(" size planettype is %d\n",sizeof(planettype)); X printf(" size shiptype is %d\n\n",sizeof(shiptype)); 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/*###18 [cc] unknown size%%%*/ X/*###20 [cc] unknown size%%%*/ X printf(" size struct power [15] is %d\n\n",sizeof(P)); X X printf(" size sectortype is %d\n",sizeof(sectortype)); X X printf(" size long = %d\n",sizeof(long) ); X printf(" size int = %d\n",sizeof(int) ); X printf(" size short = %d\n",sizeof(short) ); X printf(" size double = %d\n",sizeof(double) ); X printf(" size float = %d\n",sizeof(float) ); X} END_OF_FILE if test 957 -ne `wc -c <'sizes.c'`; then echo shar: \"'sizes.c'\" unpacked with wrong size! fi # end of 'sizes.c' fi if test -f 'teleg_send.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'teleg_send.c'\" else echo shar: Extracting \"'teleg_send.c'\" \(1443 characters\) sed "s/^X//" >'teleg_send.c' <<'END_OF_FILE' X/* X * Galactic Bloodshed (Robert Chansky, smq@b) X * teleg_send.c -- does the work of sending a telegram X */ X X X#include "tweakables.h" X#include X#include X#include X#include X#include X#include X#include Xlong tm; Xchar *ctime(); X X Xteleg_send(sender, recpient, msg) Xchar sender, recpient; Xchar *msg; X{ X char telefl[80],tmbuf[50], numcodes; X int mask; X FILE *telegram_fd; X register int i,t; X X mask = sigblock(SIGINT | SIGQUIT | SIGSTOP); X /* block interrupts from keyboard */ X X sprintf(telefl, "%s.%d",TELEGRAMFL, recpient ); X if ((telegram_fd = fopen( telefl, "a" ))==NULL) { X perror("teleg_send"); X } else { X X /* write player number */ X fputc(sender, telegram_fd); X X X /* write current time */ X tm = time(0); X fprintf( telegram_fd, "%s", ctime(&tm) ); X X /* write the telegram */ X do { X if (isspace(*msg)) { X fprintf(telegram_fd, "%c%c", *msg, int_rand(1,99)); X } else X fputc(*msg, telegram_fd); X } while (*(msg++) != '\0'); X X fprintf(telegram_fd, "\n%c", TELEG_DELIM); X fclose(telegram_fd); X X } X sigsetmask(mask); /* reset mask */ X X} X X X X /* for autoreport; send '\0' to initialize */ Xteleg_add(string,buf) Xchar *string,*buf; X{ Xstatic int telegram_ctr = 0; X /* what character of the telegram buffer we're on */ X X if (*string=='\0') { X buf[0] = '\n'; X telegram_ctr = 1; X } else { X strcpy(buf + telegram_ctr, string); X telegram_ctr += strlen(string); X } X} END_OF_FILE if test 1443 -ne `wc -c <'teleg_send.c'`; then echo shar: \"'teleg_send.c'\" unpacked with wrong size! fi # end of 'teleg_send.c' fi if test -f 'zoom.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'zoom.c'\" else echo shar: Extracting \"'zoom.c'\" \(557 characters\) sed "s/^X//" >'zoom.c' <<'END_OF_FILE' X X/* X * Galactic Bloodshed (Robert Chansky, smq@ucscb.ucsc.edu) X * zoom.c -- zoom in or out for orbit display X */ X X#include "vars.h" X X Xzoom(APcount, argn,args) Xint APcount; Xint argn; Xchar args[MAXARGS][COMMANDSIZE]; X{ X float num,denom; X X if (argn!=2) { X printf("usage: zoom (amount) or zoom (x/y)\n"); X } else { X if (sscanf(args[1], "%f/%f", &num, &denom) == 2) { X /* num/denom format */ X Dir.zoom = num / denom; X } else { X /* one number */ X Dir.zoom = num; X } X } X printf("Zoom value %g, lastx = %g, lasty = %g.\n",Dir.zoom,Dir.lastx,Dir.lasty); X X} END_OF_FILE if test 557 -ne `wc -c <'zoom.c'`; then echo shar: \"'zoom.c'\" unpacked with wrong size! fi # end of 'zoom.c' fi echo shar: End of archive 7 \(of 7\). cp /dev/null ark7isdone MISSING="" for I in 1 2 3 4 5 6 7 ; do if test ! -f ark${I}isdone ; then MISSING="${MISSING} ${I}" fi done if test "${MISSING}" = "" ; then echo You have unpacked all 7 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