theme room vampire fix
From a reddit thread: a 'mausoleum' theme room picked a vampire for its occupant and applied the wait-for-you strategy to it. Hero's ESP or monster detection showed a meditating vampire bat. Change monster creation by the special level loader (which also handles theme rooms) to force such a creature into its normal vampire form. That revealed an older bug which wouldn't have been exercized prior to theme rooms: a meditating vampire could and would shape change without ceasing meditation. Make it not shape change rather come out of its trance.
This commit is contained in:
@@ -4476,7 +4476,7 @@ decide_to_shapeshift(struct monst *mon, int shiftflags)
|
||||
/* regular shapeshifter */
|
||||
if (!rn2(6))
|
||||
dochng = TRUE;
|
||||
} else {
|
||||
} else if (!(mon->mstrategy & STRAT_WAITFORU)) {
|
||||
/* The vampire has to be in good health (mhp) to maintain
|
||||
* its shifted form.
|
||||
*
|
||||
|
||||
@@ -2133,6 +2133,11 @@ create_monster(monster *m, struct mkroom *croom)
|
||||
}
|
||||
if (m->waiting) {
|
||||
mtmp->mstrategy |= STRAT_WAITFORU;
|
||||
/* if this is a vampire that got created already shifted into
|
||||
bat/fog/wolf form and the special level or theme room didn't
|
||||
explicitly request that, shift back to vampire */
|
||||
if (vampshifted(mtmp) && m->appear != M_AP_MONSTER)
|
||||
(void) newcham(mtmp, &mons[mtmp->cham], NO_NC_FLAGS);
|
||||
}
|
||||
if (m->has_invent) {
|
||||
discard_minvent(mtmp, TRUE);
|
||||
|
||||
Reference in New Issue
Block a user