Artifact prices

Each artifact has its own individual price, rather than being solely
based on the cost of its base item.
This commit is contained in:
kmhugo
2002-02-02 19:21:33 +00:00
parent 8f1ad60a0e
commit 532242f07f
7 changed files with 72 additions and 48 deletions

View File

@@ -1342,6 +1342,19 @@ uchar inv_prop;
return((boolean)(arti && (arti->inv_prop == inv_prop)));
}
/* Return the price sold to the hero of a given artifact or unique item */
long
arti_cost(otmp)
struct obj *otmp;
{
if (!otmp->oartifact)
return ((long)objects[otmp->otyp].oc_cost);
else if (artilist[otmp->oartifact].cost)
return (artilist[otmp->oartifact].cost);
else
return (100L * (long)objects[otmp->otyp].oc_cost);
}
#endif /* OVLB */
/*artifact.c*/