#! /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 shell archive."
# Contents:  CE-convert CE-convert/README CE-convert/ce-conv.c
#   CE-convert/ce-conv.doc CE-convert/sample
# Wrapped by kcc@wucs1 on Mon Jan 20 14:05:55 1992
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test ! -d 'CE-convert' ; then
    echo shar: Creating directory \"'CE-convert'\"
    mkdir 'CE-convert'
fi
if test -f 'CE-convert/README' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'CE-convert/README'\"
else
echo shar: Extracting \"'CE-convert/README'\" \(808 characters\)
sed "s/^X//" >'CE-convert/README' <<'END_OF_FILE'
CE-convert Archive
X	version 1.0 (May 8, 1991)
Copyright (C) 1991, Ken Cox, kcc@wucs1.wustl.edu
Distributed as freeware
X
This archive contains a program that reads Cosmic Encounter powers
and flares in a "raw text" format and produces 
X
X------------------------------------------------------------
X
LIST OF FILES
X
README		version 1.0	This file
ce-conv.c	version 1.1	C program for conversion
ce-conv.doc	version 1.1	Documentation, including input format
sample		version 1.1	Sample input to ce-conv
X
X------------------------------------------------------------
X
SEE ALSO
X
The archive "PS-headers" contains the PostScript headers.
X
The archive "PS-examples" contains example uses of most of the PostScript
files; each example can be concatenated onto the end of the corresponding
header and the result printed.
X
END_OF_FILE
if test 808 -ne `wc -c <'CE-convert/README'`; then
    echo shar: \"'CE-convert/README'\" unpacked with wrong size!
