Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

NetHack 2.3 Update Pt. 12 of 12

8 views
Skip to first unread message

Mike Stephenson

unread,
Apr 15, 1988, 7:36:38 AM4/15/88
to

Here's the last of the patch kits.

-------------------------------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.g
# This archive created: Mon Apr 4 08:52:39 1988
export PATH; PATH=/bin:$PATH
echo shar: extracting "'Update.2.3.g'" '(18047 characters)'
if test -f 'Update.2.3.g'
then
echo shar: will not over-write existing file "'Update.2.3.g'"
else
cat << \SHAR_EOF > 'Update.2.3.g'
*** ./you.h.orig Mon Feb 22 08:40:20 1988
--- ./you.h Thu Mar 31 11:41:28 1988
***************
*** 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.3 87/12/12
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */

#ifndef YOU_H
***************
*** 78,83
#define BLINDFOLDED (LAST_RING+11) /* not a ring */
#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];

--- 78,86 -----
#define BLINDFOLDED (LAST_RING+11) /* not a ring */
#define Blindfolded u.uprops[BLINDFOLDED].p_flgs
#define Blind (Blinded || Blindfolded)
+ #define BADGED (LAST_RING+12) /* not a ring */
+ #define Badged u.uprops[BADGED].p_flgs
+ #define LAST_PROP (BADGED) /* the last property */
#define PROP(x) (x-RIN_ADORNMENT) /* convert ring to index in uprops */
struct prop uprops[LAST_PROP+1];

***************
*** 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;

--- 82,88 -----
#define Badged u.uprops[BADGED].p_flgs
#define LAST_PROP (BADGED) /* the last property */
#define PROP(x) (x-RIN_ADORNMENT) /* convert ring to index in uprops */
! struct prop uprops[LAST_PROP+1];

unsigned umconf;
char *usick_cause;
***************
*** 98,104
#ifdef RPH
int medusa_level; /* level of wiz and medusa */
int wiz_level;
! #endif
schar ustr,ustrmax;
schar udaminc;
schar uac;

--- 101,110 -----
#ifdef RPH
int medusa_level; /* level of wiz and medusa */
int wiz_level;
! #endif
! #ifdef STOOGES
! int stooge_level;
! #endif
schar ustr,ustrmax;
schar udaminc;
schar uac;
*** ./zap.c.orig Mon Feb 22 08:40:20 1988
--- ./zap.c Thu Mar 31 09:08:52 1988
***************
*** 1,4
! /* SCCS Id: @(#)zap.c 2.1 87/11/10
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */

#include "hack.h"

--- 1,4 -----
! /* SCCS Id: @(#)zap.c 2.3 88/02/11
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */

#include "hack.h"
***************
*** 3,9

#include "hack.h"

! extern struct obj *mkobj_at();
extern struct monst *makemon(), *mkmon_at(), youmonst;
struct monst *bhit();
char *exclam();

--- 3,9 -----

#include "hack.h"

! extern struct obj *mkobj_at(), *mksobj_at();
extern struct monst *makemon(), *mkmon_at(), youmonst;
struct monst *bhit();
char *exclam();
***************
*** 12,18
#endif

char *fl[]= {
! "magic missile",
"bolt of fire",
"sleep ray",
"bolt of cold",

--- 12,18 -----
#endif

char *fl[]= {
! "magic missile", /* Wands must be 0-9 */
"bolt of fire",
"sleep ray",
"bolt of cold",
***************
*** 17,23
"sleep ray",
"bolt of cold",
"death ray",
! "magic missile", /* Spell equivalents of above wands */
"fireball",
"sleep ray",
"cone of cold",

--- 17,29 -----
"sleep ray",
"bolt of cold",
"death ray",
! "bolt of lightening",
! "",
! "",
! "",
! "",
!
! "magic missile", /* Spell equivalents must be 10-19 */
"fireball",
"sleep ray",
"cone of cold",
***************
*** 21,27
"fireball",
"sleep ray",
"cone of cold",
! "finger of death"
};

/* Routines for IMMEDIATE wands and spells. */

--- 27,49 -----
"fireball",
"sleep ray",
"cone of cold",
! "finger of death",
! "bolt of lightening",
! "",
! "",
! "",
! "",
!
! "blast of missiles", /* Dragon breath equivalents 20-29*/
! "blast of fire",
! "blast of sleep gas",
! "blast of frost",
! "blast of disintegration",
! "blast of lightening",
! "blast of poison gas",
! "blast of acid",
! "",
! ""
};

