3 #include "system/angband.h"
5 #include "util/enum-range.h"
13 SKILL_MARTIAL_ARTS = 0,
20 constexpr auto PLAYER_SKILL_KIND_TYPE_RANGE = EnumRange(SKILL_MARTIAL_ARTS, SKILL_SHIELD);
22 /* Proficiency level */
23 #define EXP_LEVEL_UNSKILLED 0
24 #define EXP_LEVEL_BEGINNER 1
25 #define EXP_LEVEL_SKILLED 2
26 #define EXP_LEVEL_EXPERT 3
27 #define EXP_LEVEL_MASTER 4
29 extern const concptr exp_level_str[5];
31 enum class ItemKindType : short;
34 * Information about "skill"
36 typedef struct skill_table {
37 std::map<ItemKindType, std::array<SUB_EXP, 64>> w_start{}; /* start weapon exp */
38 std::map<ItemKindType, std::array<SUB_EXP, 64>> w_max{}; /* max weapon exp */
39 std::map<skill_idx, SUB_EXP> s_start{}; /* start skill */
40 std::map<skill_idx, SUB_EXP> s_max{}; /* max skill */
43 extern std::vector<skill_table> s_info;
51 PlayerSkill(player_type *player_ptr);
53 static SUB_EXP weapon_exp_at(int level);
54 static SUB_EXP spell_exp_at(int level);
55 static bool valid_weapon_exp(int weapon_exp);
56 static int weapon_exp_level(int weapon_exp);
57 static int riding_exp_level(int riding_exp);
58 static int spell_exp_level(int spell_exp);
60 void gain_melee_weapon_exp(const object_type *o_ptr);
61 void gain_range_weapon_exp(const object_type *o_ptr);
62 void gain_martial_arts_skill_exp();
63 void gain_two_weapon_skill_exp();
64 void gain_riding_skill_exp_on_melee_attack(const monster_race *r_ptr);
65 void gain_riding_skill_exp_on_range_attack();
66 void gain_riding_skill_exp_on_fall_off_check(HIT_POINT dam);
67 void gain_spell_skill_exp(int realm, int spell_idx);
68 void gain_continuous_spell_skill_exp(int realm, int spell_idx);
69 int gain_spell_skill_exp_over_learning(int spell_idx);
71 EXP exp_of_spell(int realm, int spell_idx) const;
74 player_type *player_ptr;