cham changes (trunk only)
This is a foundation patch for patches to follow. - use a full short index for mon->cham field. - The current system of providing CHAM_XXX values was limited to the 3 bits allocated in the bitfield and invalidated save/bones if the field was expanded. - The current system didn't provide an easy backwards change if multiple monster types wanted to use the bit, there was a one to one mapping: For instance, if you wanted a CHAM_VAMPIRE, and you wanted vampires, vampire lords, and Vlad to use it, you would have to have CHAM_VAMPIRE, CHAM_VAMPIRE_LORD, and CHAM_VLAD defined to achieve that with the one-to-one backward mapping. - This new way just uses the mon[] index in the mon->cham field and eliminates the need for CHAM_XXX (CHAM_ORDINARY is still used). - no longer requires the cham_to_pm mappings
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)zap.c 3.4 2003/11/26 */
|
||||
/* SCCS Id: @(#)zap.c 3.4 2004/06/12 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -634,7 +634,7 @@ register struct obj *obj;
|
||||
mtmp = makemon(&mons[montype], x, y,
|
||||
NO_MINVENT | MM_NOWAIT);
|
||||
if (mtmp) {
|
||||
if (mtmp->cham == CHAM_DOPPELGANGER) {
|
||||
if (mtmp->cham == PM_DOPPELGANGER) {
|
||||
/* change shape to match the corpse */
|
||||
(void) newcham(mtmp, mptr, FALSE, FALSE);
|
||||
} else if (mtmp->data->mlet == S_ZOMBIE) {
|
||||
@@ -1983,7 +1983,7 @@ boolean ordinary;
|
||||
makeknown(WAN_POLYMORPH);
|
||||
case SPE_POLYMORPH:
|
||||
if (!Unchanging)
|
||||
polyself(FALSE);
|
||||
polyself(0);
|
||||
break;
|
||||
|
||||
case WAN_CANCELLATION:
|
||||
|
||||
Reference in New Issue
Block a user