]> granicus.if.org Git - nethack/commitdiff
implement #H6051 - fake players resist Conflict
authorPatR <rankin@nethack.org>
Mon, 24 Dec 2018 01:25:14 +0000 (17:25 -0800)
committerPatR <rankin@nethack.org>
Mon, 24 Dec 2018 01:25:14 +0000 (17:25 -0800)
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.]

doc/fixes36.2
src/zap.c

index 7be5fc55622928a974d92e24bfc7177462682a9e..aa0a07c87fc3111bf3c1a35135ec8478b3482d2c 100644 (file)
@@ -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
index eb61a261ccc08157cabebefeee311a8b09c088c5..ba90e34c37eb5d8a4c22218c48ff58a025c41c0b 100644 (file)
--- 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: