X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=src%2Fcmd-item%2Fcmd-throw.c;h=90f8a6f216453638e1c6e4e793e1c7ffe9fa7eca;hb=438f50ff2d47b91224ac1777b43291c0e5965362;hp=dbda39abba644b59cf2a7ae5c17878d05fbb4ed0;hpb=656a5c39d37e3a7b90cdfab5accd15682ae88a4b;p=hengband%2Fhengband.git diff --git a/src/cmd-item/cmd-throw.c b/src/cmd-item/cmd-throw.c index dbda39abb..90f8a6f21 100644 --- a/src/cmd-item/cmd-throw.c +++ b/src/cmd-item/cmd-throw.c @@ -46,6 +46,7 @@ #include "object/object-stack.h" #include "player/attack-defense-types.h" #include "player/special-defense-types.h" +#include "player/player-status-table.h" #include "racial/racial-android.h" #include "specific-object/torch.h" #include "status/action-setter.h" @@ -143,7 +144,7 @@ static void calc_throw_range(player_type *creature_ptr, it_type *it_ptr) int mul = 10 + 2 * (it_ptr->mult - 1); int div = ((it_ptr->q_ptr->weight > 10) ? it_ptr->q_ptr->weight : 10); - if ((have_flag(it_ptr->obj_flags, TR_THROW)) || it_ptr->boomerang) + if ((has_flag(it_ptr->obj_flags, TR_THROW)) || it_ptr->boomerang) div /= 2; it_ptr->tdis = (adj_str_blow[creature_ptr->stat_ind[A_STR]] + 20) * mul / div; @@ -203,12 +204,12 @@ static void set_class_specific_throw_params(player_type *creature_ptr, it_type * it_ptr->x = creature_ptr->x; handle_stuff(creature_ptr); it_ptr->shuriken = (creature_ptr->pclass == CLASS_NINJA) - && ((it_ptr->q_ptr->tval == TV_SPIKE) || ((have_flag(it_ptr->obj_flags, TR_THROW)) && (it_ptr->q_ptr->tval == TV_SWORD))); + && ((it_ptr->q_ptr->tval == TV_SPIKE) || ((has_flag(it_ptr->obj_flags, TR_THROW)) && (it_ptr->q_ptr->tval == TV_SWORD))); } static void set_racial_chance(player_type *creature_ptr, it_type *it_ptr) { - if (have_flag(it_ptr->obj_flags, TR_THROW)) + if (has_flag(it_ptr->obj_flags, TR_THROW)) it_ptr->chance = ((creature_ptr->skill_tht) + ((creature_ptr->to_h_b + it_ptr->q_ptr->to_h) * BTH_PLUS_ADJ)); else it_ptr->chance = (creature_ptr->skill_tht + (creature_ptr->to_h_b * BTH_PLUS_ADJ)); @@ -291,7 +292,7 @@ static void calc_racial_power_damage(player_type *creature_ptr, it_type *it_ptr) if (it_ptr->boomerang) { it_ptr->tdam *= (it_ptr->mult + creature_ptr->num_blow[it_ptr->item - INVEN_RARM]); it_ptr->tdam += creature_ptr->to_d_m; - } else if (have_flag(it_ptr->obj_flags, TR_THROW)) { + } else if (has_flag(it_ptr->obj_flags, TR_THROW)) { it_ptr->tdam *= (3 + it_ptr->mult); it_ptr->tdam += creature_ptr->to_d_m; } else {