linhart@gauss.rutgers.edu (D-ro 3) (12/22/87)
Here they are. The Hawaiian shirt/TERMLIB mods and lots of bug fixes, especially regarding blindfolds. Drag out your original shell archives... I originally posted these to the wrong newsgroup. Since then, the patches have been expanded anyway, in time for 2.3 I hope. Unfortunately, there isn't a blindfold-worn flag (W_BLINDF?) so that I could add the "(being worn)" for blindfolds that I wanted to. If a suitable way could be devised, I'd like to make the Wear command apply to all kinds of objects, like throw, with the default being armor and rings, but applicable to blindfolds and amulets (and a cute message for leashing yourself, especially if you're a dog at the time). This ambitious project (which I feel would improve the game) will probably be my next project when I get these bugs out: * "For you, ... only ... for this ." typename() doesn't seem to be returning the object name. * "You remove the leash from your ." Fixing dogname didn't fix this. I removed "your" and just used monnam() instead, but that's not in these patches. * Nasty things happen when you go up stairs blind. * 'D' drop can cause freeinv() panics. * Mimics in general stores get confused and mimic ']'. In MSDOSCOLOR, they are even easier to spot. * Bad monster number panics on low levels. * Zapping pools with a wand of fire sometimes doesn't give an evaporation message and leaves the pool behind, but stepping on it brings back the floor symbol. * Once a door mimic failed to disappear after I killed it. The 'M' stayed there in the wall. * After the startup interrogation and --More--, but before the screen clear an initial map display, a '@' symbol is placed at the current location on the screen, on the line after the --More--. * An uncolorized '[' always appears in the top left corner of the first level, visible from the beginning, even after redraws, but the game treats the location like stone. Anyhow, I was able to fix a lot of other bugs. Here's a detailed list of what was changed in these patches: config.h: #define SHIRT and TERMLIB Allow WIZARD to be changed in make file. decl.c: Declare uarmu (under-worn) pointer. do_wear.c: Wear/remove shirt code. AC calculation includes shirts. Shirts can't corrode. extern.h: Declare uarmu. hack.h: Move extern.h function declaractions to after function name re#defines. invent.c: Take off armor prompt extended to shirts. makedefs.c: Added PC Hack 3.51k quantum mechanic description. K and r definitions corrected if both Kobolds and Kops, rockmoles and rats used. obj.h: Declare W_ARMU (wearing-shirt) flag, extend W_ARMOR (wearing-armor) to shirts. objects.h: Add Hawaiian shirt stats, balance probabilities. objnam.c: "dead Kop" kludge to capitalize Hawaiian when shirt wished for. "(weapon in paw)"/"(on right paw)" options.c: Fix two syntax errors. Read dogname properly when it is the last entry on the options line. pager.c: 'Q' now works as advertised on whatis prompt. 'Y' is accepted as an affirmative response to "More info?". More info will properly come up when the data lines start with spaces, now. pcmain.c: Insert missing #endif. polyself.c: "tear" rather than "break" out of cloaks/shirts. Add humanoid() to return whether monster type has hands (see objnam). pri.c: Fix two miscoded ternaries. prisym.c: Fix tmp_at()/Tmp_at() functions for MSDOS graphics. read.c: Destroy armor crumbles shirts. steal.c: Correct Nymph stole message for cursed objects. Females now also get told what was taken. termcap.c: Enable TERMLIB definitions, so termcap definitions will be read from termcap.cnf instead of hardwired into the code. timeout.c: Blindfolds will not time out. u_init.c: Initialize uarmu. Give the Tourist a Hawaiian shirt (being worn). worn.c: Wearing Hawaiian shirt code. you.h: uprops[] extended to blindfolds. For 'patch' neophytes, here's a quick rundown of how to patch your copy of NetHack: 1) Save this article to disk. Your news reader should have a command for this. Well, look again, maybe you missed it. 2) Get out your original shell archives and extract the sources to a directory somewhere. 3) Move your saved article to that directory, and enter "patch <file" where file is whatever file you saved this article to. 4) Re-make nethack. 5) Go on vacation. Maybe it'll be done by the time you get back. 6) (optional) Post an article complaining about new bugs I didn't find. These are context diffs, so most of them will apply correctly even to patched sources, and you can fudge the rejects until they work too, if you know what you're doing. But if you know what you're doing, you don't need me to tell you what to do anyway, do you? (In other words, ignore these instructions if you know better.) -- Tear line. Beyond this line lies a lot of patches and a .signature. *** orig/config.h Mon Dec 21 13:02:33 1987 --- new/config.h Mon Dec 21 02:56:00 1987 *************** *** 17,23 * rindex strrchr * Also, the code for suspend and various ioctls is only given for BSD4.2 */ ! /* #define MSDOS /* define for MS-DOS (actually defined by compiler) */ #define UNIX /* delete if no fork(), exec() available */ /* #define GENIX /* Yet Another Unix Clone */ #define BSD /* defind for 4.n BSD */ --- 17,25 ----- * rindex strrchr * Also, the code for suspend and various ioctls is only given for BSD4.2 */ ! #ifdef __MSDOS__ /* Turbo C auto-defines __MSDOS__, some others MSDOS */ ! # define MSDOS /* define for MS-DOS (usually defined by compiler) */ ! #endif /* #define UNIX /* delete if no fork(), exec() available */ /* #define GENIX /* Yet Another Unix Clone */ /* #define BSD /* define for 4.n BSD */ *************** *** 37,43 #define signal ssignal #endif ! #define WIZARD "mike" /* the person allowed to use the -D option */ #define RECORD "record"/* the file containing the list of topscorers */ #define NEWS "news" /* the file containing the latest hack news */ #define HELP "help" /* the file containing a description of the commands */ --- 39,47 ----- #define signal ssignal #endif ! #ifndef WIZARD /* To allow for compile-time or makefile changes */ ! # define WIZARD "D-ro 3" /* the person allowed to use the -D option */ ! #endif #define RECORD "record"/* the file containing the list of topscorers */ #define NEWS "news" /* the file containing the latest hack news */ #define HELP "help" /* the file containing a description of the commands */ *************** *** 219,224 #define KJSMODS /* Various changes made by Kevin Sweet */ #define BVH /* Additions by Bruce Holloway */ #define SAC /* Soldiers, barracks by Steve Creps */ #if defined(MSDOS) && defined(GRAPHICS) #define MSDOSCOLOR --- 223,229 ----- #define KJSMODS /* Various changes made by Kevin Sweet */ #define BVH /* Additions by Bruce Holloway */ #define SAC /* Soldiers, barracks by Steve Creps */ + #define SHIRT /* Hawaiian shirt code by Steve Linhart */ #if defined(MSDOS) && defined(GRAPHICS) #define MSDOSCOLOR *************** *** 222,227 #if defined(MSDOS) && defined(GRAPHICS) #define MSDOSCOLOR #endif /* --- 227,233 ----- #if defined(MSDOS) && defined(GRAPHICS) #define MSDOSCOLOR + #define TERMLIB #endif /* *** orig/decl.c Mon Dec 21 13:08:02 1987 --- new/decl.c Mon Dec 21 02:14:32 1987 *************** *** 1,4 ! /* SCCS Id: @(#)decl.c 2.1 87/10/19 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ #include "hack.h" --- 1,4 ----- ! /* SCCS Id: @(#)decl.c 2.2 87/12/14 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ #include "hack.h" *************** *** 27,33 char lock[FILENAME]; /* pathname of level files */ char permbones[PATHLEN]; /* where permanent copy of bones go */ int ramdisk = FALSE; /* whether to copy bones to levels or not */ - struct symbols symbol = {'|', '-', '-', '-', '-', '-', '+', '.', '#'}; int saveprompt = TRUE; char *alllevels = "levels.*"; char *allbones = "bones.*"; --- 27,32 ----- char lock[FILENAME]; /* pathname of level files */ char permbones[PATHLEN]; /* where permanent copy of bones go */ int ramdisk = FALSE; /* whether to copy bones to levels or not */ int saveprompt = TRUE; char *alllevels = "levels.*"; char *allbones = "bones.*"; *************** *** 48,53 struct trap *ftrap = 0; struct gold *fgold = 0; struct obj *fobj = 0, *fcobj = 0, *invent = 0, *uwep = 0, *uarm = 0, *uarm2 = 0, *uarmh = 0, *uarms = 0, *uarmg = 0, *uright = 0, *uleft = 0, *uchain = 0, *uball = 0; struct flag flags; --- 47,55 ----- struct trap *ftrap = 0; struct gold *fgold = 0; struct obj *fobj = 0, *fcobj = 0, *invent = 0, *uwep = 0, *uarm = 0, + #ifdef SHIRT + *uarmu = 0, /* under-wear, so to speak */ + #endif *uarm2 = 0, *uarmh = 0, *uarms = 0, *uarmg = 0, *uright = 0, *uleft = 0, *uchain = 0, *uball = 0; struct flag flags; *** orig/do_wear.c Mon Dec 21 13:03:11 1987 --- new/do_wear.c Mon Dec 21 13:43:56 1987 *************** *** 1,4 ! /* SCCS Id: @(#)do_wear.c 2.0 87/09/15 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ #include <stdio.h> --- 1,4 ----- ! /* SCCS Id: @(#)do_wear.c 2.2 87/12/21 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ #include <stdio.h> *************** *** 13,19 doremarm() { register struct obj *otmp; ! if(!uarm && !uarmh && !uarms && !uarmg) { pline("Not wearing any armor."); return(0); } --- 13,23 ----- doremarm() { register struct obj *otmp; ! if(!uarm && !uarmh && !uarms && !uarmg ! #ifdef SHIRT ! && !uarmu ! #endif ! ) { pline("Not wearing any armor."); return(0); } *************** *** 17,22 pline("Not wearing any armor."); return(0); } otmp = (!uarmh && !uarms && !uarmg) ? uarm : (!uarms && !uarm && !uarmg) ? uarmh : (!uarmh && !uarm && !uarmg) ? uarms : --- 21,32 ----- pline("Not wearing any armor."); return(0); } + #ifdef SHIRT + otmp = (!uarmh && !uarms && !uarmg) ? (uarm ? uarm : uarmu) : + (!uarm && !uarms && !uarmg && !uarmu) ? uarmh : + (!uarm && !uarmh && !uarmg && !uarmu) ? uarms : + (!uarm && !uarmh && !uarms && !uarmu) ? uarmg : + #else otmp = (!uarmh && !uarms && !uarmg) ? uarm : (!uarms && !uarm && !uarmg) ? uarmh : (!uarmh && !uarm && !uarmg) ? uarms : *************** *** 21,26 (!uarms && !uarm && !uarmg) ? uarmh : (!uarmh && !uarm && !uarmg) ? uarms : (!uarmh && !uarm && !uarms) ? uarmg : getobj("[", "take off"); if(!otmp) return(0); if(!(otmp->owornmask & (W_ARMOR - W_ARM2))) { --- 31,37 ----- (!uarms && !uarm && !uarmg) ? uarmh : (!uarmh && !uarm && !uarmg) ? uarms : (!uarmh && !uarm && !uarms) ? uarmg : + #endif getobj("[", "take off"); if(!otmp) return(0); if(!(otmp->owornmask & (W_ARMOR - W_ARM2))) { *************** *** 94,100 nomovemsg = "You finished taking off your helmet."; break; case PAIR_OF_GLOVES: ! nomovemsg = "You finished taking off your gloves"; break; default: nomovemsg = "You finished taking off your suit."; --- 105,111 ----- nomovemsg = "You finished taking off your helmet."; break; case PAIR_OF_GLOVES: ! nomovemsg = "You finished taking off your gloves."; break; default: nomovemsg = "You finished taking off your suit."; *************** *** 144,149 err++; } else mask = W_ARMG; } else { #ifdef KAA if(cantweararm(u.usym)) { --- 155,178 ----- err++; } else mask = W_ARMG; + #ifdef SHIRT + } else if( otmp->otyp == HAWAIIAN_SHIRT ) { + # ifdef KAA + if(cantweararm(u.usym)) { + pline("You can't wear a shirt!"); + return(0); + } + # endif + if (uarm || uarmu) { + if(!uarm) /* then uarmu */ + pline("You are already wearing a shirt."); + else + pline("You can't wear that over your %s.", + uarm->otyp != ELVEN_CLOAK ? "armor" : "cloak" ); + err++; + } else + mask = W_ARMU; + #endif /* SHIRT /**/ } else { #ifdef KAA if(cantweararm(u.usym)) { *************** *** 299,304 if(uarmh) uac -= ARM_BONUS(uarmh); if(uarms) uac -= ARM_BONUS(uarms); if(uarmg) uac -= ARM_BONUS(uarmg); if(uleft && uleft->otyp == RIN_PROTECTION) uac -= uleft->spe; if(uright && uright->otyp == RIN_PROTECTION) uac -= uright->spe; #ifdef PRAYERS --- 328,336 ----- if(uarmh) uac -= ARM_BONUS(uarmh); if(uarms) uac -= ARM_BONUS(uarms); if(uarmg) uac -= ARM_BONUS(uarmg); + #ifdef SHIRT + if(uarmu) uac -= ARM_BONUS(uarmu); + #endif if(uleft && uleft->otyp == RIN_PROTECTION) uac -= uleft->spe; if(uright && uright->otyp == RIN_PROTECTION) uac -= uright->spe; #ifdef PRAYERS *************** *** 352,357 if(uarmh && (!otmph || !rn2(4))) otmph = uarmh; if(uarmg && (!otmph || !rn2(4))) otmph = uarmg; if(uarms && (!otmph || !rn2(4))) otmph = uarms; return(otmph); } --- 385,393 ----- if(uarmh && (!otmph || !rn2(4))) otmph = uarmh; if(uarmg && (!otmph || !rn2(4))) otmph = uarmg; if(uarms && (!otmph || !rn2(4))) otmph = uarms; + #ifdef SHIRT + if(!uarm && uarmu && (!otmph || !rn2(4))) otmph = uarmu; + #endif return(otmph); } *************** *** 361,366 if(otmph->rustfree || otmph->otyp == CRYSTAL_PLATE_MAIL || otmph->otyp == ELVEN_CLOAK || otmph->otyp == LEATHER_ARMOR || otmph->otyp == STUDDED_LEATHER_ARMOR) { pline("Your %s not affected!", --- 397,405 ----- if(otmph->rustfree || )tmph->otyp == CRYSTAL_PLATE_MAIL || otmph->otyp == ELVEN_CLOAK || + #ifdef SHIRT + otmph->otyp == HAWAIIAN_SHIRT || + #endif otmph->otyp == LEATHER_ARMOR || otmph->otyp == STUDDED_LEATHER_ARMOR) { pline("Your %s not affected!", *** orig/extern.h Mon Dec 21 12:59:00 1987 --- new/extern.h Mon Dec 21 02:58:06 1987 *************** *** 1,4 ! /* SCCS Id: @(#)extern.h 2.1 87/10/19 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ #include "config.h" --- 1,4 ----- ! /* SCCS Id: @(#)extern.h 2.2 87/12/14 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ #include "config.h" *************** *** 32,37 #include "obj.h" extern struct obj *invent, *uwep, *uarm, *uarm2, *uarmh, *uarms, *uarmg, *uleft, *uright, *fcobj; extern struct obj *uchain; /* defined iff PUNISHED */ extern struct obj *uball; /* defined if PUNISHED */ --- 32,40 ----- #include "obj.h" extern struct obj *invent, *uwep, *uarm, *uarm2, *uarmh, *uarms, *uarmg, + #ifdef SHIRT + *uarmu, /* under-wear, so to speak */ + #endif *uleft, *uright, *fcobj; extern struct obj *uchain; /* defined iff PUNISHED */ extern struct obj *uball; /* defined if PUNISHED */ *** orig/hack.h Mon Dec 21 12:59:01 1987 --- new/hack.h Mon Dec 21 01:30:25 1987 *************** *** 1,4 ! /* SCCS Id: @(#)hack.h 2.1 87/10/18 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ #ifndef HACK_H --- 1,4 ----- ! /* SCCS Id: @(#)hack.h 2.2 87/12/08 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ #ifndef HACK_H *************** *** 4,11 #ifndef HACK_H #define HACK_H - #include "extern.h" - #ifdef __TURBOC__ /* work around the case-insensitivity of the DOS linker */ #define Amonnam Amonnam_ --- 4,9 ----- #ifndef HACK_H #define HACK_H #ifdef __TURBOC__ /* work around the case-insensitivity of the DOS linker */ #define Amonnam Amonnam_ *************** *** 19,24 #define itoa itoa_ #endif #define Null(type) ((struct type *) 0) --- 17,22 ----- #define itoa itoa_ #endif + #include "extern.h" #define Null(type) ((struct type *) 0) *** orig/invent.c Mon Dec 21 13:07:10 1987 --- new/invent.c Mon Dec 21 02:39:20 1987 *************** *** 1,4 ! /* SCCS Id: @(#)invent.c 2.1 87/10/19 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ #include <stdio.h> --- 1,4 ----- ! /* SCCS Id: @(#)invent.c 2.2 87/12/14 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ #include <stdio.h> *************** *** 941,946 } doprarm(){ if(!uarm && !uarmg && !uarms && !uarmh) pline("You are not wearing any armor."); else { --- 941,949 ----- } doprarm(){ + #ifdef SHIRT + if(!uarm && !uarmg && !uarms && !uarmh && !uarmu) + #else if(!uarm && !uarmg && !uarms && !uarmh) #endif pline("You are not wearing any armor."); *************** *** 942,947 doprarm(){ if(!uarm && !uarmg && !uarms && !uarmh) pline("You are not wearing any armor."); else { char lets[6]; --- 945,951 ----- if(!uarm && !uarmg && !uarms && !uarmh && !uarmu) #else if(!uarm && !uarmg && !uarms && !uarmh) + #endif pline("You are not wearing any armor."); else { #ifdef SHIRT *************** *** 944,949 if(!uarm && !uarmg && !uarms && !uarmh) pline("You are not wearing any armor."); else { char lets[6]; register int ct = 0; --- 948,954 ----- #endif pline("You are not wearing any armor."); else { + #ifdef SHIRT char lets[6]; #else char lets[7]; *************** *** 945,950 pline("You are not wearing any armor."); else { char lets[6]; register int ct = 0; if(uarm) lets[ct++] = obj_to_let(uarm); --- 950,958 ----- else { #ifdef SHIRT char lets[6]; + #else + char lets[7]; + #endif register int ct = 0; #ifdef SHIRT *************** *** 947,952 char lets[6]; register int ct = 0; if(uarm) lets[ct++] = obj_to_let(uarm); if(uarm2) lets[ct++] = obj_to_let(uarm2); if(uarmh) lets[ct++] = obj_to_let(uarmh); --- 955,963 ----- #endif register int ct = 0; + #ifdef SHIRT + if(uarmu) lets[ct++] = obj_to_let(uarmu); + #endif if(uarm) lets[ct++] = obj_to_let(uarm); if(uarm2) lets[ct++] = obj_to_let(uarm2); if(uarmh) lets[ct++] = obj_to_let(uarmh); *** orig/makedefs.c Mon Dec 21 13:07:36 1987 --- new/makedefs.c Mon Dec 21 00:13:58 1987 *************** *** 1,7 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* makedefs.c - NetHack version 2.2 */ ! static char SCCS_Id[] = "@(#)makedefs.c 2.2\t87/11/29"; #include <stdio.h> #include "config.h" --- 1,7 ----- /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* makedefs.c - NetHack version 2.2 */ ! static char SCCS_Id[] = "@(#)makedefs.c 2.2\t87/12/14"; #include <stdio.h> #include "config.h" *************** *** 216,221 while(gets(inline) != NULL) { #ifdef KOPS if(!strcmp(inline, "K a kobold")) printf("K\ta Keystone Kop\n"); else #endif --- 216,224 ----- while(gets(inline) != NULL) { #ifdef KOPS if(!strcmp(inline, "K a kobold")) + # ifdef KJSMODS + printf("K\ta Keystone Kop (or a kobold)\n"); + # else printf("K\ta Keystone Kop\n"); # endif else *************** *** 217,222 #ifdef KOPS if(!strcmp(inline, "K a kobold")) printf("K\ta Keystone Kop\n"); else #endif #ifdef KAA --- 220,226 ----- printf("K\ta Keystone Kop (or a kobold)\n"); # else printf("K\ta Keystone Kop\n"); + # endif else #endif #ifdef KAA *************** *** 220,227 else #endif #ifdef KAA ! if(!strcmp(inline, "Q a quasit")) ! printf("Q\ta quantum mechanic\n"); else #endif #ifdef ROCKMOLE --- 224,239 ----- else #endif #ifdef KAA ! if(!strcmp(inline, "Q a quasit")) { ! printf("Q\ta quantum mechanic;\n"); ! printf("\tFor a long time mankind had puzzled over quantum mechanics, which\n"); ! printf("\tproved rather difficult to understand. Very little is known about\n"); ! printf("\tthese elusive creatures, and what knowledge does exist is very\n"); ! printf("\tuncertain. It has been conjectured that they may be related to\n"); ! printf("\tMaxwell's Demons, or that they were formed by the mad magician Murphy.\n"); ! printf("\tBut information about them is not located in any specific places,\n"); ! printf("\tand neither is any creature that gets too close to them.\n"); ! } else #endif #ifdef ROCKMOLE *************** *** 226,231 #endif #ifdef ROCKMOLE if(!strcmp(inline, "r a giant rat")) printf("r\ta rockmole\n"); else #endif --- 238,246 ----- #endif #ifdef ROCKMOLE if(!strcmp(inline, "r a giant rat")) + # ifdef KJSMODS + printf("r\ta rockmole (or a giant rat)\n"); + # else printf("r\ta rockmole\n"); # endif else *************** *** 227,232 #ifdef ROCKMOLE if(!strcmp(inline, "r a giant rat")) printf("r\ta rockmole\n"); else #endif #ifdef SPIDERS --- 242,248 ----- printf("r\ta rockmole (or a giant rat)\n"); # else printf("r\ta rockmole\n"); + # endif else #endif #ifdef SPIDERS *** orig/mhitu.c Mon Dec 21 13:05:05 1987 --- new/mhitu.c Mon Dec 21 02:50:35 1987 *************** *** 1,4 ! /* SCCS Id: @(#)mhitu.c 2.1 87/10/18 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ #include "hack.h" --- 1,4 ----- ! /* SCCS Id: @(#)mhitu.c 2.2 87/12/15 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ #include "hack.h" *************** *** 238,243 #ifdef KAA && u.usym == '@' #endif && !uarm && !uarmh && !uarms && !uarmg) { pline("%s hits! (I hope you don't mind)", Monnam(mtmp)); --- 238,246 ----- #ifdef KAA && u.usym == '@' #endif + #ifdef SHIRT + && !uarmu + #endif && !uarm && !uarmh && !uarms && !uarmg) { pline("%s hits! (I hope you don't mind)", Monnam(mtmp)); *** orig/obj.h Mon Dec 21 12:59:06 1987 --- new/obj.h Mon Dec 21 02:59:55 1987 *************** *** 1,4 ! /* SCCS Id: @(#)obj.h 1.4 87/08/08 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* obj.h - version 1.0.3 */ --- 1,4 ----- ! /* SCCS Id: @(#)obj.h 2.2 87/12/15 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* obj.h - version 1.0.3 */ *************** *** 40,45 #define W_ARMH 04L #define W_ARMS 010L #define W_ARMG 020L #define W_ARMOR (W_ARM | W_ARM2 | W_ARMH | W_ARMS | W_ARMG) #define W_RINGL 010000L /* make W_RINGL = RING_LEFT (see uprop) */ #define W_RINGR 020000L --- 40,49 ----- #define W_ARMH 04L #define W_ARMS 010L #define W_ARMG 020L + #ifdef SHIRT + #define W_ARMU 040L + #define W_ARMOR (W_ARM | W_ARM2 | W_ARMH | W_ARMS | W_ARMG | W_ARMU) + #else #define W_ARMOR (W_ARM | W_ARM2 | W_ARMH | W_ARMS | W_ARMG) #endif #define W_RINGL 010000L /* make W_RINGL = RING_LEFT (see uprop) */ *************** *** 41,46 #define W_ARMS 010L #define W_ARMG 020L #define W_ARMOR (W_ARM | W_ARM2 | W_ARMH | W_ARMS | W_ARMG) #define W_RINGL 010000L /* make W_RINGL = RING_LEFT (see uprop) */ #define W_RINGR 020000L #define W_RING (W_RINGL | W_RINGR) --- 45,51 ----- #define W_ARMOR (W_ARM | W_ARM2 | W_ARMH | W_ARMS | W_ARMG | W_ARMU) #else #define W_ARMOR (W_ARM | W_ARM2 | W_ARMH | W_ARMS | W_ARMG) + #endif #define W_RINGL 010000L /* make W_RINGL = RING_LEFT (see uprop) */ #define W_RINGR 020000L #define W_RING (W_RINGL | W_RINGR) *** orig/objects.h Mon Dec 21 13:05:39 1987 --- new/objects.h Mon Dec 21 03:09:20 1987 *************** *** 1,4 ! /* SCCS Id: @(#)objects.h 2.2 87/11/29 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* objects have letter " % ) ( 0 _ ` [ ! ? / = * + */ --- 1,4 ----- ! /* SCCS Id: @(#)objects.h 2.2 87/12/04 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* objects have letter " % ) ( 0 _ ` [ ! ? / = * + */ *************** *** 212,217 /* the armors below do not rust */ ARMOR("studded leather armor", 12, 3, 3, 7, 1), ARMOR("elfin chain mail", 1, 1, 2, 5, 3), ARMOR("bronze plate mail", 6, 5, 9, 4, 0), ARMOR("crystal plate mail", 1, 5, 9, 3, 2), ARMOR("leather armor", 15, 3, 2, 8, 0), --- 212,220 ----- /* the armors below do not rust */ ARMOR("studded leather armor", 12, 3, 3, 7, 1), ARMOR("elfin chain mail", 1, 1, 2, 5, 3), + #ifdef SHIRT + ARMOR("bronze plate mail", 5, 5, 9, 4, 0), + #else ARMOR("bronze plate mail", 6, 5, 9, 4, 0), #endif ARMOR("crystal plate mail", 1, 5, 9, 3, 2), *************** *** 213,218 ARMOR("studded leather armor", 12, 3, 3, 7, 1), ARMOR("elfin chain mail", 1, 1, 2, 5, 3), ARMOR("bronze plate mail", 6, 5, 9, 4, 0), ARMOR("crystal plate mail", 1, 5, 9, 3, 2), ARMOR("leather armor", 15, 3, 2, 8, 0), ARMOR("elven cloak", 5, 0, 2, 9, 3), --- 216,222 ----- ARMOR("bronze plate mail", 5, 5, 9, 4, 0), #else ARMOR("bronze plate mail", 6, 5, 9, 4, 0), + #endif ARMOR("crystal plate mail", 1, 5, 9, 3, 2), ARMOR("leather armor", 15, 3, 2, 8, 0), ARMOR("elven cloak", 5, 0, 2, 9, 3), *************** *** 217,222 ARMOR("leather armor", 15, 3, 2, 8, 0), ARMOR("elven cloak", 5, 0, 2, 9, 3), ARMOR("shield", 3, 0, 2, 9, 0), ARMOR("pair of gloves", 1, 1, 2, 9, 0), #define POTION(name,color) { name, color, NULL, 0, 1,\ --- 221,231 ----- ARMOR("leather armor", 15, 3, 2, 8, 0), ARMOR("elven cloak", 5, 0, 2, 9, 3), ARMOR("shield", 3, 0, 2, 9, 0), + #ifdef SHIRT + ARMOR("Hawaiian shirt", 1, 0, 2,10, 0), + #else + ARMOR("Hawaiian shirt", 0, 0, 2,10, 0), + #endif ARMOR("pair of gloves", 1, 1, 2, 9, 0), #define POTION(name,color) { name, color, NULL, 0, 1,\ *** orig/objnam.c Mon Dec 21 13:04:31 1987 --- new/objnam.c Mon Dec 21 00:52:39 1987 *************** *** 1,4 ! /* SCCS Id: @(#)objnam.c 2.1 87/09/28 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ #include "hack.h" --- 1,4 ----- ! /* SCCS Id: @(#)objnam.c 2.2 87/12/20 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ #include "hack.h" *************** *** 313,320 Sprintf(eos(bp), " (%d)", obj->spe); break; case RING_SYM: ! if(obj->owornmask & W_RINGR) Strcat(bp, " (on right hand)"); ! if(obj->owornmask & W_RINGL) Strcat(bp, " (on left hand)"); if(obj->known && (objects[obj->otyp].bits & SPEC)) { Strcat(prefix, sitoa(obj->spe)); Strcat(prefix, " "); --- 313,325 ----- Sprintf(eos(bp), " (%d)", obj->spe); break; case RING_SYM: ! if(obj->owornmask & W_RINGR) Strcat(bp, " (on right "); ! if(obj->owornmask & W_RINGL) Strcat(bp, " (on left "); ! if(obj->owornmask & W_RING) ! if (humanoid(u.usym)) ! Strcat(bp, "hand)"); ! else ! Strcat(bp, "paw)"); if(obj->known && (objects[obj->otyp].bits & SPEC)) { Strcat(prefix, sitoa(obj->spe)); Strcat(prefix, " "); *************** *** 321,328 } break; } ! if(obj->owornmask & W_WEP) ! Strcat(bp, " (weapon in hand)"); if(obj->unpaid) Strcat(bp, " (unpaid)"); if(!strcmp(prefix, "a ") && index(vowels, *bp)) --- 326,338 ----- } break; } ! if(obj->owornmask & W_WEP) { ! Strcat(bp, " (weapon in "); ! if (humanoid(u.usym)) ! Strcat(bp, "hand)"); ! else ! Strcat(bp, "paw)"); ! } if(obj->unpaid) Strcat(bp, " (unpaid)"); if(!strcmp(prefix, "a ") && index(vowels, *bp)) *************** *** 527,532 an = bp; goto srch; } p = eos(bp); #if defined(KOPS) && !defined(KJSMODS) --- 537,549 ----- an = bp; goto srch; } + #ifdef SHIRT + if (!strcmp(bp, "hawaiian shirt")) { + *(bp) = 'H'; + an = bp; + goto srch; + } + #endif p = eos(bp); #if defined(KOPS) && !defined(KJSMODS) *** orig/options.c Mon Dec 21 13:05:07 1987 --- new/options.c Mon Dec 21 01:28:07 1987 *************** *** 1,4 ! /* SCCS Id: @(#)options.c 2.0 87/09/14 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ #include "config.h" --- 1,4 ----- ! /* SCCS Id: @(#)options.c 2.2 87/12/08 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ #include "config.h" *************** *** 403,409 cd = dest; cs = source; for(count = 1; count < maxlen; count++) { ! if(*cs == ',') break; *cd++ = *cs++; } *cd = 0; --- 403,409 ----- cd = dest; cs = source; for(count = 1; count < maxlen; count++) { ! if(*cs == ',' || *cs == '\0') break; *cd++ = *cs++; } *cd = 0; *************** *** 427,433 #ifndef QUEST "Hack"); #else ! "Quest); #endif if(page_line("") || page_line(buf) || page_line("")) goto quit; --- 427,433 ----- #ifndef QUEST "Hack"); #else ! "Quest"); #endif if(page_line("") || page_line(buf) || page_line("")) goto quit; *************** *** 443,449 Page_line(""); #ifdef DGK ! Page_line("Boolean options are confirm, pickup, rawio, silent, sortpack, time, IBMBIOS,") Page_line("and DECRainbow. These can be negated by prefixing them with '!' or \"no\"."); #else Page_line("Boolean options are rest_on_space, news, time, null tombstone, and (fe)male,"); --- 443,449 ----- Page_line(""); #ifdef DGK ! Page_line("Boolean options are confirm, pickup, rawio, silent, sortpack, time, IBMBIOS,"); Page_line("and DECRainbow. These can be negated by prefixing them with '!' or \"no\"."); #else Page_line("Boolean options are rest_on_space, news, time, null tombstone, and (fe)male,"); *** orig/pager.c Mon Dec 21 13:03:13 1987 --- new/pager.c Mon Dec 21 00:31:03 1987 *************** *** 1,4 ! /* SCCS Id: @(#)pager.c 2.1 87/11/09 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* This file contains the command routine dowhatis() and a pager. */ --- 1,4 ----- ! /* SCCS Id: @(#)pager.c 2.2 87/12/20 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* This file contains the command routine dowhatis() and a pager. */ *************** *** 74,80 #endif #endif /* GRAPHICS */ #ifdef DGKMOD ! if (index(quitchars, q)) { (void) fclose(fp); /* sweet@scubed */ return(0); } --- 74,80 ----- #endif #endif /* GRAPHICS */ #ifdef DGKMOD ! if (q == 'q' || q == 'Q' || index(quitchars, q)) { (void) fclose(fp); /* sweet@scubed */ return(0); } *************** *** 105,111 pline(buf); if(ep[-1] == ';') { pline("More info? "); ! if(readchar() == 'y') { page_more(fp,1); /* does fclose() */ return(0); } --- 105,111 ----- pline(buf); if(ep[-1] == ';') { pline("More info? "); ! if((r = readchar()) == 'y' || r == 'Y') { page_more(fp,1); /* does fclose() */ return(0); } *************** *** 142,148 set_pager(0); bufr = (char *) alloc((unsigned) CO); ! while (fgets(buf, BUFSIZ, fp) && (!strip || *buf == '\t')){ bufp = buf; bufrp = bufr; while (*bufp && *bufp != '\n') { --- 142,148 ----- set_pager(0); bufr = (char *) alloc((unsigned) CO); ! while (fgets(buf, BUFSIZ, fp) && (!strip || *buf == '\t' || *buf == ' ')){ bufp = buf; bufrp = bufr; while (*bufp && *bufp != '\n') { *************** *** 369,375 char c; pline ("Long or short help? "); ! while (((c = readchar ()) != 'l') && (c != 's') && !index(quitchars,c)) bell (); if (!index(quitchars, c)) (void) page_file((c == 'l') ? HELP : SHELP, FALSE); --- 369,376 ----- char c; pline ("Long or short help? "); ! while (((c = readchar ()) != 'l' && c != 'L') && (c != 's' && c != 'S') ! && !index(quitchars,c)) bell (); if (!index(quitchars, c)) (void) page_file((c == 'l' || c == 'L') ? HELP : SHELP, FALSE); *************** *** 372,378 while (((c = readchar ()) != 'l') && (c != 's') && !index(quitchars,c)) bell (); if (!index(quitchars, c)) ! (void) page_file((c == 'l') ? HELP : SHELP, FALSE); return(0); } --- 373,379 ----- && !index(quitchars,c)) bell (); if (!index(quitchars, c)) ! (void) page_file((c == 'l' || c == 'L') ? HELP : SHELP, FALSE); return(0); } *** orig/pcmain.c Mon Dec 21 13:03:58 1987 --- new/pcmain.c Mon Dec 21 03:19:52 1987 *************** *** 1,4 ! /* SCCS Id: @(#)pcmain.c 2.1 87/10/18 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* main.c - (PC) version */ --- 1,4 ----- ! /* SCCS Id: @(#)pcmain.c 2.2 87/12/08 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* main.c - (PC) version */ *************** *** 131,136 clearlocks(); exit(0); } break; #endif case 'u': --- 131,137 ----- clearlocks(); exit(0); } + # endif break; #endif case 'u': *** orig/polyself.c Mon Dec 21 13:01:58 1987 --- new/polyself.c Mon Dec 21 01:02:35 1987 *************** *** 1,4 ! /* SCCS Id: @(#)polyself.c 2.2 87/11/29 /* Polymorph self routine. Called in zap.c. Copyright 1987 by Ken Arromdee */ #include "hack.h" --- 1,4 ----- ! /* SCCS Id: @(#)polyself.c 2.2 87/12/17 /* Polymorph self routine. Called in zap.c. Copyright 1987 by Ken Arromdee */ #include "hack.h" *************** *** 140,146 struct obj *otmp; if (uarm) { if (index("CDMPRUXYdejlouz,'9", turninto)) { ! pline("The transformation causes you to break out of your armor!"); if (uarm2) useup(uarm2); useup(uarm); } else if (index("abcfghikpqrstvxyABEFJQS", turninto)) { --- 140,151 ----- struct obj *otmp; if (uarm) { if (index("CDMPRUXYdejlouz,'9", turninto)) { ! pline("The transformation causes you to %s out of your armor!", ! (uarm2 || uarm->otyp != ELVEN_CLOAK) ? ! "break" : "tear"); ! #ifdef SHIRT ! if (uarmu) useup(uarmu); ! #endif if (uarm2) useup(uarm2); useup(uarm); } else if (index("abcfghikpqrstvxyABEFJQS", turninto)) { *************** *** 154,159 dropx(otmp); } } if (!index("enozCGHIKLNOTUVWXYZ&',", turninto)) { if (otmp = uarmg) { pline("You drop your gloves!"); --- 159,170 ----- dropx(otmp); } } + #ifdef SHIRT + else if (uarmu) { + pline("The transformation causes you to tear out of your shirt!"); + if (uarmu) useup(uarmu); + } + #endif if (!index("enozCGHIKLNOTUVWXYZ&',", turninto)) { if (otmp = uarmg) { pline("You drop your gloves!"); *************** *** 199,204 return(!index("@nGHIKLNOTVWZ&',",c)); } rehumanize() { u.mh = u.mhmax = u.mtimedone = 0; --- 210,221 ----- return(!index("@nGHIKLNOTVWZ&',",c)); } + humanoid(c) /* creature type c has hands */ + char c; + { + return(!!index("@ehintCGHIKLMNOQTVWZ&",c)); + } + rehumanize() { u.mh = u.mhmax = u.mtimedone = 0; *** orig/pri.c Mon Dec 21 13:03:59 1987 --- new/pri.c Mon Dec 21 01:47:06 1987 *************** *** 1,4 ! /* SCCS Id: @(#)pri.c 2.1 87/11/09 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ #include <stdio.h> --- 1,4 ----- ! /* SCCS Id: @(#)pri.c 2.2 87/12/08 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ #include <stdio.h> *************** *** 400,406 "Level %-2d Hp %3d(%d) Energy %3d(%d) Ac %-2d ", dlevel, # ifdef KAA ! u.mtimedone ? u.mh : u.uhp, u.mtimedone ? u.mhmax, u.uhpmax, u.uen, u.uenmax, u.uac); # else u.uhp, u.uhpmax, u.uen, u.uenmax, u.uac); --- 400,406 ----- "Level %-2d Hp %3d(%d) Energy %3d(%d) Ac %-2d ", dlevel, # ifdef KAA ! u.mtimedone ? u.mh : u.uhp, u.mtimedone ? u.mhmax : u.uhpmax, u.uen, u.uenmax, u.uac); # else u.uhp, u.uhpmax, u.uen, u.uenmax, u.uac); *************** *** 409,415 "Level %-2d Hp %3d(%d) Ac %-2d ", dlevel, # ifdef KAA ! u.mtimedone ? u.mh : u.uhp, u.mtimedone ? u.mhmax, u.uhpmax, u.uac); # else u.uhp, u.uhpmax, u.uac); --- 409,415 ----- "Level %-2d Hp %3d(%d) Ac %-2d ", dlevel, # ifdef KAA ! u.mtimedone ? u.mh : u.uhp, u.mtimedone ? u.mhmax : u.uhpmax, u.uac); # else u.uhp, u.uhpmax, u.uac); *** orig/prisym.c Mon Dec 21 13:02:35 1987 --- new/prisym.c Mon Dec 21 01:36:44 1987 *************** *** 1,4 ! /* SCCS Id: @(#)prisym.c 2.0 87/09/14 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ #include <stdio.h> --- 1,4 ----- ! /* SCCS Id: @(#)prisym.c 2.2 87/12/08 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ #include <stdio.h> *************** *** 44,49 let = y; return; } if((int)x == -1 && (int)y >= 0){ /* open or close call */ let = y; prevx = -1; --- 44,52 ----- let = y; return; } + #if defined(MSDOS) && defined(GRAPHICS) + if((int)x == -1 && (int)y != -1){ /* open or close call */ + #else if((int)x == -1 && (int)y >= 0){ /* open or close call */ #endif let = y; *************** *** 45,50 return; } if((int)x == -1 && (int)y >= 0){ /* open or close call */ let = y; prevx = -1; return; --- 48,54 ----- if((int)x == -1 && (int)y != -1){ /* open or close call */ #else if((int)x == -1 && (int)y >= 0){ /* open or close call */ + #endif let = y; prevx = -1; return; *************** *** 71,76 static coord tc[COLNO]; /* but watch reflecting beams! */ register xx,yy; if((int)x == -1) { if(y > 0) { /* open call */ let = y; cnt = 0; --- 75,83 ----- static coord tc[COLNO]; /* but watch reflecting beams! */ register xx,yy; if((int)x == -1) { + #if defined(MSDOS) && defined(GRAPHICS) + if(y && y != -1) { /* open call */ + #else if(y > 0) { /* open call */ #endif let = y; *************** *** 72,77 register xx,yy; if((int)x == -1) { if(y > 0) { /* open call */ let = y; cnt = 0; return; --- 79,85 ----- if(y && y != -1) { /* open call */ #else if(y > 0) { /* open call */ + #endif let = y; cnt = 0; return; *** orig/read.c Mon Dec 21 13:06:03 1987 --- new/read.c Mon Dec 21 02:00:35 1987 *************** *** 1,4 ! /* SCCS Id: @(#)read.c 2.2 87/11/29 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ #include "hack.h" --- 1,4 ----- ! /* SCCS Id: @(#)read.c 2.2 87/12/15 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ #include "hack.h" *************** *** 679,684 if(uarm) { pline("Your armor turns to dust and falls to the floor!"); useup(uarm); } else if(uarmh) { pline("Your helmet turns to dust and is blown away!"); useup(uarmh); --- 679,689 ----- if(uarm) { pline("Your armor turns to dust and falls to the floor!"); useup(uarm); + #ifdef SHIRT + } else if(uarmu) { + pline("Your shirt crumbles into tiny threads and falls apart!"); + useup(uarmu); + #endif } else if(uarmh) { pline("Your helmet turns to dust and is blown away!"); useup(uarmh); *** orig/steal.c Mon Dec 21 13:01:14 1987 --- new/steal.c Mon Dec 21 00:41:02 1987 *************** *** 1,4 ! /* SCCS Id: @(#)steal.c 1.4 87/08/08 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* steal.c - version 1.0.3 */ --- 1,4 ----- ! /* SCCS Id: @(#)steal.c 2.2 87/12/14 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* steal.c - version 1.0.3 */ *************** *** 103,110 otmp->cursed = 0; stop_occupation(); if(flags.female) ! pline("%s charms you. You gladly hand over your humble garments.", ! Monnam(mtmp)); else pline("%s seduces you and %s off your %s.", Amonnam(mtmp, Blind ? "gentle" : "beautiful"), --- 103,118 ----- otmp->cursed = 0; stop_occupation(); if(flags.female) ! pline("%s charms you. You gladly %s your %s.", ! Monnam(mtmp), ! curssv ? "hand over" ! : "let her take", ! (otmp == uarmg) ? "gloves" : ! (otmp == uarmh) ? "helmet" : ! #ifdef SHIRT ! (otmp == uarmu) ? "shirt" : ! #endif ! "armor"); else pline("%s seduces you and %s off your %s.", Amonnam(mtmp, Blind ? "gentle" : "beautiful"), *************** *** 108,114 else pline("%s seduces you and %s off your %s.", Amonnam(mtmp, Blind ? "gentle" : "beautiful"), ! otmp->cursed ? "helps you to take" : "you start taking", (otmp == uarmg) ? "gloves" : (otmp == uarmh) ? "helmet" : "armor"); --- 116,122 ----- else pline("%s seduces you and %s off your %s.", Amonnam(mtmp, Blind ? "gentle" : "beautiful"), ! curssv ? "helps you to take" : "you start taking", (otmp == uarmg) ? "gloves" : (otmp == uarmh) ? "helmet" : *************** *** 111,117 otmp->cursed ? "helps you to take" : "you start taking", (otmp == uarmg) ? "gloves" : ! (otmp == uarmh) ? "helmet" : "armor"); named++; (void) armoroff(otmp); otmp->cursed = curssv; --- 119,129 ----- curssv ? "helps you to take" : "you start taking", (otmp == uarmg) ? "gloves" : ! (otmp == uarmh) ? "helmet" : ! #ifdef SHIRT ! (otmp == uarmu) ? "shirt" : ! #endif ! "armor"); named++; (void) armoroff(otmp); otmp->cursed = curssv; *** orig/termcap.c Mon Dec 21 13:02:36 1987 --- new/termcap.c Mon Dec 21 01:09:37 1987 *************** *** 1,4 ! /* SCCS Id: @(#)termcap.c 2.1 87/10/19 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ #include <stdio.h> --- 1,4 ----- ! /* SCCS Id: @(#)termcap.c 2.2 87/12/15 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ #include <stdio.h> *************** *** 25,31 char *CD; /* tested in pri.c: docorner() */ int CO, LI; /* used in pri.c and whatis.c */ ! #ifdef MSDOS static char tgotobuf[20]; #define tgoto(fmt, x, y) (sprintf(tgotobuf, fmt, y+1, x+1), tgotobuf) #endif /* MSDOS /**/ --- 25,31 ----- char *CD; /* tested in pri.c: docorner() */ int CO, LI; /* used in pri.c and whatis.c */ ! #ifdef MSDOS && !defined(TERMLIB) static char tgotobuf[20]; #define tgoto(fmt, x, y) (sprintf(tgotobuf, fmt, y+1, x+1), tgotobuf) #endif /* MSDOS /**/ *************** *** 32,38 startup() { ! #ifdef MSDOS HO = "\033[H"; CL = "\033[2J"; CE = "\033[K"; --- 32,38 ----- startup() { ! #if defined(MSDOS) && !defined(TERMLIB) HO = "\033[H"; CL = "\033[2J"; CE = "\033[K"; *************** *** 44,50 # ifdef MSDOSCOLOR /* creps@silver.bacs.indiana.edu */ TI = "\033[44;37m"; TE = "\033[0m"; ! VS = VE = ""; SO = "\033[31m"; SE = "\033[44;37m"; # else --- 44,50 ----- # ifdef MSDOSCOLOR /* creps@silver.bacs.indiana.edu */ TI = "\033[44;37m"; TE = "\033[0m"; ! VS = VE = 0; SO = "\033[31m"; SE = "\033[44;37m"; # else *************** *** 48,54 SO = "\033[31m"; SE = "\033[44;37m"; # else ! TI = TE = VS = VE = ""; SO = "\033[7m"; SE = "\033[0m"; # endif --- 48,54 ----- SO = "\033[31m"; SE = "\033[44;37m"; # else ! TI = TE = VS = VE = 0; SO = "\033[7m"; SE = "\033[0m"; # endif *************** *** 120,126 if(!SO || !SE || (SG > 0)) SO = SE = US = UE = 0; TI = tgetstr("ti", &tbufptr); TE = tgetstr("te", &tbufptr); ! VS = VE = ""; # ifdef SORTING /* Get rid of padding numbers for HI and HE. Hope they * aren't really needed!!! HI and HE are ouputted to the --- 120,126 ----- if(!SO || !SE || (SG > 0)) SO = SE = US = UE = 0; TI = tgetstr("ti", &tbufptr); TE = tgetstr("te", &tbufptr); ! VS = VE = 0; # ifdef SORTING /* Get rid of padding numbers for HI and HE. Hope they * aren't really needed!!! HI and HE are ouputted to the *************** *** 249,255 } xputs(s) char *s; { ! #ifdef MSDOS fputs(s, stdout); #else tputs(s, 1, xputc); --- 253,259 ----- } xputs(s) char *s; { ! #ifdef MSDOS && !defined(TERMLIB) fputs(s, stdout); #else tputs(s, 1, xputc); *************** *** 278,286 clear_screen() { xputs(CL); ! #ifdef MSDOSCOLOR ! xputs(TI); ! #endif home(); } --- 282,291 ----- clear_screen() { xputs(CL); ! /*#ifdef MSDOSCOLOR ! /* xputs(TI); ! /*#endif ! */ home(); } *** orig/timeout.c Mon Dec 21 13:00:21 1987 --- new/timeout.c Mon Dec 21 00:02:33 1987 *************** *** 1,4 ! /* SCCS Id: @(#)timeout.c 2.0 87/09/18 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ #include "hack.h" --- 1,4 ----- ! /* SCCS Id: @(#)timeout.c 2.2 87/12/20 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ #include "hack.h" *************** *** 19,24 if((upp->p_flgs & TIMEOUT) && !(--upp->p_flgs & TIMEOUT)) { if(upp->p_tofn) (*upp->p_tofn)(); else switch(upp - u.uprops){ case STONED: killer = "cockatrice"; done("died"); --- 19,27 ----- if((upp->p_flgs & TIMEOUT) && !(--upp->p_flgs & TIMEOUT)) { if(upp->p_tofn) (*upp->p_tofn)(); else switch(upp - u.uprops){ + case BLINDFOLDED: + Blindfolded = -1; + break; case STONED: killer = "cockatrice"; done("died"); *** orig/u_init.c Mon Dec 21 13:04:33 1987 --- new/u_init.c Mon Dec 21 02:10:32 1987 *************** *** 1,4 ! /* SCCS Id: @(#)u_init.c 2.0 87/09/15 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ #include <stdio.h> --- 1,4 ----- ! /* SCCS Id: @(#)u_init.c 2.2 87/12/15 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ #include <stdio.h> *************** *** 141,146 { POT_EXTRA_HEALING, 0, POTION_SYM, 2, 0 }, { EXPENSIVE_CAMERA, 0, TOOL_SYM, 1, 1 }, { DART, 2, WEAPON_SYM, 25, 1 }, /* quan is variable */ { 0, 0, 0, 0, 0 } }; --- 141,149 ----- { POT_EXTRA_HEALING, 0, POTION_SYM, 2, 0 }, { EXPENSIVE_CAMERA, 0, TOOL_SYM, 1, 1 }, { DART, 2, WEAPON_SYM, 25, 1 }, /* quan is variable */ + #ifdef SHIRT + { HAWAIIAN_SHIRT, 0, ARMOR_SYM, 1, 1 }, + #endif { 0, 0, 0, 0, 0 } }; *************** *** 283,288 u.ulevel = 1; init_uhunger(); uarm = uarm2 = uarmh = uarms = uarmg = uwep = uball = uchain = uleft = uright = 0; #ifdef SPELLS --- 286,294 ----- u.ulevel = 1; init_uhunger(); uarm = uarm2 = uarmh = uarms = uarmg = uwep = + #ifdef SHIRT + uarmu = + #endif uball = uchain = uleft = uright = 0; #ifdef SPELLS *************** *** 494,499 case PAIR_OF_GLOVES: if(!uarmg) setworn(obj, W_ARMG); break; case ELVEN_CLOAK: if(!uarm2) setworn(obj, W_ARM); --- 500,510 ----- case PAIR_OF_GLOVES: if(!uarmg) setworn(obj, W_ARMG); break; + #ifdef SHIRT + case HAWAIIAN_SHIRT: + if(!uarmu) setworn(obj, W_ARMU); + break; + #endif case ELVEN_CLOAK: if(!uarm2) setworn(obj, W_ARM); *** orig/worn.c Mon Dec 21 12:59:09 1987 --- new/worn.c Mon Dec 21 02:12:46 1987 *************** *** 1,4 ! /* SCCS Id: @(#)worn.c 1.4 87/08/08 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* worn.c - version 1.0.2 */ --- 1,4 ----- ! /* SCCS Id: @(#)worn.c 2.2 87/12/15 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* worn.c - version 1.0.2 */ *************** *** 13,18 { W_ARMH, &uarmh }, { W_ARMS, &uarms }, { W_ARMG, &uarmg }, { W_RINGL, &uleft }, { W_RINGR, &uright }, { W_WEP, &uwep }, --- 13,19 ----- { W_ARMH, &uarmh }, { W_ARMS, &uarms }, { W_ARMG, &uarmg }, + { W_ARMU, &uarmu }, { W_RINGL, &uleft }, { W_RINGR, &uright }, { W_WEP, &uwep }, *** orig/you.h Mon Dec 21 13:00:23 1987 --- new/you.h Sun Dec 20 23:58:01 1987 *************** *** 1,4 ! /* SCCS Id: @(#)you.h 2.1 87/11/09 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ #ifndef YOU_H --- 1,4 ----- ! /* SCCS Id: @(#)you.h 2.2 87/12/20 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ #ifndef YOU_H *************** *** 79,85 #define Blindfolded u.uprops[BLINDFOLDED].p_flgs #define Blind (Blinded || Blindfolded) #define PROP(x) (x-RIN_ADORNMENT) /* convert ring to index in uprops */ ! struct prop uprops[LAST_RING+11]; unsigned umconf; char *usick_cause; --- 79,85 ----- #define Blindfolded u.uprops[BLINDFOLDED].p_flgs #define Blind (Blinded || Blindfolded) #define PROP(x) (x-RIN_ADORNMENT) /* convert ring to index in uprops */ ! struct prop uprops[LAST_RING+12]; unsigned umconf; char *usick_cause; -- "Science does not remove the terror of the gods." | Steve Linhart -- J.R. "Bob" Dobbs | linhart@gauss.rutgers.edu "One man's theology is another man's belly laugh." | Matrix 1:107/513 -- Lazarus Long | 201-878-0937
straney@msudoc.ee.mich-state.edu (Ronald W. DeBry) (12/29/87)
In article <325@gauss.rutgers.edu> Steve Linhart of linhart@gauss.RUTGERS.EDU (D-ro 3) writes: >Here they are. The Hawaiian shirt/TERMLIB mods and lots of bug fixes, >especially regarding blindfolds. Drag out your original shell >archives... > >3) Move your saved article to that directory, and enter "patch <file" > Thanks, but what is "patch"? Our SYSVr2.0 doesn't have it (no suprise, SYSV doesn't have diff -c either), nor does the Ultrix machine that I have an account on. Is there a PD version? I typed in most of them by hand, but somehow Hawiian shirts didn't seem so important at the time (2:30 AM, I think :-})