/* Routines for IMMEDIATE wands and spells. */
***************
*** 299,304
pline("You magically bash yourself!");
damage=d(8,6);
break;
case WAN_FIRE:
makeknown(WAN_FIRE);
#ifdef SPELLS

--- 321,336 -----
pline("You magically bash yourself!");
damage=d(8,6);
break;
+ case WAN_LIGHTNING:
+ makeknown(WAN_LIGHTNING);
+ pline("Idiot! You've shocked yourself!");
+ if (!Shock_resistance) damage=d(12,6);
+ if (!Blind) {
+ pline("You are blinded by the flash!");
+ Blinded += rnd(100);
+ seeoff(0);
+ }
+ break;
case WAN_FIRE:
makeknown(WAN_FIRE);
#ifdef SPELLS
***************
*** 316,321
#endif
pline("You imitate a popsicle!");
if (!Cold_resistance) damage=d(12,6);
break;
case WAN_MAGIC_MISSILE:
makeknown(WAN_MAGIC_MISSILE);

--- 348,354 -----
#endif
pline("You imitate a popsicle!");
if (!Cold_resistance) damage=d(12,6);
+ freeze_potions();
break;
case WAN_MAGIC_MISSILE:
makeknown(WAN_MAGIC_MISSILE);
***************
*** 382,390
break;
#ifdef SPELLS
case SPE_LIGHT:
! pline("You've blinded yourself!");
! Blinded += rnd(100);
! break;
case SPE_DIG:
case SPE_TURN_UNDEAD:
case SPE_DETECT_UNSEEN:

--- 415,426 -----
break;
#ifdef SPELLS
case SPE_LIGHT:
! if(!Blind) {
! pline("You've blinded yourself!");
! Blinded += rnd(100);
! seeoff(0);
! }
! break;
case SPE_DIG:
case SPE_TURN_UNDEAD:
case SPE_DETECT_UNSEEN:
***************
*** 483,489
pline("You loosen a rock from the ceiling.");
pline("It falls on your head!");
losehp(1, "falling rock");
! mksobj_at(ROCK, u.ux, u.uy);
fobj->quan = 1;
stackobj(fobj);
if(Invisible) newsym(u.ux, u.uy);

--- 519,525 -----
pline("You loosen a rock from the ceiling.");
pline("It falls on your head!");
losehp(1, "falling rock");
! mksobj_at((int)ROCK, u.ux, u.uy);
fobj->quan = 1;
stackobj(fobj);
if(Invisible) newsym(u.ux, u.uy);
***************
*** 531,537
#ifdef SPELLS
if((int) obj->otyp >= SPE_MAGIC_MISSILE) {

! buzz((int) obj->otyp - SPE_MAGIC_MISSILE + 5,
u.ux, u.uy, u.dx, u.dy);
} else
#endif

--- 567,573 -----
#ifdef SPELLS
if((int) obj->otyp >= SPE_MAGIC_MISSILE) {

! buzz((int) obj->otyp - SPE_MAGIC_MISSILE + 10,
u.ux, u.uy, u.dx, u.dy);
} else
#endif
***************
*** 625,630
break;
}
if(sym) tmp_at(bhitpos.x, bhitpos.y);
}

/* leave last symbol unless in a pool */

--- 661,670 -----
break;
}
if(sym) tmp_at(bhitpos.x, bhitpos.y);
+ #ifdef SINKS
+ if(sym && IS_SINK(typ))
+ break; /* physical objects fall onto sink */
+ #endif
}

/* leave last symbol unless in a pool */
***************
*** 674,679
}
tmp_at(bhitpos.x, bhitpos.y);
if(ct % 5 != 0) i++;
}
tmp_at(-1, -1); /* do not leave last symbol */
return(0);

--- 714,723 -----
}
tmp_at(bhitpos.x, bhitpos.y);
if(ct % 5 != 0) i++;
+ #ifdef SINKS
+ if(IS_SINK(levl[bhitpos.x][bhitpos.y].typ))
+ break; /* boomerang falls on sink */
+ #endif
}
tmp_at(-1, -1); /* do not leave last symbol */
return(0);
***************
*** 685,692
(dx == dy) ? '\\' : (dx && dy) ? '/' : dx ? HWALL_SYM : VWALL_SYM;
}

