OSDN Git Service

music_singing()を使った方が分かりやすそうな部分を変更.
authornothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Fri, 9 May 2003 05:17:31 +0000 (05:17 +0000)
committernothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Fri, 9 May 2003 05:17:31 +0000 (05:17 +0000)
src/cave.c
src/effects.c

index d498e74..ee9d08e 100644 (file)
@@ -1871,7 +1871,7 @@ void print_rel(char c, byte a, int y, int x)
                {
                        if (world_monster) a = TERM_DARK;
                        else if (p_ptr->invuln || world_player) a = TERM_WHITE;
-                       else if ((p_ptr->pclass == CLASS_BARD) && (p_ptr->magic_num1[0] == MUSIC_INVULN)) a = TERM_WHITE;
+                       else if (music_singing(MUSIC_INVULN)) a = TERM_WHITE;
                        else if (p_ptr->wraith_form) a = TERM_L_DARK;
                }
 
@@ -2059,7 +2059,7 @@ void display_dungeon(void)
                                {
                                        if (world_monster) a = TERM_DARK;
                                        else if (p_ptr->invuln || world_player) a = TERM_WHITE;
-                                       else if ((p_ptr->pclass == CLASS_BARD) && (p_ptr->magic_num1[0] == MUSIC_INVULN)) a = TERM_WHITE;
+                                       else if (music_singing(MUSIC_INVULN)) a = TERM_WHITE;
                                        else if (p_ptr->wraith_form) a = TERM_L_DARK;
                                }
 
@@ -2127,7 +2127,7 @@ void lite_spot(int y, int x)
                {
                        if (world_monster) a = TERM_DARK;
                        else if (p_ptr->invuln || world_player) a = TERM_WHITE;
-                       else if ((p_ptr->pclass == CLASS_BARD) && (p_ptr->magic_num1[0] == MUSIC_INVULN)) a = TERM_WHITE;
+                       else if (music_singing(MUSIC_INVULN)) a = TERM_WHITE;
                        else if (p_ptr->wraith_form) a = TERM_L_DARK;
                }
 
@@ -2235,7 +2235,7 @@ void prt_map(void)
                        {
                                if (world_monster) a = TERM_DARK;
                                else if (p_ptr->invuln || world_player) a = TERM_WHITE;
-                               else if ((p_ptr->pclass == CLASS_BARD) && (p_ptr->magic_num1[0] == MUSIC_INVULN)) a = TERM_WHITE;
+                               else if (music_singing(MUSIC_INVULN)) a = TERM_WHITE;
                                else if (p_ptr->wraith_form) a = TERM_L_DARK;
                        }
 
@@ -2321,7 +2321,7 @@ void prt_path(int y, int x)
                        {
                                if (world_monster) a = TERM_DARK;
                                else if (p_ptr->invuln || world_player) a = TERM_WHITE;
-                               else if ((p_ptr->pclass == CLASS_BARD) && (p_ptr->magic_num1[0] == MUSIC_INVULN)) a = TERM_WHITE;
+                               else if (music_singing(MUSIC_INVULN)) a = TERM_WHITE;
                                else if (p_ptr->wraith_form) a = TERM_L_DARK;
                        }
 
@@ -2654,7 +2654,7 @@ void display_map(int *cy, int *cx)
                        {
                                if (world_monster) ta = TERM_DARK;
                                else if (p_ptr->invuln || world_player) ta = TERM_WHITE;
-                               else if ((p_ptr->pclass == CLASS_BARD) && (p_ptr->magic_num1[0] == MUSIC_INVULN)) ta = TERM_WHITE;
+                               else if (music_singing(MUSIC_INVULN)) ta = TERM_WHITE;
                                else if (p_ptr->wraith_form) ta = TERM_L_DARK;
                        }
 
