Skip to content

Commit

Permalink
statue trap activation
Browse files Browse the repository at this point in the history
     Make monsters created by statue trap activation start out awake and
hostile in addition to being unhidden.
  • Loading branch information
nethack.rankin committed Dec 24, 2006
1 parent e26d9ff commit f93b383
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions doc/fixes34.4
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ remove engravings at drawbridge location when it is opened, closed, or wrecked
monster killed in midst of multi-shot volley throwing/shooting might cause
freed memory to be accessed, potentially triggering a crash
can't arm bear traps or land mines on Planes of Air or Water
statues that "come to life" when trap activates shouldn't start out sleeping


Platform- and/or Interface-Specific Fixes
Expand Down
7 changes: 7 additions & 0 deletions src/trap.c
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,13 @@ int *fail_reason;
/* mimic statue becomes seen mimic; other hiders won't be hidden */
if (mon->m_ap_type) seemimic(mon);
else mon->mundetected = FALSE;
mon->msleeping = 0;
if (cause == ANIMATE_NORMAL || cause == ANIMATE_SHATTER) {
/* trap always releases hostile monster */
mon->mtame = 0; /* (might be petrified pet tossed onto trap) */
mon->mpeaceful = 0;
set_malign(mon);
}

comes_to_life = !canspotmon(mon) ? "disappears" :
(nonliving(mon->data) || is_vampshifter(mon)) ?
Expand Down

0 comments on commit f93b383

Please sign in to comment.