called when removing a pick-axe or mattock from a container */
| 918 | |
| 919 | /* called when removing a pick-axe or mattock from a container */ |
| 920 | void |
| 921 | pick_pick(struct obj *obj) |
| 922 | { |
| 923 | struct monst *shkp; |
| 924 | |
| 925 | if (obj->unpaid || !is_pick(obj)) |
| 926 | return; |
| 927 | shkp = shop_keeper(*u.ushops); |
| 928 | if (shkp && inhishop(shkp)) { |
| 929 | static NEARDATA long pickmovetime = 0L; |
| 930 | |
| 931 | /* if you bring a sack of N picks into a shop to sell, |
| 932 | don't repeat this N times when they're taken out */ |
| 933 | if (svm.moves != pickmovetime) { |
| 934 | if (!Deaf && !muteshk(shkp)) { |
| 935 | SetVoice(shkp, 0, 80, 0); |
| 936 | verbalize("You sneaky %s! Get out of here with that pick!", |
| 937 | cad(FALSE)); |
| 938 | } else { |
| 939 | pline("%s %s your pick!", |
| 940 | Shknam(shkp), |
| 941 | haseyes(shkp->data) ? "glares at" |
| 942 | : "is dismayed because of"); |
| 943 | } |
| 944 | } |
| 945 | pickmovetime = svm.moves; |
| 946 | } |
| 947 | } |
| 948 | |
| 949 | /* |
| 950 | Decide whether two unpaid items are mergeable; caller is responsible for |
no test coverage detected