From 0dc85b93b4cff25a0d6db2d3239b654d66574b1f Mon Sep 17 00:00:00 2001 From: PatR Date: Tue, 30 Apr 2019 11:35:06 -0700 Subject: [PATCH 1/2] fix github issue #188 - #chat to succubus/incubus Fixes #188 The change to fix setting SEDUCE=0 in sysconf broke chatting with seductive demons by unintentionally changing the way Null attack argument was handled. It's still handled differently than it used to be, but I think this difference is correct. --- doc/fixes36.2 | 3 ++- src/mhitu.c | 20 ++++++++++++-------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/doc/fixes36.2 b/doc/fixes36.2 index 2a64a966c..610c60161 100644 --- a/doc/fixes36.2 +++ b/doc/fixes36.2 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.311 $ $NHDT-Date: 1556497911 2019/04/29 00:31:51 $ +$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.312 $ $NHDT-Date: 1556649298 2019/04/30 18:34:58 $ This fixes36.2 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.1 in April 2018. Please note, however, @@ -495,6 +495,7 @@ using 'O' to set status hilites for any status condition (Blind, &c) and when u.uhp==-1 became a flag to suppress status updating, if game ended when hero died with exactly -1 HP, status would be blank during disclosure mimic mimicking a shop item didn't show any shop price for whatis and glance +the SEDUCE=0 fix broke #chat to succubi/incubi tty: turn off an optimization that is the suspected cause of Windows reported partial status lines following level changes tty: ensure that current status fields are always copied to prior status diff --git a/src/mhitu.c b/src/mhitu.c index fb44227c1..db9245803 100644 --- a/src/mhitu.c +++ b/src/mhitu.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 mhitu.c $NHDT-Date: 1555720104 2019/04/20 00:28:24 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.162 $ */ +/* NetHack 3.6 mhitu.c $NHDT-Date: 1556649298 2019/04/30 18:34:58 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.164 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ @@ -156,7 +156,7 @@ struct attack *mattk; /* maybe it's attacking an image around the corner? */ compat = ((mattk->adtyp == AD_SEDU || mattk->adtyp == AD_SSEX) - ? could_seduce(mtmp, &youmonst, (struct attack *) 0) : 0); + ? could_seduce(mtmp, &youmonst, mattk) : 0); Monst_name = Monnam(mtmp); if (!mtmp->mcansee || (Invis && !perceives(mtmp->data))) { @@ -545,8 +545,7 @@ register struct monst *mtmp; } /* non-mimic hero might be mimicking an object after eating m corpse */ - if (U_AP_TYPE == M_AP_OBJECT && !range2 && foundyou - && !u.uswallow) { + if (U_AP_TYPE == M_AP_OBJECT && !range2 && foundyou && !u.uswallow) { if (!canspotmon(mtmp)) map_invisible(mtmp->mx, mtmp->my); if (!youseeit) @@ -642,9 +641,9 @@ register struct monst *mtmp; if (u.uinvulnerable) { /* monsters won't attack you */ - if (mtmp == u.ustuck) + if (mtmp == u.ustuck) { pline("%s loosens its grip slightly.", Monnam(mtmp)); - else if (!range2) { + } else if (!range2) { if (youseeit || sensemon(mtmp)) pline("%s starts to attack you, but pulls back.", Monnam(mtmp)); @@ -2374,12 +2373,12 @@ int n; int could_seduce(magr, mdef, mattk) struct monst *magr, *mdef; -struct attack *mattk; +struct attack *mattk; /* non-Null: current attack; Null: general capability */ { struct permonst *pagr; boolean agrinvis, defperc; xchar genagr, gendef; - int adtyp = mattk ? mattk->adtyp : AD_PHYS; + int adtyp; if (is_animal(magr->data)) return 0; @@ -2399,6 +2398,11 @@ struct attack *mattk; defperc = perceives(mdef->data); gendef = gender(mdef); } + + adtyp = mattk ? mattk->adtyp + : dmgtype(pagr, AD_SSEX) ? AD_SSEX + : dmgtype(pagr, AD_SEDU) ? AD_SEDU + : AD_PHYS; if (adtyp == AD_SSEX && !SYSOPT_SEDUCE) adtyp = AD_SEDU; From f303fd28722b508354234fd1e2fb57aa0f6afd8b Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Wed, 1 May 2019 13:38:53 +0300 Subject: [PATCH 2/2] Database fixes Merge barbed devil entry to already existing one. Replace spaces in the beginning of lines with tabs. --- dat/data.base | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/dat/data.base b/dat/data.base index 410912710..4a964c905 100644 --- a/dat/data.base +++ b/dat/data.base @@ -424,9 +424,6 @@ barbarian things. He excelled them even in lithe economy of motion. They were wolves, but he was a tiger. [ Conan - The Warrior, by Robert E. Howard ] -barbed devil - Barbed devils lack any real special abilities, though they - are quite difficult to kill. # takes "bat or bird" when specifying 'B' ~*combat ~*wombat @@ -894,19 +891,19 @@ tiamat citrine* A pale yellow variety of crystalline quartz resembling topaz. clay golem - It was a warm spring night when a fist knocked at the door so - hard that the hinges bent. - A man opened it and peered out into the street. There was - mist coming off the river and it was a cloudy night. He might - as well have tried to see through white velvet. - But he thought afterwards that there had been shapes out - there, just beyond the light spilling out into the road. A - lot of shapes, watching him carefully. He thought maybe - there'd been very faint points of light... - There was no mistaking the shape right in front of him, - though. It was big and dark red and looked like a child's - clay model of a man. Its eyes were two embers. - [ Feet of Clay, by Terry Pratchett ] + It was a warm spring night when a fist knocked at the door so + hard that the hinges bent. + A man opened it and peered out into the street. There was + mist coming off the river and it was a cloudy night. He might + as well have tried to see through white velvet. + But he thought afterwards that there had been shapes out + there, just beyond the light spilling out into the road. A + lot of shapes, watching him carefully. He thought maybe + there'd been very faint points of light... + There was no mistaking the shape right in front of him, + though. It was big and dark red and looked like a child's + clay model of a man. Its eyes were two embers. + [ Feet of Clay, by Terry Pratchett ] cleaver Hither came Conan, the Cimmerian, black-haired, sullen-eyed, sword in hand, a thief, a reaver, a slayer, with gigantic