* @param mode オプションフラグ
* @return クリティカル修正が入ったダメージ値
*/
-HIT_POINT critical_norm(int weight, int plus, HIT_POINT dam, s16b meichuu, int mode)
+HIT_POINT critical_norm(int weight, int plus, HIT_POINT dam, s16b meichuu, BIT_FLAGS mode)
{
int i, k;
* @param m_ptr 目標モンスターの構造体参照ポインタ
* @return スレイング加味後の倍率(/10倍)
*/
-static int mult_slaying(int mult, const u32b* flgs, const monster_type* m_ptr)
+static MULTIPLY mult_slaying(MULTIPLY mult, const BIT_FLAGS* flgs, const monster_type* m_ptr)
{
static const struct slay_table_t {
int slay_flag;
- u32b affect_race_flag;
- int slay_mult;
+ BIT_FLAGS affect_race_flag;
+ MULTIPLY slay_mult;
size_t flag_offset;
size_t r_flag_offset;
} slay_table[] = {
* @param m_ptr 目標モンスターの構造体参照ポインタ
* @return スレイング加味後の倍率(/10倍)
*/
-static int mult_brand(int mult, const u32b* flgs, const monster_type* m_ptr)
+static MULTIPLY mult_brand(MULTIPLY mult, const BIT_FLAGS* flgs, const monster_type* m_ptr)
{
static const struct brand_table_t {
int brand_flag;
- u32b resist_mask;
- u32b hurt_flag;
+ BIT_FLAGS resist_mask;
+ BIT_FLAGS hurt_flag;
} brand_table[] = {
{TR_BRAND_ACID, RFR_EFF_IM_ACID_MASK, 0U },
{TR_BRAND_ELEC, RFR_EFF_IM_ELEC_MASK, 0U },
* Note that most brands and slays are x3, except Slay Animal (x2),\n
* Slay Evil (x2), and Kill dragon (x5).\n
*/
-s16b tot_dam_aux(object_type *o_ptr, int tdam, monster_type *m_ptr, int mode, bool thrown)
+s16b tot_dam_aux(object_type *o_ptr, int tdam, monster_type *m_ptr, BIT_FLAGS mode, bool thrown)
{
- int mult = 10;
+ MULTIPLY mult = 10;
- u32b flgs[TR_FLAG_SIZE];
+ BIT_FLAGS flgs[TR_FLAG_SIZE];
/* Extract the flags */
object_flags(o_ptr, flgs);
* @param x 対象となるマスのX座標
* @return なし
*/
-static void discover_hidden_things(int y, int x)
+static void discover_hidden_things(POSITION y, POSITION x)
{
- s16b this_o_idx, next_o_idx = 0;
-
+ OBJECT_IDX this_o_idx, next_o_idx = 0;
cave_type *c_ptr;
/* Access the grid */
*/
void search(void)
{
- int i, chance;
+ DIRECTION i;
+ PERCENTAGE chance;
/* Start with base search ability */
chance = p_ptr->skill_srh;
*/
static void hit_trap_pit(int trap_feat_type)
{
- int dam;
+ HIT_POINT dam;
cptr trap_name = "";
cptr spike_name = "";
* @return なし
*/
static void touch_zap_player_aux(monster_type *m_ptr, bool immune, int flags_offset, int r_flags_offset, u32b aura_flag,
- int (*dam_func)(int dam, cptr kb_str, int monspell, bool aura), cptr message)
+ int (*dam_func)(HIT_POINT dam, cptr kb_str, int monspell, bool aura), cptr message)
{
monster_race *r_ptr = &r_info[m_ptr->r_idx];
* @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, int mode)
+static void py_attack_aux(int y, int x, bool *fear, bool *mdeath, s16b hand, BIT_FLAGS mode)
{
int num = 0, bonus, chance, vir;
HIT_POINT k;
* @details
* If no "weapon" is available, then "punch" the monster one time.
*/
-bool py_attack(int y, int x, int mode)
+bool py_attack(int y, int x, BIT_FLAGS mode)
{
bool fear = FALSE;
bool mdeath = FALSE;
/* Hack -- do not start silly run */
if (see_wall(dir, p_ptr->y, p_ptr->x))
{
+ sound(SOUND_HITWALL);
+
/* Message */
msg_print(_("その方向には走れません。", "You cannot run in that direction."));