| 5468 | } |
| 5469 | |
| 5470 | const char * |
| 5471 | suit_simple_name(struct obj *suit) |
| 5472 | { |
| 5473 | const char *suitnm, *esuitp; |
| 5474 | |
| 5475 | if (suit) { |
| 5476 | if (Is_dragon_mail(suit)) |
| 5477 | return "dragon mail"; /* <color> dragon scale mail */ |
| 5478 | else if (Is_dragon_scales(suit)) |
| 5479 | return "dragon scales"; |
| 5480 | suitnm = OBJ_NAME(objects[suit->otyp]); |
| 5481 | esuitp = eos((char *) suitnm); |
| 5482 | if (strlen(suitnm) > 5 && !strcmp(esuitp - 5, " mail")) |
| 5483 | return "mail"; /* most suits fall into this category */ |
| 5484 | else if (strlen(suitnm) > 7 && !strcmp(esuitp - 7, " jacket")) |
| 5485 | return "jacket"; /* leather jacket */ |
| 5486 | } |
| 5487 | /* "suit" is lame but "armor" is ambiguous and "body armor" is absurd */ |
| 5488 | return "suit"; |
| 5489 | } |
| 5490 | |
| 5491 | const char * |
| 5492 | cloak_simple_name(struct obj *cloak) |
no test coverage detected