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:
@@ -1019,12 +1019,8 @@ register int mmflags;
|
||||
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) {
|
||||
|
||||
@@ -72,8 +72,8 @@ struct obj *obj;
|
||||
|
||||
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);
|
||||
@@ -95,8 +95,8 @@ struct obj *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);
|
||||
|
||||
@@ -375,14 +375,14 @@ dodrink()
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user