fi
# end of 'CE-convert/README'
fi
if test -f 'CE-convert/ce-conv.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'CE-convert/ce-conv.c'\"
else
echo shar: Extracting \"'CE-convert/ce-conv.c'\" \(10414 characters\)
sed "s/^X//" >'CE-convert/ce-conv.c' <<'END_OF_FILE'
X
X/**********************************************************************
X
ce-conv.c
Code copyright 1991 by Ken Cox.  Distributed as Freeware.
X
version 1.0, May 1991
version 1.1, Aug 1991
X
This program reads text descriptions of Cosmic Encounter powers and
their associated Flares from standard input and generates three
files, POWERS.OUT, FLARES.OUT, and FLARES.ONE, containing PostScript.
When the PostScript is combined with the header files powers.ps and
cards.ps (distributed separately), the result can be used to print
power cards and Flares.
X
To compile under UNIX:
X	cc -o ce-conv ce-conv.c
X
To use under UNIX:
X	ce-conv < file
or
X	ce-conv file [file ...]
X
You might need to change the line #include <strings.h> to #include
X<string.h>, depending on your system; under UNIX, look in /usr/include
to see what the string header file is named.  In addition, you might
need to change "strchr" into "index".
X
X**********************************************************************/
X
X
X#include <stdio.h>
X#include <strings.h>
X
X#ifndef VERBOSE
X#define VERBOSE 0
X#endif
X
X#define POWER_OUT_FILE "POWERS.OUT"
X#define FLARE_OUT_FILE "FLARES.OUT"
X#define FLARE_ONE_FILE "FLARES.ONE"
X
static FILE *file_in, *power_out, *flare_out, *one_out, *curr_out;
X
static char line[256];
static char name_buf[64];
static char origin_buf[16];
static char power_buf[64];
static char rest_buf[32];
X
static char *filename;
static int lineno, outstate, power_type;
X
X
X/* TO ADD MORE WORDS THAT WILL BE RECOGNIZED IN "You have the power...",
X * add more entries to the pw_str array.  Each entry uses two strings:
X * the string to look for after the "You have the power", and a string
X * to be emitted in the Flare description.  The second string must be
X * defined in the PostScript header cards.ps; in that file we now have
X *	/PO (Power of) def /PT (Power to) def
X *	/PV (Power over) def /PW (Power) def
X * which define the four strings currently in this array.
X * For example, if you wanted to permit "You have the power in X.", where
X * X is anything, you would do two things:
X *   1)	Add the entry { "in", "PN" } to the array BEFORE the last entry
X *	currently in the array (the { "", "PW" } entry).
X *   2)	Add the definition /PN (Power in) def to cards.ps.
X */ 
X
static struct {
X	char *search_string;
X	char *print_string;
X	int len;
X} pw_str[] = {
X	{ "of", "PO" },
X	{ "to", "PT" },
X	{ "over", "PV" },
X	{ "", "PW" },
X};
X#define NPOWER_STRINGS (sizeof(pw_str)/sizeof(pw_str[0]))
X
main(argc,argv)
int argc;
char **argv;
X{
int i;
X
X	power_out = fopen(POWER_OUT_FILE,"w");
X	flare_out = fopen(FLARE_OUT_FILE,"w");
X	one_out = fopen(FLARE_ONE_FILE,"w");
X
X	if (power_out == (FILE *)NULL || flare_out == (FILE *)NULL ||
X	    one_out == NULL) {
X		fprintf(stderr,"Can't open output file(s)\n");
X		exit(1);
X	}
X	for (i = 0; i < NPOWER_STRINGS; i++)
X		pw_str[i].len = strlen(pw_str[i].search_string);
X
X	fprintf(power_out,"\nSetup\n");
X	fprintf(flare_out,"\n/OneShotFlares false def\nSetup\n");
X	fprintf(one_out,"\n/OneShotFlares true def\nSetup\n");
X
X	if (argc > 1) {
X		while (argc > 1) {
X			argc--; argv++; filename = *argv;
X			if ((file_in = fopen(filename,"r")) != NULL) {
X#if VERBOSE > 2
X				fprintf(stderr,"opening %s\n",filename);
X#endif
X				lineno = 0; outstate = 0;
X				read_file();
X				fclose(file_in);
X			} else {
X				fprintf(stderr,"warning: can't open %s\n",filename);
X			}
X		}
X	} else {
X		file_in = stdin; filename = "stdin";
X#if VERBOSE > 2
X		fprintf(stderr,"opening %s\n",filename);
X#endif
X		lineno = 0; outstate = 0;
X		read_file();
X	}
X	fprintf(power_out,"\nFinished\n"); fclose(power_out);
X	fprintf(flare_out,"\nFinished\n"); fclose(flare_out);
X	fprintf(one_out,"\nFinished\n"); fclose(flare_out);
X	exit(0);
X}
X
read_file()
X{
int found_flare;
X
X	line[0] = '\0';
X	curr_out = power_out;
X	get_header();
X
X	for (;;) {
X		curr_out = power_out;
X		if (!get_power_line()) return;
X		get_power_text();
X		get_paragraph("History: ",1);
X		get_paragraph("Restriction: ",1);
X		fprintf(curr_out,"(%s) {} Power\n",rest_buf);
X
X		do {
X			found_flare = 0;
X			while (line[0] == '\0')
X				if (!getline()) return;
X
X			if (!strncmp(line,"Wild: ",6)) {
X				get_flare(flare_out,"Wild: ","Super: ");
X				found_flare = 1;
X			} else if (!strncmp(line,"Wild1: ",7)) {
X				get_flare(one_out,"Wild1: ","Super1: ");
X				found_flare = 1;
X			}
X		} while (found_flare);
X	}
X}
X
int getline()
X{
X	lineno++;
X	if (fgets(line,256,file_in) == NULL) return(0);
X#if VERBOSE > 8
X	fprintf(stderr,"%s\n",line);
X#endif
X	if (line[0] == '\t' || line[0] == ' ' || line[0] == ';' || line[0] == '\n')
X		line[0] = '\0';
X	return(1);
X}
X
X
X
outline(s)
char *s;
X{
X	while (*s) {
X		if (*s < ' ') {
X			if (*s == '\t')
X				fprintf(curr_out,"\\t");
X			else if (*s != '\n')
X				fputc(' ',curr_out);
X		} else
X		switch (*s) {
X		case '(':	fprintf(curr_out,"\\("); break;
X		case ')':	fprintf(curr_out,"\\)"); break;
X		case '%':	fprintf(curr_out,"\\%%"); break;
X		case '"':	fprintf(curr_out,outstate?"\\272":"\\252");
X				outstate = !outstate;
X				break;
X		case '-':	if (*(s+1) == '-') {
X					fprintf(curr_out,"\\261");
X					s++;
X				} else fputc('-',curr_out);
X				break;
X		case '.':	if (*(s+1) == '.' && *(s+2) == '.') {
X					fprintf(curr_out,"\\274");
X					s += 2;
X				} else fputc('.',curr_out);
X				break;
X		case '\\':	s++;
X				if (*s >= '0' && *s <= '7' &&
X				    *(s+1) >= '0' && *(s+1) <= '7' &&
X				    *(s+2) >= '0' && *(s+2) <= '7') {
X					fprintf(curr_out,"\\%c%c%c",*s,*(s+1),*(s+2));
X					s += 2;
X				} else
X				switch(*s) {
X				case '\0':	return;
X				case '\\':	fprintf(curr_out,"\\\\"); break;
X				case 'r':	fprintf(curr_out,"\\r"); break;
X				case 'n':
X				case ' ':	fputc(' ',curr_out); break;
X				case 't':	fprintf(curr_out,"\\t"); break;
X				case 'l':	fprintf(curr_out,"\\243"); break;
X				case '*':
X				case 'b':	fprintf(curr_out,"\\267"); break;
X				case '-':	fprintf(curr_out,"\\320"); break;
X				default:	fprintf(curr_out,"\\\\%c",*s); break;
X				}
X				break;
X		default:	fputc(*s,curr_out);
X		};
X		s++;
X	}
X}
X
capitalize(s)
char *s;
X{
int firstofword;
X
X	for (firstofword = 1; *s; s++) {
X		if (firstofword && *s >= 'a' && *s <= 'z') {
X			if (strncmp(s,"and ",4) && strncmp(s,"or ",3) &&
X			    strncmp(s,"the ",4) && strncmp(s,"a ",2))
X				*s += 'A'-'a';
X			firstofword = 0;
X		}
X		else if (*s >= 'A' && *s <= 'Z') firstofword = 0;
X		else if (*s == ' ' || *s == '-') firstofword = 1;
X	}
X}
X
leave(s)
char *s;
X{
X	fprintf(power_out,"\nFinished\n"); fclose(power_out);
X	fprintf(flare_out,"\nFinished\n"); fclose(flare_out);
X	fprintf(one_out,"\nFinished\n"); fclose(flare_out);
X	fprintf(stderr,"\n%s line %d: %s\n",filename,lineno,s);
X	exit(1);
X}
X
get_substring(s,d,term)
char **s, *d, term;
X{
X
X	while (**s == ' ') (*s)++;
X	while (**s != term) {
X		if (!**s) leave("Missing substring terminator (' ' or '.')\n");
X		*d = *(*s)++;
X		d++;
X	}
X	*d = '\0';
X}
X
get_header()
X{
char *s;
X
X	fprintf(power_out,"\nStringsDict begin\n");
X	for (;;) {
X		outstate = 0;
X		while (line[0] == '\0')
X			if (!getline()) break;
X		if (line[0] != '#') break;
X		s = &line[1];
X		while (*s && *s != ' ' && *s != '\t') s++;
X		*s++ = '\0';
X		fprintf(power_out,"/Set%s (",&line[1]);
X		while (*s == ' ' || *s == '\t') s++;
X		outline(s);
X		fprintf(power_out,") def\n");
X		line[0] = '\0';
X	}
X	fprintf(power_out,"end\n");
X}
X
get_power_line()
X{
char *s;
int i;
X
X	outstate = 0;
X	while (line[0] == '\0')
X		if (!getline())
X			return 0;
X
X	s = line;
X
X	get_substring(&s,name_buf,'\t');
X	fprintf(curr_out,"(%s)",name_buf);
X
X#if VERBOSE > 0
X	fprintf(stderr,"%s\n",name_buf);
X#endif
X
X	while (*s && *s != '[') s++;
X	if (*s++ != '[') leave("expected [");
X
X	if (*s == 'M')
X		fprintf(curr_out," Mandatory ");
X	else if (*s == 'O')
X		fprintf(curr_out," Optional ");
X	else if (*s == 'B')
X		fprintf(curr_out," Both ");
X	else
X		leave("expected M, O, or B");
X
X	if (*++s != ':') leave("expected :");
X
X	for (i = 0, s++; *s && *s != ':' && *s != ']'; origin_buf[i++] = *s++)
X		if (*s <= ' ' || *s > '~' || strchr("()<>[]{}/%",*s) != NULL)
X			leave("illegal character in origin string");
X	if (!*s) leave("expected : or ] after origin string");
X	origin_buf[i] = '\0';	
X	fprintf(curr_out,"Set%s ",origin_buf);
X
X	if (*s == ':') {
X		for (s++, i = 0; *s && *s != ']'; s++,i++)
X			rest_buf[i] = *s;
X		rest_buf[i] = '\0';
X	} else rest_buf[0] = '\0';
X	if (*s != ']') leave("expected ]");
X
X	s++;
X	while (*s == ' ' || *s == '\t') s++;
X	if (!*s) leave("expected brief description");
X
X	putc('(',curr_out); outline(s); putc(')',curr_out);
X
X	line[0] = '\0';
X	return 1;
X}
X
get_power_text()
X{
char *s;
int i;
X
X#if VERBOSE > 8
X	fprintf(stderr,"Of/To/Two/Etc.:\n");
X#endif
X
X	outstate = 0;
X	while (line[0] == '\0')
X		if (!getline())
X			leave("no power text");
X
X	if (strncmp(line,"You have the power ",19))
X		leave("no \"You have the power\"");
X	s = line+19; while (*s && *s == ' ') s++;
X
X	for (power_type = -1, i = 0; i < NPOWER_STRINGS; i++) {
X		if (!strncmp(s,pw_str[i].search_string,pw_str[i].len)) {
X			power_type = i;
X			fprintf(curr_out," (power %s",pw_str[i].search_string);
X			if (pw_str[i].len != 0) fprintf(curr_out," ");
X			s += pw_str[i].len;
X			break;
X		}
X	}
X	if (power_type == -1) leave("no power to/of/over/etc.");
X	get_substring(&s,power_buf,'.');
X
X#ifdef CAPITALIZE
X	capitalize(power_buf);
X#endif
X
X	outline(power_buf);
X
X#if VERBOSE > 8
X	fprintf(stderr,"Text:\n");
X#endif
X	while (*s == '.' || *s == ' ') s++;
X	fprintf(curr_out,")\n(");
X	outline(s);
X	while (getline()) {
X		if (line[0] == '\0') {
X			fprintf(curr_out,")\n");
X			return;
X		}
X		fprintf(curr_out," \\\n");
X		outline(line);
X	}
X}
X
get_paragraph(hdr,optional)
char *hdr;
int optional;
X{
char *s;
int hdrlen;
static char errbuf[64];
X
X#if VERBOSE > 8
X	fprintf(stderr,"%s\n",hdr);
X#endif
X
X	outstate = 0;
X	while (line[0] == '\0')
X		if (!getline()) {
X			sprintf(errbuf,"missing %s paragraph",hdr);
X			leave(errbuf);
X		}
X
X	hdrlen = strlen(hdr);
X	if (strncmp(line,hdr,hdrlen)) {
X		if (optional) {
X			fprintf(curr_out,"() ");
X			return;
X		}
X		sprintf(errbuf,"no %s",hdr);
X		leave(errbuf);
X	}
X	s = line+hdrlen;
X	while (*s == ':' || *s == ' ') s++;
X
X	fprintf(curr_out,"(");
X	outline(s);
X	while (getline()) {
X		if (line[0] == '\0') break;
X		fprintf(curr_out," \\\n");
X		outline(line);
X	}
X	line[0] = '\0';
X	fprintf(curr_out,")\n");
X}
X
get_flare(fp,s1,s2)
XFILE *fp;
char *s1, *s2;
X{
X	curr_out = fp;
X	capitalize(power_buf);
X	fprintf(curr_out,"(%s) [ %s (%s) ] (%s)\n",name_buf,
X		pw_str[power_type].print_string,
X		power_buf, rest_buf);
X	get_paragraph(s1,0);
X	get_paragraph(s2,0);
X	fprintf(curr_out,"{} Flare\n");
X}
END_OF_FILE
if test 10414 -ne `wc -c <'CE-convert/ce-conv.c'`; then
    echo shar: \"'CE-convert/ce-conv.c'\" unpacked with wrong size!
