Rog-O-Matic XIV bugs fixes #2 (context diffs)
Michael Mauldin
mlm at cmu-cs-cad.ARPA
Sun Feb 17 15:10:49 AEST 1985
#!/bin/sh
#
# This is a shell archive. Use the "unshar" command to unpack it, or
# remove the mail header and pipe the body of the message through "sh".
#
# Seems like more bugs have cropped up. Thanks to everyone who sent them
# in. This version has been better tested against 3.6 and 5.2 (cheat
# mode still works, in 10 games against 3.6 it got another total winner).
#
# This message contains two files:
#
# Bugreport A new Bugreport file
# mod.2.context a diff -c script (both first and second mods)
#
# Changes:
#
# mod.1 fixed the armor bug
# fixed the ancilliary commands (rplot and histplot)
# documented the ancilliary commands (rplot, histplot, gene)
#
# mod.2 fixed another armor handling bug
# fixed plunge mode when coming back up
# fixed replay command to include version number
# fixed invisible stalker fighting code
# numerous tactics changed
# (see Bugreport for gory details)
#
# Share and Enjoy!
#
# Michael Mauldin (Fuzzy) Department of Computer Science
# (412) 578-3065 Carnegie-Mellon University
# mauldin at cmu-cs-a.arpa Pittsburgh, PA 15213
#
echo 'Start of Rgm XIV mods 02/16/85 - context diffs:'
echo 'x - Bugreport'
sed 's/^X//' > Bugreport << '/'
X/*
X * Bugreport: Rog-O-Matic XIV (CMU) Sat Feb 16 22:53:04 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 at 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
X4. Armor handling again. Fails to track current armor under Rogue 3.6
X and Rogue 5.2 (bug reported by Dennis Ritchie).
X
X things.c:wear(),takeoff() added usesynch=0 (ie: get new invent)
X tactics.c:handlearmor() new strategy, includes 3rd best
X
X5. Failed to handle "cursed armor" message in Rogue 3.6 / 5.2. Fixed.
X
X mess.c:terpmes() modified cursed mesage pattern
X
X6. Drops good, known items rather than quaffing/reading them
X
X things.c:drop() read/quaff some things
X
X7. Too often throws good armor away to keep mediocre scrolls.
X
X worth.c:worth() values armor more highly.
X
X8. Peter Wan reports problems with screen handling on terminals with
X no tabs. Problem unknown.
X
X9. Fixed reply command to understand version messages at start of
X log files. Modifiekd to send version command when starting a
X log in the middle of the game.
X
X io.c:getrogver() look for version string in log
X io.c:toggleecho() send version command
X mess.c:terpmes() ignore version commands
X
X10. Fails to fight invisible stalkers properly
X
X strategy.c:fightinvisible() fixed old conversion bug
X search.c:followmap() don't call fmove when beingstalked
X
X11. Doesn't recognize scrolls/wands of light in corridors
X
X mess.c:terpmes() added message about "corridor glows"
X
X12. Added debugging command about rustproof armor
X
X arms.c:havearmor() new flag 'rustproof'
X main.c:main() new command ']'
X
X13. Fails to properly print message about genocided monsters.
X
X io.c:statusline() added missing %s to printf format
X
X14. Updated version message to take replaying into account
X
X main.c:main() new message
X
X15. Makefile does not include several dependencies on install.h
X
X makefile io, ltm, tactics, utility
X
X16. Sometimes gives extra message when doing an inventory. Modified
X inventory to return true if it printed a message because an item
X listed has a remembered value substituted by the database routine.
X
X pack.c:inventory() now returns true is msg printed
X mess.c:terpmes() uses value returned
X
X17. Reduced time groping when blind
X
X strategy.c:stragize() cut from 100 turns to 50
X
X18. Modified scroll handling, now reads scrolls even when in plunge
X mode. Also fixed a bug with the 'aggravate monsters' check.
X
X tactics.c:readscroll() added missing s to "aggravate monster"
X
X19. If it finds a trap door when on the way back up between 26 and 18,
X it runs DOWN the trap door (stupid, stupid!).
X
X tactics.c:plunge() dont if have(amulet)
X
X20. Modified sanity check for identify scrolls. Don't have to plan
X ahead in Rogue 5.3, so sanity check doesn't apply.
X
X mess.c:readident() change 'version <= RV53A' to '<'
X
X21. Remember that leather armor rusts in Rogue 3.6.
X
X things.c:willrust() check for Rogue 3.6
X
/
echo 'x - mod.2.context'
sed 's/^X//' > mod.2.context << '/'
Xdiff -c1 packold/arms.c packnew/arms.c
X*** packold/arms.c Mon Feb 11 11:27:10 1985
X--- packnew/arms.c Sat Feb 16 23:46:50 1985
X***************
X*** 1,3
X /*
X! * arms.c: Rog-O-Matic XIV (CMU) Thu Jan 31 15:46:02 1985 - mlm
X * Copyright (C) 1985 by A. Appel, G. Jacobson, L. Hamey, and M. Mauldin
X
X--- 1,3 -----
X /*
X! * arms.c: Rog-O-Matic XIV (CMU) Sat Feb 16 09:47:34 1985 - mlm
X * Copyright (C) 1985 by A. Appel, G. Jacobson, L. Hamey, and M. Mauldin
X***************
X*** 40,51
X
X- /* Put protected sets of armor with equal ACs first. DR UTexas 19 Jan 84 */
X- for (j = n-1; j > 0; j--)
X- { if (armval[j] == armval[j-1])
X- { i = armind[j];
X- w = armind[j-1];
X- if (!itemis (w, PROTECTED) && itemis (i, PROTECTED))
X- swap (armind[j], armind[j-1]);
X- }
X- }
X-
X if (print)
X
X--- 40,41 -----
X
X if (print)
X***************
X*** 51,53
X if (print)
X! { mvaddstr (1, 0, "Current Armor Rankings");
X for (i = 0; i<n; i++)
X
X--- 41,43 -----
X if (print)
X! { mvprintw (1,0, "Current %sArmor Rankings", rustproof ? "Rustproof " : "");
X for (i = 0; i<n; i++)
X***************
X*** 55,60
X }
X-
X- /* Any uncursed, useful armor at or beyond position k? */
X- for (i=k; i <= n; i++)
X- if (!itemis ((j = armind[i-1]), CURSED) && armval[j] < 10) return (j);
X
X
X--- 45,46 -----
X }
X
X***************
X*** 60,62
X
X- /* Return the kth best, even though it is cursed or useless */
X return ((k <= n) ? armind[k-1] : NONE);
X
X--- 46,47 -----
X
X return ((k <= n) ? armind[k-1] : NONE);
Xdiff -c1 packold/io.c packnew/io.c
X*** packold/io.c Mon Feb 11 11:27:17 1985
X--- packnew/io.c Sat Feb 16 23:46:59 1985
X***************
X*** 1,3
X /*
X! * io.c: Rog-O-Matic XIV (CMU) Thu Jan 31 18:19:29 1985 - mlm
X * Copyright (C) 1985 by A. Appel, G. Jacobson, L. Hamey, and M. Mauldin
X
X--- 1,3 -----
X /*
X! * io.c: Rog-O-Matic XIV (CMU) Sat Feb 16 23:03:48 1985 - mlm
X * Copyright (C) 1985 by A. Appel, G. Jacobson, L. Hamey, and M. Mauldin
X***************
X*** 754,755
X "Rgm commands: <ret>=singlestep, `=summary, /=snapshot, R=replay [?]",
X "Rogue cmds: S=Save, Q=Quit, h j k l H J K L b n u y N B U Y f s < > [?]",
X
X--- 754,756 -----
X "Rgm commands: <ret>=singlestep, `=summary, /=snapshot, R=replay [?]",
X+ "Rgm commands: m=long term memory display, G=display gene settings [?]",
X "Rogue cmds: S=Save, Q=Quit, h j k l H J K L b n u y N B U Y f s < > [?]",
X***************
X*** 756,758
X "Wizard: d=debug, !=show items, @=show monsters, #=show level flags [?]",
X! "Wizard: ~=version, ^=bowrank, %%=armorrank, $=weaponrank, ==ringrank [?]",
X "Wizard: (=database, )=cycles, +=possible secret doors, :=chicken [?]",
X
X--- 757,759 -----
X "Wizard: d=debug, !=show items, @=show monsters, #=show level flags [?]",
X! "Wizard: ~=version, ^=bowrank, %%=armorrank, $=weaponrank, ==ringrank [?]",
X "Wizard: (=database, )=cycles, +=possible secret doors, :=chicken [?]",
X***************
X*** 758,761
X "Wizard: (=database, )=cycles, +=possible secret doors, :=chicken [?]",
X! "Wizard: [=weapstat, r=resetinv, &=object count, *=toggle blind [?]",
X! "Wizard: C=toggle cosmic, M=mazedoor, m=monster, A=attempt, {=flags",
X NULL
X
X--- 759,762 -----
X "Wizard: (=database, )=cycles, +=possible secret doors, :=chicken [?]",
X! "Wizard: [=weapstat, ]=rustproof armor, r=resetinv, &=object count [?]",
X! "Wizard: *=toggle blind, C=toggle cosmic, M=mazedoor, A=attempt, {=flags",
X NULL
X***************
X*** 795,796
X * wands.
X */
X
X--- 796,799 -----
X * wands.
X+ *
X+ * Get version from first 2000 chars of a log file Feb 9, 1985 - mlm
X */
X***************
X*** 797,798
X
X getrogver ()
X
X--- 800,803 -----
X
X+ # define VERMSG "ersion "
X+
X getrogver ()
X***************
X*** 798,800
X getrogver ()
X! { char *vstr = versionstr, ch;
X
X
X--- 803,817 -----
X getrogver ()
X! { register char *vstr = versionstr, *m = VERMSG;
X! register int cnt = 2000, ch;
X!
X! if (replaying) /* Look for version string in log */
X! { while (cnt-- > 0 && *m)
X! { if (fgetc (logfile) == *m) m++; else m = VERMSG;}
X!
X! if (*m == '\0') /* Found VERMSG, get version string */
X! { while ((ch = fgetc (logfile)) != ' ') *(vstr++) = ch;
X! *--vstr = '\0';
X! }
X! else /* Use default version */
X! { sprintf (versionstr, DEFVER); }
X
X***************
X*** 800,803
X
X! if (replaying) /* Use default version */
X! { sprintf (versionstr, DEFVER); }
X
X
X--- 817,820 -----
X
X! rewind (logfile); /* Put log file back to start */
X! }
X
X***************
X*** 871,872
X cecho = 1;
X }
X
X--- 888,890 -----
X cecho = 1;
X+ if (*versionstr) command (T_OTHER, "v");
X }
X***************
X*** 1120,1122
X
X! if (*genocided) sprintf (s, "genocided '%s', ", s, genocided);
X
X
X--- 1138,1140 -----
X
X! if (*genocided) sprintf (s, "%sgenocided '%s', ", s, genocided);
X
Xdiff -c1 packold/main.c packnew/main.c
X*** packold/main.c Mon Feb 11 11:28:10 1985
X--- packnew/main.c Sat Feb 16 23:47:06 1985
X***************
X*** 1,3
X /*
X! * main.c: Rog-O-Matic XIV (CMU) Sun Feb 3 17:00:25 1985 - mlm
X */
X
X--- 1,3 -----
X /*
X! * main.c: Rog-O-Matic XIV (CMU) Fri Feb 15 18:27:27 1985 - mlm
X */
X***************
X*** 112,114
X /* Characters */
X! char *logfilename = ""; /* Name of log file */
X char afterid = '\0'; /* Letter of obj after identify */
X
X--- 112,114 -----
X /* Characters */
X! char logfilename[100]; /* Name of log file */
X char afterid = '\0'; /* Letter of obj after identify */
X***************
X*** 339,340
X sprintf (sumline, "");
X for (i = 80 * 24; i--; ) screen[0][i] = ' ';
X
X--- 339,341 -----
X sprintf (sumline, "");
X+ sprintf (versionstr, "");
X for (i = 80 * 24; i--; ) screen[0][i] = ' ';
X***************
X*** 353,355
X termination = "finis";
X! logfilename = argv[4];
X startreplay (&logfile, logfilename);
X
X--- 354,356 -----
X termination = "finis";
X! strcpy (logfilename, argv[4]);
X startreplay (&logfile, logfilename);
X***************
X*** 403,406
X
X! sprintf (msg, " %s: version %s, genotype %d, quit at %d.",
X! roguename, versionstr, geneid, quitat);
X
X
X--- 404,411 -----
X
X! if (replaying)
X! sprintf (msg, " Replaying log file %s, version %s.",
X! logfilename, versionstr);
X! else
X! sprintf (msg, " %s: version %s, genotype %d, quit at %d.",
X! roguename, versionstr, geneid, quitat);
X
X***************
X*** 554,558
X
X! case '~': saynow
X! ("Rogomatic version %s, Rogue version %s (%d), quit at %d",
X! RGMVER, versionstr, version, quitat);
X break;
X
X--- 559,566 -----
X
X! case '~': if (replaying)
X! saynow ("Replaying log file %s, version %s.",
X! logfilename, versionstr);
X! else
X! saynow (" %s: version %s, genotype %d, quit at %d.",
X! roguename, versionstr, geneid, quitat);
X break;
Xdiff -c1 packold/makefile packnew/makefile
X*** packold/makefile Mon Feb 11 11:27:21 1985
X--- packnew/makefile Sat Feb 16 23:47:06 1985
X***************
X*** 1,2
X! # makefile: Rog-O-Matic XIV (CMU) Thu Jan 31 18:23:25 1985 - mlm
X # Copyright (C) 1985 by A. Appel, G. Jacobson, L. Hamey, and M. Mauldin
X
X--- 1,2 -----
X! # makefile: Rog-O-Matic XIV (CMU) Wed Feb 6 18:34:24 1985 - mlm
X # Copyright (C) 1985 by A. Appel, G. Jacobson, L. Hamey, and M. Mauldin
X***************
X*** 4,7
X BINARIES= rogomatic player rgmplot datesub histplot gene
X! BINDIR= /usr/mlm/bin/test
X! PUBDIR= /usr/mlm/rgm/src14
X CCFLAGS= -g
X
X--- 4,7 -----
X BINARIES= rogomatic player rgmplot datesub histplot gene
X! BINDIR= /usr/mlm/bin/
X! PUBDIR= /usr/mlm/rgm/src14a
X CCFLAGS= -g
X***************
X*** 54,56
X cc -c histplot.c
X! io.o: types.h globals.h termtokens.h
X cc -c $(CCFLAGS) io.c
X
X--- 54,56 -----
X cc -c histplot.c
X! io.o: types.h globals.h install.h termtokens.h
X cc -c $(CCFLAGS) io.c
X***************
X*** 60,62
X cc -c $(CCFLAGS) learn.c
X! ltm.o: types.h globals.h
X cc -c $(CCFLAGS) ltm.c
X
X--- 60,62 -----
X cc -c $(CCFLAGS) learn.c
X! ltm.o: types.h globals.h install.h
X cc -c $(CCFLAGS) ltm.c
X***************
X*** 96,98
X cc -c $(CCFLAGS) survival.c
X! tactics.o: types.h globals.h
X cc -c $(CCFLAGS) tactics.c
X
X--- 96,98 -----
X cc -c $(CCFLAGS) survival.c
X! tactics.o: types.h globals.h install.h
X cc -c $(CCFLAGS) tactics.c
X***************
X*** 106,108
X cc -c titler.c
X! utility.o:
X cc -c $(CCFLAGS) utility.c
X
X--- 106,108 -----
X cc -c titler.c
X! utility.o: install.h
X cc -c $(CCFLAGS) utility.c
Xdiff -c1 packold/mess.c packnew/mess.c
X*** packold/mess.c Mon Feb 11 11:27:23 1985
X--- packnew/mess.c Sat Feb 16 23:47:08 1985
X***************
X*** 1,3
X /*
X! * mess.c: Rog-O-Matic XIV (CMU) Thu Jan 31 15:33:12 1985 - mlm
X * Copyright (C) 1985 by A. Appel, G. Jacobson, L. Hamey, and M. Mauldin
X
X--- 1,3 -----
X /*
X! * mess.c: Rog-O-Matic XIV (CMU) Sat Feb 16 15:41:44 1985 - mlm
X * Copyright (C) 1985 by A. Appel, G. Jacobson, L. Hamey, and M. Mauldin
X***************
X*** 63,65
X for (m = mess; /* Copy text */
X! s<t && (version < RV53A || *s != '.');
X s++)
X
X--- 63,65 -----
X for (m = mess; /* Copy text */
X! s<t && (version < RV53A || *s != '.' || s[1] != ' ');
X s++)
X***************
X*** 89,91
X else if (mend[-1]==')' && mend[-3]=='(')
X! { inventory (mess, mend); identifying = justreadid = 0; }
X
X
X--- 89,91 -----
X else if (mend[-1]==')' && mend[-3]=='(')
X! { echoit = !inventory (mess, mend); identifying = justreadid = 0; }
X
X***************
X*** 247,248
X else if (MATCH("read what*")) echoit=0;
X else unknown++;
X
X--- 247,249 -----
X else if (MATCH("read what*")) echoit=0;
X+ else if (MATCH("rogue version *")) echoit=0;
X else unknown++;
X***************
X*** 274,275
X else if (MATCH("the room is lit")) { setnewgoal (); infer ("light"); }
X else if (MATCH("the * has confused you")) confused = 1;
X
X--- 275,277 -----
X else if (MATCH("the room is lit")) { setnewgoal (); infer ("light"); }
X+ else if (MATCH("the corridor glows*")) { infer ("light"); }
X else if (MATCH("the * has confused you")) confused = 1;
X***************
X*** 301,303
X case 'v':
X! unknown++;
X break;
X
X--- 303,306 -----
X case 'v':
X! if (MATCH("version *")) echoit=0;
X! else unknown++;
X break;
X***************
X*** 311,313
X else if (MATCH("wait, what's going*")) {infer("confusion"); confused=1;}
X! else if (MATCH("wait! that's a *")) ;
X else if (MATCH("what a*feeling*")) { infer("confusion"); confused=1; }
X
X--- 314,316 -----
X else if (MATCH("wait, what's going*")) {infer("confusion"); confused=1;}
X! else if (MATCH("wait*that's a *")) ;
X else if (MATCH("what a*feeling*")) { infer("confusion"); confused=1; }
X***************
X*** 336,338
X { echoit=0; set (STUFF); maxobj=objcount; }
X! else if (MATCH("you can't *")) {echoit=0; curseditem ();}
X else if (MATCH("you can't")) echoit=0;
X
X--- 339,341 -----
X { echoit=0; set (STUFF); maxobj=objcount; }
X! else if (MATCH("you*cursed*")) {echoit=0; curseditem ();}
X else if (MATCH("you can't")) echoit=0;
X***************
X*** 338,339
X else if (MATCH("you can't")) echoit=0;
X else if (MATCH("you begin to feel better")) infer ("healing");
X
X--- 341,343 -----
X else if (MATCH("you can't")) echoit=0;
X+ else if (MATCH("you begin to feel greedy*")) infer ("gold detection");
X else if (MATCH("you begin to feel better")) infer ("healing");
X***************
X*** 343,344
X else if (MATCH("you feel a strange sense of loss")) ;
X else if (MATCH("you feel stronger, now*")) infer ("gain strength");
X
X--- 347,349 -----
X else if (MATCH("you feel a strange sense of loss")) ;
X+ else if (MATCH("you feel a wrenching sensation in your gut")) ;
X else if (MATCH("you feel stronger, now*")) infer ("gain strength");
X***************
X*** 348,350
X { infer("raise level"); }
X! else if (MATCH("your nose tingles")) infer ("food detection");
X else if (MATCH("you start to float in the air"))
X
X--- 353,355 -----
X { infer("raise level"); }
X! else if (MATCH("your nose tingles*")) infer ("food detection");
X else if (MATCH("you start to float in the air"))
X***************
X*** 368,371
X MATCH("you feel in touch with the universal onenes"))
X! { infer ("remove curse"); cursedarmor = cursedweapon = 0;
X! newarmor = newweapon = 1;}
X else if (MATCH("your armor weakens"))
X
X--- 373,378 -----
X MATCH("you feel in touch with the universal onenes"))
X! { infer ("remove curse");
X! if (cursedarmor) {forget (currentarmor, CURSED); cursedarmor=0;}
X! if (cursedweapon) {forget (currentweapon, CURSED); cursedweapon=0;}
X! newarmor = newweapon = 1; }
X else if (MATCH("your armor weakens"))
X***************
X*** 417,418
X if (MATCH( "* gold pieces")) { echoit=0; countgold (res1); }
X else if (MATCH("'*'*: *")) { echoit=0; mapcharacter (*res1, res3); }
X
X--- 424,426 -----
X if (MATCH( "* gold pieces")) { echoit=0; countgold (res1); }
X+ else if (MATCH("(mctesq was here)")) echoit=0;
X else if (MATCH("'*'*: *")) { echoit=0; mapcharacter (*res1, res3); }
X***************
X*** 478,480
X
X! if (!replaying && version <= RV53A &&
X (nextid < LETTER (0) || nextid > LETTER (invcount)))
X
X--- 486,488 -----
X
X! if (!replaying && version < RV53A &&
X (nextid < LETTER (0) || nextid > LETTER (invcount)))
X***************
X*** 522,524
X sendnow (" %c;", id); /* Pick an object to identify */
X! usesynch = 0; justreadid=1; /* Must resest inventory */
X }
X
X--- 530,532 -----
X sendnow (" %c;", id); /* Pick an object to identify */
X! usesynch = 0; justreadid=1; /* Must reset inventory */
X }
Xdiff -c1 packold/pack.c packnew/pack.c
X*** packold/pack.c Mon Feb 11 11:27:24 1985
X--- packnew/pack.c Sat Feb 16 23:47:10 1985
X***************
X*** 1,3
X /*
X! * pack.c: Rog-O-Matic XIV (CMU) Thu Jan 31 15:04:23 1985 - mlm
X * Copyright (C) 1985 by A. Appel, G. Jacobson, L. Hamey, and M. Mauldin
X
X--- 1,3 -----
X /*
X! * pack.c: Rog-O-Matic XIV (CMU) Sat Feb 16 08:58:04 1985 - mlm
X * Copyright (C) 1985 by A. Appel, G. Jacobson, L. Hamey, and M. Mauldin
X***************
X*** 231,233
X char objname[100], *realname();
X! int n, ipos, xknow = 0, newitem = 0, inuse = 0;
X int plushit = UNKNOWN, plusdam = UNKNOWN, charges = UNKNOWN;
X
X--- 231,233 -----
X char objname[100], *realname();
X! int n, ipos, xknow = 0, newitem = 0, inuse = 0, printed = 0;
X int plushit = UNKNOWN, plusdam = UNKNOWN, charges = UNKNOWN;
X***************
X*** 377,378
X refresh ();
X }
X
X--- 377,379 -----
X refresh ();
X+ printed++;
X }
X***************
X*** 378,381
X }
X- else
X- say (msgstart);
X }
X
X--- 379,380 -----
X }
X }
X***************
X*** 407,422
X
X- /*
X- * Use retained info to determine cursed attributes when identifying
X- * or protected status for armor. DR UTexas 01/05/84
X- */
X-
X- if (inven[ipos].type == what && stlmatch (objname, inven[ipos].str))
X- { if (xknow != itemis (ipos, KNOWN) &&
X- !itemis (ipos, (UNCURSED | ENCHANTED)) &&
X- ((plushit != UNKNOWN && plushit < 0) ||
X- (plusdam != UNKNOWN && plusdam < 0)))
X- remember (ipos, CURSED);
X- if (newitem || what != armor ) forget (ipos, PROTECTED);
X- }
X-
X inven[ipos].type = what;
X
X--- 406,407 -----
X
X inven[ipos].type = what;
X***************
X*** 454,455
X checkrange = 1;
X }
X
X--- 439,442 -----
X checkrange = 1;
X+
X+ return (printed);
X }
Xdiff -c1 packold/search.c packnew/search.c
X*** packold/search.c Mon Feb 11 11:27:31 1985
X--- packnew/search.c Sat Feb 16 23:47:15 1985
X***************
X*** 1,3
X /*
X! * search.c: Rog-O-Matic XIV (CMU) Mon Jan 28 18:28:07 1985 - mlm
X * Copyright (C) 1985 by A. Appel, G. Jacobson, L. Hamey, and M. Mauldin
X
X--- 1,3 -----
X /*
X! * search.c: Rog-O-Matic XIV (CMU) Fri Feb 15 15:08:44 1985 - mlm
X * Copyright (C) 1985 by A. Appel, G. Jacobson, L. Hamey, and M. Mauldin
X***************
X*** 107,109
X onrc (HALL|BEEN, targetrow, targetcol) != HALL|BEEN &&
X! onrc (HALL,r,c))
X { fmove (dir); return (1); }
X
X--- 107,110 -----
X onrc (HALL|BEEN, targetrow, targetcol) != HALL|BEEN &&
X! onrc (HALL,r,c) &&
X! !beingstalked) /* Feb 10, 1985 - mlm */
X { fmove (dir); return (1); }
Xdiff -c1 packold/strategy.c packnew/strategy.c
X*** packold/strategy.c Mon Feb 11 11:27:34 1985
X--- packnew/strategy.c Sat Feb 16 23:47:18 1985
X***************
X*** 1,3
X /*
X! * strategy.c: Rog-O-Matic XIV (CMU) Thu Jan 31 20:51:06 1985 - mlm
X * Copyright (C) 1985 by A. Appel, G. Jacobson, L. Hamey, and M. Mauldin
X
X--- 1,3 -----
X /*
X! * strategy.c: Rog-O-Matic XIV (CMU) Sat Feb 16 10:03:16 1985 - mlm
X * Copyright (C) 1985 by A. Appel, G. Jacobson, L. Hamey, and M. Mauldin
X***************
X*** 95,97
X
X! if (blinded && grope (100)) /* Who turned out the lights */
X { display ("Blinded, groping..."); return (1); }
X
X--- 95,97 -----
X
X! if (blinded && grope (50)) /* Who turned out the lights */
X { display ("Blinded, groping..."); return (1); }
X***************
X*** 131,133
X
X! if (findroom ()) /* Look for another room */
X return (1);
X
X--- 131,133 -----
X
X! if (findroom ()) /* Look for another room */
X return (1);
X***************
X*** 182,184
X display ("I would give up, but I am too stubborn, starting over...");
X! return (grope (100));
X }
X
X--- 182,184 -----
X display ("I would give up, but I am too stubborn, starting over...");
X! return (grope (10));
X }
X***************
X*** 500,502
X
X! if (beingstalked > 1000) { turns = 0; danger += 16; }
X
X
X--- 500,502 -----
X
X! if (beingstalked > INVPRES) { turns = 0; danger += INVDAM; }
X
X***************
X*** 507,509
X
X-
X /*
X
X--- 507,508 -----
X
X /*
X***************
X*** 986,991
X
X- # define INVDAM (16)
X- # define INVPRES (INVHIT-100)
X- # define INVLURK (INVPRES-200)
X-
X fightinvisible ()
X
X--- 985,986 -----
X
X fightinvisible ()
X***************
X*** 1047,1049
X if (liberties == 1 || liberties == 2)
X! sprintf (cmd, "%c%c", keydir[lastdir], keydir[(lastdir+4)&7]);
X
X
X--- 1042,1046 -----
X if (liberties == 1 || liberties == 2)
X! { command (T_FIGHTING, "%c%c", keydir[lastdir], keydir[(lastdir+4)&7]);
X! return (1);
X! }
X
X***************
X*** 1054,1060
X /* not work, run in a circle (will hit one out of 4) */
X! else
X! { for (dir=0; dir<8; dir += 2)
X! if ((onrc(CANGO, atdrow(dir), atdcol(dir))) &&
X! (onrc(CANGO, atrow+2*deltr[dir], atcol+2*deltc[dir])))
X! break;
X
X
X--- 1051,1056 -----
X /* not work, run in a circle (will hit one out of 4) */
X! for (dir=0; dir<8; dir += 2)
X! if ((onrc(CANGO, atdrow(dir), atdcol(dir))) &&
X! (onrc(CANGO, atrow+2*deltr[dir], atcol+2*deltc[dir])))
X! break;
X
X***************
X*** 1060,1066
X
X! if (dir > 7) command (T_FIGHTING, "hjlk");
X! else command (T_FIGHTING, "%c%c%c", keydir[dir],
X! keydir[dir], keydir[(dir+4)&7]);
X! }
X!
X return (1);
X
X--- 1056,1060 -----
X
X! if (dir > 7) command (T_FIGHTING, "hjlk");
X! else command (T_FIGHTING, "%c%c%c", keydir[dir],
X! keydir[dir], keydir[(dir+4)&7]);
X return (1);
Xdiff -c1 packold/survival.c packnew/survival.c
X*** packold/survival.c Mon Feb 11 11:27:35 1985
X--- packnew/survival.c Sat Feb 16 23:47:18 1985
X***************
X*** 1,3
X /*
X! * survival.c: Rog-O-Matic XIV (CMU) Mon Jan 7 15:22:23 1985 - mlm
X * Copyright (C) 1985 by A. Appel, G. Jacobson, L. Hamey, and M. Mauldin
X
X--- 1,3 -----
X /*
X! * survival.c: Rog-O-Matic XIV (CMU) Sun Feb 10 21:09:58 1985 - mlm
X * Copyright (C) 1985 by A. Appel, G. Jacobson, L. Hamey, and M. Mauldin
X***************
X*** 121,125
X if (on (STAIRS) && !floating) /* Go up or down */
X! { if (!goupstairs (RUNNING)) godownstairs (RUNNING);
X! return (1);
X! }
X
X
X--- 121,123 -----
X if (on (STAIRS) && !floating) /* Go up or down */
X! return (goupstairs (RUNNING) || godownstairs (RUNNING));
X
Xdiff -c1 packold/tactics.c packnew/tactics.c
X*** packold/tactics.c Mon Feb 11 11:28:16 1985
X--- packnew/tactics.c Sat Feb 16 23:47:20 1985
X***************
X*** 1,3
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--- 1,3 -----
X /*
X! * tactics.c: Rog-O-Matic XIV (CMU) Sat Feb 16 23:27:48 1985 - mlm
X * Copyright (C) 1985 by A. Appel, G. Jacobson, L. Hamey, and M. Mauldin
X***************
X*** 43,45
X
X! if (Level > 7 && Level < 19 &&
X wearing ("maintain armor") == NONE &&
X
X--- 43,45 -----
X
X! if (Level > (version < RV52A ? 8 : 7) && Level < 19 &&
X wearing ("maintain armor") == NONE &&
X***************
X*** 47,52
X itemis (obj, KNOWN))
X! { if (Level < 13)
X! obj = havearmor (1, NOPRINT, RUSTPROOF);
X! if (Level >= 13 || obj == NONE)
X! obj = havearmor (2, NOPRINT, ANY);
X }
X
X--- 47,52 -----
X itemis (obj, KNOWN))
X! { obj = NONE;
X! if (Level<13) obj = havearmor (1, NOPRINT, RUSTPROOF);
X! if (Level<13 && obj==NONE) obj = havearmor (3, NOPRINT, ANY);
X! if (obj==NONE) obj = havearmor (2, NOPRINT, ANY);
X }
X***************
X*** 54,56
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--- 54,56 -----
X /* If the new armor is really bad, then don't bother wearing any */
X! if (obj != NONE && armorclass (obj) > 9 && itemis (obj, KNOWN))
X { obj = NONE; }
X***************
X*** 89,91
X /* haveweapon (1) returns the index of the best weapon in the pack */
X! if ((obj = haveweapon (1, NOPRINT)) < 0) return (0);
X
X
X--- 89,91 -----
X /* haveweapon (1) returns the index of the best weapon in the pack */
X! if ((obj = haveweapon (1, NOPRINT)) == NONE) return (0);
X
X***************
X*** 92,96
X /* If we are not wielding our best weapon, do so */
X! if (obj == currentweapon) { newweapon = 0; return (0); }
X! else if (obj != NONE) { return (wield (obj)); }
X! else { newweapon = 0; return (0); }
X }
X
X--- 92,96 -----
X /* If we are not wielding our best weapon, do so */
X! if (obj == currentweapon) { newweapon = 0; return (0); }
X! else if (obj != NONE) { return (wield (obj)); }
X! else { newweapon = 0; return (0); }
X }
X***************
X*** 188,190
X return (1);
X! else if (wearing ("sustain strength") < 0 &&
X (obj2 = havenamed (ring, "sustain strength")) != NONE &&
X
X--- 188,190 -----
X return (1);
X! else if (wearing ("sustain strength") == NONE &&
X (obj2 = havenamed (ring, "sustain strength")) != NONE &&
X***************
X*** 274,276
X cursedarmor || cursedweapon) &&
X! (exploredlevel || know ("aggravate monster")) &&
X (obj = unknown (scroll)) != NONE))
X
X--- 274,276 -----
X cursedarmor || cursedweapon) &&
X! (exploredlevel || Level > 18 || know ("aggravate monsters")) &&
X (obj = unknown (scroll)) != NONE))
X***************
X*** 279,281
X /* Go to a corner to read the scroll */
X! if (version <= RV36B && know ("create monster") == '\0' && gotocorner ())
X return (1);
X
X--- 279,281 -----
X /* Go to a corner to read the scroll */
X! if (version <= RV36B && !know ("create monster") && gotocorner ())
X return (1);
X***************
X*** 363,365
X
X! if ((obj = havenamed (ring, name)) < 0 ||
X wearing (name) != NONE)
X
X--- 363,365 -----
X
X! if ((obj = havenamed (ring, name)) == NONE ||
X wearing (name) != NONE)
X***************
X*** 543,545
X /* Check for applicability of this rule */
X! if (stairrow < 0 && !foundtrapdoor) return (0);
X
X
X--- 543,545 -----
X /* Check for applicability of this rule */
X! if (stairrow == NONE && !foundtrapdoor) return (0);
X
X***************
X*** 545,546
X
X if (teleported > (larder+1)*5 && godownstairs (NOTRUNNING))
X
X--- 545,548 -----
X
X+ if (have (amulet) != NONE) return (0);
X+
X if (teleported > (larder+1)*5 && godownstairs (NOTRUNNING))
X***************
X*** 619,621
X /* Check for applicability of this rule */
X! if (stairrow < 0 || have(amulet) < 0 ||
X (!running && quitat < BOGUS && Gold <= quitat))
X
X--- 621,623 -----
X /* Check for applicability of this rule */
X! if (stairrow == NONE || have(amulet) == NONE ||
X (!running && quitat < BOGUS && Gold <= quitat))
X***************
X*** 628,631
X if (Level == 1 &&
X! ((obj = havearrow ()) != NONE || (obj = haveminus ()) != NONE))
X! { throw (obj, 0); return (1); }
X
X
X--- 630,634 -----
X if (Level == 1 &&
X! ((obj = havearrow ()) != NONE || (obj = haveminus ()) != NONE) &&
X! throw (obj, 0))
X! { return (1); }
X
X***************
X*** 795,797
X /* Fail if we have run out of arrows */
X! if ((obj = havemissile ()) < 0) return (0);
X
X
X--- 798,800 -----
X /* Fail if we have run out of arrows */
X! if ((obj = havemissile ()) == NONE) return (0);
X
X***************
X*** 827,829
X /* Have we a wand to identify? */
X! if ((obj = unknown (wand)) < 0)
X return (0);
X
X--- 830,832 -----
X /* Have we a wand to identify? */
X! if ((obj = unknown (wand)) == NONE)
X return (0);
Xdiff -c1 packold/things.c packnew/things.c
X*** packold/things.c Mon Feb 11 11:28:18 1985
X--- packnew/things.c Sat Feb 16 23:47:21 1985
X***************
X*** 1,3
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--- 1,3 -----
X /*
X! * things.c: Rog-O-Matic XIV (CMU) Sat Feb 16 12:16:57 1985 - mlm
X * Copyright (C) 1985 by A. Appel, G. Jacobson, L. Hamey, and M. Mauldin
X***************
X*** 26,28
X
X! command (T_HANDLING, "W%cI%c", LETTER (obj), LETTER (obj));
X return (1);
X
X--- 26,29 -----
X
X! command (T_HANDLING, "W%c", LETTER (obj));
X! usesynch = 0;
X return (1);
X***************
X*** 44,45
X command (T_HANDLING, "T");
X return (1);
X
X--- 45,47 -----
X command (T_HANDLING, "T");
X+ usesynch = 0;
X return (1);
X***************
X*** 74,77
X {
X! /* Cant if there is not something there */
X! if (inven[obj].count < 1) return (0);
X
X
X--- 76,82 -----
X {
X! /* Cant if not there, in use, or on something else */
X! if (inven[obj].count < 1 ||
X! itemis (obj, INUSE) ||
X! on (STUFF | TRAP | STAIRS | DOOR))
X! return (0);
X
X***************
X*** 77,83
X
X! /* read unknown scrolls rather than dropping them */
X! if (inven[obj].type == scroll && !itemis (obj, KNOWN) && reads (obj))
X! { prepareident (pickident (), obj);
X! return (1);
X! }
X
X
X--- 82,98 -----
X
X! /* read unknown scrolls or good scrolls rather than dropping them */
X! if (inven[obj].type == scroll &&
X! (!itemis (obj, KNOWN) ||
X! stlmatch (inven[obj].str, "identify") &&
X! prepareident (pickident (), obj) ||
X! stlmatch (inven[obj].str, "enchant") ||
X! stlmatch (inven[obj].str, "genocide") ||
X! stlmatch (inven[obj].str, "gold detection") ||
X! stlmatch (inven[obj].str, "hold monster") ||
X! stlmatch (inven[obj].str, "light") ||
X! stlmatch (inven[obj].str, "magic mapping") ||
X! stlmatch (inven[obj].str, "monster confusion") ||
X! stlmatch (inven[obj].str, "remove curse")) &&
X! reads (obj))
X! { return (1); }
X
X***************
X*** 83,87
X
X! /* quaff unknown potions rather than dropping them */
X! if (inven[obj].type == potion && !itemis (obj, KNOWN) && quaff (obj))
X! return (1);
X
X
X--- 98,112 -----
X
X! /* quaff unknown potions or good potions rather than dropping them */
X! if (inven[obj].type == potion &&
X! (!itemis (obj, KNOWN) ||
X! stlmatch (inven[obj].str, "extra healing") ||
X! stlmatch (inven[obj].str, "gain strength") ||
X! stlmatch (inven[obj].str, "haste self") && !hasted ||
X! stlmatch (inven[obj].str, "healing") ||
X! stlmatch (inven[obj].str, "magic detection") ||
X! stlmatch (inven[obj].str, "monster detection") ||
X! stlmatch (inven[obj].str, "raise level") ||
X! stlmatch (inven[obj].str, "restore strength")) &&
X! quaff (obj))
X! { return (1); }
X
X***************
X*** 87,91
X
X- if (itemis (obj, INUSE) || on (STUFF | TRAP | STAIRS | DOOR))
X- return (0);
X-
X command (T_HANDLING, "d%c", LETTER (obj));
X
X--- 112,113 -----
X
X command (T_HANDLING, "d%c", LETTER (obj));
X***************
X*** 270,271
X afterid = (iscroll > obj || inven[iscroll].count > 1) ? nextid : nextid-1;
X }
X
X--- 292,294 -----
X afterid = (iscroll > obj || inven[iscroll].count > 1) ? nextid : nextid-1;
X+ return (nextid >= 'a' && afterid >= 'a');
X }
X***************
X*** 486,488
X itemis (obj, PROTECTED) ||
X! stlmatch (inven[obj].str, "leather")));
X }
X
X--- 509,511 -----
X itemis (obj, PROTECTED) ||
X! stlmatch (inven[obj].str, "leather") && version > RV36B));
X }
Xdiff -c1 packold/types.h packnew/types.h
X*** packold/types.h Mon Feb 11 11:27:38 1985
X--- packnew/types.h Sat Feb 16 23:47:22 1985
X***************
X*** 1,3
X /*
X! * types.h: Rog-O-Matic XIV (CMU) Wed Jan 30 14:57:17 1985 - mlm
X * Copyright (C) 1985 by A. Appel, G. Jacobson, L. Hamey, and M. Mauldin
X
X--- 1,3 -----
X /*
X! * types.h: Rog-O-Matic XIV (CMU) Sat Feb 16 09:44:54 1985 - mlm
X * Copyright (C) 1985 by A. Appel, G. Jacobson, L. Hamey, and M. Mauldin
X***************
X*** 43,44
X
X # define INVHIT (1000)
X
X--- 43,45 -----
X
X+ # define INVDAM (16)
X # define INVHIT (1000)
X***************
X*** 44,45
X # define INVHIT (1000)
X
X
X--- 45,48 -----
X # define INVHIT (1000)
X+ # define INVPRES (INVHIT-100)
X+ # define INVLURK (INVPRES-200)
X
Xdiff -c1 packold/worth.c packnew/worth.c
X*** packold/worth.c Mon Feb 11 11:27:39 1985
X--- packnew/worth.c Sat Feb 16 23:47:23 1985
X***************
X*** 1,3
X /*
X! * worth.c: Rog-O-Matic XIV (CMU) Thu Jan 31 15:54:56 1985 - mlm
X * Copyright (C) 1985 by A. Appel, G. Jacobson, L. Hamey, and M. Mauldin
X
X--- 1,3 -----
X /*
X! * worth.c: Rog-O-Matic XIV (CMU) Sun Feb 10 23:16:40 1985 - mlm
X * Copyright (C) 1985 by A. Appel, G. Jacobson, L. Hamey, and M. Mauldin
X***************
X*** 50,53
X /*
X! * Armor values are based on armor class, bonus for best,
X! * second best, or leather armor (leather doesnt rust)
X */
X
X--- 50,53 -----
X /*
X! * Armor values are based on armor class, bonus for best, second
X! * best, third best, or leather armor (leather doesnt rust)
X */
X***************
X*** 55,57
X if (inven[obj].type == armor)
X! { value = (10 - armorclass (obj)) * 90;
X
X
X--- 55,57 -----
X if (inven[obj].type == armor)
X! { value = (11 - armorclass (obj)) * 120;
X
X***************
X*** 59,60
X else if (obj == havearmor (2, NOPRINT, ANY)) value += 1500;
X
X
X--- 59,61 -----
X else if (obj == havearmor (2, NOPRINT, ANY)) value += 1500;
X+ else if (obj == havearmor (3, NOPRINT, ANY)) value += 800;
X
X***************
X*** 60,62
X
X! if (!willrust (obj)) value += 150;
X }
X
X--- 61,63 -----
X
X! if (stlmatch (inven[obj].str, "leather")) value += 300;
X }
X***************
X*** 69,71
X else if (inven[obj].type == thrower)
X! { value = (bowclass (obj)) * 5;
X
X
X--- 70,72 -----
X else if (inven[obj].type == thrower)
X! { value = (bowclass (obj));
X
X***************
X*** 71,74
X
X! if (obj == havebow (1, NOPRINT)) value += 1000;
X! else if (obj == havebow (2, NOPRINT)) value += 500;
X }
X
X--- 72,75 -----
X
X! if (obj == havebow (1, NOPRINT)) value += 1500;
X! else if (obj == havebow (2, NOPRINT)) value += 300;
X }
X***************
X*** 79,82
X
X! if (obj == haveweapon (1, NOPRINT)) value += 1500;
X! else if (obj == haveweapon (2, NOPRINT)) value += 1000;
X }
X
X--- 80,83 -----
X
X! if (obj == haveweapon (1, NOPRINT)) value += 2500;
X! else if (obj == haveweapon (2, NOPRINT)) value += 1500;
X }
X***************
X*** 106,107
X else if (stlmatch (inven[obj].str, "restore strength")) value = 800;
X else if (stlmatch (inven[obj].str, "scare monster")) value = 1400;
X
X--- 107,109 -----
X else if (stlmatch (inven[obj].str, "restore strength")) value = 800;
X+ else if (stlmatch (inven[obj].str, "gain strength")) value = 700;
X else if (stlmatch (inven[obj].str, "scare monster")) value = 1400;
X***************
X*** 109,110
X else if (stlmatch (inven[obj].str, "enchant")) value = 800;
X
X
X--- 111,115 -----
X else if (stlmatch (inven[obj].str, "enchant")) value = 800;
X+ else if (stlmatch (inven[obj].str, "extra healing")) value = 900;
X+ else if (stlmatch (inven[obj].str, "healing")) value = 750;
X+ else if (stlmatch (inven[obj].str, "protect") && !protected) value = 1000;
X
/
echo 'Rgm XIV mods 02/16/85 - context diffs complete.'
exit
More information about the Comp.sources.bugs
mailing list