Home

[Package Index | Mudlib Index | Effect Index]

File /std/effects/faith/basic_ritual.c

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.

Includes

This class includes the following files /include/guilds.h, /include/nroff.h, /include/tasks.h, /include/obj_parser.h, /include/ritual_system.h, /include/weather.h, /include/deity.h, /include/effect.h, /include/move_failures.h, /include/playtesters.h and /include/player.h

Method index

Public Functions

These are functions that everyone can access.

.

    add_stage
    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)
    

    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.
    • See also:
      set_stage .c
    calc_old_bonus
    int calc_old_bonus(int bonus)
    
      cast_spell
      int cast_spell(string words,
                     int scroll,
                     object staff)
      

      The part that kick starts all of the other parts. It is called by the cast command. I think this is depreciated. Lets check!
        check_benefit
        mapping check_benefit(class ritual info,
                              string type)
        

        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.
          check_difficulty
          mapping check_difficulty(class ritual info,
                                   string type)
          

          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.
            check_impediment
            string * check_impediment(class ritual info,
                                      string type)
            

            A list of all the types of impediments we are looking for. Centralised for easy access!
              end
              void end(object person,
                       class ritual info,
                       int id)
              
                generate_message
                string * generate_message(string * _messages,
                                          object caster,
                                          object * targets,
                                          string deity,
                                          string ritual,
                                          string prayer)
                
                  get_room_targets
                  object * get_room_targets(class ritual _info)
                  
                    help
                    string help()
                    
                      perform_ritual
                      int perform_ritual(object player,
                                         string args,
                                         int scroll,
                                         object * targets,
                                         object imbue)
                      

                      This is called by the perform command, it replaces cast_spell.
                        query_classification
                        string query_classification()
                        
                          query_faith_ritual
                          int query_faith_ritual()
                          
                            query_indefinite
                            int query_indefinite()
                            
                              query_point_cost
                              int query_point_cost(object caster,
                                                   object * targets,
                                                   class ritual temp)
                              
                                query_power_level
                                int query_power_level(class ritual temp,
                                                      int stage)
                                

                                Query the difficulty of a given stage.
                                  query_prayers
                                  string * query_prayers()
                                  
                                    query_ritual
                                    int query_ritual()
                                    
                                      query_ritual_formatted
                                      string query_ritual_formatted()
                                      
                                        query_shadow_ob
                                        string query_shadow_ob()
                                        
                                          ritual_check_target
                                          int ritual_check_target(object caster,
                                                                  object targets)
                                          
                                            ritual_failed
                                            void ritual_failed(class ritual info,
                                                               int bonus)
                                            
                                              ritual_resisted
                                              void ritual_resisted(class ritual info,
                                                                   int bonus)
                                              

                                              This -must- be masked if you want to use it.
                                                set_alignment
                                                void set_alignment(int * align)
                                                

                                                Set the max and min alignments for this ritual. Runtimes if not handed an array of 2 ints
                                                • Parameters:
                                                  align - An array of 2 ints. ({ min, max })
                                                    set_family
                                                    void set_family(string family)
                                                    

                                                    Sets the family of the ritual. Currently this is offensive, defensive, curing, but this will change.
                                                    • Parameters:
                                                      family - The family of the ritual.
                                                        set_gp_cost
                                                        void set_gp_cost(int amount)
                                                        

                                                        What is the base GP cost for this ritual?
                                                        • Parameters:
                                                          amount - Base gp cost.
                                                            set_learn_level
                                                            void set_learn_level(int level)
                                                            

                                                            The minimum level required to teach this ritual. Will be modified by other factors.
                                                            • Parameters:
                                                              level - The base level for learning
                                                                set_name
                                                                void set_name(string name)
                                                                

                                                                Generic set name function for the ritual. Does exactly what you think it does.
                                                                • Parameters:
                                                                  name - The name of the ritual.
                                                                    set_nroff_file
                                                                    void set_nroff_file(string path)
                                                                    

                                                                    The arcane art of setting a helpfile. Once you have written a nroff file, set it using set_nroff_file( path );
                                                                      set_offensive
                                                                      void set_offensive(int value)
                                                                      

                                                                      Does this ritual initiate combat? 1 yes, 0 no.
                                                                        set_pk_status
                                                                        void set_pk_status(int pk)
                                                                        
                                                                          set_requirements
                                                                          void set_requirements(int speech,
                                                                                                int movement,
                                                                                                int vision)
                                                                          

                                                                          Sets requirements for this ritual
                                                                          • Parameters:
                                                                            speech - Does the ritual need speech
                                                                            movement - Does the ritual require the ability to move
                                                                              set_resist_skill
                                                                              void set_resist_skill(string skill)
                                                                              

                                                                              Set a skill to resist.
                                                                              • Parameters:
                                                                                skill - the skill!
                                                                                  set_stage
                                                                                  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)
                                                                                  

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

                                                                                      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.
                                                                                      • Parameters:
                                                                                        pointer - A function pointer to check.
                                                                                          set_targeting
                                                                                          void set_targeting(int type)
                                                                                          

                                                                                          How can this ritual be targeted? The following are valid args:
                                                                                          • RITUAL_DIRECT_LIVING
                                                                                          • RITUAL_DIRECT_NON_LIVING
                                                                                          • RITUAL_DIRECT_SELF
                                                                                          • RITUAL_DIRECT_MULTIPLE
                                                                                          • RITUAL_DIRECT_EXTERN
                                                                                          • RITUAL_DIRECT_ROOM
                                                                                          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.
                                                                                          • Parameters:
                                                                                            type - The new targeting info.
                                                                                          • Example:
                                                                                            set_targeting(0); // Cannot be directed at a target at all.

                                                                                            set_targeting(RITUAL_DIRECT_LIVING | RITUAL_DIRECT_NON_LIVING);

                                                                                            set_targeting(RITUAL_DIRECT_LIVING | RITUAL_DIRECT_MULTIPLE);
                                                                                            
                                                                                              set_teach_level
                                                                                              void set_teach_level(int level)
                                                                                              

                                                                                              The minimum level required to teach this ritual. Will be modified by other factors.
                                                                                              • Parameters:
                                                                                                level - This is the base level for teaching.
                                                                                                  set_teach_skill
                                                                                                  void set_teach_skill(string skill)
                                                                                                  

                                                                                                  The skill check used for teaching.
                                                                                                  • Parameters:
                                                                                                    skill - The skill.
                                                                                                      teach
                                                                                                      int teach(object target,
                                                                                                                string ritual)
                                                                                                      

                                                                                                      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.
Valid HTML 4.01 Transitional
Valid CSS!
Read More