]> granicus.if.org Git - nethack/commitdiff
cancellation, polymorphed and unchanging
authorcohrs <cohrs>
Sun, 7 Jul 2002 23:25:43 +0000 (23:25 +0000)
committercohrs <cohrs>
Sun, 7 Jul 2002 23:25:43 +0000 (23:25 +0000)
<Someone> reported that a wand of cancellation would ignore Unchanging,
noting the case of cancelling yourself while polymorphed into a stone golem.
He thought the wand should win, killing the player.  I felt otherwise,
since the case he specified passes the flag allow_cancel_kill == FALSE.

doc/fixes34.1
src/eat.c
src/zap.c

index 012ed5b3da4c0b887da3f1fc0665fb478437c659..ca69060638c7118207a1fd4f068a03825b98d954 100644 (file)
@@ -148,6 +148,7 @@ knights should be able to avenge attacks from covetous monsters
 eating various rotten food items would not break vegan/vegetarian conduct
 unaligned special levels should inherit alignment from the dungeon
 Samurai quest was missing several doors
+Cancelled while polymorphed and Unchanging should provide feedback
 
 
 Platform- and/or Interface-Specific Fixes
index b54cd5e03f0a68b7e5e8926026b53a7ce8ec577c..611d2aacd465d807e747a92c444040add01891d5 100644 (file)
--- a/src/eat.c
+++ b/src/eat.c
@@ -1496,7 +1496,8 @@ struct obj *otmp;
            case AMULET_OF_RESTFUL_SLEEP: /* another bad idea! */
                HSleeping = FROMOUTSIDE | rnd(100);
                break;
-               case RIN_SUSTAIN_ABILITY:
+           case RIN_SUSTAIN_ABILITY:
+           case AMULET_OF_UNCHANGING:
            case AMULET_OF_LIFE_SAVING:
            case AMULET_OF_REFLECTION: /* nice try */
            /* can't eat Amulet of Yendor or fakes,
index 421b7b6e4024923404a75f425ed0046cc55576f2..6ddcfca1f3b9d30bab7c0f4c08b76e2538210ea0 100644 (file)
--- a/src/zap.c
+++ b/src/zap.c
@@ -2213,7 +2213,11 @@ boolean                  youattack, allow_cancel_kill, self_cancel;
            if (Upolyd) {
                if ((u.umonnum == PM_CLAY_GOLEM) && !Blind)
                    pline(writing_vanishes, your);
-               rehumanize();
+
+               if (Unchanging)
+                   Your("amulet grows hot for a moment, then cools.");
+               else
+                   rehumanize();
            }
        } else {
            mdef->mcan = TRUE;