OSDN Git Service

[Refactor] #37353 混沌の戦士のレイシャル「幻惑の光」を confusing_light() に分離。 / Separate Chaos warrior...
[hengband/hengband.git] / src / monster2.c
index db89286..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なモンスターの生成を禁止する? */
@@ -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;
@@ -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;
 
@@ -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 */