[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 /std/basic/enchant.c</h2>
Module to handle the amount of magical charge (enchantment) of an
object has.  The maximum enchantment of an item is determined by
by its weight - the material of composition is not yet taken into
account.
<p>
Enchanting an object will add to its value, and, if the object
is an item of armour, will improve its armour class.
<p>Written by Pinkfish
<h2>Method index</h2>
<dl><ul>
<li><a href="#add_enchant">add_enchant</a>(int)<br/>
This method changes the current enchanment level.
<li><a href="#enchant_string">enchant_string</a>()<br/>
This method returns the current enchantment string for the object.
<li><a href="#query_degrade_enchant">query_degrade_enchant</a>()<br/>
This method returns the maximum enchantment before the enchantment
starts to degrade.
<li><a href="#query_enchant">query_enchant</a>()<br/>
This method queries the current enchantment level.
<li><a href="#query_enchant_set_time">query_enchant_set_time</a>()<br/>
This method returns the time the time the enchantment was set.
<li><a href="#query_max_enchant">query_max_enchant</a>()<br/>
This method returns the maximum possible enchantment for the
object.
<li><a href="#query_real_enchant">query_real_enchant</a>()<br/>
This method returns the actual enchant of the object.
<li><a href="#set_degrade_enchant">set_degrade_enchant</a>(int)<br/>
This method sets the enchantment at which things start to degrade.
<li><a href="#set_enchant">set_enchant</a>(int)<br/>
This method sets the current enchantment level.
<li><a href="#set_enchant_set_time">set_enchant_set_time</a>(int)<br/>
This method sets the time at which the enchant level was set.
</ul><h2>Public Functions</h2>
These are functions that everyone can access.<p>
.<ul><a name="add_enchant">
add_enchant</a><pre>
int add_enchant(int number)
</pre></br>
This method changes the current enchanment level.
<br/><ul>
<li><b>Parameters:</b>
<br/>numnber - the amount to chant the enchantment level by
<li><b>See also:</b>
<br/><a href="#enchant_string">enchant_string()</a>, <a href="#query_enchant">query_enchant()</a>, <a href="#set_enchant">set_enchant()</a> and <a href="#query_max_enchant">query_max_enchant()
</a></dl>

<ul><a name="enchant_string">
enchant_string</a><pre>
string enchant_string()
</pre></br>
This method returns the current enchantment string for the object.  The 
string is created from the percentage of the max enchantment that it is 
enchanted to.  If the object is also a talisman, an identifying string is 
appended to the enchantment message.
<p>
These messages are only visible to creators and players who can see
octarine.
<p>
If the property "octarine_mess" is set, then this will be printed instead 
of the automatically generated enchantment message.
<p>
If the property "talisman_mess" is set, then this will be printed instead
of the automatically generated talisman message if appropriate.
<br/><ul>
<li><b>Returns:</b>
<br/>the enchantment string and talisman string
<li><b>See also:</b>
<br/><a href="#set_enchant">set_enchant()</a>, <a href="#add_enchant">add_enchant()</a>, <a href="#query_max_enchant">query_max_enchant()</a> and <a href="#query_enchant">query_enchant()
</a></dl>

<ul><a name="query_degrade_enchant">
query_degrade_enchant</a><pre>
int query_degrade_enchant()
</pre></br>
This method returns the maximum enchantment before the enchantment
starts to degrade.
<br/><ul>
<li><b>Returns:</b>
<br/>the enchantment level which enchantment degrades to

</dl>

<ul><a name="query_enchant">
query_enchant</a><pre>
int query_enchant()
</pre></br>
This method queries the current enchantment level. 
<br/><ul>
<li><b>Parameters:</b>
<br/>number - the new enchantment level
<li><b>See also:</b>
<br/><a href="#enchant_string">enchant_string()</a>, <a href="#set_enchant">set_enchant()</a>, <a href="#query_max_enchant">query_max_enchant()</a> and <a href="#add_enchant">add_enchant()
</a></dl>

<ul><a name="query_enchant_set_time">
query_enchant_set_time</a><pre>
int query_enchant_set_time()
</pre></br>
This method returns the time the time the enchantment was set.
<br/><ul>
<li><b>Returns:</b>
<br/>the time the enchantment was set

</dl>

<ul><a name="query_max_enchant">
query_max_enchant</a><pre>
int query_max_enchant()
</pre></br>
This method returns the maximum possible enchantment for the
object.  This is based on its weight.
<br/><ul>
<li><b>Returns:</b>
<br/>the maximum enchantment

</dl>

<ul><a name="query_real_enchant">
query_real_enchant</a><pre>
int query_real_enchant()
</pre></br>
This method returns the actual enchant of the object.
<br/><ul>
<li><b>Returns:</b>
<br/>the actual enchant value

</dl>

<ul><a name="set_degrade_enchant">
set_degrade_enchant</a><pre>
void set_degrade_enchant(int enchant)
</pre></br>
This method sets the enchantment at which things start to degrade.
<br/><ul>
<li><b>Parameters:</b>
<br/>enchant - the enchantment level to set it at

</dl>

<ul><a name="set_enchant">
set_enchant</a><pre>
void set_enchant(int number)
</pre></br>
This method sets the current enchantment level.   If it is greator than
the max enchantment level then it will be set to the maximum
enchantment level.
<br/><ul>
<li><b>Parameters:</b>
<br/>number - the new enchantment level
<li><b>See also:</b>
<br/><a href="#enchant_string">enchant_string()</a>, <a href="#query_enchant">query_enchant()</a>, <a href="#query_max_enchant">query_max_enchant()</a> and <a href="#add_enchant">add_enchant()
</a></dl>


<h2>Protected Functions</h2>
These are functions that only objects inheriting the class can access.<p>
<ul><a name="set_enchant_set_time">
set_enchant_set_time</a><pre>
void set_enchant_set_time(int tim)
</pre></br>
This method sets the time at which the enchant level was set.
<br/><ul>
<li><b>Parameters:</b>
<br/>tim - the time to set it to

</dl>


[an error occurred while processing this directive]

