convert player specified fruit name into corresponding fruit juice name ("slice of pizza" -> "pizza juice" rather than "slice of pizza juice") */
| 411 | /* convert player specified fruit name into corresponding fruit juice name |
| 412 | ("slice of pizza" -> "pizza juice" rather than "slice of pizza juice") */ |
| 413 | char * |
| 414 | fruitname( |
| 415 | boolean juice) /* whether or not to append " juice" to the name */ |
| 416 | { |
| 417 | char *buf = nextobuf(); |
| 418 | const char *fruit_nam = strstri(svp.pl_fruit, " of "); |
| 419 | |
| 420 | if (fruit_nam) |
| 421 | fruit_nam += 4; /* skip past " of " */ |
| 422 | else |
| 423 | fruit_nam = svp.pl_fruit; /* use it as is */ |
| 424 | |
| 425 | Sprintf(buf, "%s%s", makesingular(fruit_nam), juice ? " juice" : ""); |
| 426 | return buf; |
| 427 | } |
| 428 | |
| 429 | /* look up a named fruit by index (1..127) */ |
| 430 | struct fruit * |
no test coverage detected