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

Function boots_simple_name

src/objnam.c:5550–5566  ·  view source on GitHub ↗

boots vs shoes; depends upon discovery state */

Source from the content-addressed store, hash-verified

5548
5549/* boots vs shoes; depends upon discovery state */
5550const char *
5551boots_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 */
5569const char *

Callers 4

armoroffFunction · 0.85
disintegrate_armFunction · 0.85
armor_simple_nameFunction · 0.85
item_whatFunction · 0.85

Calls 1

strstriFunction · 0.85

Tested by

no test coverage detected