diff --git a/doc/fixes37.0 b/doc/fixes37.0 index ec27be6e5..175c0ee9b 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -920,6 +920,9 @@ unpaid shop-owned glob that shrank to nothing had weight 0 which triggered billing, the empty weight was shown to player if 'wizweight' was On if 'showrace' was On and invisible hero couldn't see invisible so didn't see self, the color of wharever could be seen underneath changed to white +in wizard mode, a poly'd priest/priestess attempting to polymorph into priest + or priestess in order to rehumanize became a new man or woman instead + because "priest" matched "aligned cleric" rather than the role monster curses: 'msg_window' option wasn't functional for curses unless the binary also included tty support diff --git a/src/polyself.c b/src/polyself.c index e3c8925b0..38f9624c5 100644 --- a/src/polyself.c +++ b/src/polyself.c @@ -397,7 +397,7 @@ newman(void) void polyself(int psflags) { - char buf[BUFSZ] = DUMMY; + char buf[BUFSZ]; int old_light, new_light, mntmp, class, tryct, gvariant = NEUTRAL; boolean forcecontrol = (psflags == 1), monsterpoly = (psflags == 2), @@ -434,6 +434,7 @@ polyself(int psflags) goto do_vampyr; if (controllable_poly || forcecontrol) { + buf[0] = '\0'; tryct = 5; do { mntmp = NON_PM; @@ -467,7 +468,14 @@ polyself(int psflags) pline("I've never heard of such monsters."); else You_cant("polymorph into any of those."); - } else if (wizard && Upolyd && mntmp == u.umonster) { + } else if (wizard && Upolyd + && (mntmp == u.umonster + /* "priest" and "priestess" match the monster + rather than the role; override that unless + the text explicitly contains "aligned" */ + || (u.umonster == PM_CLERIC + && mntmp == PM_ALIGNED_CLERIC + && !strstri(buf, "aligned")))) { /* in wizard mode, picking own role while poly'd reverts to normal without newman()'s chance of level or sex change */ rehumanize();