Mudlib *skills* **************** Documentation for the body-skills functions for the mudlib in */std/body/skills.c*. Functions ========= .. c:function:: int initiate_ranks() int initiate_ranks(); Function to build our cache of current skill ranks. This allows us to track whenever we move up a rank without recalculating them all the time. This is called on first call to query_skill_ranks(). .. c:function:: void banner_rankup(string skill, int rank) void banner_rankup(string skill, int rank); Tell this_object() that we just ranked up in a nice and colourful way. .. c:function:: int check_rank(string skill_name, int sp) int check_rank(string skill_name,int sp); The actual check for whether or not we ranked up happens here. If we did rank up banner_rankup() is called and rank cache is updated. .. c:function:: mapping query_skill_ranks() mapping query_skill_ranks() ; Returns the skill_ranks mapping. .. c:function:: class skill set_skill(string skill, int skill_points, int training_points) class skill set_skill(string skill, int skill_points, int training_points); Function for creating class skill and settings them directly into the player. Mostly called internally in BODY, but can be used for testing by wizards. i.e. give me 100 skill_points and 20 training_points in combat/sword: @.me->set_skill("combat/melee/blade",100,20) .. c:function:: class skill clear_training_points(string skill) class skill clear_training_points(string skill); Sets a skill to 0 training points. Typically used by M_TRAINER. Checks if the skill exists for the player. Returns the class skill after the modification. .. c:function:: mapping query_skills() mapping query_skills(); Returns the underlying skills mapping with skill classes from the player. .. c:function:: void zero_skills() void zero_skills(); Delete all skills for a body. .. c:function:: void clean_skills() void clean_skills(); Removes skills from the player that doesn't exist anymore. .. c:function:: class skill query_skill(string s) class skill query_skill(string skill); Returns a single class skill by name. .. c:function:: int query_skill_pts(string skill) int query_skill_pts(string skill); Returns the current skill points for a skill. This is not the aggregated points, but the real number of points at this spot of the skill tree. Returns -1 if the skill doesn't exist for the player. .. c:function:: int query_skill_bonus(string skill) int query_skill_bonus(string skill); Returns the current skill bonus for a skill. Returns -1 if the skill doesn't exist for the player. .. c:function:: int query_training_pts(string skill) int query_training_pts(string skill); Returns the current training points for a skill. Returns -1 if the skill doesn't exist for the player. .. c:function:: int aggregate_skill(string skill) Returns the aggregated skill value for the specified skill. This value incorporates the value of the skill itself plus all values of the parent skills. .. c:function:: void learn_skill(string skill, int value) Add some number of skill points to the given skill, propogating skill values up through the parent skills. Training points are also assigned as appropriate. .. c:function:: varargs int test_skill(string skill, int opposing_skill, int no_learn) This replaces the basic adversary test_skill function, adding an attempt to improve the skill .. c:function:: int query_evaluation() Returns the player's overall evaluation (0 to 100 percent) of their skill level. This evaluation corresponds to how they are doing with respect to the maximum possible skill level. *File generated by Lima 1.1a4 reStructured Text daemon.*