! /* type == -1: monster spitting fire at you */
! /* type == -1,-2,-3: bolts sent out by wizard */
/* called with dx = dy = 0 with vertical bolts */
buzz(type,sx,sy,dx,dy)
register int type;

--- 729,739 -----
(dx == dy) ? '\\' : (dx && dy) ? '/' : dx ? HWALL_SYM : VWALL_SYM;
}

! /* type == 0 to 9 : you shooting a wand */
! /* type == 10 to 19 : you casting a spell */
! /* type == 20 : you breathing fire */
! /* type == -1 to -9 : bolts sent out by wizard */
! /* type == -10 to -19 : dragon breathing at you */
/* called with dx = dy = 0 with vertical bolts */
buzz(type,sx,sy,dx,dy)
register int type;
***************
*** 693,700
register xchar sx,sy;
register int dx,dy;
{
! int abstype = (type == 10) ? 1 : abs(type);
! register char *fltxt = (type == -1 || type == 10) ? "blaze of fire" : fl[abstype];
struct rm *lev;
xchar range;
struct monst *mon;

--- 740,748 -----
register xchar sx,sy;
register int dx,dy;
{
! int abstype = (type == 20) ? 1 : abs(type) % 10;
! int txttype = (type == 20) ? 21 : (type>-10) ? abs(type) : abs(type)+10;
! register char *fltxt = fl[txttype];
struct rm *lev;
xchar range;
struct monst *mon;
***************
*** 751,756
} else
pline("You hear a hissing sound.");
}
if(o_at(sx,sy) && abstype == 1)
if(burn_floor_scrolls(sx,sy) && cansee(sx,sy)) {
mnewsym(sx,sy);

--- 799,813 -----
} else
pline("You hear a hissing sound.");
}
+ if(lev->typ == POOL && abstype == 3 /* cold */) {
+ range -= 3;
+ lev->typ = ROOM;
+ if(cansee(sx,sy)) {
+ mnewsym(sx,sy);
+ pline("The water freezes.");
+ } else
+ pline("You hear a cracking sound.");
+ }
if(o_at(sx,sy) && abstype == 1)
if(burn_floor_scrolls(sx,sy) && cansee(sx,sy)) {
mnewsym(sx,sy);
***************
*** 757,763
pline("You see a puff of smoke.");
}
if((mon = m_at(sx,sy)) &&
! (type != -1 || mon->data->mlet != 'D')) {
wakeup(mon);
if(rnd(20) < 18 + mon->data->ac) {
register int tmp = zhit(mon,abstype);

--- 814,821 -----
pline("You see a puff of smoke.");
}
if((mon = m_at(sx,sy)) &&
! /* dragons don't hit themselves ??? */
! (type > -10 || mon->data->mlet != 'D')) {
wakeup(mon);
if(rnd(20) < 18 + mon->data->ac) {
register int tmp = zhit(mon,abstype);
***************
*** 781,791
range -= 2;
pline("The %s hits you!",fltxt);
switch(abstype) {
! case 0:
! case 5: dam = d(2,6);
! break;
! case 1:
! case 6: if(Fire_resistance)
pline("You don't feel hot!");
else dam = d(6,6);
if(!rn2(3)) {

--- 839,849 -----
range -= 2;
pline("The %s hits you!",fltxt);
switch(abstype) {
! case 0: /* magic missile */
! dam = d(2,6);
! break;
! case 1: /* fire */
! if(Fire_resistance)
pline("You don't feel hot!");
else dam = d(6,6);
if(!rn2(3)) {
***************
*** 793,800
burn_scrolls();
}
break;
! case 2:
! case 7: nomul(-rnd(25)); /* sleep ray */
break;
case 3:
case 8: if(Cold_resistance)

--- 851,858 -----
burn_scrolls();
}
break;
! case 2: /* sleep */
! nomul(-rnd(25)); /* sleep ray */
break;
case 3: /* cold */
if(Cold_resistance)
***************
*** 796,803
case 2:
case 7: nomul(-rnd(25)); /* sleep ray */
break;
! case 3:
! case 8: if(Cold_resistance)
pline("You don't feel cold!");
else dam = d(6,6);
break;

--- 854,861 -----
case 2: /* sleep */
nomul(-rnd(25)); /* sleep ray */
break;
! case 3: /* cold */
! if(Cold_resistance)
pline("You don't feel cold!");
else dam = d(6,6);
if(!rn2(3))
***************
*** 800,805
case 8: if(Cold_resistance)
pline("You don't feel cold!");
else dam = d(6,6);
break;
case 4:
case 9: u.uhp = -1;

--- 858,865 -----
if(Cold_resistance)
pline("You don't feel cold!");
else dam = d(6,6);
+ if(!rn2(3))
+ freeze_potions();
break;
case 4: /* death */
u.uhp = -1;
***************
*** 801,808
pline("You don't feel cold!");
else dam = d(6,6);
break;
! case 4:
! case 9: u.uhp = -1;
break;
}
losehp(dam,fltxt);

--- 861,868 -----
if(!rn2(3))
freeze_potions();
break;
! case 4: /* death */
! u.uhp = -1;
break;
case 5: /* lightning */
if(Shock_resistance)
***************
*** 804,809
case 4:
case 9: u.uhp = -1;
break;
}
losehp(dam,fltxt);
} else pline("The %s whizzes by you!",fltxt);

--- 864,883 -----
case 4: /* death */
u.uhp = -1;
break;
+ case 5: /* lightning */
+ if(Shock_resistance)
+ pline("You aren't affected!");
+ else dam = d(6,6);
+ break;
+ case 6: /* poison */
+ poisoned("blast", "poisoned blast");
+ break;
+ case 7: /* acid */
+ pline("The acid burns!");
+ dam = d(6,6);
+ if(!rn2(6)) corrode_weapon();
+ if(!rn2(6)) corrode_armor();
+ break;
}
losehp(dam,fltxt);
} else pline("The %s whizzes by you!",fltxt);
***************
*** 807,812
}
losehp(dam,fltxt);
} else pline("The %s whizzes by you!",fltxt);
stop_occupation();
}
if(!ZAP_POS(lev->typ)) {

--- 881,891 -----
}
losehp(dam,fltxt);
} else pline("The %s whizzes by you!",fltxt);
+ if (abstype == 5 && !Blind) { /* LIGHTNING */
+ pline("You are blinded by the flash!");
+ Blinded += rnd(50);
+ seeoff(0);
+ }
stop_occupation();
}
if(!ZAP_POS(lev->typ)) {
***************
*** 851,858
register int tmp = 0;

switch(type) {
! case 0: /* magic missile */
! case 5: tmp = d(2,6);
break;
case -1: /* Dragon blazing fire */
case 1: /* fire wand*/

--- 930,939 -----
register int tmp = 0;

switch(type) {
! case 0: /* magic missile (wand) */
! case 10: /* (spell) */
! case -10: /* (breath) */
! tmp = d(2,6);
break;
case 1: /* fire wand */
case 11: /* fire spell */
***************
*** 854,863
case 0: /* magic missile */
case 5: tmp = d(2,6);
break;
! case -1: /* Dragon blazing fire */
! case 1: /* fire wand*/
! case 6: /* fire spell */
! case 10: /* Polymorphed human blazing fire */
if(index("Dg", mon->data->mlet)) break;
tmp = d(6,6);
if(index("YF", mon->data->mlet)) tmp += 7;

--- 935,944 -----
case -10: /* (breath) */
tmp = d(2,6);
break;
! case 1: /* fire wand */
! case 11: /* fire spell */
! case -11: /* fire breath */
! case 20: /* you breathing fire */
if(index("Dg", mon->data->mlet)) break;
tmp = d(6,6);
if(index("YF", mon->data->mlet)) tmp += 7;
***************
*** 862,869
tmp = d(6,6);
if(index("YF", mon->data->mlet)) tmp += 7;
break;
! case 2: /* sleep*/
! case 7: tmp = 0;
if(!resist(mon, (type == 2) ? '/' : '+', 0, NOTELL))
mon->mfroz = 1;
break;

--- 943,952 -----
tmp = d(6,6);
if(index("YF", mon->data->mlet)) tmp += 7;
break;
! case 2: /* sleep wand */
! case 12: /* sleep spell */
! case -12: /* sleep breath */
! tmp = 0;
if(!resist(mon, (type == 2) ? '/' : '+', 0, NOTELL))
mon->mfroz = 1;
break;
***************
*** 867,874
if(!resist(mon, (type == 2) ? '/' : '+', 0, NOTELL))
mon->mfroz = 1;
break;
! case 3: /* cold */
! case 8:
if(index("YFgf", mon->data->mlet)) break;
tmp = d(6,6);
if(mon->data->mlet == 'D') tmp += 7;

--- 950,958 -----
if(!resist(mon, (type == 2) ? '/' : '+', 0, NOTELL))
mon->mfroz = 1;
break;
! case 3: /* cold wand */
! case 13: /* cold spell */
! case -13: /* cold breath */
if(index("YFgf", mon->data->mlet)) break;
tmp = d(6,6);
if(mon->data->mlet == 'D') tmp += 7;
***************
*** 873,880
tmp = d(6,6);
if(mon->data->mlet == 'D') tmp += 7;
break;
! case 4: /* death*/
! case 9:
if(index(UNDEAD, mon->data->mlet)) break;
tmp = mon->mhp+1;
break;

--- 957,965 -----
tmp = d(6,6);
if(mon->data->mlet == 'D') tmp += 7;
break;
! case 4: /* death wand */
! case 14: /* death spell */
! case -14: /* death breath */
if(index(UNDEAD, mon->data->mlet)) break;
tmp = mon->mhp+1;
break;
***************
*** 878,883
if(index(UNDEAD, mon->data->mlet)) break;
tmp = mon->mhp+1;
break;
}
if (resist(mon, (type < 5) ? '/' : '+', 0, NOTELL)) tmp /= 2;
mon->mhp -= tmp;

--- 963,987 -----
if(index(UNDEAD, mon->data->mlet)) break;
tmp = mon->mhp+1;
break;
+ case 5: /* lightning wand */
+ case 15: /* lightning spell */
+ case -15: /* lightning breath */
+ if(index("g;", mon->data->mlet)) break;
+ tmp = d(6,6);
+ mon->mblinded += rnd(50);
+ break;
+ case 6: /* poison wand */
+ case 16: /* poison spell */
+ case -16: /* poison breath */
+ if(index("abcghikqsuvxyADFQSVWXZ&", mon->data->mlet)) break;
+ tmp = d(6,6);
+ break;
+ case 7: /* acid wand */
+ case 17: /* acid spell */
+ case -17: /* acid breath */
+ if(index("a", mon->data->mlet)) break;
+ tmp = d(6,6);
+ break;
}
if (type >= 0 && type != 20)
if (resist(mon, (type < 10) ? '/' : '+', 0, NOTELL)) tmp /= 2;
***************
*** 879,885
tmp = mon->mhp+1;
break;
}
! if (resist(mon, (type < 5) ? '/' : '+', 0, NOTELL)) tmp /= 2;
mon->mhp -= tmp;
return(tmp);
}

