fix #2468 - killer bees without a queen
Seven year old suggestion was to have a killer bee eat royal jelly if there was no queen around, then after a short delay it would become a queen. This does that, with "no queen around" being "no queen bee on current dungeon level" and the transformation happening immediately with the "short delay" taking place after. Pet killer bees will target nearby royal jelly if there's no queen, hostile killer bees will only eat it if they happen to walk on the same spot as one. Both types accept either tame or hostile queen bee as an existing queen. Killer bees eating royal jelly will drop dead if queen bees have been genocided, and aren't smart enough to avoid the instinct to eat such if/when that happens to be the situation.
This commit is contained in:
17
src/dog.c
17
src/dog.c
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 dog.c $NHDT-Date: 1543052701 2018/11/24 09:45:01 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.84 $ */
|
||||
/* NetHack 3.6 dog.c $NHDT-Date: 1545439150 2018/12/22 00:39:10 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.85 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2011. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -757,6 +757,21 @@ register struct obj *obj;
|
||||
if ((obj->otyp == CORPSE || obj->otyp == EGG) && touch_petrifies(fptr)
|
||||
&& !resists_ston(mon))
|
||||
return POISON;
|
||||
if (obj->otyp == LUMP_OF_ROYAL_JELLY
|
||||
&& mon->data == &mons[PM_KILLER_BEE]) {
|
||||
struct monst *mtmp = 0;
|
||||
|
||||
/* 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 ((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)
|
||||
return obj->cursed ? UNDEF : APPORT;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user