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:
nethack.allison
2004-06-15 11:38:32 +00:00
parent 87507aed42
commit c8ef9338f0
22 changed files with 98 additions and 83 deletions

View File

@@ -94,6 +94,7 @@ NEARDATA struct permonst mons[] = {
/*
* ants
*/
/* Never use M2_SHAPESHIFTER for mons[0] as long as CHAM_ORDINARY==0 */
MON("giant ant", S_ANT,
LVL(2, 18, 3, 0, 0), (G_GENO|G_SGROUP|3),
A(ATTK(AT_BITE, AD_PHYS, 1, 4),
@@ -2357,7 +2358,7 @@ struct permonst _mons2[] = {
NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK),
SIZ(WT_HUMAN, 400, 0, MS_IMITATE, MZ_HUMAN), MR_SLEEP, 0,
M1_HUMANOID|M1_OMNIVORE,
M2_NOPOLY|M2_HUMAN|M2_HOSTILE|M2_STRONG|M2_COLLECT,
M2_NOPOLY|M2_HUMAN|M2_HOSTILE|M2_STRONG|M2_COLLECT|M2_SHAPESHIFTER,
M3_INFRAVISIBLE, HI_DOMESTIC),
MON("nurse", S_HUMAN,
LVL(11, 6, 0, 0, 0), (G_GENO|3),
@@ -2791,7 +2792,7 @@ struct permonst _mons2[] = {
A(ATTK(AT_WEAP, AD_PHYS, 2, 6), ATTK(AT_WEAP, AD_PHYS, 2, 6),
NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK),
SIZ(1500, 400, 0, MS_CUSS, MZ_HUMAN), MR_STONE, 0,
M1_HUMANOID, M2_NOPOLY|M2_STALK|M2_STRONG|M2_COLLECT,
M1_HUMANOID, M2_NOPOLY|M2_STALK|M2_STRONG|M2_COLLECT|M2_SHAPESHIFTER,
M3_INFRAVISIBLE|M3_INFRAVISION, CLR_GRAY),
/*
* sea monsters
@@ -2883,7 +2884,8 @@ struct permonst _mons2[] = {
A(ATTK(AT_BITE, AD_PHYS, 4, 2),
NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK),
SIZ(100, 100, 0, MS_SILENT, MZ_TINY), 0, 0,
M1_ANIMAL|M1_NOHANDS|M1_CARNIVORE, M2_NOPOLY|M2_HOSTILE, 0, CLR_BROWN),
M1_ANIMAL|M1_NOHANDS|M1_CARNIVORE, M2_NOPOLY|M2_HOSTILE|M2_SHAPESHIFTER,
0, CLR_BROWN),
MON("crocodile", S_LIZARD,
LVL(6, 9, 5, 0, 0), (G_GENO|1),
A(ATTK(AT_BITE, AD_PHYS, 4, 2), ATTK(AT_CLAW, AD_PHYS, 1,12),