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

Function arti_cost

src/artifact.c:2308–2317  ·  view source on GitHub ↗

Return the price sold to the hero of a given artifact or unique item */

Source from the content-addressed store, hash-verified

2306
2307/* Return the price sold to the hero of a given artifact or unique item */
2308long
2309arti_cost(struct obj *otmp)
2310{
2311 if (!otmp->oartifact)
2312 return (long) objects[otmp->otyp].oc_cost;
2313 else if (artilist[(int) otmp->oartifact].cost)
2314 return artilist[(int) otmp->oartifact].cost;
2315 else
2316 return (100L * (long) objects[otmp->otyp].oc_cost);
2317}
2318
2319staticfn uchar
2320abil_to_adtyp(long *abil)

Callers 2

artifact_scoreFunction · 0.85
getpriceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected