attempting to polymorph into a unique monster

Noticed while testing revised "the" handling and trying to trigger
"you can't polymorph into [the] Oracle", if the character was human
it would turn into a new man or woman instead of having the unique
form be rejected.
This commit is contained in:
PatR
2021-11-24 00:46:44 -08:00
parent b2d4b77d3a
commit f0f9701a37
2 changed files with 8 additions and 2 deletions

View File

@@ -688,6 +688,9 @@ if hero is wearing an amulet of magical breathing and polymorphs into a fish
or sea monster, don't lose health for turns spent out of water
fix up some "the" handling for monsters whose type name is upper case to avoid
"Uruk-hai is healthy for a statue", "You can't polymorph into Oracle"
controlled polymorph would turn hero into new man or woman if player asked to
become a unique monster of the same race (so usually human) instead of
being told that polymorphing into the specified form wasn't allowed
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository

View File

@@ -478,8 +478,11 @@ polyself(int psflags)
} else if (!polyok(&mons[mntmp])
/* Note: humans are illegal as monsters, but an
illegal monster forces newman(), which is what
we want if they specified a human.... */
&& !(mntmp == PM_HUMAN || your_race(&mons[mntmp])
we want if they specified a human.... (unless
they specified a unique monster) */
&& !(mntmp == PM_HUMAN
|| (your_race(&mons[mntmp])
&& (mons[mntmp].geno & G_UNIQ) == 0)
|| mntmp == g.urole.malenum
|| mntmp == g.urole.femalenum)) {
const char *pm_name;