You are digging in the shop. */
| 5016 | |
| 5017 | /* You are digging in the shop. */ |
| 5018 | void |
| 5019 | shopdig(int fall) |
| 5020 | { |
| 5021 | struct monst *shkp = shop_keeper(*u.ushops); |
| 5022 | int lang; |
| 5023 | const char *grabs = "grabs"; |
| 5024 | |
| 5025 | if (!shkp) |
| 5026 | return; |
| 5027 | if (!inhishop(shkp)) { |
| 5028 | if (Role_if(PM_KNIGHT)) { |
| 5029 | You_feel("like a common thief."); |
| 5030 | adjalign(-sgn(u.ualign.type)); |
| 5031 | } |
| 5032 | return; |
| 5033 | } |
| 5034 | /* 0 == can't speak, 1 == makes animal noises, 2 == speaks */ |
| 5035 | lang = 0; |
| 5036 | if (helpless(shkp) || is_silent(shkp->data)) |
| 5037 | ; /* lang stays 0 */ |
| 5038 | else if (shkp->data->msound <= MS_ANIMAL) |
| 5039 | lang = 1; |
| 5040 | else if (shkp->data->msound >= MS_HUMANOID) |
| 5041 | lang = 2; |
| 5042 | |
| 5043 | if (!fall) { |
| 5044 | if (lang == 2) { |
| 5045 | if (!Deaf && !muteshk(shkp)) { |
| 5046 | SetVoice(shkp, 0, 80, 0); |
| 5047 | if (u.utraptype == TT_PIT) { |
| 5048 | verbalize( |
| 5049 | "Be careful, %s, or you might fall through the floor.", |
| 5050 | flags.female ? "madam" : "sir"); |
| 5051 | } else { |
| 5052 | verbalize("%s, do not damage the floor here!", |
| 5053 | flags.female ? "Madam" : "Sir"); |
| 5054 | } |
| 5055 | } |
| 5056 | } |
| 5057 | if (Role_if(PM_KNIGHT)) { |
| 5058 | You_feel("like a common thief."); |
| 5059 | adjalign(-sgn(u.ualign.type)); |
| 5060 | } |
| 5061 | } else if (!um_dist(shkp->mx, shkp->my, 5) |
| 5062 | && !helpless(shkp) |
| 5063 | && (ESHK(shkp)->billct || ESHK(shkp)->debit)) { |
| 5064 | struct obj *obj, *obj2; |
| 5065 | |
| 5066 | if (nolimbs(shkp->data)) { |
| 5067 | grabs = "knocks off"; |
| 5068 | #if 0 |
| 5069 | /* This is what should happen, but for balance |
| 5070 | * reasons, it isn't currently. |
| 5071 | */ |
| 5072 | if (lang == 2) |
| 5073 | pline("%s curses %s inability to grab your backpack!", |
| 5074 | Shknam(shkp), noit_mhim(shkp)); |
| 5075 | rile_shk(shkp); |
no test coverage detected