OSDN Git Service

#37287 #37353 (2.2.0.89) sub_exp型を定義し、型の置換を継続中。 / Define typedef sub_exp, ongoing...
authorDeskull <desull@users.sourceforge.jp>
Tue, 19 Sep 2017 15:32:51 +0000 (00:32 +0900)
committerDeskull <desull@users.sourceforge.jp>
Tue, 19 Sep 2017 15:32:51 +0000 (00:32 +0900)
src/cmd1.c
src/externs.h
src/h-type.h
src/types.h

index 0ac188e..e236784 100644 (file)
@@ -253,7 +253,7 @@ bool test_hit_norm(int chance, int ac, int vis)
  * @param dam 現在算出中のダメージ値
  * @return クリティカル修正が入ったダメージ値
  */
-s16b critical_shot(int weight, int plus_ammo, int plus_bow, int dam)
+hit_point critical_shot(int weight, int plus_ammo, int plus_bow, hit_point dam)
 {
        int i, k;
        object_type *j_ptr =  &inventory[INVEN_BOW];
@@ -311,7 +311,7 @@ s16b critical_shot(int weight, int plus_ammo, int plus_bow, int dam)
  * @param mode オプションフラグ
  * @return クリティカル修正が入ったダメージ値
  */
-s16b critical_norm(int weight, int plus, int dam, s16b meichuu, int mode)
+hit_point critical_norm(int weight, int plus, hit_point dam, s16b meichuu, int mode)
 {
        int i, k;
        
@@ -1214,7 +1214,7 @@ static void hit_trap(bool break_trap)
                        hit_trap_set_abnormal_status(
                                _("黒いガスに包み込まれた!", "A black gas surrounds you!"),
                                p_ptr->resist_blind,
-                               set_blind, p_ptr->blind + randint0(50) + 25);
+                               set_blind, p_ptr->blind + (time_effect)randint0(50) + 25);
                        break;
                }
 
@@ -1223,7 +1223,7 @@ static void hit_trap(bool break_trap)
                        hit_trap_set_abnormal_status(
                                _("きらめくガスに包み込まれた!", "A gas of scintillating colors surrounds you!"),
                                p_ptr->resist_conf,
-                               set_confused, p_ptr->confused + randint0(20) + 10);
+                               set_confused, p_ptr->confused + (time_effect)randint0(20) + 10);
                        break;
                }
 
@@ -1232,7 +1232,7 @@ static void hit_trap(bool break_trap)
                        hit_trap_set_abnormal_status(
                                _("刺激的な緑色のガスに包み込まれた!", "A pungent green gas surrounds you!"),
                                p_ptr->resist_pois || IS_OPPOSE_POIS(),
-                               set_poisoned, p_ptr->poisoned + randint0(20) + 10);
+                               set_poisoned, p_ptr->poisoned + (time_effect)randint0(20) + 10);
                        break;
                }
 
@@ -1419,7 +1419,8 @@ static void touch_zap_player(monster_type *m_ptr)
  */
 static void natural_attack(s16b m_idx, int attack, bool *fear, bool *mdeath)
 {
-       int             k, bonus, chance;
+       hit_point k;
+       int bonus, chance;
        int             n_weight = 0;
        monster_type    *m_ptr = &m_list[m_idx];
        monster_race    *r_ptr = &r_info[m_ptr->r_idx];
index 86e2771..20cbe47 100644 (file)
@@ -698,8 +698,8 @@ extern void glow_deep_lava_and_bldg(void);
 /* cmd1.c */
 extern bool test_hit_fire(int chance, monster_type *m_ptr, int vis, char* o_name);
 extern bool test_hit_norm(int chance, int ac, int vis);
-extern s16b critical_shot(int weight, int plus_ammo, int plus_bow, int dam);
-extern s16b critical_norm(int weight, int plus, int dam, s16b meichuu, int mode);
+extern hit_point critical_shot(int weight, int plus_ammo, int plus_bow, hit_point dam);
+extern hit_point critical_norm(int weight, int plus, hit_point dam, s16b meichuu, int mode);
 extern s16b tot_dam_aux(object_type *o_ptr, int tdam, monster_type *m_ptr, int mode, bool thrown);
 extern void search(void);
 extern void py_pickup_aux(int o_idx);
index 922c13b..9265a89 100644 (file)
@@ -117,7 +117,8 @@ typedef byte character_idx; /*!< ゲーム中のキャラクター特性各種ID
 typedef byte discount_rate; /*!< ゲーム中の値引き率の型を定義 */
 
 typedef s16b player_level;  /*!< ゲーム中のプレイヤーレベルの型を定義 */
-typedef int direction;         /*!< ゲーム中の方角の型定義*/
+typedef int direction;         /*!< ゲーム中の方角の型定義 */
+typedef s16b sub_exp;          /*!< ゲーム中の副経験値の型定義 */
 
 /*** Pointers to all the basic types defined above ***/
 
index 747420f..6415aca 100644 (file)
@@ -1106,9 +1106,9 @@ struct player_type
        u32b spell_forgotten2;    /* bit mask of spells learned but forgotten */
        byte spell_order[64];     /* order spells learned/remembered/forgotten */
 
-       s16b spell_exp[64];       /* Proficiency of spells */
-       s16b weapon_exp[5][64];   /* Proficiency of weapons */
-       s16b skill_exp[GINOU_MAX];       /* Proficiency of misc. skill */
+       sub_exp spell_exp[64];        /* Proficiency of spells */
+       sub_exp weapon_exp[5][64];    /* Proficiency of weapons */
+       sub_exp skill_exp[GINOU_MAX]; /* Proficiency of misc. skill */
 
        s32b magic_num1[108];     /* Array for non-spellbook type magic */
        byte magic_num2[108];     /* Flags for non-spellbook type magics */