[an error occurred while processing this directive]
[<a href="index.shtml">Package Index</a></code> | <a href="index_std.shtml">Mudlib Index</a></code> | <a href="index_eff.shtml">Effect Index</a></code>]<br><h2>File /obj/handlers/artifact_handler.c</h2>
Keeps track of all the artifacts and the players known artifacts
arrays.
<h2>Method index</h2>
<ul>
<li><a href="#add_artifact">add_artifact</a>(string, string, int, int, int, int)<br/>
Add a new artifact into the artificat mapping.
<li><a href="#add_known">add_known</a>(string, string)<br/>
Place an artifact into a players known artifact list.
<li><a href="#diagnose_artifact">diagnose_artifact</a>(object, object, )<br/>
Let a player attempt to find out what type of artifact the
thing is.
<li><a href="#query_artifact">query_artifact</a>(string)<br/>
Returns the information about the named artificats.
<li><a href="#query_artifact_bonus">query_artifact_bonus</a>(string)<br/>
Find the bonus to make associated with the artifact.
<li><a href="#query_artifact_file">query_artifact_file</a>(string)<br/>
Find the file associated with the artifact.
<li><a href="#query_artifact_level">query_artifact_level</a>(string, int)<br/>
Find the level of the artifact.
<li><a href="#query_artifact_max">query_artifact_max</a>(string)<br/>
Find the maximum level associated with the artifact.
<li><a href="#query_artifact_min">query_artifact_min</a>(string)<br/>
Find the minimum level associated with the artifact.
<li><a href="#query_artifact_value">query_artifact_value</a>(string, int)<br/>
Determine the value of the artificant.
<li><a href="#query_artifact_value_info">query_artifact_value_info</a>(string)<br/>
Find the value associated with the artifact.
<li><a href="#query_artifacts">query_artifacts</a>()<br/>
This method returns the artifacts mapping.
<li><a href="#query_known">query_known</a>(string, string)<br/>
A person will not forget how to recognise an artifact (unless they
    refresh, in which case all of them are forgotten, i.
<li><a href="#query_wand_name">query_wand_name</a>()<br/>
The name of the wand.
<li><a href="#remove_artifact">remove_artifact</a>(string)<br/>
Remove the artifact of the given name.
<li><a href="#save_me">save_me</a>()<br/>Saves the current state to disk.
<li><a href="#zap">zap</a>(object, object, object)<br/>
Zap the wand!
</ul>
<h2>Public Functions</h2>
These are functions that everyone can access.<p>
<dl>
<dt class="autodocfuncname"><a name="add_artifact">
add_artifact</a><pre class="autodocfuncdef">
void add_artifact(string name,
                  string file,
                  int max,
                  int min,
                  int bonus,
                  int value)
</pre><dd><br />
Add a new artifact into the artificat mapping. <br />
<br /><dl>
<dd><b>Parameters:</b><br />
name - the name of the artifact<br />
file - the file name of the artifact<br />
max - the maximum level<br />
min - the minimum level<br />
bonus - the bonus required to make<br />
value - the value of the artifact
<br />
<br />
<dd><b>See also:</b>
<br /><a href="#query_artificats">query_artificats()</a><br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="add_known">
add_known</a><pre class="autodocfuncdef">
void add_known(string person,
               string artifact)
</pre><dd><br />
Place an artifact into a players known artifact list.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
person - the name of the person knowing the artifact<br />
artifact - the name of the artifact being know
<br />
<br />
<br /></dl>

<dt class="autodocfuncname"><a name="diagnose_artifact">
diagnose_artifact</a><pre class="autodocfuncdef">
void diagnose_artifact(object thing,
                       object person,
                        object)
</pre><dd><br />
Let a player attempt to find out what type of artifact the
thing is.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
thing - the item to diagnose<br />
person - the person doing the diagnosis
<br />
<br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_artifact">
query_artifact</a><pre class="autodocfuncdef">
int query_artifact(string name)
</pre><dd><br />
Returns the information about the named artificats.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
name - the artificant name to get information on<br />
<br />
<dd><b>Returns:</b>
<br />the informatioj on the artificant, 0 if the artifact does not exist
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_artifact_bonus">
query_artifact_bonus</a><pre class="autodocfuncdef">
int query_artifact_bonus(string name)
</pre><dd><br />
Find the bonus to make associated with the artifact.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
name - the name of the artifact<br />
<br />
<dd><b>Returns:</b>
<br />the bonus to make associated with the artifact
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_artifact_file">
query_artifact_file</a><pre class="autodocfuncdef">
string query_artifact_file(string name)
</pre><dd><br />
Find the file associated with the artifact.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
name - the name of the artifact<br />
<br />
<dd><b>Returns:</b>
<br />the file associated with the artifact
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_artifact_level">
query_artifact_level</a><pre class="autodocfuncdef">
int query_artifact_level(string name,
                         int bonus)
</pre><dd><br />
Find the level of the artifact.  The level is determined as the
difference between the minimum and maximum artifact level squared
divided by the bonus passed in minus the bonus to create  plus the difference
between the maximum and minimum levels plus the maximum level.<br>
ie:<pre><code>
level = (((max-min) * (max-min)) / (bonus - make_bonus + max - min)) + min
</pre></code><br />
<br /><dl>
<dd><b>Parameters:</b><br />
name - the name of the artifact<br />
bonus - the bonus modifier<br />
<br />
<dd><b>Returns:</b>
<br />the level of the artifact
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_artifact_max">
query_artifact_max</a><pre class="autodocfuncdef">
int query_artifact_max(string name)
</pre><dd><br />
Find the maximum level associated with the artifact.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
name - the name of the artifact<br />
<br />
<dd><b>Returns:</b>
<br />the maximum level associated with the artifact
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_artifact_min">
query_artifact_min</a><pre class="autodocfuncdef">
int query_artifact_min(string name)
</pre><dd><br />
Find the minimum level associated with the artifact.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
name - the name of the artifact<br />
<br />
<dd><b>Returns:</b>
<br />the minimum level associated with the artifact
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_artifact_value">
query_artifact_value</a><pre class="autodocfuncdef">
int query_artifact_value(string name,
                         int bonus)
</pre><dd><br />
Determine the value of the artificant.  The value is determined by
the following equation:<br><code><pre>
value = (value * max) / query_artifiact_level(name, bonus)
</code></pre><br />
<br /><dl>
<dd><b>Parameters:</b><br />
name - the name of the artifact<br />
bonus - the bonus modifier<br />
<br />
<dd><b>Returns:</b>
<br />the value of the artifact
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_artifact_value_info">
query_artifact_value_info</a><pre class="autodocfuncdef">
int query_artifact_value_info(string name)
</pre><dd><br />
Find the value associated with the artifact.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
name - the name of the artifact<br />
<br />
<dd><b>Returns:</b>
<br />the value associated with the artifact
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_artifacts">
query_artifacts</a><pre class="autodocfuncdef">
mapping query_artifacts()
</pre><dd><br />
This method returns the artifacts mapping.
The artifacts mapping has elements of the form:<br><pre><code>
   name : ({ file, max level, min level, bonus to make, value info })
e.g. "wand of eternal light" :
       ({ "/obj/wands/eternal_light", 85, 65, 250, 10000 })</code></pre><br />
<br /><dl>
<dd><b>Returns:</b>
<br />the artificats mapping
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_known">
query_known</a><pre class="autodocfuncdef">
int query_known(string person,
                string artifact)
</pre><dd><br />
A person will not forget how to recognise an artifact (unless they
    refresh, in which case all of them are forgotten, i.e. the file
    is wiped) so to let a person learn to recognise an artifact, add
    a new line to their file consisting of its name and to see if
    they know an artifact, check in their file for its name. This
    method doesn't require a library handler.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
person - the person check to see if they know the artifact<br />
artifact - the artifact being checked<br />
<br />
<dd><b>Returns:</b>
<br />1 if they know it, 0 if they do not
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_wand_name">
query_wand_name</a><pre class="autodocfuncdef">
string query_wand_name()
</pre><dd><br />
The name of the wand.<br />
<br /><dl>
<dd><b>Returns:</b>
<br />the wand name
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="remove_artifact">
remove_artifact</a><pre class="autodocfuncdef">
void remove_artifact(string name)
</pre><dd><br />
Remove the artifact of the given name.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
name - the name of the artifiact to remove
<br />
<br />
<br /></dl>

<dt class="autodocfuncname"><a name="save_me">
save_me</a><pre class="autodocfuncdef">
void save_me()
</pre><dd><br />Saves the current state to disk. <br />

<dt class="autodocfuncname"><a name="zap">
zap</a><pre class="autodocfuncdef">
void zap(object thing,
         object person,
         object wand)
</pre><dd><br />
Zap the wand!<br />
<br /><dl>
<dd><b>Parameters:</b><br />
thing - the thing to zap with the wand<br />
person - the person doing the zapping<br />
wand - the wand being zapped
<br />
<br />
<br /></dl>

</dl>
[an error occurred while processing this directive]

