| 5905 | } |
| 5906 | |
| 5907 | staticfn const char * |
| 5908 | cad( |
| 5909 | boolean altusage) /* used as a verbalized exclamation: \"Cad! ...\" */ |
| 5910 | { |
| 5911 | const char *res = 0; |
| 5912 | |
| 5913 | switch (is_demon(gy.youmonst.data) ? 3 : poly_gender()) { |
| 5914 | case 0: |
| 5915 | res = "cad"; |
| 5916 | break; |
| 5917 | case 1: |
| 5918 | res = "minx"; |
| 5919 | break; |
| 5920 | case 2: |
| 5921 | res = "beast"; |
| 5922 | break; |
| 5923 | case 3: |
| 5924 | res = "fiend"; |
| 5925 | break; |
| 5926 | default: |
| 5927 | impossible("cad: unknown gender"); |
| 5928 | res = "thing"; |
| 5929 | break; |
| 5930 | } |
| 5931 | if (altusage) { |
| 5932 | char *cadbuf = mon_nam(&gy.youmonst); /* snag an output buffer */ |
| 5933 | |
| 5934 | /* alternate usage adds a leading double quote and trailing |
| 5935 | exclamation point plus sentence separating spaces */ |
| 5936 | Sprintf(cadbuf, "\"%s! ", res); |
| 5937 | cadbuf[1] = highc(cadbuf[1]); |
| 5938 | res = cadbuf; |
| 5939 | } |
| 5940 | return res; |
| 5941 | } |
| 5942 | |
| 5943 | #ifdef __SASC |
| 5944 | void |
no test coverage detected