[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/mag_eff_handler.c</h2>
This handler controls the ambient enchantment effects and effects
from solid grains of octarine.  Ambient enchantment is caused by
the use of spells in certain locations.  Ambient enchantment can
be blocked by use of the property "enchantment block".<p>Written by Deutha
<h2>Method index</h2>
<ul>
<li><a href="#add_octonite_crystal">add_octonite_crystal</a>(object)<br/>
This method adds an octonite crystal into the current list of
octonite crystals.
<li><a href="#ambient_enchantment">ambient_enchantment</a>(object)<br/>
This method returns the current ambient enchantment for the particular
object.
<li><a href="#block">block</a>(object)<br/>
This method checks to see if the particular object is blocking the use
of enchantments.
<li><a href="#choose_effect">choose_effect</a>(int)<br/>
This method chooses a random effect from the curent list of effects
defined in the handler.
<li><a href="#do_effect">do_effect</a>(int, string, object)<br/>
This method causes an effect to occur.
<li><a href="#extra_look">extra_look</a>(object)<br/>
This method returns the extra look information for a piece of octonite.
<li><a href="#query_octonite_crystals">query_octonite_crystals</a>()<br/>
This method returns the current list of octonite cystals handled
by this handler.
<li><a href="#schedule_next">schedule_next</a>()<br/>
This schedules the next update to occur.
<li><a href="#update_octonite">update_octonite</a>()<br/>
This updatest he values associated with the octonite pebbles.
</ul>
<h2>Public Functions</h2>
These are functions that everyone can access.<p>
<dl>
<dt class="autodocfuncname"><a name="add_octonite_crystal">
add_octonite_crystal</a><pre class="autodocfuncdef">
void add_octonite_crystal(object crystal)
</pre><dd><br />
This method adds an octonite crystal into the current list of
octonite crystals.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
crystal - the crystal to add<br />
<br />
<dd><b>See also:</b>
<br /><a href="#query_octonite_crystals">query_octonite_crystals()</a>, <a href="#update_octonite">update_octonite()</a> and <a href="#schedule_next">schedule_next()
</a><br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="ambient_enchantment">
ambient_enchantment</a><pre class="autodocfuncdef">
int ambient_enchantment(object thing)
</pre><dd><br />
This method returns the current ambient enchantment for the particular
object.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
thing - the object to get the ambient enchantment for<br />
<br />
<dd><b>Returns:</b>
<br />the ambient enchantment of the object<br /><br />
<dd><b>See also:</b>
<br /><a href="#do_effect">do_effect()</a>, <a href="#choose_effect">choose_effect()</a> and <a href="#block">block()
</a><br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="block">
block</a><pre class="autodocfuncdef">
int block(object thing)
</pre><dd><br />
This method checks to see if the particular object is blocking the use
of enchantments.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
thing - the object to check for enchantment block<br />
<br />
<dd><b>Returns:</b>
<br />1 if it is blocking enchanments, 0 if not<br /><br />
<dd><b>See also:</b>
<br /><a href="#do_effect">do_effect()</a>, <a href="#ambient_enchantment">ambient_enchantment()</a> and <a href="#choose_effect">choose_effect()
</a><br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="choose_effect">
choose_effect</a><pre class="autodocfuncdef">
int * choose_effect(int number)
</pre><dd><br />
This method chooses a random effect from the curent list of effects
defined in the handler.  It returns an array consisting of
two elements, the first is the number, the second is a random
number between the input number multiplied by 6 and then divided
by 1000.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
number - the intput number<br />
<br />
<dd><b>Returns:</b>
<br />an array as described above<br /><br />
<dd><b>See also:</b>
<br /><a href="#do_effect">do_effect()</a>, <a href="#ambient_enchantment">ambient_enchantment()</a> and <a href="#block">block()
</a><br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="do_effect">
do_effect</a><pre class="autodocfuncdef">
void do_effect(int number,
               string name,
               object place)
</pre><dd><br />
This method causes an effect to occur.  The number is the severity
of the effect.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
number - the severity of the magic infestation<br />
name - the name of the thing being effected<br />
place - the place being effected (room)<br />
<br />
<dd><b>See also:</b>
<br /><a href="#choose_effect">choose_effect()</a>, <a href="#ambient_enchantment">ambient_enchantment()</a> and <a href="#block">block()
</a><br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="extra_look">
extra_look</a><pre class="autodocfuncdef">
string extra_look(object thing)
</pre><dd><br />
This method returns the extra look information for a piece of octonite.
It gives different messages about size depending on its weight.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
thing - the object to give na extra look for<br />
<br />
<dd><b>Returns:</b>
<br />the extra information about the octonite pebbles
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="query_octonite_crystals">
query_octonite_crystals</a><pre class="autodocfuncdef">
object * query_octonite_crystals()
</pre><dd><br />
This method returns the current list of octonite cystals handled
by this handler.<br />
<br /><dl>
<dd><b>Returns:</b>
<br />the array of octonite crystals<br /><br />
<dd><b>See also:</b>
<br /><a href="#schedule_next">schedule_next()</a>, <a href="#update_octonite">update_octonite()</a> and <a href="#add_octonite_cyrstal">add_octonite_cyrstal()
</a><br /><br /><br /></dl>

</dl>
<h2>Protected Functions</h2>
These are functions that only objects inheriting the class can access.<p>
<dl>
<dt class="autodocfuncname"><a name="schedule_next">
schedule_next</a><pre class="autodocfuncdef">
void schedule_next()
</pre><dd><br />
This schedules the next update to occur.  The updates are for the
octonite crystals.<br />
<br /><dl>
<dd><b>See also:</b>
<br /><a href="#query_octonite_crystals">query_octonite_crystals()</a>, <a href="#update_octonite">update_octonite()</a> and <a href="#add_octonite_cyrstal">add_octonite_cyrstal()
</a><br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="update_octonite">
update_octonite</a><pre class="autodocfuncdef">
void update_octonite()
</pre><dd><br />
This updatest he values associated with the octonite pebbles.  They
decay away slowly releasing ambient magic into the background.<br />
<br /><dl>
<dd><b>See also:</b>
<br /><a href="#query_octonite_crystals">query_octonite_crystals()</a>, <a href="#schedule_next">schedule_next()</a> and <a href="#add_octonite_cyrstal">add_octonite_cyrstal()
</a><br /><br /><br /></dl>

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

