Gelatinous cubes eat organic objects inside them
This commit is contained in:
@@ -1486,6 +1486,7 @@ digging in ice was handled inconsistently, particularly if done at the span
|
|||||||
angry god may remove an intrinsic
|
angry god may remove an intrinsic
|
||||||
blessed scroll of destroy armor asks which armor to destroy
|
blessed scroll of destroy armor asks which armor to destroy
|
||||||
archeologists' fedora is lucky
|
archeologists' fedora is lucky
|
||||||
|
gelatinous cubes eat organic objects inside them
|
||||||
|
|
||||||
|
|
||||||
Fixes to 3.7.0-x General Problems Exposed Via git Repository
|
Fixes to 3.7.0-x General Problems Exposed Via git Repository
|
||||||
|
|||||||
@@ -409,6 +409,32 @@ bee_eat_jelly(struct monst *mon, struct obj *obj)
|
|||||||
return -1; /* a queen is already present; ordinary bee hasn't moved yet */
|
return -1; /* a queen is already present; ordinary bee hasn't moved yet */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* gelatinous cube eats something from its inventory */
|
||||||
|
static int
|
||||||
|
gelcube_digests(struct monst *mtmp)
|
||||||
|
{
|
||||||
|
struct obj *otmp = mtmp->minvent;
|
||||||
|
|
||||||
|
if (mtmp->meating || !mtmp->minvent)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
while (otmp) {
|
||||||
|
if (is_organic(otmp) && !otmp->oartifact
|
||||||
|
&& !is_mines_prize(otmp) && !is_soko_prize(otmp))
|
||||||
|
break;
|
||||||
|
otmp = otmp->nobj;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!otmp)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
mtmp->meating = eaten_stat(mtmp->meating, otmp);
|
||||||
|
extract_from_minvent(mtmp, otmp, TRUE, TRUE);
|
||||||
|
m_consume_obj(mtmp, otmp);
|
||||||
|
return 0; /* used a move */
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* FIXME: gremlins don't flee from monsters wielding Sunsword or wearing
|
/* FIXME: gremlins don't flee from monsters wielding Sunsword or wearing
|
||||||
gold dragon scales/mail, nor from gold dragons, only from the hero */
|
gold dragon scales/mail, nor from gold dragons, only from the hero */
|
||||||
#define flees_light(mon) \
|
#define flees_light(mon) \
|
||||||
@@ -846,6 +872,10 @@ dochug(struct monst *mtmp)
|
|||||||
&& (res = bee_eat_jelly(mtmp, otmp)) >= 0)
|
&& (res = bee_eat_jelly(mtmp, otmp)) >= 0)
|
||||||
return res;
|
return res;
|
||||||
|
|
||||||
|
if (mdat == &mons[PM_GELATINOUS_CUBE]
|
||||||
|
&& (res = gelcube_digests(mtmp)) >= 0)
|
||||||
|
return res;
|
||||||
|
|
||||||
/* A monster that passes the following checks has the opportunity
|
/* A monster that passes the following checks has the opportunity
|
||||||
to move. Movement itself is handled by the m_move() function. */
|
to move. Movement itself is handled by the m_move() function. */
|
||||||
if (!nearby || mtmp->mflee || scared || mtmp->mconf || mtmp->mstun
|
if (!nearby || mtmp->mflee || scared || mtmp->mconf || mtmp->mstun
|
||||||
|
|||||||
Reference in New Issue
Block a user