OSDN Git Service

b0651f42e48be41bd13ee543ed6ba01008ec166f
[hengband/hengband.git] / src / player-status.h
1 extern concptr your_alignment(void);
2 extern int weapon_exp_level(int weapon_exp);
3 extern int riding_exp_level(int riding_exp);
4 extern int spell_exp_level(int spell_exp);
5
6 extern s16b calc_num_fire(object_type *o_ptr);
7 extern void calc_bonuses(void);
8 extern WEIGHT weight_limit(void);
9 extern bool has_melee_weapon(int i);
10 extern bool is_heavy_shoot(object_type *o_ptr);
11
12 extern bool heavy_armor(void);
13 extern void update_creature(player_type *creature_ptr);
14 extern BIT_FLAGS16 empty_hands(bool riding_control);
15 extern bool player_has_no_spellbooks(void);
16
17 extern void take_turn(player_type *creature_ptr, PERCENTAGE need_cost);
18 extern void free_turn(player_type *creature_ptr);
19
20 extern bool player_place(POSITION y, POSITION x);
21 extern void sanity_blast(monster_type *m_ptr, bool necro);
22
23 extern void check_experience(void);
24 extern void wreck_the_pattern(void);
25 extern void cnv_stat(int val, char *out_val);
26 extern s16b modify_stat_value(int value, int amount);
27 extern long calc_score(void);
28
29 extern const s32b player_exp[PY_MAX_LEVEL];
30 extern const s32b player_exp_a[PY_MAX_LEVEL];
31
32
33 /* Temporary flags macro */
34 #define IS_FAST() (p_ptr->fast || music_singing(MUSIC_SPEED) || music_singing(MUSIC_SHERO))
35 #define IS_INVULN() (p_ptr->invuln || music_singing(MUSIC_INVULN))
36 #define IS_HERO() (p_ptr->hero || music_singing(MUSIC_HERO) || music_singing(MUSIC_SHERO))
37 #define IS_BLESSED() (p_ptr->blessed || music_singing(MUSIC_BLESS) || hex_spelling(HEX_BLESS))
38 #define IS_OPPOSE_ACID() (p_ptr->oppose_acid || music_singing(MUSIC_RESIST) || (p_ptr->special_defense & KATA_MUSOU))
39 #define IS_OPPOSE_ELEC() (p_ptr->oppose_elec || music_singing(MUSIC_RESIST) || (p_ptr->special_defense & KATA_MUSOU))
40 #define IS_OPPOSE_FIRE() (p_ptr->oppose_fire || music_singing(MUSIC_RESIST) || (p_ptr->special_defense & KATA_MUSOU))
41 #define IS_OPPOSE_COLD() (p_ptr->oppose_cold || music_singing(MUSIC_RESIST) || (p_ptr->special_defense & KATA_MUSOU))
42 #define IS_OPPOSE_POIS() (p_ptr->oppose_pois || music_singing(MUSIC_RESIST) || (p_ptr->special_defense & KATA_MUSOU))
43 #define IS_TIM_ESP() (p_ptr->tim_esp || music_singing(MUSIC_MIND) || (p_ptr->concent >= CONCENT_TELE_THRESHOLD))
44 #define IS_TIM_STEALTH() (p_ptr->tim_stealth || music_singing(MUSIC_STEALTH))
45
46 #define P_PTR_KI (p_ptr->magic_num1[0])
47
48 /*
49  * Player "food" crucial values
50  */
51 #define PY_FOOD_MAX     15000   /*!< 食べ過ぎ~満腹の閾値 / Food value (Bloated) */
52 #define PY_FOOD_FULL    10000   /*!< 満腹~平常の閾値 / Food value (Normal) */
53 #define PY_FOOD_ALERT   2000    /*!< 平常~空腹の閾値 / Food value (Hungry) */
54 #define PY_FOOD_WEAK    1000    /*!< 空腹~衰弱の閾値 / Food value (Weak) */
55 #define PY_FOOD_FAINT   500     /*!< 衰弱~衰弱(赤表示/麻痺)の閾値 / Food value (Fainting) */
56 #define PY_FOOD_STARVE  100     /*!< 衰弱(赤表示/麻痺)~飢餓ダメージの閾値 / Food value (Starving) */
57
58 /*
59  * Player regeneration constants
60  */
61 #define PY_REGEN_NORMAL         197     /* Regen factor*2^16 when full */
62 #define PY_REGEN_WEAK           98      /* Regen factor*2^16 when weak */
63 #define PY_REGEN_FAINT          33      /* Regen factor*2^16 when fainting */
64 #define PY_REGEN_HPBASE         1442    /* Min amount hp regen*2^16 */
65 #define PY_REGEN_MNBASE         524     /* Min amount mana regen*2^16 */