]> granicus.if.org Git - nethack/commitdiff
drum of earthquake - monster portion
authornethack.allison <nethack.allison>
Fri, 14 Apr 2006 14:33:01 +0000 (14:33 +0000)
committernethack.allison <nethack.allison>
Fri, 14 Apr 2006 14:33:01 +0000 (14:33 +0000)
<Someone> wrote:
> When applying a drum of earthquake, should you "fall into a chasm" if
> you're already at the bottom of a pit? (Likewise monsters.)

monster already in a pit won't "fall into a chasm" from drum of earthquake

doc/fixes34.4
src/music.c

index 367461e8cb288b495612025ede4cfef6928de893..7aaa8b988173d23d704b28562c7852320f7e2488 100644 (file)
@@ -205,7 +205,8 @@ check for hero location in digactualhole() before clearing u.utrap
 clear any pits that the hero digs in the vault guard's temporary corridor
 shattering a monster's weapon didn't work as intended for stack of N>1
 don't reveal surface information that you can neither feel or see
-hero already in a pit won't "fall into a chasm" from drum of earthquake
+if the hero or a monster is already in a pit don't have them "fall into a chasm" 
+       from drum of earthquake
 
 
 Platform- and/or Interface-Specific Fixes
index 844fd3834258beac0497072ff936ea8d941f920f..e45d6e117c69058d9a44fcd6cd0c47252006c732 100644 (file)
@@ -311,14 +311,20 @@ do_pit:               chasm = maketrap(x,y,PIT);
 
                    if (mtmp) {
                        if(!is_flyer(mtmp->data) && !is_clinger(mtmp->data)) {
+                           boolean m_already_trapped = mtmp->mtrapped;
                            mtmp->mtrapped = 1;
-                           if(cansee(x,y))
-                               pline("%s falls into a chasm!", Monnam(mtmp));
-                           else if (!Deaf && humanoid(mtmp->data))
-                               You_hear("a scream!");
+                           if (m_already_trapped) { /* suppress messages */
+                               if(cansee(x,y))
+                                   pline("%s falls into a chasm!", Monnam(mtmp));
+                               else if (!Deaf && humanoid(mtmp->data))
+                                   You_hear("a scream!");
+                           }
+                           /* Falling is okay for falling down
+                               within a pit from jostling too */
                            mselftouch(mtmp, "Falling, ", TRUE);
                            if (mtmp->mhp > 0)
-                               if ((mtmp->mhp -= rnd(6)) <= 0) {
+                               if ((mtmp->mhp -=
+                                       rnd(m_already_trapped ? 4 : 6)) <= 0) {
                                    if(!cansee(x,y))
                                        pline("It is destroyed!");
                                    else {