shapeshifting on rogue level

Limit vampire shapeshifting on rogue level to vampire bats (only
choice represented by uppercase letter) and have other shapeshifting
try for uppercase.  The latter isn't rigorous because shapeshifters
(chameleon=':', doppelganger='@', sandestin='&') aren't uppercase
themselves, so won't be created there under ordinary circumstances.
It applies to the "summon nasties" monster spell and post-invocation/
post-Wizard's-death harassment effect too.
This commit is contained in:
PatR
2015-06-04 15:31:25 -07:00
parent 2de17b059c
commit def2549592
3 changed files with 47 additions and 22 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 wizard.c $NHDT-Date: 1432512766 2015/05/25 00:12:46 $ $NHDT-Branch: master $:$NHDT-Revision: 1.37 $ */
/* NetHack 3.6 wizard.c $NHDT-Date: 1433457074 2015/06/04 22:31:14 $ $NHDT-Branch: master $:$NHDT-Revision: 1.38 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -428,9 +428,19 @@ clonewiz()
int
pick_nasty()
{
int res = nasties[rn2(SIZE(nasties))];
/* To do? Possibly should filter for appropriate forms when
in the elemental planes or surrounded by water or lava. */
return nasties[rn2(SIZE(nasties))];
* in the elemental planes or surrounded by water or lava.
*
* We want monsters represented by uppercase on rogue level,
* but we don't try very hard.
*/
if (Is_rogue_level(&u.uz)
&& !('A' <= mons[res].mlet && mons[res].mlet <= 'Z'))
res = nasties[rn2(SIZE(nasties))];
return res;
}
/* create some nasty monsters, aligned or neutral with the caster */