--- 983,990 -----
tmp = d(6,6);
break;
}
! if (type >= 0 && type != 20)
! if (resist(mon, (type < 10) ? '/' : '+', 0, NOTELL)) tmp /= 2;
mon->mhp -= tmp;
return(tmp);
}
***************
*** 974,980
}
}
}
!
burn_scrolls()
{
register struct obj *obj, *obj2;

--- 1079,1104 -----
}
}
}
!
! freeze_potions() {
! register struct obj *obj, *obj2;
! register int scrquan, i;
!
! for(obj = invent; obj; obj = obj2) {
! obj2 = obj->nobj;
! if(obj->olet == POTION_SYM) {
! scrquan = obj->quan;
! for(i = 1; i <= scrquan; i++)
! if(!rn2(3)) {
! pline("%s %s freezes and shatters!",
! (obj->quan != 1) ? "One of your" : "Your", xname(obj));
! useup(obj);
! losehp(rn2(4),"shattered potion");
! }
! }
! }
! }
!
burn_scrolls()
{
register struct obj *obj, *obj2;
SHAR_EOF
if test 18047 -ne "`wc -c < 'Update.2.3.g'`"
then
echo shar: error transmitting "'Update.2.3.g'" '(should have been 18047 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

Ed Hall

unread,
Apr 22, 1988, 6:02:04 PM4/22/88
to
The copy of part 12 I recieved was not complete. Could someone send or
post the patches for zap.c (or send or repost part 12?)

Ed Hall

John Gilmore

unread,
Apr 24, 1988, 3:12:34 AM4/24/88
to
I hope this rash of "I didn't get part foo of nethack" messages will
remind future posters to send 12-part harmonies to comp.sources.games
or comp.sources.unix rather than posting them yourself. The moderators
of those newsgroups already have means set up to deal with people who
miss a couple of parts (pulling them out of an archive); and have
reliable distribution channels set up to make dropped articles less
likely.
0 new messages