djinn/ghosts from potions
<Someone> wrote: >It seems silly to have two flags being used for counting djinn and >ghosts, now that there's mvitals.born... This does not break save and bones compatibility in the 3.4.x branch, it changes the code, but leaves the obsolete fields in flags.
This commit is contained in:
@@ -80,7 +80,6 @@ struct context_info {
|
|||||||
/* 8: travel */
|
/* 8: travel */
|
||||||
unsigned startingpet_mid;
|
unsigned startingpet_mid;
|
||||||
int warnlevel;
|
int warnlevel;
|
||||||
int djinni_count, ghost_count; /* potion effect tuning */
|
|
||||||
long next_attrib_check; /* next attribute check */
|
long next_attrib_check; /* next attribute check */
|
||||||
long stethoscope_move;
|
long stethoscope_move;
|
||||||
short stethoscope_movement;
|
short stethoscope_movement;
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
* Incrementing EDITLEVEL can be used to force invalidation of old bones
|
* Incrementing EDITLEVEL can be used to force invalidation of old bones
|
||||||
* and save files.
|
* and save files.
|
||||||
*/
|
*/
|
||||||
#define EDITLEVEL 11
|
#define EDITLEVEL 12
|
||||||
|
|
||||||
#define COPYRIGHT_BANNER_A \
|
#define COPYRIGHT_BANNER_A \
|
||||||
"NetHack, Copyright 1985-2004"
|
"NetHack, Copyright 1985-2004"
|
||||||
|
|||||||
@@ -1019,12 +1019,8 @@ register int mmflags;
|
|||||||
context.no_of_wizards++;
|
context.no_of_wizards++;
|
||||||
if (context.no_of_wizards == 1 && Is_earthlevel(&u.uz))
|
if (context.no_of_wizards == 1 && Is_earthlevel(&u.uz))
|
||||||
mitem = SPE_DIG;
|
mitem = SPE_DIG;
|
||||||
} else if (mndx == PM_DJINNI) {
|
} else if (mndx == PM_GHOST && !(mmflags & MM_NONAME)) {
|
||||||
context.djinni_count++;
|
mtmp = christen_monst(mtmp, rndghostname());
|
||||||
} else if (mndx == PM_GHOST) {
|
|
||||||
context.ghost_count++;
|
|
||||||
if (!(mmflags & MM_NONAME))
|
|
||||||
mtmp = christen_monst(mtmp, rndghostname());
|
|
||||||
} else if (mndx == PM_VLAD_THE_IMPALER) {
|
} else if (mndx == PM_VLAD_THE_IMPALER) {
|
||||||
mitem = CANDELABRUM_OF_INVOCATION;
|
mitem = CANDELABRUM_OF_INVOCATION;
|
||||||
} else if (mndx == PM_CROESUS) {
|
} else if (mndx == PM_CROESUS) {
|
||||||
|
|||||||
@@ -72,8 +72,8 @@ struct obj *obj;
|
|||||||
|
|
||||||
potion_descr = OBJ_DESCR(objects[obj->otyp]);
|
potion_descr = OBJ_DESCR(objects[obj->otyp]);
|
||||||
if (potion_descr && !strcmp(potion_descr, "milky")) {
|
if (potion_descr && !strcmp(potion_descr, "milky")) {
|
||||||
if ( context.ghost_count < MAXMONNO &&
|
if (!(mvitals[PM_GHOST].mvflags & G_GONE) &&
|
||||||
!rn2(POTION_OCCUPANT_CHANCE(context.ghost_count))) {
|
!rn2(POTION_OCCUPANT_CHANCE(mvitals[PM_GHOST].born))) {
|
||||||
if (!enexto(&cc, mon->mx, mon->my, &mons[PM_GHOST])) return 0;
|
if (!enexto(&cc, mon->mx, mon->my, &mons[PM_GHOST])) return 0;
|
||||||
mquaffmsg(mon, obj);
|
mquaffmsg(mon, obj);
|
||||||
m_useup(mon, obj);
|
m_useup(mon, obj);
|
||||||
@@ -95,8 +95,8 @@ struct obj *obj;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (potion_descr && !strcmp(potion_descr, "smoky") &&
|
if (potion_descr && !strcmp(potion_descr, "smoky") &&
|
||||||
context.djinni_count < MAXMONNO &&
|
!(mvitals[PM_DJINNI].mvflags & G_GONE) &&
|
||||||
!rn2(POTION_OCCUPANT_CHANCE(context.djinni_count))) {
|
!rn2(POTION_OCCUPANT_CHANCE(mvitals[PM_DJINNI].born))) {
|
||||||
if (!enexto(&cc, mon->mx, mon->my, &mons[PM_DJINNI])) return 0;
|
if (!enexto(&cc, mon->mx, mon->my, &mons[PM_DJINNI])) return 0;
|
||||||
mquaffmsg(mon, obj);
|
mquaffmsg(mon, obj);
|
||||||
m_useup(mon, obj);
|
m_useup(mon, obj);
|
||||||
|
|||||||
@@ -375,14 +375,14 @@ dodrink()
|
|||||||
potion_descr = OBJ_DESCR(objects[otmp->otyp]);
|
potion_descr = OBJ_DESCR(objects[otmp->otyp]);
|
||||||
if (potion_descr) {
|
if (potion_descr) {
|
||||||
if (!strcmp(potion_descr, "milky") &&
|
if (!strcmp(potion_descr, "milky") &&
|
||||||
context.ghost_count < MAXMONNO &&
|
!(mvitals[PM_GHOST].mvflags & G_GONE) &&
|
||||||
!rn2(POTION_OCCUPANT_CHANCE(context.ghost_count))) {
|
!rn2(POTION_OCCUPANT_CHANCE(mvitals[PM_GHOST].born))) {
|
||||||
ghost_from_bottle();
|
ghost_from_bottle();
|
||||||
useup(otmp);
|
useup(otmp);
|
||||||
return(1);
|
return(1);
|
||||||
} else if (!strcmp(potion_descr, "smoky") &&
|
} else if (!strcmp(potion_descr, "smoky") &&
|
||||||
context.djinni_count < MAXMONNO &&
|
!(mvitals[PM_DJINNI].mvflags & G_GONE) &&
|
||||||
!rn2(POTION_OCCUPANT_CHANCE(context.djinni_count))) {
|
!rn2(POTION_OCCUPANT_CHANCE(mvitals[PM_DJINNI].born))) {
|
||||||
djinni_from_bottle(otmp);
|
djinni_from_bottle(otmp);
|
||||||
useup(otmp);
|
useup(otmp);
|
||||||
return(1);
|
return(1);
|
||||||
|
|||||||
Reference in New Issue
Block a user