#include "monster/monster-flag-types.h"
#include "monster-floor/monster-generator.h"
#include "monster-floor/monster-remover.h"
+#include "monster-floor/monster-summon.h"
#include "monster/monster-status.h"
#include "monster/monster-update.h"
#include "monster/monster-util.h"
/* Put some monsters in the dungeon */
for (i = i + k; i > 0; i--)
{
- (void)alloc_monster(player_ptr, 0, PM_ALLOW_SLEEP);
+ (void)alloc_monster(player_ptr, 0, PM_ALLOW_SLEEP, summon_specific);
}
/* Place some traps in the dungeon */
#include "io/uid-checker.h"
#include "io/write-diary.h"
#include "mind/mind-mirror-master.h"
+#include "monster-floor/monster-generator.h"
+#include "monster-floor/monster-remover.h"
+#include "monster-floor/monster-summon.h"
#include "monster-race/race-flags1.h"
#include "monster-race/race-flags2.h"
#include "monster-race/race-flags7.h"
#include "monster/monster-describer.h"
#include "monster/monster-description-types.h"
#include "monster/monster-flag-types.h"
-#include "monster-floor/monster-generator.h"
#include "monster/monster-info.h"
#include "monster/monster-list.h"
-#include "monster-floor/monster-remover.h"
#include "monster/monster-status.h"
#include "monster/monster-update.h"
#include "monster/smart-learn-types.h"
for (i = 0; i < alloc_times; i++)
{
/* Make a (group of) new monster */
- (void)alloc_monster(creature_ptr, 0, 0);
+ (void)alloc_monster(creature_ptr, 0, 0, summon_specific);
}
}
#include "main/init.h"
#include "monster-floor/monster-generator.h"
#include "monster-floor/monster-remover.h"
+#include "monster-floor/monster-summon.h"
#include "monster/monster-status.h"
#include "monster/monster-util.h"
#include "monster/monster-info.h"
mode |= PM_ALLOW_SLEEP;
/* Make a resident */
- (void)alloc_monster(creature_ptr, generate_encounter ? 0 : 3, mode);
+ (void)alloc_monster(creature_ptr, generate_encounter ? 0 : 3, mode, summon_specific);
}
if(generate_encounter) creature_ptr->ambush_flag = TRUE;
#include "monster-floor/monster-generator.h"
#include "dungeon/dungeon.h"
#include "floor/floor.h"
-#include "monster-floor/monster-summon.h" // todo 相互依存してしまった、何とかする.
#include "monster-floor/one-monster-placer.h"
#include "monster-floor/place-monster-types.h"
#include "monster-race/monster-race-hook.h"
* @param x 生成地点x座標
* @return 生成に成功したらtrue
*/
-bool alloc_horde(player_type *player_ptr, POSITION y, POSITION x)
+bool alloc_horde(player_type *player_ptr, POSITION y, POSITION x, summon_specific_pf summon_specific)
{
get_mon_num_prep(player_ptr, get_monster_hook(player_ptr), get_monster_hook2(player_ptr, y, x));
POSITION cx = x;
for (attempts = randint1(10) + 5; attempts; attempts--) {
scatter(player_ptr, &cy, &cx, y, x, 5, 0);
- (void)summon_specific(player_ptr, m_idx, cy, cx, floor_ptr->dun_level + 5, SUMMON_KIN, PM_ALLOW_GROUP);
+ (void)(*summon_specific)(player_ptr, m_idx, cy, cx, floor_ptr->dun_level + 5, SUMMON_KIN, PM_ALLOW_GROUP);
y = cy;
x = cx;
}
* Use "slp" to choose the initial "sleep" status
* Use "floor_ptr->monster_level" for the monster level
*/
-bool alloc_monster(player_type *player_ptr, POSITION dis, BIT_FLAGS mode)
+bool alloc_monster(player_type *player_ptr, POSITION dis, BIT_FLAGS mode, summon_specific_pf summon_specific)
{
if (alloc_guardian(player_ptr, FALSE))
return TRUE;
}
if (randint1(5000) <= floor_ptr->dun_level) {
- if (alloc_horde(player_ptr, y, x)) {
+ if (alloc_horde(player_ptr, y, x, summon_specific)) {
return TRUE;
}
} else {
#include "system/angband.h"
+typedef bool (*summon_specific_pf)(player_type *, MONSTER_IDX, POSITION, POSITION, DEPTH, int, BIT_FLAGS);
+
bool mon_scatter(player_type *player_ptr, MONRACE_IDX r_idx, POSITION *yp, POSITION *xp, POSITION y, POSITION x, POSITION max_dist);
bool multiply_monster(player_type *player_ptr, MONSTER_IDX m_idx, bool clone, BIT_FLAGS mode);
bool place_monster_aux(player_type *player_ptr, MONSTER_IDX who, POSITION y, POSITION x, MONRACE_IDX r_idx, BIT_FLAGS mode);
bool place_monster(player_type *player_ptr, POSITION y, POSITION x, BIT_FLAGS mode);
-bool alloc_horde(player_type *player_ptr, POSITION y, POSITION x);
+bool alloc_horde(player_type *player_ptr, POSITION y, POSITION x, summon_specific_pf summon_specific);
bool alloc_guardian(player_type *player_ptr, bool def_val);
-bool alloc_monster(player_type *player_ptr, POSITION dis, BIT_FLAGS mode);
+bool alloc_monster(player_type *player_ptr, POSITION dis, BIT_FLAGS mode, summon_specific_pf summon_specific);
#include "dungeon/dungeon.h"
#include "floor/floor.h"
#include "main/sound-definitions-table.h"
-#include "monster-floor/monster-generator.h" // todo 相互依存してしまった、何とかする.
+#include "monster-floor/monster-generator.h"
#include "monster-floor/place-monster-types.h"
#include "monster-race/monster-race-hook.h"
#include "monster-race/race-flags1.h"
if (is_cave_empty_bold(caster_ptr, wy, wx)) break;
}
- (void)alloc_horde(caster_ptr, wy, wx);
+ (void)alloc_horde(caster_ptr, wy, wx, summon_specific);
}
/*!
#include "io/write-diary.h"
#include "market/arena.h"
#include "market/bounty.h"
-#include "monster/monster-describer.h"
#include "monster-floor/monster-generator.h"
+#include "monster-floor/monster-summon.h"
+#include "monster/monster-describer.h"
#include "monster/monster-status.h"
#include "mutation/mutation-processor.h"
#include "object/lite-processor.h"
}
if (one_in_(d_info[player_ptr->dungeon_idx].max_m_alloc_chance) && !floor_ptr->inside_arena && !floor_ptr->inside_quest && !player_ptr->phase_out) {
- (void)alloc_monster(player_ptr, MAX_SIGHT + 5, 0);
+ (void)alloc_monster(player_ptr, MAX_SIGHT + 5, 0, summon_specific);
}
if (!(current_world_ptr->game_turn % (TURNS_PER_TICK * 10)) && !player_ptr->phase_out)