1 /* SCCS Id: @(#)skills.h 3.4 1999/10/27 */
2 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985-1999. */
3 /* NetHack may be freely redistributed. See license for details. */
8 /* Much of this code was taken from you.h. It is now
9 * in a separate file so it can be included in objects.c.
13 /* Code to denote that no skill is applicable */
16 /* Weapon Skills -- Stephen White
17 * Order matters and are used in macros.
18 * Positive values denote hand-to-hand weapons or launchers.
19 * Negative values denote ammunition or missiles.
20 * Update weapon.c if you ammend any skills.
21 * Also used for oc_subtyp.
27 #define P_SHORT_SWORD 5
28 #define P_BROAD_SWORD 6
29 #define P_LONG_SWORD 7
30 #define P_TWO_HANDED_SWORD 8
33 #define P_CLUB 11 /* Heavy-shafted bludgeon */
35 #define P_MORNING_STAR 13 /* Spiked bludgeon */
36 #define P_FLAIL 14 /* Two pieces hinged or chained together */
37 #define P_HAMMER 15 /* Heavy head on the end */
38 #define P_QUARTERSTAFF 16 /* Long-shafted bludgeon */
49 #define P_BOOMERANG 27
51 #define P_UNICORN_HORN 29 /* last weapon */
52 #define P_FIRST_WEAPON P_DAGGER
53 #define P_LAST_WEAPON P_UNICORN_HORN
55 /* Spell Skills added by Larry Stewart-Zerba */
56 #define P_ATTACK_SPELL 30
57 #define P_HEALING_SPELL 31
58 #define P_DIVINATION_SPELL 32
59 #define P_ENCHANTMENT_SPELL 33
60 #define P_CLERIC_SPELL 34
61 #define P_ESCAPE_SPELL 35
62 #define P_MATTER_SPELL 36
63 #define P_FIRST_SPELL P_ATTACK_SPELL
64 #define P_LAST_SPELL P_MATTER_SPELL
66 /* Other types of combat */
67 #define P_BARE_HANDED_COMBAT 37
68 #define P_MARTIAL_ARTS P_BARE_HANDED_COMBAT /* Role distinguishes */
69 #define P_TWO_WEAPON_COMBAT 38 /* Finally implemented */
71 #define P_RIDING 39 /* How well you control your steed */
72 #define P_LAST_H_TO_H P_RIDING
74 #define P_LAST_H_TO_H P_TWO_WEAPON_COMBAT
76 #define P_FIRST_H_TO_H P_BARE_HANDED_COMBAT
78 #define P_NUM_SKILLS (P_LAST_H_TO_H+1)
80 /* These roles qualify for a martial arts bonus */
81 #define martial_bonus() (Role_if(PM_SAMURAI) || Role_if(PM_MONK))
85 * These are the standard weapon skill levels. It is important that
86 * the lowest "valid" skill be be 1. The code calculates the
87 * previous amount to practice by calling practice_needed_to_advance()
88 * with the current skill-1. To work out for the UNSKILLED case,
89 * a value of 0 needed.
91 #define P_ISRESTRICTED 0
96 #define P_MASTER 5 /* Unarmed combat/martial arts only */
97 #define P_GRAND_MASTER 6 /* Unarmed combat/martial arts only */
99 #define practice_needed_to_advance(level) ((level)*(level)*20)
101 /* The hero's skill in various weapons. */
105 unsigned short advance;
108 #define P_SKILL(type) (u.weapon_skills[type].skill)
109 #define P_MAX_SKILL(type) (u.weapon_skills[type].max_skill)
110 #define P_ADVANCE(type) (u.weapon_skills[type].advance)
111 #define P_RESTRICTED(type) (u.weapon_skills[type].skill == P_ISRESTRICTED)
113 #define P_SKILL_LIMIT 60 /* Max number of skill advancements */
115 /* Initial skill matrix structure; used in u_init.c and weapon.c */
121 #endif /* SKILLS_H */