Make mimics mimicing walls or trees also block light
This commit is contained in:
@@ -84,6 +84,7 @@ guard macros available for mextra fields similar to those for oextra fields
|
|||||||
compile-time option for an alternate paniclog format for public server use
|
compile-time option for an alternate paniclog format for public server use
|
||||||
make monsters forget where they stepped when fleeing or teleporting
|
make monsters forget where they stepped when fleeing or teleporting
|
||||||
requiver pickup_thrown objects if quiver is empty
|
requiver pickup_thrown objects if quiver is empty
|
||||||
|
make mimics mimicing walls or trees also block light
|
||||||
|
|
||||||
|
|
||||||
Platform- and/or Interface-Specific Fixes
|
Platform- and/or Interface-Specific Fixes
|
||||||
|
|||||||
@@ -159,6 +159,16 @@ struct monst {
|
|||||||
#define is_vampshifter(mon) \
|
#define is_vampshifter(mon) \
|
||||||
((mon)->cham == PM_VAMPIRE || (mon)->cham == PM_VAMPIRE_LORD \
|
((mon)->cham == PM_VAMPIRE || (mon)->cham == PM_VAMPIRE_LORD \
|
||||||
|| (mon)->cham == PM_VLAD_THE_IMPALER)
|
|| (mon)->cham == PM_VLAD_THE_IMPALER)
|
||||||
|
|
||||||
|
/* mimic appearances that block vision/light */
|
||||||
|
#define is_lightblocker_mappear(mon) \
|
||||||
|
(is_obj_mappear(mon, BOULDER) || \
|
||||||
|
((mon)->m_ap_type == M_AP_FURNITURE \
|
||||||
|
&& ((mon)->mappearance == S_hcdoor \
|
||||||
|
|| (mon)->mappearance == S_vcdoor \
|
||||||
|
|| (mon)->mappearance < S_ndoor /* = walls */ \
|
||||||
|
|| (mon)->mappearance == S_tree)))
|
||||||
|
|
||||||
#define is_door_mappear(mon) ((mon)->m_ap_type == M_AP_FURNITURE \
|
#define is_door_mappear(mon) ((mon)->m_ap_type == M_AP_FURNITURE \
|
||||||
&& ((mon)->mappearance == S_hcdoor || (mon)->mappearance == S_vcdoor))
|
&& ((mon)->mappearance == S_hcdoor || (mon)->mappearance == S_vcdoor))
|
||||||
#define is_obj_mappear(mon,otyp) ((mon)->m_ap_type == M_AP_OBJECT \
|
#define is_obj_mappear(mon,otyp) ((mon)->m_ap_type == M_AP_OBJECT \
|
||||||
|
|||||||
@@ -1201,8 +1201,7 @@ set_mimic_blocking()
|
|||||||
for (mon = fmon; mon; mon = mon->nmon) {
|
for (mon = fmon; mon; mon = mon->nmon) {
|
||||||
if (DEADMONSTER(mon))
|
if (DEADMONSTER(mon))
|
||||||
continue;
|
continue;
|
||||||
if (mon->minvis && (is_door_mappear(mon)
|
if (mon->minvis && is_lightblocker_mappear(mon)) {
|
||||||
|| is_obj_mappear(mon,BOULDER))) {
|
|
||||||
if (See_invisible)
|
if (See_invisible)
|
||||||
block_point(mon->mx, mon->my);
|
block_point(mon->mx, mon->my);
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -2616,8 +2616,7 @@ void
|
|||||||
seemimic(mtmp)
|
seemimic(mtmp)
|
||||||
register struct monst *mtmp;
|
register struct monst *mtmp;
|
||||||
{
|
{
|
||||||
boolean is_blocker_appear = (is_door_mappear(mtmp)
|
boolean is_blocker_appear = (is_lightblocker_mappear(mtmp));
|
||||||
|| is_obj_mappear(mtmp, BOULDER));
|
|
||||||
|
|
||||||
if (has_mcorpsenm(mtmp))
|
if (has_mcorpsenm(mtmp))
|
||||||
freemcorpsenm(mtmp);
|
freemcorpsenm(mtmp);
|
||||||
|
|||||||
@@ -175,9 +175,9 @@ register struct rm *lev;
|
|||||||
if (obj->otyp == BOULDER)
|
if (obj->otyp == BOULDER)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
/* Mimics mimicing a door or boulder block light. */
|
/* Mimics mimicing a door or boulder or ... block light. */
|
||||||
if ((mon = m_at(x, y)) && (!mon->minvis || See_invisible)
|
if ((mon = m_at(x, y)) && (!mon->minvis || See_invisible)
|
||||||
&& (is_door_mappear(mon) || is_obj_mappear(mon,BOULDER)))
|
&& is_lightblocker_mappear(mon))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user