* @return 命中と判定された場合TRUEを返す
* @note Always miss 5%, always hit 5%, otherwise random.
*/
-bool test_hit_norm(int chance, int ac, int vis)
+bool test_hit_norm(int chance, ARMOUR_CLASS ac, int vis)
{
int k;
* @param mode オプションフラグ
* @return クリティカル修正が入ったダメージ値
*/
-HIT_POINT critical_norm(int weight, int plus, HIT_POINT dam, s16b meichuu, BIT_FLAGS mode)
+HIT_POINT critical_norm(WEIGHT weight, int plus, HIT_POINT dam, s16b meichuu, BIT_FLAGS mode)
{
int i, k;
* and which also do at least 20 damage, or, sometimes, N damage.
* This is used only to determine "cuts" and "stuns".
*/
-static int monster_critical(int dice, int sides, HIT_POINT dam)
+static int monster_critical(DICE_NUMBER dice, DICE_SID sides, HIT_POINT dam)
{
int max = 0;
int total = dice * sides;
* Always miss 5% of the time, Always hit 5% of the time.
* Otherwise, match monster power against player armor.
*/
-static int check_hit(int power, int level, int stun)
+static int check_hit(int power, DEPTH level, int stun)
{
int i, k, ac;
/* Test for hit */
if ((!(r_ptr->flags2 & RF2_QUANTUM) || !randint0(2)) && test_hit_norm(chance, r_ptr->ac, m_ptr->ml))
{
- /* Sound */
sound(SOUND_HIT);
msg_format(_("%sを%sで攻撃した。", "You hit %s with your %s."), m_name, atk_desc);
/* Player misses */
else
{
- /* Sound */
sound(SOUND_MISS);
/* Message */
* @details
* If no "weapon" is available, then "punch" the monster one time.
*/
-static void py_attack_aux(int y, int x, bool *fear, bool *mdeath, s16b hand, BIT_FLAGS mode)
+static void py_attack_aux(POSITION y, POSITION x, bool *fear, bool *mdeath, s16b hand, BIT_FLAGS mode)
{
- int num = 0, bonus, chance, vir;
+ int num = 0, bonus, chance, vir;
HIT_POINT k;
cave_type *c_ptr = &cave[y][x];
bool can_drain = FALSE;
int num_blow;
int drain_left = MAX_VAMPIRIC_DRAIN;
- u32b flgs[TR_FLAG_SIZE]; /* A massive hack -- life-draining weapons */
+ BIT_FLAGS flgs[TR_FLAG_SIZE]; /* A massive hack -- life-draining weapons */
bool is_human = (r_ptr->d_char == 'p');
bool is_lowlevel = (r_ptr->level < (p_ptr->lev - 15));
bool zantetsu_mukou, e_j_mukou;
{
int vorpal_chance = ((o_ptr->name1 == ART_VORPAL_BLADE) || (o_ptr->name1 == ART_CHAINSWORD)) ? 2 : 4;
- /* Sound */
sound(SOUND_HIT);
/* Message */
int min_level = 1;
const martial_arts *ma_ptr = &ma_blows[0], *old_ptr = &ma_blows[0];
int resist_stun = 0;
- int weight = 8;
+ WEIGHT weight = 8;
if (r_ptr->flags1 & RF1_UNIQUE) resist_stun += 88;
if (r_ptr->flags3 & RF3_NO_STUN) resist_stun += 66;
{
u32b flgs_aux[TR_FLAG_SIZE];
- /* Sound */
sound(SOUND_HIT);
/* Message */
}
else
{
- /* Sound */
sound(SOUND_MISS);
/* Message */
/* Hack -- delay fear messages */
if (fear && m_ptr->ml && !mdeath)
{
- /* Sound */
sound(SOUND_FLEE);
/* Message */
int ap_cnt;
- int i, k, tmp, ac, rlev;
+ INVENTORY_IDX i;
+ int k, tmp, ac, rlev;
int do_cut, do_stun;
s32b gold;
for (k = 0; k < 10; k++)
{
/* Pick an item */
- i = randint0(INVEN_PACK);
+ i = (INVENTORY_IDX)randint0(INVEN_PACK);
/* Obtain the item */
o_ptr = &inventory[i];
s16b o_idx;
/* Pick an item */
- i = randint0(INVEN_PACK);
+ i = (INVENTORY_IDX)randint0(INVEN_PACK);
/* Obtain the item */
o_ptr = &inventory[i];
for (k = 0; k < 10; k++)
{
/* Pick an item from the pack */
- i = randint0(INVEN_PACK);
+ i = (INVENTORY_IDX)randint0(INVEN_PACK);
/* Get the item */
o_ptr = &inventory[i];
{
int j;
BIT_FLAGS flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
- int typ[4][2] = {
+ EFFECT_ID typ[4][2] = {
{ INVEN_HEAD, GF_OLD_CONF },
{ INVEN_LARM, GF_OLD_SLEEP },
{ INVEN_HANDS, GF_TURN_ALL },