]> granicus.if.org Git - nethack/commitdiff
Q416 kicking gold (trunk only)
authornethack.allison <nethack.allison>
Sat, 10 Feb 2007 02:02:49 +0000 (02:02 +0000)
committernethack.allison <nethack.allison>
Sat, 10 Feb 2007 02:02:49 +0000 (02:02 +0000)
<email deleted> on Monday, January 29, 2007:
>Hero is able to kick a pile of gold (say, 100) and have the entire pile move at
>once in the same direction; very easy to avoid gold on traps.  Kicking gold
>should probably scatter the pieces in multiple directions or at least not be
>quite so easy.

doc/fixes35.0
src/dokick.c

index 6d1f252fa4fcaffc5a32929f70579e95cae1bcf1..242a4ae23f8717b8881ce98c8157a62bab6ad6cc 100644 (file)
@@ -186,6 +186,7 @@ right-handed boomerang throw travels counterclockwise
 monsters can use ranged attacks over/around boulders, same as hero
 can't drop part of a stack of N weapons welded to hero's hand
 pickup still accepts m as command prefix, but now rejects F,g,G,M,numpad 5
+scatter piles of kicked gold rather than move the entire pile at once
 
 
 Platform- and/or Interface-Specific Fixes
index 33fe8ae5a0b073ffd6ac402d74f28158eccd5ec2..d620bf8e5617a06d74925fa55f5ee374b75fc7d3 100644 (file)
@@ -539,12 +539,33 @@ xchar x, y;
         * player, so range == 2 means the object may move up to one square
         * from its current position
         */
-       if(range < 2 || (isgold && kickobj->quan > 300L)) {
+       if(range < 2) {
            if(!Is_box(kickobj)) pline("Thump!");
            return(!rn2(3) || martial());
        }
 
-       if (kickobj->quan > 1L && !isgold) kickobj = splitobj(kickobj, 1L);
+       if (kickobj->quan > 1L) {
+           if (!isgold) {
+               kickobj = splitobj(kickobj, 1L);
+           } else {
+               if (rn2(20)) {
+                       const char *flyingcoinmsg[] = {
+                               "scatter the coins",
+                               "knock coins all over the place",
+                               "send coins flying in all directions",
+                       };
+                       pline("Thwwpingg!");
+                       You("%s!", flyingcoinmsg[rn2(SIZE(flyingcoinmsg))]);
+                       (void) scatter(x, y, rn2(3)+1, VIS_EFFECTS|MAY_HIT, kickobj);
+                       newsym(x, y);
+                       return 1;
+               }
+               if (kickobj->quan > 300L) {
+                       pline("Thump!");
+                       return(!rn2(3) || martial());
+               }
+           }
+       }
 
        if (slide && !Blind)
            pline("Whee!  %s %s across the %s.", Doname2(kickobj),