OSDN Git Service

Merge branch 'For2.2.2-Refactoring' into For2.2.2-Refactoring-Cocoa2
authorEric Branlund <ebranlund@fastmail.com>
Fri, 16 Oct 2020 14:46:04 +0000 (07:46 -0700)
committerEric Branlund <ebranlund@fastmail.com>
Fri, 16 Oct 2020 14:46:04 +0000 (07:46 -0700)
src/grid/trap.c
src/mspell/mspell-floor.c
src/mspell/mspell-status.c
src/player/player-status-flags.c

index 543b131..b166bbc 100644 (file)
@@ -518,7 +518,7 @@ void hit_trap(player_type *trapped_ptr, bool break_trap)
 
     case TRAP_CONFUSE: {
         hit_trap_set_abnormal_status_p(trapped_ptr, _("きらめくガスに包み込まれた!", "A gas of scintillating colors surrounds you!"),
-            (bool)trapped_ptr->resist_conf,
+            (trapped_ptr->resist_conf != 0),
             set_confused, trapped_ptr->confused + (TIME_EFFECT)randint0(20) + 10);
         break;
     }
index 9309729..6f67228 100644 (file)
@@ -281,7 +281,7 @@ void spell_RF6_TELE_LEVEL(player_type *target_ptr, MONSTER_IDX m_idx, MONSTER_ID
     bool resist, saving_throw;
 
     if (TARGET_TYPE == MONSTER_TO_PLAYER) {
-        resist = (bool)target_ptr->resist_nexus;
+        resist = (target_ptr->resist_nexus != 0);
         saving_throw = (randint0(100 + rlev / 2) < target_ptr->skill_sav);
         spell_badstatus_message(target_ptr, m_idx, t_idx, _("%^sが何か奇妙な言葉をつぶやいた。", "%^s mumbles strangely."),
             _("%^sがあなたの足を指さした。", "%^s gestures at your feet."), _("しかし効果がなかった!", "You are unaffected!"),
index 8bcdda5..b3bb065 100644 (file)
@@ -254,7 +254,7 @@ void spell_RF5_BLIND(MONSTER_IDX m_idx, player_type *target_ptr, MONSTER_IDX t_i
     bool resist, saving_throw;
 
     if (TARGET_TYPE == MONSTER_TO_PLAYER) {
-        resist = (bool)target_ptr->resist_blind;
+        resist = (target_ptr->resist_blind != 0);
         saving_throw = (randint0(100 + rlev / 2) < target_ptr->skill_sav);
         spell_badstatus_message(target_ptr, m_idx, t_idx, _("%^sが何かをつぶやいた。", "%^s mumbles."),
             _("%^sが呪文を唱えてあなたの目をくらました!", "%^s casts a spell, burning your eyes!"), _("しかし効果がなかった!", "You are unaffected!"),
@@ -308,7 +308,7 @@ void spell_RF5_CONF(MONSTER_IDX m_idx, player_type *target_ptr, MONSTER_IDX t_id
     bool resist, saving_throw;
 
     if (TARGET_TYPE == MONSTER_TO_PLAYER) {
-        resist = (bool)target_ptr->resist_conf;
+        resist = (target_ptr->resist_conf != 0);
         saving_throw = (randint0(100 + rlev / 2) < target_ptr->skill_sav);
         spell_badstatus_message(target_ptr, m_idx, t_idx, _("%^sが何かをつぶやくと、頭を悩ます音がした。", "%^s mumbles, and you hear puzzling noises."),
             _("%^sが誘惑的な幻覚を作り出した。", "%^s creates a mesmerising illusion."),
@@ -427,7 +427,7 @@ void spell_RF5_SLOW(MONSTER_IDX m_idx, player_type *target_ptr, MONSTER_IDX t_id
     bool resist, saving_throw;
 
     if (TARGET_TYPE == MONSTER_TO_PLAYER) {
-        resist = (bool)target_ptr->resist_conf;
+        resist = (target_ptr->resist_conf != 0);
         saving_throw = (randint0(100 + rlev / 2) < target_ptr->skill_sav);
         spell_badstatus_message(target_ptr, m_idx, t_idx, _("%^sがあなたの筋力を吸い取ろうとした!", "%^s drains power from your muscles!"),
             _("%^sがあなたの筋力を吸い取ろうとした!", "%^s drains power from your muscles!"), _("しかし効果がなかった!", "You are unaffected!"),
index 249b24b..95ff28c 100644 (file)
@@ -32,6 +32,9 @@
 
 static BIT_FLAGS check_equipment_flags(player_type *creature_ptr, tr_type tr_flag);
 
+/*!
+ * @brief 装備による所定の特性フラグを得ているかを一括して取得する関数。
+ */
 static BIT_FLAGS check_equipment_flags(player_type *creature_ptr, tr_type tr_flag)
 {
     object_type *o_ptr;
@@ -50,6 +53,9 @@ static BIT_FLAGS check_equipment_flags(player_type *creature_ptr, tr_type tr_fla
     return result;
 }
 
+/*!
+ * @brief クリーチャーが壁破壊進行を持っているかを返す。
+ */
 bool is_kill_wall(player_type *creature_ptr)
 {
     if (creature_ptr->mimic_form == MIMIC_DEMON_LORD || music_singing(creature_ptr, MUSIC_WALL)) {
@@ -66,6 +72,9 @@ bool is_kill_wall(player_type *creature_ptr)
     return FALSE;
 }
 
+/*!
+ * @brief クリーチャーが壁通過を持っているかを返す。
+ */
 bool is_pass_wall(player_type *creature_ptr)
 {
     bool pow = FALSE;
@@ -84,6 +93,9 @@ bool is_pass_wall(player_type *creature_ptr)
     return pow;
 }
 
+/*!
+ * @brief クリーチャーが強力射を持っているかを返す。
+ */
 BIT_FLAGS is_xtra_might(player_type *creature_ptr)
 {
     BIT_FLAGS result = 0L;
@@ -91,6 +103,9 @@ BIT_FLAGS is_xtra_might(player_type *creature_ptr)
     return result;
 }
 
+/*!
+ * @brief クリーチャーが邪悪感知を持っているかを返す。
+ */
 BIT_FLAGS is_esp_evil(player_type *creature_ptr)
 {
     BIT_FLAGS result = 0L;
@@ -102,6 +117,9 @@ BIT_FLAGS is_esp_evil(player_type *creature_ptr)
     return result;
 }
 
+/*!
+ * @brief クリーチャーが自然界の動物感知を持っているかを返す。
+ */
 BIT_FLAGS is_esp_animal(player_type *creature_ptr)
 {
     BIT_FLAGS result = 0L;
@@ -109,6 +127,9 @@ BIT_FLAGS is_esp_animal(player_type *creature_ptr)
     return result;
 }
 
+/*!
+ * @brief クリーチャーがアンデッド感知を持っているかを返す。
+ */
 BIT_FLAGS is_esp_undead(player_type *creature_ptr)
 {
     BIT_FLAGS result = 0L;