|
|
[Package Index | Mudlib Index | Effect Index]
File /std/effects/magic/magic_spell.c
This is the basic inheritable for spells. It is written as an effect
so that it is more exciting than before. This effect
has a classification of "magic.spell.".
This effect has a shadow associated with it. See also: help::effects.c Written by Pinkfish Includes
This class includes the following files /include/magic.h, /include/playtesters.h, /include/tasks.h, /include/player.h, /include/move_failures.h, /include/effect.h, /std/effects/magic/path.h, /include/nroff.h and /include/obj_parser.hMethod index
- cast_spell(string, int, object)
This method casts the actual spell.
- cast_spell_new(string, int, object *, object *)
- check_components(class spell_argument)
This method checks to see if the player has all the needed
components to cast the spell.
- check_disabilities(string, object)
This method checks disabilities of the player.
- check_octogram(object, int, class spell_argument)
This method checks to see if an octogram exists.
- consume_components(string *, object, object *, class spell_argument)
This method will use up the components at the end of each spell stage.
- create_lost_spell(object)
This method creates a lost spell that shows up when you try to memorise
something from a page and the spell escapes.
- destroy_consumable_stuff(class spell_argument, object)
This method destroys the consumables and destroys the container
they are in.
- event_npc_cast_spell(object, object, object *, class spell_argument, int)
This event is called on all the objects in a room when a wizards starts
to cast a spell.
- expand_spell_message(string, object, object *, int)
This method does the expansion of the spell messages as used by the
spell processing code.
- help()
This method returns the help for the spell as a string.
- help_function()
This method creates a function to view the help if the nroff
file is set.
- pre_process_command_line(string)
This method pre-checks a command line to see if it fits into the
currently allowed patterns for the spell.
- pre_process_target_objects(object *)
This method pre-checks the target objects to make sure they are
all correct.
- query_casting_time()
This method returns the current default casting time of the spell.
- query_consumables()
This method queries the shorts of all the things that will need to
be consumed to cast the spell.
- query_critical_stages()
This method returns the array of critical stages.
- query_directed()
This method queries the directed flag of the spell.
- query_dynamic_difficulty(object, object *, string)
This method returns the dynamic difficulty factor of the spell.
- query_fixed_time()
This method returns the fixed time variable of the spell object.
- query_learn_lvl()
This method queries the level at which the learner needs to be to learn
the spell.
- query_magic_spell()
This method will always return 1 for magic spells.
- query_max_casting_time()
This method returns the current default maximum casting time of the spell.
- query_name()
This method returns the name of the spell.
- query_needed()
This method queries all the items needed to cast the spell (that are
not consumed).
- query_nroff_file()
This method returns the nroff file name.
- query_octogram_needed()
This method queries if an octogram is needed to cast the spell.
- query_pivot_casting_bonus()
This method returns the bonus at which the casting time will be
unmodified.
- query_point_cost()
This method queries the point cost of the spell.
- query_power_level()
This queries the power level of the spell.
- query_prevents_movement()
Queries the prevent_movement flag, which disallows movement from the caster's
part while the spell is cast.
- query_ritual()
This method returns the currently set ritual for the spell.
- query_skill_used()
This method queries the skill used to cast the spell.
- query_spell_type()
This method sets the type of spell.
- query_teach_lvl()
This method queries the level at which the teacher needs to be to teach
the spell to someone else.
- query_tm_rate()
This method returns the tm rate of the spell, i.
- safe_to_consume(object)
This function checks whether an item is safe to consume, ie whether or
not it is a quest item or otherwise irreplaceable.
- scale_by_race(int, object)
This method scales the weight by the race.
- set_casting_time(int)
This method sets the casting time of the spell.
- set_consumables(string *)
This method sets the shorts of all the things that will need to
be consumed to cast the spell.
- set_critical_stages(int *)
This method sets the critical stages for the spell.
- set_directed(int)
This method sets the directed flag of the spell.
- set_fixed_time(int)
This method sets the fixed time variable of the spell object.
- set_fixed_tm(int)
This method sets the spell to use TM_FIXED rather than TM_SPELL.
- set_learn_lvl(int)
This method sets the level at which the learner needs to be to learn the
spell.
- set_max_casting_time(int)
This method sets the maximum casting time of the spell.
- set_name(string)
This method sets the name of the spell.
- set_needed(string *)
This method sets all the items needed to cast the spell (that are
not consumed).
- set_nroff_file(string)
This method sets the nroff file name to use for the
help of the spell.
- set_octogram_needed(int)
This method sets if an octogram is needed to cast the spell.
- set_pivot_casting_bonus(int)
This method sets the bonus at which the casting time will be exactly
the set casting time.
- set_point_cost(int)
This method sets the point cost of the spell.
- set_power_level(int)
This sets the power level of the spell.
- set_prevents_movement(int)
This sets the prevent_movement flag.
- set_ritual(mixed *)
This method sets the ritual for the spell.
- set_skill_used(string)
This method sets the skill used to cast the spell.
- set_spell_type(string)
This method sets the type of spell.
- set_teach_lvl(int)
This method sets the level at which the teacher needs to be to teach
the spell to someone else.
- spell_aborted(object, object *, int, int)
This method is called when the spell is aborted.
- spell_failed(object, object *, int)
This is called if the spell runs to completion and the spell then
fails to go off correctly.
- spell_stage(object, class spell_argument, int)
This method does all the process for the specified spell stage.
Public Functions
These are functions that everyone can access.
.
int cast_spell(string words,
int scroll,
object staff)
This method casts the actual spell. It does all the checking for
things like targets and compents, runs the ritual and then
launches the effect.
- Parameters:
words - the command line arguments to the spell
scroll - this flag is 1 if it is cast from a scroll
staff - the staff we are storing a spell in if storing
int cast_spell_new(string args,
int scroll,
object * targets,
object * using)
int check_components(class spell_argument fluff)
This method checks to see if the player has all the needed
components to cast the spell.
|