fix github issue #352 - geno'd monsters in quest

The recent change to mkclass() was letting genocided monsters be
created when role-specific monsters were chosen for quest levels.

makemon(Null) -> rndmonst() -> qt_montype() -> mkclass() -> mk_gen_ok()
was accepting members of the quest-specified class even when they
should have been rejected.  I'm still not sure why the revised bit
manipulation didn't work as intended; the re-revised code does.

G_IGNORE was a bug waiting to happen since it gets passed to
mkclass() as a mons[].geno flag but is used to control the use of
mvitals[].mvflags values.  It's still being misused but at least
it doesn't conflict with any of the other flags now.

Fixes #352
This commit is contained in:
PatR
2020-05-30 16:00:29 -07:00
parent e9f53ab7f6
commit 8c1120261a
3 changed files with 30 additions and 19 deletions

View File

@@ -1,4 +1,4 @@
$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.226 $ $NHDT-Date: 1590870784 2020/05/30 20:33:04 $
$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.227 $ $NHDT-Date: 1590879610 2020/05/30 23:00:10 $
General Fixes and Modified Features
-----------------------------------
@@ -251,6 +251,7 @@ fix new "objects[0] class #1 not in order!" panic if plain 'char' is unsigned
only generate shop items on solid floor squares
avoid gcc 10 warning by removing duplicate definition of 'head_engr'
if a monster removed a corpse from an ice box, the corpse would never rot away
monster creation on quest levels could make genocided creatures
tty: redraw unexplored locations as S_unexplored rather than <space> after
map has been partially overwritten by popup menu or text display