From 09920871f2802144d69609cf10ccd551565a8512 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 19 Apr 2015 18:56:49 -0400 Subject: [PATCH 1/6] invalid escape Changes to be committed: modified: win/share/tiletext.c --- win/share/tiletext.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/win/share/tiletext.c b/win/share/tiletext.c index fe61eee75..ea78eb02f 100644 --- a/win/share/tiletext.c +++ b/win/share/tiletext.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 tiletext.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 tiletext.c $NHDT-Date: 1429484196 2015/04/19 22:56:36 $ $NHDT-Branch: master $:$NHDT-Revision: 1.6 $ */ /* NetHack 3.5 tiletext.c $Date: 2009/05/06 10:59:03 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)tiletext.c 3.5 1999/10/24 */ /* NetHack may be freely redistributed. See license for details. */ @@ -33,7 +33,7 @@ static void FDECL(write_txttile, (FILE *, pixel(*)[TILE_X])); /* Ugh. DICE doesn't like %[A-Z], so we have to spell it out... */ #define FORMAT_STRING \ -"%[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\.] = (%d, %d, %d) " +"%[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.] = (%d, %d, %d) " static void read_text_colormap(txtfile) From 6cad21e4e86495e7f5e8474759bab4f9bbdbd072 Mon Sep 17 00:00:00 2001 From: PatR Date: Mon, 20 Apr 2015 00:05:00 -0700 Subject: [PATCH 2/6] tribute in-game bonus Give 20 experience points the first time the hero reads a passage from a tribute novel. It's enough to go from level 1 to 2 or from 2 to 3. By the time a book store is found, that's too trivial for most to care about, but it's potentially useful to a pacifist. --- include/patchlevel.h | 4 ++-- include/you.h | 5 +++-- src/spell.c | 8 +++++++- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/include/patchlevel.h b/include/patchlevel.h index ec56f36e1..90ebed301 100644 --- a/include/patchlevel.h +++ b/include/patchlevel.h @@ -1,4 +1,4 @@ -/* NetHack 3.5 patchlevel.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 patchlevel.h $NHDT-Date: 1429513493 2015/04/20 07:04:53 $ $NHDT-Branch: master $:$NHDT-Revision: 1.102 $ */ /* NetHack 3.5 patchlevel.h $Date: 2012/04/14 08:31:03 $ $Revision: 1.93 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -14,7 +14,7 @@ * Incrementing EDITLEVEL can be used to force invalidation of old bones * and save files. */ -#define EDITLEVEL 62 +#define EDITLEVEL 63 #define COPYRIGHT_BANNER_A \ "NetHack, Copyright 1985-2015" diff --git a/include/you.h b/include/you.h index 87291479c..a13bd108c 100644 --- a/include/you.h +++ b/include/you.h @@ -1,4 +1,4 @@ -/* NetHack 3.5 you.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 you.h $NHDT-Date: 1429513494 2015/04/20 07:04:54 $ $NHDT-Branch: master $:$NHDT-Revision: 1.25 $ */ /* NetHack 3.5 you.h $Date: 2012/04/14 08:31:03 $ $Revision: 1.13 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -39,12 +39,13 @@ struct u_have { struct u_event { Bitfield(minor_oracle,1); /* received at least 1 cheap oracle */ Bitfield(major_oracle,1); /* " expensive oracle */ + Bitfield(read_tribute,1); /* read a passage from a novel */ Bitfield(qcalled,1); /* called by Quest leader to do task */ Bitfield(qexpelled,1); /* expelled from the Quest dungeon */ Bitfield(qcompleted,1); /* successfully completed Quest task */ Bitfield(uheard_tune,2); /* 1=know about, 2=heard passtune */ - Bitfield(uopened_dbridge,1); /* opened the drawbridge */ + Bitfield(uopened_dbridge,1); /* opened the drawbridge */ Bitfield(invoked,1); /* invoked Gate to the Sanctum level */ Bitfield(gehennom_entered,1); /* entered Gehennom via Valley */ Bitfield(uhand_of_elbereth,2); /* became Hand of Elbereth */ diff --git a/src/spell.c b/src/spell.c index fe0741d2f..3de41b5ec 100644 --- a/src/spell.c +++ b/src/spell.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 spell.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 spell.c $NHDT-Date: 1429513494 2015/04/20 07:04:54 $ $NHDT-Branch: master $:$NHDT-Revision: 1.57 $ */ /* NetHack 3.5 spell.c $Date: 2011/12/29 22:01:25 $ $Revision: 1.44 $ */ /* Copyright (c) M. Stephenson 1988 */ /* NetHack may be freely redistributed. See license for details. */ @@ -457,6 +457,12 @@ register struct obj *spellbook; if (read_tribute("books", tribtitle, 0)) { u.uconduct.literate++; check_unpaid(spellbook); + if (!u.uevent.read_tribute) { + /* give bonus of 20 xp and 4*20+0 pts */ + more_experienced(20, 0); + newexplevel(); + u.uevent.read_tribute = 1; /* only once */ + } } return(1); } From bac7654a75a5ff6e5423afd7d5a5ea89a0bfcc3a Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Mon, 20 Apr 2015 18:09:59 +0300 Subject: [PATCH 3/6] Make sure can't chat out of the map --- src/sounds.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sounds.c b/src/sounds.c index f1dec986f..84883eab8 100644 --- a/src/sounds.c +++ b/src/sounds.c @@ -1001,6 +1001,9 @@ dochat() } tx = u.ux+u.dx; ty = u.uy+u.dy; + + if (!isok(tx,ty)) return (0); + mtmp = m_at(tx, ty); if ((!mtmp || mtmp->mundetected) && From 04f6fe8e515be6fe7f77dc1b2c3a2b358821d89c Mon Sep 17 00:00:00 2001 From: keni Date: Mon, 20 Apr 2015 20:49:18 -0400 Subject: [PATCH 4/6] Developer.txt: add notes about branches --- DEVEL/Developer.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/DEVEL/Developer.txt b/DEVEL/Developer.txt index ce78965ea..202778c7b 100644 --- a/DEVEL/Developer.txt +++ b/DEVEL/Developer.txt @@ -34,12 +34,21 @@ things. 2. git repositories The public NetHack git repository is available (read-only) on SourceForge at: git://git.code.sf.net/p/nethack/NHsource + +XXX need to discuss what branches are available ------------------------------------------------------------------------------ 3. bug reporting Please use the form at http://www.nethack.org/common/contact.html (or send us an email if that's more appropriate). ------------------------------------------------------------------------------ 4. git configuration + +NOTE: These instructions assume you are on the default branch ("master"); + this _is_ where you want to be for setting things up. This may or may + not be the branch you want to use for your changes; see the appropriate + project private documentation for more information (if you are working + alone we suggest using branch names starting with "LOCAL-"). + A. If you have never set up git on this machine before: (This assumes you will only be using git for NetHack. If you are going to use it for other projects as well, think before you type.) From 7bbf292c92fe16b8ee91612fa0b82d993fa6e816 Mon Sep 17 00:00:00 2001 From: PatR Date: Mon, 20 Apr 2015 19:45:13 -0700 Subject: [PATCH 5/6] mongone vs vault guard mongone() would send away a vault guard, whether alive or already dead and parked at <0,0>, losing the information needed to remove the temporary vault corridor once whatever obstacle (ie, the hero) that's keeping it in place has been cleared. Have mongone() call grddead() like mondead() does, so that a guard will just be moved to <0,0> with 0 HP and kept there rather than being purged during the next dead monster removal. Move polearm context reset to m_detach() [and, unfortunately, duplicated in grddead()] rather than in having it in dmonsfree() since execution of the latter is deferred. I'm not sure offhand whether a fast hero could get a second move before end-of-turn purging of dead monsters. --- src/mon.c | 26 +++++++++++++++----------- src/vault.c | 4 +++- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/src/mon.c b/src/mon.c index e90371bce..f73d258ec 100644 --- a/src/mon.c +++ b/src/mon.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 mon.c $NHDT-Date: 1426470347 2015/03/16 01:45:47 $ $NHDT-Branch: derek-farming $:$NHDT-Revision: 1.140 $ */ +/* NetHack 3.5 mon.c $NHDT-Date: 1429584308 2015/04/21 02:45:08 $ $NHDT-Branch: master $:$NHDT-Revision: 1.164 $ */ /* NetHack 3.5 mon.c $Date: 2012/05/16 02:15:10 $ $Revision: 1.126 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1256,15 +1256,13 @@ dmonsfree() int count = 0; for (mtmp = &fmon; *mtmp;) { - freetmp = *mtmp; - if (freetmp->mhp <= 0 && !freetmp->isgd) { - if (freetmp == context.polearm.hitmon) - context.polearm.hitmon = NULL; - *mtmp = freetmp->nmon; - dealloc_monst(freetmp); - count++; - } else - mtmp = &(freetmp->nmon); + freetmp = *mtmp; + if (freetmp->mhp <= 0 && !freetmp->isgd) { + *mtmp = freetmp->nmon; + dealloc_monst(freetmp); + count++; + } else + mtmp = &(freetmp->nmon); } if (count != iflags.purge_monsters) @@ -1433,6 +1431,8 @@ m_detach(mtmp, mptr) struct monst *mtmp; struct permonst *mptr; /* reflects mtmp->data _prior_ to mtmp's death */ { + if (mtmp == context.polearm.hitmon) + context.polearm.hitmon = 0; if (mtmp->mleashed) m_unleash(mtmp, FALSE); /* to prevent an infinite relobj-flooreffects-hmon-killed loop */ mtmp->mtrapped = 0; @@ -1720,7 +1720,11 @@ mongone(mdef) register struct monst *mdef; { mdef->mhp = 0; /* can skip some inventory bookkeeping */ - /* Player is thrown from his steed when it disappears */ + + /* dead vault guard is actually kept at coordinate <0,0> until + his temporary corridor to/from the vault has been removed */ + if (mdef->isgd && !grddead(mdef)) return; + /* hero is thrown from his steed when it disappears */ if (mdef == u.usteed) dismount_steed(DISMOUNT_GENERIC); diff --git a/src/vault.c b/src/vault.c index 87c13b31a..9a3fc0ef4 100644 --- a/src/vault.c +++ b/src/vault.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 vault.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 vault.c $NHDT-Date: 1429584309 2015/04/21 02:45:09 $ $NHDT-Branch: master $:$NHDT-Revision: 1.33 $ */ /* NetHack 3.5 vault.c $Date: 2011/10/13 00:31:10 $ $Revision: 1.28 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -141,6 +141,8 @@ register struct monst *grd; relobj(grd, 0, FALSE); /* guard is dead; monster traversal loops should skip it */ grd->mhp = 0; + if (grd == context.polearm.hitmon) + context.polearm.hitmon = 0; /* see comment by newpos in gd_move() */ remove_monster(grd->mx, grd->my); newsym(grd->mx, grd->my); From a155d1d47466227bcaa858be03019c77039b040e Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Tue, 21 Apr 2015 11:22:30 +0300 Subject: [PATCH 6/6] Solidify the astral plane ...to prevent xorns appearing in the inaccessible map fringes --- dat/endgame.des | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dat/endgame.des b/dat/endgame.des index 83441e58c..4f2cbd9de 100644 --- a/dat/endgame.des +++ b/dat/endgame.des @@ -476,7 +476,7 @@ MONSTER:('E',"water elemental"),random,hostile MAZE:"astral",' ' -FLAGS: noteleport,hardfloor,nommap,shortsighted +FLAGS: noteleport,hardfloor,nommap,shortsighted,solidify MESSAGE: "You arrive on the Astral Plane!" MESSAGE: "Here the High Temple of %d is located." MESSAGE: "You sense alarm, hostility, and excitement in the air!"