OSDN Git Service

[Refactor] #37353 混沌の戦士のレイシャル「幻惑の光」を confusing_light() に分離。 / Separate Chaos warrior...
[hengband/hengband.git] / src / monster2.c
index 3b49643..626d6cc 100644 (file)
 #include "cmd-pet.h"
 #include "monsterrace-hook.h"
 #include "monster-status.h"
+#include "projection.h"
+#include "monster.h"
+#include "spells-summon.h"
+#include "quest.h"
 
 #define HORDE_NOGOOD 0x01 /*!< (未実装フラグ)HORDE生成でGOODなモンスターの生成を禁止する? */
 #define HORDE_NOEVIL 0x02 /*!< (未実装フラグ)HORDE生成でEVILなモンスターの生成を禁止する? */
@@ -23,7 +27,7 @@
  * @var horror_desc
  * @brief ELDRITCH HORROR効果時のモンスターの形容メッセージ(通常時)
  */
-cptr horror_desc[MAX_SAN_HORROR] =
+concptr horror_desc[MAX_SAN_HORROR] =
 {
 #ifdef JP
        "忌まわしい",
@@ -81,7 +85,7 @@ cptr horror_desc[MAX_SAN_HORROR] =
  * @var funny_desc
  * @brief ELDRITCH HORROR効果時のモンスターの形容メッセージ(幻覚状態時)
  */
-cptr funny_desc[MAX_SAN_FUNNY] =
+concptr funny_desc[MAX_SAN_FUNNY] =
 {
 #ifdef JP
        "間抜けな",
@@ -145,7 +149,7 @@ cptr funny_desc[MAX_SAN_FUNNY] =
  * @var funny_comments
  * @brief ELDRITCH HORROR効果時の幻覚時間延長を示す錯乱表現
  */
-cptr funny_comments[MAX_SAN_COMMENT] =
+concptr funny_comments[MAX_SAN_COMMENT] =
 {
 #ifdef JP
   /* nuke me */
@@ -264,8 +268,6 @@ void delete_monster_idx(MONSTER_IDX i)
        /* Monster is gone */
        cave[y][x].m_idx = 0;
 
-
-       /* Delete objects */
        for (this_o_idx = m_ptr->hold_o_idx; this_o_idx; this_o_idx = next_o_idx)
        {
                object_type *o_ptr;
@@ -1456,10 +1458,10 @@ MONRACE_IDX get_mon_num(DEPTH level)
  */
 void monster_desc(char *desc, monster_type *m_ptr, BIT_FLAGS mode)
 {
-       cptr            res;
+       concptr            res;
        monster_race    *r_ptr;
 
-       cptr            name;
+       concptr            name;
        char            buf[128];
        GAME_TEXT silly_name[1024];
        bool            seen, pron;
@@ -1983,7 +1985,7 @@ void sanity_blast(monster_type *m_ptr, bool necro)
        {
                monster_race *r_ptr;
                GAME_TEXT m_name[MAX_NLEN];
-               cptr desc;
+               concptr desc;
 
                get_mon_num_prep(get_nightmare, NULL);
 
@@ -2863,10 +2865,14 @@ static bool monster_hook_tanuki(MONRACE_IDX r_idx)
 static IDX initial_r_appearance(MONRACE_IDX r_idx)
 {
        int attempts = 1000;
-
        IDX ap_r_idx;
        DEPTH min = MIN(base_level-5, 50);
 
+       if (p_ptr->pseikaku == SEIKAKU_CHARGEMAN)
+       {
+               if (base_level == 0 || one_in_(5)) return MON_ALIEN_JURAL;
+       }
+
        if (!(r_info[r_idx].flags7 & RF7_TANUKI))
                return r_idx;
 
@@ -2937,7 +2943,7 @@ static bool place_monster_one(MONSTER_IDX who, POSITION y, POSITION x, MONRACE_I
        cave_type               *c_ptr = &cave[y][x];
        monster_type    *m_ptr;
        monster_race    *r_ptr = &r_info[r_idx];
-       cptr            name = (r_name + r_ptr->name);
+       concptr         name = (r_name + r_ptr->name);
 
        int cmi;
 
@@ -3248,7 +3254,7 @@ static bool place_monster_one(MONSTER_IDX who, POSITION y, POSITION x, MONRACE_I
        {
                if (r_ptr->flags1 & RF1_UNIQUE)
                {
-                       cptr color;
+                       concptr color;
                        object_type *o_ptr;
                        GAME_TEXT o_name[MAX_NLEN];
 
@@ -3617,8 +3623,6 @@ bool place_monster_aux(MONSTER_IDX who, POSITION y, POSITION x, MONRACE_IDX r_id
 
                        /* Require empty grids */
                        if (!cave_empty_bold2(ny, nx)) continue;
-
-                       /* Prepare allocation table */
                        get_mon_num_prep(place_monster_can_escort, get_monster_hook2(ny, nx));
 
                        /* Pick a random race */
@@ -3654,8 +3658,6 @@ bool place_monster_aux(MONSTER_IDX who, POSITION y, POSITION x, MONRACE_IDX r_id
 bool place_monster(POSITION y, POSITION x, BIT_FLAGS mode)
 {
        MONRACE_IDX r_idx;
-
-       /* Prepare allocation table */
        get_mon_num_prep(get_monster_hook(), get_monster_hook2(y, x));
 
        /* Pick a monster */
@@ -3684,8 +3686,6 @@ bool alloc_horde(POSITION y, POSITION x)
        int attempts = 1000;
        POSITION cy = y;
        POSITION cx = x;
-
-       /* Prepare allocation table */
        get_mon_num_prep(get_monster_hook(), get_monster_hook2(y, x));
 
        while (--attempts)
@@ -3937,8 +3937,6 @@ bool summon_specific(MONSTER_IDX who, POSITION y1, POSITION x1, DEPTH lev, int t
        summon_kin_type = symbol;
 
        summon_unique_okay = (mode & PM_ALLOW_UNIQUE) ? TRUE : FALSE;
-
-       /* Prepare allocation table */
        get_mon_num_prep(summon_specific_okay, get_monster_hook2(y, x));
 
        /* Pick a monster, using the level calculation */