boots vs shoes; depends upon discovery state */
| 5548 | |
| 5549 | /* boots vs shoes; depends upon discovery state */ |
| 5550 | const char * |
| 5551 | boots_simple_name(struct obj *boots) |
| 5552 | { |
| 5553 | static const char shoes[] = "shoes"; |
| 5554 | |
| 5555 | if (boots && boots->dknown) { |
| 5556 | int otyp = boots->otyp; |
| 5557 | struct objclass *ocl = &objects[otyp]; |
| 5558 | const char *actualn = OBJ_NAME(*ocl), |
| 5559 | *descrpn = OBJ_DESCR(*ocl); |
| 5560 | |
| 5561 | if (strstri(descrpn, shoes) |
| 5562 | || (objects[otyp].oc_name_known && strstri(actualn, shoes))) |
| 5563 | return shoes; |
| 5564 | } |
| 5565 | return "boots"; |
| 5566 | } |
| 5567 | |
| 5568 | /* simplified shield for messages */ |
| 5569 | const char * |
no test coverage detected