#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なモンスターの生成を禁止する? */
* @var horror_desc
* @brief ELDRITCH HORROR効果時のモンスターの形容メッセージ(通常時)
*/
-cptr horror_desc[MAX_SAN_HORROR] =
+concptr horror_desc[MAX_SAN_HORROR] =
{
#ifdef JP
"忌まわしい",
* @var funny_desc
* @brief ELDRITCH HORROR効果時のモンスターの形容メッセージ(幻覚状態時)
*/
-cptr funny_desc[MAX_SAN_FUNNY] =
+concptr funny_desc[MAX_SAN_FUNNY] =
{
#ifdef JP
"間抜けな",
* @var funny_comments
* @brief ELDRITCH HORROR効果時の幻覚時間延長を示す錯乱表現
*/
-cptr funny_comments[MAX_SAN_COMMENT] =
+concptr funny_comments[MAX_SAN_COMMENT] =
{
#ifdef JP
/* nuke me */
/* 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;
break;
}
-
case SUMMON_KIN:
{
okay = ((r_ptr->d_char == summon_kin_type) && (r_idx != MON_HAGURE));
/* Scan the allocation table */
for (i = 0; i < alloc_race_size; i++)
{
- monster_race *r_ptr;
+ monster_race *r_ptr;
/* Get the entry */
alloc_entry *entry = &alloc_race_table[i];
*/
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;
{
monster_race *r_ptr;
GAME_TEXT m_name[MAX_NLEN];
- cptr desc;
+ concptr desc;
get_mon_num_prep(get_nightmare, NULL);
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;
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;
{
if (r_ptr->flags1 & RF1_UNIQUE)
{
- cptr color;
+ concptr color;
object_type *o_ptr;
GAME_TEXT o_name[MAX_NLEN];
#define MON_SCAT_MAXD 10 /*!< mon_scatter()関数によるモンスター配置で許される中心からの最大距離 */
/*!
- * @brief モンスター1体を目標地点に可能ながり近い位置に生成する / improved version of scatter() for place monster
+ * @brief モンスター1体を目標地点に可能な限り近い位置に生成する / improved version of scatter() for place monster
* @param r_idx 生成モンスター種族
* @param yp 結果生成位置y座標
* @param xp 結果生成位置x座標
*/
static bool mon_scatter(MONRACE_IDX r_idx, POSITION *yp, POSITION *xp, POSITION y, POSITION x, POSITION max_dist)
{
- int place_x[MON_SCAT_MAXD];
- int place_y[MON_SCAT_MAXD];
+ POSITION place_x[MON_SCAT_MAXD];
+ POSITION place_y[MON_SCAT_MAXD];
int num[MON_SCAT_MAXD];
int i;
- int nx, ny;
+ POSITION nx, ny;
if (max_dist >= MON_SCAT_MAXD)
return FALSE;
place_monster_m_idx = hack_m_idx_ii;
/* Reinforcement */
- for(i = 0; i < 6; i++)
+ for(i = 0; i < A_MAX; i++)
{
if(!r_ptr->reinforce_id[i]) break;
n = damroll(r_ptr->reinforce_dd[i], r_ptr->reinforce_ds[i]);
/* 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 */
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 */
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)
m_idx = cave[y][x].m_idx;
if (m_list[m_idx].mflag2 & MFLAG2_CHAMELEON) r_ptr = &r_info[m_list[m_idx].r_idx];
- summon_kin_type = r_ptr->d_char;
for (attempts = randint1(10) + 5; attempts; attempts--)
{
scatter(&cy, &cx, y, x, 5, 0);
- (void)summon_specific(m_idx, cy, cx, dun_level + 5, SUMMON_KIN, PM_ALLOW_GROUP);
+ (void)summon_specific(m_idx, cy, cx, dun_level + 5, SUMMON_KIN, PM_ALLOW_GROUP, r_ptr->d_char);
y = cy;
x = cx;
}
+ if (cheat_hear) msg_format(_("モンスターの大群(%c)", "Monster horde (%c)."), r_ptr->d_char);
return TRUE;
}
{
if (alloc_horde(y, x))
{
- if (cheat_hear) msg_format(_("モンスターの大群(%c)", "Monster horde (%c)."), summon_kin_type);
return (TRUE);
}
}
*
* Note that this function may not succeed, though this is very rare.
*/
-bool summon_specific(MONSTER_IDX who, POSITION y1, POSITION x1, DEPTH lev, int type, BIT_FLAGS mode)
+bool summon_specific(MONSTER_IDX who, POSITION y1, POSITION x1, DEPTH lev, int type, BIT_FLAGS mode, SYMBOL_CODE symbol)
{
POSITION x, y;
MONRACE_IDX r_idx;
/* Save the "summon" type */
summon_specific_type = type;
- summon_unique_okay = (mode & PM_ALLOW_UNIQUE) ? TRUE : FALSE;
+ summon_kin_type = symbol;
- /* Prepare allocation table */
+ summon_unique_okay = (mode & PM_ALLOW_UNIQUE) ? TRUE : FALSE;
get_mon_num_prep(summon_specific_okay, get_monster_hook2(y, x));
/* Pick a monster, using the level calculation */
* @param mode 生成オプション
* @return 召喚できたらtrueを返す
*/
-bool summon_named_creature (MONSTER_IDX who, POSITION oy, POSITION ox, MONRACE_IDX r_idx, BIT_FLAGS mode)
+bool summon_named_creature(MONSTER_IDX who, POSITION oy, POSITION ox, MONRACE_IDX r_idx, BIT_FLAGS mode)
{
POSITION x, y;
*/
void message_pain(MONSTER_IDX m_idx, HIT_POINT dam)
{
- long oldhp, newhp, tmp;
- int percentage;
+ HIT_POINT oldhp, newhp;
+ HIT_POINT tmp;
+ PERCENTAGE percentage;
monster_type *m_ptr = &m_list[m_idx];
monster_race *r_ptr = &r_info[m_ptr->r_idx];
GAME_TEXT m_name[MAX_NLEN];
- /* Get the monster name */
monster_desc(m_name, m_ptr, 0);
if(dam == 0) // Notice non-damage
}
/* Note -- subtle fix -CFT */
- newhp = (long)(m_ptr->hp);
- oldhp = newhp + (long)(dam);
+ newhp = m_ptr->hp;
+ oldhp = newhp + dam;
tmp = (newhp * 100L) / oldhp;
- percentage = (int)(tmp);
+ percentage = tmp;
if(my_strchr(",ejmvwQ", r_ptr->d_char)) // Mushrooms, Eyes, Jellies, Molds, Vortices, Worms, Quylthulgs
{
void update_smart_learn(MONSTER_IDX m_idx, int what)
{
monster_type *m_ptr = &m_list[m_idx];
-
monster_race *r_ptr = &r_info[m_ptr->r_idx];
-
/* Not allowed to learn */
if (!smart_learn) return;
/* Not intelligent, only learn sometimes */
if (!(r_ptr->flags2 & (RF2_SMART)) && (randint0(100) < 50)) return;
-
-
/* Analyze the knowledge */
switch (what)
{