MCPcopy Index your code
hub / github.com/NetHack/NetHack / fix_ghostly_obj

Function fix_ghostly_obj

src/bones.c:795–815  ·  view source on GitHub ↗

This is called when a marked object from a bones file is picked-up. Some could result in a message, and the obj->ghostly flag is always cleared. obj->ghostly has no other usage at this time. */

Source from the content-addressed store, hash-verified

793 Some could result in a message, and the obj->ghostly flag is always
794 cleared. obj->ghostly has no other usage at this time. */
795void
796fix_ghostly_obj(struct obj *obj)
797{
798 if (!obj->ghostly)
799 return;
800 switch(obj->otyp) {
801 /* asymmetrical weapons */
802 case BOW:
803 case ELVEN_BOW:
804 case ORCISH_BOW:
805 case YUMI:
806 case BOOMERANG:
807 You("make adjustments to %s to suit your %s hand.",
808 the(xname(obj)),
809 URIGHTY ? "right" : "left");
810 break;
811 default:
812 break;
813 }
814 obj->ghostly = 0;
815}
816
817void
818newebones(struct monst *mtmp)

Callers 1

pickup_objectFunction · 0.85

Calls 3

YouFunction · 0.85
theFunction · 0.85
xnameFunction · 0.85

Tested by

no test coverage detected