Unify finding a queen bee

This commit is contained in:
Pasi Kallinen
2020-02-08 17:35:52 +02:00
parent c585c65042
commit 0323eecbfe
3 changed files with 20 additions and 17 deletions

View File

@@ -755,17 +755,10 @@ register struct obj *obj;
return POISON;
if (obj->otyp == LUMP_OF_ROYAL_JELLY
&& mon->data == &mons[PM_KILLER_BEE]) {
struct monst *mtmp = 0;
struct monst *mtmp = find_pmmonst(PM_QUEEN_BEE);
/* if there's a queen bee on the level, don't eat royal jelly;
if there isn't, do eat it and grow into a queen */
if ((g.mvitals[PM_QUEEN_BEE].mvflags & G_GENOD) == 0)
for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
if (DEADMONSTER(mtmp))
continue;
if (mtmp->data == &mons[PM_QUEEN_BEE])
break;
}
return !mtmp ? DOGFOOD : TABU;
}
if (!carni && !herbi)