* 自爆以外のなんらかのHP攻撃手段を持っていること。
* @return 参加できるか否か
*/
-static bool vault_aux_battle(int r_idx)
+static bool vault_aux_battle(MONRACE_IDX r_idx)
{
int i;
- int dam = 0;
+ HIT_POINT dam = 0;
monster_race *r_ptr = &r_info[r_idx];
tekitou = FALSE;
for(i = 0; i < 4; i++)
{
- IDX r_idx;
+ MONRACE_IDX r_idx;
int j;
while (1)
{
* @param r_idx 判定対象となるモンスターのID
* @return 悪夢の元凶となり得るか否か。
*/
-bool get_nightmare(IDX r_idx)
+bool get_nightmare(MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
* @param dam 基本ダメージ量
* @return ダメージ期待値
*/
-s16b calc_expect_crit_shot(int weight, int plus_ammo, int plus_bow, int dam)
+HIT_POINT calc_expect_crit_shot(int weight, int plus_ammo, int plus_bow, HIT_POINT dam)
{
u32b num;
int i, k, crit;
* @param dokubari 毒針処理か否か
* @return ダメージ期待値
*/
-s16b calc_expect_crit(int weight, int plus, int dam, s16b meichuu, bool dokubari)
+HIT_POINT calc_expect_crit(int weight, int plus, HIT_POINT dam, s16b meichuu, bool dokubari)
{
u32b k, num;
int i;
* @param force 理力特別計算フラグ
* @return ダメージ期待値
*/
-static s16b calc_slaydam(int dam, int mult, int div, bool force)
+static HIT_POINT calc_slaydam(HIT_POINT dam, int mult, int div, bool force)
{
int tmp;
if(force)
static int compare_weapons(int bcost)
{
int i, n;
- int item, item2;
+ OBJECT_IDX item, item2;
object_type *o_ptr[2];
object_type orig_weapon;
object_type *i_ptr;
static int repair_broken_weapon_aux(int bcost)
{
s32b cost;
- int item, mater;
+ OBJECT_IDX item, mater;
object_type *o_ptr, *mo_ptr; /* broken weapon and material weapon */
object_kind *k_ptr;
int i, dd_bonus, ds_bonus;
else /* TV_BROKEN_SWORD */
{
/* Repair to a sword or sometimes material's type weapon */
- IDX tval = (one_in_(5) ? mo_ptr->tval : TV_SWORD);
+ OBJECT_TYPE_VALUE tval = (one_in_(5) ? mo_ptr->tval : TV_SWORD);
while(1)
{
/* Copy base object's ability */
for (i = 0; i < TR_FLAG_SIZE; i++) o_ptr->art_flags[i] |= k_ptr->flags[i];
if (k_ptr->pval) o_ptr->pval = MAX(o_ptr->pval, randint1(k_ptr->pval));
- if (have_flag(k_ptr->flags, TR_ACTIVATE)) o_ptr->xtra2 = k_ptr->act_idx;
+ if (have_flag(k_ptr->flags, TR_ACTIVATE)) o_ptr->xtra2 = (byte_hack)k_ptr->act_idx;
/* Dice up */
if (dd_bonus > 0)
*/
static bool enchant_item(int cost, int to_hit, int to_dam, int to_ac)
{
- int i, item;
+ int i;
+ OBJECT_IDX item;
bool okay = FALSE;
object_type *o_ptr;
cptr q, s;
*/
static void building_recharge(void)
{
- int item, lev;
+ OBJECT_IDX item;
+ int lev;
object_type *o_ptr;
object_kind *k_ptr;
cptr q, s;
max_charges = o_ptr->number * k_ptr->pval - o_ptr->pval;
/* Get the quantity for staves and wands */
- charges = get_quantity(format(_("一回分$%d で何回分充填しますか?", "Add how many charges for %d gold? "), price),
+ charges = (PARAMETER_VALUE)get_quantity(format(_("一回分$%d で何回分充填しますか?", "Add how many charges for %d gold? "), price),
MIN(p_ptr->au / price, max_charges));
/* Do nothing */
*/
static bool research_mon(void)
{
- int i, n;
- IDX r_idx;
+ IDX i;
+ int n;
+ MONRACE_IDX r_idx;
char sym, query;
char buf[128];
u16b why = 0;
- u16b *who;
+ IDX *who;
/* XTRA HACK WHATSEARCH */
bool all = FALSE;
/* XTRA HACK REMEMBER_IDX */
static int old_sym = '\0';
- static int old_i = 0;
+ static IDX old_i = 0;
/* Save the screen */
/* Allocate the "who" array */
- C_MAKE(who, max_r_idx, u16b);
+ C_MAKE(who, max_r_idx, IDX);
/* Collect matching monsters */
for (n = 0, i = 1; i < max_r_idx; i++)
continue;
}
#endif
- if (isupper(temp[xx])) temp[xx] = tolower(temp[xx]);
+ if (isupper(temp[xx])) temp[xx] = (char)tolower(temp[xx]);
}
#ifdef JP
strcpy(temp2, r_name + r_ptr->name);
#endif
for (xx = 0; temp2[xx] && xx < 80; xx++)
- if (isupper(temp2[xx])) temp2[xx] = tolower(temp2[xx]);
+ if (isupper(temp2[xx])) temp2[xx] = (char)tolower(temp2[xx]);
#ifdef JP
if (my_strstr(temp2, temp) || my_strstr(r_name + r_ptr->name, temp))
if (!n)
{
/* Free the "who" array */
- C_KILL(who, max_r_idx, u16b);
+ C_KILL(who, max_r_idx, IDX);
/* Restore */
screen_load();
/* prt(buf, 5, 5);*/
/* Free the "who" array */
- C_KILL(who, max_r_idx, u16b);
+ C_KILL(who, max_r_idx, IDX);
/* Restore */
screen_load();
*/
static void bldg_process_command(building_type *bldg, int i)
{
- int bact = bldg->actions[i];
- int bcost;
+ BACT_IDX bact = bldg->actions[i];
+ PRICE bcost;
bool paid = FALSE;
int amt;
break;
case BACT_TELEPORT_LEVEL:
{
- int select_dungeon;
- int max_depth;
+ IDX select_dungeon;
+ DEPTH max_depth;
clear_bldg(4, 20);
select_dungeon = choose_dungeon(_("にテレポート", "teleport"), 4, 0);
else if(quest[QUEST_SERPENT].status != QUEST_STATUS_FINISHED) max_depth = 99;
}
amt = get_quantity(format(_("%sの何階にテレポートしますか?", "Teleport to which level of %s? "),
- d_name + d_info[select_dungeon].name), max_depth);
+ d_name + d_info[select_dungeon].name), (QUANTITY)max_depth);
if (amt > 0)
{