home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
games
/
volume7
/
nethack3
/
patch8g
/
patch8.06
Wrap
Text File
|
1990-06-08
|
51KB
|
2,119 lines
*** src/Old/pager.c Sun Jun 3 14:01:35 1990
--- src/pager.c Thu May 31 22:11:29 1990
***************
*** 26,40 ****
#define SEEK_SET 0
#endif
#ifndef OVLB
! OSTATIC char hc;
#else /* OVLB */
! XSTATIC char hc = 0;
! #endif /* OVLB */
static void FDECL(page_more, (FILE *,int));
! OSTATIC boolean FDECL(clear_help, (CHAR_P));
! OSTATIC boolean FDECL(valid_help, (CHAR_P));
static boolean FDECL(pmatch,(const char *,const char *));
static boolean FDECL(outspec,(const char *,int));
static const char *FDECL(lookat,(int,int,UCHAR_P));
--- 26,41 ----
#define SEEK_SET 0
#endif
+ STATIC_DCL boolean FDECL(clear_help, (CHAR_P));
+ STATIC_DCL boolean FDECL(valid_help, (CHAR_P));
+
#ifndef OVLB
! STATIC_DCL char hc;
#else /* OVLB */
! STATIC_OVL char NEARDATA hc = 0;
static void FDECL(page_more, (FILE *,int));
! static boolean FDECL(is_swallow_sym, (UCHAR_P));
static boolean FDECL(pmatch,(const char *,const char *));
static boolean FDECL(outspec,(const char *,int));
static const char *FDECL(lookat,(int,int,UCHAR_P));
***************
*** 43,50 ****
#endif
static void NDECL(help_menu);
- #ifdef OVLB
-
/*
* simple pattern matcher: '*' matches 0 or more characters
* returns TRUE if strng matches patrn
--- 44,49 ----
***************
*** 74,79 ****
--- 73,89 ----
}
/*
+ * returns "true" for characters that could represent a monster's stomach
+ */
+
+ static boolean
+ is_swallow_sym(c)
+ uchar c;
+ {
+ return (index(" /-\\|", (char)c) != 0);
+ }
+
+ /*
* print out another possibility for dowhatis. "new" is the possible new
* string; "out_flag" indicates whether we really want output, and if
* so what kind of output: 0 == no output, 1 == "(or %s)" output.
***************
*** 85,91 ****
const char *new;
int out_flag;
{
! static char old[50];
if (!strcmp(old, new))
return FALSE; /* don't print the same thing twice */
--- 95,101 ----
const char *new;
int out_flag;
{
! static char NEARDATA old[50];
if (!strcmp(old, new))
return FALSE; /* don't print the same thing twice */
***************
*** 110,116 ****
register struct monst *mtmp;
register struct obj *otmp;
struct trap *trap;
! static char answer[50];
register char *s, *t;
uchar typ;
--- 120,126 ----
register struct monst *mtmp;
register struct obj *otmp;
struct trap *trap;
! static char NEARDATA answer[50];
register char *s, *t;
uchar typ;
***************
*** 133,138 ****
--- 143,150 ----
u.mtimedone ? mons[u.umonnum].mname :
#endif
pl_character, plname);
+ } else if (u.uswallow && is_swallow_sym(ch)) {
+ Sprintf(answer, "interior of %s", defmonnam(u.ustuck));
} else if (mtmp && !mtmp->mimic)
Sprintf(answer, "%s%s",
mtmp->mtame ? "tame " :
***************
*** 152,158 ****
if (mtmp->mappearance == STRANGE_OBJECT)
Strcpy(answer, "strange object");
else {
! otmp = mksobj((int) mtmp->mappearance,FALSE );
Strcpy(answer, distant_name(otmp, xname));
free((genericptr_t) otmp);
}
--- 164,175 ----
if (mtmp->mappearance == STRANGE_OBJECT)
Strcpy(answer, "strange object");
else {
! int oindx = mtmp->mappearance;
! otmp = mksobj(oindx,FALSE );
! if(oindx == STATUE || oindx == FIGURINE)
! otmp->corpsenm = PM_KOBOLD;
! else if (oindx == DRAGON_SCALE_MAIL)
! otmp->corpsenm = PM_RED_DRAGON;
Strcpy(answer, distant_name(otmp, xname));
free((genericptr_t) otmp);
}
***************
*** 263,268 ****
--- 280,286 ----
boolean oldverb = flags.verbose;
boolean found_in_file = FALSE, need_to_print = FALSE;
int found = 0;
+ static const char *mon_interior = "the interior of a monster";
#ifdef OS2_CODEVIEW
char tmp[PATHLEN];
***************
*** 321,329 ****
return 0;
}
flags.verbose = FALSE;
! q = levl[cc.x][cc.y].scrsym;
! if (!q || (!levl[cc.x][cc.y].seen && !MON_AT(cc.x,cc.y)))
! q = ' ';
}
if (!q)
--- 339,365 ----
return 0;
}
flags.verbose = FALSE;
! if (!u.uswallow) {
! q = levl[cc.x][cc.y].scrsym;
! if (!q || (!levl[cc.x][cc.y].seen && !MON_AT(cc.x,cc.y)))
! q = ' ';
! }
! else if (cc.x == u.ux && cc.y == u.uy)
! q = u.usym;
! else {
! i = (u.uy - cc.y)+1;
! if (i < 0 || i > 2)
! q = ' ';
! else {
! firstmatch = (i == 0) ? "/-\\" :
! (i == 1) ? "| |" : "\\-/";
! i = (u.ux - cc.x)+1;
! if (i < 0 || i > 2)
! q = ' ';
! else
! q = firstmatch[i];
! }
! }
}
if (!q)
***************
*** 337,343 ****
/*
* if the user just typed one letter, or we're identifying from the
* screen, then we have to check all the possibilities and print them
! * out for him/her
*/
/* Check for monsters */
--- 373,379 ----
/*
* if the user just typed one letter, or we're identifying from the
* screen, then we have to check all the possibilities and print them
! * out for him/her.
*/
/* Check for monsters */
***************
*** 351,356 ****
--- 387,406 ----
}
}
+ /* Special case: if identifying from the screen, and
+ * we're swallowed, and looking at something other than our own symbol,
+ * then just say "the interior of a monster".
+ */
+ if (u.uswallow && is_swallow_sym(q)) {
+ if (!found) {
+ pline("%c %s", q, mon_interior);
+ (void)outspec(firstmatch=mon_interior, 0);
+ }
+ else
+ (void)outspec(mon_interior, 1);
+ found++; need_to_print = TRUE;
+ }
+
/* Now check for objects */
for (i = 0; objsyms[i]; i++) {
if (q == objsyms[i]) {
***************
*** 402,407 ****
--- 452,459 ----
checkfile:
+ if (!strncmp(inp, "interior of ", 12))
+ inp += 12;
if (!strncmp(inp, "a ", 2))
inp += 2;
else if (!strncmp(inp, "an ", 3))
***************
*** 415,434 ****
if (!strncmp(inp, "invisible ", 10))
inp += 10;
! if ((!q || found) && *inp) {
/* adjust the input to remove "named " and convert to lower case */
for (ep = inp; *ep; ) {
if ((!strncmp(ep, " named ", 7) && (alt = ep + 7)) ||
!strncmp(ep, " called ", 8))
*ep = 0;
! else
! (*ep = tolower(*ep)), ep++;
}
/*
* If the object is named, then the name is the alternate search string;
* otherwise, the result of makesingular() applied to the name is. This
! * isn't strictly optimal, but named objects of interest to the user should
* will usually be found under their name, rather than under their
* object type, so looking for a singular form is pointless.
*/
--- 467,495 ----
if (!strncmp(inp, "invisible ", 10))
inp += 10;
! /*
! * look in the file for more info if:
! * the user typed in the whole name (!q)
! * OR we've found a possible match with the character q (found) and
! * flags.help is TRUE
! * and, of course, the name to look for must be non-empty.
! */
! if ((!q || (found && flags.help)) && *inp) {
/* adjust the input to remove "named " and convert to lower case */
for (ep = inp; *ep; ) {
if ((!strncmp(ep, " named ", 7) && (alt = ep + 7)) ||
!strncmp(ep, " called ", 8))
*ep = 0;
! else {
! if(isupper(*ep)) *ep = tolower(*ep);
! ep++;
! }
}
/*
* If the object is named, then the name is the alternate search string;
* otherwise, the result of makesingular() applied to the name is. This
! * isn't strictly optimal, but named objects of interest to the user
* will usually be found under their name, rather than under their
* object type, so looking for a singular form is pointless.
*/
***************
*** 436,442 ****
if (!alt)
alt = makesingular(inp);
else
! for (ep = alt; *ep; ep++) *ep = tolower(*ep);
while(fgets(buf,BUFSZ,fp)) {
if(*buf != '\t') {
--- 497,504 ----
if (!alt)
alt = makesingular(inp);
else
! for (ep = alt; *ep; ep++)
! if(isupper(*ep)) *ep = tolower(*ep);
while(fgets(buf,BUFSZ,fp)) {
if(*buf != '\t') {
***************
*** 555,561 ****
}
/* make the paging of a file interruptible */
! static int got_intrup;
#if !defined(MSDOS) && !defined(TOS) && !defined(MACOS)
static int
--- 617,623 ----
}
/* make the paging of a file interruptible */
! static volatile int NEARDATA got_intrup;
#if !defined(MSDOS) && !defined(TOS) && !defined(MACOS)
static int
***************
*** 572,584 ****
FILE *fp;
int strip; /* nr of chars to be stripped from each line (0 or 1) */
{
- register char *bufr;
- #if !defined(MSDOS) && !defined(MINIMAL_TERM)
- register char *ep;
- #endif
- #if !defined(MSDOS) && !defined(TOS) && !defined(MACOS)
- int (*prevsig)() = (int (*)())signal(SIGINT, (SIG_RET_TYPE) intruph);
- #endif
#ifdef MACOS
short tmpflags;
--- 634,639 ----
***************
*** 590,595 ****
--- 645,657 ----
}
macflags |= (tmpflags & fDoUpdate);
#else
+ register char *bufr;
+ #if !defined(MSDOS) && !defined(MINIMAL_TERM)
+ register char *ep;
+ #endif
+ #if !defined(MSDOS) && !defined(TOS)
+ int (*prevsig)() = (int (*)())signal(SIGINT, (SIG_RET_TYPE) intruph);
+ #endif
#if defined(MSDOS) || defined(MINIMAL_TERM)
/* There seems to be a bug in ANSI.SYS The first tab character
* after a clear screen sequence is not expanded correctly. Thus
***************
*** 603,608 ****
--- 665,672 ----
while (fgets(buf, BUFSIZ, fp) && (!strip || *buf == '\t')){
bufp = buf;
bufrp = bufr;
+ if (strip && *bufp && *bufp != '\n')
+ *bufrp++ = *bufp++;
while (*bufp && *bufp != '\n') {
if (*bufp == '\t') {
spaces = tabstop - (bufrp - bufr) % tabstop;
***************
*** 631,641 ****
ret:
free((genericptr_t) bufr);
(void) fclose(fp);
! #if !defined(MSDOS) && !defined(TOS) && !defined(MACOS)
(void) signal(SIGINT, (SIG_RET_TYPE) prevsig);
got_intrup = 0;
#endif
! #endif
}
#endif /* OVLB */
--- 695,705 ----
ret:
free((genericptr_t) bufr);
(void) fclose(fp);
! #if !defined(MSDOS) && !defined(TOS)
(void) signal(SIGINT, (SIG_RET_TYPE) prevsig);
got_intrup = 0;
#endif
! #endif /* MACOS */
}
#endif /* OVLB */
***************
*** 644,654 ****
#ifndef OVLB
! OSTATIC boolean whole_screen;
#else /* OVLB */
! XSTATIC boolean whole_screen = TRUE;
void
set_whole_screen() { /* called in termcap as soon as LI is known */
--- 708,718 ----
#ifndef OVLB
! STATIC_DCL boolean whole_screen;
#else /* OVLB */
! STATIC_OVL boolean NEARDATA whole_screen = TRUE;
void
set_whole_screen() { /* called in termcap as soon as LI is known */
***************
*** 674,680 ****
#ifdef LINT /* lint may handle static decl poorly -- static boolean so; */
boolean so;
#else
! static boolean so;
#endif
if(mode == 0) {
if(!whole_screen) {
--- 738,744 ----
#ifdef LINT /* lint may handle static decl poorly -- static boolean so; */
boolean so;
#else
! static boolean NEARDATA so;
#endif
if(mode == 0) {
if(!whole_screen) {
***************
*** 688,700 ****
so = flags.standout;
flags.standout = 1;
} else {
- #ifdef MACOS
- macflags |= fFullScrKluge;
- #endif
if(mode == 1) {
- #ifdef MACOS
- macflags |= fCornScrKluge;
- #endif
curs(1, LI);
more();
}
--- 752,758 ----
***************
*** 705,713 ****
curs(1, ROWNO+4);
cl_eos();
}
- #ifdef MACOS
- macflags &= ~fScreenKluges;
- #endif
}
}
--- 763,768 ----
***************
*** 718,723 ****
--- 773,782 ----
page_line(s) /* returns 1 if we should quit */
register const char *s;
{
+ #ifdef CLIPPING
+ /* we assume here that no data files have more than 80 chars/line */
+ static char tmp[81], *t;
+ #endif
if(cury == LI-1) {
if(!*s)
return(0); /* suppress blank lines at top */
***************
*** 735,740 ****
--- 794,821 ----
cl_eos();
}
}
+ #ifdef CLIPPING
+ /* if lines are too long for the screen, first try stripping leading blanks */
+ if (strlen(s) >= CO) {
+ while (*s == ' ' || *s == '\t') s++;
+ }
+
+ /* if it's still too long, try compressing blanks */
+ if (strlen(s) >= CO) {
+ t = tmp;
+ while ( (*t = *s) != 0) {
+ if (*t == ' ') {
+ while (*s == ' ')
+ s++;
+ }
+ else
+ s++;
+ t++;
+ }
+ s = tmp;
+ }
+ #endif /* CLIPPING */
+
#ifdef TERMINFO
xputs(s); xputc('\n');
#else
***************
*** 767,775 ****
static struct line {
struct line *next_line;
char *line_text;
! } *texthead, *texttail;
! static int maxlen;
! static int linect;
register struct line *tl;
register boolean hmenu = FALSE;
--- 848,856 ----
static struct line {
struct line *next_line;
char *line_text;
! } NEARDATA *texthead, NEARDATA *texttail;
! static int NEARDATA maxlen;
! static int NEARDATA linect;
register struct line *tl;
register boolean hmenu = FALSE;
***************
*** 817,833 ****
else
if(mode == 2) {
register int curline, lth;
- #ifdef MACOS
- short tmpflags;
- extern struct line *mactexthead;
- extern int macmaxlen, maclinect;
-
- tmpflags = macflags;
- macflags |= fDoUpdate | fDisplayKluge;
- mactexthead = texthead;
- macmaxlen = maxlen;
- maclinect = linect;
- #endif
if(flags.toplin == 1) more(); /* ab@unido */
remember_topl();
--- 898,903 ----
***************
*** 862,870 ****
#endif
cl_end ();
if (!hmenu) {
- #ifdef MACOS
- macflags |= fCornScrKluge;
- #endif
cmore (text);
}
if (!hmenu || clear_help(hc)) {
--- 932,937 ----
***************
*** 872,886 ****
cl_end ();
docorner (lth, curline-1);
}
#ifdef MACOS
! mactexthead = NULL;
! macflags |= (tmpflags & (fDoUpdate | fDisplayKluge));
#endif
- } else { /* feed to pager */
set_pager(0);
for (tl = texthead; tl; tl = tl->next_line) {
if (page_line (tl->line_text)) {
set_pager(2);
while(tl = texthead) {
texthead = tl->next_line;
free((genericptr_t) tl);
--- 939,958 ----
cl_end ();
docorner (lth, curline-1);
}
+ } else { /* feed to pager */
#ifdef MACOS
! short tmpflags;
!
! tmpflags = macflags;
! macflags &= ~fDoNonKeyEvt;
#endif
set_pager(0);
for (tl = texthead; tl; tl = tl->next_line) {
if (page_line (tl->line_text)) {
set_pager(2);
+ #ifdef MACOS
+ macflags = tmpflags;
+ #endif
while(tl = texthead) {
texthead = tl->next_line;
free((genericptr_t) tl);
***************
*** 893,898 ****
--- 965,973 ----
set_pager(2);
} else
set_pager(1);
+ #ifdef MACOS
+ macflags = tmpflags;
+ #endif
}
}
***************
*** 966,972 ****
cornline(-1,"");
}
! XSTATIC boolean
clear_help(c)
char c;
{
--- 1041,1047 ----
cornline(-1,"");
}
! STATIC_OVL boolean
clear_help(c)
char c;
{
***************
*** 1004,1010 ****
);
}
! XSTATIC boolean
valid_help(c)
char c;
{
--- 1079,1085 ----
);
}
! STATIC_OVL boolean
valid_help(c)
char c;
{
*** src/Old/pickup.c Sun Jun 3 14:02:35 1990
--- src/pickup.c Sun May 27 17:58:15 1990
***************
*** 7,26 ****
*/
#include "hack.h"
! #ifndef OVERLAY
! static int FDECL(in_container,(struct obj *));
! static int FDECL(ck_container,(struct obj *));
! static int FDECL(ck_bag,(struct obj *));
! static int FDECL(out_container,(struct obj *));
! #else
! int FDECL(in_container,(struct obj *));
! int FDECL(ck_container,(struct obj *));
! int FDECL(ck_bag,(struct obj *));
! int FDECL(out_container,(struct obj *));
! #endif
void FDECL(explode_bag,(struct obj *));
! #ifdef OVLB
static const char nearloadmsg[] = "have a little trouble lifting";
--- 7,21 ----
*/
#include "hack.h"
! STATIC_PTR int FDECL(in_container,(struct obj *));
! STATIC_PTR int FDECL(ck_container,(struct obj *));
! STATIC_PTR int FDECL(ck_bag,(struct obj *));
! STATIC_PTR int FDECL(out_container,(struct obj *));
void FDECL(explode_bag,(struct obj *));
! #define DELTA_CWT(cont) ((cont)->cursed?(obj->owt*2):(obj->owt/((cont)->blessed?4:2)) + 1)
!
! #ifdef OVL0
static const char nearloadmsg[] = "have a little trouble lifting";
***************
*** 257,265 ****
if(wt > 0) {
if(obj->quan > 1) {
/* see how many we can lift */
! int savequan = obj->quan;
int iw = inv_weight();
! int qq;
for(qq = 1; qq < savequan; qq++){
obj->quan = qq;
if(iw + weight(obj) > 0)
--- 252,260 ----
if(wt > 0) {
if(obj->quan > 1) {
/* see how many we can lift */
! unsigned savequan = obj->quan;
int iw = inv_weight();
! unsigned qq;
for(qq = 1; qq < savequan; qq++){
obj->quan = qq;
if(iw + weight(obj) > 0)
***************
*** 274,280 ****
You("can only carry %s of the %s lying here.",
(qq == 1) ? "one" : "some",
doname(obj));
! obj3 = splitobj(obj, qq);
if(obj3->otyp == SCR_SCARE_MONSTER)
if(obj3->spe) obj->spe = 0;
goto lift_some;
--- 269,275 ----
You("can only carry %s of the %s lying here.",
(qq == 1) ? "one" : "some",
doname(obj));
! obj3 = splitobj(obj, (int)qq);
if(obj3->otyp == SCR_SCARE_MONSTER)
if(obj3->spe) obj->spe = 0;
goto lift_some;
***************
*** 296,303 ****
if(obj->spe) obj->spe = 0;
break;
}
! { int pickquan = obj->quan;
! int mergquan;
obj = pick_obj(obj);
if(wt > -5) You(nearloadmsg);
--- 291,298 ----
if(obj->spe) obj->spe = 0;
break;
}
! { unsigned pickquan = obj->quan;
! unsigned mergquan;
obj = pick_obj(obj);
if(wt > -5) You(nearloadmsg);
***************
*** 324,329 ****
--- 319,327 ----
return(addinv(otmp)); /* might merge it with other objects */
}
+ #endif /* OVL1 */
+ #ifdef OVLB
+
int
doloot() { /* loot a container on the floor. */
***************
*** 367,379 ****
}
static
! struct obj *current_container; /* a local variable of use_container, to be
used by its local procedures in/ck_container */
#define Icebox (current_container->otyp == ICE_BOX)
int baggone; /* used in askchain so bag isn't used after explosion */
#endif /* OVLB */
! #ifdef OVL0
void
inc_cwt(cobj, obj)
--- 365,377 ----
}
static
! struct obj NEARDATA *current_container; /* a local variable of use_container, to be
used by its local procedures in/ck_container */
#define Icebox (current_container->otyp == ICE_BOX)
int baggone; /* used in askchain so bag isn't used after explosion */
#endif /* OVLB */
! #ifdef OVL1
void
inc_cwt(cobj, obj)
***************
*** 380,396 ****
register struct obj *cobj, *obj;
{
if (cobj->otyp == BAG_OF_HOLDING)
! cobj->owt += (cobj->cursed?(obj->owt*2):(obj->owt/(cobj->blessed?4:2)) + 1);
else cobj->owt += obj->owt;
}
! #endif /* OVL0 */
#ifdef OVLB
! #ifndef OVERLAY
! static
! #endif
! int
in_container(obj)
register struct obj *obj;
{
--- 378,391 ----
register struct obj *cobj, *obj;
{
if (cobj->otyp == BAG_OF_HOLDING)
! cobj->owt += DELTA_CWT(cobj);
else cobj->owt += obj->owt;
}
! #endif /* OVL1 */
#ifdef OVLB
! STATIC_PTR int
in_container(obj)
register struct obj *obj;
{
***************
*** 466,475 ****
return(1);
}
! #ifndef OVERLAY
! static
! #endif
! int
ck_container(obj)
register struct obj *obj;
{
--- 461,467 ----
return(1);
}
! STATIC_PTR int
ck_container(obj)
register struct obj *obj;
{
***************
*** 479,488 ****
/* ck_bag() needs a formal argument to make the overlay/prototype mechanism
* work right */
/*ARGSUSED*/
! #ifndef OVERLAY
! static
! #endif
! int
ck_bag(obj)
struct obj *obj;
{
--- 471,477 ----
/* ck_bag() needs a formal argument to make the overlay/prototype mechanism
* work right */
/*ARGSUSED*/
! STATIC_PTR int
ck_bag(obj)
struct obj *obj;
{
***************
*** 489,502 ****
return(!baggone);
}
! #ifndef OVERLAY
! static
! #endif
! int
out_container(obj)
register struct obj *obj;
{
! register struct obj *otmp;
register boolean near_capacity = (inv_weight() > -5);
if(inv_cnt() >= 52) {
--- 478,488 ----
return(!baggone);
}
! STATIC_PTR int
out_container(obj)
register struct obj *obj;
{
! register struct obj *otmp, *ootmp;
register boolean near_capacity = (inv_weight() > -5);
if(inv_cnt() >= 52) {
***************
*** 503,509 ****
pline("You have no room to hold anything else.");
return(0);
}
! if(obj->otyp != LOADSTONE && inv_weight() + (int)obj->owt > 0) {
char buf[BUFSZ];
Strcpy(buf, doname(obj));
--- 489,498 ----
pline("You have no room to hold anything else.");
return(0);
}
! if(obj->otyp != LOADSTONE && inv_weight() + (int)obj->owt -
! (carried(current_container) ?
! (current_container->otyp == BAG_OF_HOLDING ?
! (int)DELTA_CWT(current_container) : (int)obj->owt) : 0) > 0) {
char buf[BUFSZ];
Strcpy(buf, doname(obj));
***************
*** 528,558 ****
if (Icebox) obj->age = monstermoves - obj->age;
/* simulated point of time */
! (void) addinv(obj);
if (near_capacity) You("have a little trouble removing");
! prinv(obj);
return 0;
}
- void
- get_all_from_box() {
- register struct obj *otmp, *cobj, *ootmp, *nxobj;
-
- for(otmp = invent; otmp; otmp = otmp->nobj) {
- cobj = otmp;
- if(Is_container(otmp)) {
- current_container = otmp;
- for(ootmp=fcobj,nxobj=(fcobj ? fcobj->nobj : 0); ootmp;
- ootmp=nxobj,nxobj=(ootmp ? ootmp->nobj : 0) )
- if(ootmp->cobj == cobj)
- (void)out_container(ootmp);
- }
- }
- return;
- }
-
/* for getobj: 0: allow cnt; #: allow all types; %: expect food */
! static const char frozen_food[] = { '0', '#', FOOD_SYM, 0 };
void
use_container(obj, held)
--- 517,530 ----
if (Icebox) obj->age = monstermoves - obj->age;
/* simulated point of time */
! ootmp = addinv(obj);
if (near_capacity) You("have a little trouble removing");
! prinv(ootmp);
return 0;
}
/* for getobj: 0: allow cnt; #: allow all types; %: expect food */
! static const char NEARDATA frozen_food[] = { '0', '#', FOOD_SYM, 0 };
void
use_container(obj, held)
***************
*** 662,669 ****
dec_cwt(cobj, obj)
register struct obj *cobj, *obj;
{
! if (Is_mbag(cobj))
! cobj->owt -= (cobj->cursed?(obj->owt*2):(obj->owt/(cobj->blessed?4:2)) + 1);
else cobj->owt -= obj->owt;
if(cobj->owt < objects[cobj->otyp].oc_weight)
--- 634,641 ----
dec_cwt(cobj, obj)
register struct obj *cobj, *obj;
{
! if (cobj->otyp == BAG_OF_HOLDING)
! cobj->owt -= DELTA_CWT(cobj);
else cobj->owt -= obj->owt;
if(cobj->owt < objects[cobj->otyp].oc_weight)
*** src/Old/polyself.c Sun Jun 3 14:03:05 1990
--- src/polyself.c Thu May 31 22:11:33 1990
***************
*** 5,15 ****
#include "hack.h"
#ifdef POLYSELF
static void NDECL(break_armor);
static void FDECL(drop_weapon,(int));
static void NDECL(skinback);
static void NDECL(uunstick);
- #ifdef OVLB
static boolean sticky;
#endif /* OVLB */
#endif
--- 5,15 ----
#include "hack.h"
#ifdef POLYSELF
+ #ifdef OVLB
static void NDECL(break_armor);
static void FDECL(drop_weapon,(int));
static void NDECL(skinback);
static void NDECL(uunstick);
static boolean sticky;
#endif /* OVLB */
#endif
***************
*** 629,635 ****
#ifdef MACOS
char mac_tbuf[80];
if(!flags.silent) SysBeep(1);
! sprintf(mac_tbuf, "Really confuse %s?", mon_nam(mtmp));
if(UseMacAlertText(128, mac_tbuf) != 1) continue;
#else
pline("Really confuse %s? ", mon_nam(mtmp));
--- 629,635 ----
#ifdef MACOS
char mac_tbuf[80];
if(!flags.silent) SysBeep(1);
! Sprintf(mac_tbuf, "Really confuse %s?", mon_nam(mtmp));
if(UseMacAlertText(128, mac_tbuf) != 1) continue;
#else
pline("Really confuse %s? ", mon_nam(mtmp));
***************
*** 705,710 ****
--- 705,712 ----
}
#endif
+ #endif /* OVLB */
+ #ifdef OVL1
const char *
body_part(part)
int part;
***************
*** 713,745 ****
* plus the trailing null, after pluralizing (since sometimes a
* buffer is made a fixed size and must be able to hold it)
*/
! static const char *humanoid_parts[] = { "arm", "eye", "face", "finger",
"fingertip", "foot", "hand", "handed", "head", "leg",
"light headed", "neck", "spine", "toe" };
#ifdef POLYSELF
! static const char *jelly_parts[] = { "pseudopod", "dark spot", "front",
"pseudopod extension", "pseudopod extremity",
"pseudopod root", "grasp", "grasped", "cerebral area",
"lower pseudopod", "viscous", "middle", "surface",
"pseudopod extremity" },
! *animal_parts[] = { "forelimb", "eye", "face", "foreclaw", "claw tip",
"rear claw", "foreclaw", "clawed", "head", "rear limb",
"light headed", "neck", "spine", "rear claw tip" },
! *horse_parts[] = { "forelimb", "eye", "face", "forehoof", "hoof tip",
"rear hoof", "foreclaw", "hooved", "head", "rear limb",
"light headed", "neck", "backbone", "rear hoof tip" },
! *sphere_parts[] = { "appendage", "optic nerve", "body", "tentacle",
"tentacle tip", "lower appendage", "tentacle", "tentacled",
"body", "lower tentacle", "rotational", "equator", "body",
"lower tentacle tip" },
! *fungus_parts[] = { "mycelium", "visual area", "front", "hypha",
"hypha", "root", "strand", "stranded", "cap area",
"rhizome", "sporulated", "stalk", "root", "rhizome tip" },
! *vortex_parts[] = { "region", "eye", "front", "minor current",
"minor current", "lower current", "swirl", "swirled",
"central core", "lower current", "addled", "center",
"currents", "edge" },
! *snake_parts[] = { "vestigial limb", "eye", "face", "large scale",
"large scale tip", "rear region", "scale gap", "scale gapped",
"head", "rear region", "light headed", "neck", "length",
"rear scale" };
--- 715,747 ----
* plus the trailing null, after pluralizing (since sometimes a
* buffer is made a fixed size and must be able to hold it)
*/
! static const char NEARDATA *humanoid_parts[] = { "arm", "eye", "face", "finger",
"fingertip", "foot", "hand", "handed", "head", "leg",
"light headed", "neck", "spine", "toe" };
#ifdef POLYSELF
! static const char NEARDATA *jelly_parts[] = { "pseudopod", "dark spot", "front",
"pseudopod extension", "pseudopod extremity",
"pseudopod root", "grasp", "grasped", "cerebral area",
"lower pseudopod", "viscous", "middle", "surface",
"pseudopod extremity" },
! NEARDATA *animal_parts[] = { "forelimb", "eye", "face", "foreclaw", "claw tip",
"rear claw", "foreclaw", "clawed", "head", "rear limb",
"light headed", "neck", "spine", "rear claw tip" },
! NEARDATA *horse_parts[] = { "forelimb", "eye", "face", "forehoof", "hoof tip",
"rear hoof", "foreclaw", "hooved", "head", "rear limb",
"light headed", "neck", "backbone", "rear hoof tip" },
! NEARDATA *sphere_parts[] = { "appendage", "optic nerve", "body", "tentacle",
"tentacle tip", "lower appendage", "tentacle", "tentacled",
"body", "lower tentacle", "rotational", "equator", "body",
"lower tentacle tip" },
! NEARDATA *fungus_parts[] = { "mycelium", "visual area", "front", "hypha",
"hypha", "root", "strand", "stranded", "cap area",
"rhizome", "sporulated", "stalk", "root", "rhizome tip" },
! NEARDATA *vortex_parts[] = { "region", "eye", "front", "minor current",
"minor current", "lower current", "swirl", "swirled",
"central core", "lower current", "addled", "center",
"currents", "edge" },
! NEARDATA *snake_parts[] = { "vestigial limb", "eye", "face", "large scale",
"large scale tip", "rear region", "scale gap", "scale gapped",
"head", "rear region", "light headed", "neck", "length",
"rear scale" };
***************
*** 761,767 ****
#endif
}
! #endif /* OVLB */
#ifdef OVL0
int
--- 763,769 ----
#endif
}
! #endif /* OVL1 */
#ifdef OVL0
int
*** src/Old/potion.c Sun Jun 3 14:03:42 1990
--- src/potion.c Sat Jun 2 19:45:47 1990
***************
*** 5,11 ****
#include "hack.h"
#ifdef OVLB
! static int nothing, unkn;
#endif /* OVLB */
#ifdef WORM
--- 5,14 ----
#include "hack.h"
#ifdef OVLB
! static void NDECL(ghost_from_bottle);
! static boolean FDECL(neutralizes, (struct obj *,struct obj *));
!
! static int NEARDATA nothing, NEARDATA unkn;
#endif /* OVLB */
#ifdef WORM
***************
*** 22,28 ****
#ifdef OVLB
! static const char beverages[] = { POTION_SYM, 0 };
void
make_confused(xtime,talk)
--- 25,31 ----
#ifdef OVLB
! static const char NEARDATA beverages[] = { POTION_SYM, 0 };
void
make_confused(xtime,talk)
***************
*** 157,167 ****
static void
ghost_from_bottle()
{
! if(!makemon(&mons[PM_GHOST], u.ux, u.uy)){
pline("This bottle turns out to be empty.");
return;
}
! pline("As you open the bottle, an enormous ghost emerges!");
if(flags.verbose)
You("are frightened to death, and unable to move.");
nomul(-3);
--- 160,177 ----
static void
ghost_from_bottle()
{
! struct monst *mtmp = makemon(&mons[PM_GHOST], u.ux, u.uy);
!
! if (!mtmp) {
pline("This bottle turns out to be empty.");
return;
}
! if (Blind) {
! pline("As you open the bottle, something emerges.");
! return;
! }
! pline("As you open the bottle, an enormous %s emerges!",
! Hallucination ? rndmonnam() : "ghost");
if(flags.verbose)
You("are frightened to death, and unable to move.");
nomul(-3);
***************
*** 268,273 ****
--- 278,285 ----
}
if(++i >= A_MAX) i = 0;
}
+ if((ABASE(A_STR) == AMAX(A_STR)) && (u.uhs >= 3))
+ losestr(1); /* kludge - mrs */
}
break;
case POT_HALLUCINATION:
***************
*** 342,352 ****
unkn++;
You("have an uneasy feeling...");
} else {
- You("feel self-knowledgeable...");
if (otmp->blessed) {
adjattrib(A_INT, 1, FALSE);
adjattrib(A_WIS, 1, FALSE);
}
more();
enlightenment();
pline("The feeling subsides.");
--- 354,364 ----
unkn++;
You("have an uneasy feeling...");
} else {
if (otmp->blessed) {
adjattrib(A_INT, 1, FALSE);
adjattrib(A_WIS, 1, FALSE);
}
+ You("feel self-knowledgeable...");
more();
enlightenment();
pline("The feeling subsides.");
***************
*** 360,377 ****
else {
newsym(u.ux,u.uy);
if(!Blind)
! pline("Gee! All of a sudden, you can't see yourself.");
else
You("feel rather airy."), unkn++;
}
if (otmp->blessed && !(HInvis & INTRINSIC)) {
#ifndef MACOS
pline("Do you want the invisibility to be permanent? ");
- nothing = 0;
if (yn()=='n') HInvis += rn1(15,31);
else HInvis |= INTRINSIC;
#else
- nothing = 0;
if (UseMacAlertText(128,
"Do you want the invisibility to be permanent ?")
== 2) HInvis += rn1(15,31);
--- 372,390 ----
else {
newsym(u.ux,u.uy);
if(!Blind)
! pline(Hallucination ?
! "Far out, man! You can see right through yourself!" :
! "Gee! All of a sudden, you can't see yourself.");
else
You("feel rather airy."), unkn++;
}
if (otmp->blessed && !(HInvis & INTRINSIC)) {
+ nothing = 0;
#ifndef MACOS
pline("Do you want the invisibility to be permanent? ");
if (yn()=='n') HInvis += rn1(15,31);
else HInvis |= INTRINSIC;
#else
if (UseMacAlertText(128,
"Do you want the invisibility to be permanent ?")
== 2) HInvis += rn1(15,31);
***************
*** 520,529 ****
if (otmp->cursed) {
unkn++;
/* they went up a level */
! if(dlevel > 1 && dlevel <= MAXLEVEL) {
You("rise up, through the ceiling!");
goto_level(dlevel-1, FALSE, FALSE);
} else You("have an uneasy feeling.");
break;
}
pluslvl();
--- 533,554 ----
if (otmp->cursed) {
unkn++;
/* they went up a level */
! #ifdef ENDGAME
! if((dlevel > 1 || u.uhave_amulet) &&
! dlevel <= MAXLEVEL) {
You("rise up, through the ceiling!");
+ goto_level((dlevel==1) ? ENDLEVEL
+ : dlevel-1, FALSE, FALSE);
+ } else You("have an uneasy feeling.");
+ #else
+ if(dlevel > 1 && dlevel <= MAXLEVEL) {
+ You("rise up, through the ceiling!");
+ #ifdef MACOS
+ segments |= SEG_POTION;
+ #endif
goto_level(dlevel-1, FALSE, FALSE);
} else You("have an uneasy feeling.");
+ #endif
break;
}
pluslvl();
***************
*** 740,745 ****
--- 765,772 ----
if(!Blind)
pline("%s looks healthier.", Monnam(mon));
mon->mhp += d(2,6);
+ if (mon->mhp > mon->mhpmax)
+ mon->mhp = mon->mhpmax;
}
}
/* TO DO: Gremlins multiply when doused with water */
***************
*** 1023,1032 ****
return(1);
}
! obj->spe--; /* diluted */
! if (obj->otyp == POT_WATER)
! pline("The mixture bubbles violently, then clears.");
! else {
if (!Blind) {
pline("The mixture looks %s.", objects[obj->otyp].oc_descr);
obj->dknown = 1;
--- 1050,1061 ----
return(1);
}
! if (obj->otyp == POT_WATER) {
! obj->spe = 0; /* in case it was diluted before */
! pline("The mixture bubbles violently%s.",
! Blind ? "" : ", then clears");
! } else {
! obj->spe--; /* diluted */
if (!Blind) {
pline("The mixture looks %s.", objects[obj->otyp].oc_descr);
obj->dknown = 1;
***************
*** 1059,1064 ****
--- 1088,1094 ----
potion->otyp = POT_WATER;
potion->blessed = 0;
potion->cursed = 0;
+ potion->spe = 0;
return(1);
}
***************
*** 1159,1181 ****
{
register struct obj *objs;
register struct monst *mtmp;
! boolean mfound=FALSE;
if(!fobj) {
for(mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
! if (mtmp->minvent) {
! /* OK, it's used for 2 different things */
! mfound = TRUE;
break;
}
}
! if (!mfound) {
if (otmp)
strange_feeling(otmp, "You feel a pull downward.");
return(1);
}
}
! mfound = FALSE;
for(objs = fobj; objs; objs = objs->nobj)
if(objs->ox != u.ux || objs->oy != u.uy)
goto outobjmap;
--- 1189,1213 ----
{
register struct obj *objs;
register struct monst *mtmp;
! boolean mfound=FALSE, mofound=FALSE;
if(!fobj) {
for(mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
! /* mofound can be 1 of 2 completely different things,
! * either of which stops the "strange feeling"...
! */
! if (mtmp->minvent || (mtmp->mimic && otmp->cursed)) {
! mofound = TRUE;
break;
}
}
! if (!mofound) {
if (otmp)
strange_feeling(otmp, "You feel a pull downward.");
return(1);
}
}
! if (mofound) goto outobjmap;
for(objs = fobj; objs; objs = objs->nobj)
if(objs->ox != u.ux || objs->oy != u.uy)
goto outobjmap;
*** src/Old/pray.c Sun Jun 3 14:04:30 1990
--- src/pray.c Sat May 12 16:07:09 1990
***************
*** 650,658 ****
case 6: pline ("An object appears at your %s!",
makeplural(body_part(FOOT)));
#ifdef SPELLS
! bless(mkobj_at(SPBOOK_SYM, u.ux, u.uy));
#else
! bless(mkobj_at(SCROLL_SYM, u.ux, u.uy));
#endif
break;
--- 650,658 ----
case 6: pline ("An object appears at your %s!",
makeplural(body_part(FOOT)));
#ifdef SPELLS
! bless(mkobj_at(SPBOOK_SYM, u.ux, u.uy, TRUE));
#else
! bless(mkobj_at(SCROLL_SYM, u.ux, u.uy, TRUE));
#endif
break;
***************
*** 692,698 ****
}
#ifdef ENDGAME
! static const char sacrifice_types[] = { FOOD_SYM, AMULET_SYM, 0 };
#endif
static void
--- 692,698 ----
}
#ifdef ENDGAME
! static const char NEARDATA sacrifice_types[] = { FOOD_SYM, AMULET_SYM, 0 };
#endif
static void
***************
*** 772,789 ****
} else {
register struct monst *dmon;
/* Human sacrifice on a chaotic altar is equivalent to demon summoning */
! #ifdef THEOLOGY
if (altaralign == U_CHAOTIC)
pline("The blood covers the altar!");
else {
! #endif
pline("The blood floods over the altar, which vanishes in %s cloud!",
an(Hallucination ? hcolor() : black));
levl[u.ux][u.uy].typ = ROOM;
levl[u.ux][u.uy].altarmask = 0;
! #ifdef THEOLOGY
}
! #endif
change_luck(2);
if(Invisible) newsym(u.ux, u.uy);
if(dmon = makemon(&mons[dlord()], u.ux, u.uy)) {
--- 772,789 ----
} else {
register struct monst *dmon;
/* Human sacrifice on a chaotic altar is equivalent to demon summoning */
! # ifdef THEOLOGY
if (altaralign == U_CHAOTIC)
pline("The blood covers the altar!");
else {
! # endif
pline("The blood floods over the altar, which vanishes in %s cloud!",
an(Hallucination ? hcolor() : black));
levl[u.ux][u.uy].typ = ROOM;
levl[u.ux][u.uy].altarmask = 0;
! # ifdef THEOLOGY
}
! # endif
change_luck(2);
if(Invisible) newsym(u.ux, u.uy);
if(dmon = makemon(&mons[dlord()], u.ux, u.uy)) {
***************
*** 817,822 ****
--- 817,823 ----
#ifdef __GNULINT__
else { impossible("Bad unicorn type??"); unicalign = 0; }
#endif
+ #ifdef ALTARS
/* If same as altar, always a very bad action. */
if (unicalign == altaralign) {
pline("Such an action is an insult to %s!", (unicalign== -1)
***************
*** 832,840 ****
else You("feel you are thoroughly on the right path.");
u.ualign = ALIGNLIM;
value += 3;
! } else if (unicalign == u.ualigntyp) {
/* If sacrificing unicorn of your alignment to altar not of */
/* your alignment, your god gets angry and it's a conversion */
u.ualign = -1;
value = 1;
} else value += 3;
--- 833,843 ----
else You("feel you are thoroughly on the right path.");
u.ualign = ALIGNLIM;
value += 3;
! } else
/* If sacrificing unicorn of your alignment to altar not of */
/* your alignment, your god gets angry and it's a conversion */
+ #endif
+ if (unicalign == u.ualigntyp) {
u.ualign = -1;
value = 1;
} else value += 3;
***************
*** 959,964 ****
--- 962,968 ----
You("feel the power of %s increase.",
u_gname());
change_luck(1);
+ /* Yes, this is supposed to be &=, not |= */
levl[u.ux][u.uy].altarmask &= A_SHRINE;
/* the following accommodates stupid compilers */
levl[u.ux][u.uy].altarmask =
*** src/Old/pri.c Sun Jun 3 14:05:14 1990
--- src/pri.c Thu May 31 22:13:26 1990
***************
*** 5,43 ****
#define MONATTK_H /* comment line for pre-compiled headers */
/* block some unused #defines to avoid overloading some cpp's */
#include "hack.h"
- #include <ctype.h> /* for isalpha() */
#if defined(ALTARS) && defined(THEOLOGY)
#include "epri.h"
#endif
#include "termcap.h"
! OSTATIC void FDECL(hilite, (int,int,UCHAR_P, UCHAR_P));
! OSTATIC void FDECL(cornbot, (int));
#ifdef TEXTCOLOR
! OSTATIC uchar FDECL(mimic_color, (struct monst *));
#endif
! #ifndef ASCIIGRAPH
# define g_putch (void) putchar
! #endif
! #ifndef g_putch
! #ifdef OVL0
static boolean GFlag = FALSE; /* graphic flag */
#endif /* OVL0 */
- #endif
/* 100 suffices for bot(); must be larger than COLNO */
#define MAXCO 100
! VSTATIC char oldbot1[MAXCO], newbot1[MAXCO];
! VSTATIC char oldbot2[MAXCO], newbot2[MAXCO];
#ifdef OVL2
! static const char *dispst = "*0#@#0#*0#@#0#*0#@#0#*0#@#0#*0#@#0#*";
#endif /* OVL2 */
#ifndef OVLB
! OSTATIC int mrank_sz;
#else /* OVLB */
! XSTATIC int mrank_sz = 0; /* loaded by max_rank_sz (called in u_init) */
#endif /* OVLB */
#ifdef CLIPPING
--- 5,49 ----
#define MONATTK_H /* comment line for pre-compiled headers */
/* block some unused #defines to avoid overloading some cpp's */
#include "hack.h"
#if defined(ALTARS) && defined(THEOLOGY)
#include "epri.h"
#endif
#include "termcap.h"
! #ifdef OVL0
! static void FDECL(fillbot, (int,char *,char *));
! static void NDECL(bot1);
! static void NDECL(bot2);
! #endif /* OVL0 */
!
! STATIC_DCL void FDECL(hilite, (int,int,UCHAR_P, UCHAR_P));
! STATIC_DCL void FDECL(cornbot, (int));
#ifdef TEXTCOLOR
! STATIC_DCL uchar FDECL(mimic_color, (struct monst *));
#endif
! #ifdef OVL0
! # ifndef ASCIIGRAPH
# define g_putch (void) putchar
! # endif /* ASCIIGRAPH */
! # ifndef g_putch
! static void FDECL(g_putch, (UCHAR_P));
static boolean GFlag = FALSE; /* graphic flag */
+ # endif
#endif /* OVL0 */
/* 100 suffices for bot(); must be larger than COLNO */
#define MAXCO 100
! STATIC_VAR char NEARDATA oldbot1[MAXCO], NEARDATA newbot1[MAXCO];
! STATIC_VAR char NEARDATA oldbot2[MAXCO], NEARDATA newbot2[MAXCO];
#ifdef OVL2
! static const char NEARDATA *dispst = "*0#@#0#*0#@#0#*0#@#0#*0#@#0#*0#@#0#*";
#endif /* OVL2 */
#ifndef OVLB
! STATIC_DCL int mrank_sz;
#else /* OVLB */
! STATIC_OVL int NEARDATA mrank_sz = 0; /* loaded by max_rank_sz (called in u_init) */
#endif /* OVLB */
#ifdef CLIPPING
***************
*** 126,131 ****
--- 132,140 ----
#endif
}
+ #endif /* OVLB */
+ #ifdef OVL0
+
#ifdef CLIPPING
void
cliparound(x, y)
***************
*** 160,168 ****
}
#endif /* CLIPPING */
- #endif /* OVLB */
- #ifdef OVL0
-
/*
* Allow for a different implementation than this...
*/
--- 169,174 ----
***************
*** 173,179 ****
g_putch(ch)
uchar ch;
{
! if (IBMgraphics) /* IBM-compatible displays don't need other stuff */
(void) putchar(ch);
else if (ch & 0x80) {
if (!GFlag) {
--- 179,186 ----
g_putch(ch)
uchar ch;
{
! if (flags.IBMgraphics)
! /* IBM-compatible displays don't need other stuff */
(void) putchar(ch);
else if (ch & 0x80) {
if (!GFlag) {
***************
*** 272,278 ****
register const char *ch;
register struct monst *mtmp = 0;
! if((x != u.ux) || (y != u.uy)) {
if(!(mtmp = m_at(x, y))) {
impossible("shield effect at %d,%d", x, y);
--- 279,289 ----
register const char *ch;
register struct monst *mtmp = 0;
! nscr();
!
! if((x == u.ux) && (y == u.uy))
! curs_on_u();
! else {
if(!(mtmp = m_at(x, y))) {
impossible("shield effect at %d,%d", x, y);
***************
*** 429,435 ****
#endif /* OVL0 */
#ifdef OVLB
! XSTATIC void
cornbot(lth)
register int lth;
{
--- 440,446 ----
#endif /* OVL0 */
#ifdef OVLB
! STATIC_OVL void
cornbot(lth)
register int lth;
{
***************
*** 677,683 ****
/* Make sure that there are 18 entries in the rank arrays. */
/* 0 and even entries are male ranks, odd entries are female. */
! static const char *mage_ranks[] = {
"Evoker",
"Evoker",
"Conjurer",
--- 688,694 ----
/* Make sure that there are 18 entries in the rank arrays. */
/* 0 and even entries are male ranks, odd entries are female. */
! static const char NEARDATA *mage_ranks[] = {
"Evoker",
"Evoker",
"Conjurer",
***************
*** 698,704 ****
"Mage"
};
! static const char *priest_ranks[] = {
"Aspirant",
"Aspirant",
"Acolyte",
--- 709,715 ----
"Mage"
};
! static const char NEARDATA *priest_ranks[] = {
"Aspirant",
"Aspirant",
"Acolyte",
***************
*** 719,725 ****
"High Priestess"
};
! static const char *thief_ranks[] = {
"Footpad",
"Footpad",
"Cutpurse",
--- 730,736 ----
"High Priestess"
};
! static const char NEARDATA *thief_ranks[] = {
"Footpad",
"Footpad",
"Cutpurse",
***************
*** 740,746 ****
"Thief"
};
! static const char *fighter_ranks[] = {
"Stripling",
"Stripling",
"Skirmisher",
--- 751,757 ----
"Thief"
};
! static const char NEARDATA *fighter_ranks[] = {
"Stripling",
"Stripling",
"Skirmisher",
***************
*** 761,767 ****
"Lady"
};
! static const char *tourist_ranks[] = {
"Rambler",
"Rambler",
"Sightseer",
--- 772,778 ----
"Lady"
};
! static const char NEARDATA *tourist_ranks[] = {
"Rambler",
"Rambler",
"Sightseer",
***************
*** 782,788 ****
"Adventurer"
};
! static const char *nomad_ranks[] = {
"Troglodyte",
"Troglodyte",
"Aborigine",
--- 793,799 ----
"Adventurer"
};
! static const char NEARDATA *nomad_ranks[] = {
"Troglodyte",
"Troglodyte",
"Aborigine",
***************
*** 803,809 ****
"Pioneer"
};
! static const char *knight_ranks[] = {
"Gallant",
"Gallant",
"Esquire",
--- 814,820 ----
"Pioneer"
};
! static const char NEARDATA *knight_ranks[] = {
"Gallant",
"Gallant",
"Esquire",
***************
*** 824,830 ****
"Paladin"
};
! static const char *archeo_ranks[] = {
"Digger",
"Digger",
"Field Worker",
--- 835,841 ----
"Paladin"
};
! static const char NEARDATA *archeo_ranks[] = {
"Digger",
"Digger",
"Field Worker",
***************
*** 845,851 ****
"Curator"
};
! static const char *healer_ranks[] = {
"Pre-Med",
"Pre-Med",
"Med Student",
--- 856,862 ----
"Curator"
};
! static const char NEARDATA *healer_ranks[] = {
"Pre-Med",
"Pre-Med",
"Med Student",
***************
*** 866,872 ****
"Chief Surgeon"
};
! static const char *barbarian_ranks[] = {
"Plunderer",
"Plunderess",
"Pillager",
--- 877,883 ----
"Chief Surgeon"
};
! static const char NEARDATA *barbarian_ranks[] = {
"Plunderer",
"Plunderess",
"Pillager",
***************
*** 887,893 ****
"Conqueress"
};
! static const char *ninja_ranks[] = {
"Chigo",
"Chigo",
"Bushi",
--- 898,904 ----
"Conqueress"
};
! static const char NEARDATA *ninja_ranks[] = {
"Chigo",
"Chigo",
"Bushi",
***************
*** 908,914 ****
"Jonin",
};
! static const char *elf_ranks[] = {
"Edhel",
"Elleth",
"Edhel",
--- 919,925 ----
"Jonin",
};
! static const char NEARDATA *elf_ranks[] = {
"Edhel",
"Elleth",
"Edhel",
***************
*** 931,941 ****
#endif /* OVL1 */
! OSTATIC const char **NDECL(rank_array);
#ifdef OVL1
! XSTATIC const char **
rank_array() {
register const char **ranks;
--- 942,952 ----
#endif /* OVL1 */
! STATIC_DCL const char **NDECL(rank_array);
#ifdef OVL1
! STATIC_OVL const char **
rank_array() {
register const char **ranks;
***************
*** 959,969 ****
#endif /* OVL1 */
! OSTATIC const char *rank();
#ifdef OVL1
! XSTATIC const char *
rank() {
register int place;
register const char **ranks = rank_array();
--- 970,980 ----
#endif /* OVL1 */
! STATIC_DCL const char *NDECL(rank);
#ifdef OVL1
! STATIC_OVL const char *
rank() {
register int place;
register const char **ranks = rank_array();
***************
*** 1261,1267 ****
* user programmable
*/
! static const char rndobs[] = {
WEAPON_SYM, ARMOR_SYM, POTION_SYM, SCROLL_SYM, WAND_SYM,
#ifdef SPELLS
SPBOOK_SYM,
--- 1272,1278 ----
* user programmable
*/
! static const char NEARDATA rndobs[] = {
WEAPON_SYM, ARMOR_SYM, POTION_SYM, SCROLL_SYM, WAND_SYM,
#ifdef SPELLS
SPBOOK_SYM,
***************
*** 1274,1280 ****
return rndobs[rn2(SIZE(rndobs))];
}
! static const char *hcolors[] = {
"ultraviolet", "infrared", "hot pink", "psychedelic",
"bluish-orange", "reddish-green", "dark white",
"light black", "loud", "salty", "sweet", "sour",
--- 1285,1291 ----
return rndobs[rn2(SIZE(rndobs))];
}
! static const char NEARDATA *hcolors[] = {
"ultraviolet", "infrared", "hot pink", "psychedelic",
"bluish-orange", "reddish-green", "dark white",
"light black", "loud", "salty", "sweet", "sour",
***************
*** 1297,1303 ****
#ifdef OVL0
/*ARGSUSED*/
! XSTATIC void
hilite(x, y, let, typ)
int x, y;
uchar let, typ;
--- 1308,1314 ----
#ifdef OVL0
/*ARGSUSED*/
! STATIC_OVL void
hilite(x, y, let, typ)
int x, y;
uchar let, typ;
***************
*** 1446,1452 ****
#ifdef TEXTCOLOR
/* pick an appropriate color for a mimic imitating an object */
! XSTATIC uchar
mimic_color(mtmp)
struct monst *mtmp;
{
--- 1457,1463 ----
#ifdef TEXTCOLOR
/* pick an appropriate color for a mimic imitating an object */
! STATIC_OVL uchar
mimic_color(mtmp)
struct monst *mtmp;
{
*** src/Old/priest.c Sun Jun 3 14:06:04 1990
--- src/priest.c Thu May 31 22:13:29 1990
***************
*** 10,15 ****
--- 10,18 ----
#include "eshk.h"
#include "epri.h"
+ #ifdef OVLB
+
+ #if defined(ALTARS) && defined(THEOLOGY)
static boolean FDECL(histemple_at,(struct monst *,int,int));
static int FDECL(t_alignment,(struct mkroom *));
static boolean FDECL(is_shrined,(struct mkroom *));
***************
*** 16,23 ****
static boolean FDECL(t_coaligned,(struct mkroom *));
struct monst *FDECL(findpriest,(struct mkroom *));
static boolean FDECL(p_inhistemple,(struct mkroom *));
!
! #ifdef OVLB
/* used for the insides of shk_move and pri_move */
int
--- 19,25 ----
static boolean FDECL(t_coaligned,(struct mkroom *));
struct monst *FDECL(findpriest,(struct mkroom *));
static boolean FDECL(p_inhistemple,(struct mkroom *));
! #endif
/* used for the insides of shk_move and pri_move */
int
***************
*** 236,252 ****
cnt--;
}
#endif
! if(p_coaligned(priest)) {
(void) mongets(priest, rn2(2) ? CLOAK_OF_PROTECTION
: CLOAK_OF_MAGIC_RESISTANCE);
! #ifdef NAMED_ITEMS
! otmp = mk_aligned_artifact((unsigned)EPRI(priest)->shralign + 1);
! if(otmp) {
! otmp->spe = rnd(4);
! mpickobj(priest, otmp);
! }
! #endif
! } else {
if(!rn2(5))
otmp = mksobj(CLOAK_OF_MAGIC_RESISTANCE, FALSE);
else otmp = mksobj(CLOAK_OF_PROTECTION, FALSE);
--- 238,247 ----
cnt--;
}
#endif
! if(p_coaligned(priest))
(void) mongets(priest, rn2(2) ? CLOAK_OF_PROTECTION
: CLOAK_OF_MAGIC_RESISTANCE);
! else {
if(!rn2(5))
otmp = mksobj(CLOAK_OF_MAGIC_RESISTANCE, FALSE);
else otmp = mksobj(CLOAK_OF_PROTECTION, FALSE);
***************
*** 254,265 ****
if(!rn2(2)) curse(otmp);
mpickobj(priest, otmp);
}
! otmp = mksobj(MACE, FALSE);
! if(otmp) {
! otmp->spe = rnd(3);
! if(!rn2(2)) curse(otmp);
! mpickobj(priest, otmp);
! }
}
}
}
--- 249,261 ----
if(!rn2(2)) curse(otmp);
mpickobj(priest, otmp);
}
! }
!
! otmp = mksobj(MACE, FALSE);
! if(otmp) {
! otmp->spe = rnd(3);
! if(!rn2(2)) curse(otmp);
! mpickobj(priest, otmp);
}
}
}
***************
*** 268,274 ****
priestname(priest)
register struct monst *priest;
{
! static char pname[PL_NSIZ];
Strcpy(pname, "the ");
if(priest->minvis) Strcat(pname, "invisible ");
--- 264,270 ----
priestname(priest)
register struct monst *priest;
{
! static char NEARDATA pname[PL_NSIZ];
Strcpy(pname, "the ");
if(priest->minvis) Strcat(pname, "invisible ");
***************
*** 447,452 ****
--- 443,449 ----
kludge("%s gives you two bits for an ale.", Monnam(priest));
u.ugold = 2L;
if (priest->mgold) priest->mgold -= 2L;
+ flags.botl = 1;
} else
kludge("%s is not interested.", Monnam(priest));
return;