static void describe_chest(flavor_type *flavor_ptr)
{
- if (flavor_ptr->o_ptr->tval != ItemKindType::CHEST)
+ if (flavor_ptr->o_ptr->tval != ItemKindType::CHEST) {
return;
+ }
- if (!flavor_ptr->known)
+ if (!flavor_ptr->known) {
return;
+ }
if (!flavor_ptr->o_ptr->pval) {
flavor_ptr->t = object_desc_str(flavor_ptr->t, _("(空)", " (empty)"));
}
if (flavor_ptr->o_ptr->pval < 0) {
- if (chest_traps[0 - flavor_ptr->o_ptr->pval].any())
+ if (chest_traps[0 - flavor_ptr->o_ptr->pval].any()) {
flavor_ptr->t = object_desc_str(flavor_ptr->t, _("(解除済)", " (disarmed)"));
- else
+ } else {
flavor_ptr->t = object_desc_str(flavor_ptr->t, _("(非施錠)", " (unlocked)"));
+ }
return;
}
static void decide_tval_show(flavor_type *flavor_ptr)
{
- if (flavor_ptr->tr_flags.has(TR_SHOW_MODS))
+ if (flavor_ptr->tr_flags.has(TR_SHOW_MODS)) {
flavor_ptr->show_weapon = true;
+ }
- if (flavor_ptr->o_ptr->is_smith() && (Smith::object_effect(flavor_ptr->o_ptr) == SmithEffectType::SLAY_GLOVE))
+ if (flavor_ptr->o_ptr->is_smith() && (Smith::object_effect(flavor_ptr->o_ptr) == SmithEffectType::SLAY_GLOVE)) {
flavor_ptr->show_weapon = true;
+ }
- if (flavor_ptr->o_ptr->to_h && flavor_ptr->o_ptr->to_d)
+ if (flavor_ptr->o_ptr->to_h && flavor_ptr->o_ptr->to_d) {
flavor_ptr->show_weapon = true;
+ }
- if (flavor_ptr->o_ptr->ac)
+ if (flavor_ptr->o_ptr->ac) {
flavor_ptr->show_armour = true;
+ }
}
static void describe_weapon_dice(PlayerType *player_ptr, flavor_type *flavor_ptr)
{
- if (!flavor_ptr->known && object_is_quest_target(player_ptr->current_floor_ptr->quest_number, flavor_ptr->o_ptr))
+ if (!flavor_ptr->known && object_is_quest_target(player_ptr->current_floor_ptr->quest_number, flavor_ptr->o_ptr)) {
return;
+ }
flavor_ptr->t = object_desc_chr(flavor_ptr->t, ' ');
flavor_ptr->t = object_desc_chr(flavor_ptr->t, flavor_ptr->p1);
static void describe_bow(PlayerType *player_ptr, flavor_type *flavor_ptr)
{
flavor_ptr->power = bow_tmul(flavor_ptr->o_ptr->sval);
- if (flavor_ptr->tr_flags.has(TR_XTRA_MIGHT))
+ if (flavor_ptr->tr_flags.has(TR_XTRA_MIGHT)) {
flavor_ptr->power++;
+ }
flavor_ptr->t = object_desc_chr(flavor_ptr->t, ' ');
flavor_ptr->t = object_desc_chr(flavor_ptr->t, flavor_ptr->p1);
num_fire = calc_num_fire(player_ptr, flavor_ptr->o_ptr);
} else {
auto flgs = object_flags(flavor_ptr->o_ptr);
- if (flgs.has(TR_XTRA_SHOTS))
+ if (flgs.has(TR_XTRA_SHOTS)) {
num_fire += 100;
+ }
}
- if ((num_fire == 0) || (flavor_ptr->power <= 0) || !flavor_ptr->known)
+ if ((num_fire == 0) || (flavor_ptr->power <= 0) || !flavor_ptr->known) {
return;
+ }
flavor_ptr->fire_rate = bow_energy(flavor_ptr->o_ptr->sval) / num_fire;
flavor_ptr->t = object_desc_chr(flavor_ptr->t, ' ');
static void describe_named_item_tval(flavor_type *flavor_ptr)
{
- if (!flavor_ptr->known)
+ if (!flavor_ptr->known) {
return;
+ }
if (flavor_ptr->show_weapon) {
flavor_ptr->t = object_desc_chr(flavor_ptr->t, ' ');
flavor_ptr->avgdam /= energy_fire;
flavor_ptr->t = object_desc_num(flavor_ptr->t, flavor_ptr->avgdam);
flavor_ptr->t = object_desc_str(flavor_ptr->t, show_ammo_detail ? "/turn" : "");
- if (!show_ammo_crit_ratio)
+ if (!show_ammo_crit_ratio) {
return;
+ }
int percent = calc_crit_ratio_shot(player_ptr, flavor_ptr->known ? flavor_ptr->o_ptr->to_h : 0, flavor_ptr->known ? flavor_ptr->bow_ptr->to_h : 0);
flavor_ptr->t = object_desc_chr(flavor_ptr->t, '/');
flavor_ptr->t = object_desc_num(flavor_ptr->t, percent / 100);
flavor_ptr->t = object_desc_chr(flavor_ptr->t, '.');
- if (percent % 100 < 10)
+ if (percent % 100 < 10) {
flavor_ptr->t = object_desc_chr(flavor_ptr->t, '0');
+ }
flavor_ptr->t = object_desc_num(flavor_ptr->t, percent % 100);
flavor_ptr->t = object_desc_str(flavor_ptr->t, show_ammo_detail ? "% crit" : "%");
{
flavor_ptr->avgdam = flavor_ptr->o_ptr->dd * (flavor_ptr->o_ptr->ds + 1) * 10 / 2;
int tmul = bow_tmul(flavor_ptr->bow_ptr->sval);
- if (flavor_ptr->bow_ptr->is_known())
+ if (flavor_ptr->bow_ptr->is_known()) {
flavor_ptr->avgdam += (flavor_ptr->bow_ptr->to_d * 10);
+ }
- if (flavor_ptr->known)
+ if (flavor_ptr->known) {
flavor_ptr->avgdam += (flavor_ptr->o_ptr->to_d * 10);
+ }
- if (player_ptr->xtra_might)
+ if (player_ptr->xtra_might) {
tmul++;
+ }
tmul = tmul * (100 + (int)(adj_str_td[player_ptr->stat_index[A_STR]]) - 128);
flavor_ptr->avgdam *= tmul;
flavor_ptr->avgdam /= (100 * 10);
flavor_ptr->avgdam = boost_concentration_damage(player_ptr, flavor_ptr->avgdam);
- if (flavor_ptr->avgdam < 0)
+ if (flavor_ptr->avgdam < 0) {
flavor_ptr->avgdam = 0;
+ }
flavor_ptr->t = object_desc_chr(flavor_ptr->t, ' ');
flavor_ptr->t = object_desc_chr(flavor_ptr->t, flavor_ptr->p1);
return;
}
- if (flavor_ptr->o_ptr->to_a == 0)
+ if (flavor_ptr->o_ptr->to_a == 0) {
return;
+ }
flavor_ptr->t = object_desc_chr(flavor_ptr->t, ' ');
flavor_ptr->t = object_desc_chr(flavor_ptr->t, flavor_ptr->b1);
return;
}
- if (!flavor_ptr->show_armour)
+ if (!flavor_ptr->show_armour) {
return;
+ }
flavor_ptr->t = object_desc_chr(flavor_ptr->t, ' ');
flavor_ptr->t = object_desc_chr(flavor_ptr->t, flavor_ptr->b1);
flavor_ptr->t = object_desc_str(flavor_ptr->t, _("回分", " charge"));
#ifdef JP
#else
- if (flavor_ptr->o_ptr->pval != 1)
+ if (flavor_ptr->o_ptr->pval != 1) {
flavor_ptr->t = object_desc_chr(flavor_ptr->t, 's');
+ }
#endif
flavor_ptr->t = object_desc_chr(flavor_ptr->t, flavor_ptr->p2);
static void describe_charges_rod(flavor_type *flavor_ptr)
{
- if (flavor_ptr->o_ptr->timeout == 0)
+ if (flavor_ptr->o_ptr->timeout == 0) {
return;
+ }
if (flavor_ptr->o_ptr->number <= 1) {
flavor_ptr->t = object_desc_str(flavor_ptr->t, _("(充填中)", " (charging)"));
return;
}
- if (flavor_ptr->k_ptr->pval == 0)
+ if (flavor_ptr->k_ptr->pval == 0) {
flavor_ptr->k_ptr->pval = 1;
+ }
flavor_ptr->power = (flavor_ptr->o_ptr->timeout + (flavor_ptr->k_ptr->pval - 1)) / flavor_ptr->k_ptr->pval;
- if (flavor_ptr->power > flavor_ptr->o_ptr->number)
+ if (flavor_ptr->power > flavor_ptr->o_ptr->number) {
flavor_ptr->power = flavor_ptr->o_ptr->number;
+ }
flavor_ptr->t = object_desc_str(flavor_ptr->t, " (");
flavor_ptr->t = object_desc_num(flavor_ptr->t, flavor_ptr->power);
flavor_ptr->t = object_desc_str(flavor_ptr->t, _("攻撃", " attack"));
#ifdef JP
#else
- if (std::abs(flavor_ptr->o_ptr->pval) != 1)
+ if (std::abs(flavor_ptr->o_ptr->pval) != 1) {
flavor_ptr->t = object_desc_chr(flavor_ptr->t, 's');
+ }
#endif
return;
return;
}
- if (flavor_ptr->tr_flags.has(TR_INFRA))
+ if (flavor_ptr->tr_flags.has(TR_INFRA)) {
flavor_ptr->t = object_desc_str(flavor_ptr->t, _("赤外線視力", " to infravision"));
+ }
}
static void describe_pval(flavor_type *flavor_ptr)
{
- if (flavor_ptr->tr_flags.has_none_of(TR_PVAL_FLAG_MASK))
+ if (flavor_ptr->tr_flags.has_none_of(TR_PVAL_FLAG_MASK)) {
return;
+ }
flavor_ptr->t = object_desc_chr(flavor_ptr->t, ' ');
flavor_ptr->t = object_desc_chr(flavor_ptr->t, flavor_ptr->p1);
static void describe_lamp_life(flavor_type *flavor_ptr)
{
- if ((flavor_ptr->o_ptr->tval != ItemKindType::LITE) || (flavor_ptr->o_ptr->is_fixed_artifact() || (flavor_ptr->o_ptr->sval == SV_LITE_FEANOR)))
+ if ((flavor_ptr->o_ptr->tval != ItemKindType::LITE) || (flavor_ptr->o_ptr->is_fixed_artifact() || (flavor_ptr->o_ptr->sval == SV_LITE_FEANOR))) {
return;
+ }
flavor_ptr->t = object_desc_str(flavor_ptr->t, _("(", " (with "));
- auto fuel_magnification = flavor_ptr->o_ptr->name2 == EgoType::LITE_LONG ? 2 : 1;
+ auto fuel_magnification = flavor_ptr->o_ptr->ego_idx == EgoType::LITE_LONG ? 2 : 1;
flavor_ptr->t = object_desc_num(flavor_ptr->t, fuel_magnification * flavor_ptr->o_ptr->fuel);
flavor_ptr->t = object_desc_str(flavor_ptr->t, _("ターンの寿命)", " turns of light)"));
}
*/
static void describe_remaining(flavor_type *flavor_ptr)
{
- if (!flavor_ptr->known)
+ if (!flavor_ptr->known) {
return;
+ }
- if (((flavor_ptr->o_ptr->tval == ItemKindType::STAFF) || (flavor_ptr->o_ptr->tval == ItemKindType::WAND)))
+ if (((flavor_ptr->o_ptr->tval == ItemKindType::STAFF) || (flavor_ptr->o_ptr->tval == ItemKindType::WAND))) {
describe_charges_staff_wand(flavor_ptr);
- else if (flavor_ptr->o_ptr->tval == ItemKindType::ROD)
+ } else if (flavor_ptr->o_ptr->tval == ItemKindType::ROD) {
describe_charges_rod(flavor_ptr);
+ }
describe_pval(flavor_ptr);
describe_lamp_life(flavor_ptr);
- if (flavor_ptr->o_ptr->timeout && (flavor_ptr->o_ptr->tval != ItemKindType::ROD))
+ if (flavor_ptr->o_ptr->timeout && (flavor_ptr->o_ptr->tval != ItemKindType::ROD)) {
flavor_ptr->t = object_desc_str(flavor_ptr->t, _("(充填中)", " (charging)"));
+ }
}
static void decide_item_feeling(flavor_type *flavor_ptr)
return;
}
- if (!flavor_ptr->aware && flavor_ptr->o_ptr->is_tried())
+ if (!flavor_ptr->aware && flavor_ptr->o_ptr->is_tried()) {
strcpy(flavor_ptr->fake_insc_buf, _("未判明", "tried"));
+ }
}
/*!
describe_named_item_tval(flavor_ptr);
if (!(mode & OD_DEBUG)) {
flavor_ptr->bow_ptr = &player_ptr->inventory_list[INVEN_BOW];
- if ((flavor_ptr->bow_ptr->k_idx != 0) && (flavor_ptr->o_ptr->tval == bow_tval_ammo(flavor_ptr->bow_ptr)))
+ if ((flavor_ptr->bow_ptr->k_idx != 0) && (flavor_ptr->o_ptr->tval == bow_tval_ammo(flavor_ptr->bow_ptr))) {
describe_bow_power(player_ptr, flavor_ptr);
- else if (PlayerClass(player_ptr).equals(PlayerClassType::NINJA) && (flavor_ptr->o_ptr->tval == ItemKindType::SPIKE))
+ } else if (PlayerClass(player_ptr).equals(PlayerClassType::NINJA) && (flavor_ptr->o_ptr->tval == ItemKindType::SPIKE)) {
describe_spike_power(player_ptr, flavor_ptr);
+ }
}
describe_ac(flavor_ptr);