extern u32b get_curse(int power, object_type *o_ptr);
extern void curse_equipment(int chance, int heavy_chance);
extern void mon_take_hit_mon(MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, cptr note, IDX who);
-extern bool process_the_world(int num, int who, bool vs_player);
+extern bool process_the_world(int num, MONSTER_IDX who, bool vs_player);
extern void monster_gain_exp(MONSTER_IDX m_idx, IDX s_idx);
/* monster1.c */
{
/* Special */
case 9:
- letter[index].special = atoi(zz[8]);
+ letter[index].special = (s16b)atoi(zz[8]);
/* Fall through */
/* Trap */
case 8:
}
else
{
- rd_u32b(&m_ptr->dealt_damage);
+ rd_s32b(&m_ptr->dealt_damage);
}
rd_s16b(&m_ptr->mtimed[MTIMED_CSLEEP]);
}
else
{
- rd_u32b(&m_ptr->dealt_damage);
+ rd_s32b(&m_ptr->dealt_damage);
}
/* Monster race index of its appearance */
* @param vs_player TRUEならば時間停止開始処理を行う
* @return 時間停止が行われている状態ならばTRUEを返す
*/
-bool process_the_world(int num, int who, bool vs_player)
+bool process_the_world(int num, MONSTER_IDX who, bool vs_player)
{
monster_type *m_ptr = &m_list[hack_m_idx]; /* the world monster */
}
if (ironman_nightmare)
{
- u32b hp = m_ptr->max_maxhp * 2L;
-
- m_ptr->max_maxhp = (s16b)MIN(30000, hp);
+ HIT_POINT hp = m_ptr->max_maxhp * 2L;
+ m_ptr->max_maxhp = MIN(30000, hp);
}
m_ptr->maxhp = m_ptr->max_maxhp;
m_ptr->hp = old_hp * m_ptr->maxhp / old_maxhp;
HIT_POINT spell_RF6_WORLD(MONSTER_IDX m_idx)
{
monster_type *m_ptr = &m_list[m_idx];
- int who = 0;
+ MONSTER_IDX who = 0;
char m_name[80];
monster_name(m_idx, m_name);
* XXX XXX XXX Perhaps we should affect doors?
* </pre>
*/
-static bool project_f(int who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID typ)
+static bool project_f(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID typ)
{
cave_type *c_ptr = &cave[y][x];
feature_type *f_ptr = &f_info[c_ptr->feat];
* We return "TRUE" if any "obvious" effects were observed. XXX XXX Actually,
* we just assume that the effects were obvious, for historical reasons.
*/
-static bool project_p(int who, cptr who_name, int r, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID typ, BIT_FLAGS flg, int monspell)
+static bool project_p(MONSTER_IDX who, cptr who_name, int r, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID typ, BIT_FLAGS flg, int monspell)
{
int k = 0;
int rlev = 0;
struct monster_type
{
MONRACE_IDX r_idx; /* Monster race index */
- IDX ap_r_idx; /* Monster race appearance index */
+ MONRACE_IDX ap_r_idx; /* Monster race appearance index */
byte sub_align; /* Sub-alignment for a neutral monster */
POSITION fy; /* Y location on map */
HIT_POINT hp; /* Current Hit points */
HIT_POINT maxhp; /* Max Hit points */
HIT_POINT max_maxhp; /* Max Max Hit points */
- u32b dealt_damage; /* Sum of damages dealt by player */
+ HIT_POINT dealt_damage; /* Sum of damages dealt by player */
TIME_EFFECT mtimed[MAX_MTIMED]; /* Timed status counter */
*/
static void prt_binary(u32b flags, int row, int col)
{
- int i;
- u32b bitmask;
+ int i;
+ u32b bitmask;
/* Scan the flags */
for (i = bitmask = 1; i <= 32; i++, bitmask *= 2)
}
/* Special penalty for rest_and_shoot exp scum */
- if ((m_ptr->dealt_damage > (u32b)m_ptr->max_maxhp) && (m_ptr->hp >= 0))
+ if ((m_ptr->dealt_damage > m_ptr->max_maxhp) && (m_ptr->hp >= 0))
{
int over_damage = m_ptr->dealt_damage / m_ptr->max_maxhp;
if (over_damage > 32) over_damage = 32;
m_ptr->hp -= dam;
m_ptr->dealt_damage += dam;
- if(m_ptr->dealt_damage > (u32b)m_ptr->max_maxhp * 100) m_ptr->dealt_damage = m_ptr->max_maxhp * 100;
+ if(m_ptr->dealt_damage > m_ptr->max_maxhp * 100) m_ptr->dealt_damage = m_ptr->max_maxhp * 100;
if (p_ptr->wizard)
{
msg_format( _("合計%d/%dのダメージを与えた。","You do %d (out of %d) damage."),