fix github issue #1038 - vampshifted Vlad in bones

Reported by vultur-cadens:  if Vlad made it to a level which allowed
bones and was in wolf or bat or cloud form when the hero died, he
would not be excluded from the bones file as intended.  When those
bones got loaded in another game, Vlad would become flagged as
extinct.  If that happened before his own level was reached, he
wouldn't be created when hero arrived thus there would be no way to
acquire the Candelabrum of Invocation.  (Even if his vampshifted
form had been carrying it, it wouldn't be present in the bones data
because it would have been converted into candles.)

Fixes #1038
This commit is contained in:
PatR
2023-05-28 15:17:51 -07:00
parent 6dac3c2183
commit 17d867d084
2 changed files with 10 additions and 4 deletions

View File

@@ -1037,11 +1037,16 @@ improve consistency between applying a key and explicitly opening a door:
isn't any door in the direction supplied, you're told "no door" and
time elapses if you discover the non-door's terrain type but doesn't
if you already knew the type there
if a bones file contains a doppelganger imitating a unique monster, a game
that loads those bones will end up with that monster counted as
having already been created so it won't be created if/when the time
for that arrives (the doppelganger will change its shape normally,
if a bones file contained a doppelganger imitating a unique monster, a game
that loaded those bones would end up with that monster counted as
having already been created so it wouldn't be created when the time
for that arrived (the doppelganger would change its shape normally,
not be stuck in the unique monster's form)
if Vlad was lured to a level which allowed bones, he could be present in a
bones file for that level if he was in wolf/bat/cloud form at the
time hero died; getting those bones in another game would flag him
as extinct; if that occurred before entering his level he would not
be created there, leaving no way for hero to acquire the Candelabrum
when mounted hero got hit by an explosion, hero and steed shared resistances
removing an engraving from frost (ie, written with fingers on ice) reported
"you wipe out the message that was written in the _dust_"

View File

@@ -391,6 +391,7 @@ remove_mon_from_bones(struct monst *mtmp)
if (mtmp->iswiz || mptr == &mons[PM_MEDUSA]
|| mptr->msound == MS_NEMESIS || mptr->msound == MS_LEADER
|| mptr == &mons[PM_VLAD_THE_IMPALER]
|| mtmp->cham == PM_VLAD_THE_IMPALER /* in case he's vampshifted */
|| (mptr == &mons[PM_ORACLE] && !fixuporacle(mtmp)))
mongone(mtmp);
}