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
+3
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 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 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" "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 Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
+5 -2
View File
@@ -478,8 +478,11 @@ polyself(int psflags)
} else if (!polyok(&mons[mntmp]) } else if (!polyok(&mons[mntmp])
/* Note: humans are illegal as monsters, but an /* Note: humans are illegal as monsters, but an
illegal monster forces newman(), which is what illegal monster forces newman(), which is what
we want if they specified a human.... */ we want if they specified a human.... (unless
&& !(mntmp == PM_HUMAN || your_race(&mons[mntmp]) 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.malenum
|| mntmp == g.urole.femalenum)) { || mntmp == g.urole.femalenum)) {
const char *pm_name; const char *pm_name;