From: PatR Date: Mon, 24 Dec 2018 01:25:14 +0000 (-0800) Subject: implement #H6051 - fake players resist Conflict X-Git-Tag: NetHack-3.6.2_Released~122^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f6d5862c0d384489b5ec41249802bb4831ce4e8b;p=nethack implement #H6051 - fake players resist Conflict The rationale is that since the player character resists conflict, fake players should too. [I'm not sure that I buy that. Player character is always the one *causing* conflict and it doesn't affect self. But this is simple as long as no other resistance checks are against attack-by-ring.] --- diff --git a/doc/fixes36.2 b/doc/fixes36.2 index 7be5fc556..aa0a07c87 100644 --- a/doc/fixes36.2 +++ b/doc/fixes36.2 @@ -156,9 +156,6 @@ a wand of polymorph lost its magical ability for the turn just because the much sense floating eye is classified as a flyer but flying is blocked while levitating, so don't set intrinsic flying if hero is polymorphed into one -being trapped (bear trap, web, molten or solidified lava, chained to buried - iron ball) blocks both levitation and flight (note: being stuck in a - pit ends when either of those starts so doesn't apply) change default value for the 'autodescribe' option to 'on' Elbereth hypocrisy penalty doesn't apply if attacking a monster which isn't frightened by Elbereth; normal scuffing of engravings still applies @@ -452,6 +449,11 @@ for ^X and enlightenment, display the information in a menu rather than a needed for interfaces (tty) without text popup scrollbar support; end of game disclosure of attributes remains single-forward-pass for ^X, include current state of 'autopickup' +being trapped (bear trap, web, molten or solidified lava, chained to buried + iron ball) blocks both levitation and flight (note: being stuck in a + pit ends when either of those starts so doesn't apply) +early level traps are sometimes covered by the remains of fake players +fake player characters resist Conflict NetHack Community Patches (or Variation) Included diff --git a/src/zap.c b/src/zap.c index eb61a261c..ba90e34c3 100644 --- a/src/zap.c +++ b/src/zap.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 zap.c $NHDT-Date: 1545431660 2018/12/21 22:34:20 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.303 $ */ +/* NetHack 3.6 zap.c $NHDT-Date: 1545614662 2018/12/24 01:24:22 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.304 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2013. */ /* NetHack may be freely redistributed. See license for details. */ @@ -5090,6 +5090,11 @@ int damage, tell; int resisted; int alev, dlev; + /* fake players always pass resistance test against Conflict + (this doesn't guarantee that they're never affected by it) */ + if (oclass == RING_CLASS && !damage && !tell && is_mplayer(mtmp->data)) + return 1; + /* attack level */ switch (oclass) { case WAND_CLASS: