From d01bec9fae5a025b40b32924dedc53b98bf93cf2 Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 18 Mar 2015 21:47:18 -0400 Subject: [PATCH 01/25] rare books store tribute --- include/context.h | 11 +++++++++++ include/extern.h | 1 + src/allmain.c | 3 +++ src/do_name.c | 31 ++++++++++++++++++++++++++++++ src/mkobj.c | 2 ++ src/mon.c | 2 -- src/objects.c | 3 +++ src/objnam.c | 12 ++++++++++++ src/shknam.c | 44 +++++++++++++++++++++++++++++++++++++++---- src/spell.c | 24 ++++++++++++++++++++--- win/share/objects.txt | 19 +++++++++++++++++++ 11 files changed, 143 insertions(+), 9 deletions(-) diff --git a/include/context.h b/include/context.h index ebfe1ada7..22a43fa02 100644 --- a/include/context.h +++ b/include/context.h @@ -73,6 +73,16 @@ struct warntype_info { short speciesidx; /* index of above in mons[] (for save/restore) */ }; +struct tribute_info { + size_t tributesz; /* make it possible to skip this in future */ + char *name; /* what is this tribute for */ + boolean enabled; /* Do we have tributes turned on? */ + Bitfield(book,1); /* Have we completed the book tribute? */ + /* Markers for other tributes can go here */ + /* 31 free bits */ + int bookidx; +}; + struct context_info { unsigned ident; /* social security number for each monster */ unsigned no_of_wizards; /* 0, 1 or 2 (wizard and his shadow) */ @@ -103,6 +113,7 @@ struct context_info { struct book_info spbook; struct takeoff_info takeoff; struct warntype_info warntype; + struct tribute_info tribute; }; extern NEARDATA struct context_info context; diff --git a/include/extern.h b/include/extern.h index 23d10d324..f0c8e8c74 100644 --- a/include/extern.h +++ b/include/extern.h @@ -394,6 +394,7 @@ E const char *NDECL(roguename); E struct obj *FDECL(realloc_obj, (struct obj *, int, genericptr_t, int, const char *)); E char *FDECL(coyotename, (struct monst *,char *)); +E const char *FDECL(noveltitle, (int *)); /* ### do_wear.c ### */ diff --git a/src/allmain.c b/src/allmain.c index eb1f2b69b..7224dd284 100644 --- a/src/allmain.c +++ b/src/allmain.c @@ -487,6 +487,9 @@ newgame() context.stethoscope_move = -1L; context.warnlevel = 1; context.next_attrib_check = 600L; /* arbitrary first setting */ + context.tribute.enabled = TRUE; /* turn on 3.6 tributes */ + context.tribute.tributesz = sizeof(struct tribute_info); + context.tribute.bookidx = 0; for (i = 0; i < NUMMONS; i++) mvitals[i].mvflags = mons[i].geno & G_NOCORPSE; diff --git a/src/do_name.c b/src/do_name.c index 0f837c9d4..6618b5802 100644 --- a/src/do_name.c +++ b/src/do_name.c @@ -1123,4 +1123,35 @@ char *buf; return buf; } +static const char * const sir_Terry_novels[] = { + "The Colour of Magic", "The Light Fantastic", "Equal Rites", + "Mort", "Sourcery", "Wyrd Sisters", "Pyramids", "Guards! Guards!", + "Eric", "Moving Pictures", "Reaper Man", "Witches Abroad", + "Small Gods", "Lords and Ladies", "Men at Arms", "Soul Music", + "Interesting Times", "Maskerade", "Feet of Clay", "Hogfather", + "Jingo", "The Last Continent", "Carpe Jugulum", "The Fifth Elephant", + "The Truth", "Thief of Time", "The Last Hero", + "The Amazing Maurice and his Educated Rodents", "Night Watch", + "The Wee Free Men", "Monstrous Regiment", "A Hat Full of Sky", + "Going Postal", "Thud!", "Wintersmith", "Making Money", + "Unseen Academicals", "I Shall Wear Midnight", "Snuff", + "Raising Steam", "The Shepherd's Crown" +}; + +const char * +noveltitle(novidx) +int *novidx; +{ + int j, k = SIZE(sir_Terry_novels)-1; + + j = rn2(k); + if (novidx) { + if (*novidx == -1) *novidx = j; + else if ((*novidx >= 0) && (*novidx <= k)) j = *novidx; + } + return sir_Terry_novels[j]; +} + + + /*do_name.c*/ diff --git a/src/mkobj.c b/src/mkobj.c index 4092401cd..77c39ce7a 100644 --- a/src/mkobj.c +++ b/src/mkobj.c @@ -861,6 +861,8 @@ boolean artif; /* case TIN: */ set_corpsenm(otmp, otmp->corpsenm); break; + case SPE_NOVEL: + break; } /* unique objects may have an associated artifact entry */ diff --git a/src/mon.c b/src/mon.c index d9bc63d6d..fb0a75a57 100644 --- a/src/mon.c +++ b/src/mon.c @@ -1604,8 +1604,6 @@ register struct monst *mtmp; } if(mtmp->iswiz) wizdead(); if(mtmp->data->msound == MS_NEMESIS) nemdead(); - if(mtmp->data == &mons[PM_MEDUSA]) - u.uachieve.killed_medusa = 1; if(glyph_is_invisible(levl[mtmp->mx][mtmp->my].glyph)) unmap_object(mtmp->mx, mtmp->my); m_detach(mtmp, mptr); diff --git a/src/objects.c b/src/objects.c index 4c015595d..b7fe5c86a 100644 --- a/src/objects.c +++ b/src/objects.c @@ -821,6 +821,9 @@ SPELL("freeze sphere", "hardcover", P_MATTER_SPELL, 20, 2, 1, 1, NODIR, CLR #endif /* blank spellbook must come last because it retains its description */ SPELL("blank paper", "plain", P_NONE, 18, 0, 0, 0, 0, HI_PAPER), +/* tribute book for 3.6 */ +OBJECT(OBJ("novel", "printed"), BITS(0,0,1,0,0,0,0,1,0,0,0,P_NONE,HI_PAPER), 0, + SPBOOK_CLASS, 0, 0, 0, 1, 0, 0, 0, 1, 20, CLR_BRIGHT_BLUE), /* a special, one of a kind, spellbook */ OBJECT(OBJ("Book of the Dead", "papyrus"), BITS(0,0,1,0,1,0,1,1,0,0,0,P_NONE,PAPER), 0, SPBOOK_CLASS, 0, 0,20, 10000, 0, 0, 0, 7, 20, HI_PAPER), diff --git a/src/objnam.c b/src/objnam.c index fe692b226..5a131fdf8 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -448,6 +448,18 @@ register struct obj *obj; Sprintf(buf, "%s wand", dn); break; case SPBOOK_CLASS: + if (typ == SPE_NOVEL) { /* 3.6 tribute */ + if (!dknown) { + Strcpy(buf, "book"); + } else if (nn) { + Strcpy(buf, actualn); + } else if (un) { + Sprintf(buf, "novel called %s", un); + } else + Sprintf(buf, "%s book", dn); + break; + } else + /* end of tribute */ if (!dknown) { Strcpy(buf, "spellbook"); } else if (nn) { diff --git a/src/shknam.c b/src/shknam.c index 645fc6b58..ae1776cc4 100644 --- a/src/shknam.c +++ b/src/shknam.c @@ -10,7 +10,7 @@ STATIC_DCL boolean FDECL(veggy_item, (struct obj *obj,int)); STATIC_DCL int NDECL(shkveg); STATIC_DCL void FDECL(mkveggy_at, (int,int)); -STATIC_DCL void FDECL(mkshobj_at, (const struct shclass *,int,int)); +STATIC_DCL void FDECL(mkshobj_at, (const struct shclass *,int,int,BOOLEAN_P)); STATIC_DCL void FDECL(nameshk, (struct monst *,const char * const *)); STATIC_DCL int FDECL(shkinit, (const struct shclass *,struct mkroom *)); @@ -357,15 +357,26 @@ int sx, sy; } STATIC_OVL void -mkshobj_at(shp, sx, sy) +mkshobj_at(shp, sx, sy, mkspecl) /* make an object of the appropriate type for a shop square */ const struct shclass *shp; int sx, sy; +boolean mkspecl; { struct monst *mtmp; int atype; struct permonst *ptr; + /* 3.6 tribute */ + if (mkspecl && !strcmp(shp->name, "rare books")) { + int novidx = -1; /* -1 triggers random noveltitle() */ + struct obj *novel=mksobj_at(SPE_NOVEL, sx, sy, FALSE, FALSE); + if (novel) novel = oname(novel, noveltitle(&novidx)); + context.tribute.bookidx = novidx; + context.tribute.book = 1; + return; + } + if (rn2(100) < depth(&u.uz) && !MON_AT(sx, sy) && (ptr = mkclass(S_MIMIC,0)) && (mtmp = makemon(ptr,sx,sy,NO_MM_FLAGS)) != 0) { @@ -572,7 +583,8 @@ register struct mkroom *sroom; * shop-style placement (all squares except a row nearest the first * door get objects). */ - register int sx, sy, sh; + int sx, sy, sh; + int stockcount = 0, specialspot = 0; char buf[BUFSZ]; int rmno = (int)((sroom - rooms) + ROOMOFFSET); const struct shclass *shp = &shtypes[shp_indx]; @@ -608,6 +620,29 @@ register struct mkroom *sroom; make_engr_at(m, n, buf, 0L, DUST); } + if (context.tribute.enabled && !context.tribute.book) { + /* + * Out of the number of spots where we're actually + * going to put stuff, randomly single out one in particular. + */ + for (sx = sroom->lx; sx <= sroom->hx; sx++) + for (sy = sroom->ly; sy <= sroom->hy; sy++) { + if (sroom->irregular) { + if (levl[sx][sy].edge || (int)levl[sx][sy].roomno != rmno || + distmin(sx, sy, doors[sh].x, doors[sh].y) <= 1) + continue; + } + else if ((sx == sroom->lx && doors[sh].x == sx - 1) || + (sx == sroom->hx && doors[sh].x == sx + 1) || + (sy == sroom->ly && doors[sh].y == sy - 1) || + (sy == sroom->hy && doors[sh].y == sy + 1)) continue; + stockcount++; + } + specialspot = rnd(stockcount); + stockcount = 0; + } + + for(sx = sroom->lx; sx <= sroom->hx; sx++) for(sy = sroom->ly; sy <= sroom->hy; sy++) { if(sroom->irregular) { @@ -618,7 +653,8 @@ register struct mkroom *sroom; (sx == sroom->hx && doors[sh].x == sx+1) || (sy == sroom->ly && doors[sh].y == sy-1) || (sy == sroom->hy && doors[sh].y == sy+1)) continue; - mkshobj_at(shp, sx, sy); + stockcount++; + mkshobj_at(shp, sx, sy, ((stockcount) && (stockcount == specialspot))); } /* diff --git a/src/spell.c b/src/spell.c index 53b8626f0..05782cbae 100644 --- a/src/spell.c +++ b/src/spell.c @@ -411,8 +411,9 @@ int study_book(spellbook) register struct obj *spellbook; { - register int booktype = spellbook->otyp; - register boolean confused = (Confusion != 0); + int booktype = spellbook->otyp; + boolean confused = (Confusion != 0); + const char *whatchadoin = "memorize the spell"; boolean too_hard = FALSE; /* attempting to read dull book may make hero fall asleep */ @@ -440,7 +441,8 @@ register struct obj *spellbook; /* handle the sequence: start reading, get interrupted, have context.spbook.book become erased somehow, resume reading it */ booktype != SPE_BLANK_PAPER) { - You("continue your efforts to memorize the spell."); + You("continue your efforts to %s.", (booktype == SPE_NOVEL) ? + "read the novel" : "memorize the spell"); } else { /* KMH -- Simplified this code */ if (booktype == SPE_BLANK_PAPER) { @@ -448,6 +450,22 @@ register struct obj *spellbook; makeknown(booktype); return(1); } + + /* 3.6 tribute */ + if (booktype == SPE_NOVEL) { + /* Obtain current Terry Pratchett book + title for the current game. */ + const char *tribtitle = noveltitle(&context.tribute.bookidx); + + /* + * Place code here to pull desireable + * random passages from somewhere (data.base?) + * using tribtitle as the key? + */ + pline("Reading \"%s.\"", tribtitle); /* debug confirmation */ + return(1); + } + switch (objects[booktype].oc_level) { case 1: case 2: diff --git a/win/share/objects.txt b/win/share/objects.txt index 0322de15f..780e7f463 100644 --- a/win/share/objects.txt +++ b/win/share/objects.txt @@ -6930,6 +6930,25 @@ P = (108, 145, 182) MMMMMMMJJJAAMMMM MMMMMMMMMMMMMMMM } +# tile 363 (printed / novel) +{ + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMM + MMMMEEEEMMMMMMMM + MMMMEEEEEEMMMMMM + MMMEEEEEEEEEEMMM + MMMEEEEEEEEEBMMM + MMEEEEEEEEEEOAMM + MMEEEEEEEEEBOAAM + MEEEEEEEEEEOEAMM + MEEEEEEEEEBOAAMM + MEOOEEEEEEOEAMMM + MMEEOOOEEBOAAMMM + MMMMEEEOOOEAMMMM + MMMMMMMEEEAAMMMM + MMMMMMMMMMMMMMMM +} # tile 364 (papyrus / Book of the Dead) { MMMMMMMMMMMMMMMM From c72c531c2ce61ce01c1557d9edf422faedeb7310 Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 19 Mar 2015 19:47:52 -0400 Subject: [PATCH 02/25] change printed novel to paperback novel --- src/objects.c | 2 +- win/share/objects.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/objects.c b/src/objects.c index b7fe5c86a..fdf018a14 100644 --- a/src/objects.c +++ b/src/objects.c @@ -822,7 +822,7 @@ SPELL("freeze sphere", "hardcover", P_MATTER_SPELL, 20, 2, 1, 1, NODIR, CLR /* blank spellbook must come last because it retains its description */ SPELL("blank paper", "plain", P_NONE, 18, 0, 0, 0, 0, HI_PAPER), /* tribute book for 3.6 */ -OBJECT(OBJ("novel", "printed"), BITS(0,0,1,0,0,0,0,1,0,0,0,P_NONE,HI_PAPER), 0, +OBJECT(OBJ("novel", "paperback"), BITS(0,0,1,0,0,0,0,1,0,0,0,P_NONE,HI_PAPER), 0, SPBOOK_CLASS, 0, 0, 0, 1, 0, 0, 0, 1, 20, CLR_BRIGHT_BLUE), /* a special, one of a kind, spellbook */ OBJECT(OBJ("Book of the Dead", "papyrus"), BITS(0,0,1,0,1,0,1,1,0,0,0,P_NONE,PAPER), 0, diff --git a/win/share/objects.txt b/win/share/objects.txt index 780e7f463..09f3747f3 100644 --- a/win/share/objects.txt +++ b/win/share/objects.txt @@ -6930,7 +6930,7 @@ P = (108, 145, 182) MMMMMMMJJJAAMMMM MMMMMMMMMMMMMMMM } -# tile 363 (printed / novel) +# tile 363 (paperback / novel) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM From 0a8d24d87d0b7390e4c0cf6ffc9c64055b57b24c Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 20 Mar 2015 00:58:29 -0400 Subject: [PATCH 03/25] more updates to the bookstore tribute --- include/context.h | 7 ++- include/extern.h | 1 + include/global.h | 1 + src/read.c | 131 +++++++++++++++++++++++++++++++++++++++++ src/shknam.c | 6 +- src/spell.c | 11 +--- sys/winnt/Makefile.msc | 30 ++++++++-- 7 files changed, 168 insertions(+), 19 deletions(-) diff --git a/include/context.h b/include/context.h index 22a43fa02..772df192f 100644 --- a/include/context.h +++ b/include/context.h @@ -75,12 +75,13 @@ struct warntype_info { struct tribute_info { size_t tributesz; /* make it possible to skip this in future */ - char *name; /* what is this tribute for */ boolean enabled; /* Do we have tributes turned on? */ - Bitfield(book,1); /* Have we completed the book tribute? */ + Bitfield(bookstock,1); /* Have we stocked the book? */ /* Markers for other tributes can go here */ /* 31 free bits */ - int bookidx; + int bookidx; /* Index of book in list of book titles */ + int passagecnt; /* Number of passages for this book avail */ + int passagenum; /* Passage last read */ }; struct context_info { diff --git a/include/extern.h b/include/extern.h index f0c8e8c74..f382f8ca2 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1839,6 +1839,7 @@ E void FDECL(punish, (struct obj *)); E void NDECL(unpunish); E boolean FDECL(cant_revive, (int *,BOOLEAN_P,struct obj *)); E boolean NDECL(create_particular); +E void FDECL(read_tribbook, (const char *, struct obj *)); /* ### rect.c ### */ diff --git a/include/global.h b/include/global.h index a67066d64..50479b97e 100644 --- a/include/global.h +++ b/include/global.h @@ -33,6 +33,7 @@ #define EPITAPHFILE "epitaph" /* random epitaphs on graves */ #define ENGRAVEFILE "engrave" /* random engravings on the floor */ #define BOGUSMONFILE "bogusmon" /* hallucinatory monsters */ +#define TRIBUTEFILE "tribute" /* 3.6 tribute to Terry Pratchett */ #define LEV_EXT ".lev" /* extension for special level files */ diff --git a/src/read.c b/src/read.c index 9be9f9390..ef46903c3 100644 --- a/src/read.c +++ b/src/read.c @@ -4,6 +4,7 @@ /* NetHack may be freely redistributed. See license for details. */ #include "hack.h" +#include "dlb.h" #define Your_Own_Role(mndx) \ ((mndx) == urole.malenum || \ @@ -2119,4 +2120,134 @@ create_particular() return madeany; } +/* 3.6 tribute code */ + +#define SECTIONSCOPE 1 +#define BOOKSCOPE 2 +#define PASSAGESCOPE 3 + +void +read_tribbook(tribtitle, bookobj) +char *tribtitle; +struct obj *bookobj; +{ + dlb *fp; + char *endp; + char line[BUFSZ]; + + int scopes[4] = {0, SECTIONSCOPE, BOOKSCOPE, PASSAGESCOPE}; + int scope = 0, section = 0, passage = 0, book = 0; + int linect = 0, passagecnt = 0, rndpassage = 0; + char *sectionnm = "", *booknm = ""; + boolean matched = FALSE; + winid tribwin = WIN_ERR; + + if (!tribtitle || !bookobj) { + pline("It is an incomprehensible foreign translation of \"%s\"", + tribtitle); + return; + } + + debugpline2("Reading %s, a %s.", tribtitle, xname(bookobj)); + + fp = dlb_fopen(TRIBUTEFILE, "r"); + if (!fp) { + /* this is actually an error - cannot open tribute file! */ + pline("Overcome with fond memories, you snap \"%s\" shut!", + tribtitle); + return; + } + + /* + * Syntax (not case-sensitive): + * %section books + * %section death + * + * In the books section: + * %book title(n) + * where title=book title + * (n)= total number of passages present for this book + * %passage n + * where n=sequential passage number + * + * %e ends the passage/book/section + * If in a passage, it marks the end of that passage. + * If in a book, it marks the end of that book. + * If in a section, it marks the end of that section. + */ + + while (dlb_fgets(line, sizeof line, fp) != 0) { + linect++; + if ((endp = index(line, '\n')) != 0) *endp = 0; + switch (line[0]) { + case '%': + if (!strncmpi(&line[1], "section ", sizeof("section ")-1)) { + + } else if (!strncmpi(&line[1], "book ", sizeof("book ")-1)) { + char *st = &line[6], *p1, *p2; + if ((p1 = index(st, '(')) != 0) { + *p1++ = '\0'; + if ((p2 = index(p1, ')')) != 0) { + *p2 = '\0'; + passagecnt = atoi(p1); + /* sanity check here caps #passages at 50 */ + if ((passagecnt > 0) && (passagecnt < 50)) { + scope = BOOKSCOPE; + if (!strcmpi(st, tribtitle)) { + matched = TRUE; + rndpassage = rnd(passagecnt); + context.tribute.passagecnt = passagecnt; + context.tribute.passagenum = rndpassage; + } else { + matched = FALSE; + rndpassage = 0; + context.tribute.passagecnt = 0; + context.tribute.passagenum = 0; + + /* this should not happen, but compensate */ + if (tribwin != WIN_ERR) + destroy_nhwindow(tribwin); + } + } + } + } + } else if (!strncmpi(&line[1], "passage ", sizeof("passage ")-1)) { + int passagenum = 0; + char *st = &line[9]; + while(*st == ' ' || *st == '\t') st++; + if (*st && digit(*st) && (strlen(st) < 3)) + passagenum = atoi(st); + if (passagenum && (passagenum <= passagecnt)) { + scope = PASSAGESCOPE; + if (passagenum == rndpassage) + tribwin = create_nhwindow(NHW_MENU); + } + } else if (!strncmpi(&line[1], "e ", sizeof("e ")-1)) { + if (matched && (scope == PASSAGESCOPE) && tribwin != WIN_ERR) + goto cleanup; + } else { + pline("tribute file error: bad %%e command, line %d.", + linect); + } + break; + case '#': + /* comment only, next! */ + break; + default: + if (matched && (scope == PASSAGESCOPE) && tribwin != WIN_ERR) { + putstr(tribwin, 0, line); + } + } + } + +cleanup: + if (tribwin != WIN_ERR) { + if (matched && (scope == PASSAGESCOPE)) + display_nhwindow(tribwin, FALSE); + destroy_nhwindow(tribwin); + tribwin = WIN_ERR; + } + (void) dlb_fclose(fp); + return; +} /*read.c*/ diff --git a/src/shknam.c b/src/shknam.c index ae1776cc4..88b983c8d 100644 --- a/src/shknam.c +++ b/src/shknam.c @@ -373,7 +373,9 @@ boolean mkspecl; struct obj *novel=mksobj_at(SPE_NOVEL, sx, sy, FALSE, FALSE); if (novel) novel = oname(novel, noveltitle(&novidx)); context.tribute.bookidx = novidx; - context.tribute.book = 1; + context.tribute.passagecnt = 0; + context.tribute.passagenum = 0; + context.tribute.bookstock = TRUE; return; } @@ -620,7 +622,7 @@ register struct mkroom *sroom; make_engr_at(m, n, buf, 0L, DUST); } - if (context.tribute.enabled && !context.tribute.book) { + if (context.tribute.enabled && !context.tribute.bookstock) { /* * Out of the number of spots where we're actually * going to put stuff, randomly single out one in particular. diff --git a/src/spell.c b/src/spell.c index 05782cbae..cf847c089 100644 --- a/src/spell.c +++ b/src/spell.c @@ -413,7 +413,6 @@ register struct obj *spellbook; { int booktype = spellbook->otyp; boolean confused = (Confusion != 0); - const char *whatchadoin = "memorize the spell"; boolean too_hard = FALSE; /* attempting to read dull book may make hero fall asleep */ @@ -454,15 +453,9 @@ register struct obj *spellbook; /* 3.6 tribute */ if (booktype == SPE_NOVEL) { /* Obtain current Terry Pratchett book - title for the current game. */ + title for the current game. */ const char *tribtitle = noveltitle(&context.tribute.bookidx); - - /* - * Place code here to pull desireable - * random passages from somewhere (data.base?) - * using tribtitle as the key? - */ - pline("Reading \"%s.\"", tribtitle); /* debug confirmation */ + read_tribbook(tribtitle, spellbook); return(1); } diff --git a/sys/winnt/Makefile.msc b/sys/winnt/Makefile.msc index 847aa3797..070ecd80d 100644 --- a/sys/winnt/Makefile.msc +++ b/sys/winnt/Makefile.msc @@ -305,6 +305,9 @@ PDBFILE= /PDB:"$(O)$(GAME).PDB" MAPFILE= /MAP:"$(O)$(GAME).MAP" INCLDIR= /I..\include +ldebug=/DEBUG +cdebug = -Zi -Od + !IF ("$(ldebug)" != "") !IF ("$(ldebug)" != "/RELEASE") ldebug = /DEBUG @@ -341,14 +344,14 @@ LIBS= user32.lib winmm.lib $(ZLIB) !IF ("$(GRAPHICAL)"=="Y") cflagsGame = $(cdebug) $(cflags2) $(guiflags) $(INCLDIR) \ - $(WINPFLAG) $(DLBFLG) $(GAMEPDBFILE) $(GAMEMAPFILE) -lflagsGame = $(ldebug) $(lflags) $(guilibs) + $(WINPFLAG) $(DLBFLG) +lflagsGame = $(ldebug) $(lflags) $(guilibs) $(GAMEPDBFILE) $(GAMEMAPFILE) !ELSE cflagsGame = $(cdebug) $(cflags2) $(conflags) $(INCLDIR) \ - $(WINPFLAG) $(DLBFLG) $(GAMEPDBFILE) $(GAMEMAPFILE) -lflagsGame = $(ldebug) $(lflags) $(conlibs) + $(WINPFLAG) $(DLBFLG) +lflagsGame = $(ldebug) $(lflags) $(conlibs) $(GAMEPDBFILE) $(GAMEMAPFILE) !ENDIF @@ -607,6 +610,7 @@ all : install install: envchk $(GAME) $(O)install.tag @echo Done. + $(O)install.tag: $(DAT)\data $(DAT)\rumors $(DAT)\dungeon \ $(DAT)\oracles $(DAT)\quest.dat $(O)sp_lev.tag $(DLB) ! IF ("$(USE_DLB)"=="Y") @@ -840,6 +844,14 @@ $(INCL)\vis_tab.h: $(U)makedefs.exe $(SRC)\vis_tab.c: $(U)makedefs.exe $(U)makedefs -z +$(DAT)\engrave: $(DAT)\engrave.txt $(U)makedefs.exe + ..\util\makedefs -s +$(DAT)\epitaph: $(DAT)\epitaph.txt $(U)makedefs.exe + ..\util\makedefs -s +$(DAT)\bogusmon: $(DAT)\bogusmon.txt $(U)makedefs.exe + ..\util\makedefs -s + + #========================================== # uudecode utility and uuencoded targets #========================================== @@ -1081,7 +1093,8 @@ $(DAT)\porthelp: $(NTSYS)\porthelp nhdat: $(U)dlb_main.exe $(DAT)\data $(DAT)\oracles $(OPTIONS_FILE) \ $(DAT)\quest.dat $(DAT)\rumors $(DAT)\help $(DAT)\hh $(DAT)\cmdhelp \ $(DAT)\history $(DAT)\opthelp $(DAT)\wizhelp $(DAT)\dungeon $(DAT)\porthelp \ - $(DAT)\license $(O)sp_lev.tag + $(DAT)\license $(DAT)\engrave $(DAT)\epitaph $(DAT)\bogusmon \ + $(DAT)\tribute $(O)sp_lev.tag cd $(DAT) echo data >dlb.lst echo oracles >>dlb.lst @@ -1091,6 +1104,10 @@ nhdat: $(U)dlb_main.exe $(DAT)\data $(DAT)\oracles $(OPTIONS_FILE) \ if exist porthelp echo porthelp >>dlb.lst echo quest.dat >>dlb.lst echo rumors >>dlb.lst + echo engrave >>dlb.lst + echo epitaph >>dlb.lst + echo bogusmon >>dlb.lst + echo tribute >>dlb.lst echo help >>dlb.lst echo hh >>dlb.lst echo cmdhelp >>dlb.lst @@ -1238,6 +1255,9 @@ spotless: clean if exist $(U)*.map del $(U)*.map if exist $(DAT)\data del $(DAT)\data if exist $(DAT)\rumors del $(DAT)\rumors + if exist $(DAT)\engrave del $(DAT)\engrave + if exist $(DAT)\epitaph del $(DAT)\epitaph + if exist $(DAT)\bogusmon del $(DAT)\bogusmon if exist $(DAT)\???-fil?.lev del $(DAT)\???-fil?.lev if exist $(DAT)\???-goal.lev del $(DAT)\???-goal.lev if exist $(DAT)\???-loca.lev del $(DAT)\???-loca.lev From b342beea2b2e2aa483cbb5264e0accb98e864d0e Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 20 Mar 2015 01:07:59 -0400 Subject: [PATCH 04/25] skeleton tribute text file --- dat/tribute | 405 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 405 insertions(+) create mode 100644 dat/tribute diff --git a/dat/tribute b/dat/tribute new file mode 100644 index 000000000..922cbd5d3 --- /dev/null +++ b/dat/tribute @@ -0,0 +1,405 @@ +%section books +# +# +# +%book The Colour of Magic(1) +%passage 1 +The Colour of Magic, by Terry Pratchett + +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +bbbbbbbbbbb bbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbb +CC cc ddd eee ff + +%e passage +%e book +# +# +# +%book The Light Fantastic(1) +%passage 1 +The Light Fantastic, by Terry Pratchett + + +%e passage +%e book +# +# +# +%book Equal Rites(1) +%passage 1 +Equal Rites, by Terry Pratchett + + +%e passage +%e book +# +# +# +%book Mort(1) +%passage 1 +Mort, by Terry Pratchett + + +%e passage +%e book +# +# +# +%book Sourcery(1) +%passage 1 +Sourcery, by Terry Pratchett + + +%e passage +%e book +# +# +# +%book Wyrd Sisters(1) +%passage 1 +Wyrd Sisters, by Terry Pratchett + + +%e passage +%e book +# +# +# +%book Pyramids(1) +%passage 1 +Pyramids, by Terry Pratchett + + +%e passage +%e book +# +# +# +%book Guards! Guards!(1) +%passage 1 +Guards! Guards!, by Terry Pratchett + + +%e passage +%e book +# +# +# +%book Eric(1) +%passage 1 +Eric, by Terry Pratchett + + +%e passage +%e book +# +# +# +%book Moving Pictures(1) +%passage 1 +Moving Pictures, by Terry Pratchett + + +%e passage +%e book +# +# +# +%book Reaper Man(1) +%passage 1 +Reaper Man, by Terry Pratchett + + +%e passage +%e book +# +# +# +%book Witches Abroad(1) +%passage 1 +Witches Abroad, by Terry Pratchett + + +%e passage +%e book +# +# +# +%book Small Gods(1) +%passage 1 +Small Gods, by Terry Pratchett + + +%e passage +%e book +# +# +# +%book Lords and Ladies(1) +%passage 1 +Lords and Ladies, by Terry Pratchett + + +%e passage +%e book +# +# +# +%book Men at Arms(1) +%passage 1 +Men at Arms, by Terry Pratchett + + +%e passage +%e book +# +# +# +%book Soul Music(1) +%passage 1 +Soul Music, by Terry Pratchett + + +%e passage +%e book +# +# +# +%book Interesting Times(1) +%passage 1 +Interesting Times, by Terry Pratchett + + +%e passage +%e book +# +# +# +%book Maskerade(1) +%passage 1 +Maskerade, by Terry Pratchett + + +%e passage +%e book +# +# +# +%book Feet of Clay(1) +%passage 1 +Feet of Clay, by Terry Pratchett + + +%e passage +%e book +# +# +# +%book Hogfather(1) +%passage 1 +Hogfather, by Terry Pratchett + + +%e passage +%e book +# +# +# +%book Jingo(1) +%passage 1 +Jingo, by Terry Pratchett + + +%e passage +%e book +# +# +# +%book The Last Continent(1) +%passage 1 +The Last Continent, by Terry Pratchett + + +%e passage +%e book +# +# +# +%book Carpe Jugulum(1) +%passage 1 +Carpe Jugulum, by Terry Pratchett + + +%e passage +%e book +# +# +# +%book The Fifth Elephant(1) +%passage 1 +The Fifth Elephant, by Terry Pratchett + + +%e passage +%e book +# +# +# +%book The Truth(1) +%passage 1 +The Truth, by Terry Pratchett + + +%e passage +%e book +# +# +# +%book Thief of Time(1) +%passage 1 +Thief of Time, by Terry Pratchett + + +%e passage +%e book +# +# +# +%book The Last Hero(1) +%passage 1 +The Last Hero, by Terry Pratchett + + +%e passage +%e book +# +# +# +%book The Amazing Maurice and his Educated Rodents(1) +%passage 1 +The Amazing Maurice and his Educated Rodents, by Terry Pratchett + + +%e passage +%e book +# +# +# +%book Night Watch(1) +%passage 1 +Night Watch, by Terry Pratchett + + +%e passage +%e book +# +# +# +%book The Wee Free Men(1) +%passage 1 +The Wee Free Men, by Terry Pratchett + + +%e passage +%e book +# +# +# +%book Monstrous Regiment(1) +%passage 1 +Monstrous Regiment, by Terry Pratchett + + +%e passage +%e book +# +# +# +%book A Hat Full of Sky(1) +%passage 1 +A Hat Full of Sky, by Terry Pratchett + + +%e passage +%e book +# +# +# +%book Going Postal(1) +%passage 1 +Going Postal, by Terry Pratchett + + +%e passage +%e book +# +# +# +%book Thud!(1) +%passage 1 +Thud!, by Terry Pratchett + + +%e passage +%e book +# +# +# +%book Wintersmith(1) +%passage 1 +Wintersmith, by Terry Pratchett + + +%e passage +%e book +# +# +# +%book Making Money(1) +%passage 1 +Making Money, by Terry Pratchett + + +%e passage +%e book +# +# +# +%book Unseen Academicals(1) +%passage 1 +Unseen Academicals, by Terry Pratchett + + +%e passage +%e book +# +# +# +%book I Shall Wear Midnight(1) +%passage 1 +I Shall Wear Midnight, by Terry Pratchett + + +%e passage +%e book +# +# +# +%book Snuff(1) +%passage 1 +Snuff, by Terry Pratchett + + +%e passage +%e book +# +# +# +%book Raising Steam(1) +%passage 1 +Raising Steam, by Terry Pratchett + + +%e passage +%e book +%e section From d7ff4513015393a7cac4e3febb1bc064811e3558 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 21 Mar 2015 10:33:59 -0400 Subject: [PATCH 05/25] More book tribute integration --- dat/tribute | 184 +++++++++++++++++++++++------------------ include/context.h | 3 - include/extern.h | 2 +- src/allmain.c | 1 - src/files.c | 142 +++++++++++++++++++++++++++++++ src/mkobj.c | 5 ++ src/read.c | 131 ----------------------------- src/shknam.c | 11 +-- src/spell.c | 6 +- sys/winnt/Makefile.msc | 4 +- 10 files changed, 259 insertions(+), 230 deletions(-) diff --git a/dat/tribute b/dat/tribute index 922cbd5d3..2a10ba038 100644 --- a/dat/tribute +++ b/dat/tribute @@ -1,8 +1,15 @@ +# NetHack 3.6.0 tribute to: +# +# Sir Terence David John "Terry" Pratchett +# April 28, 1948 - March 12, 2015 +# ("or until the ripples he caused in the world die away...") +# +# %section books # # # -%book The Colour of Magic(1) +%title The Colour of Magic (1) %passage 1 The Colour of Magic, by Terry Pratchett @@ -11,395 +18,412 @@ bbbbbbbbbbb bbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbb CC cc ddd eee ff %e passage -%e book +%e title # # # -%book The Light Fantastic(1) +%title The Light Fantastic (1) %passage 1 The Light Fantastic, by Terry Pratchett %e passage -%e book +%e title # # # -%book Equal Rites(1) +%title Equal Rites (1) %passage 1 Equal Rites, by Terry Pratchett %e passage -%e book +%e title # # # -%book Mort(1) +%title Mort (1) %passage 1 Mort, by Terry Pratchett %e passage -%e book +%e title # # # -%book Sourcery(1) +%title Sourcery (1) %passage 1 Sourcery, by Terry Pratchett %e passage -%e book +%e title # # # -%book Wyrd Sisters(1) +%title Wyrd Sisters (1) %passage 1 Wyrd Sisters, by Terry Pratchett %e passage -%e book +%e title # # # -%book Pyramids(1) +%title Pyramids (1) %passage 1 Pyramids, by Terry Pratchett %e passage -%e book +%e title # # # -%book Guards! Guards!(1) +%title Guards! Guards! (1) %passage 1 Guards! Guards!, by Terry Pratchett %e passage -%e book +%e title # # # -%book Eric(1) +%title Eric (1) %passage 1 Eric, by Terry Pratchett %e passage -%e book +%e title # # # -%book Moving Pictures(1) +%title Moving Pictures (1) %passage 1 Moving Pictures, by Terry Pratchett %e passage -%e book +%e title # # # -%book Reaper Man(1) +%title Reaper Man (1) %passage 1 Reaper Man, by Terry Pratchett %e passage -%e book +%e title # # # -%book Witches Abroad(1) +%title Witches Abroad (1) %passage 1 Witches Abroad, by Terry Pratchett %e passage -%e book +%e title # # # -%book Small Gods(1) +%title Small Gods (1) %passage 1 Small Gods, by Terry Pratchett %e passage -%e book +%e title # # # -%book Lords and Ladies(1) +%title Lords and Ladies (1) %passage 1 Lords and Ladies, by Terry Pratchett %e passage -%e book +%e title # # # -%book Men at Arms(1) +%title Men at Arms (1) %passage 1 Men at Arms, by Terry Pratchett %e passage -%e book +%e title # # # -%book Soul Music(1) +%title Soul Music (1) %passage 1 Soul Music, by Terry Pratchett %e passage -%e book +%e title # # # -%book Interesting Times(1) +%title Interesting Times (1) %passage 1 Interesting Times, by Terry Pratchett %e passage -%e book +%e title # # # -%book Maskerade(1) +%title Maskerade (1) %passage 1 Maskerade, by Terry Pratchett %e passage -%e book +%e title # # # -%book Feet of Clay(1) +%title Feet of Clay (1) %passage 1 Feet of Clay, by Terry Pratchett %e passage -%e book +%e title # # # -%book Hogfather(1) +%title Hogfather (1) %passage 1 Hogfather, by Terry Pratchett %e passage -%e book +%e title # # # -%book Jingo(1) +%title Jingo (1) %passage 1 Jingo, by Terry Pratchett %e passage -%e book +%e title # # # -%book The Last Continent(1) +%title The Last Continent (1) %passage 1 The Last Continent, by Terry Pratchett %e passage -%e book +%e title # # # -%book Carpe Jugulum(1) +%title Carpe Jugulum (1) %passage 1 Carpe Jugulum, by Terry Pratchett %e passage -%e book +%e title # # # -%book The Fifth Elephant(1) +%title The Fifth Elephant (1) %passage 1 The Fifth Elephant, by Terry Pratchett %e passage -%e book +%e title # # # -%book The Truth(1) +%title The Truth (1) %passage 1 The Truth, by Terry Pratchett %e passage -%e book +%e title # # # -%book Thief of Time(1) +%title Thief of Time (1) %passage 1 Thief of Time, by Terry Pratchett %e passage -%e book +%e title # # # -%book The Last Hero(1) +%title The Last Hero (1) %passage 1 The Last Hero, by Terry Pratchett %e passage -%e book +%e title # # # -%book The Amazing Maurice and his Educated Rodents(1) +%title The Amazing Maurice and his Educated Rodents (1) %passage 1 The Amazing Maurice and his Educated Rodents, by Terry Pratchett %e passage -%e book +%e title # # # -%book Night Watch(1) +%title Night Watch (1) %passage 1 Night Watch, by Terry Pratchett %e passage -%e book +%e title # # # -%book The Wee Free Men(1) +%title The Wee Free Men (1) %passage 1 The Wee Free Men, by Terry Pratchett %e passage -%e book +%e title # # # -%book Monstrous Regiment(1) +%title Monstrous Regiment (1) %passage 1 Monstrous Regiment, by Terry Pratchett %e passage -%e book +%e title # # # -%book A Hat Full of Sky(1) +%title A Hat Full of Sky (1) %passage 1 A Hat Full of Sky, by Terry Pratchett %e passage -%e book +%e title # # # -%book Going Postal(1) +%title Going Postal (1) %passage 1 Going Postal, by Terry Pratchett %e passage -%e book +%e title # # # -%book Thud!(1) +%title Thud! (1) %passage 1 Thud!, by Terry Pratchett %e passage -%e book +%e title # # # -%book Wintersmith(1) +%title Wintersmith (1) %passage 1 Wintersmith, by Terry Pratchett %e passage -%e book +%e title # # # -%book Making Money(1) +%title Making Money (1) %passage 1 Making Money, by Terry Pratchett %e passage -%e book +%e title # # # -%book Unseen Academicals(1) +%title Unseen Academicals (1) %passage 1 Unseen Academicals, by Terry Pratchett %e passage -%e book +%e title # # # -%book I Shall Wear Midnight(1) +%title I Shall Wear Midnight (1) %passage 1 I Shall Wear Midnight, by Terry Pratchett %e passage -%e book +%e title # # # -%book Snuff(1) +%title Snuff (1) %passage 1 Snuff, by Terry Pratchett %e passage -%e book +%e title # # # -%book Raising Steam(1) +%title Raising Steam (1) %passage 1 Raising Steam, by Terry Pratchett %e passage -%e book +%e title %e section +#----------------------------------------------------- +# Currently this section is not used. It is added +# to illustrate how these could be added and adapted +# should they be useful for something +# +%section Death +%title Death Quotes (2) +%passage 1 +WHERE THE FIRST PRIMAL CELL WAS, THERE WAS I ALSO. WHERE MAN IS, THERE AM I. +WHEN THE LAST LIFE CRAWLS UNDER FREEZING STARS, THERE WILL I BE. +%e passage +%passage 2 +I AM DEATH, NOT TAXES. *I* TURN UP ONLY ONCE. +%e passage +%e title +%e section + diff --git a/include/context.h b/include/context.h index 772df192f..fad18f827 100644 --- a/include/context.h +++ b/include/context.h @@ -79,9 +79,6 @@ struct tribute_info { Bitfield(bookstock,1); /* Have we stocked the book? */ /* Markers for other tributes can go here */ /* 31 free bits */ - int bookidx; /* Index of book in list of book titles */ - int passagecnt; /* Number of passages for this book avail */ - int passagenum; /* Passage last read */ }; struct context_info { diff --git a/include/extern.h b/include/extern.h index f382f8ca2..76d5737fd 100644 --- a/include/extern.h +++ b/include/extern.h @@ -746,6 +746,7 @@ E void NDECL(really_close); #ifdef DEBUG E boolean FDECL(showdebug, (const char *)); #endif +E void FDECL(read_tribute, (const char *,const char *,int)); /* ### fountain.c ### */ @@ -1839,7 +1840,6 @@ E void FDECL(punish, (struct obj *)); E void NDECL(unpunish); E boolean FDECL(cant_revive, (int *,BOOLEAN_P,struct obj *)); E boolean NDECL(create_particular); -E void FDECL(read_tribbook, (const char *, struct obj *)); /* ### rect.c ### */ diff --git a/src/allmain.c b/src/allmain.c index 7224dd284..44c61d146 100644 --- a/src/allmain.c +++ b/src/allmain.c @@ -489,7 +489,6 @@ newgame() context.next_attrib_check = 600L; /* arbitrary first setting */ context.tribute.enabled = TRUE; /* turn on 3.6 tributes */ context.tribute.tributesz = sizeof(struct tribute_info); - context.tribute.bookidx = 0; for (i = 0; i < NUMMONS; i++) mvitals[i].mvflags = mons[i].geno & G_NOCORPSE; diff --git a/src/files.c b/src/files.c index a6f17b906..471f5acb4 100644 --- a/src/files.c +++ b/src/files.c @@ -3263,4 +3263,146 @@ const char *filename; } #endif /*DEBUG*/ +/* ---------- BEGIN TRIBUTE ----------- */ + +/* 3.6 tribute code */ + +#define SECTIONSCOPE 1 +#define TITLESCOPE 2 +#define PASSAGESCOPE 3 + +void +read_tribute(tribsection, tribtitle, tribpassage, text, maxtextlines) +char *tribsection, *tribtitle; +int tribpassage; +{ + dlb *fp; + char *endp; + char line[BUFSZ]; + + int scopes[4] = {0, SECTIONSCOPE, TITLESCOPE, PASSAGESCOPE}; + int scope = 0, section = 0, passage = 0, book = 0; + int linect = 0, passagecnt = 0, targetpassage = 0, textcnt = 0; + char *sectionnm = "", *booknm = ""; + boolean matchedsection = FALSE, matchedtitle = FALSE; + winid tribwin = WIN_ERR; + + /* check for mandatories */ + if (!tribsection || !tribtitle) { + pline("It's an incomprehensible foreign translation of \"%s\"!", + tribtitle); + return; + } + + debugpline3("read_tribute %s, %s, %d.", tribsection, tribtitle, tribpassage); + + fp = dlb_fopen(TRIBUTEFILE, "r"); + if (!fp) { + /* this is actually an error - cannot open tribute file! */ + pline("You feel too overwhelmed to continue!"); + return; + } + + /* + * Syntax (not case-sensitive): + * %section books + * + * In the books section: + * %title booktitle(n) + * where booktitle=book title + * (n)= total number of passages present for this title + * %passage n + * where n=sequential passage number + * + * %e ends the passage/book/section + * If in a passage, it marks the end of that passage. + * If in a book, it marks the end of that book. + * If in a section, it marks the end of that section. + * + * %section death + */ + + while (dlb_fgets(line, sizeof line, fp) != 0) { + linect++; + if ((endp = index(line, '\n')) != 0) *endp = 0; + switch (line[0]) { + case '%': + if (!strncmpi(&line[1], "section ", sizeof("section ")-1)) { + char *st = &line[9]; /* 9 from "%section " */ + scope = SECTIONSCOPE; + if (!strcmpi(st, tribsection)) + matchedsection = TRUE; + else + matchedsection = FALSE; + } else if (!strncmpi(&line[1], "title ", sizeof("title ")-1)) { + char *st = &line[7]; /* 7 from "%title " */ + char *p1, *p2; + if ((p1 = index(st, '(')) != 0) { + *p1++ = '\0'; + (void)mungspaces(st); + if ((p2 = index(p1, ')')) != 0) { + *p2 = '\0'; + passagecnt = atoi(p1); + /* sanity check here caps #passages at 50 */ + if ((passagecnt > 0) && (passagecnt < 50)) { + scope = TITLESCOPE; + if (matchedsection && !strcmpi(st, tribtitle)) { + matchedtitle = TRUE; + if (!tribpassage) { + targetpassage = rnd(passagecnt); + } else { + if (tribpassage <= passagecnt) + targetpassage = tribpassage; + else + targetpassage = 0; + } + } else { + matchedtitle = FALSE; + } + } + } + } + } else if (!strncmpi(&line[1], "passage ", sizeof("passage ")-1)) { + int passagenum = 0; + char *st = &line[9]; /* 9 from "%passage " */ + while(*st == ' ' || *st == '\t') st++; + if (*st && digit(*st) && (strlen(st) < 3)) + passagenum = atoi(st); + if (passagenum && (passagenum <= passagecnt)) { + scope = PASSAGESCOPE; + if (matchedtitle && (passagenum == targetpassage)) + tribwin = create_nhwindow(NHW_MENU); + } + } else if (!strncmpi(&line[1], "e ", sizeof("e ")-1)) { + if (matchedtitle && (scope == PASSAGESCOPE) && tribwin != WIN_ERR) + goto cleanup; + if (scope == TITLESCOPE) matchedtitle = FALSE; + if (scope == SECTIONSCOPE) matchedsection = FALSE; + if (scope) --scope; + } else { + debugpline1("tribute file error: bad %% command, line %d.", + linect); + } + break; + case '#': + /* comment only, next! */ + break; + default: + if (matchedtitle && (scope == PASSAGESCOPE) && tribwin != WIN_ERR) + putstr(tribwin, 0, line); + } + } + +cleanup: + (void) dlb_fclose(fp); + if (tribwin != WIN_ERR) { + if (matchedtitle && (scope == PASSAGESCOPE)) + display_nhwindow(tribwin, FALSE); + destroy_nhwindow(tribwin); + tribwin = WIN_ERR; + } + return; +} +/* ---------- END TRIBUTE ----------- */ + /*files.c*/ diff --git a/src/mkobj.c b/src/mkobj.c index 77c39ce7a..0f67aed13 100644 --- a/src/mkobj.c +++ b/src/mkobj.c @@ -862,6 +862,11 @@ boolean artif; set_corpsenm(otmp, otmp->corpsenm); break; case SPE_NOVEL: + { + int novidx = -1; + otmp = oname(otmp, noveltitle(&novidx)); + otmp->novelidx = novidx; + } break; } diff --git a/src/read.c b/src/read.c index ef46903c3..9be9f9390 100644 --- a/src/read.c +++ b/src/read.c @@ -4,7 +4,6 @@ /* NetHack may be freely redistributed. See license for details. */ #include "hack.h" -#include "dlb.h" #define Your_Own_Role(mndx) \ ((mndx) == urole.malenum || \ @@ -2120,134 +2119,4 @@ create_particular() return madeany; } -/* 3.6 tribute code */ - -#define SECTIONSCOPE 1 -#define BOOKSCOPE 2 -#define PASSAGESCOPE 3 - -void -read_tribbook(tribtitle, bookobj) -char *tribtitle; -struct obj *bookobj; -{ - dlb *fp; - char *endp; - char line[BUFSZ]; - - int scopes[4] = {0, SECTIONSCOPE, BOOKSCOPE, PASSAGESCOPE}; - int scope = 0, section = 0, passage = 0, book = 0; - int linect = 0, passagecnt = 0, rndpassage = 0; - char *sectionnm = "", *booknm = ""; - boolean matched = FALSE; - winid tribwin = WIN_ERR; - - if (!tribtitle || !bookobj) { - pline("It is an incomprehensible foreign translation of \"%s\"", - tribtitle); - return; - } - - debugpline2("Reading %s, a %s.", tribtitle, xname(bookobj)); - - fp = dlb_fopen(TRIBUTEFILE, "r"); - if (!fp) { - /* this is actually an error - cannot open tribute file! */ - pline("Overcome with fond memories, you snap \"%s\" shut!", - tribtitle); - return; - } - - /* - * Syntax (not case-sensitive): - * %section books - * %section death - * - * In the books section: - * %book title(n) - * where title=book title - * (n)= total number of passages present for this book - * %passage n - * where n=sequential passage number - * - * %e ends the passage/book/section - * If in a passage, it marks the end of that passage. - * If in a book, it marks the end of that book. - * If in a section, it marks the end of that section. - */ - - while (dlb_fgets(line, sizeof line, fp) != 0) { - linect++; - if ((endp = index(line, '\n')) != 0) *endp = 0; - switch (line[0]) { - case '%': - if (!strncmpi(&line[1], "section ", sizeof("section ")-1)) { - - } else if (!strncmpi(&line[1], "book ", sizeof("book ")-1)) { - char *st = &line[6], *p1, *p2; - if ((p1 = index(st, '(')) != 0) { - *p1++ = '\0'; - if ((p2 = index(p1, ')')) != 0) { - *p2 = '\0'; - passagecnt = atoi(p1); - /* sanity check here caps #passages at 50 */ - if ((passagecnt > 0) && (passagecnt < 50)) { - scope = BOOKSCOPE; - if (!strcmpi(st, tribtitle)) { - matched = TRUE; - rndpassage = rnd(passagecnt); - context.tribute.passagecnt = passagecnt; - context.tribute.passagenum = rndpassage; - } else { - matched = FALSE; - rndpassage = 0; - context.tribute.passagecnt = 0; - context.tribute.passagenum = 0; - - /* this should not happen, but compensate */ - if (tribwin != WIN_ERR) - destroy_nhwindow(tribwin); - } - } - } - } - } else if (!strncmpi(&line[1], "passage ", sizeof("passage ")-1)) { - int passagenum = 0; - char *st = &line[9]; - while(*st == ' ' || *st == '\t') st++; - if (*st && digit(*st) && (strlen(st) < 3)) - passagenum = atoi(st); - if (passagenum && (passagenum <= passagecnt)) { - scope = PASSAGESCOPE; - if (passagenum == rndpassage) - tribwin = create_nhwindow(NHW_MENU); - } - } else if (!strncmpi(&line[1], "e ", sizeof("e ")-1)) { - if (matched && (scope == PASSAGESCOPE) && tribwin != WIN_ERR) - goto cleanup; - } else { - pline("tribute file error: bad %%e command, line %d.", - linect); - } - break; - case '#': - /* comment only, next! */ - break; - default: - if (matched && (scope == PASSAGESCOPE) && tribwin != WIN_ERR) { - putstr(tribwin, 0, line); - } - } - } - -cleanup: - if (tribwin != WIN_ERR) { - if (matched && (scope == PASSAGESCOPE)) - display_nhwindow(tribwin, FALSE); - destroy_nhwindow(tribwin); - tribwin = WIN_ERR; - } - (void) dlb_fclose(fp); - return; -} /*read.c*/ diff --git a/src/shknam.c b/src/shknam.c index 88b983c8d..a8e08c0f0 100644 --- a/src/shknam.c +++ b/src/shknam.c @@ -367,18 +367,13 @@ boolean mkspecl; int atype; struct permonst *ptr; - /* 3.6 tribute */ + /* 3.6.0 tribute */ if (mkspecl && !strcmp(shp->name, "rare books")) { - int novidx = -1; /* -1 triggers random noveltitle() */ struct obj *novel=mksobj_at(SPE_NOVEL, sx, sy, FALSE, FALSE); - if (novel) novel = oname(novel, noveltitle(&novidx)); - context.tribute.bookidx = novidx; - context.tribute.passagecnt = 0; - context.tribute.passagenum = 0; - context.tribute.bookstock = TRUE; + if (novel) context.tribute.bookstock = TRUE; return; } - + if (rn2(100) < depth(&u.uz) && !MON_AT(sx, sy) && (ptr = mkclass(S_MIMIC,0)) && (mtmp = makemon(ptr,sx,sy,NO_MM_FLAGS)) != 0) { diff --git a/src/spell.c b/src/spell.c index cf847c089..e5e208046 100644 --- a/src/spell.c +++ b/src/spell.c @@ -450,12 +450,12 @@ register struct obj *spellbook; return(1); } - /* 3.6 tribute */ + /* 3.6.0 tribute */ if (booktype == SPE_NOVEL) { /* Obtain current Terry Pratchett book title for the current game. */ - const char *tribtitle = noveltitle(&context.tribute.bookidx); - read_tribbook(tribtitle, spellbook); + const char *tribtitle = noveltitle(&spellbook->novelidx); + read_tribute("books", tribtitle, 0); return(1); } diff --git a/sys/winnt/Makefile.msc b/sys/winnt/Makefile.msc index 070ecd80d..789cdfe87 100644 --- a/sys/winnt/Makefile.msc +++ b/sys/winnt/Makefile.msc @@ -1093,8 +1093,7 @@ $(DAT)\porthelp: $(NTSYS)\porthelp nhdat: $(U)dlb_main.exe $(DAT)\data $(DAT)\oracles $(OPTIONS_FILE) \ $(DAT)\quest.dat $(DAT)\rumors $(DAT)\help $(DAT)\hh $(DAT)\cmdhelp \ $(DAT)\history $(DAT)\opthelp $(DAT)\wizhelp $(DAT)\dungeon $(DAT)\porthelp \ - $(DAT)\license $(DAT)\engrave $(DAT)\epitaph $(DAT)\bogusmon \ - $(DAT)\tribute $(O)sp_lev.tag + $(DAT)\license $(DAT)\engrave $(DAT)\epitaph $(DAT)\bogusmon $(DAT)\tribute $(O)sp_lev.tag cd $(DAT) echo data >dlb.lst echo oracles >>dlb.lst @@ -1107,7 +1106,6 @@ nhdat: $(U)dlb_main.exe $(DAT)\data $(DAT)\oracles $(OPTIONS_FILE) \ echo engrave >>dlb.lst echo epitaph >>dlb.lst echo bogusmon >>dlb.lst - echo tribute >>dlb.lst echo help >>dlb.lst echo hh >>dlb.lst echo cmdhelp >>dlb.lst From f2a132adca5b4940bcb637aa4668cbee708d2666 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 21 Mar 2015 11:02:52 -0400 Subject: [PATCH 06/25] more book tribute - store index right in obj --- include/obj.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/obj.h b/include/obj.h index 7af927919..dea1c9d5e 100644 --- a/include/obj.h +++ b/include/obj.h @@ -108,6 +108,7 @@ struct obj { int corpsenm; /* type of corpse is mons[corpsenm] */ #define leashmon corpsenm /* gets m_id of attached pet */ #define fromsink corpsenm /* a potion from a sink */ +#define novelidx corpsenm /* 3.6.0 tribute - the index of the novel title */ #define record_achieve_special corpsenm int usecount; /* overloaded for various things that tally */ #define spestudied usecount /* # of times a spellbook has been studied */ From 3fa52686d8093b8037eac960a5b7f20599d92ee4 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 22 Mar 2015 22:06:13 -0400 Subject: [PATCH 07/25] A couple of Makefile updates Include the tribute file. Windows Makefile Unix Makefile.top --- sys/unix/Makefile.top | 4 ++-- sys/winnt/Makefile.msc | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/unix/Makefile.top b/sys/unix/Makefile.top index 77cd28fa1..f9cb7b8d5 100644 --- a/sys/unix/Makefile.top +++ b/sys/unix/Makefile.top @@ -1,5 +1,5 @@ # NetHack Makefile. -# NetHack 3.5 Makefile.top $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Makefile.top $NHDT-Date: 1427076345 2015/03/23 02:05:45 $ $NHDT-Branch: nhmall-booktribute $:$NHDT-Revision: 1.21 $ # NetHack 3.5 Makefile.top $Date: 2012/01/10 17:47:30 $ $Revision: 1.19 $ # Root of source tree: @@ -56,7 +56,7 @@ VARDIR = $(HACKDIR) # for Gnome # VARDATND = x11tiles pet_mark.xbm rip.xpm mapbg.xpm -VARDATD = bogusmon data engrave epitaph oracles options quest.dat rumors +VARDATD = bogusmon data engrave epitaph oracles options quest.dat rumors tribute VARDAT = $(VARDATD) $(VARDATND) # Some versions of make use the SHELL environment variable as the shell diff --git a/sys/winnt/Makefile.msc b/sys/winnt/Makefile.msc index bdc67c73b..301dc279c 100644 --- a/sys/winnt/Makefile.msc +++ b/sys/winnt/Makefile.msc @@ -1,4 +1,4 @@ -# NetHack 3.5 Makefile.msc $NHDT-Date: 1426967393 2015/03/21 19:49:53 $ $NHDT-Branch: master $:$NHDT-Revision: 1.72 $ */ +# NetHack 3.5 Makefile.msc $NHDT-Date: 1427076358 2015/03/23 02:05:58 $ $NHDT-Branch: nhmall-booktribute $:$NHDT-Revision: 1.75 $ */ # Copyright (c) NetHack PC Development Team 1993-2015 # #============================================================================== @@ -1022,6 +1022,7 @@ nhdat: $(U)dlb_main.exe $(DAT)\data $(DAT)\oracles $(OPTIONS_FILE) \ echo engrave >>dlb.lst echo epitaph >>dlb.lst echo bogusmon >>dlb.lst + echo tribute >>dlb.lst echo help >>dlb.lst echo hh >>dlb.lst echo cmdhelp >>dlb.lst From b93cf718b6623b39dc4575a4c8397460b5e52d72 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 22 Mar 2015 22:39:45 -0400 Subject: [PATCH 08/25] ensure tribute handles conduct correctly --- src/files.c | 10 ++++++++-- src/read.c | 4 +++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/files.c b/src/files.c index 9c24cf2a6..9bc152726 100644 --- a/src/files.c +++ b/src/files.c @@ -3336,13 +3336,14 @@ int tribpassage; int scope = 0, section = 0, passage = 0, book = 0; int linect = 0, passagecnt = 0, targetpassage = 0, textcnt = 0; char *sectionnm = "", *booknm = ""; + const char *badtranslation = "an incomprehensible foreign translation"; boolean matchedsection = FALSE, matchedtitle = FALSE; winid tribwin = WIN_ERR; /* check for mandatories */ if (!tribsection || !tribtitle) { - pline("It's an incomprehensible foreign translation of \"%s\"!", - tribtitle); + pline("It's %s of \"%s\"!", + badtranslation, tribtitle); return; } @@ -3452,7 +3453,12 @@ cleanup: display_nhwindow(tribwin, FALSE); destroy_nhwindow(tribwin); tribwin = WIN_ERR; + u.uconduct.literate++; + } else { + pline("It seems to be %s of \"%s\"!", + badtranslation, tribtitle); } + return; } /* ---------- END TRIBUTE ----------- */ diff --git a/src/read.c b/src/read.c index 9be9f9390..38f122af1 100644 --- a/src/read.c +++ b/src/read.c @@ -152,9 +152,11 @@ doread() #endif /* Actions required to win the game aren't counted towards conduct */ + /* Novel conduct is handled in read_tribute so exclude it too*/ if (scroll->otyp != SPE_BOOK_OF_THE_DEAD && scroll->otyp != SPE_BLANK_PAPER && - scroll->otyp != SCR_BLANK_PAPER) + scroll->otyp != SCR_BLANK_PAPER && + scroll->otyp != SPE_NOVEL) u.uconduct.literate++; if(scroll->oclass == SPBOOK_CLASS) { From 7a3e7aaf649a69579dd3b1712388bcb03357fb7c Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 2 Apr 2015 19:24:10 -0400 Subject: [PATCH 09/25] missed a conflict --- include/context.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/include/context.h b/include/context.h index d25af4371..a544f6ae0 100644 --- a/include/context.h +++ b/include/context.h @@ -116,11 +116,8 @@ struct context_info { struct book_info spbook; struct takeoff_info takeoff; struct warntype_info warntype; -<<<<<<< HEAD - struct tribute_info tribute; -======= struct polearm_info polearm; ->>>>>>> master + struct tribute_info tribute; }; extern NEARDATA struct context_info context; From d5a2dcf8c7a79dc2afc3d8b5e8017688b9160e77 Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Sat, 4 Apr 2015 00:39:11 -0400 Subject: [PATCH 10/25] Fix the Unix build. --- src/files.c | 2 +- sys/unix/Makefile.top | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/files.c b/src/files.c index 9bc152726..9e92004b6 100644 --- a/src/files.c +++ b/src/files.c @@ -3324,7 +3324,7 @@ const char *filename; #define PASSAGESCOPE 3 void -read_tribute(tribsection, tribtitle, tribpassage, text, maxtextlines) +read_tribute(tribsection, tribtitle, tribpassage) char *tribsection, *tribtitle; int tribpassage; { diff --git a/sys/unix/Makefile.top b/sys/unix/Makefile.top index f9cb7b8d5..15de1930f 100644 --- a/sys/unix/Makefile.top +++ b/sys/unix/Makefile.top @@ -87,7 +87,7 @@ SPEC_LEVS = asmodeus.lev baalz.lev bigrm-?.lev castle.lev fakewiz?.lev \ QUEST_LEVS = ???-goal.lev ???-fil?.lev ???-loca.lev ???-strt.lev DATNODLB = $(VARDATND) license -DATDLB = $(DATHELP) dungeon $(SPEC_LEVS) $(QUEST_LEVS) $(VARDATD) +DATDLB = $(DATHELP) dungeon $(SPEC_LEVS) $(QUEST_LEVS) $(VARDATD) tribute DAT = $(DATNODLB) $(DATDLB) $(GAME): From 4e8e1889efadc7a9c5e71f8aa4a44c4b26c9074a Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Sat, 4 Apr 2015 00:39:24 -0400 Subject: [PATCH 11/25] Add some quotes. Please correct the formatting if need be. --- dat/tribute | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 72 insertions(+), 4 deletions(-) diff --git a/dat/tribute b/dat/tribute index 2a10ba038..843b9aa8b 100644 --- a/dat/tribute +++ b/dat/tribute @@ -44,9 +44,9 @@ Equal Rites, by Terry Pratchett # %title Mort (1) %passage 1 -Mort, by Terry Pratchett - +Ankh-Morpork had dallied with many forms of government and hand ended up with that form of democracy known as One Man, One Vote. The Patrician was the Man; he had the Vote. + [Mort, by Terry Pratchett] %e passage %e title # @@ -182,11 +182,79 @@ Interesting Times, by Terry Pratchett # # # -%title Maskerade (1) +%title Maskerade (4) %passage 1 -Maskerade, by Terry Pratchett + 'Maybe you could... help us?' + 'What's wrong?' + 'It's my boy...' + Granny opened the door further and saw the womand standing behind Mr. Slot. One look at her face was enough. There was a bundle in her arms. + Granny stepped back. 'Bring him in and let me have a look at him.' + She took the baby from the woman, sat down on the room's one chair, and pulled back the blanket. + 'Hmm,' said Granny, after a while. + 'There's a curse on this house, that's what it is,' said Slot. 'My best cow's been taken mortally sick, too.' + 'Oh? You have a cowshed?' siad Granny. 'Very good place for a sick-room, a cowshed. It's the warmth. You better show me were it is.' + 'You want to take the boy down there?' + 'Right now.' + [...] + 'How many have you come for?' + ONE. + 'The cow?' + Death shook his head. + 'It could be the cow.' + NO. THAT WOULD BE CHANGING HISTORY. + 'History is about things changing.' + NO. + Granny sat back. + 'Then I challenge you to a game. That's traditional. That's /allowed/.' + Death was silent for a moment. + THIS IS TRUE. + 'Good.' + HOWEVER... YOU UNDERSTAND THAT TO WIN ALL YOU MUST GAMBLE ALL? + 'Double or quits? Yes, I know.' + BUT NOT CHESS. + 'Can't abide chess.' + OR CRIPPLE MR ONION. I'VE NEVER BEEN ABLE TO UNDERSTAND THE RULES. + 'Very well. How about one hand of poker? Five cards each, no draws? Sudden death, as they say.' + Death thought about this, too. + YOU KNOW THIS FAMILY? + 'No.' + THEN WHY? + 'Are we talking or are we playing?' + OH, VERY WELL. + Granny looked at her cards, and threw them down. + FOUR QUEENS. HMM. THAT /IS/ VERY HIGH. + Death looked down at his cards, and then up into Granny's steady, blue-eyed gaze. + Neither moved for some time. + Then Death laid the hand on the table. + I LOSE. ALL I HAVE IS FOUR ONES. + [Maskerade, by Terry Pratchett] +%e passage +%passage 2 + Ahahahahaha! + Ahahahaha! + Aahahaha! + BEWARE!!!!! + Yrs sincerely, + The Opera Ghost + 'What sort of person,' said Salzella, 'sits down and /writes/ a maniacal laugh? And all those exclamation marks, you notice? Five? A sure sign of someone who wears his underpants on his head. Opera can do that to a man.' + [Maskerade, by Terry Pratchett] +%e passage +%passage 3 + Agnes had woken up one morning with the horrible realization that she'd been saddled with a lovely personality. It was the lack of choice that rankled. No one had asked her, before she was born, whether she wanted a lovely personality or whether she'd prefer, say, a miserable personality but a body that could take size 9 in dresses. Instead, people would take pains to tell her that beauty was only skin-deep, as if a man ever fell for an attractive pair of kidneys. + + [Maskerade, by Terry Pratchett] +%e passage +%passage 4 + 'And what can I get you, officers?' she said. + 'Officers? Us? What makes you think we're watchment?' + 'He's got a helmet on,' Nanny pointed out. + 'Milit'ry chic,' Nobby said. 'It's just a fashion accessory. Actually, we are gentlemen of means and have nothing to do with the City Watch whatsoever.' + 'Well, /gentlemen/, would you like some wine?' + 'Not while we on duty, t'anks', said the troll. + + [Maskerade, by Terry Pratchett] %e passage %e title # From b383cc6a2cc7a977c6a92f8b872d79b68694fe13 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 4 Apr 2015 21:20:34 -0400 Subject: [PATCH 12/25] update book tribute Changes to be committed: modified: doc/fixes35.0 modified: include/extern.h modified: src/do_name.c modified: src/objnam.c This pretty much completes the code portion of the book tribute. - The book will appear in the rare books shop. - When you read the book, a random passage is drawn for a tribute file (suggested by Mike). - The book cannot be renamed because it already has a name (observed/suggested by Sean). The data file (dat/tribute) has a few test passages, but needs to be filled out. Sean and Mike Stephenson have indicated that possibly they may be able to help contribute to that. Ideally, there should be at least one passage from each of the books. --- doc/fixes35.0 | 1 + include/extern.h | 3 ++- src/do_name.c | 28 +++++++++++++++++++++++++++- src/objnam.c | 25 +++++++++++++++++++++++-- 4 files changed, 53 insertions(+), 4 deletions(-) diff --git a/doc/fixes35.0 b/doc/fixes35.0 index 5fa64755d..c13d5e022 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -1112,6 +1112,7 @@ show more explicit reason why player was helpless at death added new hallucinatory-only gods options to create the character blind or nudist moving clouds on the plane of air +tribute to Terry Pratchett Platform- and/or Interface-Specific New Features diff --git a/include/extern.h b/include/extern.h index fd44496a1..50ca0d13b 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1,4 +1,4 @@ -/* NetHack 3.5 extern.h $NHDT-Date: 1426966688 2015/03/21 19:38:08 $ $NHDT-Branch: master $:$NHDT-Revision: 1.411 $ */ +/* NetHack 3.5 extern.h $NHDT-Date: 1428196810 2015/04/05 01:20:10 $ $NHDT-Branch: nhmall-booktribute $:$NHDT-Revision: 1.451 $ */ /* NetHack 3.5 extern.h $Date: 2013/11/05 00:57:53 $ $Revision: 1.380 $ */ /* Copyright (c) Steve Creps, 1988. */ /* NetHack may be freely redistributed. See license for details. */ @@ -396,6 +396,7 @@ E struct obj *FDECL(realloc_obj, (struct obj *, int, genericptr_t, int, const char *)); E char *FDECL(coyotename, (struct monst *,char *)); E const char *FDECL(noveltitle, (int *)); +E const char *FDECL(lookup_novel, (const char *, int *)); /* ### do_wear.c ### */ diff --git a/src/do_name.c b/src/do_name.c index 54a1aeb8c..98f11715a 100644 --- a/src/do_name.c +++ b/src/do_name.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 do_name.c $NHDT-Date: 1426558927 2015/03/17 02:22:07 $ $NHDT-Branch: master $:$NHDT-Revision: 1.53 $ */ +/* NetHack 3.5 do_name.c $NHDT-Date: 1428196077 2015/04/05 01:07:57 $ $NHDT-Branch: nhmall-booktribute $:$NHDT-Revision: 1.64 $ */ /* NetHack 3.5 do_name.c $Date: 2012/01/29 03:00:17 $ $Revision: 1.49 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -474,6 +474,12 @@ register struct obj *obj; const char *aname; short objtyp; + /* Do this now because there's no point in even asking for a name */ + if (obj->otyp == SPE_NOVEL) { + pline("%s already has a published name.", Ysimple_name2(obj)); + return; + } + Sprintf(qbuf, "What do you want to name %s ", is_plural(obj) ? "these" : "this"); (void)safe_qbuf(qbuf, qbuf, "?", obj, xname, simpleonames, "item"); @@ -1152,6 +1158,7 @@ char *buf; return buf; } +/* make sure "The Colour of Magic" remains the first entry in here */ static const char * const sir_Terry_novels[] = { "The Colour of Magic", "The Light Fantastic", "Equal Rites", "Mort", "Sourcery", "Wyrd Sisters", "Pyramids", "Guards! Guards!", @@ -1181,6 +1188,25 @@ int *novidx; return sir_Terry_novels[j]; } +const char * +lookup_novel(lookname, idx) +const char *lookname; +int *idx; +{ + int k; + /* Take American or U.K. spelling of this one */ + if (strcmpi(lookname, "The Color of Magic") == 0) + lookname = sir_Terry_novels[0]; + + for (k = 0; k < SIZE(sir_Terry_novels); ++k) { + if (strcmpi(lookname, sir_Terry_novels[k]) == 0) { + if (idx) *idx = k; + return sir_Terry_novels[k]; + } + } + + return (const char *)0; +} /*do_name.c*/ diff --git a/src/objnam.c b/src/objnam.c index fd23f01ad..11f364da6 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 objnam.c $NHDT-Date: 1427440866 2015/03/27 07:21:06 $ $NHDT-Branch: master $:$NHDT-Revision: 1.109 $ */ +/* NetHack 3.5 objnam.c $NHDT-Date: 1428196817 2015/04/05 01:20:17 $ $NHDT-Branch: nhmall-booktribute $:$NHDT-Revision: 1.120 $ */ /* NetHack 3.5 objnam.c $Date: 2011/10/27 02:24:54 $ $Revision: 1.101 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -3008,6 +3008,15 @@ typfnd: } } + if (typ && wizard) { + if (typ == SPE_NOVEL) { + if (name && !lookup_novel((char *)name, (int *)0)) { + pline("There's no novel by that name."); + return ((struct obj *)0); + } + } + } + /* * Create the object, then fine-tune it. */ @@ -3200,10 +3209,22 @@ typfnd: aname = artifact_name(name, &objtyp); if (aname && objtyp == otmp->otyp) name = aname; + /* 3.6.0 tribute - fix up novel */ + if (otmp->otyp == SPE_NOVEL) { + int novidx = 0; + const char *novelname; + + novelname = lookup_novel(name, &novidx); + if (novelname) { + otmp->novelidx = novidx; + name = novelname; + } + } + otmp = oname(otmp, name); if (otmp->oartifact) { otmp->quan = 1L; - u.uconduct.wisharti++; /* KMH, conduct */ + u.uconduct.wisharti++; } } From a8261cd10a0504f9e9edfc34605f9a9965d2a8e4 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 4 Apr 2015 21:38:43 -0400 Subject: [PATCH 13/25] correct something spotted in email diff --- src/objnam.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/objnam.c b/src/objnam.c index 11f364da6..ca330b193 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -3010,7 +3010,7 @@ typfnd: if (typ && wizard) { if (typ == SPE_NOVEL) { - if (name && !lookup_novel((char *)name, (int *)0)) { + if (name && !lookup_novel(name, (int *)0)) { pline("There's no novel by that name."); return ((struct obj *)0); } From 0270dd7a6bfee933ac5f32f296de973e241b7055 Mon Sep 17 00:00:00 2001 From: karnov Date: Sat, 4 Apr 2015 22:29:39 -0400 Subject: [PATCH 14/25] Passages for The Colour of Magic --- dat/tribute | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/dat/tribute b/dat/tribute index 843b9aa8b..c0294f13c 100644 --- a/dat/tribute +++ b/dat/tribute @@ -13,11 +13,21 @@ %passage 1 The Colour of Magic, by Terry Pratchett -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -bbbbbbbbbbb bbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbb -CC cc ddd eee ff +It has been remarked before that those who are sensitive to radiation in the far octarine - the eighth colour, the pigment of the Imagination - can see things that others cannot. -%e passage +Thus it was that Rincewind, hurrying through the crowded, flare-lit, evening bazarrs of Morpork with the Luggage trundling behind him, jostled a tall figure, turned to deliver a few suitable curses, and beheld Death. + +It had to be Death. No-one else went around with empty eye sockets and, of course, the scythe over one shoulder was another clue. +%e passage 1 +%passage 2 +As he was drawn towards the Eye the terror-struck Rincewind raised the box protectively, and at the same time heard the picture imp say, 'They're about ripe now, can't hold them any longer. Every-one smile, please.' + +There was a - +- flash of light so white and so bright - +- it didn't seem like light at all. + +Bel-Shamharoth screamed, a sound that started in the far ultrasonic and finished somewhere in Rincewind's bowels. The tentacles went momentarily as stiff as rods, hurling their various cargos around the room, before bunching up protectively in front of the abused Eye. The whole mass dropped into the pit and a moment later the big slab was snatched up by several dozen tentacles and slammed into place, leaving a number of thrashing limbs trapped around the edge. +%e passage 2 %e title # # From 8b6736c57bc188c3197cb072a154adcdc783e658 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 5 Apr 2015 00:08:34 -0400 Subject: [PATCH 15/25] update passage count on title line for The Colour of Magic --- dat/tribute | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dat/tribute b/dat/tribute index c0294f13c..bf7fa0566 100644 --- a/dat/tribute +++ b/dat/tribute @@ -9,7 +9,7 @@ # # # -%title The Colour of Magic (1) +%title The Colour of Magic (2) %passage 1 The Colour of Magic, by Terry Pratchett From 1e74df8b088614f282c21fc084fb1b93ab5435b1 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 5 Apr 2015 00:20:42 -0400 Subject: [PATCH 16/25] Changes to be committed: modified: src/shknam.c modified: src/trap.c modified: src/zap.c While polymorph was clearing the name because poly_obj actually creates a brand new obj and copies field values over, water_damage does not so the name persisted on the blank spellbook. In this case, that isn't really appropriate. Clear the name. Ensure that cancellation has no effect on these ordinary books. Make the second-hand bookstore an option for holding the book tribute item too. --- src/shknam.c | 5 +++-- src/trap.c | 6 +++++- src/zap.c | 6 ++++-- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/shknam.c b/src/shknam.c index a8e08c0f0..eaba1ac36 100644 --- a/src/shknam.c +++ b/src/shknam.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 shknam.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 shknam.c $NHDT-Date: 1428207608 2015/04/05 04:20:08 $ $NHDT-Branch: nhmall-booktribute $:$NHDT-Revision: 1.32 $ */ /* NetHack 3.5 shknam.c $Date: 2011/04/15 01:55:42 $ $Revision: 1.24 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -368,7 +368,8 @@ boolean mkspecl; struct permonst *ptr; /* 3.6.0 tribute */ - if (mkspecl && !strcmp(shp->name, "rare books")) { + if (mkspecl && (!strcmp(shp->name, "rare books") || + !strcmp(shp->name, "second-hand bookstore"))) { struct obj *novel=mksobj_at(SPE_NOVEL, sx, sy, FALSE, FALSE); if (novel) context.tribute.bookstock = TRUE; return; diff --git a/src/trap.c b/src/trap.c index c826fb851..e1a63b64d 100644 --- a/src/trap.c +++ b/src/trap.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 trap.c $NHDT-Date: 1427934551 2015/04/02 00:29:11 $ $NHDT-Branch: master $:$NHDT-Revision: 1.223 $ */ +/* NetHack 3.5 trap.c $NHDT-Date: 1428207616 2015/04/05 04:20:16 $ $NHDT-Branch: nhmall-booktribute $:$NHDT-Revision: 1.224 $ */ /* NetHack 3.5 trap.c $Date: 2013/03/14 01:58:21 $ $Revision: 1.179 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -3206,6 +3206,10 @@ boolean force; pline("Steam rises from %s.", the(xname(obj))); return 0; } + if (obj->otyp == SPE_NOVEL) { + obj->novelidx = 0; + free_oname(obj); + } obj->otyp = SPE_BLANK_PAPER; obj->dknown = 0; if (carried(obj)) diff --git a/src/zap.c b/src/zap.c index 2852cf995..a2041199f 100644 --- a/src/zap.c +++ b/src/zap.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 zap.c $NHDT-Date: 1427782839 2015/03/31 06:20:39 $ $NHDT-Branch: master $:$NHDT-Revision: 1.200 $ */ +/* NetHack 3.5 zap.c $NHDT-Date: 1428207622 2015/04/05 04:20:22 $ $NHDT-Branch: nhmall-booktribute $:$NHDT-Revision: 1.215 $ */ /* NetHack 3.5 zap.c $Date: 2013/11/05 00:57:56 $ $Revision: 1.183 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -956,7 +956,9 @@ register struct obj *obj; obj->spe = 0; break; case SPBOOK_CLASS: - if (otyp != SPE_CANCELLATION && otyp != SPE_BOOK_OF_THE_DEAD) { + if (otyp != SPE_CANCELLATION && + otyp != SPE_NOVEL && + otyp != SPE_BOOK_OF_THE_DEAD) { costly_alteration(obj, COST_CANCEL); obj->otyp = SPE_BLANK_PAPER; } From 082299555769b7128956eada2179a765e6762ba2 Mon Sep 17 00:00:00 2001 From: karnov Date: Mon, 6 Apr 2015 19:03:02 -0400 Subject: [PATCH 17/25] Reformat and passage for The Truth --- dat/tribute | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/dat/tribute b/dat/tribute index bf7fa0566..f669d48ce 100644 --- a/dat/tribute +++ b/dat/tribute @@ -13,20 +13,33 @@ %passage 1 The Colour of Magic, by Terry Pratchett -It has been remarked before that those who are sensitive to radiation in the far octarine - the eighth colour, the pigment of the Imagination - can see things that others cannot. +It has been remarked before that those who are sensitive to radiation in the +far octarine - the eighth colour, the pigment of the Imagination - can see +things that others cannot. -Thus it was that Rincewind, hurrying through the crowded, flare-lit, evening bazarrs of Morpork with the Luggage trundling behind him, jostled a tall figure, turned to deliver a few suitable curses, and beheld Death. +Thus it was that Rincewind, hurrying through the crowded, flare-lit, evening +bazarrs of Morpork with the Luggage trundling behind him, jostled a tall +figure, turned to deliver a few suitable curses, and beheld Death. -It had to be Death. No-one else went around with empty eye sockets and, of course, the scythe over one shoulder was another clue. +It had to be Death. No-one else went around with empty eye sockets and, of +course, the scythe over one shoulder was another clue. %e passage 1 %passage 2 -As he was drawn towards the Eye the terror-struck Rincewind raised the box protectively, and at the same time heard the picture imp say, 'They're about ripe now, can't hold them any longer. Every-one smile, please.' +As he was drawn towards the Eye the terror-struck Rincewind raised the box +protectively, and at the same time heard the picture imp say, 'They're about +ripe now, can't hold them any longer. Every-one smile, please.' There was a - - flash of light so white and so bright - - it didn't seem like light at all. -Bel-Shamharoth screamed, a sound that started in the far ultrasonic and finished somewhere in Rincewind's bowels. The tentacles went momentarily as stiff as rods, hurling their various cargos around the room, before bunching up protectively in front of the abused Eye. The whole mass dropped into the pit and a moment later the big slab was snatched up by several dozen tentacles and slammed into place, leaving a number of thrashing limbs trapped around the edge. +Bel-Shamharoth screamed, a sound that started in the far ultrasonic and +finished somewhere in Rincewind's bowels. The tentacles went momentarily as +stiff as rods, hurling their various cargos around the room, before bunching +up protectively in front of the abused Eye. The whole mass dropped into the +pit and a moment later the big slab was snatched up by several dozen tentacles +and slammed into place, leaving a number of thrashing limbs trapped around the +edge. %e passage 2 %e title # @@ -334,8 +347,14 @@ The Fifth Elephant, by Terry Pratchett %passage 1 The Truth, by Terry Pratchett +There are, it has been said, two types of people in the world. There are those +who, when presented with a glass that is exactly half full, say: this glass is +half full. And then there are those who say: this glass is half empty. -%e passage +The world belongs, however, to those who can look at the glass and say: What's +up with this glass? Excuse me? Excuse me? This is may glass? I don't think +so. My glass was full! And it was a bigger glass! Who's been pinching my beer? +%e passage 1 %e title # # From 0f246b70d34ac979e01471812940b8a0bec75374 Mon Sep 17 00:00:00 2001 From: karnov Date: Mon, 6 Apr 2015 21:46:51 -0400 Subject: [PATCH 18/25] Adding quotes for The Light fantastic --- dat/tribute | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/dat/tribute b/dat/tribute index f669d48ce..052b8110c 100644 --- a/dat/tribute +++ b/dat/tribute @@ -25,6 +25,8 @@ It had to be Death. No-one else went around with empty eye sockets and, of course, the scythe over one shoulder was another clue. %e passage 1 %passage 2 +The Colour of Magic, by Terry Pratchett + As he was drawn towards the Eye the terror-struck Rincewind raised the box protectively, and at the same time heard the picture imp say, 'They're about ripe now, can't hold them any longer. Every-one smile, please.' @@ -45,12 +47,43 @@ edge. # # # -%title The Light Fantastic (1) +%title The Light Fantastic (2) %passage 1 The Light Fantastic, by Terry Pratchett +'Cohen is my name, boy' Belthan's hands stopped moving. +'Cohen?' she said, 'Cohen the Barbarian?' +'The very shame.' +'Hang on, hang on,' said Rincewind, 'Cohen's a great big chap, neck like a bull, +got chest muscles like a sack of footballs. I mean, he's the Disc's greatest +warrior, a legend in his own lifetime. I remember my grandad telling me he saw +him ... my grandad telling me he ... my grandad ...' +He faltered under the gimlit gaze. +'Oh,' he said, 'Oh. Of course, Sorry.' +'Yesh,' said Cohen, and sighed, 'Thatsh right boy, I'm a lifetime in my own +legend.' +%e passage 1 +%passage 2 +The Light Fantastic, by Terry Pratchett -%e passage +Death sat at one side of a black baize table in the entre of the room, arguing +with Famine, War and Pestilence. Twoflower was the only one to look up and +notice Rincewind. +'Hey, how did you get here?' he said. +'Well, some say that the creator took a handful - oh, I see, well, it's hard to +explain but I -' +'Have you got the Luggage?' +The wooden box pushed past Rincewind and settled down in front of its owner, +who opened its lid and rummaged around inside until he came up with a small, +leatherbound book which he handed to War, who was hammering the table with a +mailed fist. +'It's "Nosehinger on the Laws of Contract",' he said. 'It's quite good, there's +a lot in it about double finessing and how to -' +Death snatched the book with a bony hand anflipped through the pages, quite +oblivious to the presence of the two men. +'RIGHT,' he said, 'PESTILENCE, OPEN ANOTHER PACK OF CARDS. I'M GOING TO GET TO +THE GOTTOM OF THIS IF IT KILLS ME. FIGURATIVELY SPEAKING OF COURSE.' +%e passage 2 %e title # # From 49b45bdbf59bbd7ba667cb34f8c125295b034c7a Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 6 Apr 2015 22:38:01 -0400 Subject: [PATCH 19/25] function definitition to match prototype const --- src/files.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/files.c b/src/files.c index 74fe41466..0a0180980 100644 --- a/src/files.c +++ b/src/files.c @@ -3337,7 +3337,7 @@ const char *filename; void read_tribute(tribsection, tribtitle, tribpassage) -char *tribsection, *tribtitle; +const char *tribsection, *tribtitle; int tribpassage; { dlb *fp; From 684e50714375397b0cd2aaabd459b2988bac9246 Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 6 Apr 2015 23:16:14 -0400 Subject: [PATCH 20/25] attempt to fix Makefile issue with tribute --- sys/unix/Makefile.top | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/unix/Makefile.top b/sys/unix/Makefile.top index 15de1930f..4318e7069 100644 --- a/sys/unix/Makefile.top +++ b/sys/unix/Makefile.top @@ -87,7 +87,7 @@ SPEC_LEVS = asmodeus.lev baalz.lev bigrm-?.lev castle.lev fakewiz?.lev \ QUEST_LEVS = ???-goal.lev ???-fil?.lev ???-loca.lev ???-strt.lev DATNODLB = $(VARDATND) license -DATDLB = $(DATHELP) dungeon $(SPEC_LEVS) $(QUEST_LEVS) $(VARDATD) tribute +DATDLB = $(DATHELP) dungeon $(SPEC_LEVS) $(QUEST_LEVS) $(VARDATD) DAT = $(DATNODLB) $(DATDLB) $(GAME): @@ -128,6 +128,9 @@ oracles: $(GAME) options: $(GAME) ( cd dat ; $(MAKE) options ) +tribute: $(GAME) + ( cd dat ; $(MAKE) tribute ) + quest.dat: $(GAME) ( cd dat ; $(MAKE) quest.dat ) From 05c284b2e8a5732d3afff2ce2f0183ef587fe9de Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Tue, 7 Apr 2015 12:47:43 -0400 Subject: [PATCH 21/25] Add quotes for Eric and Moving Pictures. --- dat/tribute | 55 ++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 46 insertions(+), 9 deletions(-) diff --git a/dat/tribute b/dat/tribute index 052b8110c..9eb32c030 100644 --- a/dat/tribute +++ b/dat/tribute @@ -148,21 +148,42 @@ Guards! Guards!, by Terry Pratchett # # # -%title Eric (1) +%title Eric (2) %passage 1 -Eric, by Terry Pratchett - - + No enemies had ever taken Ankh-Morpork. Well, /technically/ they had, quite often; the city welcomed free-spending barbarian invaders, but somehow the puzzled raiders always found, after a few days, that they didn't own their own horses any more, and within a couple of months they were just another minority group with its own graffiti and food shops. + [Terry Pratchett, Eric] +%e passage +%passage 2 + Rincewind looked down at the broad steps they were climbing. They were something of a novelty; each one was built out of large stone letters. The one he was just stepping on to, for example, read: I Meant It For The Best. + The next one was: I Thought You'd Like It. + Eric was standing on: For The Sake Of The Children. + 'Weird, isn't it?' he said. 'Why do it like this?' + 'I think they're meant to be good intentions,' said Rincewind. This was a road to hell, and demons were, after all, traditionalists. %e passage %e title # # # -%title Moving Pictures (1) +%title Moving Pictures (4) %passage 1 -Moving Pictures, by Terry Pratchett - - + This is space. It's sometimes called the final frontier. + (Except that of course you can't have a /final/ frontier, because there'd be nothing for it to be a frontier /to/, but as frontiers go, it's pretty penultimate...) + [Terry Pratchett, Moving Pictures] +%e passage +%passage 2 + By and large, the only skill the alchemists of Ankh-Morpork had discovered so far was the ability to turn gold into less gold. + [Terry Pratchett, Moving Pictures] +%e passage +%passage 3 + There was a dog sitting by his feet. + It was small, bow-legged and wiry, and basically grey but with patches of brown, white, and black in outlying areas... + It looked up slowly, and said 'Woof?' + Victor poked an exploratory finger in his ear. It must have been a trick of an echo, or something. It wasn't that the dog had gone 'woof!', although that was practically unique in itself; most dogs in the universe /never/ went 'woof!', they had complicated barks like 'whuuugh!' and 'hwhoouf!'. No, it was that it hadn't in fact /barked/ at all. It had /said/ 'woof'. + 'Could have bin worse, mister. I could have said "miaow".' +%e passage +%passage 4 + ''Twas beauty killed the beast,' said the Dean, who liked to say things like that. + 'No it wasn't,' said the Chair. 'It was it splatting into the ground like that.' %e passage %e title # @@ -492,11 +513,27 @@ Wintersmith, by Terry Pratchett # # # -%title Making Money (1) +%title Making Money (3) %passage 1 Making Money, by Terry Pratchett + 'I'm an Igor, thur. We don't athk quethtionth.' + 'Really? Why not?' + 'I don't know, thur. I didn't athk.' + [Making Money, by Terry Pratchett] +%e pasasge +%passage 2 + The Watch armour fitted like a glove. He'd have preferred it to fit like a helmet and breastplate. It was common knowledge that the Watch's approach to uniforms was one-size-doesn't-exactly-fit-anybody, and that Commander Vimes disapproved of armour that didn't have that kicked-by-trolls look. He liked it to make it clear that it had been doing its job. + [Making Money, by Terry Pratchett] +%e passage +%passage 3 + 'The world is full of things worth more than gold. But we dig the damn stuff up and then bury it in a different hole. Where's the sense in that? What are we, magpies? Good heavens, /potatoes/ are worth more than gold!' + 'Surely not!' + 'If you were shipwrecked on a desert island, what would you prefer, a bag of potatoes or a bag of gold?' + 'Yes, but a desert island isn't Ankh-Morpork!' + 'And that proves gold is only valuable because we agree it is, right? It's just a dream. But a potato is always worth a potato, anywhere. A knob of butter and a pinch of salt and you've got a meal, /anywhere/. Bury gold in the ground and you'll be worrying about thieves for ever. Bury a potato and in due season you could be looking at a dividend of a thousand per cent.' + [Making Money, by Terry Pratchett] %e passage %e title # From 951de70b36e45658aa6a5ef1276e75db540a6913 Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Tue, 7 Apr 2015 20:44:54 -0400 Subject: [PATCH 22/25] Do not clean tribute file on Unix. --- sys/unix/Makefile.top | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/sys/unix/Makefile.top b/sys/unix/Makefile.top index 4318e7069..8e35b28e9 100644 --- a/sys/unix/Makefile.top +++ b/sys/unix/Makefile.top @@ -1,5 +1,5 @@ # NetHack Makefile. -# NetHack 3.5 Makefile.top $NHDT-Date: 1427076345 2015/03/23 02:05:45 $ $NHDT-Branch: nhmall-booktribute $:$NHDT-Revision: 1.21 $ +# NetHack 3.5 Makefile.top $NHDT-Date: 1428453876 2015/04/08 00:44:36 $ $NHDT-Branch: nhmall-booktribute $:$NHDT-Revision: 1.25 $ # NetHack 3.5 Makefile.top $Date: 2012/01/10 17:47:30 $ $Revision: 1.19 $ # Root of source tree: @@ -56,7 +56,7 @@ VARDIR = $(HACKDIR) # for Gnome # VARDATND = x11tiles pet_mark.xbm rip.xpm mapbg.xpm -VARDATD = bogusmon data engrave epitaph oracles options quest.dat rumors tribute +VARDATD = bogusmon data engrave epitaph oracles options quest.dat rumors VARDAT = $(VARDATD) $(VARDATND) # Some versions of make use the SHELL environment variable as the shell @@ -87,7 +87,7 @@ SPEC_LEVS = asmodeus.lev baalz.lev bigrm-?.lev castle.lev fakewiz?.lev \ QUEST_LEVS = ???-goal.lev ???-fil?.lev ???-loca.lev ???-strt.lev DATNODLB = $(VARDATND) license -DATDLB = $(DATHELP) dungeon $(SPEC_LEVS) $(QUEST_LEVS) $(VARDATD) +DATDLB = $(DATHELP) dungeon tribute $(SPEC_LEVS) $(QUEST_LEVS) $(VARDATD) DAT = $(DATNODLB) $(DATDLB) $(GAME): @@ -128,9 +128,6 @@ oracles: $(GAME) options: $(GAME) ( cd dat ; $(MAKE) options ) -tribute: $(GAME) - ( cd dat ; $(MAKE) tribute ) - quest.dat: $(GAME) ( cd dat ; $(MAKE) quest.dat ) From 8b9ce73c3100edabe0f7d475ce9a11f527b03677 Mon Sep 17 00:00:00 2001 From: PatR Date: Sun, 12 Apr 2015 01:48:01 -0700 Subject: [PATCH 23/25] revised menu searching Convert search in tty menus from pmatch to case-insensitive pmatchi; convert search in X11 menus from substring strstri to wildcard pmatchi. tty bug: if the menu is full screen, the search prompt and subsequent user input clobbers the menu header. --- win/X11/winmenu.c | 31 +++++++++++++++++++------------ win/tty/wintty.c | 12 ++++++++---- 2 files changed, 27 insertions(+), 16 deletions(-) diff --git a/win/X11/winmenu.c b/win/X11/winmenu.c index 6ab51fae9..e21988c70 100644 --- a/win/X11/winmenu.c +++ b/win/X11/winmenu.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 winmenu.c $NHDT-Date: 1427881480 2015/04/01 09:44:40 $ $NHDT-Branch: master $:$NHDT-Revision: 1.5 $ */ +/* NetHack 3.5 winmenu.c $NHDT-Date: 1428828477 2015/04/12 08:47:57 $ $NHDT-Branch: master $:$NHDT-Revision: 1.7 $ */ /* NetHack 3.5 winmenu.c $Date: 2009/05/06 10:55:53 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)winmenu.c 3.5 1996/08/15 */ /* Copyright (c) Dean Luick, 1992 */ @@ -249,9 +249,13 @@ menu_key(w, event, params, num_params) return; } else if (ch == MENU_SEARCH) { /* search */ if (menu_info->how == PICK_ANY || menu_info->how == PICK_ONE) { - char buf[BUFSZ]; - X11_getlin("Search for:", buf); - if (!*buf || *buf == '\033') return; + char buf[BUFSZ+2], tmpbuf[BUFSZ]; + + X11_getlin("Search for:", tmpbuf); + if (!*tmpbuf || *tmpbuf == '\033') return; + /* convert "string" into "*string*" for use with pmatch() */ + Sprintf(buf, "*%s*", tmpbuf); + if (menu_info->how == PICK_ANY) { invert_match(wp, buf); return; @@ -395,10 +399,12 @@ menu_search(w, client_data, call_data) { struct xwindow *wp = (struct xwindow *) client_data; struct menu_info_t *menu_info = wp->menu_information; + char buf[BUFSZ+2], tmpbuf[BUFSZ]; - char buf[BUFSZ]; - X11_getlin("Search for:", buf); - if (!*buf || *buf == '\033') return; + X11_getlin("Search for:", tmpbuf); + if (!*tmpbuf || *tmpbuf == '\033') return; + /* convert "string" into "*string*" for use with pmatch() */ + Sprintf(buf, "*%s*", tmpbuf); if (menu_info->how == PICK_ANY) invert_match(wp, buf); @@ -479,7 +485,7 @@ invert_all(wp) static void invert_match(wp, match) struct xwindow *wp; - char *match; + char *match; /* wildcard pattern for pmatch() */ { x11_menu_item *curr; int count; @@ -488,7 +494,7 @@ invert_match(wp, match) reset_menu_count(wp->menu_information); for (count = 0, curr = wp->menu_information->curr_menu.base; curr; curr = curr->next, count++) - if (curr->identifier.a_void != 0 && strstri(curr->str, match)) { + if (curr->identifier.a_void != 0 && pmatchi(match, curr->str)) { invert_line(wp, curr, count, -1L); changed = TRUE; } @@ -503,7 +509,7 @@ invert_match(wp, match) static void select_match(wp, match) struct xwindow *wp; - char *match; + char *match; /* wildcard pattern for pmatch() */ { x11_menu_item *curr; int count; @@ -511,11 +517,12 @@ select_match(wp, match) reset_menu_count(wp->menu_information); for (count = 0, curr = wp->menu_information->curr_menu.base; curr; curr = curr->next, count++) - if (curr->identifier.a_void != 0 && strstri(curr->str, match)) { + if (curr->identifier.a_void != 0 && pmatchi(match, curr->str)) { if (!curr->selected) { invert_line(wp, curr, count, -1L); #ifndef USE_FWF - XawListChange(wp->w, wp->menu_information->curr_menu.list_pointer, + XawListChange(wp->w, + wp->menu_information->curr_menu.list_pointer, 0, 0, True); #endif } diff --git a/win/tty/wintty.c b/win/tty/wintty.c index bcf4041e0..3a531d0f1 100644 --- a/win/tty/wintty.c +++ b/win/tty/wintty.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 wintty.c $NHDT-Date: 1428394244 2015/04/07 08:10:44 $ $NHDT-Branch: master $:$NHDT-Revision: 1.84 $ */ +/* NetHack 3.5 wintty.c $NHDT-Date: 1428828474 2015/04/12 08:47:54 $ $NHDT-Branch: master $:$NHDT-Revision: 1.85 $ */ /* NetHack 3.5 wintty.c $Date: 2012/01/22 06:27:09 $ $Revision: 1.66 $ */ /* Copyright (c) David Cohrs, 1991 */ /* NetHack may be freely redistributed. See license for details. */ @@ -1664,20 +1664,24 @@ struct WinDesc *cw; tty_nhbell(); break; } else { - char searchbuf[BUFSZ], tmpbuf[BUFSZ]; + char searchbuf[BUFSZ+2], tmpbuf[BUFSZ]; boolean on_curr_page = FALSE; int lineno = 0; + tty_getlin("Search for:", tmpbuf); if (!tmpbuf[0] || tmpbuf[0] == '\033') break; Sprintf(searchbuf, "*%s*", tmpbuf); + for (curr = cw->mlist; curr; curr = curr->next) { if (on_curr_page) lineno++; if (curr == page_start) on_curr_page = TRUE; else if (curr == page_end) on_curr_page = FALSE; - if (curr->identifier.a_void && pmatch(searchbuf, curr->str)) { - toggle_menu_curr(window, curr, lineno, on_curr_page, counting, count); + if (curr->identifier.a_void + && pmatchi(searchbuf, curr->str)) { + toggle_menu_curr(window, curr, lineno, + on_curr_page, counting, count); if (cw->how == PICK_ONE) { finished = TRUE; break; From ea96cdd54787212c25b2b66ec98fd8532bde94bc Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 12 Apr 2015 08:57:41 -0400 Subject: [PATCH 24/25] More Guidebook Changes to be committed: modified: doc/Guidebook.mn modified: doc/Guidebook.tex --- doc/Guidebook.mn | 29 ++++++++++++++--------------- doc/Guidebook.tex | 40 ++++++++++++++++++---------------------- 2 files changed, 32 insertions(+), 37 deletions(-) diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index e2b29a6f4..a62cfd02a 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -3284,16 +3284,6 @@ successors originally by \fBDaniel Thaler\fP and then by \fBAlex Smith\fP, and Dynahack by \fBTung Nguyen\fP. Some of those variants continue to be developed, maintained, and enjoyed by the community to this day. .pg -In September 2014, an interim snapshot of the code under development was -released publicly by other parties. Since that code was a work-in-progress -and had not gone through a period of debugging, it was decided that the -version numbers present on that code snapshot would be retired and never -used in an official NetHack release. An announcement was posted on the -devteam's official nethack.org website to that effect, stating that there -would never be a 3.4.4, 3.5, or 3.5.0 official release version. -.pg -In January 2015, preparation began for the release of NetHack 3.6 -.pg At the beginning of development for what would eventually get released as 3.6.0, the development team consisted of \fBWarwick Allison\fP, \fBMichael Allison\fP, \fBKen Arromdee\fP, @@ -3302,13 +3292,24 @@ as 3.6.0, the development team consisted of \fBWarwick Allison\fP, \fBMike Stephenson\fP, \fBJanet Walz\fP, and \fBPaul Winner\fP. Leading up to the release of 3.6.0 in early 2015, new members \fBSean Hunt\fP, \fBPasi Kallinen\fP, and \fBDerek S. Ray\fP -joined the NetHack development team, +joined the NetHack development team. .pg -\fB3.6.0 TODO insert apprpriate description of 3.6.0 here +In September 2014, an interim snapshot of the code under development was +released publicly by other parties. Since that code was a work-in-progress +and had not gone through a period of debugging, it was decided that the +version numbers present on that code snapshot would be retired and never +used in an official NetHack release. An announcement was posted on the +devteam's official nethack.org website to that effect, stating that there +would never be a 3.4.4, 3.5, or 3.5.0 official release version. +.pg +In January 2015, preparation began for the release of NetHack 3.6. The 3.6 +version merges work done by the development team since the previous release with +some of the beloved community patches. Many bugs were fixed and some code was +restructured. .pg \fBThe development team, as well as \fBSteve VanDevender\fP and \fBKevin Smolkowski\fP ensured that NetHack 3.6.0 continued to operate on -various Unix flavors as well as maintaining the X11 interface. +various Unix flavors and maintained the X11 interface. .pg \fBKen Lorber\fP, \fBHaoyang Wang\fP, \fBPat Rankin\fP, and \fBDean Luick\fP maintained the port of NetHack 3.6.0 for Mac. @@ -3319,8 +3320,6 @@ NetHack 3.6.0 for Microsoft Windows. .pg \fBJeff Bailey\fP created and maintained a port of NetHack 3.6.0 for Chrome. .pg -TODO \fBAlex Kompel\fP maintained a port of NetHack 3.6.0 to Windows Phone. -.pg \fBThis version of the game is special in a particular way. Near the end of the development of 3.6, one of the significant inspirations for many of the humorous and fun features found in the game, author \fBTerry Pratchett\fP, diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index cd415e25f..d31fa52aa 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -3955,6 +3955,18 @@ originally by Daniel Thaler and then by Alex Smith, and Dynahack by Tung Nguyen. Some of those variants continue to be developed, maintained, and enjoyed by the community to this day. +%.pg +\medskip +At the beginning of development for what would eventually get released +as 3.6.0, the development team consisted of {\it Warwick Allison}, +{\it Michael Allison}, {\it Ken Arromdee}, +{\it David Cohrs}, {\it Jessie Collet}, +{\it Ken Lorber}, {\it Dean Luick}, {\it Pat Rankin}, +{\it Mike Stephenson}, {\it Janet Walz}, and {\it Paul Winner}. +Leading up to the release of 3.6.0 in early 2015, new members +{\it Sean Hunt}, {\it Pasi Kallinen}, and {\it Derek S. Ray} +joined the NetHack development team. + %.pg \medskip In September 2014, an interim snapshot of the code under development was @@ -3967,30 +3979,18 @@ would never be a 3.4.4, 3.5, or 3.5.0 official release version. %.pg \medskip -In January 2015, preparation began for the release of NetHack 3.6 - -%.pg -\medskip -At the beginning of development for what would eventually get released -as 3.6.0, the development team consisted of {\it Warwick Allison}, -{\it Michael Allison}, {\it Ken Arromdee}, -{\it David Cohrs}, {\it Jessie Collet}, -{\it Ken Lorber}, {\it Dean Luick}, {\it Pat Rankin}, -{\it Mike Stephenson}, {\it Janet Walz}, and {\it Paul Winner}. -Leading up to the release of 3.6.0 in early 2015, new members -{\it Sean Hunt}, {\it Pasi Kallinen}, and {\it Derek S. Ray} -joined the NetHack development team, - -%.pg -\medskip -3.6.0 TODO insert apprpriate description of 3.6.0 here +In January 2015, preparation began for the release of NetHack 3.6. +The 3.6 version merges work done by the development team since the previous +release with some of the beloved community patches. Many bugs were fixed +and some code was restructured. %.pg \medskip The development team, as well as {\it Steve VanDevender} and {\it Kevin Smolkowski} ensured that NetHack 3.6.0 continued to operate on -various Unix flavors as well as maintaining the X11 interface. +various Unix flavors and maintained the X11 interface. +%.pg {\it Ken Lorber}, {\it Haoyang Wang}, {\it Pat Rankin}, and {\it Dean Luick} maintained the port of NetHack 3.6.0 for Mac. @@ -4004,10 +4004,6 @@ NetHack 3.6.0 for Microsoft Windows. \medskip {\it Jeff Bailey} created and maintained a port of NetHack 3.6.0 for Chrome. -%.pg -\medskip -{\it Alex Kompel} maintained a port of NetHack 3.6.0 to Windows Phone. ? - %.pg \medskip This version of the game is special in a particular way. Near the end of From 7da3ed32e13a03d899f0886143c3c941232ff90d Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 12 Apr 2015 10:31:26 -0400 Subject: [PATCH 25/25] tribute post-merge smoothing Changes to be committed: modified: src/mon.c modified: win/share/objects.txt --- src/mon.c | 2 + win/share/objects.txt | 143 +++++++++++++++++++++--------------------- 2 files changed, 74 insertions(+), 71 deletions(-) diff --git a/src/mon.c b/src/mon.c index 856b97b99..e90371bce 100644 --- a/src/mon.c +++ b/src/mon.c @@ -1627,6 +1627,8 @@ register struct monst *mtmp; } if(mtmp->iswiz) wizdead(); if(mtmp->data->msound == MS_NEMESIS) nemdead(); + if(mtmp->data == &mons[PM_MEDUSA]) + u.uachieve.killed_medusa = 1; if(glyph_is_invisible(levl[mtmp->mx][mtmp->my].glyph)) unmap_object(mtmp->mx, mtmp->my); m_detach(mtmp, mptr); diff --git a/win/share/objects.txt b/win/share/objects.txt index 257a277e6..7a1c5c7f6 100644 --- a/win/share/objects.txt +++ b/win/share/objects.txt @@ -7006,7 +7006,7 @@ P = (108, 145, 182) MMMMMMMJJJAAMMMM MMMMMMMMMMMMMMMM } -# tile 363 (paperback / novel) +# tile 368 (paperback / novel) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7025,6 +7025,7 @@ P = (108, 145, 182) MMMMMMMEEEAAMMMM MMMMMMMMMMMMMMMM } +# tile 369 (papyrus / Book of the Dead) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7043,7 +7044,7 @@ P = (108, 145, 182) MMMMMMMAAAMMMMMM MMMMMMMMMMMMMMMM } -# tile 369 (glass / light) +# tile 370 (glass / light) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7062,7 +7063,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 370 (balsa / secret door detection) +# tile 371 (balsa / secret door detection) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7081,7 +7082,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 371 (crystal / enlightenment) +# tile 372 (crystal / enlightenment) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7100,7 +7101,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 372 (maple / create monster) +# tile 373 (maple / create monster) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7119,7 +7120,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 373 (pine / wishing) +# tile 374 (pine / wishing) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7138,7 +7139,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 374 (oak / nothing) +# tile 375 (oak / nothing) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7157,7 +7158,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 375 (ebony / striking) +# tile 376 (ebony / striking) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7176,7 +7177,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 376 (marble / make invisible) +# tile 377 (marble / make invisible) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7195,7 +7196,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 377 (tin / slow monster) +# tile 378 (tin / slow monster) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7214,7 +7215,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 378 (brass / speed monster) +# tile 379 (brass / speed monster) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7233,7 +7234,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 379 (copper / undead turning) +# tile 380 (copper / undead turning) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7252,7 +7253,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 380 (silver / polymorph) +# tile 381 (silver / polymorph) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7271,7 +7272,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 381 (platinum / cancellation) +# tile 382 (platinum / cancellation) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7290,7 +7291,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 382 (iridium / teleportation) +# tile 383 (iridium / teleportation) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7309,7 +7310,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 383 (zinc / opening) +# tile 384 (zinc / opening) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7328,7 +7329,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 384 (aluminum / locking) +# tile 385 (aluminum / locking) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7347,7 +7348,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 385 (uranium / probing) +# tile 386 (uranium / probing) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7366,7 +7367,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 386 (iron / digging) +# tile 387 (iron / digging) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7385,7 +7386,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 387 (steel / magic missile) +# tile 388 (steel / magic missile) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7404,7 +7405,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 388 (hexagonal / fire) +# tile 389 (hexagonal / fire) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7423,7 +7424,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 389 (short / cold) +# tile 390 (short / cold) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7442,7 +7443,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 390 (runed / sleep) +# tile 391 (runed / sleep) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7461,7 +7462,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 391 (long / death) +# tile 392 (long / death) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMNOM @@ -7480,7 +7481,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 392 (curved / lightning) +# tile 393 (curved / lightning) { MMMMMMMMMMMMMMMM MMMMMMMNOMMMMMMM @@ -7499,7 +7500,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 393 (forked) +# tile 394 (forked) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7518,7 +7519,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 394 (spiked) +# tile 395 (spiked) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7537,7 +7538,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 395 (jeweled) +# tile 396 (jeweled) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7556,7 +7557,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 396 (gold piece) +# tile 397 (gold piece) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7575,7 +7576,7 @@ P = (108, 145, 182) MMMMMMMMMHAMMMMM MMMMMMMMMMMHAMMM } -# tile 397 (white / dilithium crystal) +# tile 398 (white / dilithium crystal) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7594,7 +7595,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 398 (white / diamond) +# tile 399 (white / diamond) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7613,7 +7614,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 399 (red / ruby) +# tile 400 (red / ruby) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7632,7 +7633,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 400 (orange / jacinth) +# tile 401 (orange / jacinth) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7651,7 +7652,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 401 (blue / sapphire) +# tile 402 (blue / sapphire) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7670,7 +7671,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 402 (black / black opal) +# tile 403 (black / black opal) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7689,7 +7690,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 403 (green / emerald) +# tile 404 (green / emerald) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7708,7 +7709,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 404 (green / turquoise) +# tile 405 (green / turquoise) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7727,7 +7728,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 405 (yellow / citrine) +# tile 406 (yellow / citrine) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7746,7 +7747,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 406 (green / aquamarine) +# tile 407 (green / aquamarine) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7765,7 +7766,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 407 (yellowish brown / amber) +# tile 408 (yellowish brown / amber) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7784,7 +7785,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 408 (yellowish brown / topaz) +# tile 409 (yellowish brown / topaz) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7803,7 +7804,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 409 (black / jet) +# tile 410 (black / jet) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7822,7 +7823,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 410 (white / opal) +# tile 411 (white / opal) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7841,7 +7842,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 411 (yellow / chrysoberyl) +# tile 412 (yellow / chrysoberyl) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7860,7 +7861,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 412 (red / garnet) +# tile 413 (red / garnet) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7879,7 +7880,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 413 (violet / amethyst) +# tile 414 (violet / amethyst) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7898,7 +7899,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 414 (red / jasper) +# tile 415 (red / jasper) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7917,7 +7918,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 415 (violet / fluorite) +# tile 416 (violet / fluorite) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7936,7 +7937,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 416 (black / obsidian) +# tile 417 (black / obsidian) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7955,7 +7956,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 417 (orange / agate) +# tile 418 (orange / agate) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7974,7 +7975,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 418 (green / jade) +# tile 419 (green / jade) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -7993,7 +7994,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 419 (white / worthless piece of white glass) +# tile 420 (white / worthless piece of white glass) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -8012,7 +8013,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 420 (blue / worthless piece of blue glass) +# tile 421 (blue / worthless piece of blue glass) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -8031,7 +8032,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 421 (red / worthless piece of red glass) +# tile 422 (red / worthless piece of red glass) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -8050,7 +8051,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 422 (yellowish brown / worthless piece of yellowish brown glass) +# tile 423 (yellowish brown / worthless piece of yellowish brown glass) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -8069,7 +8070,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 423 (orange / worthless piece of orange glass) +# tile 424 (orange / worthless piece of orange glass) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -8088,7 +8089,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 424 (yellow / worthless piece of yellow glass) +# tile 425 (yellow / worthless piece of yellow glass) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -8107,7 +8108,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 425 (black / worthless piece of black glass) +# tile 426 (black / worthless piece of black glass) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -8126,7 +8127,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 426 (green / worthless piece of green glass) +# tile 427 (green / worthless piece of green glass) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -8145,7 +8146,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 427 (violet / worthless piece of violet glass) +# tile 428 (violet / worthless piece of violet glass) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -8164,7 +8165,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 428 (gray / luckstone) +# tile 429 (gray / luckstone) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -8183,7 +8184,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 429 (gray / loadstone) +# tile 430 (gray / loadstone) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -8202,7 +8203,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 430 (gray / touchstone) +# tile 431 (gray / touchstone) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -8221,7 +8222,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 431 (gray / flint) +# tile 432 (gray / flint) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -8240,7 +8241,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 432 (rock) +# tile 433 (rock) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -8259,7 +8260,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 433 (boulder) +# tile 434 (boulder) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -8278,7 +8279,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 434 (statue) +# tile 435 (statue) { MMMMMMMMMMMMMMMM MMMMMMMMJJMMMMMM @@ -8297,7 +8298,7 @@ P = (108, 145, 182) MMMMMJJJJJJAAMMM MMMMMMMMMMMMMMMM } -# tile 435 (heavy iron ball) +# tile 436 (heavy iron ball) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -8316,7 +8317,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 436 (iron chain) +# tile 437 (iron chain) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -8335,7 +8336,7 @@ P = (108, 145, 182) MMMMMMMMMMMPPMPA MMMMMMMMMMMMAAMM } -# tile 437 (splash of venom / blinding venom) +# tile 438 (splash of venom / blinding venom) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM @@ -8354,7 +8355,7 @@ P = (108, 145, 182) MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM } -# tile 438 (splash of venom / acid venom) +# tile 439 (splash of venom / acid venom) { MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM