cursed potions of invisibility for monsters
Extend the recently changed behavior for cursed potion of invisibility. Monsters won't drink potions of invisibility if already invisible so can't accidentally or voluntarily make themselves visible again, but let player make them become visible by hitting them with thrown or wielded cursed potion of invisibility. They don't have any concept of temporary invisibility that might let them remain invisible while losing permanent invisibility, so they just lose the latter and immediately become visible.
This commit is contained in:
10
src/worn.c
10
src/worn.c
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.7 worn.c $NHDT-Date: 1736530208 2025/01/10 09:30:08 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.116 $ */
|
||||
/* NetHack 3.7 worn.c $NHDT-Date: 1770949988 2026/02/12 18:33:08 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.119 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2013. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -463,11 +463,13 @@ check_wornmask_slots(void)
|
||||
} /* check_wornmask_slots() */
|
||||
|
||||
void
|
||||
mon_set_minvis(struct monst *mon)
|
||||
mon_set_minvis(
|
||||
struct monst *mon,
|
||||
boolean cursed_potion)
|
||||
{
|
||||
mon->perminvis = 1;
|
||||
mon->perminvis = !cursed_potion ? 1 : 0;
|
||||
if (!mon->invis_blkd) {
|
||||
mon->minvis = 1;
|
||||
mon->minvis = mon->perminvis;
|
||||
newsym(mon->mx, mon->my); /* make it disappear */
|
||||
if (mon->wormno)
|
||||
see_wsegs(mon); /* and any tail too */
|
||||
|
||||
Reference in New Issue
Block a user