Mudlib skills
Documentation for the body-skills functions for the mudlib in /std/body/skills.c.
Functions
-
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().
-
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.
-
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.
-
mapping query_skill_ranks()
mapping query_skill_ranks() ; Returns the skill_ranks mapping.
- 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)
- 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.
-
mapping query_skills()
mapping query_skills(); Returns the underlying skills mapping with skill classes from the player.
-
void zero_skills()
void zero_skills(); Delete all skills for a body.
-
void clean_skills()
void clean_skills(); Removes skills from the player that doesn’t exist anymore.
- class skill query_skill(string s)
class skill query_skill(string skill); Returns a single class skill by name.
-
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.
-
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.
-
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.
-
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.
-
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.
- 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
-
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.