index a0443b2..e9042e6 100644 (file)
@@ -821,7 +821,7 @@ msg_print("
        /* Shut */
        else
        {
-               if (p_ptr->fast && !p_ptr->lightspeed && ((p_ptr->pclass != CLASS_BARD) || ((p_ptr->magic_num1[0] != MUSIC_SPEED) && (p_ptr->magic_num1[0] != MUSIC_SHERO))))
+               if (p_ptr->fast && !p_ptr->lightspeed && !music_singing(MUSIC_SPEED) && !music_singing(MUSIC_SHERO))
                {
 #ifdef JP
 msg_print("Æ°¤­¤ÎÁÇÁᤵ¤¬¤Ê¤¯¤Ê¤Ã¤¿¤è¤¦¤À¡£");
@@ -1231,7 +1231,7 @@ msg_print("
        /* Shut */
        else
        {
-               if (p_ptr->blessed && ((p_ptr->pclass != CLASS_BARD) || (p_ptr->magic_num1[0] != MUSIC_BLESS)))
+               if (p_ptr->blessed && !music_singing(MUSIC_BLESS))
                {
 #ifdef JP
 msg_print("¹â·é¤Êµ¤Ê¬¤¬¾Ã¤¨¼º¤»¤¿¡£");
@@ -1300,7 +1300,7 @@ msg_print("
        /* Shut */
        else
        {
-               if (p_ptr->hero && ((p_ptr->pclass != CLASS_BARD) || ((p_ptr->magic_num1[0] != MUSIC_HERO) && (p_ptr->magic_num1[0] != MUSIC_SHERO))))
+               if (p_ptr->hero && !music_singing(MUSIC_HERO) && !music_singing(MUSIC_SHERO))
                {
 #ifdef JP
 msg_print("¥Ò¡¼¥í¡¼¤Îµ¤Ê¬¤¬¾Ã¤¨¼º¤»¤¿¡£");
@@ -1620,7 +1620,7 @@ msg_print("̵Ũ
        /* Shut */
        else
        {
-               if (p_ptr->invuln && ((p_ptr->pclass != CLASS_BARD) || (p_ptr->magic_num1[0] != MUSIC_INVULN)))
+               if (p_ptr->invuln && !music_singing(MUSIC_INVULN))
                {
 #ifdef JP
 msg_print("̵Ũ¤Ç¤Ï¤Ê¤¯¤Ê¤Ã¤¿¡£");
@@ -1700,7 +1700,7 @@ msg_print("
        /* Shut */
        else
        {
-               if (p_ptr->tim_esp && ((p_ptr->pclass != CLASS_BARD) || (p_ptr->magic_num1[0] != MUSIC_MIND)))
+               if (p_ptr->tim_esp && !music_singing(MUSIC_MIND))
                {
 #ifdef JP
 msg_print("°Õ¼±¤Ï¸µ¤ËÌá¤Ã¤¿¡£");
@@ -1985,7 +1985,7 @@ msg_print("­
        /* Shut */
        else
        {
-               if (p_ptr->tim_stealth && ((p_ptr->pclass != CLASS_BARD) || (p_ptr->magic_num1[0] != MUSIC_STEALTH)))
+               if (p_ptr->tim_stealth && !music_singing(MUSIC_STEALTH))
                {
 #ifdef JP
 msg_print("­²»¤¬Â礭¤¯¤Ê¤Ã¤¿¡£");
@@ -3081,7 +3081,7 @@ msg_print("
        /* Shut */
        else
        {
-               if (p_ptr->oppose_acid && ((p_ptr->pclass != CLASS_BARD) || (p_ptr->magic_num1[0] != MUSIC_RESIST)) && !(p_ptr->special_defense & KATA_MUSOU))
+               if (p_ptr->oppose_acid && !music_singing(MUSIC_RESIST) && !(p_ptr->special_defense & KATA_MUSOU))
                {
 #ifdef JP
 msg_print("»À¤Ø¤ÎÂÑÀ­¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
@@ -3147,7 +3147,7 @@ msg_print("
        /* Shut */
        else
        {
-               if (p_ptr->oppose_elec && ((p_ptr->pclass != CLASS_BARD) || (p_ptr->magic_num1[0] != MUSIC_RESIST)) && !(p_ptr->special_defense & KATA_MUSOU))
+               if (p_ptr->oppose_elec && !music_singing(MUSIC_RESIST) && !(p_ptr->special_defense & KATA_MUSOU))
                {
 #ifdef JP
 msg_print("ÅÅ·â¤Ø¤ÎÂÑÀ­¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
@@ -3214,7 +3214,7 @@ msg_print("
        /* Shut */
        else
        {
-               if (p_ptr->oppose_fire && ((p_ptr->pclass != CLASS_BARD) || (p_ptr->magic_num1[0] != MUSIC_RESIST)) && !(p_ptr->special_defense & KATA_MUSOU))
+               if (p_ptr->oppose_fire && !music_singing(MUSIC_RESIST) && !(p_ptr->special_defense & KATA_MUSOU))
                {
 #ifdef JP
 msg_print("²Ð¤Ø¤ÎÂÑÀ­¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
@@ -3280,7 +3280,7 @@ msg_print("
        /* Shut */
        else
        {
-               if (p_ptr->oppose_cold && ((p_ptr->pclass != CLASS_BARD) || (p_ptr->magic_num1[0] != MUSIC_RESIST)) && !(p_ptr->special_defense & KATA_MUSOU))
+               if (p_ptr->oppose_cold && !music_singing(MUSIC_RESIST) && !(p_ptr->special_defense & KATA_MUSOU))
                {
 #ifdef JP
 msg_print("Î䵤¤Ø¤ÎÂÑÀ­¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
@@ -3347,7 +3347,7 @@ msg_print("
        /* Shut */
        else
        {
-               if (p_ptr->oppose_pois && ((p_ptr->pclass != CLASS_BARD) || (p_ptr->magic_num1[0] != MUSIC_RESIST)) && !(p_ptr->special_defense & KATA_MUSOU))
+               if (p_ptr->oppose_pois && !music_singing(MUSIC_RESIST) && !(p_ptr->special_defense & KATA_MUSOU))
                {
 #ifdef JP
 msg_print("ÆǤؤÎÂÑÀ­¤¬Çö¤ì¤¿µ¤¤¬¤¹¤ë¡£");
@@ -5019,7 +5019,7 @@ int take_hit(int damage_type, int damage, cptr hit_from, int monspell)
        /* Mega-Hack -- Apply "invulnerability" */
        if ((damage_type != DAMAGE_USELIFE) && (damage_type != DAMAGE_LOSELIFE))
        {
-               if ((p_ptr->invuln || ((p_ptr->pclass == CLASS_BARD) && (p_ptr->magic_num1[0] == MUSIC_INVULN))) && (damage < 9000))
+               if ((p_ptr->invuln || music_singing(MUSIC_INVULN)) && (damage < 9000))
                {
                        if (damage_type == DAMAGE_FORCE)
                        {