Crossfire Server, Branches 1.12  R18729
skills.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define IS_COMBAT_SKILL(num)
 
#define IS_GRACE_SKILL(num)   (num == SK_PRAYING)
 
#define IS_MANA_SKILL(num)
 
#define NUM_SKILLS   40
 
#define SK_ALCHEMY   6
 
#define SK_BARGAINING   9
 
#define SK_BOWYER   4
 
#define SK_CLAWING   31
 
#define SK_CLIMBING   20
 
#define SK_DET_CURSE   14
 
#define SK_DET_MAGIC   11
 
#define SK_DISARM_TRAPS   27
 
#define SK_EVOCATION   35
 
#define SK_EXP_ADD_SKILL   0
 
#define SK_EXP_NONE   2
 
#define SK_EXP_TOTAL   1
 
#define SK_FIND_TRAPS   15
 
#define SK_FLAME_TOUCH   18
 
#define SK_HARVESTING   39
 
#define SK_HIDING   2
 
#define SK_INSCRIPTION   22
 
#define SK_JEWELER   5
 
#define SK_JUMPING   10
 
#define SK_KARATE   19
 
#define SK_LEVITATION   32
 
#define SK_LITERACY   8
 
#define SK_LOCKPICKING   1
 
#define SK_MEDITATION   16
 
#define SK_MISSILE_WEAPON   24
 
#define SK_ONE_HANDED_WEAPON   23
 
#define SK_ORATORY   12
 
#define SK_PRAYING   30
 
#define SK_PUNCHING   17
 
#define SK_PYROMANCY   34
 
#define SK_SET_TRAP   28
 
#define SK_SINGING   13
 
#define SK_SMITHERY   3
 
#define SK_SORCERY   36
 
#define SK_STEALING   7
 
#define SK_SUBTRACT_SKILL_EXP   3
 
#define SK_SUMMONING   33
 
#define SK_THAUMATURGY   29
 
#define SK_THROWING   25
 
#define SK_TWO_HANDED_WEAPON   37
 
#define SK_USE_MAGIC_ITEM   26
 
#define SK_WOODSMAN   21
 
#define SK_WRAITH_FEED   38
 
#define USING_SKILL(op, skill)   ((op)->chosen_skill && (op)->chosen_skill->subtype == skill)
 

Variables

const char * skill_names [NUM_SKILLS]
 

Detailed Description

Skill-related defines, including subtypes.

Definition in file skills.h.

Macro Definition Documentation

#define IS_COMBAT_SKILL (   num)
Value:
((num == SK_PUNCHING) \
|| (num == SK_FLAME_TOUCH) \
|| (num == SK_KARATE) \
|| (num == SK_ONE_HANDED_WEAPON) \
|| (num == SK_MISSILE_WEAPON) \
|| (num == SK_THROWING) \
|| (num == SK_CLAWING) \
|| (num == SK_TWO_HANDED_WEAPON) \
|| (num == SK_WRAITH_FEED))
#define SK_KARATE
Definition: skills.h:66
#define SK_TWO_HANDED_WEAPON
Definition: skills.h:84
#define SK_FLAME_TOUCH
Definition: skills.h:65
#define SK_MISSILE_WEAPON
Definition: skills.h:71
#define SK_PUNCHING
Definition: skills.h:64
#define SK_THROWING
Definition: skills.h:72
#define SK_CLAWING
Definition: skills.h:78
#define SK_ONE_HANDED_WEAPON
Definition: skills.h:70
#define SK_WRAITH_FEED
Definition: skills.h:85

This macro is used in fix_object() to define if this is a sill that should be used to calculate wc's and the like.

Definition at line 116 of file skills.h.

Referenced by check_weapon_power(), and fix_object().

#define IS_GRACE_SKILL (   num)    (num == SK_PRAYING)

Currently only one of these, but put the define here to make it easier to expand it in the future

Definition at line 140 of file skills.h.

Referenced by fix_object().

#define IS_MANA_SKILL (   num)
Value:
((num == SK_SORCERY) \
|| (num == SK_EVOCATION) \
|| (num == SK_PYROMANCY) \
|| (num == SK_SUMMONING))
#define SK_SORCERY
Definition: skills.h:83
#define SK_SUMMONING
Definition: skills.h:80
#define SK_EVOCATION
Definition: skills.h:82
#define SK_PYROMANCY
Definition: skills.h:81

Like IS_COMBAT_SKILL above, but instead this is used to determine how many mana points the player has.

Definition at line 131 of file skills.h.

Referenced by fix_object().

#define NUM_SKILLS   40

This is the highest number skill in the table +1 This is used to store pointers to the actual skills - to make life easier, we use the value above as index, eg, SK_EVOCATION (35) will be in last_skills[35].

Definition at line 95 of file skills.h.

Referenced by add_player_exp(), append_spell(), caster_level(), check_spells(), esrv_update_stats(), find_skill_by_number(), get_player(), init_skills(), kill_object(), link_player_skills(), send_skill_info(), and show_skills().

#define USING_SKILL (   op,
  skill 
)    ((op)->chosen_skill && (op)->chosen_skill->subtype == skill)

True if op is using skill, false else.

Definition at line 110 of file skills.h.

Referenced by attack_message().

Variable Documentation

const char* skill_names[NUM_SKILLS]

Will contain a number-name mapping for skills, initialized by init_skills().

Definition at line 65 of file skill_util.c.

Referenced by append_spell(), check_spells(), command_disarm(), command_search(), command_throw(), init_skills(), scroll_type_apply(), and send_skill_info().