another #1441 follow-up bit

This commit is contained in:
nhmall
2025-09-04 22:52:36 -04:00
parent 88eb33f198
commit 774129df11
3 changed files with 9 additions and 1 deletions
+1
View File
@@ -3410,6 +3410,7 @@ extern void passive_obj(struct monst *, struct obj *, struct attack *) NONNULLAR
extern void that_is_a_mimic(struct monst *, unsigned) NONNULLARG1; extern void that_is_a_mimic(struct monst *, unsigned) NONNULLARG1;
extern void stumble_onto_mimic(struct monst *) NONNULLARG1; extern void stumble_onto_mimic(struct monst *) NONNULLARG1;
extern boolean mimic_disguised_as_non_mon(struct monst *) NONNULLARG1; extern boolean mimic_disguised_as_non_mon(struct monst *) NONNULLARG1;
extern boolean mimic_disguised_as_mon(struct monst *) NONNULLARG1;
extern int flash_hits_mon(struct monst *, struct obj *) NONNULLARG12; extern int flash_hits_mon(struct monst *, struct obj *) NONNULLARG12;
extern void light_hits_gremlin(struct monst *, int) NONNULLARG1; extern void light_hits_gremlin(struct monst *, int) NONNULLARG1;
+7
View File
@@ -6267,6 +6267,13 @@ mimic_disguised_as_non_mon(struct monst *mtmp)
&& M_AP_TYPE(mtmp) != M_AP_MONSTER); && M_AP_TYPE(mtmp) != M_AP_MONSTER);
} }
boolean
mimic_disguised_as_mon(struct monst *mtmp)
{
return (M_AP_TYPE(mtmp)
&& M_AP_TYPE(mtmp) == M_AP_MONSTER);
}
staticfn void staticfn void
nohandglow(struct monst *mon) nohandglow(struct monst *mon)
{ {
+1 -1
View File
@@ -192,7 +192,7 @@ bhitm(struct monst *mtmp, struct obj *otmp)
reveal_invis = TRUE; reveal_invis = TRUE;
learn_it = cansee(gb.bhitpos.x, gb.bhitpos.y); learn_it = cansee(gb.bhitpos.x, gb.bhitpos.y);
if (resists_magm(mtmp)) { /* match effect on player */ if (resists_magm(mtmp)) { /* match effect on player */
if (mimic_disguised_as_non_mon(mtmp)) if (!mimic_disguised_as_mon(mtmp))
seemimic(mtmp); seemimic(mtmp);
shieldeff(mtmp->mx, mtmp->my); shieldeff(mtmp->mx, mtmp->my);
pline("Boing!"); pline("Boing!");