diff --git a/README b/README index 391b975fc..677f3d300 100644 --- a/README +++ b/README @@ -62,7 +62,7 @@ Please read items (1), (2) and (3) BEFORE doing anything with your new code. Intel Pentium or better (or clone) running Linux, BSDI, or Windows (7 through 10) Intel 80386 or greater (or clone) boxes running Linux, or BSDI - Mac OS X 10.9 + Mac OS X 10.11 (follow the instructions in sys/unix, not sys/mac) OpenVMS (aka VMS) V8.4 on Alpha and on Integrity/Itanium/IA64 Instructions have been provided by way of community contribution on: @@ -166,6 +166,6 @@ In our own patches, we will assume that your code is synchronized with ours. -- Good luck, and happy Hacking -- -# $NHDT-Date: 1524689604 2018/04/25 20:53:24 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.42 $ +# $NHDT-Date: 1533602460 2018/08/07 00:41:00 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.46 $ # Copyright (c) 2012 by Michael Allison # NetHack may be freely redistributed. See license for details. diff --git a/doc/fixes36.2 b/doc/fixes36.2 index e98a9245c..55cde42ad 100644 --- a/doc/fixes36.2 +++ b/doc/fixes36.2 @@ -76,6 +76,11 @@ summary text [for message history] of quest message Pri 00081 (Priest quest success message given when bringing quest artifact to leader) misspelled "congratulations" verbal charm/seduce messages were given even when hero was deaf +succubus/incubus seduction might result in loss of levitation which in turn + could drop the hero onto a trap that transports him/her elsewhere; + seduction was proceeding as if nothing unusual had happened +#turn command which aggravated monsters did so without using a turn (not a pun) +fix hole/trapdoor passage inconsistency when polymorphed into a giant Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository diff --git a/src/do.c b/src/do.c index d2498465c..39bffd66c 100644 --- a/src/do.c +++ b/src/do.c @@ -988,10 +988,31 @@ dodown() return 0; } - if (trap) - You("%s %s.", Flying ? "fly" : locomotion(youmonst.data, "jump"), - trap->ttyp == HOLE ? "down the hole" : "through the trap door"); + if (trap) { + const char *down_or_thru = trap->ttyp == HOLE ? "down" : "through"; + const char *actn = Flying ? "fly" : locomotion(youmonst.data, "jump"); + if (youmonst.data->msize >= MZ_HUGE) { + char qbuf[QBUFSZ]; + + You("don't fit %s easily.", down_or_thru); + Sprintf(qbuf, "Try to squeeze %s?", down_or_thru); + if (yn(qbuf) == 'y') { + if (!rn2(3)) { + actn = "manage to squeeze"; + losehp(Maybe_Half_Phys(rnd(4)), + "contusion from a small passage", KILLED_BY); + } else { + You("were unable to fit %s.", down_or_thru); + return 0; + } + } else { + return 0; + } + } + You("%s %s the %s.", actn, down_or_thru, + trap->ttyp == HOLE ? "hole" : "trap door"); + } if (trap && Is_stronghold(&u.uz)) { goto_hell(FALSE, TRUE); } else { diff --git a/src/mhitu.c b/src/mhitu.c index 195dc025a..12a6d3212 100644 --- a/src/mhitu.c +++ b/src/mhitu.c @@ -11,7 +11,8 @@ STATIC_VAR NEARDATA struct obj *mon_currwep = (struct obj *) 0; STATIC_DCL boolean FDECL(u_slip_free, (struct monst *, struct attack *)); STATIC_DCL int FDECL(passiveum, (struct permonst *, struct monst *, struct attack *)); -STATIC_DCL void FDECL(mayberem, (const char *, struct obj *, const char *)); +STATIC_DCL void FDECL(mayberem, (struct monst *, const char *, + struct obj *, const char *)); STATIC_DCL boolean FDECL(diseasemu, (struct permonst *)); STATIC_DCL int FDECL(hitmu, (struct monst *, struct attack *)); STATIC_DCL int FDECL(gulpmu, (struct monst *, struct attack *)); @@ -2349,7 +2350,7 @@ struct attack *mattk; return (pagr->mlet == S_NYMPH) ? 2 : 0; } -/* Returns 1 if monster teleported */ +/* returns 1 if monster teleported (or hero leaves monster's vicinity) */ int doseduce(mon) struct monst *mon; @@ -2392,7 +2393,7 @@ struct monst *mon; if (ring->owornmask && uarmg) { /* don't take off worn ring if gloves are in the way */ if (!tried_gloves++) - mayberem(Who, uarmg, "gloves"); + mayberem(mon, Who, uarmg, "gloves"); if (uarmg) continue; /* next ring might not be worn */ } @@ -2422,7 +2423,7 @@ struct monst *mon; if (uarmg) { /* don't put on ring if gloves are in the way */ if (!tried_gloves++) - mayberem(Who, uarmg, "gloves"); + mayberem(mon, Who, uarmg, "gloves"); if (uarmg) break; /* no point trying further rings */ } @@ -2449,14 +2450,25 @@ struct monst *mon; Who, the(xname(ring)), body_part(HAND)); setworn(ring, LEFT_RING); } else if (uright && uright->otyp != RIN_ADORNMENT) { + /* note: the "replaces" message might be inaccurate if + hero's location changes and the process gets interrupted, + but trying to figure that out in advance in order to use + alternate wording is not worth the effort */ pline("%s replaces %s with %s.", Who, yname(uright), yname(ring)); Ring_gone(uright); + /* ring removal might cause loss of levitation which could + drop hero onto trap that transports hero somewhere else */ + if (u.utotype || distu(mon->mx, mon->my) > 2) + return 1; setworn(ring, RIGHT_RING); } else if (uleft && uleft->otyp != RIN_ADORNMENT) { + /* see "replaces" note above */ pline("%s replaces %s with %s.", Who, yname(uleft), yname(ring)); Ring_gone(uleft); + if (u.utotype || distu(mon->mx, mon->my) > 2) + return 1; setworn(ring, LEFT_RING); } else impossible("ring replacement"); @@ -2471,16 +2483,25 @@ struct monst *mon; : naked ? "murmurs sweet nothings into your ear" : "murmurs in your ear", naked ? "" : ", while helping you undress"); - mayberem(Who, uarmc, cloak_simple_name(uarmc)); + mayberem(mon, Who, uarmc, cloak_simple_name(uarmc)); if (!uarmc) - mayberem(Who, uarm, "suit"); - mayberem(Who, uarmf, "boots"); + mayberem(mon, Who, uarm, suit_simple_name(uarm)); + mayberem(mon, Who, uarmf, "boots"); if (!tried_gloves) - mayberem(Who, uarmg, "gloves"); - mayberem(Who, uarms, "shield"); - mayberem(Who, uarmh, helm_simple_name(uarmh)); + mayberem(mon, Who, uarmg, "gloves"); + mayberem(mon, Who, uarms, "shield"); + mayberem(mon, Who, uarmh, helm_simple_name(uarmh)); if (!uarmc && !uarm) - mayberem(Who, uarmu, "shirt"); + mayberem(mon, Who, uarmu, "shirt"); + + /* removing armor (levitation boots, or levitation ring to make + room for adornment ring with incubus case) might result in the + hero falling through a trap door or landing on a teleport trap + and changing location, so hero might not be adjacent to seducer + any more (mayberem() has its own adjacency test so we don't need + to check after each potential removal) */ + if (u.utotype || distu(mon->mx, mon->my) > 2) + return 1; if (uarm || uarmc) { if (!Deaf) @@ -2627,7 +2648,8 @@ struct monst *mon; } STATIC_OVL void -mayberem(seducer, obj, str) +mayberem(mon, seducer, obj, str) +struct monst *mon; const char *seducer; /* only used for alternate message */ struct obj *obj; const char *str; @@ -2636,6 +2658,10 @@ const char *str; if (!obj || !obj->owornmask) return; + /* removal of a previous item might have sent the hero elsewhere + (loss of levitation that leads to landing on a transport trap) */ + if (u.utotype || distu(mon->mx, mon->my) > 2) + return; /* being deaf overrides confirmation prompt for high charisma */ if (Deaf) { diff --git a/src/objnam.c b/src/objnam.c index 7de07963c..b44ddbf2e 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 objnam.c $NHDT-Date: 1525012618 2018/04/29 14:36:58 $ $NHDT-Branch: master $:$NHDT-Revision: 1.202 $ */ +/* NetHack 3.6 objnam.c $NHDT-Date: 1533352036 2018/08/04 03:07:16 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.206 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2011. */ /* NetHack may be freely redistributed. See license for details. */ @@ -3978,17 +3978,19 @@ struct obj *suit; { const char *suitnm, *esuitp; - if (Is_dragon_mail(suit)) - return "dragon mail"; /* dragon scale mail */ - else if (Is_dragon_scales(suit)) - return "dragon scales"; - suitnm = OBJ_NAME(objects[suit->otyp]); - esuitp = eos((char *) suitnm); - if (strlen(suitnm) > 5 && !strcmp(esuitp - 5, " mail")) - return "mail"; /* most suits fall into this category */ - else if (strlen(suitnm) > 7 && !strcmp(esuitp - 7, " jacket")) - return "jacket"; /* leather jacket */ - /* suit is lame but armor is ambiguous and body armor is absurd */ + if (suit) { + if (Is_dragon_mail(suit)) + return "dragon mail"; /* dragon scale mail */ + else if (Is_dragon_scales(suit)) + return "dragon scales"; + suitnm = OBJ_NAME(objects[suit->otyp]); + esuitp = eos((char *) suitnm); + if (strlen(suitnm) > 5 && !strcmp(esuitp - 5, " mail")) + return "mail"; /* most suits fall into this category */ + else if (strlen(suitnm) > 7 && !strcmp(esuitp - 7, " jacket")) + return "jacket"; /* leather jacket */ + } + /* "suit" is lame but "armor" is ambiguous and "body armor" is absurd */ return "suit"; } diff --git a/src/pray.c b/src/pray.c index d0cb794ae..8d4c5003d 100644 --- a/src/pray.c +++ b/src/pray.c @@ -1939,12 +1939,12 @@ doturn() pline("For some reason, %s seems to ignore you.", u_gname()); aggravate(); exercise(A_WIS, FALSE); - return 0; + return 1; } if (Inhell) { pline("Since you are in Gehennom, %s won't help you.", u_gname()); aggravate(); - return 0; + return 1; } pline("Calling upon %s, you chant an arcane formula.", u_gname()); exercise(A_WIS, TRUE); diff --git a/sys/mac/Install.mw b/sys/mac/Install.mw index 4603d52dc..ad8e95017 100644 --- a/sys/mac/Install.mw +++ b/sys/mac/Install.mw @@ -1,5 +1,7 @@ Building a PPC NetHack 3.6 with the Metrowerks compilers +Note: If you are building using any compiler for OS X, use the instructions + in sys/unix. These are old instructions for 68k builds. You must be familiar with the Metrowerks compiler and know how to construct projects. The NetHack source may come with the four pre-made projects that