]> granicus.if.org Git - nethack/commitdiff
This adds Wingnut's auto-credit patch (except it doesn't use a separate
authornethack.allison <nethack.allison>
Mon, 7 Jan 2002 12:35:06 +0000 (12:35 +0000)
committernethack.allison <nethack.allison>
Mon, 7 Jan 2002 12:35:06 +0000 (12:35 +0000)
auto_credit flag; that's what sell_response is for).

follow-up comment from Pat:
     This introduces behavior that I consider to be buggy.
You need something separate from sell_response, otherwise if
you answer (a)ll when the shopkeeper still has money you end
up selling everything for credit without being asked when he
runs out of cash in the middle of the transation.  Avoiding
that is the reason for the old behavior in the first place.

doc/fixes33.2
src/shk.c

index 5944b039e58b4f9373460c7d014b32458c712850..7c27152733e0bf7ad9500625f63c9d9db875e659 100644 (file)
@@ -368,6 +368,7 @@ glass objects should break when thrown, just like when kicked in chests
 rocks/gems shouldn't be hard to throw by hand because they are ammo
 avoid all cases where splitting an object would result in two objects being
        quivered, wielded or otherwise having its owornflag set
+allow 'a' prompt when dropping many objects in shop for credit (Wingnut)
 
 
 Platform- and/or Interface-Specific Fixes
index f9f464bfcacc050fcde0611346e65b19297128b5..d442bf0b3a86e08c126cd4d4ad5971215fdb8da7 100644 (file)
--- a/src/shk.c
+++ b/src/shk.c
@@ -2622,7 +2622,7 @@ move_on:
                char c, qbuf[BUFSZ];
                long tmpcr = ((offer * 9L) / 10L) + (offer <= 1L);
 
-               if (sell_how == SELL_NORMAL) {
+               if (sell_how == SELL_NORMAL || sell_response == 'y') {
                    c = sell_response = 'y';
                } else if (sell_response != 'n') {
                    pline("%s cannot pay you at present.", Monnam(shkp));
@@ -2630,7 +2630,13 @@ move_on:
                            "Will you accept %ld zorkmid%s in credit for %s?",
                            tmpcr, plur(tmpcr), doname(obj));
                    /* won't accept 'a' response here */
-                   c = ynq(qbuf);
+                   /* KLY - 3/2000 yes, we will, it's a damn nuisance
+                       to have to constantly hit 'y' to sell for credit */
+                   c = ynaq(qbuf);
+                   if (c == 'a') {
+                       c = 'y';
+                       sell_response = 'y';
+                   }
                } else          /* previously specified "quit" */
                    c = 'n';