Skip to content

Commit

Permalink
When wearing / removing a helm of opposite alignment, set player's al…
Browse files Browse the repository at this point in the history
…ignment to -1 (consistent with what happens at the beginning of a conversion-by-altar process). Fixes C343-343.
  • Loading branch information
sgrunt committed Apr 20, 2012
1 parent 0be5234 commit fbf8859
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/do_wear.c
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,7 @@ Helmet_on(VOID_ARGS)
if (u.ualign.type == A_NEUTRAL)
u.ualign.type = rn2(2) ? A_CHAOTIC : A_LAWFUL;
else u.ualign.type = -(u.ualign.type);
u.ualign.record = -1; /* consistent with altar conversion */
u.ublessed = 0; /* lose your god's protection */
/* makeknown(uarmh->otyp); -- moved below, after xname() */
/*FALLTHRU*/
Expand Down Expand Up @@ -582,6 +583,7 @@ Helmet_off(VOID_ARGS)
break;
case HELM_OF_OPPOSITE_ALIGNMENT:
u.ualign.type = u.ualignbase[A_CURRENT];
u.ualign.record = -1; /* consistent with altar conversion */
u.ublessed = 0; /* lose the other god's protection */
flags.botl = 1;
break;
Expand Down

0 comments on commit fbf8859

Please sign in to comment.