]> granicus.if.org Git - nethack/commitdiff
Merge branch 'NetHack-3.6'
authornhmall <nhmall@nethack.org>
Thu, 6 Jun 2019 12:09:18 +0000 (08:09 -0400)
committernhmall <nhmall@nethack.org>
Thu, 6 Jun 2019 12:09:18 +0000 (08:09 -0400)
1  2 
src/pray.c

diff --cc src/pray.c
index f1e959052781ef20757d174124839357cc9ffe63,1999f888fd3fc2605dbe42546b60ebbb24682e5e..0be26a822ea7a59200be7368a60dbc8f1e38d2e5
@@@ -1948,11 -1954,22 +1949,22 @@@ doturn(
          return 0;
      }
      u.uconduct.gnostic++;
+     Gname = halu_gname(u.ualign.type);
+     /* [What about needing free hands (does #turn involve any gesturing)?] */
+     if (!can_chant(&youmonst)) {
+         /* "evilness": "demons and undead" is too verbose and too precise */
+         You("are %s upon %s to turn aside evilness.",
+             Strangled ? "not able to call" : "incapable of calling", Gname);
+         /* violates agnosticism due to intent; conduct tracking is not
+            supposed to affect play but we make an exception here:  use a
+            move if this is the first time agnostic conduct has been broken */
+         return (u.uconduct.gnostic == 1);
+     }
      if ((u.ualign.type != A_CHAOTIC
 -         && (is_demon(youmonst.data) || is_undead(youmonst.data)))
 +         && (is_demon(g.youmonst.data) || is_undead(g.youmonst.data)))
          || u.ugangr > 6) { /* "Die, mortal!" */
-         pline("For some reason, %s seems to ignore you.", u_gname());
+         pline("For some reason, %s seems to ignore you.", Gname);
          aggravate();
          exercise(A_WIS, FALSE);
          return 1;
              }
          }
      }
+     /*
+      * TODO?
+      *  Shouldn't there be some detrimental effect on self for
+      *  successful #turn while in demon or undead form?
+      *
+      *  Paralysis duration probably ought to be based on the strengh
+      *  of turned creatures rather than on turner's level.
+      *  Why doesn't this honor Free_action?  [Because being able to
+      *  repeat #turn every turn would be too powerful.]
+      */
      nomul(-(5 - ((u.ulevel - 1) / 6))); /* -5 .. -1 */
 -    multi_reason = "trying to turn the monsters";
 -    nomovemsg = You_can_move_again;
 +    g.multi_reason = "trying to turn the monsters";
 +    g.nomovemsg = You_can_move_again;
      return 1;
  }