*/
static void pattern_teleport(void)
{
- int min_level = 0;
- int max_level = 99;
+ DEPTH min_level = 0;
+ DEPTH max_level = 99;
/* Ask for level */
if (get_check(_("他の階にテレポートしますか?", "Teleport level? ")))
if (!get_string(ppp, tmp_val, 10)) return;
/* Extract request */
- command_arg = atoi(tmp_val);
+ command_arg = (COMMAND_ARG)atoi(tmp_val);
}
else if (get_check(_("通常テレポート?", "Normal teleport? ")))
{
}
/* Paranoia */
- if (command_arg < min_level) command_arg = min_level;
+ if (command_arg < min_level) command_arg = (COMMAND_ARG)min_level;
/* Paranoia */
- if (command_arg > max_level) command_arg = max_level;
+ if (command_arg > max_level) command_arg = (COMMAND_ARG)max_level;
/* Accept request */
msg_format(_("%d 階にテレポートしました。", "You teleport to dungeon level %d."), command_arg);
* @param m_idx 隣接数を調べたいモンスターのID
* @return 隣接しているモンスターの数
*/
-static int get_monster_crowd_number(IDX m_idx)
+static int get_monster_crowd_number(MONSTER_IDX m_idx)
{
monster_type *m_ptr = &m_list[m_idx];
int my = m_ptr->fy;
{
(void)set_lightspeed(p_ptr->lightspeed - 1, TRUE);
}
- if ((p_ptr->pclass == CLASS_FORCETRAINER) && (p_ptr->magic_num1[0]))
+ if ((p_ptr->pclass == CLASS_FORCETRAINER) && P_PTR_KI)
{
- if (p_ptr->magic_num1[0] < 40)
+ if (P_PTR_KI < 40)
{
- p_ptr->magic_num1[0] = 0;
+ P_PTR_KI = 0;
}
- else p_ptr->magic_num1[0] -= 40;
+ else P_PTR_KI -= 40;
p_ptr->update |= (PU_BONUS);
}
if (p_ptr->action == ACTION_LEARN)
*/
void play_game(bool new_game)
{
- int i;
+ MONSTER_IDX i;
bool load_game = TRUE;
bool init_random_seed = FALSE;
if (p_ptr->pclass == CLASS_MAGIC_EATER)
{
- for (i = 0; i < EATER_EXT*2; i++)
+ int magic_idx;
+ for (magic_idx = 0; magic_idx < EATER_EXT*2; magic_idx++)
{
- p_ptr->magic_num1[i] = p_ptr->magic_num2[i]*EATER_CHARGE;
+ p_ptr->magic_num1[magic_idx] = p_ptr->magic_num2[magic_idx]*EATER_CHARGE;
}
- for (; i < EATER_EXT*3; i++)
+ for (; magic_idx < EATER_EXT*3; magic_idx++)
{
- p_ptr->magic_num1[i] = 0;
+ p_ptr->magic_num1[magic_idx] = 0;
}
}
/* Restore spell points */