[net.sources.bugs] Rog-O-Matic bug fixes

mlm@cmu-cs-cad.ARPA (Michael Mauldin) (02/06/85)

#!/bin/sh
#
# This is a shell archive.  Don't you get tired of mail thats starts with
# this hackneyed phrase?  Anyway, you can use "unshar" to pick this apart,
# or jest rip the mail header plum off and pipe the whole blessed thing
# through the "sh" command.
# 
# > I had, however, all kinds of minor problems with the auxiliary files
# > and binaries. These are badly or incorrectly documented, and do not work.
# 
# Guilty as charged.  There is also a bug with the armor handling: seems
# Rog-O-Matic likes to run around naked once he gets to Level 8 (sounds
# like net.rec.nude).  Anyway, this message contains three files:
# 
# 	Bugreport		A new Bugreport file
# 	mod.1.sh		a diff -e script
# 	mod.1.context		a diff -c script
# 
# If you have your original distribution and haven't changed anything
# except makefile and install.h, then just cd to the original directory
# and type "sh mod.1.sh" followed by "make" to get the changes.
# 
# If you have changed any files, then you should read the file
# "mod.1.context" and make the changes manually.
# 
# Changes:
# 
# 	fixed the armor bug
# 	fixed the ancilliary commands (rplot and histplot)
# 	documented the ancilliary commands (rplot, histplot, gene)
# 
# Share and Enjoy!
# 
# Michael Mauldin (Fuzzy)		Department of Computer Science
# (412) 578-3065			Carnegie-Mellon University
# mauldin@cmu-cs-a.arpa			Pittsburgh, PA  15213
#
echo 'Start of Rog-O-Matic modifications (Feb 5, 1985):'
echo 'x - Bugreport'
sed 's/^X//' > Bugreport << '/'
X/*
X * Bugreport: Rog-O-Matic XIV (CMU) Wed Feb  6 10:54:05 1985 - mlm
X * Copyright (C) 1985 by A. Appel, G. Jacobson, L. Hamey, and M. Mauldin
X */
X
X1. fails to wear any armor below level 7.
X
X	things.c:willrust()		changed itemis(PROTECTED)
X	tactics.c:handlearmor()		dont worry about cursed armor
X
X
X2. histplot and rplot are flaky (reported by AEB (play@turing)).
X
X	rplot				removed file name
X	gene.c				fixed "Usage" message
X	histplot.c			fixed bugs
X	README				documented ancilliary functions
X
X3. utility.c uses "getpw (getuid (), name)", which according to
X   Rick Adams @ Seismo is obsolete.  no fix made here.  Caveat Emptor!
X
/
echo 'x - mod.1.sh'
sed 's/^X//' > mod.1.sh << '/'
Xed - README << '-*-END-*-'
X124a
X
X4.1 SCOREFILES
X
XFor each version of Rogue the systems has played, their are 2 score
Xfiles: $RGMDIR/rgmdelta<version> and $RGMDIR/rgmscore<version>.  As
Xeach game is played, the score is appended to the DELTA file.  Whenever
Xthe -s option is given, a check is made for the DELTA file.  If new
Xscores exist, they are sorted and a new SCORE file is created. Then
Xthe score file is printed on stdout.
X
X4.2 READING THE SOURCE
X.
X123a
X    Options:	-i	Initial a new gene pool
X		-f	Full listing, shows gene values and scores
X		-mNN	Max gene pool size (limit of 100, learn.c:MAXM)
X		-s	Random number seed for new gene pool (-i option)
X		-v	Version to list/initial (one of 361,362,521,522,531)
X
X.
X122c
X    "gene" summarizes and initializes the current gene pool.
X    
X    Usage:	gene [ -f ] [ -v<value> ]	Read gene pool
X	or	gene -i [ -msv<value> ]		Create new gene pool
X.
X119a
X    Usage:	rogomatic -s [ version ] | histplot [ -acl ]
X
X    Options:	-aNNNN	Include only scores above NNNN
X		-c	Include cheating games ( 3.6 only )
X		-l	Plot level instead of score
X
X.
X113a
X    Usage:	rogomatic -s [ version ] | rplot [ -ac ] [ minimum ]
X
X    Options:	-a	Include rolling average
X		-c	Include scores obtained by cheating ( 3.6 only )
X		[ min ]	Include only scores above min.
X	
X.
X107a
X    Usage:	rogomatic [-ceuw]			Play a game
X	of	rogomatic -f game_file			Play against game_file
X	or	rogomatic -r [ rogue_save_file ]	Start saved game
X	or	rogomatic -p [ game_log ]		Replay game log
X    	or	rogomatic -s [ version ]		Show scores
X
X	-c	Cheat (look for magic arrows, version 3.6 only)
X	-e	Echo, log the game into a file
X	-u	Start up in user (transparent mode)
X	-w	Watched (Rog-O-Matic can ask user for help when stuck -- rare)
X	-f	next argument is the location of the Rogue game, eg:
X			rogomatic -f /usr/games/rogue
X	-r	Start a saved game, if next argument is given, it is the
X		location of the Rogue save file.
X	-p	Replay a Rog-O-Matic log file (created using the -e
X		option).  If next argument is given it is the name of
X		the log file. The default is "roguelog". Eg:
X			rogomatic -p drag.24.7361
X	-s	List Rog-O_Matic's scorefile.  Version must be one
X		of (3.6, 5.2, 5.3).  Defaults to install.h:DEFVER.
X
X.
X2c
X* README: Rog-O-Matic XIV (CMU) Tue Feb  5 14:04:02 1985 - mlm
X.
Xw
Xq
X-*-END-*-
Xed - gene.c << '-*-END-*-'
X34c
X	otherwise:	quit (1, "Usage: gene [-if] [-msv<value>]\n");
X.
X2c
X * gene.c: Rog-O-Matic XIV (CMU) Tue Feb  5 14:10:05 1985 - mlm
X.
Xw
Xq
X-*-END-*-
Xed - histplot.c << '-*-END-*-'
X165,166c
X        !stlmatch ("saved", killer) &&
X        (*score > 2000 || !stlmatch ("user", killer)))
X.
X161c
X            mmstr, &dd, &yy, player, score, &cheated, killer);
X.
X69,82c
X    if (stlmatch ("arrow", killer))			killnum = 1;
X    else if (stlmatch ("black unicorn", killer))	killnum = 'u'-'a'+2;
X    else if (stlmatch ("bolt", killer))			killnum = 1;
X    else if (stlmatch ("dart", killer))			killnum = 1;
X    else if (stlmatch ("fatal error trap", killer))	killnum = 0;
X    else if (stlmatch ("floating eye", killer))		killnum = 'e'-'a'+2;
X    else if (stlmatch ("gave", killer))			killnum = 0;
X    else if (stlmatch ("giant ant", killer))		killnum = 'a'-'a'+2;
X    else if (stlmatch ("hypothermia", killer))		killnum = 'i'-'a'+2;
X    else if (stlmatch ("quit", killer))			killnum = 28;
X    else if (stlmatch ("starvation", killer))		killnum = 'e'-'a'+2;
X    else if (stlmatch ("user", killer))			killnum = 0;
X    else if (stlmatch ("venus flytrap", killer))	killnum = 'f'-'a'+2;
X    else if (stlmatch ("violet fungi", killer))		killnum = 'f'-'a'+2;
X.
X45c
X        default:  printf ("Usage: histplot [-cl] [-aNNNN]\n");
X.
X6a
X *
X * HISTORY
X * 05-Feb-85  Michael Mauldin (mlm) at Carnegie-Mellon University
X *	Added bugs fixes found by AEB (play@turing).
X.
X2c
X * histplot.c: Rog-O-Matic XIV (CMU) Tue Feb  5 13:55:16 1985 - mlm
X.
Xw
Xq
X-*-END-*-
Xed - main.c << '-*-END-*-'
X607a
X
X        case ']': clear (); havearmor (1, DOPRINT, RUSTPROOF);
X		  pauserogue (); break;
X.
X2c
X * main.c: Rog-O-Matic XIV (CMU) Sun Feb  3 17:00:25 1985 - mlm
X.
Xw
Xq
X-*-END-*-
Xed - rgmplot.c << '-*-END-*-'
X105,106c
X  printf ("\t\t|----+----|----+----|----+----|----+----|----+----|\n");
X  printf ("\t\t0      2000      4000      6000      8000     10000\n");
X.
X101c
X      lastday = dd; lastmon = mm; lastyy = yy;
X.
X84c
X      printf ("%3s %2d %4d\t%s\n", month[lastmon-1], lastday, lastyy, plot);
X.
X61c
X    if ((dd != lastday || mm != lastmon || yy != lastyy) && lastday > 0)
X.
X49,51c
X    printf ("\t\t              Scores greater than %d\n\n", min);
X  printf ("\t\t0      2000      4000      6000      8000     10000\n");
X  printf ("\t\t|----+----|----+----|----+----|----+----|----+----|\n");
X.
X47c
X  printf ("\t\t   Scatter Plot of Rog-O-Matic Scores versus time\n\n");
X.
X24c
X{ int mm, dd, yy, score = 0, lastday = -1, lastmon = -1, lastyy = -1, h;
X.
X2c
X * rgmplot.c: Rog-O-Matic XIV (CMU) Tue Feb  5 15:00:59 1985 - mlm
X.
Xw
Xq
X-*-END-*-
Xed - rplot << '-*-END-*-'
X1c
X#!/bin/sh
X#
X# rplot: Rog-O-Matic XIV (CMU) Tue Feb  5 13:52:48 1985 - mlm
X# Copyright (C) 1985 by A. Appel, G. Jacobson, L. Hamey, and M. Mauldin
X#
Xcolrm 48 | datesub | sort -u +2n +0n +1n +4n +5 | rgmplot $*
X.
Xw
Xq
X-*-END-*-
Xed - tactics.c << '-*-END-*-'
X55,59c
X  if (obj != NONE && armorclass (obj) > 9) 
X.
X2c
X * tactics.c: Rog-O-Matic XIV (CMU) Sat Feb  2 13:01:25 1985 - mlm
X.
Xw
Xq
X-*-END-*-
Xed - things.c << '-*-END-*-'
X484c
X{ return (! (protected ||
X	     armorclass (obj) > 8 || armorclass (obj) < -5 ||
X.
X2c
X * things.c: Rog-O-Matic XIV (CMU) Sat Feb  2 13:02:28 1985 - mlm
X.
Xw
Xq
X-*-END-*-
/
echo 'x - mod.1.context'
sed 's/^X//' > mod.1.context << '/'
Xdiff -c packold/README packnew/README
X*** packold/README	Wed Feb  6 11:40:39 1985
X--- packnew/README	Tue Feb  5 16:39:24 1985
X***************
X*** 1,5
X  ************************************************************************
X! * README: Rog-O-Matic XIV (CMU) Tue Jan 29 15:02:02 1985 - mlm
X  * Copyright (C) 1985 by A. Appel, G. Jacobson, L. Hamey, and M. Mauldin
X  ************************************************************************
X  
X
X--- 1,5 -----
X  ************************************************************************
X! * README: Rog-O-Matic XIV (CMU) Tue Feb  5 14:04:02 1985 - mlm
X  * Copyright (C) 1985 by A. Appel, G. Jacobson, L. Hamey, and M. Mauldin
X  ************************************************************************
X  
X***************
X*** 105,110
X      Rogomatic parses the arguments and forks and execs Rogue and Player.
X      For more information about the "rogomatic" command, see rogomatic.6.
X  
X  3.2 RPLOT
X  
X      "rplot" prints a scatter plot of the rogomatic score file. Options
X
X--- 105,131 -----
X      Rogomatic parses the arguments and forks and execs Rogue and Player.
X      For more information about the "rogomatic" command, see rogomatic.6.
X  
X+     Usage:	rogomatic [-ceuw]			Play a game
X+ 	of	rogomatic -f game_file			Play against game_file
X+ 	or	rogomatic -r [ rogue_save_file ]	Start saved game
X+ 	or	rogomatic -p [ game_log ]		Replay game log
X+     	or	rogomatic -s [ version ]		Show scores
X+ 
X+ 	-c	Cheat (look for magic arrows, version 3.6 only)
X+ 	-e	Echo, log the game into a file
X+ 	-u	Start up in user (transparent mode)
X+ 	-w	Watched (Rog-O-Matic can ask user for help when stuck -- rare)
X+ 	-f	next argument is the location of the Rogue game, eg:
X+ 			rogomatic -f /usr/games/rogue
X+ 	-r	Start a saved game, if next argument is given, it is the
X+ 		location of the Rogue save file.
X+ 	-p	Replay a Rog-O-Matic log file (created using the -e
X+ 		option).  If next argument is given it is the name of
X+ 		the log file. The default is "roguelog". Eg:
X+ 			rogomatic -p drag.24.7361
X+ 	-s	List Rog-O_Matic's scorefile.  Version must be one
X+ 		of (3.6, 5.2, 5.3).  Defaults to install.h:DEFVER.
X+ 
X  3.2 RPLOT
X  
X      "rplot" prints a scatter plot of the rogomatic score file. Options
X***************
X*** 111,116
X      allow for inclusion of scores obtained by cheating and addition of
X      a rolling average to the plot.  "rplot" uses the rgmplot program.
X  
X  3.3 HISTPLOT
X  
X      "histplot" reads the scorefile and produces a histogram of either
X
X--- 132,143 -----
X      allow for inclusion of scores obtained by cheating and addition of
X      a rolling average to the plot.  "rplot" uses the rgmplot program.
X  
X+     Usage:	rogomatic -s [ version ] | rplot [ -ac ] [ minimum ]
X+ 
X+     Options:	-a	Include rolling average
X+ 		-c	Include scores obtained by cheating ( 3.6 only )
X+ 		[ min ]	Include only scores above min.
X+ 	
X  3.3 HISTPLOT
X  
X      "histplot" reads the scorefile and produces a histogram of either
X***************
X*** 117,122
X      final score or level reached, depending on the option set.  The
X      histogram plots the killing monster for each game.
X  
X  3.4 GENE
X  
X      "gene" summarizes the current gene pool.
X
X--- 144,155 -----
X      final score or level reached, depending on the option set.  The
X      histogram plots the killing monster for each game.
X  
X+     Usage:	rogomatic -s [ version ] | histplot [ -acl ]
X+ 
X+     Options:	-aNNNN	Include only scores above NNNN
X+ 		-c	Include cheating games ( 3.6 only )
X+ 		-l	Plot level instead of score
X+ 
X  3.4 GENE
X  
X      "gene" summarizes and initializes the current gene pool.
X***************
X*** 119,125
X  
X  3.4 GENE
X  
X!     "gene" summarizes the current gene pool.
X  
X  4.0 MORE ABOUT FILES
X  
X
X--- 152,161 -----
X  
X  3.4 GENE
X  
X!     "gene" summarizes and initializes the current gene pool.
X!     
X!     Usage:	gene [ -f ] [ -v<value> ]	Read gene pool
X! 	or	gene -i [ -msv<value> ]		Create new gene pool
X  
X      Options:	-i	Initial a new gene pool
X  		-f	Full listing, shows gene values and scores
X***************
X*** 121,126
X  
X      "gene" summarizes the current gene pool.
X  
X  4.0 MORE ABOUT FILES
X  
X     For those perusing the source, the following files are in the
X
X--- 157,168 -----
X      Usage:	gene [ -f ] [ -v<value> ]	Read gene pool
X  	or	gene -i [ -msv<value> ]		Create new gene pool
X  
X+     Options:	-i	Initial a new gene pool
X+ 		-f	Full listing, shows gene values and scores
X+ 		-mNN	Max gene pool size (limit of 100, learn.c:MAXM)
X+ 		-s	Random number seed for new gene pool (-i option)
X+ 		-v	Version to list/initial (one of 361,362,521,522,531)
X+ 
X  4.0 MORE ABOUT FILES
X  
X  4.1 SCOREFILES
X***************
X*** 122,127
X      "gene" summarizes the current gene pool.
X  
X  4.0 MORE ABOUT FILES
X  
X     For those perusing the source, the following files are in the
X  source.  The notes indicate how important an understanding of that file
X
X--- 164,180 -----
X  		-v	Version to list/initial (one of 361,362,521,522,531)
X  
X  4.0 MORE ABOUT FILES
X+ 
X+ 4.1 SCOREFILES
X+ 
X+ For each version of Rogue the systems has played, their are 2 score
X+ files: $RGMDIR/rgmdelta<version> and $RGMDIR/rgmscore<version>.  As
X+ each game is played, the score is appended to the DELTA file.  Whenever
X+ the -s option is given, a check is made for the DELTA file.  If new
X+ scores exist, they are sorted and a new SCORE file is created. Then
X+ the score file is printed on stdout.
X+ 
X+ 4.2 READING THE SOURCE
X  
X     For those perusing the source, the following files are in the
X  source.  The notes indicate how important an understanding of that file
Xdiff -c packold/gene.c packnew/gene.c
X*** packold/gene.c	Wed Feb  6 11:40:46 1985
X--- packnew/gene.c	Tue Feb  5 16:39:31 1985
X***************
X*** 1,5
X  /*
X!  * gene.c: Rog-O-Matic XIV (CMU) Mon Jan 28 20:51:32 1985 - mlm
X   * Copyright (C) 1985 by A. Appel, G. Jacobson, L. Hamey, and M. Mauldin
X   *
X   * Initialize and summarize the gene pool
X
X--- 1,5 -----
X  /*
X!  * gene.c: Rog-O-Matic XIV (CMU) Tue Feb  5 14:10:05 1985 - mlm
X   * Copyright (C) 1985 by A. Appel, G. Jacobson, L. Hamey, and M. Mauldin
X   *
X   * Initialize and summarize the gene pool
X***************
X*** 31,37
X  			printf ("Random seed %d.\n", m);
X  	when 'v':	version = atoi(*argv+1); SKIPARG;
X  			printf ("Rogue version %d.\n", version);
X! 	otherwise:	quit (1, "Usage: gene [-i] [-msv<value>]\n");
X        }
X      }
X    }
X
X--- 31,37 -----
X  			printf ("Random seed %d.\n", m);
X  	when 'v':	version = atoi(*argv+1); SKIPARG;
X  			printf ("Rogue version %d.\n", version);
X! 	otherwise:	quit (1, "Usage: gene [-if] [-msv<value>]\n");
X        }
X      }
X    }
Xdiff -c packold/histplot.c packnew/histplot.c
X*** packold/histplot.c	Wed Feb  6 11:40:47 1985
X--- packnew/histplot.c	Tue Feb  5 16:39:33 1985
X***************
X*** 1,5
X  /*
X!  * histplot.c: Rog-O-Matic XIV (CMU) Fri Dec 28 22:13:21 1984 - mlm
X   * Copyright (C) 1985 by A. Appel, G. Jacobson, L. Hamey, and M. Mauldin
X   *
X   * This program takes a Rog-O-Matic log file and produces a histogram
X
X--- 1,5 -----
X  /*
X!  * histplot.c: Rog-O-Matic XIV (CMU) Tue Feb  5 13:55:16 1985 - mlm
X   * Copyright (C) 1985 by A. Appel, G. Jacobson, L. Hamey, and M. Mauldin
X   *
X   * This program takes a Rog-O-Matic log file and produces a histogram
X***************
X*** 4,9
X   *
X   * This program takes a Rog-O-Matic log file and produces a histogram
X   * of the scores.
X   */
X  
X  # include <stdio.h>
X
X--- 4,13 -----
X   *
X   * This program takes a Rog-O-Matic log file and produces a histogram
X   * of the scores.
X+  *
X+  * HISTORY
X+  * 05-Feb-85  Michael Mauldin (mlm) at Carnegie-Mellon University
X+  *	Added bugs fixes found by AEB (play@turing).
X   */
X  
X  # include <stdio.h>
X***************
X*** 42,48
X        { case 'c': cheat++; break; /* List cheat games */
X          case 'l': dolev++; break; /* Plot level instead of score */
X  	case 'a': min = atoi (*argv+1); SKIPARG; break;
X!         default:  printf ("Usage: histplot [-c]\n");
X                    exit (1);
X        }
X      }
X
X--- 46,52 -----
X        { case 'c': cheat++; break; /* List cheat games */
X          case 'l': dolev++; break; /* Plot level instead of score */
X  	case 'a': min = atoi (*argv+1); SKIPARG; break;
X!         default:  printf ("Usage: histplot [-cl] [-aNNNN]\n");
X                    exit (1);
X        }
X      }
X***************
X*** 66,85
X  
X      bucket[h]++;
X      
X!     if (stlmatch (killer, "arrow"))			killnum = 1;
X!     else if (stlmatch (killer, "black unicorn"))	killnum = 'u'-'a'+2;
X!     else if (stlmatch (killer, "bolt"))			killnum = 1;
X!     else if (stlmatch (killer, "dart"))			killnum = 1;
X!     else if (stlmatch (killer, "fatal error trap"))	killnum = 0;
X!     else if (stlmatch (killer, "floating eye"))		killnum = 'e'-'a'+2;
X!     else if (stlmatch (killer, "gave"))			killnum = 0;
X!     else if (stlmatch (killer, "giant ant"))		killnum = 'a'-'a'+2;
X!     else if (stlmatch (killer, "hypothermia"))		killnum = 'i'-'a'+2;
X!     else if (stlmatch (killer, "quit"))			killnum = 28;
X!     else if (stlmatch (killer, "starvation"))		killnum = 'e'-'a'+2;
X!     else if (stlmatch (killer, "user"))			killnum = 0;
X!     else if (stlmatch (killer, "venus flytrap"))	killnum = 'f'-'a'+2;
X!     else if (stlmatch (killer, "violet fungi"))		killnum = 'f'-'a'+2;
X      else killnum = *killer - 'a' + 2;
X  
X      killed[h][killnum]++;
X
X--- 70,89 -----
X  
X      bucket[h]++;
X      
X!     if (stlmatch ("arrow", killer))			killnum = 1;
X!     else if (stlmatch ("black unicorn", killer))	killnum = 'u'-'a'+2;
X!     else if (stlmatch ("bolt", killer))			killnum = 1;
X!     else if (stlmatch ("dart", killer))			killnum = 1;
X!     else if (stlmatch ("fatal error trap", killer))	killnum = 0;
X!     else if (stlmatch ("floating eye", killer))		killnum = 'e'-'a'+2;
X!     else if (stlmatch ("gave", killer))			killnum = 0;
X!     else if (stlmatch ("giant ant", killer))		killnum = 'a'-'a'+2;
X!     else if (stlmatch ("hypothermia", killer))		killnum = 'i'-'a'+2;
X!     else if (stlmatch ("quit", killer))			killnum = 28;
X!     else if (stlmatch ("starvation", killer))		killnum = 'e'-'a'+2;
X!     else if (stlmatch ("user", killer))			killnum = 0;
X!     else if (stlmatch ("venus flytrap", killer))	killnum = 'f'-'a'+2;
X!     else if (stlmatch ("violet fungi", killer))		killnum = 'f'-'a'+2;
X      else killnum = *killer - 'a' + 2;
X  
X      killed[h][killnum]++;
X***************
X*** 158,164
X    while (fgets (line, 128, stdin))
X    { dd = yy = *score = 0;
X      sscanf (line, "%s %d, %d %10s%d%c%17s",
X!             mmstr, &dd, &yy, player, score, cheated, killer);
X      if (strlen (line) > LEVELPOS) *level = atoi (line+LEVELPOS);
X      if (yy > 0 &&
X          (cheated != '*' || cheat) &&
X
X--- 162,168 -----
X    while (fgets (line, 128, stdin))
X    { dd = yy = *score = 0;
X      sscanf (line, "%s %d, %d %10s%d%c%17s",
X!             mmstr, &dd, &yy, player, score, &cheated, killer);
X      if (strlen (line) > LEVELPOS) *level = atoi (line+LEVELPOS);
X      if (yy > 0 &&
X          (cheated != '*' || cheat) &&
X***************
X*** 162,169
X      if (strlen (line) > LEVELPOS) *level = atoi (line+LEVELPOS);
X      if (yy > 0 &&
X          (cheated != '*' || cheat) &&
X!         !stlmatch (killer, "saved") &&
X!         (*score > 2000 || !stlmatch (killer, "user")))
X        return (1);
X    }
X    return (EOF);
X
X--- 166,173 -----
X      if (strlen (line) > LEVELPOS) *level = atoi (line+LEVELPOS);
X      if (yy > 0 &&
X          (cheated != '*' || cheat) &&
X!         !stlmatch ("saved", killer) &&
X!         (*score > 2000 || !stlmatch ("user", killer)))
X        return (1);
X    }
X    return (EOF);
Xdiff -c packold/main.c packnew/main.c
X*** packold/main.c	Wed Feb  6 11:40:54 1985
X--- packnew/main.c	Tue Feb  5 16:39:40 1985
X***************
X*** 1,5
X  /*
X!  * main.c: Rog-O-Matic XIV (CMU) Thu Jan 31 18:12:14 1985 - mlm
X   */
X  
X  /*=========================================================================
X
X--- 1,5 -----
X  /*
X!  * main.c: Rog-O-Matic XIV (CMU) Sun Feb  3 17:00:25 1985 - mlm
X   */
X  
X  /*=========================================================================
X***************
X*** 605,610
X          case '#': dumpwalls ();         break;
X  
X          case '%': clear (); havearmor (1, DOPRINT, ANY); pauserogue (); break;
X  
X          case '=': clear (); havering (1, DOPRINT); pauserogue (); break;
X  
X
X--- 605,613 -----
X          case '#': dumpwalls ();         break;
X  
X          case '%': clear (); havearmor (1, DOPRINT, ANY); pauserogue (); break;
X+ 
X+         case ']': clear (); havearmor (1, DOPRINT, RUSTPROOF);
X+ 		  pauserogue (); break;
X  
X          case '=': clear (); havering (1, DOPRINT); pauserogue (); break;
X  
Xdiff -c packold/rgmplot.c packnew/rgmplot.c
X*** packold/rgmplot.c	Wed Feb  6 11:40:58 1985
X--- packnew/rgmplot.c	Tue Feb  5 16:39:50 1985
X***************
X*** 1,5
X  /*
X!  * rgmplot.c: Rog-O-Matic XIV (CMU) Thu Jan 31 20:04:11 1985 - mlm
X   * Copyright (C) 1985 by A. Appel, G. Jacobson, L. Hamey, and M. Mauldin
X   * 
X   * This program takes a Rog-O-Matic score file sorted by date and score, 
X
X--- 1,5 -----
X  /*
X!  * rgmplot.c: Rog-O-Matic XIV (CMU) Tue Feb  5 15:00:59 1985 - mlm
X   * Copyright (C) 1985 by A. Appel, G. Jacobson, L. Hamey, and M. Mauldin
X   * 
X   * This program takes a Rog-O-Matic score file sorted by date and score, 
X***************
X*** 21,27
X  main (argc, argv)
X  int argc;
X  char *argv[];
X! { int mm, dd, yy, score = 0, lastday = -1, lastmon = -1, h;
X    int sumscores = 0, numscores = 0, i;
X    int sum[AVLEN], num[AVLEN], rsum, rnum, davg, ravg;
X    char player[100], plot[128], cheated;  
X
X--- 21,27 -----
X  main (argc, argv)
X  int argc;
X  char *argv[];
X! { int mm, dd, yy, score = 0, lastday = -1, lastmon = -1, lastyy = -1, h;
X    int sumscores = 0, numscores = 0, i;
X    int sum[AVLEN], num[AVLEN], rsum, rnum, davg, ravg;
X    char player[100], plot[128], cheated;  
X***************
X*** 44,50
X    if (argc > 0) min = atoi (argv[0]);
X  
X    /*  Print out the header */
X!   printf ("           Scatter Plot of Rog-O-Matic Scores versus time\n\n");
X    if (min > 0) 
X      printf ("                      Scores greater than %d\n\n", min);
X    printf ("         0      2000      4000      6000      8000     10000\n");
X
X--- 44,50 -----
X    if (argc > 0) min = atoi (argv[0]);
X  
X    /*  Print out the header */
X!   printf ("\t\t   Scatter Plot of Rog-O-Matic Scores versus time\n\n");
X    if (min > 0) 
X      printf ("\t\t              Scores greater than %d\n\n", min);
X    printf ("\t\t0      2000      4000      6000      8000     10000\n");
X***************
X*** 46,54
X    /*  Print out the header */
X    printf ("           Scatter Plot of Rog-O-Matic Scores versus time\n\n");
X    if (min > 0) 
X!     printf ("                      Scores greater than %d\n\n", min);
X!   printf ("         0      2000      4000      6000      8000     10000\n");
X!   printf ("         |----+----|----+----|----+----|----+----|----+----|\n");
X  
X  
X    /* Build an empty plot line */
X
X--- 46,54 -----
X    /*  Print out the header */
X    printf ("\t\t   Scatter Plot of Rog-O-Matic Scores versus time\n\n");
X    if (min > 0) 
X!     printf ("\t\t              Scores greater than %d\n\n", min);
X!   printf ("\t\t0      2000      4000      6000      8000     10000\n");
X!   printf ("\t\t|----+----|----+----|----+----|----+----|----+----|\n");
X  
X  
X    /* Build an empty plot line */
X***************
X*** 58,64
X    while (getscore (&mm, &dd, &yy, player, &score, &cheated) != EOF)
X    { 
X      /* Change days, overprint the average for day, rolling avg */
X!     if ((dd != lastday || mm != lastmon) && lastday > 0)
X      { if (doavg)
X        { rsum = *sum; rnum = *num;
X          for (i = 1; i < AVLEN; i++)
X
X--- 58,64 -----
X    while (getscore (&mm, &dd, &yy, player, &score, &cheated) != EOF)
X    { 
X      /* Change days, overprint the average for day, rolling avg */
X!     if ((dd != lastday || mm != lastmon || yy != lastyy) && lastday > 0)
X      { if (doavg)
X        { rsum = *sum; rnum = *num;
X          for (i = 1; i < AVLEN; i++)
X***************
X*** 81,87
X  	  plot[ravg-1] = plot[ravg] = plot[ravg+1] = '#';
X        }
X            
X!       printf ("%3s %2d   %s\n", month[lastmon-1], lastday, plot);
X        strcpy (plot, "|                                                 |");
X        
X      }
X
X--- 81,87 -----
X  	  plot[ravg-1] = plot[ravg] = plot[ravg+1] = '#';
X        }
X            
X!       printf ("%3s %2d %4d\t%s\n", month[lastmon-1], lastday, lastyy, plot);
X        strcpy (plot, "|                                                 |");
X        
X      }
X***************
X*** 98,104
X        sumscores += score;
X        ++numscores;
X  
X!       lastday = dd; lastmon = mm;
X      }
X    }
X  
X
X--- 98,104 -----
X        sumscores += score;
X        ++numscores;
X  
X!       lastday = dd; lastmon = mm; lastyy = yy;
X      }
X    }
X  
X***************
X*** 102,109
X      }
X    }
X  
X!   printf ("         |----+----|----+----|----+----|----+----|----+----|\n");
X!   printf ("         0      2000      4000      6000      8000     10000\n");
X    
X  
X    if (numscores > 0)
X
X--- 102,109 -----
X      }
X    }
X  
X!   printf ("\t\t|----+----|----+----|----+----|----+----|----+----|\n");
X!   printf ("\t\t0      2000      4000      6000      8000     10000\n");
X    
X  
X    if (numscores > 0)
Xdiff -c packold/rplot packnew/rplot
X*** packold/rplot	Wed Feb  6 11:41:01 1985
X--- packnew/rplot	Tue Feb  5 16:39:53 1985
X***************
X*** 1
X! colrm 48 < /usr/mlm/games/rlog/rgmscore5.2 | datesub | sort -u +0n +1n +2n +4n +5 | rgmplot $* 
X
X--- 1,6 -----
X! #!/bin/sh
X! #
X! # rplot: Rog-O-Matic XIV (CMU) Tue Feb  5 13:52:48 1985 - mlm
X! # Copyright (C) 1985 by A. Appel, G. Jacobson, L. Hamey, and M. Mauldin
X! #
X! colrm 48 | datesub | sort -u +2n +0n +1n +4n +5 | rgmplot $*
Xdiff -c packold/tactics.c packnew/tactics.c
X*** packold/tactics.c	Wed Feb  6 11:41:08 1985
X--- packnew/tactics.c	Tue Feb  5 16:40:00 1985
X***************
X*** 1,5
X  /*
X!  * tactics.c: Rog-O-Matic XIV (CMU) Thu Jan 31 20:31:22 1985 - mlm
X   * Copyright (C) 1985 by A. Appel, G. Jacobson, L. Hamey, and M. Mauldin
X   *
X   * This file contains all of the 'medium level intelligence' of Rog-O-Matic. 
X
X--- 1,5 -----
X  /*
X!  * tactics.c: Rog-O-Matic XIV (CMU) Sat Feb  2 13:01:25 1985 - mlm
X   * Copyright (C) 1985 by A. Appel, G. Jacobson, L. Hamey, and M. Mauldin
X   *
X   * This file contains all of the 'medium level intelligence' of Rog-O-Matic. 
X***************
X*** 52,62
X    }
X      
X    /* If  the new armor is really bad, then don't bother wearing any */
X!   if (obj != NONE &&
X!       (armorclass (obj) > 9) ||
X!       (itemis (obj, CURSED) &&
X!        (havenamed(scroll, "remove curse") == NONE) &&
X!        (armorclass (obj) > 6))) 
X    { obj = NONE; }
X  
X    /* If we are wearing the right armor, then dont bother */
X
X--- 52,58 -----
X    }
X      
X    /* If  the new armor is really bad, then don't bother wearing any */
X!   if (obj != NONE && armorclass (obj) > 9) 
X    { obj = NONE; }
X  
X    /* If we are wearing the right armor, then dont bother */
Xdiff -c packold/things.c packnew/things.c
X*** packold/things.c	Wed Feb  6 11:41:09 1985
X--- packnew/things.c	Tue Feb  5 16:40:01 1985
X***************
X*** 1,5
X  /*
X!  * things.c: Rog-O-Matic XIV (CMU) Thu Jan 31 18:13:32 1985 - mlm
X   * Copyright (C) 1985 by A. Appel, G. Jacobson, L. Hamey, and M. Mauldin
X   *
X   * This file contains much of the code to handle Rog-O-Matics inventory.
X
X--- 1,5 -----
X  /*
X!  * things.c: Rog-O-Matic XIV (CMU) Sat Feb  2 13:02:28 1985 - mlm
X   * Copyright (C) 1985 by A. Appel, G. Jacobson, L. Hamey, and M. Mauldin
X   *
X   * This file contains much of the code to handle Rog-O-Matics inventory.
X***************
X*** 481,487
X  
X  willrust (obj)
X  int obj;
X! { return (! (armorclass (obj) > 8 || armorclass (obj) < -5 ||
X  	     itemis (obj, PROTECTED) ||
X  	     stlmatch (inven[obj].str, "leather")));
X  }
X
X--- 481,488 -----
X  
X  willrust (obj)
X  int obj;
X! { return (! (protected ||
X! 	     armorclass (obj) > 8 || armorclass (obj) < -5 ||
X  	     itemis (obj, PROTECTED) ||
X  	     stlmatch (inven[obj].str, "leather")));
X  }
/
echo 'Rog-O-Matic modifications (Feb 5, 1985) complete.'
exit