allow monster that has swallowed hero to be named
This commit is contained in:
@@ -1278,6 +1278,8 @@ make spell menu work with repeat
|
|||||||
when attempting to look up a named fruit in data.base, try harder
|
when attempting to look up a named fruit in data.base, try harder
|
||||||
set and check mon->mstate flags more consistently
|
set and check mon->mstate flags more consistently
|
||||||
fix sanity error when cloud was created over an engraving
|
fix sanity error when cloud was created over an engraving
|
||||||
|
docall naming of the monster that currently has the hero swallowed by
|
||||||
|
using their visible interior
|
||||||
|
|
||||||
|
|
||||||
Fixes to 3.7.0-x General Problems Exposed Via git Repository
|
Fixes to 3.7.0-x General Problems Exposed Via git Repository
|
||||||
|
|||||||
+14
-2
@@ -1335,6 +1335,7 @@ do_mgivenname(void)
|
|||||||
coord cc;
|
coord cc;
|
||||||
int cx, cy;
|
int cx, cy;
|
||||||
struct monst *mtmp = 0;
|
struct monst *mtmp = 0;
|
||||||
|
boolean do_swallow = FALSE;
|
||||||
|
|
||||||
if (Hallucination) {
|
if (Hallucination) {
|
||||||
You("would never recognize it anyway.");
|
You("would never recognize it anyway.");
|
||||||
@@ -1358,12 +1359,23 @@ do_mgivenname(void)
|
|||||||
} else
|
} else
|
||||||
mtmp = m_at(cx, cy);
|
mtmp = m_at(cx, cy);
|
||||||
|
|
||||||
if (!mtmp
|
/* Allow you to name the monster that has swallowed you */
|
||||||
|
if (!mtmp && u.uswallow) {
|
||||||
|
int glyph = glyph_at(cx, cy);
|
||||||
|
|
||||||
|
if (glyph_is_swallow(glyph)) {
|
||||||
|
mtmp = u.ustuck;
|
||||||
|
do_swallow = TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!do_swallow && (!mtmp
|
||||||
|| (!sensemon(mtmp)
|
|| (!sensemon(mtmp)
|
||||||
&& (!(cansee(cx, cy) || see_with_infrared(mtmp))
|
&& (!(cansee(cx, cy) || see_with_infrared(mtmp))
|
||||||
|| mtmp->mundetected || M_AP_TYPE(mtmp) == M_AP_FURNITURE
|
|| mtmp->mundetected || M_AP_TYPE(mtmp) == M_AP_FURNITURE
|
||||||
|| M_AP_TYPE(mtmp) == M_AP_OBJECT
|
|| M_AP_TYPE(mtmp) == M_AP_OBJECT
|
||||||
|| (mtmp->minvis && !See_invisible)))) {
|
|| (mtmp->minvis && !See_invisible))))) {
|
||||||
|
|
||||||
pline("I see no monster there.");
|
pline("I see no monster there.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user