fix #H7157 - cancel self as clay golem
The report was "doesn't kill even if unchanging", but it does cause rehumanize() when not Unchanging, the same thing that happens when you die due to loss of hit points. But losing the activating word(s) and then having Unchanging retain the clay golem shape does seem wrong, so make losing the word(s) while being unable to revert to normal form be fatal. Poly'd hero (without Unchanging) reverts to normal when cancelled, so make monsters behave that way. Previously, only werecritters in beast form were forced to human form. This changes cancellation to make shapechangers and hiding mimics take on normal form too. Cancelled shapechangers now behave as if the hero has the Protection_from_shape_changes attribute and will be unable to change their shape (after having been forced into normal form). Getting polymorphed in any fashion uncancels them prior to giving new shape. [There may be some newcham() situations that should be disallowed when cancelled rather proceeding and consequently uncancelling.]
This commit is contained in:
10
src/mon.c
10
src/mon.c
@@ -2900,7 +2900,8 @@ restartcham()
|
||||
for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
|
||||
if (DEADMONSTER(mtmp))
|
||||
continue;
|
||||
mtmp->cham = pm_to_cham(monsndx(mtmp->data));
|
||||
if (!mtmp->mcan)
|
||||
mtmp->cham = pm_to_cham(monsndx(mtmp->data));
|
||||
if (mtmp->data->mlet == S_MIMIC && mtmp->msleeping
|
||||
&& cansee(mtmp->mx, mtmp->my)) {
|
||||
set_mimic_sym(mtmp);
|
||||
@@ -3417,6 +3418,13 @@ boolean msg; /* "The oldmon turns into a newmon!" */
|
||||
anomalous extinction feedback during final disclsoure */
|
||||
if (mbirth_limit(monsndx(olddata)) < MAXMONNO)
|
||||
return 0;
|
||||
/* cancelled shapechangers become uncancelled prior
|
||||
to being given a new shape */
|
||||
if (mtmp->mcan && !Protection_from_shape_changers) {
|
||||
mtmp->cham = pm_to_cham(monsndx(mtmp->data));
|
||||
if (mtmp->cham != NON_PM)
|
||||
mtmp->mcan = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (msg) {
|
||||
|
||||
Reference in New Issue
Block a user