[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/effects/faith/basic_ritual.c</h2>
This array respresents all of the skills that will be sourced from the 
player creating an imbue.

The remainder will be source from the player 'using' the imbue.
<h2>Includes</h2>
This class includes the following files <a href="include.guilds.h.shtml">/include/guilds.h</a>, <a href="include.nroff.h.shtml">/include/nroff.h</a>, <a href="include.tasks.h.shtml">/include/tasks.h</a>, <a href="include.obj_parser.h.shtml">/include/obj_parser.h</a>, <a href="include.ritual_system.h.shtml">/include/ritual_system.h</a>, <a href="include.weather.h.shtml">/include/weather.h</a>, <a href="include.deity.h.shtml">/include/deity.h</a>, <a href="include.effect.h.shtml">/include/effect.h</a>, <a href="include.move_failures.h.shtml">/include/move_failures.h</a>, <a href="include.playtesters.h.shtml">/include/playtesters.h</a> and <a href="include.player.h.shtml">/include/player.h</a><h2>Method index</h2>
<dl><ul>
<li><a href="#add_stage">add_stage</a>(string *, string, int, string *, string *, int, int, function, string, int)<br/>
Use add stage if you don't want to change an existing stage, 
just add one onto the end, it calculates the identifier and calls
set_stage itself.
<li><a href="#calc_old_bonus">calc_old_bonus</a>(int)<li><a href="#cast_spell">cast_spell</a>(string, int, object)<br/>
The part that kick starts all of the other parts.
<li><a href="#check_benefit">check_benefit</a>(class ritual, string)<br/>
A list of all of the things that can decrease difficulty.
<li><a href="#check_difficulty">check_difficulty</a>(class ritual, string)<br/>
A list of all of the things that can increase difficulty.
<li><a href="#check_impediment">check_impediment</a>(class ritual, string)<br/>
A list of all the types of impediments we are looking for.
<li><a href="#end">end</a>(object, class ritual, int)<li><a href="#generate_message">generate_message</a>(string *, object, object *, string, string, string)<li><a href="#get_room_targets">get_room_targets</a>(class ritual)<li><a href="#help">help</a>()<li><a href="#perform_ritual">perform_ritual</a>(object, string, int, object *, object)<br/>
This is called by the perform command, it replaces cast_spell.
<li><a href="#query_classification">query_classification</a>()<li><a href="#query_faith_ritual">query_faith_ritual</a>()<li><a href="#query_indefinite">query_indefinite</a>()<li><a href="#query_point_cost">query_point_cost</a>(object, object *, class ritual)<li><a href="#query_power_level">query_power_level</a>(class ritual, int)<br/>
Query the difficulty of a given stage.
<li><a href="#query_prayers">query_prayers</a>()<li><a href="#query_ritual">query_ritual</a>()<li><a href="#query_ritual_formatted">query_ritual_formatted</a>()<li><a href="#query_shadow_ob">query_shadow_ob</a>()<li><a href="#ritual_check_target">ritual_check_target</a>(object, object)<li><a href="#ritual_failed">ritual_failed</a>(class ritual, int)<li><a href="#ritual_resisted">ritual_resisted</a>(class ritual, int)<br/>
This -must- be masked if you want to use it.
<li><a href="#set_alignment">set_alignment</a>(int *)<br/>
Set the max and min alignments for this ritual.
<li><a href="#set_family">set_family</a>(string)<br/>
Sets the family of the ritual.
<li><a href="#set_gp_cost">set_gp_cost</a>(int)<br/>
What is the base GP cost for this ritual?
<li><a href="#set_learn_level">set_learn_level</a>(int)<br/>
The minimum level required to teach this ritual.
<li><a href="#set_name">set_name</a>(string)<br/>
Generic set name function for the ritual.
<li><a href="#set_nroff_file">set_nroff_file</a>(string)<br/>
The arcane art of setting a helpfile.
<li><a href="#set_offensive">set_offensive</a>(int)<br/>
Does this ritual initiate combat?
<li><a href="#set_pk_status">set_pk_status</a>(int)<li><a href="#set_requirements">set_requirements</a>(int, int, int)<br/>
Sets requirements for this ritual
<li><a href="#set_resist_skill">set_resist_skill</a>(string)<br/>
Set a skill to resist.
<li><a href="#set_stage">set_stage</a>(int, string *, string, int, string *, string *, int, int, function, string, int)<br/>
Lets you set the stages manually if you know the identifiers.
<li><a href="#set_target_check">set_target_check</a>(function)<br/>
This is used to stop a ritual being cast on specific targets that aren't 
covered otherwise.
<li><a href="#set_targeting">set_targeting</a>(int)<br/>
How can this ritual be targeted?
<li><a href="#set_teach_level">set_teach_level</a>(int)<br/>
The minimum level required to teach this ritual.
<li><a href="#set_teach_skill">set_teach_skill</a>(string)<br/>
The skill check used for teaching.
<li><a href="#teach">teach</a>(object, string)<br/>
This now uses the new guild ability system to check for allowed teachers
This actually allows instructors to use teach, but I don't think players
will like it, since that means the instructors have to be very high level.
</ul><h2>Public Functions</h2>
These are functions that everyone can access.<p>
.<ul><a name="add_stage">
add_stage</a><pre>
varargs void add_stage(string * messages,
                       string skill,
                       int level,
                       string * materials,
                       string * consumables,
                       int time_modifier,
                       int pause,
                       function f,
                       string prayer,
                       int imbue_source)
</pre></br>
Use add stage if you don't want to change an existing stage, 
just add one onto the end, it calculates the identifier and calls
set_stage itself.
<br/><ul>
<li><b>See also:</b>
<br/>set_stage
.c</dl>

<ul><a name="calc_old_bonus">
calc_old_bonus</a><pre>
int calc_old_bonus(int bonus)
</pre>
<ul><a name="cast_spell">
cast_spell</a><pre>
int cast_spell(string words,
               int scroll,
               object staff)
</pre></br>
The part that kick starts all of the other parts.
It is called by the cast command.
I think this is depreciated. Lets check!


<ul><a name="check_benefit">
check_benefit</a><pre>
mapping check_benefit(class ritual info,
                      string type)
</pre></br>
A list of all of the things that can decrease difficulty.
This uses the same types as check impediment, but returns
a mapping containing a string and a float describing why 
it is more difficult.
ie: ([ "on fire", 0.75 ]);
would mean that a player gets the message:
It seems easier to perform Great Womble because you are on fire.
They then receive a bonus of 75% to their stats.
These bonuses are cumulative.


<ul><a name="check_difficulty">
check_difficulty</a><pre>
mapping check_difficulty(class ritual info,
                         string type)
</pre></br>
A list of all of the things that can increase difficulty.
This uses the same types as check impediment, but returns
a mapping containing a string and a float describing why 
it is more difficult.
ie: ([ "on fire", 0.75 ]);
would mean that a player gets the message:
You are having trouble performing Great Womble because you are on fire.
They then suffer a penalty of 75% to their stats.
These penalties are cumulative.


<ul><a name="check_impediment">
check_impediment</a><pre>
string * check_impediment(class ritual info,
                          string type)
</pre></br>
A list of all the types of impediments we are looking for.
Centralised for easy access!

<ul><a name="end">
end</a><pre>
void end(object person,
         class ritual info,
         int id)
</pre>
<ul><a name="generate_message">
generate_message</a><pre>
string * generate_message(string * _messages,
                          object caster,
                          object * targets,
                          string deity,
                          string ritual,
                          string prayer)
</pre>
<ul><a name="get_room_targets">
get_room_targets</a><pre>
object * get_room_targets(class ritual _info)
</pre>
<ul><a name="help">
help</a><pre>
string help()
</pre>
<ul><a name="perform_ritual">
perform_ritual</a><pre>
int perform_ritual(object player,
                   string args,
                   int scroll,
                   object * targets,
                   object imbue)
</pre></br>
This is called by the perform command, it replaces cast_spell.


<ul><a name="query_classification">
query_classification</a><pre>
string query_classification()
</pre>
<ul><a name="query_faith_ritual">
query_faith_ritual</a><pre>
int query_faith_ritual()
</pre>
<ul><a name="query_indefinite">
query_indefinite</a><pre>
int query_indefinite()
</pre>
<ul><a name="query_point_cost">
query_point_cost</a><pre>
int query_point_cost(object caster,
                     object * targets,
                     class ritual temp)
</pre>
<ul><a name="query_power_level">
query_power_level</a><pre>
int query_power_level(class ritual temp,
                      int stage)
</pre></br>
Query the difficulty of a given stage.


<ul><a name="query_prayers">
query_prayers</a><pre>
string * query_prayers()
</pre>
<ul><a name="query_ritual">
query_ritual</a><pre>
int query_ritual()
</pre>
<ul><a name="query_ritual_formatted">
query_ritual_formatted</a><pre>
string query_ritual_formatted()
</pre>
<ul><a name="query_shadow_ob">
query_shadow_ob</a><pre>
string query_shadow_ob()
</pre>
<ul><a name="ritual_check_target">
ritual_check_target</a><pre>
int ritual_check_target(object caster,
                        object targets)
</pre>
<ul><a name="ritual_failed">
ritual_failed</a><pre>
void ritual_failed(class ritual info,
                   int bonus)
</pre>
<ul><a name="ritual_resisted">
ritual_resisted</a><pre>
void ritual_resisted(class ritual info,
                     int bonus)
</pre></br>
This -must- be masked if you want to use it.


<ul><a name="set_alignment">
set_alignment</a><pre>
void set_alignment(int * align)
</pre></br>
Set the max and min alignments for this ritual.
Runtimes if not handed an array of 2 ints 
<br/><ul>
<li><b>Parameters:</b>
<br/>align - An array of 2 ints. ({ min, max })

</dl>

<ul><a name="set_family">
set_family</a><pre>
void set_family(string family)
</pre></br>
Sets the family of the ritual.
Currently this is offensive, defensive, curing, but this will change.
<br/><ul>
<li><b>Parameters:</b>
<br/>family - The family of the ritual.

</dl>

<ul><a name="set_gp_cost">
set_gp_cost</a><pre>
void set_gp_cost(int amount)
</pre></br>
What is the base GP cost for this ritual?
<br/><ul>
<li><b>Parameters:</b>
<br/>amount - Base gp cost.

</dl>

<ul><a name="set_learn_level">
set_learn_level</a><pre>
void set_learn_level(int level)
</pre></br>
The minimum level required to teach this ritual.
Will be modified by other factors.
<br/><ul>
<li><b>Parameters:</b>
<br/>level - The base level for learning

</dl>

<ul><a name="set_name">
set_name</a><pre>
void set_name(string name)
</pre></br>
Generic set name function for the ritual. 
Does exactly what you think it does.
<br/><ul>
<li><b>Parameters:</b>
<br/>name - The name of the ritual.

</dl>

<ul><a name="set_nroff_file">
set_nroff_file</a><pre>
void set_nroff_file(string path)
</pre></br>
The arcane art of setting a helpfile.
Once you have written a nroff file, set it using
set_nroff_file( path );


<ul><a name="set_offensive">
set_offensive</a><pre>
void set_offensive(int value)
</pre></br>
Does this ritual initiate combat?
1 yes, 0 no.


<ul><a name="set_pk_status">
set_pk_status</a><pre>
void set_pk_status(int pk)
</pre>
<ul><a name="set_requirements">
set_requirements</a><pre>
void set_requirements(int speech,
                      int movement,
                      int vision)
</pre></br>
Sets requirements for this ritual
<br/><ul>
<li><b>Parameters:</b>
<br/>speech - Does the ritual need speech
<br/>movement - Does the ritual require the ability to move

</dl>

<ul><a name="set_resist_skill">
set_resist_skill</a><pre>
void set_resist_skill(string skill)
</pre></br>
Set a skill to resist.
<br/><ul>
<li><b>Parameters:</b>
<br/>skill - the skill!

</dl>

<ul><a name="set_stage">
set_stage</a><pre>
varargs void set_stage(int ident,
                       string * messages,
                       string skill,
                       int level,
                       string * materials,
                       string * consumables,
                       int time_modifier,
                       int pause,
                       function f,
                       string prayer,
                       int imbue_source)
</pre></br>
Lets you set the stages manually if you know the identifiers.
<br/><ul>
<li><b>Parameters:</b>
<br/>ident - The ident that you want to modify.
<br/>messages - The messages for the stage ({ What you see, what they see,  
   what target sees. })
<br/>skill - An optional skill that you can set for this stage.
<br/>level - The level of the skill required to perform the stage
<br/>materials - The required materials
<br/>consumables - Materials that are consumed.
<br/>time_modifier - Increases the base length of time this stage takes.
<br/>Pause - Mandatory pause for this stage.
<br/>f - Function called on completion of the stage.
<br/>prayer - A prayer required to cast this spell, it looks for it in a 
  prayer book.
<br/>imbue_source - Source of skill checks in imbues, either IMBUE_PRIEST
  or IMBUE_PERFORMER. [If you don't set it, it evaulates it automatically.]

</dl>

<ul><a name="set_target_check">
set_target_check</a><pre>
void set_target_check(function pointer)
</pre></br>
This is used to stop a ritual being cast on specific targets that aren't 
covered otherwise.
IE: A ritual that can only be cast on frogs.
set_target_check( (: $1->query_race() != "frog" :) ); would make this happen.
<br/><ul>
<li><b>Parameters:</b>
<br/>pointer - A function pointer to check.

</dl>

<ul><a name="set_targeting">
set_targeting</a><pre>
void set_targeting(int type)
</pre></br>
How can this ritual be targeted?

The following are valid args:
<ul>
<li>RITUAL_DIRECT_LIVING
<li>RITUAL_DIRECT_NON_LIVING
<li>RITUAL_DIRECT_SELF
<li>RITUAL_DIRECT_MULTIPLE
<li>RITUAL_DIRECT_EXTERN
<li>RITUAL_DIRECT_ROOM
</ul>
It is better to use the or symbol '|' to add together flags than the
plus symbol '+'.  This is because if you add the same flag twice
(acidently) with the + the result will be undefined, but definitely
incorrect.  With an or the result will still be the correct flags set.
<br/><ul>
<li><b>Parameters:</b>
<br/>type - The new targeting info.
<li><b>Example:</b>
<br/><pre>set_targeting(0); // Cannot be directed at a target at all.</pre><br/><pre>
set_targeting(RITUAL_DIRECT_LIVING | RITUAL_DIRECT_NON_LIVING);</pre><br/><pre>
set_targeting(RITUAL_DIRECT_LIVING | RITUAL_DIRECT_MULTIPLE);
</pre></dl>

<ul><a name="set_teach_level">
set_teach_level</a><pre>
void set_teach_level(int level)
</pre></br>
The minimum level required to teach this ritual.
Will be modified by other factors.
<br/><ul>
<li><b>Parameters:</b>
<br/>level - This is the base level for teaching.

</dl>

<ul><a name="set_teach_skill">
set_teach_skill</a><pre>
void set_teach_skill(string skill)
</pre></br>
The skill check used for teaching.
<br/><ul>
<li><b>Parameters:</b>
<br/>skill - The skill.

</dl>

<ul><a name="teach">
teach</a><pre>
int teach(object target,
          string ritual)
</pre></br>
This now uses the new guild ability system to check for allowed teachers
This actually allows instructors to use teach, but I don't think players
will like it, since that means the instructors have to be very high level.



[an error occurred while processing this directive]

