]> granicus.if.org Git - nethack/commitdiff
throwing while polymorphed
authorcohrs <cohrs>
Sat, 11 Oct 2003 18:38:24 +0000 (18:38 +0000)
committercohrs <cohrs>
Sat, 11 Oct 2003 18:38:24 +0000 (18:38 +0000)
<Someone> suggested that a dragon, lacking hands, shouldn't be able to
throw things.  Dragons can pick things up, and it seems they can throw
things the same way.  However, it does seem that a notake() monster, which
cannot pick things up, shouldn't be able to throw things either.

doc/fixes34.3
src/dothrow.c

index cc51716025c6e5df114888435e75f345d5bc95b1..af4b54a28d5bce3642e4dad34ec5db27322818c3 100644 (file)
@@ -45,6 +45,7 @@ always have warriors on the Valkyrie quest be female
 be more consistent with sounds when dropping into water
 surface() returns "bottom" when Underwater
 bill for all discarded, opened tins
+monsters that cannot pick things up cannot throw things either
 
 
 Platform- and/or Interface-Specific Fixes
index 9c47f18a642b1ee0c91cc19170d0ee5decdba6c4..f34526b1cb6727974b961684a3fbb30547598e94 100644 (file)
@@ -203,6 +203,11 @@ dothrow()
        shotlimit = (multi || save_cm) ? multi + 1 : 0;
        multi = 0;              /* reset; it's been used up */
 
+       if (notake(youmonst.data)) {
+           You("are physically incapable of throwing anything.");
+           return 0;
+       }
+
        if(check_capacity((char *)0)) return(0);
        obj = getobj(uslinging() ? bullets : toss_objs, "throw");
        /* it is also possible to throw food */
@@ -285,6 +290,11 @@ dofire()
 {
        int shotlimit;
 
+       if (notake(youmonst.data)) {
+           You("are physically incapable of doing that.");
+           return 0;
+       }
+
        if(check_capacity((char *)0)) return(0);
        if (!uquiver) {
                if (!flags.autoquiver) {