mike@genpyr.UUCP (Mike Stephenson) (04/14/88)
-------------------------------cut here--------------------------------------- #! /bin/sh # This is a shell archive, meaning: # 1. Remove everything above the #! /bin/sh line. # 2. Save the resulting text in a file. # 3. Execute the file with /bin/sh (not csh) to create the files: # Update.2.3.e # This archive created: Mon Apr 4 08:52:36 1988 export PATH; PATH=/bin:$PATH echo shar: extracting "'Update.2.3.e'" '(37968 characters)' if test -f 'Update.2.3.e' then echo shar: will not over-write existing file "'Update.2.3.e'" else cat << \SHAR_EOF > 'Update.2.3.e' *** ./pcmain.c.orig Mon Feb 22 08:40:11 1988 --- ./pcmain.c Thu Mar 31 11:19:13 1988 *************** *** 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.3 87/12/12 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* main.c - (PC) version */ *************** *** 35,40 { register int fd; register char *dir; #ifdef MSDOS static void moveloop(); /* a helper function for MSC optimizer */ --- 35,41 ----- { register int fd; register char *dir; + extern struct monst *makedog(); #ifdef MSDOS static void moveloop(); /* a helper function for MSC optimizer */ *************** *** 44,50 int (*funcp)(); if (getcwd(orgdir, sizeof orgdir) == NULL) { ! xputs("hack: current directory path too long\n"); _exit(1); } funcp = exit; /* Kludge to get around LINT_ARGS of signal. --- 45,51 ----- int (*funcp)(); if (getcwd(orgdir, sizeof orgdir) == NULL) { ! xputs("NetHack: current directory path too long\n"); _exit(1); } funcp = exit; /* Kludge to get around LINT_ARGS of signal. *************** *** 131,136 clearlocks(); exit(0); } break; #endif case 'u': --- 132,138 ----- clearlocks(); exit(0); } + # endif break; #endif case 'u': *************** *** 222,228 (void) fflush(stdout); if(!dorecover(fd)) goto not_recovered; ! pline("Hello %s, welcome to %s!", plname, hname); flags.move = 0; } else { not_recovered: --- 224,241 ----- (void) fflush(stdout); if(!dorecover(fd)) goto not_recovered; ! pline("Hello %s%s, welcome to %s!", ! (Badged) ? "Officer " : "", plname, hname); ! #ifdef WIZARD ! if (wizard && dlevel == 1) ! # ifdef STOOGES ! pline ("The wiz is at %d, the medusa is at %d, and the stooges are at %d", ! u.wiz_level, u.medusa_level, u.stooge_level); ! # else ! pline ("The wiz is at %d, and the medusa at %d", ! u.wiz_level, u.medusa_level); ! # endif ! #endif flags.move = 0; } else { not_recovered: *************** *** 270,276 flags.moonphase = phase_of_the_moon(); if(flags.moonphase == FULL_MOON) { pline("You are lucky! Full moon tonight."); ! if(!u.uluck) u.uluck++; } else if(flags.moonphase == NEW_MOON) { pline("Be careful! New moon tonight."); } --- 283,289 ----- flags.moonphase = phase_of_the_moon(); if(flags.moonphase == FULL_MOON) { pline("You are lucky! Full moon tonight."); ! if(!u.uluck) change_luck(1); } else if(flags.moonphase == NEW_MOON) { pline("Be careful! New moon tonight."); } *************** *** 566,571 stop_occupation() { if(occupation) { pline("You stop %s.", occtxt); occupation = 0; --- 579,586 ----- stop_occupation() { + extern void pushch(); + if(occupation) { pline("You stop %s.", occtxt); occupation = 0; *** ./pctty.c.orig Mon Feb 22 08:40:12 1988 --- ./pctty.c Thu Mar 31 08:58:38 1988 *************** *** 1,4 ! /* SCCS Id: @(#)pctty.c 2.1 87/11/09 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* tty.c - (PC) version */ --- 1,4 ----- ! /* SCCS Id: @(#)pctty.c 2.3 87/12/12 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* tty.c - (PC) version */ *************** *** 10,15 #include "hack.h" #include "func_tab.h" static char erase_char, kill_char; /* --- 10,17 ----- #include "hack.h" #include "func_tab.h" + extern void savech(); + static char erase_char, kill_char; /* *************** *** 288,291 } } ! #endif COM_COMPL --- 290,293 ----- } } ! #endif /* COM_COMPL /* */ *** ./polyself.c.orig Mon Feb 22 08:40:12 1988 --- ./polyself.c Thu Feb 18 13:29:42 1988 *************** *** 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.3 88/01/21 /* Polymorph self routine. Called in zap.c. Copyright 1987 by Ken Arromdee */ #include "hack.h" *************** *** 122,128 u.mtimedone = 500 + rn2(500); flags.botl = 1; if (u.usym == 'D') ! pline("Use the command #breathe to breathe."); if (u.usym == 'N') pline("Use the command #remove if you have to remove an iron ball."); find_ac(); --- 122,128 ----- u.mtimedone = 500 + rn2(500); flags.botl = 1; if (u.usym == 'D') ! pline("Use the command #breathe to breathe fire."); if (u.usym == 'N') pline("Use the command #remove if you have to remove an iron ball."); find_ac(); *************** *** 139,151 { 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)) { ! pline("Your armor falls around you!"); ! if (otmp = uarm2) { setworn((struct obj *)0,otmp->owornmask & W_ARM2); dropx(otmp); } --- 139,155 ----- { 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)) { ! pline("Your armor falls around you!"); ! if (otmp = uarm2) { setworn((struct obj *)0,otmp->owornmask & W_ARM2); dropx(otmp); } *************** *** 148,158 if (otmp = uarm2) { setworn((struct obj *)0,otmp->owornmask & W_ARM2); dropx(otmp); ! } ! otmp = uarm; ! setworn((struct obj *)0, otmp->owornmask & W_ARM); ! dropx(otmp); ! } } if (!index("enozCGHIKLNOTUVWXYZ&',", turninto)) { if (otmp = uarmg) { --- 152,162 ----- if (otmp = uarm2) { setworn((struct obj *)0,otmp->owornmask & W_ARM2); dropx(otmp); ! } ! otmp = uarm; ! setworn((struct obj *)0, otmp->owornmask & W_ARM); ! dropx(otmp); ! } } #ifdef SHIRT else if (uarmu) { *************** *** 154,159 dropx(otmp); } } if (!index("enozCGHIKLNOTUVWXYZ&',", turninto)) { if (otmp = uarmg) { pline("You drop your gloves!"); --- 158,169 ----- 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; --- 209,220 ----- 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; *************** *** 224,230 if(!getdir(1)) return(0); if (rn2(4)) pline("You exhale a bit of smoke."); ! else buzz(10, u.ux, u.uy, u.dx, u.dy); /* Changes must be made in zap.c to accommodate this. */ } else pline("You do not have the ability to breathe fire!"); return(1); --- 240,246 ----- if(!getdir(1)) return(0); if (rn2(4)) pline("You exhale a bit of smoke."); ! else buzz(20, u.ux, u.uy, u.dx, u.dy); /* Changes must be made in zap.c to accommodate this. */ } else pline("You do not have the ability to breathe fire!"); return(1); *** ./potion.c.orig Mon Feb 22 08:40:13 1988 --- ./potion.c Thu Mar 31 17:16:47 1988 *************** *** 1,4 ! /* SCCS Id: @(#)potion.c 2.1 87/09/29 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ #include "hack.h" --- 1,4 ----- ! /* SCCS Id: @(#)potion.c 2.3 88/02/11 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ #include "hack.h" *************** *** 42,47 ghost_from_bottle(); goto use_it; } if((retval = peffects(otmp)) >= 0) return(retval); if(nothing) { --- 42,51 ----- ghost_from_bottle(); goto use_it; } + if(!strcmp(objects[otmp->otyp].oc_descr, "glowing") && !rn2(13)) { + djinni_from_bottle(); + goto use_it; + } if((retval = peffects(otmp)) >= 0) return(retval); if(nothing) { *************** *** 582,587 pline("As you open the bottle, an enormous ghost emerges!"); pline("You are frightened to death, and unable to move."); nomul(-3); } gainstr(inc) --- 586,630 ----- pline("As you open the bottle, an enormous ghost emerges!"); pline("You are frightened to death, and unable to move."); nomul(-3); + } + + djinni_from_bottle(){ + extern struct permonst pm_djinni; + register struct monst *mtmp; + + if(!(mtmp = makemon(PM_DJINNI,u.ux,u.uy))){ + pline("It turns out to be empty."); + return; + } + + mtmp->isdjinni = 1; + mnexto(mtmp); + if (!Blind) { + pline("In a cloud of smoke, a djinni emerges!"); + pline("%s speaks.", Monnam(mtmp)); + } else { + pline("You smell fumes!"); + pline("Something speaks."); + } + + switch (rn2(5)) { + case 0 : pline("'I am in your debt. I will grant one wish!'"); + makewish(); + mondied(mtmp); + break; + case 1 : pline("'Thank you for freeing me!'"); + tamedog(mtmp, (struct obj *) 0); + break; + case 2 : pline("'You freed me!'"); + mtmp->mpeaceful = 1; + break; + case 3 : pline("'It is about time!'"); + pline("The djinni vanishes!"); + mondied(mtmp); + break; + default: pline("You disturbed me fool!"); + break; + } } gainstr(inc) *** ./pray.c.orig Mon Feb 22 08:40:13 1988 --- ./pray.c Fri Feb 12 11:18:05 1988 *************** *** 1,4 ! /* SCCS Id: @(#)pray.c 2.1 87/10/07 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ #include "hack.h" --- 1,4 ----- ! /* SCCS Id: @(#)pray.c 2.3 87/12/12 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ #include "hack.h" *************** *** 7,13 extern struct monst *mkmon_at(); extern struct obj *mkobj_at(); - dopray() { /* M. Stephenson (1.0.3b) */ #ifdef PRAYERS if (u.ublesscnt > 0) { /* disturbing the gods too much */ --- 7,12 ----- extern struct monst *mkmon_at(); extern struct obj *mkobj_at(); #ifdef PRAYERS #ifdef THEOLOGY *************** *** 9,15 dopray() { /* M. Stephenson (1.0.3b) */ #ifdef PRAYERS ! if (u.ublesscnt > 0) { /* disturbing the gods too much */ u.ublesscnt += 200; u.uluck -= 3; --- 8,14 ----- extern struct obj *mkobj_at(); #ifdef PRAYERS ! #ifdef THEOLOGY #define TROUBLE_STONED 1 #define TROUBLE_STARVING 2 *************** *** 11,19 #ifdef PRAYERS if (u.ublesscnt > 0) { /* disturbing the gods too much */ ! u.ublesscnt += 200; ! u.uluck -= 3; ! if (u.uluck < LUCKMIN) u.uluck = LUCKMIN; #ifdef HARD u.ugangr++; angrygods(); --- 10,209 ----- #ifdef PRAYERS #ifdef THEOLOGY ! #define TROUBLE_STONED 1 ! #define TROUBLE_STARVING 2 ! #define TROUBLE_SICK 3 ! #define TROUBLE_HIT 4 ! ! #define TROUBLE_PUNISHED (-1) ! #define TROUBLE_CURSED_ITEMS (-2) ! #define TROUBLE_HUNGRY (-3) ! #define TROUBLE_HALLUCINATION (-4) ! #define TROUBLE_BLIND (-5) ! #define TROUBLE_POISONED (-6) ! #define TROUBLE_WOUNDED_LEGS (-7) ! #define TROUBLE_CONFUSED (-8) ! ! /* We could force rehumanize of polyselfed people, but we can't tell ! unintentional shape changes from the other kind. Oh well. */ ! ! /* Return 0 if nothing particular seems wrong, positive numbers for ! serious trouble, and negative numbers for comparative annoyances. This ! returns the worst problem. There may be others, and the gods may fix ! more than one. ! ! This could get as bizarre as noting surrounding opponents, (or hostile dogs), ! but that's really hard. ! */ ! ! ! in_trouble () { ! ! /* Borrowed from eat.c */ ! ! #define SATIATED 0 ! #define NOT_HUNGRY 1 ! #define HUNGRY 2 ! #define WEAK 3 ! #define FAINTING 4 ! #define FAINTED 5 ! #define STARVED 6 ! ! if (Stoned) return (TROUBLE_STONED); ! if (u.uhs >= WEAK) return (TROUBLE_STARVING); ! if (Sick) return (TROUBLE_SICK); ! if (u.uhp < 5) return (TROUBLE_HIT); ! if (Punished) return (TROUBLE_PUNISHED); ! if ( ! (uarmh && uarmh->cursed) /* helmet */ ! || ! (uarms && uarms->cursed) /* shield */ ! || ! (uarmg && uarmg->cursed) /* gloves */ ! || ! (uarm && uarm->cursed) /* armor */ ! || ! (uarm2 && uarm2->cursed) /* cloak */ ! || ! (uwep && (uwep->olet == WEAPON_SYM) && (uwep->cursed)) ! || ! (uleft && uleft->cursed) ! || ! (uright && uright->cursed)) ! return (TROUBLE_CURSED_ITEMS); ! ! if (u.uhs >= HUNGRY) return (TROUBLE_HUNGRY); ! if (Hallucination) return (TROUBLE_HALLUCINATION); ! if (Blinded > 1) return (TROUBLE_BLIND); /* don't loop when fixing sets to 1 */ ! if (u.ustr < u.ustrmax) return (TROUBLE_POISONED); ! if (Wounded_legs) return (TROUBLE_WOUNDED_LEGS); ! if (Confusion) return (TROUBLE_CONFUSED); ! return (0); ! } ! ! fix_worst_trouble () ! { ! char *tmp, *hcolor(); ! ! switch (in_trouble ()) { ! case TROUBLE_STONED: pline ("You feel more limber."); Stoned = 0; break; ! case TROUBLE_HUNGRY: ! case TROUBLE_STARVING: pline ("Your stomach feels content."); init_uhunger (); break; ! case TROUBLE_SICK: pline ("You feel better."); Sick = 0; break; ! case TROUBLE_HIT: ! pline("A %s glow surrounds you", ! Hallucination ? hcolor () : "golden"); ! u.uhp = u.uhpmax += 5; ! break; ! ! case TROUBLE_PUNISHED: ! Punished = 0; ! freeobj(uchain); ! unpobj(uchain); ! free((char *) uchain); ! uball->spe = 0; ! uball->owornmask &= ~W_BALL; ! uchain = uball = (struct obj *) 0; ! break; ! ! case TROUBLE_CURSED_ITEMS: ! { struct obj *otmp; ! char * what; ! otmp = (struct obj *) 0; ! what = (char *) 0; ! if (uarmh && uarmh->cursed) /* helmet */ ! otmp = uarmh; ! else if (uarms && uarms->cursed) /* shield */ ! otmp = uarms; ! else if (uarmg && uarmg->cursed) /* gloves */ ! otmp = uarmg; ! else if (uarm && uarm->cursed) /* armor */ ! otmp = uarm; ! else if (uarm2 && uarm2->cursed) /* cloak, probably */ ! otmp = uarm2; ! else if (uleft && uleft->cursed) { ! otmp = uleft; ! what = "left hand"; ! } ! else if (uright && uright->cursed) { ! otmp = uright; ! what = "right hand"; ! } ! else if(uwep && (uwep->olet == WEAPON_SYM) && (uwep->cursed)) ! otmp = uwep; ! ! otmp->cursed = 0; ! pline ("Your %s %s.", what ? what : aobjnam (otmp, "softly glow"), ! Hallucination ? hcolor() : "amber"); ! break; ! } ! ! case TROUBLE_HALLUCINATION: ! pline ("Looks like you are back in kansas."); Hallucination = 0; break; ! case TROUBLE_BLIND: ! pline ("Your eyes feel better."); Blinded = 1; break; ! case TROUBLE_POISONED: ! pline("There's a tiger in your tank."); ! if(u.ustr < u.ustrmax) { ! u.ustr = u.ustrmax; ! flags.botl = 1; ! } ! break; ! case TROUBLE_WOUNDED_LEGS: ! heal_legs (); ! break; ! case TROUBLE_CONFUSED: ! HConfusion = 0; ! break; ! } ! } ! ! #define CORPSE_I_TO_C(otyp) (char) ((otyp >= DEAD_ACID_BLOB)\ ! ? 'a' + (otyp - DEAD_ACID_BLOB)\ ! : '@' + (otyp - DEAD_HUMAN)) ! ! extern char POISONOUS[]; ! ! dosacrifice () { ! register struct obj *otmp; ! register struct objclass *ftmp; ! int value; ! char let; ! char *hcolor (); ! ! otmp = getobj("%", "sacrifice"); ! if(!otmp) return(0); ! ! ftmp = &objects[otmp->otyp]; ! #ifdef KAA ! if(otmp->otyp == DEAD_DEMON) let='&'; ! else if (otmp->otyp == DEAD_GIANT) let='9'; ! else let = CORPSE_I_TO_C(otmp->otyp); ! #else ! let = CORPSE_I_TO_C(otmp->otyp); ! #endif ! ! /* judge the food value by the nutrition, as well as some aging behavior */ ! ! value = ftmp->nutrition; ! ! if (otmp->otyp >= CORPSE) ! { ! if (let != 'a' && (moves > otmp->age + 50)) ! value = 0; /* old stuff */ ! } ! else if(index(POISONOUS, let)) { ! value = -10; /* gods get annoyed */ ! } ! ! ! if (value == 0) ! { ! pline ("Nothing happens."); ! return (1); ! } ! if (value < 0) /* Gods don't like poision as an offering. */ ! { #ifdef HARD u.ugangr++; angrygods(); *************** *** 15,20 u.uluck -= 3; if (u.uluck < LUCKMIN) u.uluck = LUCKMIN; #ifdef HARD u.ugangr++; angrygods(); #else --- 205,292 ----- if (value < 0) /* Gods don't like poision as an offering. */ { #ifdef HARD + u.ugangr++; + angrygods(); + #else + if (u.ugangr++) angrygods(); + else { /* exactly one warning */ + pline("A voice booms out: You have angered us,"); + pline("Disturb us again at your own risk!"); + } + #endif + } + if (value > 0) + { + int saved_anger = u.ugangr; + int saved_cnt = u.ublesscnt; + int saved_luck = u.uluck; + /* OK, you get brownie points. */ + if (Hallucination) + pline("Your sacrifice sprouts wings and a propeller and roars away!"); + else pline("Your sacrifice is consumed in a burst of flame!"); + if(u.ugangr) + { + u.ugangr -= ((value / 800) * 4); + if(u.ugangr < 0) u.ugangr = 0; + if(u.ugangr != saved_anger) + if (u.ugangr) + { + if (Hallucination) pline ("The gods seem %s.", hcolor ()); + else pline("The gods seem slightly molified."); + } + else { + if (Hallucination) pline ("The gods seem cosmic (not a new fact)."); + else pline ("The gods seem mollified."); + } + if ((int)u.uluck < 0) u.uluck = 0; + } + else if (u.ublesscnt > 0) + { + u.ublesscnt -= ((value / 800 /* a food ration */) * 300); + if(u.ublesscnt < 0) u.ublesscnt = 0; + if(u.ublesscnt != saved_cnt) + { + if ((int)u.uluck < 0) u.uluck = 0; + if (u.ublesscnt) { + if (Hallucination) pline ("You realize that the gods are not like you and I."); + else pline ("You have a hopeful feeling."); + } + else { + if (Hallucination) pline ("Overall, there is a smell of fried onions."); + else pline ("You have a feeling of reconciliation."); + } + } + } + else /* you were already in pretty good standing */ + { + change_luck((value / 800) * LUCKMAX); + if (u.uluck != saved_luck) + { + if (Hallucination) pline ("You see crabgrass at your feet. A funny thing in a dungeon."); + else pline ("You see a four-leaf clover at your feet."); + } + } + } + useup(otmp); + return(1); + } + #endif + #endif + + dopray() { /* M. Stephenson (1.0.3b) */ + #ifdef PRAYERS + #ifdef THEOLOGY + int trouble = in_trouble (); + if ((!trouble && (u.ublesscnt > 0)) || + ((trouble < 0) && (u.ublesscnt > 100)) /* minor difficulties */ || + ((trouble > 0) && (u.ublesscnt > 200)) /* big trouble */ + ) { + #else + if (u.ublesscnt > 0) { /* disturbing the gods too much */ + #endif + u.ublesscnt += rnz(250); + change_luck(-3); + #ifdef HARD u.ugangr++; angrygods(); #else *************** *** 24,31 pline("Disturb us again at your own risk!"); } #endif ! } else if (u.uluck < 0) angrygods(); /* a bad boy/girl */ ! else pleased(); /* or a good boy/girl */ #endif nomovemsg = "You finished your prayer."; nomul(-3); --- 296,303 ----- pline("Disturb us again at your own risk!"); } #endif ! } else if ((int)u.uluck < 0) angrygods(); /* a bad player */ ! else pleased(); /* or a good player */ #endif nomovemsg = "You finished your prayer."; nomul(-3); *************** *** 71,77 done("died"); break; } ! u.ublesscnt = 250; return(0); } --- 343,349 ----- done("died"); break; } ! u.ublesscnt = rnz(300); return(0); } *************** *** 75,80 return(0); } pleased() { char *tmp, *hcolor(); --- 347,354 ----- return(0); } + + pleased() { char *tmp, *hcolor(); *************** *** 78,84 pleased() { char *tmp, *hcolor(); ! u.ugangr--; if (u.ugangr < 0) u.ugangr = 0; pline("You feel the gods are pleased."); --- 352,361 ----- pleased() { char *tmp, *hcolor(); ! #ifdef THEOLOGY ! int trouble = in_trouble (); /* what's your worst difficulty? */ ! int pat_on_head = 0; ! #endif u.ugangr--; if (u.ugangr < 0) u.ugangr = 0; pline("You feel the gods are pleased."); *************** *** 83,88 if (u.ugangr < 0) u.ugangr = 0; pline("You feel the gods are pleased."); switch(rn2((u.uluck + 6)/2)) { case 0: pline("but nothing seems to happen."); --- 360,393 ----- if (u.ugangr < 0) u.ugangr = 0; pline("You feel the gods are pleased."); + #ifdef THEOLOGY + /* depending on your luck, the gods will : + - fix your worst problem if its major. + - fix all your major problems. + - fix your worst problem if its minor. + - fix all of your problems. + - do you a gratuitous favor. + + if you make it to the the last category, you roll randomly again + to see what they do for you. + + If your luck is at least 0, then you are guaranteed rescued + from your worst major problem. */ + + if (!trouble) pat_on_head = 1; + else + { int action = rn1(5,u.uluck+1); + if (action>=5) pat_on_head = 1; + if (action>=4) while (in_trouble ()) fix_worst_trouble (); + if (action<4 && action>=3) fix_worst_trouble (); + if (action<4 && action>=2) while (in_trouble () > 0) fix_worst_trouble (); + if (action==1 && trouble > 0) fix_worst_trouble (); + if (action==0) pline("but nothing seems to happen."); + }; + if (pat_on_head)pline("The gods seem especially pleased ..."); + + if (pat_on_head) + #endif switch(rn2((u.uluck + 6)/2)) { case 0: pline("but nothing seems to happen."); *************** *** 99,105 break; } #ifdef KAA ! if(uwep->olet == WEAPON_SYM) { if (uwep->cursed) { uwep->cursed=0; pline("Your %s %s.", aobjnam(uwep,"softly glow"), --- 404,410 ----- break; } #ifdef KAA ! if(uwep && (uwep->olet == WEAPON_SYM)) { if (uwep->cursed) { uwep->cursed=0; pline("Your %s %s.", aobjnam(uwep,"softly glow"), *************** *** 171,177 default: impossible("Confused deity!"); break; } ! u.ublesscnt = 300; #ifdef HARD u.ublesscnt += (u.udemigod * 1000); #endif --- 476,482 ----- default: impossible("Confused deity!"); break; } ! u.ublesscnt = rnz(350); #ifdef HARD u.ublesscnt += (u.udemigod * rnz(1000)); #endif *************** *** 173,179 } u.ublesscnt = 300; #ifdef HARD ! u.ublesscnt += (u.udemigod * 1000); #endif return(0); } --- 478,484 ----- } u.ublesscnt = rnz(350); #ifdef HARD ! u.ublesscnt += (u.udemigod * rnz(1000)); #endif return(0); } *************** *** 226,229 return(1); } #endif /* NEWCLASS /**/ - --- 531,533 ----- return(1); } #endif /* NEWCLASS /**/ *** ./pri.c.orig Mon Feb 22 08:40:13 1988 --- ./pri.c Thu Feb 11 10:43:13 1988 *************** *** 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.3 87/12/12 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ #include <stdio.h> *************** *** 436,441 (void) strcat(newbot, hu_stat[u.uhs]); if(flags.time) (void) sprintf(eos(newbot), " %ld", moves); if(strlen(newbot) >= COLNO) { register char *bp0, *bp1; bp0 = bp1 = newbot; --- 436,447 ----- (void) strcat(newbot, hu_stat[u.uhs]); if(flags.time) (void) sprintf(eos(newbot), " %ld", moves); + #ifdef SCORE_ON_BOTL + (void) sprintf(eos(newbot)," S:%lu " + ,(u.ugold - u.ugold0 > 0 ? u.ugold - u.ugold0 : 0) + + u.urexp + (50 * maxdlevel) + + (maxdlevel > 20? 1000*((maxdlevel > 30) ? 10 : maxdlevel - 20) :0)); + #endif if(strlen(newbot) >= COLNO) { register char *bp0, *bp1; bp0 = bp1 = newbot; *************** *** 468,474 extern char plname[]; ustatusline() { ! pline("Status of %s ", plname); pline("Level %d, gold %lu, hit points %d(%d), AC %d.", # ifdef KAA u.ulevel, u.ugold, u.mtimedone ? u.mh : u.uhp, --- 474,480 ----- extern char plname[]; ustatusline() { ! pline("Status of %s%s ", (Badged) ? "Officer " : "", plname); pline("Level %d, gold %lu, hit points %d(%d), AC %d.", # ifdef KAA u.ulevel, u.ugold, u.mtimedone ? u.mh : u.uhp, *** ./prisym.c.orig Tue Mar 29 08:43:30 1988 --- ./prisym.c Tue Mar 29 08:44:42 1988 *************** *** 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.3 88/03/29 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ #include <stdio.h> *************** *** 233,238 #ifdef NEWCLASS case THRONE: tmp = THRONE_SYM; break; #endif /* --- 233,243 ----- #ifdef NEWCLASS case THRONE: tmp = THRONE_SYM; + break; + #endif + #ifdef SINKS + case SINK: + tmp = SINK_SYM; break; #endif /* *** ./read.c.orig Mon Feb 22 08:40:14 1988 --- ./read.c Thu Jan 21 12:53:45 1988 *************** *** 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.3 88/01/21 /* 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); *** ./rip.c.orig Mon Feb 22 08:40:14 1988 --- ./rip.c Thu Feb 11 10:47:35 1988 *************** *** 1,4 ! /* SCCS Id: @(#)rip.c 1.4 87/08/08 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* hack.rip.c - version 1.0.2 */ --- 1,4 ----- ! /* SCCS Id: @(#)rip.c 2.3 88/02/11 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ #include <stdio.h> *************** *** 1,6 /* SCCS Id: @(#)rip.c 1.4 87/08/08 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ - /* hack.rip.c - version 1.0.2 */ #include <stdio.h> #include "hack.h" --- 1,5 ----- /* SCCS Id: @(#)rip.c 2.3 88/02/11 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ #include <stdio.h> #include "hack.h" *************** *** 35,41 register x,y; cls(); ! (void) strcpy(buf, plname); buf[16] = 0; center(6, buf); (void) sprintf(buf, "%ld AU", u.ugold); --- 34,40 ----- register x,y; cls(); ! (void) sprintf(buf,"%s%s", (Badged) ? "Officer " : "", plname); buf[16] = 0; center(6, buf); (void) sprintf(buf, "%ld AU", u.ugold); *************** *** 43,48 (void) sprintf(buf, "killed by%s", !strncmp(killer, "the ", 4) ? "" : !strcmp(killer, "starvation") ? "" : index(vowels, *killer) ? " an" : " a"); center(8, buf); (void) strcpy(buf, killer); --- 42,54 ----- (void) sprintf(buf, "killed by%s", !strncmp(killer, "the ", 4) ? "" : !strcmp(killer, "starvation") ? "" : + !strncmp(killer, "Mr.") ? "" : + !strncmp(killer, "Ms.") ? "" : + #ifdef STOOGES + !strcmp(killer, "Larry") ? "" : + !strcmp(killer, "Curly") ? "" : + !strcmp(killer, "Moe") ? "" : + #endif index(vowels, *killer) ? " an" : " a"); center(8, buf); (void) strcpy(buf, killer); *** ./rm.h.orig Tue Mar 29 08:28:57 1988 --- ./rm.h Tue Mar 29 08:47:43 1988 *************** *** 1,4 ! /* SCCS Id: @(#)rm.h 2.1 87/10/17 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* --- 1,4 ----- ! /* SCCS Id: @(#)rm.h 2.3 88/03/29 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* *************** *** 16,25 #define LDOOR 5 #define POOL 6 /* not yet fully implemented */ /* this should in fact be a bit like lit */ ! #define DOOR 7 ! #define CORR 8 ! #define ROOM 9 ! #define STAIRS 10 #define FOUNTAIN 11 #define THRONE 12 --- 16,25 ----- #define LDOOR 5 #define POOL 6 /* not yet fully implemented */ /* this should in fact be a bit like lit */ ! #define DOOR 7 ! #define CORR 8 ! #define ROOM 9 ! #define STAIRS 10 #define FOUNTAIN 11 #define THRONE 12 #define SINK 13 *************** *** 21,27 #define ROOM 9 #define STAIRS 10 #define FOUNTAIN 11 ! #define THRONE 12 /* * Avoid using the level types in inequalities: --- 21,28 ----- #define ROOM 9 #define STAIRS 10 #define FOUNTAIN 11 ! #define THRONE 12 ! #define SINK 13 /* * Avoid using the level types in inequalities: *************** *** 42,47 #define IS_POOL(typ) ((typ) == POOL) #define IS_THRONE(typ) ((typ) == THRONE) #define IS_FOUNTAIN(typ) ((typ) == FOUNTAIN) /* * The level-map symbols may be compiled in or defined at initialization time --- 43,49 ----- #define IS_POOL(typ) ((typ) == POOL) #define IS_THRONE(typ) ((typ) == THRONE) #define IS_FOUNTAIN(typ) ((typ) == FOUNTAIN) + #define IS_SINK(typ) ((typ) == SINK) /* * The level-map symbols may be compiled in or defined at initialization time *************** *** 69,74 #define FOUNTAIN_SYM '{' #define THRONE_SYM '\\' #define WEB_SYM '"' #else /* GRAPHICS */ /* screen symbols for using character graphics. */ --- 71,77 ----- #define FOUNTAIN_SYM '{' #define THRONE_SYM '\\' #define WEB_SYM '"' + #define SINK_SYM '#' #else /* GRAPHICS */ /* screen symbols for using character graphics. */ *************** *** 84,89 #ifdef SPIDERS unsigned char web; #endif }; extern struct symbols showsyms, defsyms; --- 87,95 ----- #ifdef SPIDERS unsigned char web; #endif + #ifdef SINKS + unsigned char sink; + #endif }; extern struct symbols showsyms, defsyms; *************** *** 104,109 #define FOUNTAIN_SYM showsyms.fountain #define THRONE_SYM showsyms.throne #define WEB_SYM showsyms.web #endif #define ERRCHAR ']' --- 110,116 ----- #define FOUNTAIN_SYM showsyms.fountain #define THRONE_SYM showsyms.throne #define WEB_SYM showsyms.web + #define SINK_SYM showsyms.sink #endif #define ERRCHAR ']' *** ./save.c.orig Mon Feb 22 08:40:15 1988 --- ./save.c Tue Feb 2 11:10:36 1988 *************** *** 1,4 ! /* SCCS Id: @(#)save.c 2.1 87/10/07 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ #include <signal.h> --- 1,4 ----- ! /* SCCS Id: @(#)save.c 2.3 88/01/24 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ #include <signal.h> *************** *** 4,10 #include <signal.h> #include <stdio.h> #include "hack.h" ! extern char genocided[60]; /* defined in Decl.c */ extern char fut_geno[60]; /* idem */ extern struct permonst pm_wizard; /* since the wizard evolves */ --- 4,11 ----- #include <signal.h> #include <stdio.h> #include "hack.h" ! ! extern char genocided[60]; /* defined in decl.c */ extern char fut_geno[60]; /* idem */ extern struct permonst pm_wizard; /* since the wizard evolves */ *************** *** 61,67 return(0); } if(flags.moonphase == FULL_MOON) /* ut-sally!fletcher */ ! u.uluck--; /* and unido!ab */ #ifdef DGKMOD home(); cl_end(); --- 62,68 ----- return(0); } if(flags.moonphase == FULL_MOON) /* ut-sally!fletcher */ ! change_luck(-1); /* and unido!ab */ #ifdef DGKMOD home(); cl_end(); *************** *** 211,216 mread(fd, (char *) genocided, sizeof genocided); mread(fd, (char *) fut_geno, sizeof fut_geno); #ifdef HARD mread(fd, (char *) &pm_wizard, sizeof(struct permonst)); #endif restnames(fd); --- 212,220 ----- mread(fd, (char *) genocided, sizeof genocided); mread(fd, (char *) fut_geno, sizeof fut_geno); #ifdef HARD + { + /* Save name pointer from being munged -- tom@uw-warp */ + char *name = pm_wizard.mname; mread(fd, (char *) &pm_wizard, sizeof(struct permonst)); pm_wizard.mname = name; } *************** *** 212,217 mread(fd, (char *) fut_geno, sizeof fut_geno); #ifdef HARD mread(fd, (char *) &pm_wizard, sizeof(struct permonst)); #endif restnames(fd); #ifdef DGK --- 216,223 ----- /* Save name pointer from being munged -- tom@uw-warp */ char *name = pm_wizard.mname; mread(fd, (char *) &pm_wizard, sizeof(struct permonst)); + pm_wizard.mname = name; + } #endif restnames(fd); #ifdef DGK *************** *** 335,359 } return(first); } - #ifdef MSDOS - struct monst * - restmonchn(fd) - register fd; - { - register struct monst *mtmp, *mtmp2; - register struct monst *first = 0; - int xl; - int monsindex, mi; - extern struct permonst li_dog, dog, la_dog; - #ifdef KAA - extern struct permonst hell_hound; - # ifdef HARD - extern struct permonst d_lord, d_prince; - # endif - # ifdef KJSMODS - extern struct permonst pm_guard, pm_ghost, pm_eel; - # endif - #endif #ifdef lint /* suppress "used before set" warning from lint */ --- 341,346 ----- } return(first); } struct monst * restmonchn(fd) *************** *** 355,414 # endif #endif - #ifdef lint - /* suppress "used before set" warning from lint */ - mtmp2 = 0; - #endif /* lint /**/ - while(1) { - mread(fd, (char *) &xl, sizeof(xl)); - if(xl == -1) break; - mtmp = newmonst(xl); - if(!first) first = mtmp; - else mtmp2->nmon = mtmp; - mread(fd, (char *) mtmp, (unsigned) xl + sizeof(struct monst)); - if(!mtmp->m_id) - mtmp->m_id = flags.ident++; - monsindex = *((int *)&mtmp->data); - if (monsindex == (mi = -1)) /* Special fake index */ - mtmp->data = &li_dog; - else if (monsindex == --mi) /* Special fake index */ - mtmp->data = &dog; - else if (monsindex == --mi) /* Special fake index */ - mtmp->data = &la_dog; - #ifdef KAA - else if (monsindex == --mi) - mtmp->data = &hell_hound; - # ifdef HARD - else if (monsindex == --mi) - mtmp->data = &d_lord; - - else if (monsindex == --mi) - mtmp->data = &d_prince; - # endif - # ifdef KJSMODS - else if (monsindex == --mi) - mtmp->data = &pm_guard; - - else if (monsindex == --mi) - mtmp->data = &pm_ghost; - - else if (monsindex == --mi) - mtmp->data = &pm_eel; - # endif - #endif - else - mtmp->data = &mons[monsindex]; - if(mtmp->minvent) - mtmp->minvent = restobjchn(fd); - mtmp2 = mtmp; - } - if(first && mtmp2->nmon){ - impossible("Restmonchn: error reading monchn."); - mtmp2->nmon = 0; - } - return(first); - } - #else struct monst * restmonchn(fd) register fd; --- 342,347 ----- return(first); } struct monst * restmonchn(fd) register fd; *************** *** 421,426 long differ; mread(fd, (char *)&monbegin, sizeof(monbegin)); differ = (char *)(&mons[0]) - (char *)(monbegin); #ifdef LINT --- 354,360 ----- long differ; mread(fd, (char *)&monbegin, sizeof(monbegin)); + #ifndef MSDOS differ = (char *)(&mons[0]) - (char *)(monbegin); #else differ = (long)(&mons[0]) - (long)(monbegin); *************** *** 422,427 mread(fd, (char *)&monbegin, sizeof(monbegin)); differ = (char *)(&mons[0]) - (char *)(monbegin); #ifdef LINT /* suppress "used before set" warning from lint */ --- 356,364 ----- mread(fd, (char *)&monbegin, sizeof(monbegin)); #ifndef MSDOS differ = (char *)(&mons[0]) - (char *)(monbegin); + #else + differ = (long)(&mons[0]) - (long)(monbegin); + #endif #ifdef LINT /* suppress "used before set" warning from lint */ *************** *** 436,441 mread(fd, (char *) mtmp, (unsigned) xl + sizeof(struct monst)); if(!mtmp->m_id) mtmp->m_id = flags.ident++; mtmp->data = (struct permonst *) ((char *) mtmp->data + differ); if(mtmp->minvent) --- 373,379 ----- mread(fd, (char *) mtmp, (unsigned) xl + sizeof(struct monst)); if(!mtmp->m_id) mtmp->m_id = flags.ident++; + #ifndef MSDOS mtmp->data = (struct permonst *) ((char *) mtmp->data + differ); #else *************** *** 438,443 mtmp->m_id = flags.ident++; mtmp->data = (struct permonst *) ((char *) mtmp->data + differ); if(mtmp->minvent) mtmp->minvent = restobjchn(fd); mtmp2 = mtmp; --- 376,385 ----- #ifndef MSDOS mtmp->data = (struct permonst *) ((char *) mtmp->data + differ); + #else + mtmp->data = (struct permonst *) + ((long) mtmp->data + differ); + #endif if(mtmp->minvent) mtmp->minvent = restobjchn(fd); mtmp2 = mtmp; *************** *** 448,451 } return(first); } - #endif --- 390,392 ----- } return(first); } SHAR_EOF if test 37968 -ne "`wc -c < 'Update.2.3.e'`" then echo shar: error transmitting "'Update.2.3.e'" '(should have been 37968 characters)' fi fi # end of overwriting check # End of shell archive exit 0 -- Mike Stephenson Mail: Genamation Inc. Phone: (416) 475-9434 351 Steelcase Rd. W Markham, Ontario. UUCP: uunet!{mnetor,utzoo}!genat!genpyr!mike Canada L3R 3W1 uunet!{mnetor,utzoo}!genat!mike