]> granicus.if.org Git - nethack/commitdiff
grappling hook ignores spot effects
authorcohrs <cohrs>
Fri, 1 Feb 2002 03:30:40 +0000 (03:30 +0000)
committercohrs <cohrs>
Fri, 1 Feb 2002 03:30:40 +0000 (03:30 +0000)
Using a grappling hook can land you in water, lava, et al, but you were
unaffected.

doc/fixes33.2
src/apply.c

index 3693db6c380e00363ea904773877345264f7b552..d9f4451fcb6ec2fdc7b1f8e2ebfc414911712986 100644 (file)
@@ -411,6 +411,7 @@ secret corridor detected out of vision range is still displayed (prevents bug
 getobj can now see user-specified count when using inventory to make selection
 scalpel is stainless steel (i.e. METAL) not regular steel (IRON)
 eggs, potions & other breakables may break when they fall down stairs
+hurtling via grappling hook does not apply effects of destination location
 
 
 Platform- and/or Interface-Specific Fixes
index b2c86f6e2bcda91c03534dd24a6a4dbfa8239f61..aa2cc6a5bd95fc9b825c5e2a78766813a4e03ac9 100644 (file)
@@ -2332,8 +2332,7 @@ use_grapple (obj)
        }
 
        /* What did you hit? */
-       switch (rn2(5))
-       {
+       switch (rn2(5)) {
        case 0: /* Trap */
            /* FIXME -- untrap needs to deal with non-adjacent traps */
            break;
@@ -2361,9 +2360,13 @@ use_grapple (obj)
            }
            /* FALL THROUGH */
        case 3: /* Surface */
-           You("are yanked toward the %s!",
-                       surface(cc.x, cc.y));
-           hurtle(sgn(cc.x-u.ux), sgn(cc.y-u.uy), 1, FALSE);
+           if (IS_AIR(levl[cc.x][cc.y].typ) || is_pool(cc.x, cc.y))
+               pline_The("hook slices through the %s.", surface(cc.x, cc.y));
+           else {
+               You("are yanked toward the %s!", surface(cc.x, cc.y));
+               hurtle(sgn(cc.x-u.ux), sgn(cc.y-u.uy), 1, FALSE);
+               spoteffects();
+           }
            return (1);
        default:        /* Yourself (oops!) */
            if (P_SKILL(typ) <= P_BASIC) {