OSDN Git Service

[Refactor] #37353 型の置換(C_MAKE)。 / Type replacement(C_MAKE).
[hengband/hengband.git] / src / player-status.c
1 #include "angband.h"
2 #include "player-status.h"
3
4 /*
5  * Return alignment title
6  */
7 concptr your_alignment(void)
8 {
9         if (p_ptr->align > 150) return _("大善", "Lawful");
10         else if (p_ptr->align > 50) return _("中善", "Good");
11         else if (p_ptr->align > 10) return _("小善", "Neutral Good");
12         else if (p_ptr->align > -11) return _("中立", "Neutral");
13         else if (p_ptr->align > -51) return _("小悪", "Neutral Evil");
14         else if (p_ptr->align > -151) return _("中悪", "Evil");
15         else return _("大悪", "Chaotic");
16 }
17
18
19 /*
20  * Return proficiency level of weapons and misc. skills (except riding)
21  */
22 int weapon_exp_level(int weapon_exp)
23 {
24         if (weapon_exp < WEAPON_EXP_BEGINNER) return EXP_LEVEL_UNSKILLED;
25         else if (weapon_exp < WEAPON_EXP_SKILLED) return EXP_LEVEL_BEGINNER;
26         else if (weapon_exp < WEAPON_EXP_EXPERT) return EXP_LEVEL_SKILLED;
27         else if (weapon_exp < WEAPON_EXP_MASTER) return EXP_LEVEL_EXPERT;
28         else return EXP_LEVEL_MASTER;
29 }
30
31
32 /*
33  * Return proficiency level of riding
34  */
35 int riding_exp_level(int riding_exp)
36 {
37         if (riding_exp < RIDING_EXP_BEGINNER) return EXP_LEVEL_UNSKILLED;
38         else if (riding_exp < RIDING_EXP_SKILLED) return EXP_LEVEL_BEGINNER;
39         else if (riding_exp < RIDING_EXP_EXPERT) return EXP_LEVEL_SKILLED;
40         else if (riding_exp < RIDING_EXP_MASTER) return EXP_LEVEL_EXPERT;
41         else return EXP_LEVEL_MASTER;
42 }
43
44
45 /*
46  * Return proficiency level of spells
47  */
48 int spell_exp_level(int spell_exp)
49 {
50         if (spell_exp < SPELL_EXP_BEGINNER) return EXP_LEVEL_UNSKILLED;
51         else if (spell_exp < SPELL_EXP_SKILLED) return EXP_LEVEL_BEGINNER;
52         else if (spell_exp < SPELL_EXP_EXPERT) return EXP_LEVEL_SKILLED;
53         else if (spell_exp < SPELL_EXP_MASTER) return EXP_LEVEL_EXPERT;
54         else return EXP_LEVEL_MASTER;
55 }
56