[Package Index | Mudlib Index | Effect Index]

File /obj/handlers/mag_eff_handler.c

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".

Written by Deutha

Method index

Public Functions

These are functions that everyone can access.

add_octonite_crystal
void add_octonite_crystal(object crystal)

This method adds an octonite crystal into the current list of octonite crystals.

Parameters:
crystal - the crystal to add

See also:
query_octonite_crystals(), update_octonite() and schedule_next()


ambient_enchantment
int ambient_enchantment(object thing)

This method returns the current ambient enchantment for the particular object.

Parameters:
thing - the object to get the ambient enchantment for

Returns:
the ambient enchantment of the object

See also:
do_effect(), choose_effect() and block()


block
int block(object thing)

This method checks to see if the particular object is blocking the use of enchantments.

Parameters:
thing - the object to check for enchantment block

Returns:
1 if it is blocking enchanments, 0 if not

See also:
do_effect(), ambient_enchantment() and choose_effect()


choose_effect
int * choose_effect(int number)

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.

Parameters:
number - the intput number

Returns:
an array as described above

See also:
do_effect(), ambient_enchantment() and block()


do_effect
void do_effect(int number,
               string name,
               object place)

This method causes an effect to occur. The number is the severity of the effect.

Parameters:
number - the severity of the magic infestation
name - the name of the thing being effected
place - the place being effected (room)

See also:
choose_effect(), ambient_enchantment() and block()


extra_look
string extra_look(object thing)

This method returns the extra look information for a piece of octonite. It gives different messages about size depending on its weight.

Parameters:
thing - the object to give na extra look for

Returns:
the extra information about the octonite pebbles


query_octonite_crystals
object * query_octonite_crystals()

This method returns the current list of octonite cystals handled by this handler.

Returns:
the array of octonite crystals

See also:
schedule_next(), update_octonite() and add_octonite_cyrstal()


Protected Functions

These are functions that only objects inheriting the class can access.

schedule_next
void schedule_next()

This schedules the next update to occur. The updates are for the octonite crystals.

See also:
query_octonite_crystals(), update_octonite() and add_octonite_cyrstal()


update_octonite
void update_octonite()

This updatest he values associated with the octonite pebbles. They decay away slowly releasing ambient magic into the background.

See also:
query_octonite_crystals(), schedule_next() and add_octonite_cyrstal()