Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

src/skill.c File Reference


Detailed Description

Weapon skills.

Definition in file skill.c.

#include "crogue.h"

Go to the source code of this file.

Data Structures

struct  skill_desc
struct  skill_level_desc

Defines

#define NUM_SKILL_LEVELS   10

Typedefs

typedef skill_desc skill_desc
typedef skill_level_desc skill_level_desc

Functions

int marks_to_advance (int skill_num)
void init_skills (void)
void award_mark (void)
sint weapon_skill_attack (void)
sint weapon_skill_damage (void)
void print_skills (char *buf)

Variables

skill_desc skill_descs [NUM_SKILLS+1]
skill_level_desc skill_levels [NUM_SKILL_LEVELS]
int advancement_marks [NUM_SKILL_LEVELS]


Define Documentation

#define NUM_SKILL_LEVELS   10
 

Definition at line 24 of file skill.c.

Referenced by award_mark().


Typedef Documentation

typedef struct skill_desc skill_desc
 

typedef struct skill_level_desc skill_level_desc
 


Function Documentation

void award_mark void   ) 
 

Definition at line 102 of file skill.c.

References player::extrinsic, marks_to_advance(), message(), NUM_SKILL_LEVELS, world::plr, player::skill, skill_descs, player::skill_marks, STAT_WEAPON_TYPE, update_player(), and w.

Referenced by plr_attack(), and throw_item().

void init_skills void   ) 
 

Definition at line 88 of file skill.c.

References player::class, player::extrinsic, NUM_SKILLS, world::playerclasses, world::plr, player::skill, player::skill_marks, STAT_WEAPON_TYPE, w, and classdesc::weapon_skill_start.

Referenced by init_player().

int marks_to_advance int  skill_num  )  [static]
 

Definition at line 78 of file skill.c.

References advancement_marks, player::class, world::playerclasses, world::plr, player::skill, w, and classdesc::weapon_skill_factor.

Referenced by award_mark().

void print_skills char *  buf  ) 
 

Definition at line 133 of file skill.c.

References catprintf(), NUM_SKILLS, world::plr, player::skill, skill_descs, and w.

Referenced by char_info().

sint weapon_skill_attack void   ) 
 

Definition at line 119 of file skill.c.

References player::extrinsic, skill_level_desc::hit_effect, world::plr, sint, player::skill, skill_levels, STAT_WEAPON_TYPE, and w.

Referenced by throw_item(), and update_player().

sint weapon_skill_damage void   ) 
 

Definition at line 126 of file skill.c.

References skill_level_desc::damage_effect, player::extrinsic, world::plr, sint, player::skill, skill_levels, STAT_WEAPON_TYPE, and w.

Referenced by throw_item(), and update_player().


Variable Documentation

int advancement_marks[NUM_SKILL_LEVELS] [static]
 

Initial value:

 {
        2,
        3,
        4,
        6,
        9,
        12,
        15,
        18,
        22,
        30
    }

Definition at line 64 of file skill.c.

Referenced by marks_to_advance().

skill_desc skill_descs[NUM_SKILLS+1] [static]
 

Initial value:

 {
        { ""                   },
        { gettext("bows")      },
        { gettext("crossbows") },
        { gettext("clubs")     },
        { gettext("daggers")   },
        { gettext("staves")    },
        { gettext("maces")     },
        { gettext("swords")    },
        { gettext("axes")      }
    }

Definition at line 39 of file skill.c.

Referenced by award_mark(), and print_skills().

skill_level_desc skill_levels[NUM_SKILL_LEVELS] [static]
 

Initial value:

 {
        { -3,  -3  },
        { -1,  -1, },
        { 0,   0,  },
        { 1,   0,  },
        { 2,   0,  },
        { 3,   1,  },
        { 5,   1,  },
        { 7,   2,  },
        { 9,   2,  },
        { 11,  3,  },
    }

Definition at line 51 of file skill.c.

Referenced by weapon_skill_attack(), and weapon_skill_damage().


Generated on Thu May 20 13:12:13 2004 for CalcRogue by doxygen 1.3.6