fi
# end of 'CE-convert/ce-conv.c'
fi
if test -f 'CE-convert/ce-conv.doc' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'CE-convert/ce-conv.doc'\"
else
echo shar: Extracting \"'CE-convert/ce-conv.doc'\" \(9842 characters\)
sed "s/^X//" >'CE-convert/ce-conv.doc' <<'END_OF_FILE'
Documentation for ce-conv.c
X	version 1.0, May 1991
X	version 1.1, Aug 1991
X
The program ce-conv reads text descriptions of Cosmic Encounter powers
and their associated Flares either from standard input or from a list
of files given on the command line and generates three files, POWERS.OUT,
XFLARES.OUT, and FLARES.ONE, which contain PostScript.  When the PostScript
is combined with the header files powers.ps and cards.ps (distributed
separately), the result can be used to print power cards and Flares.
X
X
MAJOR CHANGES IN VERSION 1.1
X----------------------------
X
Several bugs fixed.
X
Ability to process multiple files from command line (re-direction can
also be used).
X
Ability to define power origin strings in the file.
X
Power origin is now a string of up to 15 characters.
X
Alien histories now optional.
X
XEach power may have any number of Flares (each generating a card in the
final PostScript).  Each Flare is either multiple-use (Eon) or one-shot
X(Mayfair); the two types are emitted into separate files.
X
X
USAGE
X-----
X
To compile under UNIX:
X	cc -o ce-conv ce-conv.c
X
To use under UNIX:
X	ce-conv < file
or
X	ce-conv file [file ...]
X
Abnormal exit conditions are indicated by an error message with the
file and line number.
X
Don't ask me about other systems.  It's all (pre-ANSI) C, using only
the stdio library for input, output, and file creation; it should run
on any box with a C compiler, but I'm not guaranteeing anything.
X
X
INPUT FILE FORMATS
X------------------
X
XEach input file consists of a header followed by a number of text records.
All blank lines and lines beginning with a space, tab, or semicolon act
as separators and are ignored; they may be used as comments.  Lines are
limited to 256 characters.
X
X
HEADER
X------
X
The header consists of a number of string definitions, one per line.
These definitions (suitably processed) will be included in the PostScript
for the power file; the intent is that they be used to define power
origin strings.
X
XEach string definition appears on a single line, with the form:
X
X	#origin string
X
The '#' symbol must appear in the first column.  This is immediately
followed (no intervening spaces) by a sequence of up to 15 characters
which gives the origin, a single space, and an arbitrary sequence of
characters terminated by the end of the line.  The effect is to cause
PostScript which defines the name Setorigin to be the string.  For
example, the line
X
X	#Ev2n1 Encounter 2.1
X
will translate into the PostScript
X
X	/SetEv2n1 (Encounter 2.1) def
X
WARNING:  Do not use "up" as an origin.  It will interfere with the
routine "Setup" and the effects are unpredictable.
X
X
POWER DESCRIPTION FORMAT
X------------------------
X
XFollowing the header are a number of text records, each describing a
Power.  Each record consists has two mandatory and two optional components
followed by zero or more Flare descriptions, each having two components.
Records and components within records are separated by blank lines or
lines beginning with a space, tab, or semicolon.
X
The first mandatory component is the power line.  This is a single line
with the form
X
POWERNAME	[T:Origin:R]  POWER DESCRIPTION
X
The POWERNAME is the Alien name, for example AMOEBA.  The name begins
in the first column and is terminated by a tab character (additional
tabs and spaces may be included after the tab character).  The name
may contain several words separated by spaces.
X
The '[' character begins the description of the power type and origin.
The character T should be replaced with M (mandatory power), O (optional),
or B (both).  The word Origin should be replaced with a string of from
one to fifteen characters identifying the Power's origin.  The digits 0
through 9 are used for the Eon set (0 representing the original 15 Aliens),
and I have taken the strings W and WashU for "Washington U".  All other
strings are free, but do not use any of ()<>[]{}/:%, or whitespace, or
non-printable ASCII.  Also, when you use a new origin string, you must
either define the string in the file header (see above) or edit the
powers.ps file and define a PostScript string named "Set%", where % is
replaced by the origin string; for example, to use the W I added the line
X
X	/SetW (Washington U) def
X
to cards.ps; I could also have added the line
X
X	#W "Washington U"
X
to the header of the input file to CE-convert. 
X
The :R section is optional; if present, it lists use restrictions for 
the power.  The R is replaced with one or more symbols from the following:
X
X	2	Do not use in a two-player game
X	A	UOW (use only with) Asteroids
X	D	UOW Special Destiny
X	F	UOW Flares
X	H	UOW Hazards
X	K	UOW Kickers
X	L	UOW Lucre
X	M	UOW Moons
X	N	UOW Multiple powers ("N"-power game)
X	P	UOW Prisoners
X	T	UOW Technology
X
These symbols are used only for the (optional) placement of small icons
on Power cards and Flares to indicate the restriction.  They should not
be confused with the use restrictions printed on the power cards.
X
After the ']' character are zero or more spaces or tabs, followed by the
short power description, for example UNLIMITED TOKEN MOVEMENT.  This
description is terminated by the end of the line.
X
X
The second mandatory component is the long power description.  This
description must begin with "You have the power ", which is followed by
one of "to", "of", "over", or " ", which is followed by the short power
description terminated by a period (i.e., "You have the power to ooze.").
This must all appear on a single line; additional text can follow it on
the line.  The strings "to", "of", "over", and " " are defined in a
structure at the beginning of ce-conv.c.  Strings may be added to this
structure; corresponding PostScript strings must be defined in cards.ps.
X
You should give the really short description in lower case; the leading
letters of words in this description (other than "and", "or", "the", "a")
will be converted to upper case for the Flare.  Thus, "power to ooze" is
printed on Flares as "Power to Ooze", while "power to store and discharge"
becomes "Power to Store and Discharge".  If you #define CAPITALIZE in
ce-conv.c this will also be done for the Power card.
X
XFollowing the opening sentence is a paragraph describing the use of the
power.
X
X
The third component is the history.  This component is optional, but if
present must come after the paragraph describing the power.  If present,
this component begins with "History: " (note space after colon) with the
H in the first column and continues with another paragraph of text.
X
X
The final component of the power is the use restrictions (e.g, "Use only
in a game with Lucre!").  This component is optional, but if present must
come after the History component.  If present, this component begins with
X"Restriction: " and continues with a paragraph.
X
X
XFLARE DESCRIPTION FORMAT
X------------------------
X
XFollowing the components of the power are zero or more Flare descriptions.
XEach Flare description has two components, a Wild Flare and a Super Flare.
XEach component begins with a keyword which must start in the first column
of the line and continues with a paragraph.
X
There are two types of Flares, multiple-use (Eon-style) and one-shot
X(Mayfair-style); these are distinguished by the keywords beginning the
paragraphs.  Multiple-use Flares start with "Wild: " and "Super: ",
while one-shot Flares start with "Wild1: " and "Super1: ".  You cannot mix
the two types; a Wild must be followed by a Super, and a Wild1 by a Super1.
A power may have any combination of Flares, including several Wild and
Super Flares of each type; this will simply result in several cards for
the power.  The multiple-use Flares go in the FLARES.OUT file, and the
one-shot Flares go in the FLARES.ONE file.
X
X
X
OUTPUT FILE FORMATS
X-------------------
X
Three files named POWERS.OUT, FLARES.OUT, and FLARES.ONE are created when
the program is run.  The first contains PostScript for the Powers in a form
suitable for use with powers.ps.  The second contains PostScript for the
multiple-use Flares in a form suitable for use with cards.ps, and the third
contains the one-shot Flares.  These formats are documented separately.
Note that either or both of the FLARES files may be (effectively) empty,
depending on what Flares are actually present in the file.
X
X
CHARACTER CONVERSIONS
X---------------------
X
All text is converted into PostScript strings.  The following special
interpretations are performed:
X
The sequence -- is converted into en dash (PostScript \261).
The sequence ...  is converted into ellipsis (\274).
X
Double quotes " are converted into balanced sets of open and close
double quotes (\252 and \272).  This is strictly a toggle; given the
phrase 'Don said, "Bill said, "I saw it""', ce-conv will NOT balance
the quotes in the correct pattern.
X
Newlines and the sequences "\ " and "\n" are converted into spaces.
X
Tabs and the sequence "\t" are converted into "\t".  When printed,
tabs have a width of three spaces.
X
The sequence "\r" is passed unchanged.  This generates a carriage return
in the final string, which when "typeset" by the routines in cards.ps
and powers.ps starts a new line.
X
The sequence "\l" is converted into pounds sterling (\243) (lucre).
The sequences "\b" and "\*" are converted into bullet (\267).
The sequence "\-" is converted into em dash (\320).
X
The sequence \xxx, where xxx is three octal digits, is passed through
without interpretation; this can be used to put specific PostScript
characters into the strings.  See the Adobe manuals for the character
encodings; the routines use the PostScript standard text encodings.
X
A double backslash "\\" is output unchanged; this produces a single
backslash in the final print.
X
A backslash followed by any other character is converted into a double
backslash (followed by the same character).  This will produce a single
backslash (and the character) in the final print.
X
END_OF_FILE
if test 9842 -ne `wc -c <'CE-convert/ce-conv.doc'`; then
    echo shar: \"'CE-convert/ce-conv.doc'\" unpacked with wrong size!
fi
# end of 'CE-convert/ce-conv.doc'
fi
if test -f 'CE-convert/sample' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'CE-convert/sample'\"
else
echo shar: Extracting \"'CE-convert/sample'\" \(6499 characters\)
sed "s/^X//" >'CE-convert/sample' <<'END_OF_FILE'
X
X; Sample input for ce-conv.  version 1.1, Aug 20 1991
X
X; Header -- define the origin strings WashU and Ev2n1
X#WashU Washington U
X#Ev2n1 Encounter 2.1
X
X
X; First power -- the AUCTIONEER.  The first line gives the alien name
X; and some other information.  Syntax note -- there is a tab character
X; after the letter R in AUCTIONEER.  This power is "M"andatory, it came
X; originally from "Wash"ington "U"niversity (the string WashU is defined
X; above), and it should only be used with "L"ucre.  A blank line follows
X; the first line, then the description of the power effects is given,
X; starting with the "You have the power" phrase.  This power has a
X; History, a Restriction, and two Flares, the first multiple-use and
X; the second one-shot.
X
X
AUCTIONEER	[M:WashU:L]	AUCTIONS CARD FOR LUCRE
X
You have the power to auction. Before the start of each player's turn,
take the top card of the deck, place it face up in front of you, and
auction it for Lucre. All bids must be at least one Lucre, and you cannot
prevent any of the other players from participating; however, you cannot
bid. The high bidder pays you and takes the card for his hand. If no one
bids, you may take the card for your own hand or discard it.
X
History: A resource crunch on their home worlds led to fierce competition
among Auctioneers for the remaining materials. Those Auctioneers who
controlled the dwindling supplies enriched themselves from the desperate
struggles of their fellows. Contact with other races alleviated the
shortages, but the Auctioneers remain quick to exploit the need of
others to enrich themselves.
X
Restriction: Use only in a game with Lucre!
X
Wild: Between challenges, you may auction a base on any planet where
you have one. You may not prevent any player from participating in the
auction. High bidder pays you in Lucre, then puts one of his tokens
from any planet onto the base. Use once and discard.
X
Super: When you auction, take the top card of the deck and put it in
your hand. Then select any card from your hand and auction it. If no one
bids on the card, you may keep it or discard it.
X
Wild1: Between challenges, you may auction a base on any planet where
you have one. You may not prevent any player from participating in the
auction. High bidder pays you in Lucre, then puts one of his tokens
from any planet onto the base.
X
Super1: When you auction, you may look through the deck, select any three
cards, and auction them separately (reveal each card only after the
previous card has been sold). If no one bids for a card, you may keep it.
Shuffle the deck after the auctions are completed.
X
X
X
X; Second power, the BUSYBODY, should not be used in a "2"-player game.
X; This is the version that appeared in Encounter vol 2 no 1.
X
BUSYBODY	[O:Ev2n1:2]	CAN REPLACE A CHALLENGE CARD
X
You have the power to meddle.  In any challenge in which you are not a main
player or an ally, you may look at either player's Challenge card after it
is played and before it is revealed.  You may then trade that card for one
from your hand.  If you trade the card and the player wins the challenge or
makes a deal, you receive a reward of one card from the deck or one token
from the Warp for every token the player had in the challenge.  If you
trade and the player loses the challenge or fails to deal, you lose the
same number of tokens to the Warp as he does; you select which of your
tokens are lost.
X
History: The Busybodies evolved from social insects; in addition to having
absolutely no concept of privacy, they take the notion of "pitching in"
to extremes.  If a Busybody sees someone involved in a task, it will drop
whatever it is doing and lend a pedicel.  The Busybodies' goal is to obtain
a position of dominance from which they can interfere with the affairs of
the entire Cosmos.
X
Restriction: Do not use in a two-player game.
X
Wild: Once per turn, when you are not a main player, you may switch the
regular hands of two other players that currently have cards (they keep the
new hands).
X
Super: If you interfere with a player and he loses, you do not lose any
tokens.
X
Wild1: When you are not a main player, you may switch the regular hands of
two other players that currently have cards (they keep the new hands).
X
Super1: If you interfere with a player and he loses, you do not lose any
tokens.
X
X
X
X; Third power, the FUGUE.  The blank line after this power (at the end of
X; the file) is required for the CE-convert program.
X
X
XFUGUE		[M:WashU]	SWITCHES AMONG SEVERAL POWERS
X
You have the power of multiple personalities. After powers are distributed,
randomly select and stack 5 unused powers. If you draw any powers requiring
special setup (Schizoid, Miser, Aristocrat, Terrorist, etc.), replace them
with other powers drawn randomly. In each challenge where you are a main
player (before beginning the challenge as offensive player, or when you are
determined to be the defensive player) you switch personalities. Move the
top power in the stack to the bottom and play the challenge using the new
top power. You continue to use the top power until the next challenge
in which you are a main player. If your power is copied, the copier
uses the top power in your stack. If one of your stacked powers is the
Changeling, you swap the Fugue power and stack when you use the Changeling.
If you temporarily lose use of this power, keep the stack but do not use
any powers. You use the Super Flare for the Fugue power, but the Wild
XFlare for powers in your stack, even when they are on top of the stack.
X
History: Contact with aliens destroyed the Fugue belief that they were
unique and special in the universe. Now, stress causes the Fugue to change
personalities in a desperate attempt to cope. The Fugue's greatest dream
is to shatter the Cosmos that has so injured them, and from its shards
re-build a more congenial home for their race.
X
Wild: You may discard any of your powers and draw a new one at random
from the unused powers. Use this Flare once and discard.
X
Super: You may change personalities at the start of each challenge, whether
you are a main player or not. When you choose to change personalities,
select any power in your stack that differs from the top one. You may
change personalities only once per challenge.
X
Wild1: You may discard any one of your powers and draw a new one at random
from the unused powers.
X
Super1: As a main player in a challenge, you may use all of the powers in
your stack.  When you use this Flare, you must use any mandatory powers
in your stack.
END_OF_FILE
if test 6499 -ne `wc -c <'CE-convert/sample'`; then
    echo shar: \"'CE-convert/sample'\" unpacked with wrong size!
fi
# end of 'CE-convert/sample'
fi
echo shar: End of shell archive.
exit 0

