case TV_SHIELD:
case TV_CARD:
/* Dual wielding */
- if (buki_motteruka(INVEN_RARM) && buki_motteruka(INVEN_LARM))
+ if (has_melee_weapon(INVEN_RARM) && has_melee_weapon(INVEN_LARM))
{
/* Restrict the choices */
item_tester_hook = item_tester_hook_melee_weapon;
if (slot == INVEN_RARM) need_switch_wielding = INVEN_LARM;
}
- else if (buki_motteruka(INVEN_LARM)) slot = INVEN_RARM;
+ else if (has_melee_weapon(INVEN_LARM)) slot = INVEN_RARM;
/* Both arms are already used by non-weapon */
else if (inventory[INVEN_RARM].k_idx && !object_is_melee_weapon(&inventory[INVEN_RARM]) &&
if (!get_check(_("二刀流で戦いますか?", "Dual wielding? "))) slot = INVEN_RARM;
}
- else if (!inventory[INVEN_RARM].k_idx && buki_motteruka(INVEN_LARM))
+ else if (!inventory[INVEN_RARM].k_idx && has_melee_weapon(INVEN_LARM))
{
if (!get_check(_("二刀流で戦いますか?", "Dual wielding? "))) slot = INVEN_LARM;
}
s = _("おっと。", "Oops.");
if (!choose_object(&slot, q, s, (USE_EQUIP))) return;
- if ((slot == INVEN_LARM) && !buki_motteruka(INVEN_RARM))
+ if ((slot == INVEN_LARM) && !has_melee_weapon(INVEN_RARM))
need_switch_wielding = INVEN_RARM;
}
break;
if (item == INVEN_RARM)
{
- if (buki_motteruka(INVEN_LARM))
+ if (has_melee_weapon(INVEN_LARM))
{
o_ptr = &inventory[INVEN_LARM];
object_desc(o_name, o_ptr, 0);
o_ptr = &inventory[INVEN_RARM];
if (o_ptr->k_idx) object_desc(o_name, o_ptr, 0);
- if (buki_motteruka(INVEN_RARM))
+ if (has_melee_weapon(INVEN_RARM))
{
if (object_allow_two_hands_wielding(o_ptr) && CAN_TWO_HANDS_WIELDING())
msg_format(_("%sを両手で構えた。", "You are wielding %s with both hands."), o_name);
powers[num++] = PET_RYOUTE;
}
- else if ((empty_hands(FALSE) != EMPTY_HAND_NONE) && !buki_motteruka(INVEN_RARM) && !buki_motteruka(INVEN_LARM))
+ else if ((empty_hands(FALSE) != EMPTY_HAND_NONE) && !has_melee_weapon(INVEN_RARM) && !has_melee_weapon(INVEN_LARM))
{
if (p_ptr->pet_extra_flags & PF_RYOUTE)
{
case SV_SCROLL_CURSE_WEAPON:\r
{\r
k = 0;\r
- if (buki_motteruka(INVEN_RARM))\r
+ if (has_melee_weapon(INVEN_RARM))\r
{\r
k = INVEN_RARM;\r
- if (buki_motteruka(INVEN_LARM) && one_in_(2)) k = INVEN_LARM;\r
+ if (has_melee_weapon(INVEN_LARM) && one_in_(2)) k = INVEN_LARM;\r
}\r
- else if (buki_motteruka(INVEN_LARM)) k = INVEN_LARM;\r
+ else if (has_melee_weapon(INVEN_LARM)) k = INVEN_LARM;\r
if (k && curse_weapon(FALSE, k)) ident = TRUE;\r
break;\r
}\r
}
else if (boomerang)
{
- if (buki_motteruka(INVEN_RARM) && buki_motteruka(INVEN_LARM))
+ if (has_melee_weapon(INVEN_RARM) && has_melee_weapon(INVEN_LARM))
{
item_tester_hook = item_tester_hook_boomerang;
q = _("どの武器を投げますか? ", "Throw which item? ");
return FALSE;
}
}
- else if (buki_motteruka(INVEN_LARM))
+ else if (has_melee_weapon(INVEN_LARM))
{
item = INVEN_LARM;
o_ptr = &inventory[item];
take_hit(DAMAGE_NOESCAPE, randint1(p_ptr->wt / 6), _("転倒", "tripping"), -1);
msg_print(NULL);
- if (buki_motteruka(INVEN_RARM))
+ if (has_melee_weapon(INVEN_RARM))
{
slot = INVEN_RARM;
o_ptr = &inventory[INVEN_RARM];
- if (buki_motteruka(INVEN_LARM) && one_in_(2))
+ if (has_melee_weapon(INVEN_LARM) && one_in_(2))
{
o_ptr = &inventory[INVEN_LARM];
slot = INVEN_LARM;
}
}
- else if (buki_motteruka(INVEN_LARM))
+ else if (has_melee_weapon(INVEN_LARM))
{
o_ptr = &inventory[INVEN_LARM];
slot = INVEN_LARM;
if (value > 100000L)
exp += (value - 100000L) / 4 * level;
}
- if ((((i == INVEN_RARM) || (i == INVEN_LARM)) && (buki_motteruka(i))) || (i == INVEN_BOW)) total_exp += exp / 48;
+ if ((((i == INVEN_RARM) || (i == INVEN_LARM)) && (has_melee_weapon(i))) || (i == INVEN_BOW)) total_exp += exp / 48;
else total_exp += exp / 16;
if (i == INVEN_BODY) total_exp += exp / 32;
}
char choice;
- if (!buki_motteruka(INVEN_RARM) && !buki_motteruka(INVEN_LARM))
+ if (!has_melee_weapon(INVEN_RARM) && !has_melee_weapon(INVEN_LARM))
{
msg_format(_("武器を持たないと魔法剣は使えない。", "You cannot use temporary branding with no weapon."));
return FALSE;
sprintf(buf, "(%+d,%+d)", (int)show_tohit, (int)show_todam);
/* Dump the bonuses to hit/dam */
- if (!buki_motteruka(INVEN_RARM) && !buki_motteruka(INVEN_LARM))
+ if (!has_melee_weapon(INVEN_RARM) && !has_melee_weapon(INVEN_LARM))
display_player_one_line(ENTRY_BARE_HAND, buf, TERM_L_BLUE);
else if (p_ptr->ryoute)
display_player_one_line(ENTRY_TWO_HANDS, buf, TERM_L_BLUE);
msg_print(_("混乱していて集中できない!", "You are too confused!"));
return;
}
- if (!buki_motteruka(INVEN_RARM) && !buki_motteruka(INVEN_LARM))
+ if (!has_melee_weapon(INVEN_RARM) && !has_melee_weapon(INVEN_LARM))
{
if (flush_failure) flush();
msg_print(_("武器を持たないと必殺技は使えない!", "You need to wield a weapon!"));
{
case CLASS_ROGUE:
case CLASS_NINJA:
- if (buki_motteruka(INVEN_RARM + hand) && !p_ptr->icky_wield[hand])
+ if (has_melee_weapon(INVEN_RARM + hand) && !p_ptr->icky_wield[hand])
{
int tmp = p_ptr->lev * 6 + (p_ptr->skill_stl + 10) * 4;
if (p_ptr->monlite && (mode != HISSATSU_NYUSIN)) tmp /= 3;
}
else k = 1;
}
- else if ((p_ptr->pclass == CLASS_NINJA) && buki_motteruka(INVEN_RARM + hand) && !p_ptr->icky_wield[hand] && ((p_ptr->cur_lite <= 0) || one_in_(7)))
+ else if ((p_ptr->pclass == CLASS_NINJA) && has_melee_weapon(INVEN_RARM + hand) && !p_ptr->icky_wield[hand] && ((p_ptr->cur_lite <= 0) || one_in_(7)))
{
int maxhp = maxroll(r_ptr->hdice, r_ptr->hside);
if (one_in_(backstab ? 13 : (stab_fleeing || fuiuchi) ? 15 : 27))
put_str(format(_("Lv %s 失率 効果", "Lv %s Fail Info"),
((use_mind == MIND_BERSERKER) || (use_mind == MIND_NINJUTSU)) ? "HP" : "MP"), y, x + 35);
- has_weapon[0] = buki_motteruka(INVEN_RARM);
- has_weapon[1] = buki_motteruka(INVEN_LARM);
+ has_weapon[0] = has_melee_weapon(INVEN_RARM);
+ has_weapon[1] = has_melee_weapon(INVEN_LARM);
/* Dump the spells */
for (i = 0; i < MAX_MIND_POWERS; i++)
{
if (heavy_armor()) chance += 20;
if (p_ptr->icky_wield[0]) chance += 20;
- else if (buki_motteruka(INVEN_RARM)) chance += 10;
+ else if (has_melee_weapon(INVEN_RARM)) chance += 10;
if (p_ptr->icky_wield[1]) chance += 20;
- else if (buki_motteruka(INVEN_LARM)) chance += 10;
+ else if (has_melee_weapon(INVEN_LARM)) chance += 10;
if (n == 5)
{
int j;
int shoot_dd = 1, shoot_ds = 1, shoot_base = 0;
object_type *o_ptr = NULL;
- if (buki_motteruka(INVEN_RARM)) o_ptr = &inventory[INVEN_RARM];
- else if (buki_motteruka(INVEN_LARM)) o_ptr = &inventory[INVEN_LARM];
+ if (has_melee_weapon(INVEN_RARM)) o_ptr = &inventory[INVEN_RARM];
+ else if (has_melee_weapon(INVEN_LARM)) o_ptr = &inventory[INVEN_LARM];
if (o_ptr)
{
{
if ((item == INVEN_RARM) || (item == INVEN_LARM))
{
- if (!buki_motteruka(INVEN_RARM + INVEN_LARM - item))
+ if (!has_melee_weapon(INVEN_RARM + INVEN_LARM - item))
{
/* Clear all temporary elemental brands */
set_ele_attack(0, 0);
case REW_CURSE_WP:
- if (!buki_motteruka(INVEN_RARM) && !buki_motteruka(INVEN_LARM)) break;
+ if (!has_melee_weapon(INVEN_RARM) && !has_melee_weapon(INVEN_LARM)) break;
msg_format(_("%sの声が響き渡った:", "The voice of %s booms out:"), chaos_patrons[p_ptr->chaos_patron]);
msg_print(_("「汝、武器に頼ることなかれ。」", "'Thou reliest too much on thy weapon.'"));
dummy = INVEN_RARM;
- if (buki_motteruka(INVEN_LARM))
+ if (has_melee_weapon(INVEN_LARM))
{
dummy = INVEN_LARM;
- if (buki_motteruka(INVEN_RARM) && one_in_(2)) dummy = INVEN_RARM;
+ if (has_melee_weapon(INVEN_RARM) && one_in_(2)) dummy = INVEN_RARM;
}
object_desc(o_name, &inventory[dummy], OD_NAME_ONLY);
(void)curse_weapon(FALSE, dummy);
case 3:
if (one_in_(2))
{
- if (!buki_motteruka(INVEN_RARM) && !buki_motteruka(INVEN_LARM)) break;
+ if (!has_melee_weapon(INVEN_RARM) && !has_melee_weapon(INVEN_LARM)) break;
dummy = INVEN_RARM;
- if (buki_motteruka(INVEN_LARM))
+ if (has_melee_weapon(INVEN_LARM))
{
dummy = INVEN_LARM;
- if (buki_motteruka(INVEN_RARM) && one_in_(2)) dummy = INVEN_RARM;
+ if (has_melee_weapon(INVEN_RARM) && one_in_(2)) dummy = INVEN_RARM;
}
object_desc(o_name, &inventory[dummy], OD_NAME_ONLY);
(void)curse_weapon(FALSE, dummy);
{
dummy = 0;
- if (buki_motteruka(INVEN_RARM))
+ if (has_melee_weapon(INVEN_RARM))
{
dummy = INVEN_RARM;
- if (buki_motteruka(INVEN_LARM) && one_in_(2)) dummy = INVEN_LARM;
+ if (has_melee_weapon(INVEN_LARM) && one_in_(2)) dummy = INVEN_LARM;
}
- else if (buki_motteruka(INVEN_LARM)) dummy = INVEN_LARM;
+ else if (has_melee_weapon(INVEN_LARM)) dummy = INVEN_LARM;
if (dummy) (void)curse_weapon(FALSE, dummy);
}
/* Base skill -- digging */
p_ptr->skill_dig = 0;
- if (buki_motteruka(INVEN_RARM)) p_ptr->migite = TRUE;
- if (buki_motteruka(INVEN_LARM))
+ if (has_melee_weapon(INVEN_RARM)) p_ptr->migite = TRUE;
+ if (has_melee_weapon(INVEN_LARM))
{
p_ptr->hidarite = TRUE;
if (!p_ptr->migite) default_hand = 1;
}
/* Hack -- do not apply "weapon" bonuses */
- if (i == INVEN_RARM && buki_motteruka(i)) continue;
- if (i == INVEN_LARM && buki_motteruka(i)) continue;
+ if (i == INVEN_RARM && has_melee_weapon(i)) continue;
+ if (i == INVEN_LARM && has_melee_weapon(i)) continue;
/* Hack -- do not apply "bow" bonuses */
if (i == INVEN_BOW) continue;
p_ptr->dis_to_h[default_hand] += (p_ptr->skill_exp[GINOU_SUDE] - WEAPON_EXP_BEGINNER) / 200;
}
- if (buki_motteruka(INVEN_RARM) && buki_motteruka(INVEN_LARM))
+ if (has_melee_weapon(INVEN_RARM) && has_melee_weapon(INVEN_LARM))
{
int penalty1, penalty2;
penalty1 = ((100 - p_ptr->skill_exp[GINOU_NITOURYU] / 160) - (130 - inventory[INVEN_RARM].weight) / 8);
p_ptr->icky_wield[i] = FALSE;
p_ptr->riding_wield[i] = FALSE;
- if (!buki_motteruka(INVEN_RARM + i))
+ if (!has_melee_weapon(INVEN_RARM + i))
{
p_ptr->num_blow[i] = 1;
continue;
case CLASS_MONK:
case CLASS_FORCETRAINER:
case CLASS_BERSERKER:
- if ((empty_hands(FALSE) != EMPTY_HAND_NONE) && !buki_motteruka(INVEN_RARM) && !buki_motteruka(INVEN_LARM))
+ if ((empty_hands(FALSE) != EMPTY_HAND_NONE) && !has_melee_weapon(INVEN_RARM) && !has_melee_weapon(INVEN_LARM))
p_ptr->riding_ryoute = TRUE;
break;
}
for (i = 0; i < 2; i++)
{
- if (buki_motteruka(INVEN_RARM + i))
+ if (has_melee_weapon(INVEN_RARM + i))
{
OBJECT_TYPE_VALUE tval = inventory[INVEN_RARM + i].tval - TV_WEAPON_BEGIN;
OBJECT_SUBTYPE_VALUE sval = inventory[INVEN_RARM + i].sval;
{
msg_print(_("こんな重い武器を装備しているのは大変だ。", "You have trouble wielding such a heavy weapon."));
}
- else if (buki_motteruka(INVEN_RARM + i))
+ else if (has_melee_weapon(INVEN_RARM + i))
{
msg_print(_("これなら装備していても辛くない。", "You have no trouble wielding your weapon."));
}
{
msg_print(_("この武器は徒歩で使いやすい。", "This weapon was not suitable for use while riding."));
}
- else if (buki_motteruka(INVEN_RARM + i))
+ else if (has_melee_weapon(INVEN_RARM + i))
{
msg_print(_("これなら乗馬中にぴったりだ。", "This weapon is suitable for use while riding."));
}
chg_virtue(V_FAITH, -1);
}
}
- else if (buki_motteruka(INVEN_RARM + i))
+ else if (has_melee_weapon(INVEN_RARM + i))
{
msg_print(_("今の装備は自分にふさわしい気がする。", "You feel comfortable with your weapon."));
}
* @param i 判定する手のID(右手:0 左手:1)
* @return 持っているならばTRUE
*/
-bool buki_motteruka(int i)
+bool has_melee_weapon(int i)
{
return ((inventory[i].k_idx && object_is_melee_weapon(&inventory[i])) ? TRUE : FALSE);
}
extern s16b calc_num_fire(object_type *o_ptr);
extern void calc_bonuses(void);
extern WEIGHT weight_limit(void);
-extern bool buki_motteruka(int i);
+extern bool has_melee_weapon(int i);
extern bool is_heavy_shoot(object_type *o_ptr);
extern bool heavy_armor(void);
extern void update_creature(player_type *creature_ptr);
}
else if (command == -4)
{
- if (!buki_motteruka(INVEN_RARM) && !buki_motteruka(INVEN_LARM))
+ if (!has_melee_weapon(INVEN_RARM) && !has_melee_weapon(INVEN_LARM))
{
msg_print(_("武器を持たないといけません。", "You need to wield a weapon."));
return FALSE;
{
int damage;
- if (!buki_motteruka(INVEN_RARM + i)) break;
+ if (!has_melee_weapon(INVEN_RARM + i)) break;
o_ptr = &inventory[INVEN_RARM + i];
basedam = (o_ptr->dd * (o_ptr->ds + 1)) * 50;
damage = o_ptr->to_d * 100;
for (i = 0; i < 2; i++)
{
int damage;
- if (!buki_motteruka(INVEN_RARM + i)) break;
+ if (!has_melee_weapon(INVEN_RARM + i)) break;
o_ptr = &inventory[INVEN_RARM + i];
basedam = (o_ptr->dd * (o_ptr->ds + 1)) * 50;
damage = o_ptr->to_d * 100;