/* 8: travel */
unsigned startingpet_mid;
int warnlevel;
- int djinni_count, ghost_count; /* potion effect tuning */
long next_attrib_check; /* next attribute check */
long stethoscope_move;
short stethoscope_movement;
* Incrementing EDITLEVEL can be used to force invalidation of old bones
* and save files.
*/
-#define EDITLEVEL 11
+#define EDITLEVEL 12
#define COPYRIGHT_BANNER_A \
"NetHack, Copyright 1985-2004"
context.no_of_wizards++;
if (context.no_of_wizards == 1 && Is_earthlevel(&u.uz))
mitem = SPE_DIG;
- } else if (mndx == PM_DJINNI) {
- context.djinni_count++;
- } else if (mndx == PM_GHOST) {
- context.ghost_count++;
- if (!(mmflags & MM_NONAME))
- mtmp = christen_monst(mtmp, rndghostname());
+ } else if (mndx == PM_GHOST && !(mmflags & MM_NONAME)) {
+ mtmp = christen_monst(mtmp, rndghostname());
} else if (mndx == PM_VLAD_THE_IMPALER) {
mitem = CANDELABRUM_OF_INVOCATION;
} else if (mndx == PM_CROESUS) {
potion_descr = OBJ_DESCR(objects[obj->otyp]);
if (potion_descr && !strcmp(potion_descr, "milky")) {
- if ( context.ghost_count < MAXMONNO &&
- !rn2(POTION_OCCUPANT_CHANCE(context.ghost_count))) {
+ if (!(mvitals[PM_GHOST].mvflags & G_GONE) &&
+ !rn2(POTION_OCCUPANT_CHANCE(mvitals[PM_GHOST].born))) {
if (!enexto(&cc, mon->mx, mon->my, &mons[PM_GHOST])) return 0;
mquaffmsg(mon, obj);
m_useup(mon, obj);
}
}
if (potion_descr && !strcmp(potion_descr, "smoky") &&
- context.djinni_count < MAXMONNO &&
- !rn2(POTION_OCCUPANT_CHANCE(context.djinni_count))) {
+ !(mvitals[PM_DJINNI].mvflags & G_GONE) &&
+ !rn2(POTION_OCCUPANT_CHANCE(mvitals[PM_DJINNI].born))) {
if (!enexto(&cc, mon->mx, mon->my, &mons[PM_DJINNI])) return 0;
mquaffmsg(mon, obj);
m_useup(mon, obj);
potion_descr = OBJ_DESCR(objects[otmp->otyp]);
if (potion_descr) {
if (!strcmp(potion_descr, "milky") &&
- context.ghost_count < MAXMONNO &&
- !rn2(POTION_OCCUPANT_CHANCE(context.ghost_count))) {
+ !(mvitals[PM_GHOST].mvflags & G_GONE) &&
+ !rn2(POTION_OCCUPANT_CHANCE(mvitals[PM_GHOST].born))) {
ghost_from_bottle();
useup(otmp);
return(1);
} else if (!strcmp(potion_descr, "smoky") &&
- context.djinni_count < MAXMONNO &&
- !rn2(POTION_OCCUPANT_CHANCE(context.djinni_count))) {
+ !(mvitals[PM_DJINNI].mvflags & G_GONE) &&
+ !rn2(POTION_OCCUPANT_CHANCE(mvitals[PM_DJINNI].born))) {
djinni_from_bottle(otmp);
useup(otmp);
return(1);