* Used to allocate proper treasure when "Creeping coins" die
* XXX XXX XXX Note the use of actual "monster names"
*/
-static int get_coin_type(int r_idx)
+static int get_coin_type(MONRACE_IDX r_idx)
{
/* Analyze monsters */
switch (r_idx)
{
for (y = 0; y < cur_hgt; ++ y)
{
- int m_idx = cave[y][x].m_idx;
+ MONSTER_IDX m_idx = cave[y][x].m_idx;
if (m_idx > 0 && is_hostile(&m_list[m_idx]))
{
* it drops all of its objects, which may disappear in crowded rooms.
* </pre>
*/
-void monster_death(int m_idx, bool drop_item)
+void monster_death(MONSTER_IDX m_idx, bool drop_item)
{
int i, j, y, x;
if ((r_ptr->flags7 & RF7_GUARDIAN) && (d_info[dungeon_type].final_guardian == m_ptr->r_idx))
{
- int k_idx = d_info[dungeon_type].final_object ? d_info[dungeon_type].final_object
+ IDX k_idx = d_info[dungeon_type].final_object ? d_info[dungeon_type].final_object
: lookup_kind(TV_SCROLL, SV_SCROLL_ACQUIREMENT);
if (d_info[dungeon_type].final_artifact)
* to induce changes in the monster recall code.
* </pre>
*/
-bool mon_take_hit(int m_idx, int dam, bool *fear, cptr note)
+bool mon_take_hit(MONSTER_IDX m_idx, int dam, bool *fear, cptr note)
{
monster_type *m_ptr = &m_list[m_idx];
monster_race *r_ptr = &r_info[m_ptr->r_idx];
* Future versions may restrict the ability to target "trappers"
* and "mimics", but the semantics is a little bit weird.
*/
-bool target_able(int m_idx)
+bool target_able(MONSTER_IDX m_idx)
{
monster_type *m_ptr = &m_list[m_idx];
*
* Note that confusion over-rides any (explicit?) user choice.
*/
-bool get_aim_dir(int *dp)
+bool get_aim_dir(DIRECTION *dp)
{
- int dir;
-
+ DIRECTION dir;
char command;
-
cptr p;
/* Initialize */
* Display a rumor and apply its effects
*/
-int rumor_num(char *zz, int max_idx)
+IDX rumor_num(char *zz, IDX max_idx)
{
if (strcmp(zz, "*") == 0) return randint1(max_idx - 1);
- return atoi(zz);
+ return (IDX)atoi(zz);
}
cptr rumor_bind_name(char *base, cptr fullname)
}
else if (strcmp(zz[0], "MONSTER") == 0)
{
- int r_idx;
+ MONRACE_IDX r_idx;
monster_race *r_ptr;
while(1)
}
else if (strcmp(zz[0], "TOWN") == 0)
{
- int t_idx;
+ IDX t_idx;
s32b visit;
while(1)