OSDN Git Service

[Refactor] #37353 cmd-mane.h を作成して変数宣言移動。 mane.c を cmd-mane.c に改名。
[hengband/hengband.git] / src / spells1.c
index 8d159c6..99816f5 100644 (file)
@@ -19,6 +19,8 @@
 
 #include "monster.h"
 #include "monster-status.h"
+#include "monster-spell.h"
+#include "spells-status.h"
 #include "spells-diceroll.h"
 #include "spells-summon.h"
 #include "monsterrace-hook.h"
 #include "artifact.h"
 #include "avatar.h"
 #include "player-status.h"
+#include "player-move.h"
 #include "realm-hex.h"
 #include "object-hook.h"
+#include "object-broken.h"
 #include "term.h"
 #include "grid.h"
 #include "feature.h"
@@ -339,8 +343,6 @@ static bool project_f(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
 
                                /* Destroy the wall */
                                cave_alter_feat(y, x, FF_HURT_ROCK);
-
-                               /* Update some things */
                                p_ptr->update |= (PU_FLOW);
                        }
 
@@ -526,8 +528,6 @@ static bool project_f(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
 
                                /* Destroy the wall */
                                cave_alter_feat(y, x, FF_HURT_ROCK);
-
-                               /* Update some things */
                                p_ptr->update |= (PU_FLOW);
                        }
                        break;
@@ -553,8 +553,6 @@ static bool project_f(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
 
                                /* Destroy the wall */
                                cave_alter_feat(y, x, FF_HURT_ROCK);
-
-                               /* Update some things */
                                p_ptr->update |= (PU_FLOW);
                        }
                        break;
@@ -651,8 +649,6 @@ static bool project_o(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
                /* Get the "plural"-ness */
                bool plural = (o_ptr->number > 1);
 #endif
-
-               /* Acquire next object */
                next_o_idx = o_ptr->next_o_idx;
                object_flags(o_ptr, flgs);
 
@@ -1597,7 +1593,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
                                                else
                                                {
                                                        /* Injure +/- confusion */
-                                                       monster_desc(killer, m_ptr, MD_IGNORE_HALLU | MD_ASSUME_VISIBLE | MD_INDEF_VISIBLE);
+                                                       monster_desc(killer, m_ptr, MD_WRONGDOER_NAME);
                                                        take_hit(DAMAGE_ATTACK, dam, killer, -1);  /* has already been /3 */
                                                        if (one_in_(4) && !CHECK_MULTISHADOW())
                                                        {
@@ -1687,7 +1683,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
                                                else
                                                {
                                                        /* Injure + mana drain */
-                                                       monster_desc(killer, m_ptr, MD_IGNORE_HALLU | MD_ASSUME_VISIBLE | MD_INDEF_VISIBLE);
+                                                       monster_desc(killer, m_ptr, MD_WRONGDOER_NAME);
                                                        if (!CHECK_MULTISHADOW())
                                                        {
                                                                msg_print(_("超能力パワーを吸いとられた!", "Your psychic energy is drained!"));
@@ -3971,8 +3967,6 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                        strcpy(killer, _("罠", "a trap"));
                        break;
                }
-
-               /* Paranoia */
                strcpy(m_name, killer);
        }
 
@@ -4053,7 +4047,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                                        if (one_in_(4)) /* 4 */
                                                do_poly_self();
                                        else
-                                               mutate_player();
+                                               status_shuffle();
                                }
 
                                if (one_in_(6))
@@ -4204,7 +4198,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                                        if (one_in_(3))
                                        {
                                                msg_print(_("あなたの身体はカオスの力で捻じ曲げられた!", "Your body is twisted by chaos!"));
-                                               (void)gain_random_mutation(0);
+                                               (void)gain_mutation(p_ptr, 0);
                                        }
                                }
                                if (!p_ptr->resist_neth && !p_ptr->resist_chaos)
@@ -4896,7 +4890,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
 
                                get_damage = take_hit(DAMAGE_ATTACK, dam, m_name, monspell);
 
-                               if (p_ptr->chp < 1) p_ptr->chp = 1; /* Paranoia */
+                               if (p_ptr->chp < 1) p_ptr->chp = 1;
                        }
                        break;
                }
@@ -5505,7 +5499,7 @@ bool project(MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT da
        {
                x1 = current_floor_ptr->m_list[who].fx;
                y1 = current_floor_ptr->m_list[who].fy;
-               monster_desc(who_name, &current_floor_ptr->m_list[who], MD_IGNORE_HALLU | MD_ASSUME_VISIBLE | MD_INDEF_VISIBLE);
+               monster_desc(who_name, &current_floor_ptr->m_list[who], MD_WRONGDOER_NAME);
        }
 
        else