]> granicus.if.org Git - nethack/commitdiff
Make HoOA alignment change depend on object ID
authorPasi Kallinen <paxed@alt.org>
Sat, 21 Mar 2015 11:40:07 +0000 (13:40 +0200)
committerPasi Kallinen <paxed@alt.org>
Sat, 21 Mar 2015 11:40:19 +0000 (13:40 +0200)
The same Helm of opposite alignment will always make
the same alignment change for neutrals.

src/do_wear.c

index 9925ceaf0cde83425821255756251d8e59628abf..39d3b6c3f2e115cd728c007c2c2bc11ddfa6aa36 100644 (file)
@@ -391,7 +391,7 @@ Helmet_on(VOID_ARGS)
                   properties, including levitation; uarmh could get
                   dropped or destroyed here */
                uchangealign((u.ualign.type != A_NEUTRAL) ? -u.ualign.type :
-                               rn2(2) ? A_CHAOTIC : A_LAWFUL, 1);
+                            (uarmh->o_id % 2) ? A_CHAOTIC : A_LAWFUL, 1);
             /* makeknown(uarmh->otyp);   -- moved below, after xname() */
                /*FALLTHRU*/
        case DUNCE_CAP: