MCPcopy Create free account
hub / github.com/NetHack/NetHack / suit_simple_name

Function suit_simple_name

src/objnam.c:5470–5489  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5468}
5469
5470const char *
5471suit_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
5491const char *
5492cloak_simple_name(struct obj *cloak)

Callers 9

armor_or_accessory_offFunction · 0.85
armoroffFunction · 0.85
disintegrate_armFunction · 0.85
armor_simple_nameFunction · 0.85
trapeffect_rust_trapFunction · 0.85
item_whatFunction · 0.85
doseduceFunction · 0.85
status_enlightenmentFunction · 0.85
doreadFunction · 0.85

Calls 1

eosFunction · 0.85

Tested by

no test coverage detected