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.
This commit is contained in:
@@ -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
|
||||
|
||||
20
src/mhitu.c
20
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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user