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:
PatR
2018-12-21 16:59:01 -08:00
parent bba5d14dca
commit 4159dd985a
6 changed files with 93 additions and 17 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 dogmove.c $NHDT-Date: 1502753407 2017/08/14 23:30:07 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.63 $ */
/* NetHack 3.6 dogmove.c $NHDT-Date: 1545439152 2018/12/22 00:39:12 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.72 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2012. */
/* NetHack may be freely redistributed. See license for details. */
@@ -211,7 +211,7 @@ boolean devour;
{
register struct edog *edog = EDOG(mtmp);
boolean poly, grow, heal, eyes, slimer, deadmimic;
int nutrit;
int nutrit, res;
long oprice;
char objnambuf[BUFSZ];
@@ -250,6 +250,11 @@ boolean devour;
newsym(x, y);
newsym(mtmp->mx, mtmp->my);
}
if (mtmp->data == &mons[PM_KILLER_BEE]
&& obj->otyp == LUMP_OF_ROYAL_JELLY
&& (res = bee_eat_jelly(mtmp, obj)) >= 0)
/* bypass most of dog_eat(), including apport update */
return (res + 1); /* 1 -> 2, 0 -> 1; -1, keep going */
/* food items are eaten one at a time; entire stack for other stuff */
if (obj->quan > 1L && obj->oclass == FOOD_CLASS)
@@ -379,8 +384,9 @@ struct edog *edog;
else
You_feel("worried about %s.", y_monnam(mtmp));
stop_occupation();
} else if (monstermoves > edog->hungrytime + 750 || DEADMONSTER(mtmp)) {
dog_died:
} else if (monstermoves > edog->hungrytime + 750
|| DEADMONSTER(mtmp)) {
dog_died:
if (mtmp->mleashed && mtmp != u.usteed)
Your("leash goes slack.");
else if (cansee(mtmp->mx, mtmp->my))
@@ -1184,7 +1190,7 @@ int after; /* this is extra fast monster movement */
}
}
newdogpos:
newdogpos:
if (nix != omx || niy != omy) {
boolean wasseen;
@@ -1256,7 +1262,7 @@ newdogpos:
}
cc.x = mtmp->mx;
cc.y = mtmp->my;
dognext:
dognext:
if (!m_in_out_region(mtmp, nix, niy))
return 1;
remove_monster(mtmp->mx, mtmp->my);