]> granicus.if.org Git - nethack/commitdiff
statue trap activation
authornethack.rankin <nethack.rankin>
Sun, 24 Dec 2006 04:09:32 +0000 (04:09 +0000)
committernethack.rankin <nethack.rankin>
Sun, 24 Dec 2006 04:09:32 +0000 (04:09 +0000)
     Make monsters created by statue trap activation start out awake and
hostile in addition to being unhidden.

doc/fixes34.4
src/trap.c

index c469edf685e1f833540df1fbdf300108210f80a7..16b7a14295b0b3a3a3fec88a5488bf99bc03bdb4 100644 (file)
@@ -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
index f533844906f3e803e598029a87035f57d113580e..48253228c658773246d76d5e351a235ebfeb4014 100644 (file)
@@ -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)) ?