From 327336ff01126b1ffde889e26e50cb6f5867dd1e Mon Sep 17 00:00:00 2001 From: keni Date: Sat, 29 Sep 2018 16:43:39 -0400 Subject: [PATCH 1/4] Update Files. Add missing files and missing .lev section. --- Files | 71 +++++++++++++++++++++++++++++++---------------------------- 1 file changed, 37 insertions(+), 34 deletions(-) diff --git a/Files b/Files index 732c5575c..c574a8fdd 100644 --- a/Files +++ b/Files @@ -23,13 +23,15 @@ tribute wizhelp yendor.des doc: (files for all versions) config.nh Guidebook.mn Guidebook.tex Guidebook.txt dgn_comp.6 -dgn_comp.txt dlb.6 dlb.txt fixes22.0 fixes30.0 -fixes31.1 fixes31.2 fixes31.3 fixes32.0 fixes32.1 -fixes32.2 fixes32.3 fixes33.0 fixes33.1 fixes34.0 -fixes34.1 fixes34.2 fixes34.3 fixes35.0 fixes36.0 -fixes36.1 lev_comp.6 lev_comp.txt makedefs.6 makedefs.txt -nethack.6 nethack.txt recover.6 recover.txt tmac.n -window.doc +dgn_comp.txt dlb.6 dlb.txt fixes10.0 fixes14.f +fixes22.0 fixes23.e fixes30.0 fixes30.pl01 fixes30.pl02 +fixes30.pl03 fixes30.pl04 fixes30.pl05 fixes30.pl06 fixes30.pl07 +fixes30.pl08 fixes30.pl09 fixes30.pl10 fixes31.1 fixes31.2 +fixes31.3 fixes32.0 fixes32.1 fixes32.2 fixes32.3 +fixes33.0 fixes33.1 fixes34.0 fixes34.1 fixes34.2 +fixes34.3 fixes35.0 fixes36.0 fixes36.1 fixes36.2 +lev_comp.6 lev_comp.txt makedefs.6 makedefs.txt nethack.6 +nethack.txt recover.6 recover.txt tmac.n window.doc include: (files for all versions) @@ -179,8 +181,9 @@ snd86unx.shr sys/unix/hints: (files for configuring UNIX NetHack versions) -linux linux-chroot linux-qt4 linux-x11 macosx -macosx10.5 macosx10.7 macosx10.8 macosx10.10 macosx.sh +linux linux-chroot linux-qt4 linux-qt5 +linux-x11 macosx macosx.sh macosx10.10 +macosx10.10-qt macosx10.5 macosx10.7 macosx10.8 unix sys/vms: @@ -333,32 +336,32 @@ data dungeon.pdf options oracles quest.dat rumors (file generated by dgn_comp at playground creation time) dungeon + (files generated by lev_comp at playground creation time) -Arc-fila.lev Arc-filb.lev Arc-goal.lev Arc-loca.lev Arc-strt.lev -Bar-fila.lev Bar-filb.lev Bar-goal.lev Bar-loca.lev Bar-strt.lev -Cav-fila.lev Cav-filb.lev Cav-goal.lev Cav-loca.lev Cav-strt.lev -Hea-fila.lev Hea-filb.lev Hea-goal.lev Hea-loca.lev Hea-strt.lev -Kni-fila.lev Kni-filb.lev Kni-goal.lev Kni-loca.lev Kni-strt.lev -Mon-fila.lev Mon-filb.lev Mon-goal.lev Mon-loca.lev Mon-strt.lev -Pri-fila.lev Pri-filb.lev Pri-goal.lev Pri-loca.lev Pri-strt.lev -Ran-fila.lev Ran-filb.lev Ran-goal.lev Ran-loca.lev Ran-strt.lev -Rog-fila.lev Rog-filb.lev Rog-goal.lev Rog-loca.lev Rog-strt.lev -Sam-fila.lev Sam-filb.lev Sam-goal.lev Sam-loca.lev Sam-strt.lev -Tou-fila.lev Tou-filb.lev Tou-goal.lev Tou-loca.lev Tou-strt.lev -Val-fila.lev Val-filb.lev Val-goal.lev Val-loca.lev Val-strt.lev -Wiz-fila.lev Wiz-filb.lev Wiz-goal.lev Wiz-loca.lev Wiz-strt.lev -air.lev asmodeus.lev astral.lev baalz.lev bigrm-1.lev -bigrm-2.lev bigrm-3.lev bigrm-4.lev bigrm-5.lev castle.lev -earth.lev fakewiz1.lev fakewiz2.lev fire.lev juiblex.lev -knox.lev medusa-1.lev medusa-2.lev minefill.lev minend-1.lev -minend-2.lev minend-3.lev minetn-1.lev minetn-2.lev minetn-3.lev -minetn-4.lev minetn-5.lev minetn-6.lev minetn-7.lev oracle.lev -orcus.lev sanctum.lev soko1-1.lev soko1-2.lev soko2-1.lev -soko2-2.lev soko3-1.lev soko3-2.lev soko4-1.lev soko4-2.lev -tower1.lev tower2.lev tower3.lev valley.lev water.lev -wizard1.lev wizard2.lev wizard3.lev -(tile files optionally generated for X ports at playground creation time) -pet_mark.xbm rip.xpm x11tiles +Arc-fila.lev Arc-filb.lev Arc-goal.lev Arc-loca.lev Arc-strt.lev +Bar-fila.lev Bar-filb.lev Bar-goal.lev Bar-loca.lev Bar-strt.lev +Cav-fila.lev Cav-filb.lev Cav-goal.lev Cav-loca.lev Cav-strt.lev +Hea-fila.lev Hea-filb.lev Hea-goal.lev Hea-loca.lev Hea-strt.lev +Kni-fila.lev Kni-filb.lev Kni-goal.lev Kni-loca.lev Kni-strt.lev +Mon-fila.lev Mon-filb.lev Mon-goal.lev Mon-loca.lev Mon-strt.lev +Pri-fila.lev Pri-filb.lev Pri-goal.lev Pri-loca.lev Pri-strt.lev +Ran-fila.lev Ran-filb.lev Ran-goal.lev Ran-loca.lev Ran-strt.lev +Rog-fila.lev Rog-filb.lev Rog-goal.lev Rog-loca.lev Rog-strt.lev +Sam-fila.lev Sam-filb.lev Sam-goal.lev Sam-loca.lev Sam-strt.lev +Tou-fila.lev Tou-filb.lev Tou-goal.lev Tou-loca.lev Tou-strt.lev +Val-fila.lev Val-filb.lev Val-goal.lev Val-loca.lev Val-strt.lev +Wiz-fila.lev Wiz-filb.lev Wiz-goal.lev Wiz-loca.lev Wiz-strt.lev +air.lev asmodeus.lev astral.lev baalz.lev bigrm-1.lev +bigrm-10.lev bigrm-2.lev bigrm-3.lev bigrm-4.lev bigrm-5.lev +bigrm-6.lev bigrm-7.lev bigrm-8.lev bigrm-9.lev castle.lev +earth.lev fakewiz1.lev fakewiz2.lev fire.lev juiblex.lev +knox.lev medusa-1.lev medusa-2.lev medusa-3.lev medusa-4.lev +minefill.lev minend-1.lev minend-2.lev minend-3.lev minetn-1.lev +minetn-2.lev minetn-3.lev minetn-4.lev minetn-5.lev minetn-6.lev +minetn-7.lev oracle.lev orcus.lev sanctum.lev soko1-1.lev +soko1-2.lev soko2-1.lev soko2-2.lev soko3-1.lev soko3-2.lev +soko4-1.lev soko4-2.lev tower1.lev tower2.lev tower3.lev +valley.lev water.lev wizard1.lev wizard2.lev wizard3.lev (files generated for Qt interface on Mac OS X) nethack.icns Info.plist (files generated for win32 at compile time) From f25f92c27130fd272c48502cb14a8ef4dd1996a4 Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 19 Oct 2018 01:47:29 -0700 Subject: [PATCH 2/4] wishing bit Allow wishing for "cookie" or "pie" to succeed since we have items those can match. Unrelated: allow ^G of "genie" for similar reason. --- src/mondata.c | 6 ++++-- src/objnam.c | 16 ++++++++++++---- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/mondata.c b/src/mondata.c index ffffb9e85..312448466 100644 --- a/src/mondata.c +++ b/src/mondata.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 mondata.c $NHDT-Date: 1508479720 2017/10/20 06:08:40 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.63 $ */ +/* NetHack 3.6 mondata.c $NHDT-Date: 1539938825 2018/10/19 08:47:05 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.67 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2011. */ /* NetHack may be freely redistributed. See license for details. */ @@ -740,7 +740,9 @@ const char *in_str; { "invisible stalker", PM_STALKER }, { "high-elf", PM_ELVENKING }, /* PM_HIGH_ELF is obsolete */ { "halfling", PM_HOBBIT }, /* potential guess for polyself */ - /* Hyphenated names */ + { "genie", PM_DJINNI }, /* potential guess for ^G/#wizgenesis */ + /* Hyphenated names -- it would be nice to handle these via + fuzzymatch() but it isn't able to ignore trailing stuff */ { "ki rin", PM_KI_RIN }, { "uruk hai", PM_URUK_HAI }, { "orc captain", PM_ORC_CAPTAIN }, diff --git a/src/objnam.c b/src/objnam.c index ce952c36f..c9d00f6ab 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 objnam.c $NHDT-Date: 1537659941 2018/09/22 23:45:41 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.212 $ */ +/* NetHack 3.6 objnam.c $NHDT-Date: 1539938837 2018/10/19 08:47:17 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.214 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2011. */ /* NetHack may be freely redistributed. See license for details. */ @@ -2398,7 +2398,13 @@ const char *oldstr; if (p >= bp + 2 && lowc(p[-2]) == 'e') { if (p >= bp + 3 && lowc(p[-3]) == 'i') { /* "ies" */ if (!BSTRCMPI(bp, p - 7, "cookies") - || !BSTRCMPI(bp, p - 4, "pies") + || (!BSTRCMPI(bp, p - 4, "pies") + /* avoid false match for "harpies" */ + && (p - 4 == bp || p[-5] == ' ')) + /* alternate djinni/djinn spelling; not really needed */ + || (!BSTRCMPI(bp, p - 6, "genies") + /* avoid false match for "progenies" */ + && (p - 6 == bp || p[-7] == ' ')) || !BSTRCMPI(bp, p - 5, "mbies") /* zombie */ || !BSTRCMPI(bp, p - 5, "yries")) /* valkyrie */ goto mins; @@ -2648,7 +2654,7 @@ STATIC_OVL NEARDATA const struct o_range o_ranges[] = { absence of spaces and/or hyphens (such as "pickaxe" vs "pick axe" vs "pick-axe") then there is no need for inclusion in this list; likewise for ``"of" inversions'' ("boots of speed" vs "speed boots") */ -struct alt_spellings { +static const struct alt_spellings { const char *sp; int ob; } spellings[] = { @@ -2673,6 +2679,8 @@ struct alt_spellings { { "eucalyptus", EUCALYPTUS_LEAF }, { "royal jelly", LUMP_OF_ROYAL_JELLY }, { "lembas", LEMBAS_WAFER }, + { "cookie", FORTUNE_COOKIE }, + { "pie", CREAM_PIE }, { "marker", MAGIC_MARKER }, { "hook", GRAPPLING_HOOK }, { "grappling iron", GRAPPLING_HOOK }, @@ -3177,7 +3185,7 @@ struct obj *no_wish; /* Alternate spellings (pick-ax, silver sabre, &c) */ { - struct alt_spellings *as = spellings; + const struct alt_spellings *as = spellings; while (as->sp) { if (fuzzymatch(bp, as->sp, " -", TRUE)) { From 9cc77afd96b2eaec3e7200cee52f7bee4ef0c54c Mon Sep 17 00:00:00 2001 From: keni Date: Fri, 19 Oct 2018 10:45:32 -0400 Subject: [PATCH 3/4] fix numerical ordering in Files --- Files | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Files b/Files index 7a1a69974..261e8e799 100644 --- a/Files +++ b/Files @@ -220,8 +220,8 @@ snd86unx.shr sys/unix/hints: (files for configuring UNIX NetHack versions) linux linux-chroot linux-qt4 linux-qt5 -linux-x11 macosx macosx.sh macosx10.10 -macosx10.10-qt macosx10.5 macosx10.7 macosx10.8 +linux-x11 macosx macosx.sh macosx10.5 +macosx10.7 macosx10.8 macosx10.10 macosx10.10-qt unix sys/vms: @@ -394,8 +394,8 @@ Tou-fila.lev Tou-filb.lev Tou-goal.lev Tou-loca.lev Tou-strt.lev Val-fila.lev Val-filb.lev Val-goal.lev Val-loca.lev Val-strt.lev Wiz-fila.lev Wiz-filb.lev Wiz-goal.lev Wiz-loca.lev Wiz-strt.lev air.lev asmodeus.lev astral.lev baalz.lev bigrm-1.lev -bigrm-10.lev bigrm-2.lev bigrm-3.lev bigrm-4.lev bigrm-5.lev -bigrm-6.lev bigrm-7.lev bigrm-8.lev bigrm-9.lev castle.lev +bigrm-2.lev bigrm-3.lev bigrm-4.lev bigrm-5.lev bigrm-6.lev +bigrm-7.lev bigrm-8.lev bigrm-9.lev bigrm-10.lev castle.lev earth.lev fakewiz1.lev fakewiz2.lev fire.lev juiblex.lev knox.lev medusa-1.lev medusa-2.lev medusa-3.lev medusa-4.lev minefill.lev minend-1.lev minend-2.lev minend-3.lev minetn-1.lev From 3b298d40c25034b4d3eca4ac452b887e47e7af36 Mon Sep 17 00:00:00 2001 From: keni Date: Fri, 19 Oct 2018 10:45:32 -0400 Subject: [PATCH 4/4] fix numerical ordering in Files --- Files | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Files b/Files index c574a8fdd..f4b7f11dd 100644 --- a/Files +++ b/Files @@ -182,8 +182,8 @@ snd86unx.shr sys/unix/hints: (files for configuring UNIX NetHack versions) linux linux-chroot linux-qt4 linux-qt5 -linux-x11 macosx macosx.sh macosx10.10 -macosx10.10-qt macosx10.5 macosx10.7 macosx10.8 +linux-x11 macosx macosx.sh macosx10.5 +macosx10.7 macosx10.8 macosx10.10 macosx10.10-qt unix sys/vms: @@ -352,8 +352,8 @@ Tou-fila.lev Tou-filb.lev Tou-goal.lev Tou-loca.lev Tou-strt.lev Val-fila.lev Val-filb.lev Val-goal.lev Val-loca.lev Val-strt.lev Wiz-fila.lev Wiz-filb.lev Wiz-goal.lev Wiz-loca.lev Wiz-strt.lev air.lev asmodeus.lev astral.lev baalz.lev bigrm-1.lev -bigrm-10.lev bigrm-2.lev bigrm-3.lev bigrm-4.lev bigrm-5.lev -bigrm-6.lev bigrm-7.lev bigrm-8.lev bigrm-9.lev castle.lev +bigrm-2.lev bigrm-3.lev bigrm-4.lev bigrm-5.lev bigrm-6.lev +bigrm-7.lev bigrm-8.lev bigrm-9.lev bigrm-10.lev castle.lev earth.lev fakewiz1.lev fakewiz2.lev fire.lev juiblex.lev knox.lev medusa-1.lev medusa-2.lev medusa-3.lev medusa-4.lev minefill.lev minend-1.lev minend-2.lev minend-3.lev minetn-1.lev