[Package Index | Mudlib Index | Effect Index]

File /obj/handlers/potion.c

This class is the potion information handler.

This will handle all the information related to potions: the skill required, the failure result, etc. (more to be added as necessary). Each potion will be an object in itself (generally a virtual object). There will be an index file which gives the pathname of the object for each potion "title". This will be loaded into a mapping on creation of the handler. The actual potion objects will be created as they are referenced (assuming they're in the index) and stored as the value of another mapping.

Written by Jeremy

Started ??/??/95

Inherits

This class inherits the following classes /std/object.c

Method index

Public Functions

These are functions that everyone can access.

clone_reagent
mixed clone_reagent(string s)

This method creates a reagent object. It creates the potion object and then creates the reagent on it.

Parameters:
potion - the potion to create

Returns:
the regent object


query_chant
string query_chant(string s)

This method returns the chant of the potion name. The expand_nickname function will be done on the input name before looking it up.

Parameters:
s - the name to lookup

Returns:
the chant

See also:
query_min_level()


query_min_level
int query_min_level(string s)

This method returns the minimum level of the potion name. The expand_nickname function will be done on the input name before looking it up.

Parameters:
s - the name to lookup

Returns:
the minimum level

See also:
query_chant()


query_paths
mapping query_paths()

This method returns the paths that are searched for potion objects.

Returns:
the mapping of paths


query_potion
object query_potion(string s)

This method clones up a potion object. It does not setup the reagent in the potion.

Parameters:
s - the potion to create

Returns:
the potion object

See also:
clone_reagent()


query_potions
mapping query_potions()

This method returns the potion mapping. This the list of known potions.

Returns:
the potion mapping