3 #include "system/angband.h"
5 #include "util/enum-range.h"
12 enum class PlayerSkillKindType {
20 enum class PlayerSkillRank {
28 constexpr auto PLAYER_SKILL_KIND_TYPE_RANGE = EnumRange(PlayerSkillKindType::MARTIAL_ARTS, PlayerSkillKindType::SHIELD);
30 enum class ItemKindType : short;
33 * Information about "skill"
36 std::map<ItemKindType, std::array<SUB_EXP, 64>> w_start{}; /* start weapon exp */
37 std::map<ItemKindType, std::array<SUB_EXP, 64>> w_max{}; /* max weapon exp */
38 std::map<PlayerSkillKindType, SUB_EXP> s_start{}; /* start skill */
39 std::map<PlayerSkillKindType, SUB_EXP> s_max{}; /* max skill */
42 extern std::vector<skill_table> s_info;
50 PlayerSkill(PlayerType *player_ptr);
52 static SUB_EXP weapon_exp_at(PlayerSkillRank rank);
53 static SUB_EXP spell_exp_at(PlayerSkillRank rank);
54 static bool valid_weapon_exp(int weapon_exp);
55 static PlayerSkillRank weapon_skill_rank(int weapon_exp);
56 static PlayerSkillRank riding_skill_rank(int riding_exp);
57 static PlayerSkillRank spell_skill_rank(int spell_exp);
58 static concptr skill_name(PlayerSkillKindType skill);
59 static concptr skill_rank_str(PlayerSkillRank rank);
61 void gain_melee_weapon_exp(const object_type *o_ptr);
62 void gain_range_weapon_exp(const object_type *o_ptr);
63 void gain_martial_arts_skill_exp();
64 void gain_two_weapon_skill_exp();
65 void gain_riding_skill_exp_on_melee_attack(const monster_race *r_ptr);
66 void gain_riding_skill_exp_on_range_attack();
67 void gain_riding_skill_exp_on_fall_off_check(HIT_POINT dam);
68 void gain_spell_skill_exp(int realm, int spell_idx);
69 void gain_continuous_spell_skill_exp(int realm, int spell_idx);
70 PlayerSkillRank gain_spell_skill_exp_over_learning(int spell_idx);
72 EXP exp_of_spell(int realm, int spell_idx) const;
75 PlayerType *player_ptr;