{
bool is_boundary_floor = g_ptr->mimic > 0;
is_boundary_floor &= permanent_wall(f_ptr);
- is_boundary_floor &= have_flag((mimic_f_ptr)->flags, FF_MOVE) || have_flag((mimic_f_ptr)->flags, FF_CAN_FLY);
- is_boundary_floor &= have_flag((mimic_f_ptr)->flags, FF_PROJECT);
- is_boundary_floor &= !have_flag((mimic_f_ptr)->flags, FF_OPEN);
+ is_boundary_floor &= has_flag((mimic_f_ptr)->flags, FF_MOVE) || has_flag((mimic_f_ptr)->flags, FF_CAN_FLY);
+ is_boundary_floor &= has_flag((mimic_f_ptr)->flags, FF_PROJECT);
+ is_boundary_floor &= !has_flag((mimic_f_ptr)->flags, FF_OPEN);
return is_boundary_floor;
}
stormbringer = TRUE;
feature_type *f_ptr = &f_info[g_ptr->feat];
- bool p_can_kill_walls = creature_ptr->kill_wall && have_flag(f_ptr->flags, FF_HURT_DISI) && (!p_can_enter || !have_flag(f_ptr->flags, FF_LOS))
- && !have_flag(f_ptr->flags, FF_PERMANENT);
+ bool p_can_kill_walls = creature_ptr->kill_wall && has_flag(f_ptr->flags, FF_HURT_DISI) && (!p_can_enter || !has_flag(f_ptr->flags, FF_LOS))
+ && !has_flag(f_ptr->flags, FF_PERMANENT);
GAME_TEXT m_name[MAX_NLEN];
bool can_move = TRUE;
bool do_past = FALSE;
} else if (creature_ptr->riding_ryoute) {
can_move = FALSE;
disturb(creature_ptr, FALSE, TRUE);
- } else if (have_flag(f_ptr->flags, FF_CAN_FLY) && (riding_r_ptr->flags7 & RF7_CAN_FLY)) {
+ } else if (has_flag(f_ptr->flags, FF_CAN_FLY) && (riding_r_ptr->flags7 & RF7_CAN_FLY)) {
/* Allow moving */
- } else if (have_flag(f_ptr->flags, FF_CAN_SWIM) && (riding_r_ptr->flags7 & RF7_CAN_SWIM)) {
+ } else if (has_flag(f_ptr->flags, FF_CAN_SWIM) && (riding_r_ptr->flags7 & RF7_CAN_SWIM)) {
/* Allow moving */
- } else if (have_flag(f_ptr->flags, FF_WATER) && !(riding_r_ptr->flags7 & RF7_AQUATIC)
- && (have_flag(f_ptr->flags, FF_DEEP) || (riding_r_ptr->flags2 & RF2_AURA_FIRE))) {
+ } else if (has_flag(f_ptr->flags, FF_WATER) && !(riding_r_ptr->flags7 & RF7_AQUATIC)
+ && (has_flag(f_ptr->flags, FF_DEEP) || (riding_r_ptr->flags2 & RF2_AURA_FIRE))) {
msg_format(_("%sの上に行けない。", "Can't swim."), f_name + f_info[get_feat_mimic(g_ptr)].name);
free_turn(creature_ptr);
can_move = FALSE;
disturb(creature_ptr, FALSE, TRUE);
- } else if (!have_flag(f_ptr->flags, FF_WATER) && (riding_r_ptr->flags7 & RF7_AQUATIC)) {
+ } else if (!has_flag(f_ptr->flags, FF_WATER) && (riding_r_ptr->flags7 & RF7_AQUATIC)) {
msg_format(_("%sから上がれない。", "Can't land."), f_name + f_info[get_feat_mimic(&floor_ptr->grid_array[creature_ptr->y][creature_ptr->x])].name);
free_turn(creature_ptr);
can_move = FALSE;
disturb(creature_ptr, FALSE, TRUE);
- } else if (have_flag(f_ptr->flags, FF_LAVA) && !(riding_r_ptr->flagsr & RFR_EFF_IM_FIRE_MASK)) {
+ } else if (has_flag(f_ptr->flags, FF_LAVA) && !(riding_r_ptr->flagsr & RFR_EFF_IM_FIRE_MASK)) {
msg_format(_("%sの上に行けない。", "Too hot to go through."), f_name + f_info[get_feat_mimic(g_ptr)].name);
free_turn(creature_ptr);
can_move = FALSE;
}
if (!can_move) {
- } else if (!have_flag(f_ptr->flags, FF_MOVE) && have_flag(f_ptr->flags, FF_CAN_FLY) && !creature_ptr->levitation) {
+ } else if (!has_flag(f_ptr->flags, FF_MOVE) && has_flag(f_ptr->flags, FF_CAN_FLY) && !creature_ptr->levitation) {
msg_format(_("空を飛ばないと%sの上には行けない。", "You need to fly to go through the %s."), f_name + f_info[get_feat_mimic(g_ptr)].name);
free_turn(creature_ptr);
creature_ptr->running = 0;
can_move = FALSE;
- } else if (have_flag(f_ptr->flags, FF_TREE) && !p_can_kill_walls) {
+ } else if (has_flag(f_ptr->flags, FF_TREE) && !p_can_kill_walls) {
if ((creature_ptr->pclass != CLASS_RANGER) && !creature_ptr->levitation && (!creature_ptr->riding || !(riding_r_ptr->flags8 & RF8_WILD_WOOD)))
creature_ptr->energy_use *= 2;
- } else if ((do_pickup != easy_disarm) && have_flag(f_ptr->flags, FF_DISARM) && !g_ptr->mimic) {
+ } else if ((do_pickup != easy_disarm) && has_flag(f_ptr->flags, FF_DISARM) && !g_ptr->mimic) {
if (!trap_can_be_ignored(creature_ptr, g_ptr->feat)) {
(void)exe_disarm(creature_ptr, y, x, dir);
return;
feature_type *f_ptr = &f_info[g_ptr->feat];
bool more = FALSE;
take_turn(creature_ptr, 100);
- if (!have_flag(f_ptr->flags, FF_OPEN)) {
+ if (!has_flag(f_ptr->flags, FF_OPEN)) {
msg_format(_("%sはがっちりと閉じられているようだ。", "The %s appears to be stuck."), f_name + f_info[get_feat_mimic(g_ptr)].name);
return more;
}
FEAT_IDX old_feat = g_ptr->feat;
bool more = FALSE;
take_turn(creature_ptr, 100);
- if (!have_flag(f_info[old_feat].flags, FF_CLOSE))
+ if (!has_flag(f_info[old_feat].flags, FF_CLOSE))
return more;
s16b closed_feat = feat_state(creature_ptr, old_feat, FF_CLOSE);
- if ((g_ptr->o_idx || (g_ptr->info & CAVE_OBJECT)) && (closed_feat != old_feat) && !have_flag(f_info[closed_feat].flags, FF_DROP)) {
+ if ((g_ptr->o_idx || (g_ptr->info & CAVE_OBJECT)) && (closed_feat != old_feat) && !has_flag(f_info[closed_feat].flags, FF_DROP)) {
msg_print(_("何かがつっかえて閉まらない。", "Something prevents it from closing."));
} else {
cave_alter_feat(creature_ptr, y, x, FF_CLOSE);
if (!is_closed_door(creature_ptr, g_ptr->feat))
return FALSE;
- if (!have_flag(f_ptr->flags, FF_OPEN)) {
+ if (!has_flag(f_ptr->flags, FF_OPEN)) {
msg_format(_("%sはがっちりと閉じられているようだ。", "The %s appears to be stuck."), f_name + f_info[get_feat_mimic(g_ptr)].name);
} else if (f_ptr->power) {
i = creature_ptr->skill_dis;
if (randint0(100) < temp) {
msg_format(_("%sを壊した!", "The %s crashes open!"), name);
- sound(have_flag(f_ptr->flags, FF_GLASS) ? SOUND_GLASS : SOUND_OPENDOOR);
- if ((randint0(100) < 50) || (feat_state(creature_ptr, g_ptr->feat, FF_OPEN) == g_ptr->feat) || have_flag(f_ptr->flags, FF_GLASS)) {
+ sound(has_flag(f_ptr->flags, FF_GLASS) ? SOUND_GLASS : SOUND_OPENDOOR);
+ if ((randint0(100) < 50) || (feat_state(creature_ptr, g_ptr->feat, FF_OPEN) == g_ptr->feat) || has_flag(f_ptr->flags, FF_GLASS)) {
cave_alter_feat(creature_ptr, y, x, FF_BASH);
} else {
cave_alter_feat(creature_ptr, y, x, FF_OPEN);
s16b feat = get_feat_mimic(g_ptr);
feature_type *f_ptr = &f_info[feat];
if (!player_can_enter(creature_ptr, feat, 0))
- return !have_flag(f_ptr->flags, FF_DOOR);
+ return !has_flag(f_ptr->flags, FF_DOOR);
- if (have_flag(f_ptr->flags, FF_AVOID_RUN) && !ignore_avoid_run)
+ if (has_flag(f_ptr->flags, FF_AVOID_RUN) && !ignore_avoid_run)
return TRUE;
- if (!have_flag(f_ptr->flags, FF_MOVE) && !have_flag(f_ptr->flags, FF_CAN_FLY))
- return !have_flag(f_ptr->flags, FF_DOOR);
+ if (!has_flag(f_ptr->flags, FF_MOVE) && !has_flag(f_ptr->flags, FF_CAN_FLY))
+ return !has_flag(f_ptr->flags, FF_DOOR);
return FALSE;
}
bool inv = TRUE;
if (g_ptr->info & (CAVE_MARK)) {
- bool notice = have_flag(f_ptr->flags, FF_NOTICE);
- if (notice && have_flag(f_ptr->flags, FF_MOVE)) {
- if (find_ignore_doors && have_flag(f_ptr->flags, FF_DOOR) && have_flag(f_ptr->flags, FF_CLOSE)) {
+ bool notice = has_flag(f_ptr->flags, FF_NOTICE);
+ if (notice && has_flag(f_ptr->flags, FF_MOVE)) {
+ if (find_ignore_doors && has_flag(f_ptr->flags, FF_DOOR) && has_flag(f_ptr->flags, FF_CLOSE)) {
notice = FALSE;
- } else if (find_ignore_stairs && have_flag(f_ptr->flags, FF_STAIRS)) {
+ } else if (find_ignore_stairs && has_flag(f_ptr->flags, FF_STAIRS)) {
notice = FALSE;
- } else if (have_flag(f_ptr->flags, FF_LAVA) && (creature_ptr->immune_fire || is_invuln(creature_ptr))) {
+ } else if (has_flag(f_ptr->flags, FF_LAVA) && (creature_ptr->immune_fire || is_invuln(creature_ptr))) {
notice = FALSE;
- } else if (have_flag(f_ptr->flags, FF_WATER) && have_flag(f_ptr->flags, FF_DEEP)
+ } else if (has_flag(f_ptr->flags, FF_WATER) && has_flag(f_ptr->flags, FF_DEEP)
&& (creature_ptr->levitation || creature_ptr->can_swim || (creature_ptr->total_weight <= weight_limit(creature_ptr)))) {
notice = FALSE;
}
mimic_f_ptr = &f_info[get_feat_mimic(g_ptr)];
name = f_name + mimic_f_ptr->name;
sound(SOUND_DIG);
- if (have_flag(f_ptr->flags, FF_PERMANENT)) {
- if (have_flag(mimic_f_ptr->flags, FF_PERMANENT))
+ if (has_flag(f_ptr->flags, FF_PERMANENT)) {
+ if (has_flag(mimic_f_ptr->flags, FF_PERMANENT))
msg_print(_("この岩は硬すぎて掘れないようだ。", "This seems to be permanent rock."));
else
msg_print(_("そこは掘れない!", "You can't tunnel through that!"));
- } else if (have_flag(f_ptr->flags, FF_CAN_DIG)) {
+ } else if (has_flag(f_ptr->flags, FF_CAN_DIG)) {
if (creature_ptr->skill_dig > randint0(20 * power)) {
msg_format(_("%sをくずした。", "You have removed the %s."), name);
cave_alter_feat(creature_ptr, y, x, FF_TUNNEL);
more = TRUE;
}
} else {
- bool tree = have_flag(mimic_f_ptr->flags, FF_TREE);
+ bool tree = has_flag(mimic_f_ptr->flags, FF_TREE);
if (creature_ptr->skill_dig > power + randint0(40 * power)) {
if (tree)
msg_format(_("%sを切り払った。", "You have cleared away the %s."), name);
creature_ptr->update |= (PU_FLOW);
}
- if (have_flag(f_ptr->flags, FF_GLASS))
+ if (has_flag(f_ptr->flags, FF_GLASS))
sound(SOUND_GLASS);
cave_alter_feat(creature_ptr, y, x, FF_TUNNEL);
}
}
- if (object_is_fixed_artifact(o_ptr) && have_flag(a_info[o_ptr->name1].flags, TR_ACTIVATE))
+ if (object_is_fixed_artifact(o_ptr) && has_flag(a_info[o_ptr->name1].flags, TR_ACTIVATE))
return a_info[o_ptr->name1].act_idx;
- if (object_is_ego(o_ptr) && have_flag(e_info[o_ptr->name2].flags, TR_ACTIVATE))
+ if (object_is_ego(o_ptr) && has_flag(e_info[o_ptr->name2].flags, TR_ACTIVATE))
return e_info[o_ptr->name2].act_idx;
- if (!object_is_random_artifact(o_ptr) && have_flag(k_info[o_ptr->k_idx].flags, TR_ACTIVATE))
+ if (!object_is_random_artifact(o_ptr) && has_flag(k_info[o_ptr->k_idx].flags, TR_ACTIVATE))
return k_info[o_ptr->k_idx].act_idx;
return o_ptr->xtra2;
HIT_POINT base, forced, vorpal;
HIT_POINT s_evil = forced = vorpal = 0;
HIT_POINT dam = base = (o_ptr->dd * o_ptr->ds + o_ptr->dd) / 2;
- if (have_flag(flgs, TR_KILL_EVIL)) {
+ if (has_flag(flgs, TR_KILL_EVIL)) {
dam = s_evil = dam * 7 / 2;
- } else if (!have_flag(flgs, TR_KILL_EVIL) && have_flag(flgs, TR_SLAY_EVIL)) {
+ } else if (!has_flag(flgs, TR_KILL_EVIL) && has_flag(flgs, TR_SLAY_EVIL)) {
dam = s_evil = dam * 2;
} else
s_evil = dam;
- if (have_flag(flgs, TR_FORCE_WEAPON)) {
+ if (has_flag(flgs, TR_FORCE_WEAPON)) {
dam = forced = dam * 3 / 2 + (o_ptr->dd * o_ptr->ds + o_ptr->dd);
} else
forced = dam;
- if (have_flag(flgs, TR_VORPAL)) {
+ if (has_flag(flgs, TR_VORPAL)) {
dam = vorpal = dam * 11 / 9;
} else
vorpal = dam;
{
BIT_FLAGS flgs[TR_FLAG_SIZE];
object_flags(player_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_VAMPIRIC)) {
- if (have_flag(flgs, TR_BLOWS) && (o_ptr->pval == 1) && (calc_arm_avgdamage(player_ptr, o_ptr) > 52)) {
+ if (has_flag(flgs, TR_VAMPIRIC)) {
+ if (has_flag(flgs, TR_BLOWS) && (o_ptr->pval == 1) && (calc_arm_avgdamage(player_ptr, o_ptr) > 52)) {
return TRUE;
}
- if (have_flag(flgs, TR_BLOWS) && (o_ptr->pval == 2) && (calc_arm_avgdamage(player_ptr, o_ptr) > 43)) {
+ if (has_flag(flgs, TR_BLOWS) && (o_ptr->pval == 2) && (calc_arm_avgdamage(player_ptr, o_ptr) > 43)) {
return TRUE;
}
- if (have_flag(flgs, TR_BLOWS) && (o_ptr->pval == 3) && (calc_arm_avgdamage(player_ptr, o_ptr) > 33)) {
+ if (has_flag(flgs, TR_BLOWS) && (o_ptr->pval == 3) && (calc_arm_avgdamage(player_ptr, o_ptr) > 33)) {
return TRUE;
}
return FALSE;
}
- if (have_flag(flgs, TR_BLOWS) && (o_ptr->pval == 1) && (calc_arm_avgdamage(player_ptr, o_ptr) > 65)) {
+ if (has_flag(flgs, TR_BLOWS) && (o_ptr->pval == 1) && (calc_arm_avgdamage(player_ptr, o_ptr) > 65)) {
return TRUE;
}
- if (have_flag(flgs, TR_BLOWS) && (o_ptr->pval == 2) && (calc_arm_avgdamage(player_ptr, o_ptr) > 52)) {
+ if (has_flag(flgs, TR_BLOWS) && (o_ptr->pval == 2) && (calc_arm_avgdamage(player_ptr, o_ptr) > 52)) {
return TRUE;
}
- if (have_flag(flgs, TR_BLOWS) && (o_ptr->pval == 3) && (calc_arm_avgdamage(player_ptr, o_ptr) > 40)) {
+ if (has_flag(flgs, TR_BLOWS) && (o_ptr->pval == 3) && (calc_arm_avgdamage(player_ptr, o_ptr) > 40)) {
return TRUE;
}
BIT_FLAGS flgs[TR_FLAG_SIZE];
object_flags(player_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_KILL_EVIL)) {
+ if (has_flag(flgs, TR_KILL_EVIL)) {
remove_flag(o_ptr->art_flags, TR_KILL_EVIL);
add_flag(o_ptr->art_flags, TR_SLAY_EVIL);
return TRUE;
static void strengthen_pval(object_type *o_ptr)
{
- if (have_flag(o_ptr->art_flags, TR_BLOWS)) {
+ if (has_flag(o_ptr->art_flags, TR_BLOWS)) {
o_ptr->pval = randint1(2);
if ((o_ptr->tval == TV_SWORD) && (o_ptr->sval == SV_HAYABUSA))
o_ptr->pval++;
o_ptr->to_h += randint1(o_ptr->to_h > 19 ? 1 : 20 - o_ptr->to_h);
o_ptr->to_d += randint1(o_ptr->to_d > 19 ? 1 : 20 - o_ptr->to_d);
- if ((have_flag(o_ptr->art_flags, TR_WIS)) && (o_ptr->pval > 0))
+ if ((has_flag(o_ptr->art_flags, TR_WIS)) && (o_ptr->pval > 0))
add_flag(o_ptr->art_flags, TR_BLESSED);
}
static bool invest_misc_ranger(object_type *o_ptr)
{
- if (have_flag(o_ptr->art_flags, TR_SUST_CON))
+ if (has_flag(o_ptr->art_flags, TR_SUST_CON))
return FALSE;
add_flag(o_ptr->art_flags, TR_SUST_CON);
static bool invest_misc_strength(object_type *o_ptr)
{
- if (have_flag(o_ptr->art_flags, TR_SUST_STR))
+ if (has_flag(o_ptr->art_flags, TR_SUST_STR))
return FALSE;
add_flag(o_ptr->art_flags, TR_SUST_STR);
static bool invest_misc_wisdom(object_type *o_ptr)
{
- if (have_flag(o_ptr->art_flags, TR_SUST_WIS))
+ if (has_flag(o_ptr->art_flags, TR_SUST_WIS))
return FALSE;
add_flag(o_ptr->art_flags, TR_SUST_WIS);
static bool invest_misc_intelligence(object_type *o_ptr)
{
- if (have_flag(o_ptr->art_flags, TR_SUST_INT))
+ if (has_flag(o_ptr->art_flags, TR_SUST_INT))
return FALSE;
add_flag(o_ptr->art_flags, TR_SUST_INT);
static bool invest_misc_dexterity(object_type *o_ptr)
{
- if (have_flag(o_ptr->art_flags, TR_SUST_DEX))
+ if (has_flag(o_ptr->art_flags, TR_SUST_DEX))
return FALSE;
add_flag(o_ptr->art_flags, TR_SUST_DEX);
static bool invest_misc_constitution(object_type *o_ptr)
{
- if (have_flag(o_ptr->art_flags, TR_SUST_CON))
+ if (has_flag(o_ptr->art_flags, TR_SUST_CON))
return FALSE;
add_flag(o_ptr->art_flags, TR_SUST_CON);
static bool invest_misc_charisma(object_type *o_ptr)
{
- if (have_flag(o_ptr->art_flags, TR_SUST_CHR))
+ if (has_flag(o_ptr->art_flags, TR_SUST_CHR))
return FALSE;
add_flag(o_ptr->art_flags, TR_SUST_CHR);
static bool invest_misc_chaos(object_type *o_ptr)
{
- if (have_flag(o_ptr->art_flags, TR_TELEPORT))
+ if (has_flag(o_ptr->art_flags, TR_TELEPORT))
return FALSE;
add_flag(o_ptr->art_flags, TR_TELEPORT);
case BIAS_CHAOS:
return invest_misc_chaos(o_ptr);
case BIAS_FIRE:
- if (!(have_flag(o_ptr->art_flags, TR_LITE_1)))
+ if (!(has_flag(o_ptr->art_flags, TR_LITE_1)))
add_flag(o_ptr->art_flags, TR_LITE_1);
return FALSE;
static bool random_art_bias_strength(object_type *o_ptr)
{
- if (have_flag(o_ptr->art_flags, TR_STR))
+ if (has_flag(o_ptr->art_flags, TR_STR))
return FALSE;
add_flag(o_ptr->art_flags, TR_STR);
static bool random_art_bias_intelligence(object_type *o_ptr)
{
- if (have_flag(o_ptr->art_flags, TR_INT))
+ if (has_flag(o_ptr->art_flags, TR_INT))
return FALSE;
add_flag(o_ptr->art_flags, TR_INT);
static bool random_art_bias_wisdom(object_type *o_ptr)
{
- if (have_flag(o_ptr->art_flags, TR_WIS))
+ if (has_flag(o_ptr->art_flags, TR_WIS))
return FALSE;
add_flag(o_ptr->art_flags, TR_WIS);
static bool random_art_bias_dexterity(object_type *o_ptr)
{
- if (have_flag(o_ptr->art_flags, TR_DEX))
+ if (has_flag(o_ptr->art_flags, TR_DEX))
return FALSE;
add_flag(o_ptr->art_flags, TR_DEX);
static bool random_art_bias_constitution(object_type *o_ptr)
{
- if (have_flag(o_ptr->art_flags, TR_CON))
+ if (has_flag(o_ptr->art_flags, TR_CON))
return FALSE;
add_flag(o_ptr->art_flags, TR_CON);
static bool random_art_bias_charisma(object_type *o_ptr)
{
- if (have_flag(o_ptr->art_flags, TR_CHR))
+ if (has_flag(o_ptr->art_flags, TR_CHR))
return FALSE;
add_flag(o_ptr->art_flags, TR_CHR);
static bool random_art_bias_magic_mastery(object_type *o_ptr)
{
- if ((o_ptr->tval != TV_GLOVES) || have_flag(o_ptr->art_flags, TR_MAGIC_MASTERY))
+ if ((o_ptr->tval != TV_GLOVES) || has_flag(o_ptr->art_flags, TR_MAGIC_MASTERY))
return FALSE;
add_flag(o_ptr->art_flags, TR_MAGIC_MASTERY);
static bool random_art_bias_stealth(object_type *o_ptr)
{
- if (have_flag(o_ptr->art_flags, TR_STEALTH))
+ if (has_flag(o_ptr->art_flags, TR_STEALTH))
return FALSE;
add_flag(o_ptr->art_flags, TR_STEALTH);
static bool random_art_bias_search(object_type *o_ptr)
{
- if (have_flag(o_ptr->art_flags, TR_SEARCH))
+ if (has_flag(o_ptr->art_flags, TR_SEARCH))
return FALSE;
add_flag(o_ptr->art_flags, TR_SEARCH);
static bool random_art_bias_decrease_mana(object_type *o_ptr)
{
if (((o_ptr->artifact_bias != BIAS_MAGE) && (o_ptr->artifact_bias != BIAS_PRIESTLY)) || (o_ptr->tval != TV_SOFT_ARMOR) || (o_ptr->sval != SV_ROBE)
- || have_flag(o_ptr->art_flags, TR_DEC_MANA) || !one_in_(3))
+ || has_flag(o_ptr->art_flags, TR_DEC_MANA) || !one_in_(3))
return FALSE;
add_flag(o_ptr->art_flags, TR_DEC_MANA);
static bool random_art_resistance_acid(object_type *o_ptr)
{
- if (have_flag(o_ptr->art_flags, TR_RES_ACID))
+ if (has_flag(o_ptr->art_flags, TR_RES_ACID))
return FALSE;
add_flag(o_ptr->art_flags, TR_RES_ACID);
static bool random_art_immunity_acid(object_type *o_ptr)
{
- if (!one_in_(BIAS_LUCK) || have_flag(o_ptr->art_flags, TR_IM_ACID))
+ if (!one_in_(BIAS_LUCK) || has_flag(o_ptr->art_flags, TR_IM_ACID))
return FALSE;
add_flag(o_ptr->art_flags, TR_IM_ACID);
static bool random_art_resistance_elec(object_type *o_ptr)
{
- if (have_flag(o_ptr->art_flags, TR_RES_ELEC))
+ if (has_flag(o_ptr->art_flags, TR_RES_ELEC))
return FALSE;
add_flag(o_ptr->art_flags, TR_RES_ELEC);
static bool random_art_aura_elec(object_type *o_ptr)
{
- if ((o_ptr->tval < TV_CLOAK) || (o_ptr->tval > TV_HARD_ARMOR) || have_flag(o_ptr->art_flags, TR_SH_ELEC))
+ if ((o_ptr->tval < TV_CLOAK) || (o_ptr->tval > TV_HARD_ARMOR) || has_flag(o_ptr->art_flags, TR_SH_ELEC))
return FALSE;
add_flag(o_ptr->art_flags, TR_SH_ELEC);
static bool random_art_immunity_elec(object_type *o_ptr)
{
- if (!one_in_(BIAS_LUCK) || have_flag(o_ptr->art_flags, TR_IM_ELEC))
+ if (!one_in_(BIAS_LUCK) || has_flag(o_ptr->art_flags, TR_IM_ELEC))
return FALSE;
add_flag(o_ptr->art_flags, TR_IM_ELEC);
static bool random_art_resistance_fire(object_type *o_ptr)
{
- if (have_flag(o_ptr->art_flags, TR_RES_FIRE))
+ if (has_flag(o_ptr->art_flags, TR_RES_FIRE))
return FALSE;
add_flag(o_ptr->art_flags, TR_RES_FIRE);
static bool random_art_aura_fire(object_type *o_ptr)
{
- if ((o_ptr->tval < TV_CLOAK) || (o_ptr->tval > TV_HARD_ARMOR) || have_flag(o_ptr->art_flags, TR_SH_FIRE))
+ if ((o_ptr->tval < TV_CLOAK) || (o_ptr->tval > TV_HARD_ARMOR) || has_flag(o_ptr->art_flags, TR_SH_FIRE))
return FALSE;
add_flag(o_ptr->art_flags, TR_SH_FIRE);
static bool random_art_immunity_fire(object_type *o_ptr)
{
- if (!one_in_(BIAS_LUCK) || have_flag(o_ptr->art_flags, TR_IM_FIRE))
+ if (!one_in_(BIAS_LUCK) || has_flag(o_ptr->art_flags, TR_IM_FIRE))
return FALSE;
add_flag(o_ptr->art_flags, TR_IM_FIRE);
static bool random_art_resistance_cold(object_type *o_ptr)
{
- if (have_flag(o_ptr->art_flags, TR_RES_COLD))
+ if (has_flag(o_ptr->art_flags, TR_RES_COLD))
return FALSE;
add_flag(o_ptr->art_flags, TR_RES_COLD);
static bool random_art_aura_cold(object_type *o_ptr)
{
- if ((o_ptr->tval < TV_CLOAK) || (o_ptr->tval > TV_HARD_ARMOR) || have_flag(o_ptr->art_flags, TR_SH_COLD))
+ if ((o_ptr->tval < TV_CLOAK) || (o_ptr->tval > TV_HARD_ARMOR) || has_flag(o_ptr->art_flags, TR_SH_COLD))
return FALSE;
add_flag(o_ptr->art_flags, TR_SH_COLD);
static bool random_art_immunity_cold(object_type *o_ptr)
{
- if (!one_in_(BIAS_LUCK) || have_flag(o_ptr->art_flags, TR_IM_COLD))
+ if (!one_in_(BIAS_LUCK) || has_flag(o_ptr->art_flags, TR_IM_COLD))
return FALSE;
add_flag(o_ptr->art_flags, TR_IM_COLD);
static bool random_art_resistance_pois(object_type *o_ptr)
{
- if (have_flag(o_ptr->art_flags, TR_RES_POIS))
+ if (has_flag(o_ptr->art_flags, TR_RES_POIS))
return FALSE;
add_flag(o_ptr->art_flags, TR_RES_POIS);
static bool random_art_resistance_fear(object_type *o_ptr)
{
- if (one_in_(3) || have_flag(o_ptr->art_flags, TR_RES_FEAR))
+ if (one_in_(3) || has_flag(o_ptr->art_flags, TR_RES_FEAR))
return FALSE;
add_flag(o_ptr->art_flags, TR_RES_FEAR);
static bool random_art_resistance_no_magic(object_type *o_ptr)
{
- if (!one_in_(3) || have_flag(o_ptr->art_flags, TR_NO_MAGIC))
+ if (!one_in_(3) || has_flag(o_ptr->art_flags, TR_NO_MAGIC))
return FALSE;
add_flag(o_ptr->art_flags, TR_NO_MAGIC);
static bool random_art_resistance_nether(object_type *o_ptr)
{
- if (have_flag(o_ptr->art_flags, TR_RES_NETHER))
+ if (has_flag(o_ptr->art_flags, TR_RES_NETHER))
return FALSE;
add_flag(o_ptr->art_flags, TR_RES_NETHER);
static bool random_art_resistance_dark(object_type *o_ptr)
{
- if (have_flag(o_ptr->art_flags, TR_RES_DARK))
+ if (has_flag(o_ptr->art_flags, TR_RES_DARK))
return FALSE;
add_flag(o_ptr->art_flags, TR_RES_DARK);
static bool random_art_resistance_chaos(object_type *o_ptr)
{
- if (have_flag(o_ptr->art_flags, TR_RES_CHAOS))
+ if (has_flag(o_ptr->art_flags, TR_RES_CHAOS))
return FALSE;
add_flag(o_ptr->art_flags, TR_RES_CHAOS);
static bool random_art_resistance_confusion(object_type *o_ptr)
{
- if (have_flag(o_ptr->art_flags, TR_RES_CONF))
+ if (has_flag(o_ptr->art_flags, TR_RES_CONF))
return FALSE;
add_flag(o_ptr->art_flags, TR_RES_CONF);
static bool random_art_resistance_disenchant(object_type *o_ptr)
{
- if (have_flag(o_ptr->art_flags, TR_RES_DISEN))
+ if (has_flag(o_ptr->art_flags, TR_RES_DISEN))
return FALSE;
add_flag(o_ptr->art_flags, TR_RES_DISEN);
static bool random_art_slay_chaos(object_type *o_ptr)
{
- if (have_flag(o_ptr->art_flags, TR_CHAOTIC))
+ if (has_flag(o_ptr->art_flags, TR_CHAOTIC))
return FALSE;
add_flag(o_ptr->art_flags, TR_CHAOTIC);
static bool random_art_slay_vampiric(object_type *o_ptr)
{
- if (have_flag(o_ptr->art_flags, TR_VAMPIRIC))
+ if (has_flag(o_ptr->art_flags, TR_VAMPIRIC))
return FALSE;
add_flag(o_ptr->art_flags, TR_VAMPIRIC);
static bool random_art_slay_brand_acid(object_type *o_ptr)
{
- if (have_flag(o_ptr->art_flags, TR_BRAND_ACID))
+ if (has_flag(o_ptr->art_flags, TR_BRAND_ACID))
return FALSE;
add_flag(o_ptr->art_flags, TR_BRAND_ACID);
static bool random_art_slay_brand_elec(object_type *o_ptr)
{
- if (have_flag(o_ptr->art_flags, TR_BRAND_ELEC))
+ if (has_flag(o_ptr->art_flags, TR_BRAND_ELEC))
return FALSE;
add_flag(o_ptr->art_flags, TR_BRAND_ELEC);
static bool random_art_slay_brand_fire(object_type *o_ptr)
{
- if (have_flag(o_ptr->art_flags, TR_BRAND_FIRE))
+ if (has_flag(o_ptr->art_flags, TR_BRAND_FIRE))
return FALSE;
add_flag(o_ptr->art_flags, TR_BRAND_FIRE);
static bool random_art_slay_brand_cold(object_type *o_ptr)
{
- if (have_flag(o_ptr->art_flags, TR_BRAND_COLD))
+ if (has_flag(o_ptr->art_flags, TR_BRAND_COLD))
return FALSE;
add_flag(o_ptr->art_flags, TR_BRAND_COLD);
static bool random_art_slay_brand_pois(object_type *o_ptr)
{
- if (have_flag(o_ptr->art_flags, TR_BRAND_POIS) || one_in_(2))
+ if (has_flag(o_ptr->art_flags, TR_BRAND_POIS) || one_in_(2))
return FALSE;
add_flag(o_ptr->art_flags, TR_BRAND_POIS);
static bool random_art_slay_animal(object_type *o_ptr)
{
- if (have_flag(o_ptr->art_flags, TR_SLAY_ANIMAL))
+ if (has_flag(o_ptr->art_flags, TR_SLAY_ANIMAL))
return FALSE;
add_flag(o_ptr->art_flags, TR_SLAY_ANIMAL);
static bool random_art_slay_evil(object_type *o_ptr)
{
- if (have_flag(o_ptr->art_flags, TR_SLAY_EVIL))
+ if (has_flag(o_ptr->art_flags, TR_SLAY_EVIL))
return FALSE;
add_flag(o_ptr->art_flags, TR_SLAY_EVIL);
static bool random_art_slay_undead(object_type *o_ptr)
{
- if (have_flag(o_ptr->art_flags, TR_SLAY_UNDEAD))
+ if (has_flag(o_ptr->art_flags, TR_SLAY_UNDEAD))
return FALSE;
add_flag(o_ptr->art_flags, TR_SLAY_UNDEAD);
static bool random_art_slay_demon(object_type *o_ptr)
{
- if (have_flag(o_ptr->art_flags, TR_SLAY_DEMON))
+ if (has_flag(o_ptr->art_flags, TR_SLAY_DEMON))
return FALSE;
add_flag(o_ptr->art_flags, TR_SLAY_DEMON);
case BIAS_CHAOS:
return random_art_slay_chaos(o_ptr);
case BIAS_PRIESTLY:
- if (((o_ptr->tval == TV_SWORD) || (o_ptr->tval == TV_POLEARM)) && !have_flag(o_ptr->art_flags, TR_BLESSED))
+ if (((o_ptr->tval == TV_SWORD) || (o_ptr->tval == TV_POLEARM)) && !has_flag(o_ptr->art_flags, TR_BLESSED))
add_flag(o_ptr->art_flags, TR_BLESSED);
return FALSE;
return random_art_slay_animal(o_ptr);
case BIAS_ROGUE:
if ((((o_ptr->tval == TV_SWORD) && (o_ptr->sval == SV_DAGGER)) || ((o_ptr->tval == TV_POLEARM) && (o_ptr->sval == SV_SPEAR)))
- && !(have_flag(o_ptr->art_flags, TR_THROW))) {
+ && !(has_flag(o_ptr->art_flags, TR_THROW))) {
add_flag(o_ptr->art_flags, TR_THROW);
}
if (creature_ptr->special_defense & KATA_MUSOU)
set_action(creature_ptr, ACTION_NONE);
- if (!have_flag(f_ptr->flags, FF_LESS)) {
+ if (!has_flag(f_ptr->flags, FF_LESS)) {
msg_print(_("ここには上り階段が見当たらない。", "I see no up staircase here."));
return;
}
- if (have_flag(f_ptr->flags, FF_QUEST)) {
+ if (has_flag(f_ptr->flags, FF_QUEST)) {
if (!confirm_leave_level(creature_ptr, FALSE))
return;
creature_ptr->current_floor_ptr->dun_level = 0;
up_num = 0;
} else {
- if (have_flag(f_ptr->flags, FF_SHAFT)) {
+ if (has_flag(f_ptr->flags, FF_SHAFT)) {
prepare_change_floor_mode(creature_ptr, CFM_SAVE_FLOORS | CFM_UP | CFM_SHAFT);
up_num = 2;
} else {
grid_type *g_ptr = &creature_ptr->current_floor_ptr->grid_array[creature_ptr->y][creature_ptr->x];
feature_type *f_ptr = &f_info[g_ptr->feat];
- if (!have_flag(f_ptr->flags, FF_MORE)) {
+ if (!has_flag(f_ptr->flags, FF_MORE)) {
msg_print(_("ここには下り階段が見当たらない。", "I see no down staircase here."));
return;
}
- if (have_flag(f_ptr->flags, FF_TRAP))
+ if (has_flag(f_ptr->flags, FF_TRAP))
fall_trap = TRUE;
- if (have_flag(f_ptr->flags, FF_QUEST_ENTER)) {
+ if (has_flag(f_ptr->flags, FF_QUEST_ENTER)) {
do_cmd_quest(creature_ptr);
return;
}
- if (have_flag(f_ptr->flags, FF_QUEST)) {
+ if (has_flag(f_ptr->flags, FF_QUEST)) {
if (!confirm_leave_level(creature_ptr, TRUE))
return;
DUNGEON_IDX target_dungeon = 0;
if (!creature_ptr->current_floor_ptr->dun_level) {
- target_dungeon = have_flag(f_ptr->flags, FF_ENTRANCE) ? g_ptr->special : DUNGEON_ANGBAND;
+ target_dungeon = has_flag(f_ptr->flags, FF_ENTRANCE) ? g_ptr->special : DUNGEON_ANGBAND;
if (ironman_downward && (target_dungeon != DUNGEON_ANGBAND)) {
msg_print(_("ダンジョンの入口は塞がれている!", "The entrance of this dungeon is closed!"));
return;
if (autosave_l)
do_cmd_save_game(creature_ptr, TRUE);
- if (have_flag(f_ptr->flags, FF_SHAFT))
+ if (has_flag(f_ptr->flags, FF_SHAFT))
down_num += 2;
else
down_num += 1;
return;
}
- if (have_flag(f_ptr->flags, FF_SHAFT))
+ if (has_flag(f_ptr->flags, FF_SHAFT))
prepare_change_floor_mode(creature_ptr, CFM_SAVE_FLOORS | CFM_DOWN | CFM_SHAFT);
else
prepare_change_floor_mode(creature_ptr, CFM_SAVE_FLOORS | CFM_DOWN);
g_ptr = &creature_ptr->current_floor_ptr->grid_array[y][x];
feat = get_feat_mimic(g_ptr);
o_idx = chest_check(creature_ptr->current_floor_ptr, y, x, FALSE);
- if (!have_flag(f_info[feat].flags, FF_OPEN) && !o_idx) {
+ if (!has_flag(f_info[feat].flags, FF_OPEN) && !o_idx) {
msg_print(_("そこには開けるものが見当たらない。", "You see nothing there to open."));
} else if (g_ptr->m_idx && creature_ptr->riding != g_ptr->m_idx) {
take_turn(creature_ptr, 100);
x = creature_ptr->x + ddx[dir];
g_ptr = &creature_ptr->current_floor_ptr->grid_array[y][x];
feat = get_feat_mimic(g_ptr);
- if (!have_flag(f_info[feat].flags, FF_CLOSE)) {
+ if (!has_flag(f_info[feat].flags, FF_CLOSE)) {
msg_print(_("そこには閉じるものが見当たらない。", "You see nothing there to close."));
} else if (g_ptr->m_idx) {
take_turn(creature_ptr, 100);
x = creature_ptr->x + ddx[dir];
g_ptr = &creature_ptr->current_floor_ptr->grid_array[y][x];
feat = get_feat_mimic(g_ptr);
- if (!have_flag(f_info[feat].flags, FF_BASH)) {
+ if (!has_flag(f_info[feat].flags, FF_BASH)) {
msg_print(_("そこには体当たりするものが見当たらない。", "You see nothing there to bash."));
} else if (g_ptr->m_idx) {
take_turn(creature_ptr, 100);
g_ptr = &creature_ptr->current_floor_ptr->grid_array[y][x];
FEAT_IDX feat = get_feat_mimic(g_ptr);
INVENTORY_IDX item;
- if (!have_flag(f_info[feat].flags, FF_SPIKE)) {
+ if (!has_flag(f_info[feat].flags, FF_SPIKE)) {
msg_print(_("そこにはくさびを打てるものが見当たらない。", "You see nothing there to spike."));
} else if (!get_spike(creature_ptr, &item)) {
msg_print(_("くさびを持っていない!", "You have no spikes!"));
return FALSE;
}
- if (have_flag(f_ptr->flags, FF_OPEN))
+ if (has_flag(f_ptr->flags, FF_OPEN))
return exe_open(creature_ptr, y, x);
- if (have_flag(f_ptr->flags, FF_BASH))
+ if (has_flag(f_ptr->flags, FF_BASH))
return exe_bash(creature_ptr, y, x, dir);
- if (have_flag(f_ptr->flags, FF_TUNNEL))
+ if (has_flag(f_ptr->flags, FF_TUNNEL))
return exe_tunnel(creature_ptr, y, x);
- if (have_flag(f_ptr->flags, FF_CLOSE))
+ if (has_flag(f_ptr->flags, FF_CLOSE))
return exe_close(creature_ptr, y, x);
- if (have_flag(f_ptr->flags, FF_DISARM))
+ if (has_flag(f_ptr->flags, FF_DISARM))
return exe_disarm(creature_ptr, y, x, dir);
msg_print(_("何もない空中を攻撃した。", "You attack the empty air."));
feature_type *f_ptr = &f_info[get_feat_mimic(g_ptr)];
#ifdef JP
msg_format("そのモンスターは%sの%sにいる。", f_name + f_ptr->name,
- ((!have_flag(f_ptr->flags, FF_MOVE) && !have_flag(f_ptr->flags, FF_CAN_FLY))
- || (!have_flag(f_ptr->flags, FF_LOS) && !have_flag(f_ptr->flags, FF_TREE)))
+ ((!has_flag(f_ptr->flags, FF_MOVE) && !has_flag(f_ptr->flags, FF_CAN_FLY))
+ || (!has_flag(f_ptr->flags, FF_LOS) && !has_flag(f_ptr->flags, FF_TREE)))
? "中"
: "上");
#else
msg_format("This monster is %s the %s.",
- ((!have_flag(f_ptr->flags, FF_MOVE) && !have_flag(f_ptr->flags, FF_CAN_FLY))
- || (!have_flag(f_ptr->flags, FF_LOS) && !have_flag(f_ptr->flags, FF_TREE)))
+ ((!has_flag(f_ptr->flags, FF_MOVE) && !has_flag(f_ptr->flags, FF_CAN_FLY))
+ || (!has_flag(f_ptr->flags, FF_LOS) && !has_flag(f_ptr->flags, FF_TREE)))
? "in"
: "on",
f_name + f_ptr->name);
{
int cost = 1;
feature_type *f_ptr = &f_info[creature_ptr->current_floor_ptr->grid_array[y][x].feat];
- if (have_flag(f_ptr->flags, FF_AVOID_RUN))
+ if (has_flag(f_ptr->flags, FF_AVOID_RUN))
cost += 1;
- if (have_flag(f_ptr->flags, FF_WATER) && have_flag(f_ptr->flags, FF_DEEP) && !creature_ptr->levitation)
+ if (has_flag(f_ptr->flags, FF_WATER) && has_flag(f_ptr->flags, FF_DEEP) && !creature_ptr->levitation)
cost += 5;
- if (have_flag(f_ptr->flags, FF_LAVA)) {
+ if (has_flag(f_ptr->flags, FF_LAVA)) {
int lava = 2;
if (!creature_ptr->resist_fire)
lava *= 2;
if (!creature_ptr->levitation)
lava *= 2;
- if (have_flag(f_ptr->flags, FF_DEEP))
+ if (has_flag(f_ptr->flags, FF_DEEP))
lava *= 2;
cost += lava;
}
if (creature_ptr->current_floor_ptr->grid_array[y][x].info & (CAVE_MARK)) {
- if (have_flag(f_ptr->flags, FF_DOOR))
+ if (has_flag(f_ptr->flags, FF_DOOR))
cost += 1;
- if (have_flag(f_ptr->flags, FF_TRAP))
+ if (has_flag(f_ptr->flags, FF_TRAP))
cost += 10;
}
int add_cost = 1;
int from_wall = (n / TRAVEL_UNABLE);
- if (have_flag(f_ptr->flags, FF_WALL) || have_flag(f_ptr->flags, FF_CAN_DIG) || (have_flag(f_ptr->flags, FF_DOOR) && floor_ptr->grid_array[y][x].mimic)
- || (!have_flag(f_ptr->flags, FF_MOVE) && have_flag(f_ptr->flags, FF_CAN_FLY) && !creature_ptr->levitation)) {
+ if (has_flag(f_ptr->flags, FF_WALL) || has_flag(f_ptr->flags, FF_CAN_DIG) || (has_flag(f_ptr->flags, FF_DOOR) && floor_ptr->grid_array[y][x].mimic)
+ || (!has_flag(f_ptr->flags, FF_MOVE) && has_flag(f_ptr->flags, FF_CAN_FLY) && !creature_ptr->levitation)) {
if (!wall || !from_wall)
return;
flow_head = flow_tail = 0;
bool wall = FALSE;
feature_type *f_ptr = &f_info[creature_ptr->current_floor_ptr->grid_array[creature_ptr->y][creature_ptr->x].feat];
- if (!have_flag(f_ptr->flags, FF_MOVE))
+ if (!has_flag(f_ptr->flags, FF_MOVE))
wall = TRUE;
travel_flow_aux(creature_ptr, ty, tx, 0, wall);
feature_type *f_ptr;
f_ptr = &f_info[floor_ptr->grid_array[y][x].feat];
if ((floor_ptr->grid_array[y][x].info & CAVE_MARK)
- && (have_flag(f_ptr->flags, FF_WALL) || have_flag(f_ptr->flags, FF_CAN_DIG)
- || (have_flag(f_ptr->flags, FF_DOOR) && floor_ptr->grid_array[y][x].mimic))) {
+ && (has_flag(f_ptr->flags, FF_WALL) || has_flag(f_ptr->flags, FF_CAN_DIG)
+ || (has_flag(f_ptr->flags, FF_DOOR) && floor_ptr->grid_array[y][x].mimic))) {
msg_print(_("そこには行くことができません!", "You cannot travel there!"));
return;
}
grid_type *g_ptr;
g_ptr = &creature_ptr->current_floor_ptr->grid_array[y][x];
FEAT_IDX feat = get_feat_mimic(g_ptr);
- if (have_flag(f_info[feat].flags, FF_DOOR))
+ if (has_flag(f_info[feat].flags, FF_DOOR))
msg_print(_("ドアは掘れない。", "You cannot tunnel through doors."));
- else if (!have_flag(f_info[feat].flags, FF_TUNNEL))
+ else if (!has_flag(f_info[feat].flags, FF_TUNNEL))
msg_print(_("そこは掘れない。", "You can't tunnel through that."));
else if (g_ptr->m_idx) {
take_turn(creature_ptr, 100);
take_turn(creature_ptr, 100);
object_flags(creature_ptr, o_ptr, old_flgs);
- if (have_flag(old_flgs, TR_KILL_DRAGON))
+ if (has_flag(old_flgs, TR_KILL_DRAGON))
add_flag(old_flgs, TR_SLAY_DRAGON);
- if (have_flag(old_flgs, TR_KILL_ANIMAL))
+ if (has_flag(old_flgs, TR_KILL_ANIMAL))
add_flag(old_flgs, TR_SLAY_ANIMAL);
- if (have_flag(old_flgs, TR_KILL_EVIL))
+ if (has_flag(old_flgs, TR_KILL_EVIL))
add_flag(old_flgs, TR_SLAY_EVIL);
- if (have_flag(old_flgs, TR_KILL_UNDEAD))
+ if (has_flag(old_flgs, TR_KILL_UNDEAD))
add_flag(old_flgs, TR_SLAY_UNDEAD);
- if (have_flag(old_flgs, TR_KILL_DEMON))
+ if (has_flag(old_flgs, TR_KILL_DEMON))
add_flag(old_flgs, TR_SLAY_DEMON);
- if (have_flag(old_flgs, TR_KILL_ORC))
+ if (has_flag(old_flgs, TR_KILL_ORC))
add_flag(old_flgs, TR_SLAY_ORC);
- if (have_flag(old_flgs, TR_KILL_TROLL))
+ if (has_flag(old_flgs, TR_KILL_TROLL))
add_flag(old_flgs, TR_SLAY_TROLL);
- if (have_flag(old_flgs, TR_KILL_GIANT))
+ if (has_flag(old_flgs, TR_KILL_GIANT))
add_flag(old_flgs, TR_SLAY_GIANT);
- if (have_flag(old_flgs, TR_KILL_HUMAN))
+ if (has_flag(old_flgs, TR_KILL_HUMAN))
add_flag(old_flgs, TR_SLAY_HUMAN);
old_to_a = o_ptr->to_a;
old_timeout = o_ptr->timeout;
if (o_ptr->curse_flags & (TRC_CURSED | TRC_HEAVY_CURSE | TRC_PERMA_CURSE))
dec--;
- if (have_flag(old_flgs, TR_ADD_L_CURSE))
+ if (has_flag(old_flgs, TR_ADD_L_CURSE))
dec--;
- if (have_flag(old_flgs, TR_ADD_H_CURSE))
+ if (has_flag(old_flgs, TR_ADD_H_CURSE))
dec--;
- if (have_flag(old_flgs, TR_AGGRAVATE))
+ if (has_flag(old_flgs, TR_AGGRAVATE))
dec--;
- if (have_flag(old_flgs, TR_NO_TELE))
+ if (has_flag(old_flgs, TR_NO_TELE))
dec--;
- if (have_flag(old_flgs, TR_DRAIN_EXP))
+ if (has_flag(old_flgs, TR_DRAIN_EXP))
dec--;
- if (have_flag(old_flgs, TR_DRAIN_HP))
+ if (has_flag(old_flgs, TR_DRAIN_HP))
dec--;
- if (have_flag(old_flgs, TR_DRAIN_MANA))
+ if (has_flag(old_flgs, TR_DRAIN_MANA))
dec--;
- if (have_flag(old_flgs, TR_CALL_ANIMAL))
+ if (has_flag(old_flgs, TR_CALL_ANIMAL))
dec--;
- if (have_flag(old_flgs, TR_CALL_DEMON))
+ if (has_flag(old_flgs, TR_CALL_DEMON))
dec--;
- if (have_flag(old_flgs, TR_CALL_DRAGON))
+ if (has_flag(old_flgs, TR_CALL_DRAGON))
dec--;
- if (have_flag(old_flgs, TR_CALL_UNDEAD))
+ if (has_flag(old_flgs, TR_CALL_UNDEAD))
dec--;
- if (have_flag(old_flgs, TR_COWARDICE))
+ if (has_flag(old_flgs, TR_COWARDICE))
dec--;
- if (have_flag(old_flgs, TR_LOW_MELEE))
+ if (has_flag(old_flgs, TR_LOW_MELEE))
dec--;
- if (have_flag(old_flgs, TR_LOW_AC))
+ if (has_flag(old_flgs, TR_LOW_AC))
dec--;
- if (have_flag(old_flgs, TR_LOW_MAGIC))
+ if (has_flag(old_flgs, TR_LOW_MAGIC))
dec--;
- if (have_flag(old_flgs, TR_FAST_DIGEST))
+ if (has_flag(old_flgs, TR_FAST_DIGEST))
dec--;
- if (have_flag(old_flgs, TR_SLOW_REGEN))
+ if (has_flag(old_flgs, TR_SLOW_REGEN))
dec--;
- if (have_flag(old_flgs, TR_TY_CURSE))
+ if (has_flag(old_flgs, TR_TY_CURSE))
dec--;
iy = o_ptr->iy;
PARAMETER_VALUE pval = 0;
if (es_ptr->add < TR_FLAG_MAX && is_pval_flag(es_ptr->add) && old_pval)
- pval = (have_flag(new_flgs, es_ptr->add)) ? old_pval - o_ptr->pval : old_pval;
+ pval = (has_flag(new_flgs, es_ptr->add)) ? old_pval - o_ptr->pval : old_pval;
- if (es_ptr->add < TR_FLAG_MAX && (!have_flag(new_flgs, es_ptr->add) || pval) && have_flag(old_flgs, es_ptr->add)) {
+ if (es_ptr->add < TR_FLAG_MAX && (!has_flag(new_flgs, es_ptr->add) || pval) && has_flag(old_flgs, es_ptr->add)) {
if (pval) {
drain_value[es_ptr->essence] += 10 * pval;
} else if (es_ptr->essence != -2) {
}
}
- if ((have_flag(old_flgs, TR_FORCE_WEAPON)) && !(have_flag(new_flgs, TR_FORCE_WEAPON))) {
+ if ((has_flag(old_flgs, TR_FORCE_WEAPON)) && !(has_flag(new_flgs, TR_FORCE_WEAPON))) {
drain_value[TR_INT] += 5;
drain_value[TR_WIS] += 5;
}
- if ((have_flag(old_flgs, TR_VORPAL)) && !(have_flag(new_flgs, TR_VORPAL))) {
+ if ((has_flag(old_flgs, TR_VORPAL)) && !(has_flag(new_flgs, TR_VORPAL))) {
drain_value[TR_BRAND_POIS] += 5;
drain_value[TR_BRAND_ACID] += 5;
drain_value[TR_BRAND_ELEC] += 5;
drain_value[TR_BRAND_FIRE] += 5;
drain_value[TR_BRAND_COLD] += 5;
}
- if ((have_flag(old_flgs, TR_DEC_MANA)) && !(have_flag(new_flgs, TR_DEC_MANA))) {
+ if ((has_flag(old_flgs, TR_DEC_MANA)) && !(has_flag(new_flgs, TR_DEC_MANA))) {
drain_value[TR_INT] += 10;
}
- if ((have_flag(old_flgs, TR_XTRA_MIGHT)) && !(have_flag(new_flgs, TR_XTRA_MIGHT))) {
+ if ((has_flag(old_flgs, TR_XTRA_MIGHT)) && !(has_flag(new_flgs, TR_XTRA_MIGHT))) {
drain_value[TR_STR] += 10;
}
- if ((have_flag(old_flgs, TR_XTRA_SHOTS)) && !(have_flag(new_flgs, TR_XTRA_SHOTS))) {
+ if ((has_flag(old_flgs, TR_XTRA_SHOTS)) && !(has_flag(new_flgs, TR_XTRA_SHOTS))) {
drain_value[TR_DEX] += 10;
}
if (old_name2 == EGO_2WEAPON) {
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;
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));
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 {
case TV_SHOT:
case TV_ARROW:
case TV_BOLT: {
- if ((have_flag(flgs, TR_SLAY_ANIMAL)) && (r_ptr->flags3 & RF3_ANIMAL)) {
+ if ((has_flag(flgs, TR_SLAY_ANIMAL)) && (r_ptr->flags3 & RF3_ANIMAL)) {
if (is_original_ap_and_seen(sniper_ptr, m_ptr)) {
r_ptr->r_flags3 |= RF3_ANIMAL;
}
mult = 17;
}
- if ((have_flag(flgs, TR_KILL_ANIMAL)) && (r_ptr->flags3 & RF3_ANIMAL)) {
+ if ((has_flag(flgs, TR_KILL_ANIMAL)) && (r_ptr->flags3 & RF3_ANIMAL)) {
if (is_original_ap_and_seen(sniper_ptr, m_ptr)) {
r_ptr->r_flags3 |= RF3_ANIMAL;
}
mult = 27;
}
- if ((have_flag(flgs, TR_SLAY_EVIL)) && (r_ptr->flags3 & RF3_EVIL)) {
+ if ((has_flag(flgs, TR_SLAY_EVIL)) && (r_ptr->flags3 & RF3_EVIL)) {
if (is_original_ap_and_seen(sniper_ptr, m_ptr)) {
r_ptr->r_flags3 |= RF3_EVIL;
}
mult = 15;
}
- if ((have_flag(flgs, TR_KILL_EVIL)) && (r_ptr->flags3 & RF3_EVIL)) {
+ if ((has_flag(flgs, TR_KILL_EVIL)) && (r_ptr->flags3 & RF3_EVIL)) {
if (is_original_ap_and_seen(sniper_ptr, m_ptr)) {
r_ptr->r_flags3 |= RF3_EVIL;
}
mult = 25;
}
- if ((have_flag(flgs, TR_SLAY_HUMAN)) && (r_ptr->flags2 & RF2_HUMAN)) {
+ if ((has_flag(flgs, TR_SLAY_HUMAN)) && (r_ptr->flags2 & RF2_HUMAN)) {
if (is_original_ap_and_seen(sniper_ptr, m_ptr)) {
r_ptr->r_flags2 |= RF2_HUMAN;
}
mult = 17;
}
- if ((have_flag(flgs, TR_KILL_HUMAN)) && (r_ptr->flags2 & RF2_HUMAN)) {
+ if ((has_flag(flgs, TR_KILL_HUMAN)) && (r_ptr->flags2 & RF2_HUMAN)) {
if (is_original_ap_and_seen(sniper_ptr, m_ptr)) {
r_ptr->r_flags2 |= RF2_HUMAN;
}
mult = 27;
}
- if ((have_flag(flgs, TR_SLAY_UNDEAD)) && (r_ptr->flags3 & RF3_UNDEAD)) {
+ if ((has_flag(flgs, TR_SLAY_UNDEAD)) && (r_ptr->flags3 & RF3_UNDEAD)) {
if (is_original_ap_and_seen(sniper_ptr, m_ptr)) {
r_ptr->r_flags3 |= RF3_UNDEAD;
}
mult = 20;
}
- if ((have_flag(flgs, TR_KILL_UNDEAD)) && (r_ptr->flags3 & RF3_UNDEAD)) {
+ if ((has_flag(flgs, TR_KILL_UNDEAD)) && (r_ptr->flags3 & RF3_UNDEAD)) {
if (is_original_ap_and_seen(sniper_ptr, m_ptr)) {
r_ptr->r_flags3 |= RF3_UNDEAD;
}
mult = 30;
}
- if ((have_flag(flgs, TR_SLAY_DEMON)) && (r_ptr->flags3 & RF3_DEMON)) {
+ if ((has_flag(flgs, TR_SLAY_DEMON)) && (r_ptr->flags3 & RF3_DEMON)) {
if (is_original_ap_and_seen(sniper_ptr, m_ptr)) {
r_ptr->r_flags3 |= RF3_DEMON;
}
mult = 20;
}
- if ((have_flag(flgs, TR_KILL_DEMON)) && (r_ptr->flags3 & RF3_DEMON)) {
+ if ((has_flag(flgs, TR_KILL_DEMON)) && (r_ptr->flags3 & RF3_DEMON)) {
if (is_original_ap_and_seen(sniper_ptr, m_ptr)) {
r_ptr->r_flags3 |= RF3_DEMON;
}
mult = 30;
}
- if ((have_flag(flgs, TR_SLAY_ORC)) && (r_ptr->flags3 & RF3_ORC)) {
+ if ((has_flag(flgs, TR_SLAY_ORC)) && (r_ptr->flags3 & RF3_ORC)) {
if (is_original_ap_and_seen(sniper_ptr, m_ptr)) {
r_ptr->r_flags3 |= RF3_ORC;
}
mult = 20;
}
- if ((have_flag(flgs, TR_KILL_ORC)) && (r_ptr->flags3 & RF3_ORC)) {
+ if ((has_flag(flgs, TR_KILL_ORC)) && (r_ptr->flags3 & RF3_ORC)) {
if (is_original_ap_and_seen(sniper_ptr, m_ptr)) {
r_ptr->r_flags3 |= RF3_ORC;
}
mult = 30;
}
- if ((have_flag(flgs, TR_SLAY_TROLL)) && (r_ptr->flags3 & RF3_TROLL)) {
+ if ((has_flag(flgs, TR_SLAY_TROLL)) && (r_ptr->flags3 & RF3_TROLL)) {
if (is_original_ap_and_seen(sniper_ptr, m_ptr)) {
r_ptr->r_flags3 |= RF3_TROLL;
}
mult = 20;
}
- if ((have_flag(flgs, TR_KILL_TROLL)) && (r_ptr->flags3 & RF3_TROLL)) {
+ if ((has_flag(flgs, TR_KILL_TROLL)) && (r_ptr->flags3 & RF3_TROLL)) {
if (is_original_ap_and_seen(sniper_ptr, m_ptr)) {
r_ptr->r_flags3 |= RF3_TROLL;
}
mult = 30;
}
- if ((have_flag(flgs, TR_SLAY_GIANT)) && (r_ptr->flags3 & RF3_GIANT)) {
+ if ((has_flag(flgs, TR_SLAY_GIANT)) && (r_ptr->flags3 & RF3_GIANT)) {
if (is_original_ap_and_seen(sniper_ptr, m_ptr)) {
r_ptr->r_flags3 |= RF3_GIANT;
}
mult = 20;
}
- if ((have_flag(flgs, TR_KILL_GIANT)) && (r_ptr->flags3 & RF3_GIANT)) {
+ if ((has_flag(flgs, TR_KILL_GIANT)) && (r_ptr->flags3 & RF3_GIANT)) {
if (is_original_ap_and_seen(sniper_ptr, m_ptr)) {
r_ptr->r_flags3 |= RF3_GIANT;
}
mult = 30;
}
- if ((have_flag(flgs, TR_SLAY_DRAGON)) && (r_ptr->flags3 & RF3_DRAGON)) {
+ if ((has_flag(flgs, TR_SLAY_DRAGON)) && (r_ptr->flags3 & RF3_DRAGON)) {
if (is_original_ap_and_seen(sniper_ptr, m_ptr)) {
r_ptr->r_flags3 |= RF3_DRAGON;
}
mult = 20;
}
- if ((have_flag(flgs, TR_KILL_DRAGON)) && (r_ptr->flags3 & RF3_DRAGON)) {
+ if ((has_flag(flgs, TR_KILL_DRAGON)) && (r_ptr->flags3 & RF3_DRAGON)) {
if (is_original_ap_and_seen(sniper_ptr, m_ptr)) {
r_ptr->r_flags3 |= RF3_DRAGON;
}
mult *= 5;
}
- if (have_flag(flgs, TR_BRAND_ACID)) {
+ if (has_flag(flgs, TR_BRAND_ACID)) {
/* Notice immunity */
if (r_ptr->flagsr & RFR_EFF_IM_ACID_MASK) {
if (is_original_ap_and_seen(sniper_ptr, m_ptr)) {
}
}
- if (have_flag(flgs, TR_BRAND_ELEC)) {
+ if (has_flag(flgs, TR_BRAND_ELEC)) {
/* Notice immunity */
if (r_ptr->flagsr & RFR_EFF_IM_ELEC_MASK) {
if (is_original_ap_and_seen(sniper_ptr, m_ptr)) {
}
}
- if (have_flag(flgs, TR_BRAND_FIRE)) {
+ if (has_flag(flgs, TR_BRAND_FIRE)) {
/* Notice immunity */
if (r_ptr->flagsr & RFR_EFF_IM_FIRE_MASK) {
if (is_original_ap_and_seen(sniper_ptr, m_ptr)) {
}
}
- if (have_flag(flgs, TR_BRAND_COLD)) {
+ if (has_flag(flgs, TR_BRAND_COLD)) {
/* Notice immunity */
if (r_ptr->flagsr & RFR_EFF_IM_COLD_MASK) {
if (is_original_ap_and_seen(sniper_ptr, m_ptr)) {
}
}
- if (have_flag(flgs, TR_BRAND_POIS)) {
+ if (has_flag(flgs, TR_BRAND_POIS)) {
/* Notice immunity */
if (r_ptr->flagsr & RFR_EFF_IM_POIS_MASK) {
if (is_original_ap_and_seen(sniper_ptr, m_ptr)) {
}
}
- if ((have_flag(flgs, TR_FORCE_WEAPON)) && (sniper_ptr->csp > (sniper_ptr->msp / 30))) {
+ if ((has_flag(flgs, TR_FORCE_WEAPON)) && (sniper_ptr->csp > (sniper_ptr->msp / 30))) {
sniper_ptr->csp -= (1 + (sniper_ptr->msp / 30));
sniper_ptr->redraw |= (PR_MANA);
mult = mult * 5 / 2;
for (size_t i = 0; i < sizeof(slay_table) / sizeof(slay_table[0]); ++i) {
const struct slay_table_t *p = &slay_table[i];
- if (!have_flag(flgs, p->slay_flag) || !(atoffset(BIT_FLAGS, r_ptr, p->flag_offset) & p->affect_race_flag))
+ if (!has_flag(flgs, p->slay_flag) || !(atoffset(BIT_FLAGS, r_ptr, p->flag_offset) & p->affect_race_flag))
continue;
if (is_original_ap_and_seen(player_ptr, m_ptr)) {
for (size_t i = 0; i < sizeof(brand_table) / sizeof(brand_table[0]); ++i) {
const struct brand_table_t *p = &brand_table[i];
- if (!have_flag(flgs, p->brand_flag))
+ if (!has_flag(flgs, p->brand_flag))
continue;
/* Notice immunity */
mult = mult_hissatsu(attacker_ptr, mult, flgs, m_ptr, mode);
}
- if ((attacker_ptr->pclass != CLASS_SAMURAI) && (have_flag(flgs, TR_FORCE_WEAPON)) && (attacker_ptr->csp > (o_ptr->dd * o_ptr->ds / 5))) {
+ if ((attacker_ptr->pclass != CLASS_SAMURAI) && (has_flag(flgs, TR_FORCE_WEAPON)) && (attacker_ptr->csp > (o_ptr->dd * o_ptr->ds / 5))) {
attacker_ptr->csp -= (1 + (o_ptr->dd * o_ptr->ds / 5));
attacker_ptr->redraw |= (PR_MANA);
mult = mult * 3 / 2 + 20;
}
}
- if (have_flag(f_ptr->flags, FF_LAVA) && !is_invuln(creature_ptr) && !creature_ptr->immune_fire) {
+ if (has_flag(f_ptr->flags, FF_LAVA) && !is_invuln(creature_ptr) && !creature_ptr->immune_fire) {
int damage = 0;
- if (have_flag(f_ptr->flags, FF_DEEP)) {
+ if (has_flag(f_ptr->flags, FF_DEEP)) {
damage = 6000 + randint0(4000);
} else if (!creature_ptr->levitation) {
damage = 3000 + randint0(2000);
}
}
- if (have_flag(f_ptr->flags, FF_COLD_PUDDLE) && !is_invuln(creature_ptr) && !creature_ptr->immune_cold) {
+ if (has_flag(f_ptr->flags, FF_COLD_PUDDLE) && !is_invuln(creature_ptr) && !creature_ptr->immune_cold) {
int damage = 0;
- if (have_flag(f_ptr->flags, FF_DEEP)) {
+ if (has_flag(f_ptr->flags, FF_DEEP)) {
damage = 6000 + randint0(4000);
} else if (!creature_ptr->levitation) {
damage = 3000 + randint0(2000);
}
}
- if (have_flag(f_ptr->flags, FF_ELEC_PUDDLE) && !is_invuln(creature_ptr) && !creature_ptr->immune_elec) {
+ if (has_flag(f_ptr->flags, FF_ELEC_PUDDLE) && !is_invuln(creature_ptr) && !creature_ptr->immune_elec) {
int damage = 0;
- if (have_flag(f_ptr->flags, FF_DEEP)) {
+ if (has_flag(f_ptr->flags, FF_DEEP)) {
damage = 6000 + randint0(4000);
} else if (!creature_ptr->levitation) {
damage = 3000 + randint0(2000);
}
}
- if (have_flag(f_ptr->flags, FF_ACID_PUDDLE) && !is_invuln(creature_ptr) && !creature_ptr->immune_acid) {
+ if (has_flag(f_ptr->flags, FF_ACID_PUDDLE) && !is_invuln(creature_ptr) && !creature_ptr->immune_acid) {
int damage = 0;
- if (have_flag(f_ptr->flags, FF_DEEP)) {
+ if (has_flag(f_ptr->flags, FF_DEEP)) {
damage = 6000 + randint0(4000);
} else if (!creature_ptr->levitation) {
damage = 3000 + randint0(2000);
}
}
- if (have_flag(f_ptr->flags, FF_POISON_PUDDLE) && !is_invuln(creature_ptr)) {
+ if (has_flag(f_ptr->flags, FF_POISON_PUDDLE) && !is_invuln(creature_ptr)) {
int damage = 0;
- if (have_flag(f_ptr->flags, FF_DEEP)) {
+ if (has_flag(f_ptr->flags, FF_DEEP)) {
damage = 6000 + randint0(4000);
} else if (!creature_ptr->levitation) {
damage = 3000 + randint0(2000);
}
}
- if (have_flag(f_ptr->flags, FF_WATER) && have_flag(f_ptr->flags, FF_DEEP) && !creature_ptr->levitation && !creature_ptr->can_swim
+ if (has_flag(f_ptr->flags, FF_WATER) && has_flag(f_ptr->flags, FF_DEEP) && !creature_ptr->levitation && !creature_ptr->can_swim
&& !creature_ptr->resist_water) {
if (creature_ptr->total_weight > weight_limit(creature_ptr)) {
msg_print(_("溺れている!", "You are drowning!"));
* reduced below 0 hp by being inside a stone wall; others
* WILL BE!
*/
- if (!have_flag(f_ptr->flags, FF_MOVE) && !have_flag(f_ptr->flags, FF_CAN_FLY)) {
+ if (!has_flag(f_ptr->flags, FF_MOVE) && !has_flag(f_ptr->flags, FF_CAN_FLY)) {
if (!is_invuln(creature_ptr) && !creature_ptr->wraith_form && !creature_ptr->tim_pass_wall
&& ((creature_ptr->chp > (creature_ptr->lev / 5)) || !creature_ptr->pass_wall)) {
concptr dam_desc;
x = randint0(floor_ptr->width);
g_ptr = &floor_ptr->grid_array[y][x];
f_ptr = &f_info[g_ptr->feat];
- if (!have_flag(f_ptr->flags, FF_MOVE) && !have_flag(f_ptr->flags, FF_CAN_FLY))
+ if (!has_flag(f_ptr->flags, FF_MOVE) && !has_flag(f_ptr->flags, FF_CAN_FLY))
continue;
if (!monster_can_enter(creature_ptr, y, x, r_ptr, 0))
who = who ? who : 0;
dam = (dam + r) / (r + 1);
- if (have_flag(f_ptr->flags, FF_TREE)) {
+ if (has_flag(f_ptr->flags, FF_TREE)) {
concptr message;
switch (typ) {
case GF_POIS:
cave_alter_feat(caster_ptr, y, x, FF_DISARM);
}
- if (is_closed_door(caster_ptr, g_ptr->feat) && f_ptr->power && have_flag(f_ptr->flags, FF_OPEN)) {
+ if (is_closed_door(caster_ptr, g_ptr->feat) && f_ptr->power && has_flag(f_ptr->flags, FF_OPEN)) {
FEAT_IDX old_feat = g_ptr->feat;
cave_alter_feat(caster_ptr, y, x, FF_DISARM);
if (known && (old_feat != g_ptr->feat)) {
break;
}
case GF_KILL_DOOR: {
- if (is_trap(caster_ptr, g_ptr->feat) || have_flag(f_ptr->flags, FF_DOOR)) {
+ if (is_trap(caster_ptr, g_ptr->feat) || has_flag(f_ptr->flags, FF_DOOR)) {
if (known) {
msg_print(_("まばゆい閃光が走った!", "There is a bright flash of light!"));
obvious = TRUE;
break;
}
case GF_JAM_DOOR: {
- if (!have_flag(f_ptr->flags, FF_SPIKE))
+ if (!has_flag(f_ptr->flags, FF_SPIKE))
break;
s16b old_mimic = g_ptr->mimic;
note_spot(caster_ptr, y, x);
lite_spot(caster_ptr, y, x);
- if (!known || !have_flag(mimic_f_ptr->flags, FF_OPEN))
+ if (!known || !has_flag(mimic_f_ptr->flags, FF_OPEN))
break;
msg_format(_("%sに何かがつっかえて開かなくなった。", "The %s seems stuck."), f_name + mimic_f_ptr->name);
break;
}
case GF_KILL_WALL: {
- if (!have_flag(f_ptr->flags, FF_HURT_ROCK))
+ if (!has_flag(f_ptr->flags, FF_HURT_ROCK))
break;
if (known && (g_ptr->info & (CAVE_MARK))) {
break;
}
case GF_LAVA_FLOW: {
- if (have_flag(f_ptr->flags, FF_PERMANENT))
+ if (has_flag(f_ptr->flags, FF_PERMANENT))
break;
if (dam == 1) {
- if (!have_flag(f_ptr->flags, FF_FLOOR))
+ if (!has_flag(f_ptr->flags, FF_FLOOR))
break;
cave_set_feat(caster_ptr, y, x, feat_shallow_lava);
} else if (dam) {
break;
}
case GF_WATER_FLOW: {
- if (have_flag(f_ptr->flags, FF_PERMANENT))
+ if (has_flag(f_ptr->flags, FF_PERMANENT))
break;
if (dam == 1) {
- if (!have_flag(f_ptr->flags, FF_FLOOR))
+ if (!has_flag(f_ptr->flags, FF_FLOOR))
break;
cave_set_feat(caster_ptr, y, x, feat_shallow_water);
} else if (dam) {
continue;
grid_type *cc_ptr = &floor_ptr->grid_array[by][bx];
- if (have_flag(f_info[get_feat_mimic(cc_ptr)].flags, FF_GLOW)) {
+ if (has_flag(f_info[get_feat_mimic(cc_ptr)].flags, FF_GLOW)) {
do_dark = FALSE;
break;
}
g_ptr->info &= ~(CAVE_GLOW);
/* Hack -- Forget "boring" grids */
- if (!have_flag(f_ptr->flags, FF_REMEMBER)) {
+ if (!has_flag(f_ptr->flags, FF_REMEMBER)) {
/* Forget */
g_ptr->info &= ~(CAVE_MARK);
note_spot(caster_ptr, y, x);
(PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_JUMP | PROJECT_NO_HANGEKI), -1);
}
- if (!have_flag(f_ptr->flags, FF_GLASS) || have_flag(f_ptr->flags, FF_PERMANENT) || (dam < 50))
+ if (!has_flag(f_ptr->flags, FF_GLASS) || has_flag(f_ptr->flags, FF_PERMANENT) || (dam < 50))
break;
if (known && (g_ptr->info & CAVE_MARK)) {
(PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_JUMP | PROJECT_NO_HANGEKI), -1);
}
- if (!have_flag(f_ptr->flags, FF_GLASS) || have_flag(f_ptr->flags, FF_PERMANENT) || (dam < 200))
+ if (!has_flag(f_ptr->flags, FF_GLASS) || has_flag(f_ptr->flags, FF_PERMANENT) || (dam < 200))
break;
if (known && (g_ptr->info & CAVE_MARK)) {
if (is_mirror_grid(g_ptr) || is_glyph_grid(g_ptr) || is_explosive_rune_grid(g_ptr))
remove_mirror(caster_ptr, y, x);
- if (!have_flag(f_ptr->flags, FF_HURT_DISI) || have_flag(f_ptr->flags, FF_PERMANENT))
+ if (!has_flag(f_ptr->flags, FF_HURT_DISI) || has_flag(f_ptr->flags, FF_PERMANENT))
break;
cave_alter_feat(caster_ptr, y, x, FF_HURT_DISI);
if (hates_acid(o_ptr)) {
do_kill = TRUE;
note_kill = _("融けてしまった!", (plural ? " melt!" : " melts!"));
- if (have_flag(flags, TR_IGNORE_ACID))
+ if (has_flag(flags, TR_IGNORE_ACID))
ignore = TRUE;
}
if (hates_elec(o_ptr)) {
do_kill = TRUE;
note_kill = _("壊れてしまった!", (plural ? " are destroyed!" : " is destroyed!"));
- if (have_flag(flags, TR_IGNORE_ELEC))
+ if (has_flag(flags, TR_IGNORE_ELEC))
ignore = TRUE;
}
if (hates_fire(o_ptr)) {
do_kill = TRUE;
note_kill = _("燃えてしまった!", (plural ? " burn up!" : " burns up!"));
- if (have_flag(flags, TR_IGNORE_FIRE))
+ if (has_flag(flags, TR_IGNORE_FIRE))
ignore = TRUE;
}
if (hates_cold(o_ptr)) {
note_kill = _("砕け散ってしまった!", (plural ? " shatter!" : " shatters!"));
do_kill = TRUE;
- if (have_flag(flags, TR_IGNORE_COLD))
+ if (has_flag(flags, TR_IGNORE_COLD))
ignore = TRUE;
}
if (hates_fire(o_ptr)) {
do_kill = TRUE;
note_kill = _("燃えてしまった!", (plural ? " burn up!" : " burns up!"));
- if (have_flag(flags, TR_IGNORE_FIRE))
+ if (has_flag(flags, TR_IGNORE_FIRE))
ignore = TRUE;
}
ignore = FALSE;
do_kill = TRUE;
note_kill = _("壊れてしまった!", (plural ? " are destroyed!" : " is destroyed!"));
- if (have_flag(flags, TR_IGNORE_ELEC))
+ if (has_flag(flags, TR_IGNORE_ELEC))
ignore = TRUE;
}
if (hates_fire(o_ptr)) {
do_kill = TRUE;
note_kill = _("燃えてしまった!", (plural ? " burn up!" : " burns up!"));
- if (have_flag(flags, TR_IGNORE_FIRE))
+ if (has_flag(flags, TR_IGNORE_FIRE))
ignore = TRUE;
}
ignore = FALSE;
do_kill = TRUE;
note_kill = _("砕け散ってしまった!", (plural ? " shatter!" : " shatters!"));
- if (have_flag(flags, TR_IGNORE_COLD))
+ if (has_flag(flags, TR_IGNORE_COLD))
ignore = TRUE;
}
case GF_CHAOS: {
do_kill = TRUE;
note_kill = _("壊れてしまった!", (plural ? " are destroyed!" : " is destroyed!"));
- if (have_flag(flags, TR_RES_CHAOS))
+ if (has_flag(flags, TR_RES_CHAOS))
ignore = TRUE;
else if ((o_ptr->tval == TV_SCROLL) && (o_ptr->sval == SV_SCROLL_CHAOS))
ignore = TRUE;
static void decide_tval_show(player_type *player_ptr, flavor_type *flavor_ptr)
{
- if (have_flag(flavor_ptr->tr_flags, TR_SHOW_MODS))
+ if (has_flag(flavor_ptr->tr_flags, TR_SHOW_MODS))
flavor_ptr->show_weapon = TRUE;
if (object_is_smith(player_ptr, flavor_ptr->o_ptr) && (flavor_ptr->o_ptr->xtra3 == 1 + ESSENCE_SLAY_GLOVE))
static void describe_bow(player_type *player_ptr, flavor_type *flavor_ptr)
{
flavor_ptr->power = bow_tmul(flavor_ptr->o_ptr->sval);
- if (have_flag(flavor_ptr->tr_flags, TR_XTRA_MIGHT))
+ if (has_flag(flavor_ptr->tr_flags, TR_XTRA_MIGHT))
flavor_ptr->power++;
flavor_ptr->t = object_desc_chr(flavor_ptr->t, ' ');
static void describe_specific_pval(flavor_type *flavor_ptr)
{
- if (have_flag(flavor_ptr->tr_flags, TR_SPEED)) {
+ if (has_flag(flavor_ptr->tr_flags, TR_SPEED)) {
flavor_ptr->t = object_desc_str(flavor_ptr->t, _("加速", " to speed"));
return;
}
- if (have_flag(flavor_ptr->tr_flags, TR_BLOWS)) {
+ if (has_flag(flavor_ptr->tr_flags, TR_BLOWS)) {
flavor_ptr->t = object_desc_str(flavor_ptr->t, _("攻撃", " attack"));
#ifdef JP
#else
#endif
}
- if (have_flag(flavor_ptr->tr_flags, TR_STEALTH)) {
+ if (has_flag(flavor_ptr->tr_flags, TR_STEALTH)) {
flavor_ptr->t = object_desc_str(flavor_ptr->t, _("隠密", " to stealth"));
return;
}
- if (have_flag(flavor_ptr->tr_flags, TR_SEARCH)) {
+ if (has_flag(flavor_ptr->tr_flags, TR_SEARCH)) {
flavor_ptr->t = object_desc_str(flavor_ptr->t, _("探索", " to searching"));
return;
}
- if (have_flag(flavor_ptr->tr_flags, TR_INFRA))
+ if (has_flag(flavor_ptr->tr_flags, TR_INFRA))
flavor_ptr->t = object_desc_str(flavor_ptr->t, _("赤外線視力", " to infravision"));
}
flavor_ptr->t = object_desc_chr(flavor_ptr->t, ' ');
flavor_ptr->t = object_desc_chr(flavor_ptr->t, flavor_ptr->p1);
flavor_ptr->t = object_desc_int(flavor_ptr->t, flavor_ptr->o_ptr->pval);
- if (have_flag(flavor_ptr->tr_flags, TR_HIDE_TYPE)) {
+ if (has_flag(flavor_ptr->tr_flags, TR_HIDE_TYPE)) {
flavor_ptr->t = object_desc_chr(flavor_ptr->t, flavor_ptr->p2);
return;
}
#endif
while (fi_ptr->english) {
- if (have_flag(flgs, fi_ptr->flag) && (fi_ptr->except_flag == -1 || !have_flag(flgs, fi_ptr->except_flag)))
+ if (has_flag(flgs, fi_ptr->flag) && (fi_ptr->except_flag == -1 || !has_flag(flgs, fi_ptr->except_flag)))
add_inscription(&ptr, _(kanji ? fi_ptr->japanese : fi_ptr->english, fi_ptr->english));
fi_ptr++;
}
/*!
- * @brief オブジェクトの特性表示記号テーブル1つに従いオブジェクトの特性フラグ配列に1つでも該当の特性があるかを返す / Special variation of have_flag for
+ * @brief オブジェクトの特性表示記号テーブル1つに従いオブジェクトの特性フラグ配列に1つでも該当の特性があるかを返す / Special variation of has_flag for
* auto-inscription
* @param fi_ptr 参照する特性表示記号テーブル
* @param flgs 対応するオブジェクトのフラグ文字列
static bool have_flag_of(flag_insc_table *fi_ptr, BIT_FLAGS flgs[TR_FLAG_SIZE])
{
while (fi_ptr->english) {
- if (have_flag(flgs, fi_ptr->flag) && (fi_ptr->except_flag == -1 || !have_flag(flgs, fi_ptr->except_flag)))
+ if (has_flag(flgs, fi_ptr->flag) && (fi_ptr->except_flag == -1 || !has_flag(flgs, fi_ptr->except_flag)))
return TRUE;
fi_ptr++;
}
if (has_dark_flag(flgs)) {
- if (have_flag(flgs, TR_LITE_1))
+ if (has_flag(flgs, TR_LITE_1))
remove_flag(flgs, TR_LITE_1);
- if (have_flag(flgs, TR_LITE_2))
+ if (has_flag(flgs, TR_LITE_2))
remove_flag(flgs, TR_LITE_2);
- if (have_flag(flgs, TR_LITE_3))
+ if (has_flag(flgs, TR_LITE_3))
remove_flag(flgs, TR_LITE_3);
} else if (has_lite_flag(flgs)) {
add_flag(flgs, TR_LITE_1);
- if (have_flag(flgs, TR_LITE_2))
+ if (has_flag(flgs, TR_LITE_2))
remove_flag(flgs, TR_LITE_2);
- if (have_flag(flgs, TR_LITE_3))
+ if (has_flag(flgs, TR_LITE_3))
remove_flag(flgs, TR_LITE_3);
}
}
#endif
-bool has_lite_flag(BIT_FLAGS *flags) { return have_flag(flags, TR_LITE_1) || have_flag(flags, TR_LITE_2) || have_flag(flags, TR_LITE_3); }
+bool has_lite_flag(BIT_FLAGS *flags) { return has_flag(flags, TR_LITE_1) || has_flag(flags, TR_LITE_2) || has_flag(flags, TR_LITE_3); }
-bool has_dark_flag(BIT_FLAGS *flags) { return have_flag(flags, TR_LITE_M1) || have_flag(flags, TR_LITE_M2) || have_flag(flags, TR_LITE_M3); }
+bool has_dark_flag(BIT_FLAGS *flags) { return has_flag(flags, TR_LITE_M1) || has_flag(flags, TR_LITE_M2) || has_flag(flags, TR_LITE_M3); }
static void set_base_name(flavor_type *flavor_ptr)
{
- if (!flavor_ptr->aware || !have_flag(flavor_ptr->tr_flags, TR_FULL_NAME))
+ if (!flavor_ptr->aware || !has_flag(flavor_ptr->tr_flags, TR_FULL_NAME))
return;
flavor_ptr->basenm = (flavor_ptr->known && (flavor_ptr->o_ptr->name1 != 0)) ? a_name + a_info[flavor_ptr->o_ptr->name1].name : flavor_ptr->kindname;
return;
}
- if (flavor_ptr->o_ptr->name1 && !have_flag(flavor_ptr->tr_flags, TR_FULL_NAME)) {
+ if (flavor_ptr->o_ptr->name1 && !has_flag(flavor_ptr->tr_flags, TR_FULL_NAME)) {
artifact_type *a_ptr = &a_info[flavor_ptr->o_ptr->name1];
/* '『' から始まらない伝説のアイテムの名前は最初に付加する */
if (strncmp(a_name + a_ptr->name, "『", 2) != 0)
static void describe_artifact_body_en(flavor_type *flavor_ptr)
{
- if (!flavor_ptr->known || have_flag(flavor_ptr->tr_flags, TR_FULL_NAME))
+ if (!flavor_ptr->known || has_flag(flavor_ptr->tr_flags, TR_FULL_NAME))
return;
if (flavor_ptr->o_ptr->art_name) {
if (!k_ptr->flavor)
continue;
- if (have_flag(k_ptr->flags, TR_FIXED_FLAVOR))
+ if (has_flag(k_ptr->flags, TR_FIXED_FLAVOR))
continue;
k_idx_list[k_idx_list_num] = i;
dd_ptr->tunnel_x = dd_ptr->tunn[j].x;
g_ptr = &player_ptr->current_floor_ptr->grid_array[dd_ptr->tunnel_y][dd_ptr->tunnel_x];
f_ptr = &f_info[g_ptr->feat];
- if (!have_flag(f_ptr->flags, FF_MOVE) || (!have_flag(f_ptr->flags, FF_WATER) && !have_flag(f_ptr->flags, FF_LAVA))) {
+ if (!has_flag(f_ptr->flags, FF_MOVE) || (!has_flag(f_ptr->flags, FF_WATER) && !has_flag(f_ptr->flags, FF_LAVA))) {
g_ptr->mimic = 0;
place_grid(player_ptr, g_ptr, GB_FLOOR);
}
bool cave_have_flag_bold(floor_type *floor_ptr, POSITION y, POSITION x, feature_flag_type f_idx)
{
- return have_flag(f_info[floor_ptr->grid_array[y][x].feat].flags, f_idx);
+ return has_flag(f_info[floor_ptr->grid_array[y][x].feat].flags, f_idx);
}
/*
/*
* Determine if a "feature" supports "los"
*/
-bool feat_supports_los(FEAT_IDX f_idx) { return have_flag(f_info[f_idx].flags, FF_LOS); }
+bool feat_supports_los(FEAT_IDX f_idx) { return has_flag(f_info[f_idx].flags, FF_LOS); }
bool cave_los_grid(grid_type *grid_ptr) { return feat_supports_los(grid_ptr->feat); }
-bool cave_have_flag_grid(grid_type *grid_ptr, int feature_flags) { return have_flag(f_info[grid_ptr->feat].flags, feature_flags); }
+bool cave_have_flag_grid(grid_type *grid_ptr, int feature_flags) { return has_flag(f_info[grid_ptr->feat].flags, feature_flags); }
/*
* Determine if a "legal" grid is a "clean" floor grid
for (POSITION x = 0; x < floor_ptr->width; x++) {
grid_type *g_ptr = &floor_ptr->grid_array[y][x];
feature_type *f_ptr = &f_info[get_feat_mimic(g_ptr)];
- if (is_mirror_grid(g_ptr) || have_flag(f_ptr->flags, FF_QUEST_ENTER) || have_flag(f_ptr->flags, FF_ENTRANCE))
+ if (is_mirror_grid(g_ptr) || has_flag(f_ptr->flags, FF_QUEST_ENTER) || has_flag(f_ptr->flags, FF_ENTRANCE))
continue;
g_ptr->info &= ~(CAVE_GLOW);
- if (!have_flag(f_ptr->flags, FF_REMEMBER)) {
+ if (!has_flag(f_ptr->flags, FF_REMEMBER)) {
g_ptr->info &= ~(CAVE_MARK);
note_spot(subject_ptr, y, x);
}
for (POSITION x = 0; x < floor_ptr->width; x++) {
grid_type *g_ptr;
g_ptr = &floor_ptr->grid_array[y][x];
- if (!have_flag(f_info[get_feat_mimic(g_ptr)].flags, FF_GLOW))
+ if (!has_flag(f_info[get_feat_mimic(g_ptr)].flags, FF_GLOW))
continue;
for (DIRECTION i = 0; i < 9; i++) {
feature_type *f_ptr = &f_info[g_ptr->feat];
bool ok = FALSE;
if (floor_mode & CFM_UP) {
- if (have_flag(f_ptr->flags, FF_LESS) && have_flag(f_ptr->flags, FF_STAIRS) && !have_flag(f_ptr->flags, FF_SPECIAL)) {
+ if (has_flag(f_ptr->flags, FF_LESS) && has_flag(f_ptr->flags, FF_STAIRS) && !has_flag(f_ptr->flags, FF_SPECIAL)) {
ok = TRUE;
if (g_ptr->special && g_ptr->special == sf_ptr->upper_floor_id) {
sx = x;
}
}
} else if (floor_mode & CFM_DOWN) {
- if (have_flag(f_ptr->flags, FF_MORE) && have_flag(f_ptr->flags, FF_STAIRS) && !have_flag(f_ptr->flags, FF_SPECIAL)) {
+ if (has_flag(f_ptr->flags, FF_MORE) && has_flag(f_ptr->flags, FF_STAIRS) && !has_flag(f_ptr->flags, FF_SPECIAL)) {
ok = TRUE;
if (g_ptr->special && g_ptr->special == sf_ptr->lower_floor_id) {
sx = x;
}
}
} else {
- if (have_flag(f_ptr->flags, FF_BLDG)) {
+ if (has_flag(f_ptr->flags, FF_BLDG)) {
ok = TRUE;
}
}
*g_ptr = &creature_ptr->current_floor_ptr->grid_array[creature_ptr->y][creature_ptr->x];
feature_type *f_ptr = &f_info[(*g_ptr)->feat];
- if ((*g_ptr)->special && !have_flag(f_ptr->flags, FF_SPECIAL) && get_sf_ptr((*g_ptr)->special))
+ if ((*g_ptr)->special && !has_flag(f_ptr->flags, FF_SPECIAL) && get_sf_ptr((*g_ptr)->special))
new_floor_id = (*g_ptr)->special;
- if (have_flag(f_ptr->flags, FF_STAIRS) && have_flag(f_ptr->flags, FF_SHAFT))
+ if (has_flag(f_ptr->flags, FF_STAIRS) && has_flag(f_ptr->flags, FF_SHAFT))
prepare_change_floor_mode(creature_ptr, CFM_SHAFT);
}
g_ptr->mimic = 0;
/* Lava terrain glows */
- if (have_flag(f_info[feat1].flags, FF_LAVA)) {
+ if (has_flag(f_info[feat1].flags, FF_LAVA)) {
if (!(d_info[floor_ptr->dungeon_idx].flags1 & DF1_DARKNESS))
g_ptr->info |= CAVE_GLOW;
}
feature_type *f_ptr = &f_info[feat1];
/* Only add river if matches lake type or if have no lake at all */
- if (!(((dd_ptr->laketype == LAKE_T_LAVA) && have_flag(f_ptr->flags, FF_LAVA))
- || ((dd_ptr->laketype == LAKE_T_WATER) && have_flag(f_ptr->flags, FF_WATER)) || !dd_ptr->laketype)) {
+ if (!(((dd_ptr->laketype == LAKE_T_LAVA) && has_flag(f_ptr->flags, FF_LAVA))
+ || ((dd_ptr->laketype == LAKE_T_WATER) && has_flag(f_ptr->flags, FF_WATER)) || !dd_ptr->laketype)) {
return;
}
}
feature_type *f_ptr;
feature_type *streamer_ptr = &f_info[feat];
- bool streamer_is_wall = have_flag(streamer_ptr->flags, FF_WALL) && !have_flag(streamer_ptr->flags, FF_PERMANENT);
- bool streamer_may_have_gold = have_flag(streamer_ptr->flags, FF_MAY_HAVE_GOLD);
+ bool streamer_is_wall = has_flag(streamer_ptr->flags, FF_WALL) && !has_flag(streamer_ptr->flags, FF_PERMANENT);
+ bool streamer_may_have_gold = has_flag(streamer_ptr->flags, FF_MAY_HAVE_GOLD);
/* Hack -- Choose starting point */
floor_type *floor_ptr = player_ptr->current_floor_ptr;
g_ptr = &floor_ptr->grid_array[ty][tx];
f_ptr = &f_info[g_ptr->feat];
- if (have_flag(f_ptr->flags, FF_MOVE) && (have_flag(f_ptr->flags, FF_WATER) || have_flag(f_ptr->flags, FF_LAVA)))
+ if (has_flag(f_ptr->flags, FF_MOVE) && (has_flag(f_ptr->flags, FF_WATER) || has_flag(f_ptr->flags, FF_LAVA)))
continue;
/* Do not convert permanent features */
- if (have_flag(f_ptr->flags, FF_PERMANENT))
+ if (has_flag(f_ptr->flags, FF_PERMANENT))
continue;
/* Only convert "granite" walls */
}
if (g_ptr->m_idx
- && !(have_flag(streamer_ptr->flags, FF_PLACE)
+ && !(has_flag(streamer_ptr->flags, FF_PLACE)
&& monster_can_cross_terrain(player_ptr, feat, &r_info[floor_ptr->m_list[g_ptr->m_idx].r_idx], 0))) {
/* Delete the monster (if any) */
delete_monster(player_ptr, ty, tx);
}
- if (g_ptr->o_idx && !have_flag(streamer_ptr->flags, FF_DROP)) {
+ if (g_ptr->o_idx && !has_flag(streamer_ptr->flags, FF_DROP)) {
OBJECT_IDX this_o_idx, next_o_idx = 0;
/* Scan all objects in the grid */
int shaft_num = 0;
feature_type *f_ptr = &f_info[feat];
floor_type *floor_ptr = owner_ptr->current_floor_ptr;
- if (have_flag(f_ptr->flags, FF_LESS)) {
+ if (has_flag(f_ptr->flags, FF_LESS)) {
if (ironman_downward || !floor_ptr->dun_level)
return TRUE;
if (floor_ptr->dun_level > d_info[floor_ptr->dungeon_idx].mindepth)
shaft_num = (randint1(num + 1)) / 2;
- } else if (have_flag(f_ptr->flags, FF_MORE)) {
+ } else if (has_flag(f_ptr->flags, FF_MORE)) {
QUEST_IDX q_idx = quest_number(owner_ptr, floor_ptr->dun_level);
if (floor_ptr->dun_level > 1 && q_idx) {
monster_race *r_ptr = &r_info[quest[q_idx].r_idx];
{
feature_type *cur_f_ptr = &f_info[creature_ptr->current_floor_ptr->grid_array[c_y][c_x].feat];
feature_type *new_f_ptr = &f_info[creature_ptr->current_floor_ptr->grid_array[n_y][n_x].feat];
- bool is_pattern_tile_cur = have_flag(cur_f_ptr->flags, FF_PATTERN);
- bool is_pattern_tile_new = have_flag(new_f_ptr->flags, FF_PATTERN);
+ bool is_pattern_tile_cur = has_flag(cur_f_ptr->flags, FF_PATTERN);
+ bool is_pattern_tile_new = has_flag(new_f_ptr->flags, FF_PATTERN);
if (!is_pattern_tile_cur && !is_pattern_tile_new)
return TRUE;
feature_type *f_ptr;
f_ptr = &f_info[get_feat_mimic(g_ptr)];
- if (!is_mirror_grid(g_ptr) && !have_flag(f_ptr->flags, FF_QUEST_ENTER) && !have_flag(f_ptr->flags, FF_ENTRANCE)) {
+ if (!is_mirror_grid(g_ptr) && !has_flag(f_ptr->flags, FF_QUEST_ENTER) && !has_flag(f_ptr->flags, FF_ENTRANCE)) {
g_ptr->info &= ~(CAVE_GLOW);
- if (!have_flag(f_ptr->flags, FF_REMEMBER))
+ if (!has_flag(f_ptr->flags, FF_REMEMBER))
g_ptr->info &= ~(CAVE_MARK);
continue;
}
- if (!have_flag(f_ptr->flags, FF_ENTRANCE))
+ if (!has_flag(f_ptr->flags, FF_ENTRANCE))
continue;
g_ptr->info |= CAVE_GLOW;
g_ptr = &floor_ptr->grid_array[y][x];
feature_type *f_ptr;
f_ptr = &f_info[g_ptr->feat];
- if (!have_flag(f_ptr->flags, FF_BLDG))
+ if (!has_flag(f_ptr->flags, FF_BLDG))
continue;
if ((f_ptr->subtype != 4) && !((creature_ptr->town_num == 1) && (f_ptr->subtype == 0)))
}
/*!
- * @brief \89B\82µ\83h\83A\82ð\94z\92u\82·\82é
- * @param player_ptr \83v\83\8c\81[\83\84\81[\82Ö\82Ì\8eQ\8fÆ\83|\83C\83\93\83^
- * @param y \94z\92u\82µ\82½\82¢\83t\83\8d\83A\82ÌY\8dÀ\95W
- * @param x \94z\92u\82µ\82½\82¢\83t\83\8d\83A\82ÌX\8dÀ\95W
- * @param type DOOR_DEFAULT / DOOR_DOOR / DOOR_GLASS_DOOR / DOOR_CURTAIN \82Ì\82¢\82¸\82ꂩ
- * @return \82È\82µ
+ * @brief �B���h�A��z�u����
+ * @param player_ptr �v���[���[�ւ̎Q�ƃ|�C���^
+ * @param y �z�u�������t���A��Y���W
+ * @param x �z�u�������t���A��X���W
+ * @param type DOOR_DEFAULT / DOOR_DOOR / DOOR_GLASS_DOOR / DOOR_CURTAIN �̂����ꂩ
+ * @return �Ȃ�
*/
void place_secret_door(player_type *player_ptr, POSITION y, POSITION x, int type)
{
if (type != DOOR_CURTAIN) {
g_ptr->mimic = feat_wall_inner;
if (feat_supports_los(g_ptr->mimic) && !feat_supports_los(g_ptr->feat)) {
- if (have_flag(f_info[g_ptr->mimic].flags, FF_MOVE) || have_flag(f_info[g_ptr->mimic].flags, FF_CAN_FLY)) {
+ if (has_flag(f_info[g_ptr->mimic].flags, FF_MOVE) || has_flag(f_info[g_ptr->mimic].flags, FF_CAN_FLY)) {
g_ptr->feat = one_in_(2) ? g_ptr->mimic : feat_ground_type[randint0(100)];
}
}
/*!
- * @brief \8c®\82Ì\82©\82©\82Á\82½\83h\83A\82ð\94z\92u\82·\82é
- * @param player_ptr \83v\83\8c\81[\83\84\81[\82Ö\82Ì\8eQ\8fÆ\83|\83C\83\93\83^
- * @param y \94z\92u\82µ\82½\82¢\83t\83\8d\83A\82ÌY\8dÀ\95W
- * @param x \94z\92u\82µ\82½\82¢\83t\83\8d\83A\82ÌX\8dÀ\95W
- * @return \82È\82µ
+ * @brief ���̂��������h�A��z�u����
+ * @param player_ptr �v���[���[�ւ̎Q�ƃ|�C���^
+ * @param y �z�u�������t���A��Y���W
+ * @param x �z�u�������t���A��X���W
+ * @return �Ȃ�
*/
void place_locked_door(player_type *player_ptr, POSITION y, POSITION x)
{
}
/*!
- * @brief \8f\8a\92è\82Ì\88Ê\92u\82É\82³\82Ü\82´\82Ü\82È\8fó\91Ô\82â\8eí\97Þ\82Ì\83h\83A\82ð\94z\92u\82·\82é / Place a random type of door at the given location
- * @param player_ptr \83v\83\8c\81[\83\84\81[\82Ö\82Ì\8eQ\8fÆ\83|\83C\83\93\83^
- * @param y \83h\83A\82Ì\94z\92u\82ð\8e\8e\82Ý\82½\82¢\83}\83X\82ÌY\8dÀ\95W
- * @param x \83h\83A\82Ì\94z\92u\82ð\8e\8e\82Ý\82½\82¢\83}\83X\82ÌX\8dÀ\95W
- * @param room \95\94\89®\82É\90Ú\82µ\82Ä\82¢\82é\8fê\8d\87\8cü\82¯\82Ì\83h\83A\90¶\90¬\82©\94Û\82©
- * @return \82È\82µ
+ * @brief ����̈ʒu�ɂ��܂��܂ȏ�Ԃ��ނ̃h�A��z�u���� / Place a random type of door at the given location
+ * @param player_ptr �v���[���[�ւ̎Q�ƃ|�C���^
+ * @param y �h�A�̔z�u�����݂����}�X��Y���W
+ * @param x �h�A�̔z�u�����݂����}�X��X���W
+ * @param room �����ɐڂ��Ă���ꍇ�����̃h�A�������ۂ�
+ * @return �Ȃ�
*/
void place_random_door(player_type *player_ptr, POSITION y, POSITION x, bool room)
{
if (type != DOOR_CURTAIN) {
g_ptr->mimic = room ? feat_wall_outer : feat_wall_type[randint0(100)];
if (feat_supports_los(g_ptr->mimic) && !feat_supports_los(g_ptr->feat)) {
- if (have_flag(f_info[g_ptr->mimic].flags, FF_MOVE) || have_flag(f_info[g_ptr->mimic].flags, FF_CAN_FLY)) {
+ if (has_flag(f_info[g_ptr->mimic].flags, FF_MOVE) || has_flag(f_info[g_ptr->mimic].flags, FF_CAN_FLY)) {
g_ptr->feat = one_in_(2) ? g_ptr->mimic : feat_ground_type[randint0(100)];
}
g_ptr->mimic = 0;
}
/*!
- * @brief \8f\8a\92è\82Ì\88Ê\92u\82É\8ae\8eí\82Ì\95Â\82¶\82½\83h\83A\82ð\94z\92u\82·\82é / Place a random type of normal door at the given location.
- * @param player_ptr \83v\83\8c\81[\83\84\81[\82Ö\82Ì\8eQ\8fÆ\83|\83C\83\93\83^
- * @param y \83h\83A\82Ì\94z\92u\82ð\8e\8e\82Ý\82½\82¢\83}\83X\82ÌY\8dÀ\95W
- * @param x \83h\83A\82Ì\94z\92u\82ð\8e\8e\82Ý\82½\82¢\83}\83X\82ÌX\8dÀ\95W
- * @param type \83h\83A\82Ì\92n\8c`ID
- * @return \82È\82µ
+ * @brief ����̈ʒu�Ɋe��̕\82����h�A��z�u���� / Place a random type of normal door at the given location.
+ * @param player_ptr �v���[���[�ւ̎Q�ƃ|�C���^
+ * @param y �h�A�̔z�u�����݂����}�X��Y���W
+ * @param x �h�A�̔z�u�����݂����}�X��X���W
+ * @param type �h�A�̒n�`ID
+ * @return �Ȃ�
*/
void place_closed_door(player_type *player_ptr, POSITION y, POSITION x, int type)
{
{
/* 関数ポインタの都合 */
(void)player_ptr;
- return have_flag(f_info[feat].flags, FF_TRAP);
+ return has_flag(f_info[feat].flags, FF_TRAP);
}
/*!
(void)player_ptr;
feature_type *f_ptr = &f_info[feat];
- return (have_flag(f_ptr->flags, FF_OPEN) || have_flag(f_ptr->flags, FF_BASH)) &&
- !have_flag(f_ptr->flags, FF_MOVE);
+ return (has_flag(f_ptr->flags, FF_OPEN) || has_flag(f_ptr->flags, FF_BASH)) &&
+ !has_flag(f_ptr->flags, FF_MOVE);
}
/*!
/*
* Determine if a "feature" is "permanent wall"
*/
-bool permanent_wall(feature_type *f_ptr) { return have_flag(f_ptr->flags, FF_WALL) && have_flag(f_ptr->flags, FF_PERMANENT); }
+bool permanent_wall(feature_type *f_ptr) { return has_flag(f_ptr->flags, FF_WALL) && has_flag(f_ptr->flags, FF_PERMANENT); }
FEAT_IDX feat_locked_door_random(int door_type)
{
if (!current_world_ptr->character_dungeon) {
g_ptr->mimic = 0;
g_ptr->feat = feat;
- if (have_flag(f_ptr->flags, FF_GLOW) && !(d_info[floor_ptr->dungeon_idx].flags1 & DF1_DARKNESS)) {
+ if (has_flag(f_ptr->flags, FF_GLOW) && !(d_info[floor_ptr->dungeon_idx].flags1 & DF1_DARKNESS)) {
for (DIRECTION i = 0; i < 9; i++) {
POSITION yy = y + ddy_ddd[i];
POSITION xx = x + ddx_ddd[i];
update_local_illumination(player_ptr, y, x);
}
- if (!have_flag(f_ptr->flags, FF_REMEMBER))
+ if (!has_flag(f_ptr->flags, FF_REMEMBER))
g_ptr->info &= ~(CAVE_MARK);
if (g_ptr->m_idx)
update_monster(player_ptr, g_ptr->m_idx, FALSE);
note_spot(player_ptr, y, x);
lite_spot(player_ptr, y, x);
- if (old_los ^ have_flag(f_ptr->flags, FF_LOS))
+ if (old_los ^ has_flag(f_ptr->flags, FF_LOS))
player_ptr->update |= PU_VIEW | PU_LITE | PU_MON_LITE | PU_MONSTERS;
- if (!have_flag(f_ptr->flags, FF_GLOW) || (d_info[player_ptr->dungeon_idx].flags1 & DF1_DARKNESS))
+ if (!has_flag(f_ptr->flags, FF_GLOW) || (d_info[player_ptr->dungeon_idx].flags1 & DF1_DARKNESS))
return;
for (DIRECTION i = 0; i < 9; i++) {
FEAT_IDX conv_dungeon_feat(floor_type *floor_ptr, FEAT_IDX newfeat)
{
feature_type *f_ptr = &f_info[newfeat];
- if (!have_flag(f_ptr->flags, FF_CONVERT))
+ if (!has_flag(f_ptr->flags, FF_CONVERT))
return newfeat;
switch (f_ptr->subtype) {
if (max_attempts > 5000) /* Rule 1 */
{
- if (!have_flag(f_ptr->flags, FF_FLOOR))
+ if (!has_flag(f_ptr->flags, FF_FLOOR))
continue;
} else /* Rule 2 */
{
- if (!have_flag(f_ptr->flags, FF_MOVE))
+ if (!has_flag(f_ptr->flags, FF_MOVE))
continue;
- if (have_flag(f_ptr->flags, FF_HIT_TRAP))
+ if (has_flag(f_ptr->flags, FF_HIT_TRAP))
continue;
}
/* Refuse to start on anti-teleport grids in dungeon */
- if (!have_flag(f_ptr->flags, FF_TELEPORTABLE))
+ if (!has_flag(f_ptr->flags, FF_TELEPORTABLE))
continue;
}
if (!player_can_enter(creature_ptr, g_ptr->feat, 0))
feature_type *f_ptr = &f_info[g_ptr->feat];
/* Hack -- Decline boundary walls with known treasure */
- if ((have_flag(f_ptr->flags, FF_HAS_GOLD) || have_flag(f_ptr->flags, FF_HAS_ITEM)) && !have_flag(f_ptr->flags, FF_SECRET))
+ if ((has_flag(f_ptr->flags, FF_HAS_GOLD) || has_flag(f_ptr->flags, FF_HAS_ITEM)) && !has_flag(f_ptr->flags, FF_SECRET))
g_ptr->feat = feat_state(player_ptr, g_ptr->feat, FF_ENSECRET);
/* Set boundary mimic */
feature_type *f_ptr = &f_info[get_feat_mimic(g_ptr)];
/* Memorize some "boring" grids */
- if (!have_flag(f_ptr->flags, FF_REMEMBER)) {
+ if (!has_flag(f_ptr->flags, FF_REMEMBER)) {
/* Option -- memorize all torch-lit floors */
if (view_torch_grids && ((g_ptr->info & (CAVE_LITE | CAVE_MNLT)) || player_ptr->see_nocto)) {
g_ptr->info |= (CAVE_MARK);
}
/* Memorize normal grids */
- else if (have_flag(f_ptr->flags, FF_LOS)) {
+ else if (has_flag(f_ptr->flags, FF_LOS)) {
g_ptr->info |= (CAVE_MARK);
}
return conv_dungeon_feat(floor_ptr, f_ptr->state[i].result);
}
- if (have_flag(f_ptr->flags, FF_PERMANENT))
+ if (has_flag(f_ptr->flags, FF_PERMANENT))
return feat;
return (feature_action_flags[action] & FAF_DESTROY) ? conv_dungeon_feat(floor_ptr, f_ptr->destroyed) : feat;
bool found = FALSE;
/* Handle gold */
- if (have_flag(old_f_ptr->flags, FF_HAS_GOLD) && !have_flag(f_ptr->flags, FF_HAS_GOLD)) {
+ if (has_flag(old_f_ptr->flags, FF_HAS_GOLD) && !has_flag(f_ptr->flags, FF_HAS_GOLD)) {
/* Place some gold */
place_gold(player_ptr, y, x);
found = TRUE;
}
/* Handle item */
- if (have_flag(old_f_ptr->flags, FF_HAS_ITEM) && !have_flag(f_ptr->flags, FF_HAS_ITEM) && (randint0(100) < (15 - floor_ptr->dun_level / 2))) {
+ if (has_flag(old_f_ptr->flags, FF_HAS_ITEM) && !has_flag(f_ptr->flags, FF_HAS_ITEM) && (randint0(100) < (15 - floor_ptr->dun_level / 2))) {
/* Place object */
place_object(player_ptr, y, x, 0L);
found = TRUE;
if (feature_action_flags[action] & FAF_CRASH_GLASS) {
feature_type *old_f_ptr = &f_info[oldfeat];
- if (have_flag(old_f_ptr->flags, FF_GLASS) && current_world_ptr->character_dungeon) {
+ if (has_flag(old_f_ptr->flags, FF_GLASS) && current_world_ptr->character_dungeon) {
project(player_ptr, PROJECT_WHO_GLASS_SHARDS, 1, y, x, MIN(floor_ptr->dun_level, 100) / 4, GF_SHARDS,
(PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_HIDE | PROJECT_JUMP | PROJECT_NO_HANGEKI), -1);
}
*/
bool is_mirror_grid(grid_type *g_ptr)
{
- if ((g_ptr->info & CAVE_OBJECT) && have_flag(f_info[g_ptr->mimic].flags, FF_MIRROR))
+ if ((g_ptr->info & CAVE_OBJECT) && has_flag(f_info[g_ptr->mimic].flags, FF_MIRROR))
return TRUE;
else
return FALSE;
*/
bool is_glyph_grid(grid_type *g_ptr)
{
- if ((g_ptr->info & CAVE_OBJECT) && have_flag(f_info[g_ptr->mimic].flags, FF_GLYPH))
+ if ((g_ptr->info & CAVE_OBJECT) && has_flag(f_info[g_ptr->mimic].flags, FF_GLYPH))
return TRUE;
else
return FALSE;
*/
bool is_explosive_rune_grid(grid_type *g_ptr)
{
- if ((g_ptr->info & CAVE_OBJECT) && have_flag(f_info[g_ptr->mimic].flags, FF_MINOR_GLYPH))
+ if ((g_ptr->info & CAVE_OBJECT) && has_flag(f_info[g_ptr->mimic].flags, FF_MINOR_GLYPH))
return TRUE;
else
return FALSE;
feature_type *f_ptr = &f_info[g_ptr->feat];
/* Require "teleportable" space */
- if (!have_flag(f_ptr->flags, FF_TELEPORTABLE))
+ if (!has_flag(f_ptr->flags, FF_TELEPORTABLE))
return FALSE;
if (g_ptr->m_idx && (g_ptr->m_idx != m_idx))
feature_type *f_ptr = &f_info[g_ptr->feat];
/* Require "teleportable" space */
- if (!have_flag(f_ptr->flags, FF_TELEPORTABLE))
+ if (!has_flag(f_ptr->flags, FF_TELEPORTABLE))
return FALSE;
/* No magical teleporting into vaults and such */
return FALSE;
/* don't teleport on a trap. */
- if (have_flag(f_ptr->flags, FF_HIT_TRAP))
+ if (has_flag(f_ptr->flags, FF_HIT_TRAP))
return FALSE;
if (!(mode & TELEPORT_PASSIVE)) {
if (!player_can_enter(player_ptr, g_ptr->feat, 0))
return FALSE;
- if (have_flag(f_ptr->flags, FF_WATER) && have_flag(f_ptr->flags, FF_DEEP)) {
+ if (has_flag(f_ptr->flags, FF_WATER) && has_flag(f_ptr->flags, FF_DEEP)) {
if (!player_ptr->levitation && !player_ptr->can_swim)
return FALSE;
}
- if (have_flag(f_ptr->flags, FF_LAVA) && !player_ptr->immune_fire && !is_invuln(player_ptr)) {
+ if (has_flag(f_ptr->flags, FF_LAVA) && !player_ptr->immune_fire && !is_invuln(player_ptr)) {
/* Always forbid deep lava */
- if (have_flag(f_ptr->flags, FF_DEEP))
+ if (has_flag(f_ptr->flags, FF_DEEP))
return FALSE;
/* Forbid shallow lava when the player don't have levitation */
* @param feat 地形ID
* @return 開いた地形である場合TRUEを返す / Return TRUE if the given feature is an open door
*/
-bool is_open(player_type *player_ptr, FEAT_IDX feat) { return have_flag(f_info[feat].flags, FF_CLOSE) && (feat != feat_state(player_ptr, feat, FF_CLOSE)); }
+bool is_open(player_type *player_ptr, FEAT_IDX feat) { return has_flag(f_info[feat].flags, FF_CLOSE) && (feat != feat_state(player_ptr, feat, FF_CLOSE)); }
/*!
* @brief プレイヤーが地形踏破可能かを返す
return monster_can_cross_terrain(
creature_ptr, feature, &r_info[creature_ptr->current_floor_ptr->m_list[creature_ptr->riding].r_idx], mode | CEM_RIDING);
- if (have_flag(f_ptr->flags, FF_PATTERN)) {
+ if (has_flag(f_ptr->flags, FF_PATTERN)) {
if (!(mode & CEM_P_CAN_ENTER_PATTERN))
return FALSE;
}
- if (have_flag(f_ptr->flags, FF_CAN_FLY) && creature_ptr->levitation)
+ if (has_flag(f_ptr->flags, FF_CAN_FLY) && creature_ptr->levitation)
return TRUE;
- if (have_flag(f_ptr->flags, FF_CAN_SWIM) && creature_ptr->can_swim)
+ if (has_flag(f_ptr->flags, FF_CAN_SWIM) && creature_ptr->can_swim)
return TRUE;
- if (have_flag(f_ptr->flags, FF_CAN_PASS) && creature_ptr->pass_wall)
+ if (has_flag(f_ptr->flags, FF_CAN_PASS) && creature_ptr->pass_wall)
return TRUE;
- if (!have_flag(f_ptr->flags, FF_MOVE))
+ if (!has_flag(f_ptr->flags, FF_MOVE))
return FALSE;
return TRUE;
return count;
}
-bool feat_uses_special(FEAT_IDX f_idx) { return have_flag(f_info[(f_idx)].flags, FF_SPECIAL); }
+bool feat_uses_special(FEAT_IDX f_idx) { return has_flag(f_info[(f_idx)].flags, FF_SPECIAL); }
feat = normal_traps[randint0(MAX_NORMAL_TRAPS)];
/* Accept non-trapdoors */
- if (!have_flag(f_info[feat].flags, FF_MORE))
+ if (!has_flag(f_info[feat].flags, FF_MORE))
break;
/* Hack -- no trap doors on special levels */
POSITION x = trapped_ptr->x, y = trapped_ptr->y;
grid_type *g_ptr = &trapped_ptr->current_floor_ptr->grid_array[y][x];
feature_type *f_ptr = &f_info[g_ptr->feat];
- int trap_feat_type = have_flag(f_ptr->flags, FF_TRAP) ? f_ptr->subtype : NOT_TRAP;
+ int trap_feat_type = has_flag(f_ptr->flags, FF_TRAP) ? f_ptr->subtype : NOT_TRAP;
concptr name = _("トラップ", "a trap");
disturb(trapped_ptr, FALSE, TRUE);
break;
}
- if (!have_flag(flgs, (long)cf))
+ if (!has_flag(flgs, (long)cf))
return;
choices[*number] = item_num;
object_flags(creature_ptr, o_ptr, flgs);
- if (!have_flag(flgs, TR_TELEPORT))
+ if (!has_flag(flgs, TR_TELEPORT))
continue;
if (o_ptr->inscription && angband_strchr(quark_str(o_ptr->inscription), '.'))
*/
static void print_im_or_res_flag(int immunity, int resistance, BIT_FLAGS *flags, FILE *fff)
{
- fputs(have_flag(flags, immunity) ? IM_FLAG_STR : (have_flag(flags, resistance) ? HAS_FLAG_STR : NO_FLAG_STR), fff);
+ fputs(has_flag(flags, immunity) ? IM_FLAG_STR : (has_flag(flags, resistance) ? HAS_FLAG_STR : NO_FLAG_STR), fff);
}
/*!
* @param fff 一時ファイルへのポインタ
* @return なし
*/
-static void print_flag(int tr, BIT_FLAGS *flags, FILE *fff) { fputs(have_flag(flags, tr) ? HAS_FLAG_STR : NO_FLAG_STR, fff); }
+static void print_flag(int tr, BIT_FLAGS *flags, FILE *fff) { fputs(has_flag(flags, tr) ? HAS_FLAG_STR : NO_FLAG_STR, fff); }
/*!
* @brief 特殊なアイテムかどうかを調べる
o_ptr->k_idx = lookup_kind(TV_SOFT_ARMOR, SV_YOIYAMI_ROBE);
if (z_older_than(10, 4, 9)) {
- if (have_flag(o_ptr->art_flags, TR_MAGIC_MASTERY)) {
+ if (has_flag(o_ptr->art_flags, TR_MAGIC_MASTERY)) {
remove_flag(o_ptr->art_flags, TR_MAGIC_MASTERY);
add_flag(o_ptr->art_flags, TR_DEC_MANA);
}
case TR_FIXED_FLAVOR:
break;
default:
- if (have_flag(from_flgs, i) && !have_flag(to_flgs, i)) {
+ if (has_flag(from_flgs, i) && !has_flag(to_flgs, i)) {
if (!(is_pval_flag(i) && (from_ptr->pval < 1)))
cand[n++] = i;
}
o_ptr->art_flags[i] |= k_ptr->flags[i];
if (k_ptr->pval)
o_ptr->pval = MAX(o_ptr->pval, randint1(k_ptr->pval));
- if (have_flag(k_ptr->flags, TR_ACTIVATE))
+ if (has_flag(k_ptr->flags, TR_ACTIVATE))
o_ptr->xtra2 = (byte)k_ptr->act_idx;
if (dd_bonus > 0) {
}
}
- if (have_flag(k_ptr->flags, TR_BLOWS)) {
+ if (has_flag(k_ptr->flags, TR_BLOWS)) {
int bmax = MIN(3, MAX(1, 40 / (o_ptr->dd * o_ptr->ds)));
o_ptr->pval = MIN(o_ptr->pval, bmax);
}
mindam = calc_expect_crit(owner_ptr, o_ptr->weight, o_ptr->to_h, mindice, owner_ptr->to_h[0], dokubari);
maxdam = calc_expect_crit(owner_ptr, o_ptr->weight, o_ptr->to_h, maxdice, owner_ptr->to_h[0], dokubari);
show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus, _("会心:", "Critical:"), TERM_L_RED);
- if ((have_flag(flgs, TR_VORPAL) || hex_spelling(owner_ptr, HEX_RUNESWORD))) {
+ if ((has_flag(flgs, TR_VORPAL) || hex_spelling(owner_ptr, HEX_RUNESWORD))) {
if ((o_ptr->name1 == ART_VORPAL_BLADE) || (o_ptr->name1 == ART_CHAINSWORD)) {
vorpal_mult = 5;
vorpal_div = 3;
show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus, _("切れ味:", "Vorpal:"), TERM_L_RED);
}
- if ((owner_ptr->pclass != CLASS_SAMURAI) && have_flag(flgs, TR_FORCE_WEAPON) && (owner_ptr->csp > (o_ptr->dd * o_ptr->ds / 5))) {
+ if ((owner_ptr->pclass != CLASS_SAMURAI) && has_flag(flgs, TR_FORCE_WEAPON) && (owner_ptr->csp > (o_ptr->dd * o_ptr->ds / 5))) {
force = TRUE;
mindam = calc_expect_dice(owner_ptr, mindice, 1, 1, force, o_ptr->weight, o_ptr->to_h, owner_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus, _("理力:", "Force :"), TERM_L_BLUE);
}
- if (have_flag(flgs, TR_KILL_ANIMAL)) {
+ if (has_flag(flgs, TR_KILL_ANIMAL)) {
mindam = calc_expect_dice(owner_ptr, mindice, 4, 1, force, o_ptr->weight, o_ptr->to_h, owner_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
maxdam = calc_expect_dice(owner_ptr, maxdice, 4, 1, force, o_ptr->weight, o_ptr->to_h, owner_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus, _("動物:", "Animals:"), TERM_YELLOW);
- } else if (have_flag(flgs, TR_SLAY_ANIMAL)) {
+ } else if (has_flag(flgs, TR_SLAY_ANIMAL)) {
mindam = calc_expect_dice(owner_ptr, mindice, 5, 2, force, o_ptr->weight, o_ptr->to_h, owner_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
maxdam = calc_expect_dice(owner_ptr, maxdice, 5, 2, force, o_ptr->weight, o_ptr->to_h, owner_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus, _("動物:", "Animals:"), TERM_YELLOW);
}
- if (have_flag(flgs, TR_KILL_EVIL)) {
+ if (has_flag(flgs, TR_KILL_EVIL)) {
mindam = calc_expect_dice(owner_ptr, mindice, 7, 2, force, o_ptr->weight, o_ptr->to_h, owner_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
maxdam = calc_expect_dice(owner_ptr, maxdice, 7, 2, force, o_ptr->weight, o_ptr->to_h, owner_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus, _("邪悪:", "Evil:"), TERM_YELLOW);
- } else if (have_flag(flgs, TR_SLAY_EVIL)) {
+ } else if (has_flag(flgs, TR_SLAY_EVIL)) {
mindam = calc_expect_dice(owner_ptr, mindice, 2, 1, force, o_ptr->weight, o_ptr->to_h, owner_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
maxdam = calc_expect_dice(owner_ptr, maxdice, 2, 1, force, o_ptr->weight, o_ptr->to_h, owner_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus, _("邪悪:", "Evil:"), TERM_YELLOW);
}
- if (have_flag(flgs, TR_KILL_HUMAN)) {
+ if (has_flag(flgs, TR_KILL_HUMAN)) {
mindam = calc_expect_dice(owner_ptr, mindice, 4, 1, force, o_ptr->weight, o_ptr->to_h, owner_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
maxdam = calc_expect_dice(owner_ptr, maxdice, 4, 1, force, o_ptr->weight, o_ptr->to_h, owner_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus, _("人間:", "Human:"), TERM_YELLOW);
- } else if (have_flag(flgs, TR_SLAY_HUMAN)) {
+ } else if (has_flag(flgs, TR_SLAY_HUMAN)) {
mindam = calc_expect_dice(owner_ptr, mindice, 5, 2, force, o_ptr->weight, o_ptr->to_h, owner_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
maxdam = calc_expect_dice(owner_ptr, maxdice, 5, 2, force, o_ptr->weight, o_ptr->to_h, owner_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus, _("人間:", "Human:"), TERM_YELLOW);
}
- if (have_flag(flgs, TR_KILL_UNDEAD)) {
+ if (has_flag(flgs, TR_KILL_UNDEAD)) {
mindam = calc_expect_dice(owner_ptr, mindice, 5, 1, force, o_ptr->weight, o_ptr->to_h, owner_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
maxdam = calc_expect_dice(owner_ptr, maxdice, 5, 1, force, o_ptr->weight, o_ptr->to_h, owner_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus, _("不死:", "Undead:"), TERM_YELLOW);
- } else if (have_flag(flgs, TR_SLAY_UNDEAD)) {
+ } else if (has_flag(flgs, TR_SLAY_UNDEAD)) {
mindam = calc_expect_dice(owner_ptr, mindice, 3, 1, force, o_ptr->weight, o_ptr->to_h, owner_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
maxdam = calc_expect_dice(owner_ptr, maxdice, 3, 1, force, o_ptr->weight, o_ptr->to_h, owner_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus, _("不死:", "Undead:"), TERM_YELLOW);
}
- if (have_flag(flgs, TR_KILL_DEMON)) {
+ if (has_flag(flgs, TR_KILL_DEMON)) {
mindam = calc_expect_dice(owner_ptr, mindice, 5, 1, force, o_ptr->weight, o_ptr->to_h, owner_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
maxdam = calc_expect_dice(owner_ptr, maxdice, 5, 1, force, o_ptr->weight, o_ptr->to_h, owner_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus, _("悪魔:", "Demons:"), TERM_YELLOW);
- } else if (have_flag(flgs, TR_SLAY_DEMON)) {
+ } else if (has_flag(flgs, TR_SLAY_DEMON)) {
mindam = calc_expect_dice(owner_ptr, mindice, 3, 1, force, o_ptr->weight, o_ptr->to_h, owner_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
maxdam = calc_expect_dice(owner_ptr, maxdice, 3, 1, force, o_ptr->weight, o_ptr->to_h, owner_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus, _("悪魔:", "Demons:"), TERM_YELLOW);
}
- if (have_flag(flgs, TR_KILL_ORC)) {
+ if (has_flag(flgs, TR_KILL_ORC)) {
mindam = calc_expect_dice(owner_ptr, mindice, 5, 1, force, o_ptr->weight, o_ptr->to_h, owner_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
maxdam = calc_expect_dice(owner_ptr, maxdice, 5, 1, force, o_ptr->weight, o_ptr->to_h, owner_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus, _("オーク:", "Orcs:"), TERM_YELLOW);
- } else if (have_flag(flgs, TR_SLAY_ORC)) {
+ } else if (has_flag(flgs, TR_SLAY_ORC)) {
mindam = calc_expect_dice(owner_ptr, mindice, 3, 1, force, o_ptr->weight, o_ptr->to_h, owner_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
maxdam = calc_expect_dice(owner_ptr, maxdice, 3, 1, force, o_ptr->weight, o_ptr->to_h, owner_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus, _("オーク:", "Orcs:"), TERM_YELLOW);
}
- if (have_flag(flgs, TR_KILL_TROLL)) {
+ if (has_flag(flgs, TR_KILL_TROLL)) {
mindam = calc_expect_dice(owner_ptr, mindice, 5, 1, force, o_ptr->weight, o_ptr->to_h, owner_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
maxdam = calc_expect_dice(owner_ptr, maxdice, 5, 1, force, o_ptr->weight, o_ptr->to_h, owner_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus, _("トロル:", "Trolls:"), TERM_YELLOW);
- } else if (have_flag(flgs, TR_SLAY_TROLL)) {
+ } else if (has_flag(flgs, TR_SLAY_TROLL)) {
mindam = calc_expect_dice(owner_ptr, mindice, 3, 1, force, o_ptr->weight, o_ptr->to_h, owner_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
maxdam = calc_expect_dice(owner_ptr, maxdice, 3, 1, force, o_ptr->weight, o_ptr->to_h, owner_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus, _("トロル:", "Trolls:"), TERM_YELLOW);
}
- if (have_flag(flgs, TR_KILL_GIANT)) {
+ if (has_flag(flgs, TR_KILL_GIANT)) {
mindam = calc_expect_dice(owner_ptr, mindice, 5, 1, force, o_ptr->weight, o_ptr->to_h, owner_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
maxdam = calc_expect_dice(owner_ptr, maxdice, 5, 1, force, o_ptr->weight, o_ptr->to_h, owner_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus, _("巨人:", "Giants:"), TERM_YELLOW);
- } else if (have_flag(flgs, TR_SLAY_GIANT)) {
+ } else if (has_flag(flgs, TR_SLAY_GIANT)) {
mindam = calc_expect_dice(owner_ptr, mindice, 3, 1, force, o_ptr->weight, o_ptr->to_h, owner_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
maxdam = calc_expect_dice(owner_ptr, maxdice, 3, 1, force, o_ptr->weight, o_ptr->to_h, owner_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus, _("巨人:", "Giants:"), TERM_YELLOW);
}
- if (have_flag(flgs, TR_KILL_DRAGON)) {
+ if (has_flag(flgs, TR_KILL_DRAGON)) {
mindam = calc_expect_dice(owner_ptr, mindice, 5, 1, force, o_ptr->weight, o_ptr->to_h, owner_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
maxdam = calc_expect_dice(owner_ptr, maxdice, 5, 1, force, o_ptr->weight, o_ptr->to_h, owner_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus, _("竜:", "Dragons:"), TERM_YELLOW);
- } else if (have_flag(flgs, TR_SLAY_DRAGON)) {
+ } else if (has_flag(flgs, TR_SLAY_DRAGON)) {
mindam = calc_expect_dice(owner_ptr, mindice, 3, 1, force, o_ptr->weight, o_ptr->to_h, owner_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
maxdam = calc_expect_dice(owner_ptr, maxdice, 3, 1, force, o_ptr->weight, o_ptr->to_h, owner_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus, _("竜:", "Dragons:"), TERM_YELLOW);
}
- if (have_flag(flgs, TR_BRAND_ACID)) {
+ if (has_flag(flgs, TR_BRAND_ACID)) {
mindam = calc_expect_dice(owner_ptr, mindice, 5, 2, force, o_ptr->weight, o_ptr->to_h, owner_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
maxdam = calc_expect_dice(owner_ptr, maxdice, 5, 2, force, o_ptr->weight, o_ptr->to_h, owner_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus, _("酸属性:", "Acid:"), TERM_RED);
}
- if (have_flag(flgs, TR_BRAND_ELEC)) {
+ if (has_flag(flgs, TR_BRAND_ELEC)) {
mindam = calc_expect_dice(owner_ptr, mindice, 5, 2, force, o_ptr->weight, o_ptr->to_h, owner_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
maxdam = calc_expect_dice(owner_ptr, maxdice, 5, 2, force, o_ptr->weight, o_ptr->to_h, owner_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus, _("電属性:", "Elec:"), TERM_RED);
}
- if (have_flag(flgs, TR_BRAND_FIRE)) {
+ if (has_flag(flgs, TR_BRAND_FIRE)) {
mindam = calc_expect_dice(owner_ptr, mindice, 5, 2, force, o_ptr->weight, o_ptr->to_h, owner_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
maxdam = calc_expect_dice(owner_ptr, maxdice, 5, 2, force, o_ptr->weight, o_ptr->to_h, owner_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus, _("炎属性:", "Fire:"), TERM_RED);
}
- if (have_flag(flgs, TR_BRAND_COLD)) {
+ if (has_flag(flgs, TR_BRAND_COLD)) {
mindam = calc_expect_dice(owner_ptr, mindice, 5, 2, force, o_ptr->weight, o_ptr->to_h, owner_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
maxdam = calc_expect_dice(owner_ptr, maxdice, 5, 2, force, o_ptr->weight, o_ptr->to_h, owner_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus, _("冷属性:", "Cold:"), TERM_RED);
}
- if (have_flag(flgs, TR_BRAND_POIS)) {
+ if (has_flag(flgs, TR_BRAND_POIS)) {
mindam = calc_expect_dice(owner_ptr, mindice, 5, 2, force, o_ptr->weight, o_ptr->to_h, owner_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
maxdam = calc_expect_dice(owner_ptr, maxdice, 5, 2, force, o_ptr->weight, o_ptr->to_h, owner_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus, _("毒属性:", "Poison:"), TERM_RED);
} ammo_creation_type;
/*!
- * @brief\81u\92e/\96î\82Ì\90»\91¢\81v\8f\88\97\9d / do_cmd_cast calls this function if the player's class is 'archer'.
+ * @brief�u�e/��̐����v���� / do_cmd_cast calls this function if the player's class is 'archer'.
* Hook to determine if an object is contertible in an arrow/bolt
- * @return \90»\91¢\82ð\8eÀ\8dÛ\82É\8ds\82Á\82½\82çTRUE\81A\83L\83\83\83\93\83Z\83\8b\82µ\82½\82çFALSE\82ð\95Ô\82·
+ * @return ���������ۂɍs������TRUE�A�L�����Z��������FALSE��Ԃ�
*/
bool create_ammo(player_type *creature_ptr)
{
char com[80];
if (creature_ptr->lev >= 20)
- sprintf(com, _("[S]\92e, [A]\96î, [B]\83N\83\8d\83X\83{\83E\82Ì\96î :", "Create [S]hots, Create [A]rrow or Create [B]olt ?"));
+ sprintf(com, _("[S]�e, [A]��, [B]�N���X�{�E�̖� :", "Create [S]hots, Create [A]rrow or Create [B]olt ?"));
else if (creature_ptr->lev >= 10)
- sprintf(com, _("[S]\92e, [A]\96î:", "Create [S]hots or Create [A]rrow ?"));
+ sprintf(com, _("[S]�e, [A]��:", "Create [S]hots or Create [A]rrow ?"));
else
- sprintf(com, _("[S]\92e:", "Create [S]hots ?"));
+ sprintf(com, _("[S]�e:", "Create [S]hots ?"));
if (cmd_limit_confused(creature_ptr) || cmd_limit_blind(creature_ptr))
return FALSE;
POSITION y = creature_ptr->y + ddy[dir];
POSITION x = creature_ptr->x + ddx[dir];
grid_type *g_ptr = &creature_ptr->current_floor_ptr->grid_array[y][x];
- if (!have_flag(f_info[get_feat_mimic(g_ptr)].flags, FF_CAN_DIG)) {
- msg_print(_("\82»\82±\82É\82Í\8aâ\90Î\82ª\82È\82¢\81B", "You need a pile of rubble."));
+ if (!has_flag(f_info[get_feat_mimic(g_ptr)].flags, FF_CAN_DIG)) {
+ msg_print(_("�����ɂ͊���Ȃ��B", "You need a pile of rubble."));
return FALSE;
}
if (!cave_have_flag_grid(g_ptr, FF_CAN_DIG) || !cave_have_flag_grid(g_ptr, FF_HURT_ROCK)) {
- msg_print(_("\8dd\82·\82¬\82Ä\95ö\82¹\82È\82©\82Á\82½\81B", "You failed to make ammo."));
+ msg_print(_("�d�����ĕ����Ȃ������B", "You failed to make ammo."));
return TRUE;
}
s16b slot = store_item_to_inventory(creature_ptr, q_ptr);
GAME_TEXT o_name[MAX_NLEN];
describe_flavor(creature_ptr, o_name, q_ptr, 0);
- msg_format(_("%s\82ð\8dì\82Á\82½\81B", "You make some ammo."), o_name);
+ msg_format(_("%s��������B", "You make some ammo."), o_name);
if (slot >= 0)
autopick_alter_item(creature_ptr, slot, FALSE);
}
case AMMO_ARROW: {
item_tester_hook = item_tester_hook_convertible;
- concptr q = _("\82Ç\82Ì\83A\83C\83e\83\80\82©\82ç\8dì\82è\82Ü\82·\82©\81H ", "Convert which item? ");
- concptr s = _("\8dÞ\97¿\82ð\8e\9d\82Á\82Ä\82¢\82È\82¢\81B", "You have no item to convert.");
+ concptr q = _("�ǂ̃A�C�e��������܂����H ", "Convert which item? ");
+ concptr s = _("�ޗ��������Ă��Ȃ��B", "You have no item to convert.");
OBJECT_IDX item;
object_type *q_ptr = choose_object(creature_ptr, &item, q, s, USE_INVEN | USE_FLOOR, 0);
if (!q_ptr)
q_ptr->discount = 99;
GAME_TEXT o_name[MAX_NLEN];
describe_flavor(creature_ptr, o_name, q_ptr, 0);
- msg_format(_("%s\82ð\8dì\82Á\82½\81B", "You make some ammo."), o_name);
+ msg_format(_("%s��������B", "You make some ammo."), o_name);
vary_item(creature_ptr, item, -1);
s16b slot = store_item_to_inventory(creature_ptr, q_ptr);
if (slot >= 0)
}
case AMMO_BOLT: {
item_tester_hook = item_tester_hook_convertible;
- concptr q = _("\82Ç\82Ì\83A\83C\83e\83\80\82©\82ç\8dì\82è\82Ü\82·\82©\81H ", "Convert which item? ");
- concptr s = _("\8dÞ\97¿\82ð\8e\9d\82Á\82Ä\82¢\82È\82¢\81B", "You have no item to convert.");
+ concptr q = _("�ǂ̃A�C�e��������܂����H ", "Convert which item? ");
+ concptr s = _("�ޗ��������Ă��Ȃ��B", "You have no item to convert.");
OBJECT_IDX item;
object_type *q_ptr = choose_object(creature_ptr, &item, q, s, (USE_INVEN | USE_FLOOR), 0);
if (!q_ptr)
q_ptr->discount = 99;
GAME_TEXT o_name[MAX_NLEN];
describe_flavor(creature_ptr, o_name, q_ptr, 0);
- msg_format(_("%s\82ð\8dì\82Á\82½\81B", "You make some ammo."), o_name);
+ msg_format(_("%s��������B", "You make some ammo."), o_name);
vary_item(creature_ptr, item, -1);
s16b slot = store_item_to_inventory(creature_ptr, q_ptr);
if (slot >= 0)
grid_type *g_ptr = &creature_ptr->current_floor_ptr->grid_array[creature_ptr->y][creature_ptr->x];
feature_type *f_ptr = &f_info[g_ptr->feat];
- if (!have_flag(f_ptr->flags, FF_PROJECT) || (!creature_ptr->levitation && have_flag(f_ptr->flags, FF_DEEP))) {
+ if (!has_flag(f_ptr->flags, FF_PROJECT) || (!creature_ptr->levitation && has_flag(f_ptr->flags, FF_DEEP))) {
msg_print(_("ここでは素早く動けない。", "You cannot run in here."));
} else {
set_action(creature_ptr, ACTION_HAYAGAKE);
#include "view/display-messages.h"
/*!
- * @brief \95\90\8aí\82Ì\8fj\95\9f\8f\88\97\9d /
+ * @brief ����̏j������ /
* Bless a weapon
- * @return \83^\81[\83\93\8fÁ\94ï\82ð\97v\82·\82é\8f\88\97\9d\82ð\8ds\82Á\82½\82È\82ç\82ÎTRUE\82ð\95Ô\82·
+ * @return �^�[�������v���鏈�����s�����Ȃ��TRUE��Ԃ�
*/
bool bless_weapon(player_type *caster_ptr)
{
item_tester_hook = object_is_weapon;
- concptr q = _("\82Ç\82Ì\83A\83C\83e\83\80\82ð\8fj\95\9f\82µ\82Ü\82·\82©\81H", "Bless which weapon? ");
- concptr s = _("\8fj\95\9f\82Å\82«\82é\95\90\8aí\82ª\82 \82è\82Ü\82¹\82ñ\81B", "You have weapon to bless.");
+ concptr q = _("�ǂ̃A�C�e�����j�����܂����H", "Bless which weapon? ");
+ concptr s = _("�j���ł��镐�킪����܂���B", "You have weapon to bless.");
OBJECT_IDX item;
object_type *o_ptr = choose_object(caster_ptr, &item, q, s, USE_EQUIP | USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT, 0);
object_flags(caster_ptr, o_ptr, flgs);
if (object_is_cursed(o_ptr)) {
- if (((o_ptr->curse_flags & TRC_HEAVY_CURSE) && (randint1(100) < 33)) || have_flag(flgs, TR_ADD_L_CURSE) || have_flag(flgs, TR_ADD_H_CURSE)
+ if (((o_ptr->curse_flags & TRC_HEAVY_CURSE) && (randint1(100) < 33)) || has_flag(flgs, TR_ADD_L_CURSE) || has_flag(flgs, TR_ADD_H_CURSE)
|| (o_ptr->curse_flags & TRC_PERMA_CURSE)) {
#ifdef JP
- msg_format("%s\82ð\95¢\82¤\8d\95\82¢\83I\81[\83\89\82Í\8fj\95\9f\82ð\92µ\82Ë\95Ô\82µ\82½\81I", o_name);
+ msg_format("%s�������I�[���͏j���˕Ԃ����I", o_name);
#else
msg_format("The black aura on %s %s disrupts the blessing!", ((item >= 0) ? "your" : "the"), o_name);
#endif
}
#ifdef JP
- msg_format("%s \82©\82ç\8e×\88«\82È\83I\81[\83\89\82ª\8fÁ\82¦\82½\81B", o_name);
+ msg_format("%s ������ȃI�[�����������B", o_name);
#else
msg_format("A malignant aura leaves %s %s.", ((item >= 0) ? "your" : "the"), o_name);
#endif
* artifact weapon they find. Ego weapons and normal weapons
* can be blessed automatically.
*/
- if (have_flag(flgs, TR_BLESSED)) {
+ if (has_flag(flgs, TR_BLESSED)) {
#ifdef JP
- msg_format("%s \82Í\8aù\82É\8fj\95\9f\82³\82ê\82Ä\82¢\82é\81B", o_name);
+ msg_format("%s �͊��ɏj������Ă���B", o_name);
#else
msg_format("%s %s %s blessed already.", ((item >= 0) ? "Your" : "The"), o_name, ((o_ptr->number > 1) ? "were" : "was"));
#endif
if (!(object_is_artifact(o_ptr) || object_is_ego(o_ptr)) || one_in_(3)) {
#ifdef JP
- msg_format("%s\82Í\8bP\82¢\82½\81I", o_name);
+ msg_format("%s�͋P�����I", o_name);
#else
msg_format("%s %s shine%s!", ((item >= 0) ? "Your" : "The"), o_name, ((o_ptr->number > 1) ? "" : "s"));
#endif
o_ptr->discount = 99;
} else {
bool dis_happened = FALSE;
- msg_print(_("\82»\82Ì\95\90\8aí\82Í\8fj\95\9f\82ð\8c\99\82Á\82Ä\82¢\82é\81I", "The weapon resists your blessing!"));
+ msg_print(_("���̕���͏j���������Ă���I", "The weapon resists your blessing!"));
/* Disenchant tohit */
if (o_ptr->to_h > 0) {
o_ptr->to_a--;
if (dis_happened) {
- msg_print(_("\8eü\88Í\82ª\96}\97f\82È\95µ\88Í\8bC\82Å\96\9e\82¿\82½...", "There is a static feeling in the air..."));
+ msg_print(_("���Í\82��}�f�È\95��Í\8bC�Å\96�����...", "There is a static feeling in the air..."));
#ifdef JP
- msg_format("%s \82Í\97ò\89»\82µ\82½\81I", o_name);
+ msg_format("%s �͗����I", o_name);
#else
msg_format("%s %s %s disenchanted!", ((item >= 0) ? "Your" : "The"), o_name, ((o_ptr->number > 1) ? "were" : "was"));
#endif
}
/* Otherwise, take the damage */
- if (have_flag(samurai_slaying_ptr->flags, TR_BRAND_FIRE)) {
+ if (has_flag(samurai_slaying_ptr->flags, TR_BRAND_FIRE)) {
if (samurai_slaying_ptr->r_ptr->flags3 & RF3_HURT_FIRE) {
if (samurai_slaying_ptr->mult < 70)
samurai_slaying_ptr->mult = 70;
}
/* Otherwise, take the damage */
- if (have_flag(samurai_slaying_ptr->flags, TR_BRAND_POIS)) {
+ if (has_flag(samurai_slaying_ptr->flags, TR_BRAND_POIS)) {
if (samurai_slaying_ptr->mult < 35)
samurai_slaying_ptr->mult = 35;
} else if (samurai_slaying_ptr->mult < 25)
}
/* Otherwise, take the damage */
- if (have_flag(samurai_slaying_ptr->flags, TR_BRAND_COLD)) {
+ if (has_flag(samurai_slaying_ptr->flags, TR_BRAND_COLD)) {
if (samurai_slaying_ptr->r_ptr->flags3 & RF3_HURT_COLD) {
if (samurai_slaying_ptr->mult < 70)
samurai_slaying_ptr->mult = 70;
}
/* Otherwise, take the damage */
- if (have_flag(samurai_slaying_ptr->flags, TR_BRAND_ELEC)) {
+ if (has_flag(samurai_slaying_ptr->flags, TR_BRAND_ELEC)) {
if (samurai_slaying_ptr->mult < 70)
samurai_slaying_ptr->mult = 70;
} else if (samurai_slaying_ptr->mult < 50)
static bool check_hp_for_feat_destruction(feature_type *f_ptr, monster_type *m_ptr)
{
- return !have_flag(f_ptr->flags, FF_GLASS) || (r_info[m_ptr->r_idx].flags2 & RF2_STUPID) || (m_ptr->hp >= MAX(m_ptr->maxhp / 3, 200));
+ return !has_flag(f_ptr->flags, FF_GLASS) || (r_info[m_ptr->r_idx].flags2 & RF2_STUPID) || (m_ptr->hp >= MAX(m_ptr->maxhp / 3, 200));
}
/*!
return TRUE;
}
- if (((r_ptr->flags2 & RF2_KILL_WALL) != 0) && (can_cross ? !have_flag(f_ptr->flags, FF_LOS) : !turn_flags_ptr->is_riding_mon)
- && have_flag(f_ptr->flags, FF_HURT_DISI) && !have_flag(f_ptr->flags, FF_PERMANENT) && check_hp_for_feat_destruction(f_ptr, m_ptr)) {
+ if (((r_ptr->flags2 & RF2_KILL_WALL) != 0) && (can_cross ? !has_flag(f_ptr->flags, FF_LOS) : !turn_flags_ptr->is_riding_mon)
+ && has_flag(f_ptr->flags, FF_HURT_DISI) && !has_flag(f_ptr->flags, FF_PERMANENT) && check_hp_for_feat_destruction(f_ptr, m_ptr)) {
turn_flags_ptr->do_move = TRUE;
if (!can_cross)
turn_flags_ptr->must_alter_to_move = TRUE;
return FALSE;
turn_flags_ptr->do_move = TRUE;
- if (((r_ptr->flags2 & RF2_PASS_WALL) != 0) && (!turn_flags_ptr->is_riding_mon || target_ptr->pass_wall) && have_flag(f_ptr->flags, FF_CAN_PASS)) {
+ if (((r_ptr->flags2 & RF2_PASS_WALL) != 0) && (!turn_flags_ptr->is_riding_mon || target_ptr->pass_wall) && has_flag(f_ptr->flags, FF_CAN_PASS)) {
turn_flags_ptr->did_pass_wall = TRUE;
}
feature_type *f_ptr;
f_ptr = &f_info[g_ptr->feat];
turn_flags_ptr->do_move = FALSE;
- if (((r_ptr->flags2 & RF2_OPEN_DOOR) == 0) || !have_flag(f_ptr->flags, FF_OPEN) || (is_pet(m_ptr) && ((target_ptr->pet_extra_flags & PF_OPEN_DOORS) == 0)))
+ if (((r_ptr->flags2 & RF2_OPEN_DOOR) == 0) || !has_flag(f_ptr->flags, FF_OPEN) || (is_pet(m_ptr) && ((target_ptr->pet_extra_flags & PF_OPEN_DOORS) == 0)))
return TRUE;
if (f_ptr->power == 0) {
static void bash_glass_door(player_type *target_ptr, turn_flags *turn_flags_ptr, monster_type *m_ptr, feature_type *f_ptr, bool may_bash)
{
monster_race *r_ptr = &r_info[m_ptr->r_idx];
- if (!may_bash || ((r_ptr->flags2 & RF2_BASH_DOOR) == 0) || !have_flag(f_ptr->flags, FF_BASH)
+ if (!may_bash || ((r_ptr->flags2 & RF2_BASH_DOOR) == 0) || !has_flag(f_ptr->flags, FF_BASH)
|| (is_pet(m_ptr) && ((target_ptr->pet_extra_flags & PF_OPEN_DOORS) == 0)))
return;
if (!check_hp_for_feat_destruction(f_ptr, m_ptr) || (randint0(m_ptr->hp / 10) <= f_ptr->power))
return;
- if (have_flag(f_ptr->flags, FF_GLASS))
+ if (has_flag(f_ptr->flags, FF_GLASS))
msg_print(_("ガラスが砕ける音がした!", "You hear glass breaking!"));
else
msg_print(_("ドアを叩き開ける音がした!", "You hear a door burst open!"));
return TRUE;
if (turn_flags_ptr->did_bash_door
- && ((randint0(100) < 50) || (feat_state(target_ptr, g_ptr->feat, FF_OPEN) == g_ptr->feat) || have_flag(f_ptr->flags, FF_GLASS))) {
+ && ((randint0(100) < 50) || (feat_state(target_ptr, g_ptr->feat, FF_OPEN) == g_ptr->feat) || has_flag(f_ptr->flags, FF_GLASS))) {
cave_alter_feat(target_ptr, ny, nx, FF_BASH);
if (!monster_is_valid(m_ptr)) {
target_ptr->update |= (PU_FLOW);
return TRUE;
if (one_in_(GRINDNOISE)) {
- if (have_flag(f_ptr->flags, FF_GLASS))
+ if (has_flag(f_ptr->flags, FF_GLASS))
msg_print(_("何かの砕ける音が聞こえる。", "There is a crashing sound."));
else
msg_print(_("ギシギシいう音が聞こえる。", "There is a grinding sound."));
turn_flags_ptr->do_turn = TRUE;
feature_type *f_ptr;
f_ptr = &f_info[g_ptr->feat];
- if (have_flag(f_ptr->flags, FF_TREE)) {
+ if (has_flag(f_ptr->flags, FF_TREE)) {
if (!(r_ptr->flags7 & RF7_CAN_FLY) && !(r_ptr->flags8 & RF8_WILD_WOOD)) {
m_ptr->energy_need += ENERGY_NEED();
}
*/
static void update_object_flags(BIT_FLAGS *flgs, BIT_FLAGS *flg2, BIT_FLAGS *flg3, BIT_FLAGS *flgr)
{
- if (have_flag(flgs, TR_SLAY_DRAGON))
+ if (has_flag(flgs, TR_SLAY_DRAGON))
*flg3 |= (RF3_DRAGON);
- if (have_flag(flgs, TR_KILL_DRAGON))
+ if (has_flag(flgs, TR_KILL_DRAGON))
*flg3 |= (RF3_DRAGON);
- if (have_flag(flgs, TR_SLAY_TROLL))
+ if (has_flag(flgs, TR_SLAY_TROLL))
*flg3 |= (RF3_TROLL);
- if (have_flag(flgs, TR_KILL_TROLL))
+ if (has_flag(flgs, TR_KILL_TROLL))
*flg3 |= (RF3_TROLL);
- if (have_flag(flgs, TR_SLAY_GIANT))
+ if (has_flag(flgs, TR_SLAY_GIANT))
*flg3 |= (RF3_GIANT);
- if (have_flag(flgs, TR_KILL_GIANT))
+ if (has_flag(flgs, TR_KILL_GIANT))
*flg3 |= (RF3_GIANT);
- if (have_flag(flgs, TR_SLAY_ORC))
+ if (has_flag(flgs, TR_SLAY_ORC))
*flg3 |= (RF3_ORC);
- if (have_flag(flgs, TR_KILL_ORC))
+ if (has_flag(flgs, TR_KILL_ORC))
*flg3 |= (RF3_ORC);
- if (have_flag(flgs, TR_SLAY_DEMON))
+ if (has_flag(flgs, TR_SLAY_DEMON))
*flg3 |= (RF3_DEMON);
- if (have_flag(flgs, TR_KILL_DEMON))
+ if (has_flag(flgs, TR_KILL_DEMON))
*flg3 |= (RF3_DEMON);
- if (have_flag(flgs, TR_SLAY_UNDEAD))
+ if (has_flag(flgs, TR_SLAY_UNDEAD))
*flg3 |= (RF3_UNDEAD);
- if (have_flag(flgs, TR_KILL_UNDEAD))
+ if (has_flag(flgs, TR_KILL_UNDEAD))
*flg3 |= (RF3_UNDEAD);
- if (have_flag(flgs, TR_SLAY_ANIMAL))
+ if (has_flag(flgs, TR_SLAY_ANIMAL))
*flg3 |= (RF3_ANIMAL);
- if (have_flag(flgs, TR_KILL_ANIMAL))
+ if (has_flag(flgs, TR_KILL_ANIMAL))
*flg3 |= (RF3_ANIMAL);
- if (have_flag(flgs, TR_SLAY_EVIL))
+ if (has_flag(flgs, TR_SLAY_EVIL))
*flg3 |= (RF3_EVIL);
- if (have_flag(flgs, TR_KILL_EVIL))
+ if (has_flag(flgs, TR_KILL_EVIL))
*flg3 |= (RF3_EVIL);
- if (have_flag(flgs, TR_SLAY_HUMAN))
+ if (has_flag(flgs, TR_SLAY_HUMAN))
*flg2 |= (RF2_HUMAN);
- if (have_flag(flgs, TR_KILL_HUMAN))
+ if (has_flag(flgs, TR_KILL_HUMAN))
*flg2 |= (RF2_HUMAN);
- if (have_flag(flgs, TR_BRAND_ACID))
+ if (has_flag(flgs, TR_BRAND_ACID))
*flgr |= (RFR_IM_ACID);
- if (have_flag(flgs, TR_BRAND_ELEC))
+ if (has_flag(flgs, TR_BRAND_ELEC))
*flgr |= (RFR_IM_ELEC);
- if (have_flag(flgs, TR_BRAND_FIRE))
+ if (has_flag(flgs, TR_BRAND_FIRE))
*flgr |= (RFR_IM_FIRE);
- if (have_flag(flgs, TR_BRAND_COLD))
+ if (has_flag(flgs, TR_BRAND_COLD))
*flgr |= (RFR_IM_COLD);
- if (have_flag(flgs, TR_BRAND_POIS))
+ if (has_flag(flgs, TR_BRAND_POIS))
*flgr |= (RFR_IM_POIS);
}
{
feature_type *f_ptr = &f_info[feat];
- if (have_flag(f_ptr->flags, FF_PATTERN)) {
+ if (has_flag(f_ptr->flags, FF_PATTERN)) {
if (!(mode & CEM_RIDING)) {
if (!(r_ptr->flags7 & RF7_CAN_FLY))
return FALSE;
}
}
- if (have_flag(f_ptr->flags, FF_CAN_FLY) && (r_ptr->flags7 & RF7_CAN_FLY))
+ if (has_flag(f_ptr->flags, FF_CAN_FLY) && (r_ptr->flags7 & RF7_CAN_FLY))
return TRUE;
- if (have_flag(f_ptr->flags, FF_CAN_SWIM) && (r_ptr->flags7 & RF7_CAN_SWIM))
+ if (has_flag(f_ptr->flags, FF_CAN_SWIM) && (r_ptr->flags7 & RF7_CAN_SWIM))
return TRUE;
- if (have_flag(f_ptr->flags, FF_CAN_PASS)) {
+ if (has_flag(f_ptr->flags, FF_CAN_PASS)) {
if ((r_ptr->flags2 & RF2_PASS_WALL) && (!(mode & CEM_RIDING) || player_ptr->pass_wall))
return TRUE;
}
- if (!have_flag(f_ptr->flags, FF_MOVE))
+ if (!has_flag(f_ptr->flags, FF_MOVE))
return FALSE;
- if (have_flag(f_ptr->flags, FF_MOUNTAIN) && (r_ptr->flags8 & RF8_WILD_MOUNTAIN))
+ if (has_flag(f_ptr->flags, FF_MOUNTAIN) && (r_ptr->flags8 & RF8_WILD_MOUNTAIN))
return TRUE;
- if (have_flag(f_ptr->flags, FF_WATER)) {
+ if (has_flag(f_ptr->flags, FF_WATER)) {
if (!(r_ptr->flags7 & RF7_AQUATIC)) {
- if (have_flag(f_ptr->flags, FF_DEEP))
+ if (has_flag(f_ptr->flags, FF_DEEP))
return FALSE;
else if (r_ptr->flags2 & RF2_AURA_FIRE)
return FALSE;
} else if (r_ptr->flags7 & RF7_AQUATIC)
return FALSE;
- if (have_flag(f_ptr->flags, FF_LAVA)) {
+ if (has_flag(f_ptr->flags, FF_LAVA)) {
if (!(r_ptr->flagsr & RFR_EFF_IM_FIRE_MASK))
return FALSE;
}
- if (have_flag(f_ptr->flags, FF_COLD_PUDDLE)) {
+ if (has_flag(f_ptr->flags, FF_COLD_PUDDLE)) {
if (!(r_ptr->flagsr & RFR_EFF_IM_COLD_MASK))
return FALSE;
}
- if (have_flag(f_ptr->flags, FF_ELEC_PUDDLE)) {
+ if (has_flag(f_ptr->flags, FF_ELEC_PUDDLE)) {
if (!(r_ptr->flagsr & RFR_EFF_IM_ELEC_MASK))
return FALSE;
}
- if (have_flag(f_ptr->flags, FF_ACID_PUDDLE)) {
+ if (has_flag(f_ptr->flags, FF_ACID_PUDDLE)) {
if (!(r_ptr->flagsr & RFR_EFF_IM_ACID_MASK))
return FALSE;
}
- if (have_flag(f_ptr->flags, FF_POISON_PUDDLE)) {
+ if (has_flag(f_ptr->flags, FF_POISON_PUDDLE)) {
if (!(r_ptr->flagsr & RFR_EFF_IM_POIS_MASK))
return FALSE;
}
monsterrace_hook_type get_monster_hook2(player_type *player_ptr, POSITION y, POSITION x)
{
feature_type *f_ptr = &f_info[player_ptr->current_floor_ptr->grid_array[y][x].feat];
- if (have_flag(f_ptr->flags, FF_WATER)) {
- if (have_flag(f_ptr->flags, FF_DEEP)) {
+ if (has_flag(f_ptr->flags, FF_WATER)) {
+ if (has_flag(f_ptr->flags, FF_DEEP)) {
return (monsterrace_hook_type)mon_hook_deep_water;
} else {
return (monsterrace_hook_type)mon_hook_shallow_water;
}
}
- if (have_flag(f_ptr->flags, FF_LAVA)) {
+ if (has_flag(f_ptr->flags, FF_LAVA)) {
return (monsterrace_hook_type)mon_hook_lava;
}
msa_ptr->x_br_lite = msa_ptr->x;
if (los(target_ptr, msa_ptr->m_ptr->fy, msa_ptr->m_ptr->fx, msa_ptr->y_br_lite, msa_ptr->x_br_lite)) {
feature_type *f_ptr = &f_info[target_ptr->current_floor_ptr->grid_array[msa_ptr->y_br_lite][msa_ptr->x_br_lite].feat];
- if (!have_flag(f_ptr->flags, FF_LOS) && have_flag(f_ptr->flags, FF_PROJECT) && one_in_(2))
+ if (!has_flag(f_ptr->flags, FF_LOS) && has_flag(f_ptr->flags, FF_PROJECT) && one_in_(2))
msa_ptr->f4 &= ~(RF4_BR_LITE);
} else if (!adjacent_grid_check(target_ptr, msa_ptr->m_ptr, &msa_ptr->y_br_lite, &msa_ptr->x_br_lite, FF_LOS, los))
msa_ptr->f4 &= ~(RF4_BR_LITE);
static void feature_projection(floor_type *floor_ptr, msa_type *msa_ptr)
{
feature_type *f_ptr = &f_info[floor_ptr->grid_array[msa_ptr->y][msa_ptr->x].feat];
- if (have_flag(f_ptr->flags, FF_PROJECT))
+ if (has_flag(f_ptr->flags, FF_PROJECT))
return;
- if ((msa_ptr->f4 & RF4_BR_DISI) && have_flag(f_ptr->flags, FF_HURT_DISI) && one_in_(2)) {
+ if ((msa_ptr->f4 & RF4_BR_DISI) && has_flag(f_ptr->flags, FF_HURT_DISI) && one_in_(2)) {
msa_ptr->do_spell = DO_SPELL_BR_DISI;
return;
}
- if ((msa_ptr->f4 & RF4_BR_LITE) && have_flag(f_ptr->flags, FF_LOS) && one_in_(2))
+ if ((msa_ptr->f4 & RF4_BR_LITE) && has_flag(f_ptr->flags, FF_LOS) && one_in_(2))
msa_ptr->do_spell = DO_SPELL_BR_LITE;
}
mimic_f_ptr = &f_info[get_feat_mimic(g_ptr)];
stop_mouth(caster_ptr);
- if (!have_flag(mimic_f_ptr->flags, FF_HURT_ROCK)) {
+ if (!has_flag(mimic_f_ptr->flags, FF_HURT_ROCK)) {
msg_print(_("この地形は食べられない。", "You cannot eat this feature."));
- } else if (have_flag(f_ptr->flags, FF_PERMANENT)) {
+ } else if (has_flag(f_ptr->flags, FF_PERMANENT)) {
msg_format(_("いてっ!この%sはあなたの歯より硬い!", "Ouch! This %s is harder than your teeth!"), f_name + mimic_f_ptr->name);
} else if (g_ptr->m_idx) {
monster_type *m_ptr = &caster_ptr->current_floor_ptr->m_list[g_ptr->m_idx];
if (!m_ptr->ml || !is_pet(m_ptr))
do_cmd_attack(caster_ptr, y, x, 0);
- } else if (have_flag(f_ptr->flags, FF_TREE)) {
+ } else if (has_flag(f_ptr->flags, FF_TREE)) {
msg_print(_("木の味は好きじゃない!", "You don't like the woody taste!"));
- } else if (have_flag(f_ptr->flags, FF_GLASS)) {
+ } else if (has_flag(f_ptr->flags, FF_GLASS)) {
msg_print(_("ガラスの味は好きじゃない!", "You don't like the glassy taste!"));
- } else if (have_flag(f_ptr->flags, FF_DOOR) || have_flag(f_ptr->flags, FF_CAN_DIG)) {
+ } else if (has_flag(f_ptr->flags, FF_DOOR) || has_flag(f_ptr->flags, FF_CAN_DIG)) {
(void)set_food(caster_ptr, caster_ptr->food + 3000);
- } else if (have_flag(f_ptr->flags, FF_MAY_HAVE_GOLD) || have_flag(f_ptr->flags, FF_HAS_GOLD)) {
+ } else if (has_flag(f_ptr->flags, FF_MAY_HAVE_GOLD) || has_flag(f_ptr->flags, FF_HAS_GOLD)) {
(void)set_food(caster_ptr, caster_ptr->food + 5000);
} else {
msg_format(_("この%sはとてもおいしい!", "This %s is very filling!"), f_name + mimic_f_ptr->name);
#include "view/display-messages.h"
/*!
- * @brief \94\93®\82É\82æ\82é\83u\83\8c\83X\82Ì\91®\90«\82ð\83A\83C\83e\83\80\82Ì\91Ï\90«\82©\82ç\91I\91ð\82µ\81A\8eÀ\8ds\82ð\8f\88\97\9d\82·\82é\81B/ Dragon breath activation
- * @details \91Î\8fÛ\82Æ\82È\82é\91Ï\90«\82Í dragonbreath_info \83e\81[\83u\83\8b\82ð\8eQ\8fÆ\82Ì\82±\82ƁB
- * @param user_ptr \83v\83\8c\81[\83\84\81[\82Ö\82Ì\8eQ\8fÆ\83|\83C\83\93\83^
- * @param o_ptr \91Î\8fÛ\82Ì\83I\83u\83W\83F\83N\83g\8d\\91¢\91Ì\83|\83C\83\93\83^
- * @return \94\93®\8eÀ\8ds\82Ì\90¥\94ñ\82ð\95Ô\82·\81B
+ * @brief �����ɂ��u���X�̑������A�C�e���̑ϐ�����I�����A���s����������B/ Dragon breath activation
+ * @details �ΏۂƂȂ�ϐ��� dragonbreath_info �e�[�u�����Q�Ƃ̂��ƁB
+ * @param user_ptr �v���[���[�ւ̎Q�ƃ|�C���^
+ * @param o_ptr �Ώۂ̃I�u�W�F�N�g�\���̃|�C���^
+ * @return �������s�̐����Ԃ��B
*/
bool activate_dragon_breath(player_type *user_ptr, object_type *o_ptr)
{
int n = 0;
concptr name[20];
for (int i = 0; dragonbreath_info[i].flag != 0; i++) {
- if (have_flag(resistance_flags, dragonbreath_info[i].flag)) {
+ if (has_flag(resistance_flags, dragonbreath_info[i].flag)) {
type[n] = dragonbreath_info[i].type;
name[n] = dragonbreath_info[i].name;
n++;
stop_hex_spell_all(user_ptr);
int t = randint0(n);
- msg_format(_("\82 \82È\82½\82Í%s\82Ì\83u\83\8c\83X\82ð\93f\82¢\82½\81B", "You breathe %s."), name[t]);
+ msg_format(_("���Ȃ���%s�̃u���X��f�����B", "You breathe %s."), name[t]);
fire_breath(user_ptr, type[t], dir, 250, 4);
return TRUE;
}
break;
case 3:
case 4:
- if (have_flag(k_ptr->flags, TR_REGEN))
+ if (has_flag(k_ptr->flags, TR_REGEN))
break;
o_ptr->name2 = EGO_RING_REGEN;
break;
case 5:
case 6:
- if (have_flag(k_ptr->flags, TR_LITE_1))
+ if (has_flag(k_ptr->flags, TR_LITE_1))
break;
o_ptr->name2 = EGO_RING_LITE;
break;
case 7:
case 8:
- if (have_flag(k_ptr->flags, TR_TELEPORT))
+ if (has_flag(k_ptr->flags, TR_TELEPORT))
break;
o_ptr->name2 = EGO_RING_TELEPORT;
break;
o_ptr->name2 = EGO_RING_SLAY;
break;
case 14:
- if ((have_flag(k_ptr->flags, TR_STR)) || o_ptr->to_h || o_ptr->to_d)
+ if ((has_flag(k_ptr->flags, TR_STR)) || o_ptr->to_h || o_ptr->to_d)
break;
o_ptr->name2 = EGO_RING_WIZARD;
break;
case 15:
- if (have_flag(k_ptr->flags, TR_ACTIVATE))
+ if (has_flag(k_ptr->flags, TR_ACTIVATE))
break;
o_ptr->name2 = EGO_RING_HERO;
break;
case 16:
- if (have_flag(k_ptr->flags, TR_ACTIVATE))
+ if (has_flag(k_ptr->flags, TR_ACTIVATE))
break;
if (tmp > 8)
o_ptr->name2 = EGO_RING_MANA_BALL;
o_ptr->name2 = EGO_RING_MAGIC_MIS;
break;
case 17:
- if (have_flag(k_ptr->flags, TR_ACTIVATE))
+ if (has_flag(k_ptr->flags, TR_ACTIVATE))
break;
- if (!(have_flag(k_ptr->flags, TR_RES_FIRE))
- && (have_flag(k_ptr->flags, TR_RES_COLD) || have_flag(k_ptr->flags, TR_RES_ELEC) || have_flag(k_ptr->flags, TR_RES_ACID)))
+ if (!(has_flag(k_ptr->flags, TR_RES_FIRE))
+ && (has_flag(k_ptr->flags, TR_RES_COLD) || has_flag(k_ptr->flags, TR_RES_ELEC) || has_flag(k_ptr->flags, TR_RES_ACID)))
break;
if (tmp > 7)
o_ptr->name2 = EGO_RING_DRAGON_F;
o_ptr->name2 = EGO_RING_FIRE_BOLT;
break;
case 18:
- if (have_flag(k_ptr->flags, TR_ACTIVATE))
+ if (has_flag(k_ptr->flags, TR_ACTIVATE))
break;
- if (!(have_flag(k_ptr->flags, TR_RES_COLD))
- && (have_flag(k_ptr->flags, TR_RES_FIRE) || have_flag(k_ptr->flags, TR_RES_ELEC) || have_flag(k_ptr->flags, TR_RES_ACID)))
+ if (!(has_flag(k_ptr->flags, TR_RES_COLD))
+ && (has_flag(k_ptr->flags, TR_RES_FIRE) || has_flag(k_ptr->flags, TR_RES_ELEC) || has_flag(k_ptr->flags, TR_RES_ACID)))
break;
if (tmp > 7)
o_ptr->name2 = EGO_RING_DRAGON_C;
o_ptr->name2 = EGO_RING_COLD_BOLT;
break;
case 19:
- if (have_flag(k_ptr->flags, TR_ACTIVATE))
+ if (has_flag(k_ptr->flags, TR_ACTIVATE))
break;
- if (!(have_flag(k_ptr->flags, TR_RES_ELEC))
- && (have_flag(k_ptr->flags, TR_RES_COLD) || have_flag(k_ptr->flags, TR_RES_FIRE) || have_flag(k_ptr->flags, TR_RES_ACID)))
+ if (!(has_flag(k_ptr->flags, TR_RES_ELEC))
+ && (has_flag(k_ptr->flags, TR_RES_COLD) || has_flag(k_ptr->flags, TR_RES_FIRE) || has_flag(k_ptr->flags, TR_RES_ACID)))
break;
if (tmp > 4)
o_ptr->name2 = EGO_RING_ELEC_BALL;
o_ptr->name2 = EGO_RING_ELEC_BOLT;
break;
case 20:
- if (have_flag(k_ptr->flags, TR_ACTIVATE))
+ if (has_flag(k_ptr->flags, TR_ACTIVATE))
break;
- if (!(have_flag(k_ptr->flags, TR_RES_ACID))
- && (have_flag(k_ptr->flags, TR_RES_COLD) || have_flag(k_ptr->flags, TR_RES_ELEC) || have_flag(k_ptr->flags, TR_RES_FIRE)))
+ if (!(has_flag(k_ptr->flags, TR_RES_ACID))
+ && (has_flag(k_ptr->flags, TR_RES_COLD) || has_flag(k_ptr->flags, TR_RES_ELEC) || has_flag(k_ptr->flags, TR_RES_FIRE)))
break;
if (tmp > 4)
o_ptr->name2 = EGO_RING_ACID_BALL;
object_kind *k_ptr = &k_info[o_ptr->k_idx];
switch (randint1(5)) {
case 1:
- if (have_flag(k_ptr->flags, TR_DRAIN_EXP))
+ if (has_flag(k_ptr->flags, TR_DRAIN_EXP))
break;
o_ptr->name2 = EGO_RING_DRAIN_EXP;
break;
o_ptr->name2 = EGO_RING_NO_MELEE;
break;
case 3:
- if (have_flag(k_ptr->flags, TR_AGGRAVATE))
+ if (has_flag(k_ptr->flags, TR_AGGRAVATE))
break;
o_ptr->name2 = EGO_RING_AGGRAVATE;
break;
case 4:
- if (have_flag(k_ptr->flags, TR_TY_CURSE))
+ if (has_flag(k_ptr->flags, TR_TY_CURSE))
break;
o_ptr->name2 = EGO_RING_TY_CURSE;
break;
switch (randint1(21)) {
case 1:
case 2:
- if (have_flag(k_ptr->flags, TR_SLOW_DIGEST))
+ if (has_flag(k_ptr->flags, TR_SLOW_DIGEST))
break;
o_ptr->name2 = EGO_AMU_SLOW_D;
break;
break;
case 5:
case 6:
- if (have_flag(k_ptr->flags, TR_SEE_INVIS))
+ if (has_flag(k_ptr->flags, TR_SEE_INVIS))
break;
o_ptr->name2 = EGO_AMU_SEE_INVIS;
break;
case 7:
case 8:
- if (have_flag(k_ptr->flags, TR_HOLD_EXP))
+ if (has_flag(k_ptr->flags, TR_HOLD_EXP))
break;
o_ptr->name2 = EGO_AMU_HOLD_EXP;
break;
case 9:
- if (have_flag(k_ptr->flags, TR_LEVITATION))
+ if (has_flag(k_ptr->flags, TR_LEVITATION))
break;
o_ptr->name2 = EGO_AMU_LEVITATION;
break;
o_ptr->name2 = EGO_AMU_AC;
break;
case 12:
- if (have_flag(k_ptr->flags, TR_RES_FIRE))
+ if (has_flag(k_ptr->flags, TR_RES_FIRE))
break;
if (m_bonus(10, level) > 8)
o_ptr->name2 = EGO_AMU_RES_FIRE_;
o_ptr->name2 = EGO_AMU_RES_FIRE;
break;
case 13:
- if (have_flag(k_ptr->flags, TR_RES_COLD))
+ if (has_flag(k_ptr->flags, TR_RES_COLD))
break;
if (m_bonus(10, level) > 8)
o_ptr->name2 = EGO_AMU_RES_COLD_;
o_ptr->name2 = EGO_AMU_RES_COLD;
break;
case 14:
- if (have_flag(k_ptr->flags, TR_RES_ELEC))
+ if (has_flag(k_ptr->flags, TR_RES_ELEC))
break;
if (m_bonus(10, level) > 8)
o_ptr->name2 = EGO_AMU_RES_ELEC_;
o_ptr->name2 = EGO_AMU_RES_ELEC;
break;
case 15:
- if (have_flag(k_ptr->flags, TR_RES_ACID))
+ if (has_flag(k_ptr->flags, TR_RES_ACID))
break;
if (m_bonus(10, level) > 8)
o_ptr->name2 = EGO_AMU_RES_ACID_;
object_kind *k_ptr = &k_info[o_ptr->k_idx];
switch (randint1(5)) {
case 1:
- if (have_flag(k_ptr->flags, TR_DRAIN_EXP))
+ if (has_flag(k_ptr->flags, TR_DRAIN_EXP))
break;
o_ptr->name2 = EGO_AMU_DRAIN_EXP;
break;
o_ptr->name2 = EGO_AMU_FOOL;
break;
case 3:
- if (have_flag(k_ptr->flags, TR_AGGRAVATE))
+ if (has_flag(k_ptr->flags, TR_AGGRAVATE))
break;
o_ptr->name2 = EGO_AMU_AGGRAVATE;
break;
case 4:
- if (have_flag(k_ptr->flags, TR_TY_CURSE))
+ if (has_flag(k_ptr->flags, TR_TY_CURSE))
break;
o_ptr->name2 = EGO_AMU_TY_CURSE;
break;
}
if (e_ptr->max_pval) {
- if ((o_ptr->name2 == EGO_HA) && (have_flag(o_ptr->art_flags, TR_BLOWS))) {
+ if ((o_ptr->name2 == EGO_HA) && (has_flag(o_ptr->art_flags, TR_BLOWS))) {
o_ptr->pval++;
if ((lev > 60) && one_in_(3) && ((o_ptr->dd * (o_ptr->ds + 1)) < 15))
o_ptr->pval++;
} else if (o_ptr->name2 == EGO_DEMON) {
- if (have_flag(o_ptr->art_flags, TR_BLOWS)) {
+ if (has_flag(o_ptr->art_flags, TR_BLOWS)) {
o_ptr->pval += randint1(2);
} else {
o_ptr->pval += randint1(e_ptr->max_pval);
describe_flavor(owner_ptr, o_name, o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
/* Extra, biased saving throw for blessed items */
- if (have_flag(oflgs, TR_BLESSED)) {
+ if (has_flag(oflgs, TR_BLESSED)) {
#ifdef JP
msg_format("祝福された%sは呪いを跳ね返した!", o_name);
#else
return FALSE;
object_flags(player_ptr, o_ptr, flags);
- if (have_flag(flags, TR_ACTIVATE))
+ if (has_flag(flags, TR_ACTIVATE))
return TRUE;
return FALSE;
for (i = INVEN_RARM; i < INVEN_TOTAL; i++) {
if (&player_ptr->inventory_list[i] == o_ptr) {
object_flags(player_ptr, o_ptr, flags);
- if (have_flag(flags, TR_ACTIVATE))
+ if (has_flag(flags, TR_ACTIVATE))
return TRUE;
}
}
BIT_FLAGS flgs[TR_FLAG_SIZE];
object_flags_known(player_ptr, o_ptr, flgs);
- if (!have_flag(flgs, TR_BLESSED) && !(o_ptr->tval == TV_HAFTED))
+ if (!has_flag(flgs, TR_BLESSED) && !(o_ptr->tval == TV_HAFTED))
return FALSE;
break;
}
object_flags_known(player_ptr, o_ptr, flgs);
/* Is it known to be suitable to using while riding? */
- if (!(have_flag(flgs, TR_RIDING)))
+ if (!(has_flag(flgs, TR_RIDING)))
return FALSE;
break;
BIT_FLAGS flgs[TR_FLAG_SIZE];
if (!hates_acid(o_ptr)) return FALSE;
object_flags(owner_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_IGNORE_ACID)) return FALSE;
+ if (has_flag(flgs, TR_IGNORE_ACID)) return FALSE;
return TRUE;
}
BIT_FLAGS flgs[TR_FLAG_SIZE];
if (!hates_elec(o_ptr)) return FALSE;
object_flags(owner_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_IGNORE_ELEC)) return FALSE;
+ if (has_flag(flgs, TR_IGNORE_ELEC)) return FALSE;
return TRUE;
}
BIT_FLAGS flgs[TR_FLAG_SIZE];
if (!hates_fire(o_ptr)) return FALSE;
object_flags(owner_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_IGNORE_FIRE)) return FALSE;
+ if (has_flag(flgs, TR_IGNORE_FIRE)) return FALSE;
return TRUE;
}
BIT_FLAGS flgs[TR_FLAG_SIZE];
if (!hates_cold(o_ptr)) return FALSE;
object_flags(owner_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_IGNORE_COLD)) return FALSE;
+ if (has_flag(flgs, TR_IGNORE_COLD)) return FALSE;
return TRUE;
}
strcpy(desc, _("", "breath "));
for (int i = 0; dragonbreath_info[i].flag != 0; i++) {
- if (have_flag(flgs, dragonbreath_info[i].flag)) {
+ if (has_flag(flgs, dragonbreath_info[i].flag)) {
if (n > 0)
strcat(desc, _("、", ", "));
{
BIT_FLAGS flgs[TR_FLAG_SIZE];
object_flags(owner_ptr, o_ptr, flgs);
- if (!(have_flag(flgs, TR_ACTIVATE)))
+ if (!(has_flag(flgs, TR_ACTIVATE)))
return (_("なし", "nothing"));
if (activation_index(owner_ptr, o_ptr)) {
/*
* Calucurate values of remaining flags
*/
- if (have_flag(flgs, TR_STR))
+ if (has_flag(flgs, TR_STR))
total += (1500 * plusses);
- if (have_flag(flgs, TR_INT))
+ if (has_flag(flgs, TR_INT))
total += (1500 * plusses);
- if (have_flag(flgs, TR_WIS))
+ if (has_flag(flgs, TR_WIS))
total += (1500 * plusses);
- if (have_flag(flgs, TR_DEX))
+ if (has_flag(flgs, TR_DEX))
total += (1500 * plusses);
- if (have_flag(flgs, TR_CON))
+ if (has_flag(flgs, TR_CON))
total += (1500 * plusses);
- if (have_flag(flgs, TR_CHR))
+ if (has_flag(flgs, TR_CHR))
total += (750 * plusses);
- if (have_flag(flgs, TR_MAGIC_MASTERY))
+ if (has_flag(flgs, TR_MAGIC_MASTERY))
total += (600 * plusses);
- if (have_flag(flgs, TR_STEALTH))
+ if (has_flag(flgs, TR_STEALTH))
total += (250 * plusses);
- if (have_flag(flgs, TR_SEARCH))
+ if (has_flag(flgs, TR_SEARCH))
total += (100 * plusses);
- if (have_flag(flgs, TR_INFRA))
+ if (has_flag(flgs, TR_INFRA))
total += (150 * plusses);
- if (have_flag(flgs, TR_TUNNEL))
+ if (has_flag(flgs, TR_TUNNEL))
total += (175 * plusses);
- if ((have_flag(flgs, TR_SPEED)) && (plusses > 0))
+ if ((has_flag(flgs, TR_SPEED)) && (plusses > 0))
total += (10000 + (2500 * plusses));
- if ((have_flag(flgs, TR_BLOWS)) && (plusses > 0))
+ if ((has_flag(flgs, TR_BLOWS)) && (plusses > 0))
total += (10000 + (2500 * plusses));
PRICE tmp_cost = 0;
int count = 0;
- if (have_flag(flgs, TR_CHAOTIC)) {
+ if (has_flag(flgs, TR_CHAOTIC)) {
total += 5000;
count++;
}
- if (have_flag(flgs, TR_VAMPIRIC)) {
+ if (has_flag(flgs, TR_VAMPIRIC)) {
total += 6500;
count++;
}
- if (have_flag(flgs, TR_FORCE_WEAPON)) {
+ if (has_flag(flgs, TR_FORCE_WEAPON)) {
tmp_cost += 2500;
count++;
}
- if (have_flag(flgs, TR_KILL_ANIMAL)) {
+ if (has_flag(flgs, TR_KILL_ANIMAL)) {
tmp_cost += 2800;
count++;
- } else if (have_flag(flgs, TR_SLAY_ANIMAL)) {
+ } else if (has_flag(flgs, TR_SLAY_ANIMAL)) {
tmp_cost += 1800;
count++;
}
- if (have_flag(flgs, TR_KILL_EVIL)) {
+ if (has_flag(flgs, TR_KILL_EVIL)) {
tmp_cost += 3300;
count++;
- } else if (have_flag(flgs, TR_SLAY_EVIL)) {
+ } else if (has_flag(flgs, TR_SLAY_EVIL)) {
tmp_cost += 2300;
count++;
}
- if (have_flag(flgs, TR_KILL_HUMAN)) {
+ if (has_flag(flgs, TR_KILL_HUMAN)) {
tmp_cost += 2800;
count++;
- } else if (have_flag(flgs, TR_SLAY_HUMAN)) {
+ } else if (has_flag(flgs, TR_SLAY_HUMAN)) {
tmp_cost += 1800;
count++;
}
- if (have_flag(flgs, TR_KILL_UNDEAD)) {
+ if (has_flag(flgs, TR_KILL_UNDEAD)) {
tmp_cost += 2800;
count++;
- } else if (have_flag(flgs, TR_SLAY_UNDEAD)) {
+ } else if (has_flag(flgs, TR_SLAY_UNDEAD)) {
tmp_cost += 1800;
count++;
}
- if (have_flag(flgs, TR_KILL_DEMON)) {
+ if (has_flag(flgs, TR_KILL_DEMON)) {
tmp_cost += 2800;
count++;
- } else if (have_flag(flgs, TR_SLAY_DEMON)) {
+ } else if (has_flag(flgs, TR_SLAY_DEMON)) {
tmp_cost += 1800;
count++;
}
- if (have_flag(flgs, TR_KILL_ORC)) {
+ if (has_flag(flgs, TR_KILL_ORC)) {
tmp_cost += 2500;
count++;
- } else if (have_flag(flgs, TR_SLAY_ORC)) {
+ } else if (has_flag(flgs, TR_SLAY_ORC)) {
tmp_cost += 1500;
count++;
}
- if (have_flag(flgs, TR_KILL_TROLL)) {
+ if (has_flag(flgs, TR_KILL_TROLL)) {
tmp_cost += 2800;
count++;
- } else if (have_flag(flgs, TR_SLAY_TROLL)) {
+ } else if (has_flag(flgs, TR_SLAY_TROLL)) {
tmp_cost += 1800;
count++;
}
- if (have_flag(flgs, TR_KILL_GIANT)) {
+ if (has_flag(flgs, TR_KILL_GIANT)) {
tmp_cost += 2800;
count++;
- } else if (have_flag(flgs, TR_SLAY_GIANT)) {
+ } else if (has_flag(flgs, TR_SLAY_GIANT)) {
tmp_cost += 1800;
count++;
}
- if (have_flag(flgs, TR_KILL_DRAGON)) {
+ if (has_flag(flgs, TR_KILL_DRAGON)) {
tmp_cost += 2800;
count++;
- } else if (have_flag(flgs, TR_SLAY_DRAGON)) {
+ } else if (has_flag(flgs, TR_SLAY_DRAGON)) {
tmp_cost += 1800;
count++;
}
- if (have_flag(flgs, TR_VORPAL)) {
+ if (has_flag(flgs, TR_VORPAL)) {
tmp_cost += 2500;
count++;
}
- if (have_flag(flgs, TR_IMPACT)) {
+ if (has_flag(flgs, TR_IMPACT)) {
tmp_cost += 2500;
count++;
}
- if (have_flag(flgs, TR_BRAND_POIS)) {
+ if (has_flag(flgs, TR_BRAND_POIS)) {
tmp_cost += 3800;
count++;
}
- if (have_flag(flgs, TR_BRAND_ACID)) {
+ if (has_flag(flgs, TR_BRAND_ACID)) {
tmp_cost += 3800;
count++;
}
- if (have_flag(flgs, TR_BRAND_ELEC)) {
+ if (has_flag(flgs, TR_BRAND_ELEC)) {
tmp_cost += 3800;
count++;
}
- if (have_flag(flgs, TR_BRAND_FIRE)) {
+ if (has_flag(flgs, TR_BRAND_FIRE)) {
tmp_cost += 2500;
count++;
}
- if (have_flag(flgs, TR_BRAND_COLD)) {
+ if (has_flag(flgs, TR_BRAND_COLD)) {
tmp_cost += 2500;
count++;
}
total += (tmp_cost * count);
- if (have_flag(flgs, TR_SUST_STR))
+ if (has_flag(flgs, TR_SUST_STR))
total += 850;
- if (have_flag(flgs, TR_SUST_INT))
+ if (has_flag(flgs, TR_SUST_INT))
total += 850;
- if (have_flag(flgs, TR_SUST_WIS))
+ if (has_flag(flgs, TR_SUST_WIS))
total += 850;
- if (have_flag(flgs, TR_SUST_DEX))
+ if (has_flag(flgs, TR_SUST_DEX))
total += 850;
- if (have_flag(flgs, TR_SUST_CON))
+ if (has_flag(flgs, TR_SUST_CON))
total += 850;
- if (have_flag(flgs, TR_SUST_CHR))
+ if (has_flag(flgs, TR_SUST_CHR))
total += 250;
- if (have_flag(flgs, TR_RIDING))
+ if (has_flag(flgs, TR_RIDING))
total += 0;
- if (have_flag(flgs, TR_EASY_SPELL))
+ if (has_flag(flgs, TR_EASY_SPELL))
total += 1500;
- if (have_flag(flgs, TR_THROW))
+ if (has_flag(flgs, TR_THROW))
total += 5000;
- if (have_flag(flgs, TR_FREE_ACT))
+ if (has_flag(flgs, TR_FREE_ACT))
total += 4500;
- if (have_flag(flgs, TR_HOLD_EXP))
+ if (has_flag(flgs, TR_HOLD_EXP))
total += 8500;
tmp_cost = 0;
count = 0;
- if (have_flag(flgs, TR_IM_ACID)) {
+ if (has_flag(flgs, TR_IM_ACID)) {
tmp_cost += 15000;
count += 2;
}
- if (have_flag(flgs, TR_IM_ELEC)) {
+ if (has_flag(flgs, TR_IM_ELEC)) {
tmp_cost += 15000;
count += 2;
}
- if (have_flag(flgs, TR_IM_FIRE)) {
+ if (has_flag(flgs, TR_IM_FIRE)) {
tmp_cost += 15000;
count += 2;
}
- if (have_flag(flgs, TR_IM_COLD)) {
+ if (has_flag(flgs, TR_IM_COLD)) {
tmp_cost += 15000;
count += 2;
}
- if (have_flag(flgs, TR_REFLECT)) {
+ if (has_flag(flgs, TR_REFLECT)) {
tmp_cost += 5000;
count += 2;
}
- if (have_flag(flgs, TR_RES_ACID)) {
+ if (has_flag(flgs, TR_RES_ACID)) {
tmp_cost += 500;
count++;
}
- if (have_flag(flgs, TR_RES_ELEC)) {
+ if (has_flag(flgs, TR_RES_ELEC)) {
tmp_cost += 500;
count++;
}
- if (have_flag(flgs, TR_RES_FIRE)) {
+ if (has_flag(flgs, TR_RES_FIRE)) {
tmp_cost += 500;
count++;
}
- if (have_flag(flgs, TR_RES_COLD)) {
+ if (has_flag(flgs, TR_RES_COLD)) {
tmp_cost += 500;
count++;
}
- if (have_flag(flgs, TR_RES_POIS)) {
+ if (has_flag(flgs, TR_RES_POIS)) {
tmp_cost += 1000;
count += 2;
}
- if (have_flag(flgs, TR_RES_FEAR)) {
+ if (has_flag(flgs, TR_RES_FEAR)) {
tmp_cost += 1000;
count += 2;
}
- if (have_flag(flgs, TR_RES_LITE)) {
+ if (has_flag(flgs, TR_RES_LITE)) {
tmp_cost += 800;
count += 2;
}
- if (have_flag(flgs, TR_RES_DARK)) {
+ if (has_flag(flgs, TR_RES_DARK)) {
tmp_cost += 800;
count += 2;
}
- if (have_flag(flgs, TR_RES_BLIND)) {
+ if (has_flag(flgs, TR_RES_BLIND)) {
tmp_cost += 900;
count += 2;
}
- if (have_flag(flgs, TR_RES_CONF)) {
+ if (has_flag(flgs, TR_RES_CONF)) {
tmp_cost += 900;
count += 2;
}
- if (have_flag(flgs, TR_RES_SOUND)) {
+ if (has_flag(flgs, TR_RES_SOUND)) {
tmp_cost += 900;
count += 2;
}
- if (have_flag(flgs, TR_RES_SHARDS)) {
+ if (has_flag(flgs, TR_RES_SHARDS)) {
tmp_cost += 900;
count += 2;
}
- if (have_flag(flgs, TR_RES_NETHER)) {
+ if (has_flag(flgs, TR_RES_NETHER)) {
tmp_cost += 900;
count += 2;
}
- if (have_flag(flgs, TR_RES_NEXUS)) {
+ if (has_flag(flgs, TR_RES_NEXUS)) {
tmp_cost += 900;
count += 2;
}
- if (have_flag(flgs, TR_RES_CHAOS)) {
+ if (has_flag(flgs, TR_RES_CHAOS)) {
tmp_cost += 1000;
count += 2;
}
- if (have_flag(flgs, TR_RES_DISEN)) {
+ if (has_flag(flgs, TR_RES_DISEN)) {
tmp_cost += 2000;
count += 2;
}
total += (tmp_cost * count);
- if (have_flag(flgs, TR_SH_FIRE))
+ if (has_flag(flgs, TR_SH_FIRE))
total += 5000;
- if (have_flag(flgs, TR_SH_ELEC))
+ if (has_flag(flgs, TR_SH_ELEC))
total += 5000;
- if (have_flag(flgs, TR_SH_COLD))
+ if (has_flag(flgs, TR_SH_COLD))
total += 5000;
- if (have_flag(flgs, TR_NO_TELE))
+ if (has_flag(flgs, TR_NO_TELE))
total -= 10000;
- if (have_flag(flgs, TR_NO_MAGIC))
+ if (has_flag(flgs, TR_NO_MAGIC))
total += 2500;
- if (have_flag(flgs, TR_TY_CURSE))
+ if (has_flag(flgs, TR_TY_CURSE))
total -= 15000;
- if (have_flag(flgs, TR_HIDE_TYPE))
+ if (has_flag(flgs, TR_HIDE_TYPE))
total += 0;
- if (have_flag(flgs, TR_SHOW_MODS))
+ if (has_flag(flgs, TR_SHOW_MODS))
total += 0;
- if (have_flag(flgs, TR_LEVITATION))
+ if (has_flag(flgs, TR_LEVITATION))
total += 1250;
- if (have_flag(flgs, TR_LITE_1))
+ if (has_flag(flgs, TR_LITE_1))
total += 1500;
- if (have_flag(flgs, TR_LITE_2))
+ if (has_flag(flgs, TR_LITE_2))
total += 2500;
- if (have_flag(flgs, TR_LITE_3))
+ if (has_flag(flgs, TR_LITE_3))
total += 4000;
- if (have_flag(flgs, TR_LITE_M1))
+ if (has_flag(flgs, TR_LITE_M1))
total -= 1500;
- if (have_flag(flgs, TR_LITE_M2))
+ if (has_flag(flgs, TR_LITE_M2))
total -= 2500;
- if (have_flag(flgs, TR_LITE_M3))
+ if (has_flag(flgs, TR_LITE_M3))
total -= 4000;
- if (have_flag(flgs, TR_SEE_INVIS))
+ if (has_flag(flgs, TR_SEE_INVIS))
total += 2000;
- if (have_flag(flgs, TR_TELEPATHY))
+ if (has_flag(flgs, TR_TELEPATHY))
total += 20000;
- if (have_flag(flgs, TR_ESP_ANIMAL))
+ if (has_flag(flgs, TR_ESP_ANIMAL))
total += 1000;
- if (have_flag(flgs, TR_ESP_UNDEAD))
+ if (has_flag(flgs, TR_ESP_UNDEAD))
total += 1000;
- if (have_flag(flgs, TR_ESP_DEMON))
+ if (has_flag(flgs, TR_ESP_DEMON))
total += 1000;
- if (have_flag(flgs, TR_ESP_ORC))
+ if (has_flag(flgs, TR_ESP_ORC))
total += 1000;
- if (have_flag(flgs, TR_ESP_TROLL))
+ if (has_flag(flgs, TR_ESP_TROLL))
total += 1000;
- if (have_flag(flgs, TR_ESP_GIANT))
+ if (has_flag(flgs, TR_ESP_GIANT))
total += 1000;
- if (have_flag(flgs, TR_ESP_DRAGON))
+ if (has_flag(flgs, TR_ESP_DRAGON))
total += 1000;
- if (have_flag(flgs, TR_ESP_HUMAN))
+ if (has_flag(flgs, TR_ESP_HUMAN))
total += 1000;
- if (have_flag(flgs, TR_ESP_EVIL))
+ if (has_flag(flgs, TR_ESP_EVIL))
total += 15000;
- if (have_flag(flgs, TR_ESP_GOOD))
+ if (has_flag(flgs, TR_ESP_GOOD))
total += 2000;
- if (have_flag(flgs, TR_ESP_NONLIVING))
+ if (has_flag(flgs, TR_ESP_NONLIVING))
total += 2000;
- if (have_flag(flgs, TR_ESP_UNIQUE))
+ if (has_flag(flgs, TR_ESP_UNIQUE))
total += 10000;
- if (have_flag(flgs, TR_SLOW_DIGEST))
+ if (has_flag(flgs, TR_SLOW_DIGEST))
total += 750;
- if (have_flag(flgs, TR_REGEN))
+ if (has_flag(flgs, TR_REGEN))
total += 2500;
- if (have_flag(flgs, TR_WARNING))
+ if (has_flag(flgs, TR_WARNING))
total += 2000;
- if (have_flag(flgs, TR_DEC_MANA))
+ if (has_flag(flgs, TR_DEC_MANA))
total += 10000;
- if (have_flag(flgs, TR_XTRA_MIGHT))
+ if (has_flag(flgs, TR_XTRA_MIGHT))
total += 2250;
- if (have_flag(flgs, TR_XTRA_SHOTS))
+ if (has_flag(flgs, TR_XTRA_SHOTS))
total += 10000;
- if (have_flag(flgs, TR_IGNORE_ACID))
+ if (has_flag(flgs, TR_IGNORE_ACID))
total += 100;
- if (have_flag(flgs, TR_IGNORE_ELEC))
+ if (has_flag(flgs, TR_IGNORE_ELEC))
total += 100;
- if (have_flag(flgs, TR_IGNORE_FIRE))
+ if (has_flag(flgs, TR_IGNORE_FIRE))
total += 100;
- if (have_flag(flgs, TR_IGNORE_COLD))
+ if (has_flag(flgs, TR_IGNORE_COLD))
total += 100;
- if (have_flag(flgs, TR_ACTIVATE))
+ if (has_flag(flgs, TR_ACTIVATE))
total += 100;
- if (have_flag(flgs, TR_DRAIN_EXP))
+ if (has_flag(flgs, TR_DRAIN_EXP))
total -= 12500;
- if (have_flag(flgs, TR_DRAIN_HP))
+ if (has_flag(flgs, TR_DRAIN_HP))
total -= 12500;
- if (have_flag(flgs, TR_DRAIN_MANA))
+ if (has_flag(flgs, TR_DRAIN_MANA))
total -= 12500;
- if (have_flag(flgs, TR_CALL_ANIMAL))
+ if (has_flag(flgs, TR_CALL_ANIMAL))
total -= 12500;
- if (have_flag(flgs, TR_CALL_DEMON))
+ if (has_flag(flgs, TR_CALL_DEMON))
total -= 10000;
- if (have_flag(flgs, TR_CALL_DRAGON))
+ if (has_flag(flgs, TR_CALL_DRAGON))
total -= 10000;
- if (have_flag(flgs, TR_CALL_UNDEAD))
+ if (has_flag(flgs, TR_CALL_UNDEAD))
total -= 10000;
- if (have_flag(flgs, TR_COWARDICE))
+ if (has_flag(flgs, TR_COWARDICE))
total -= 5000;
- if (have_flag(flgs, TR_LOW_MELEE))
+ if (has_flag(flgs, TR_LOW_MELEE))
total -= 5000;
- if (have_flag(flgs, TR_LOW_AC))
+ if (has_flag(flgs, TR_LOW_AC))
total -= 5000;
- if (have_flag(flgs, TR_LOW_MAGIC))
+ if (has_flag(flgs, TR_LOW_MAGIC))
total -= 15000;
- if (have_flag(flgs, TR_FAST_DIGEST))
+ if (has_flag(flgs, TR_FAST_DIGEST))
total -= 10000;
- if (have_flag(flgs, TR_SLOW_REGEN))
+ if (has_flag(flgs, TR_SLOW_REGEN))
total -= 10000;
- if (have_flag(flgs, TR_TELEPORT)) {
+ if (has_flag(flgs, TR_TELEPORT)) {
if (object_is_cursed(o_ptr))
total -= 7500;
else
total += 250;
}
- if (have_flag(flgs, TR_AGGRAVATE))
+ if (has_flag(flgs, TR_AGGRAVATE))
total -= 10000;
- if (have_flag(flgs, TR_BLESSED))
+ if (has_flag(flgs, TR_BLESSED))
total += 750;
if (o_ptr->curse_flags & TR_ADD_L_CURSE)
total -= 5000;
total -= 15000;
/* Also, give some extra for activatable powers... */
- if (o_ptr->art_name && (have_flag(o_ptr->art_flags, TR_ACTIVATE))) {
+ if (o_ptr->art_name && (has_flag(o_ptr->art_flags, TR_ACTIVATE))) {
const activation_type *const act_ptr = find_activation_info(player_ptr, o_ptr);
if (act_ptr) {
total += act_ptr->value;
if (o_ptr->pval < 0)
return (0L);
- if (have_flag(flgs, TR_STR))
+ if (has_flag(flgs, TR_STR))
value += (o_ptr->pval * 200L);
- if (have_flag(flgs, TR_INT))
+ if (has_flag(flgs, TR_INT))
value += (o_ptr->pval * 200L);
- if (have_flag(flgs, TR_WIS))
+ if (has_flag(flgs, TR_WIS))
value += (o_ptr->pval * 200L);
- if (have_flag(flgs, TR_DEX))
+ if (has_flag(flgs, TR_DEX))
value += (o_ptr->pval * 200L);
- if (have_flag(flgs, TR_CON))
+ if (has_flag(flgs, TR_CON))
value += (o_ptr->pval * 200L);
- if (have_flag(flgs, TR_CHR))
+ if (has_flag(flgs, TR_CHR))
value += (o_ptr->pval * 200L);
- if (have_flag(flgs, TR_MAGIC_MASTERY))
+ if (has_flag(flgs, TR_MAGIC_MASTERY))
value += (o_ptr->pval * 100);
- if (have_flag(flgs, TR_STEALTH))
+ if (has_flag(flgs, TR_STEALTH))
value += (o_ptr->pval * 100L);
- if (have_flag(flgs, TR_SEARCH))
+ if (has_flag(flgs, TR_SEARCH))
value += (o_ptr->pval * 100L);
- if (have_flag(flgs, TR_INFRA))
+ if (has_flag(flgs, TR_INFRA))
value += (o_ptr->pval * 50L);
- if (have_flag(flgs, TR_TUNNEL))
+ if (has_flag(flgs, TR_TUNNEL))
value += (o_ptr->pval * 50L);
- if (have_flag(flgs, TR_BLOWS))
+ if (has_flag(flgs, TR_BLOWS))
value += (o_ptr->pval * 5000L);
- if (have_flag(flgs, TR_SPEED))
+ if (has_flag(flgs, TR_SPEED))
value += (o_ptr->pval * 10000L);
break;
}
object_type *o_ptr = &creature_ptr->inventory_list[i];
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_WARNING)) {
+ if (has_flag(flgs, TR_WARNING)) {
choices[number] = i;
number++;
}
trivial_info = i;
}
- if (have_flag(flgs, TR_ACTIVATE)) {
+ if (has_flag(flgs, TR_ACTIVATE)) {
info[i++] = _("始動したときの効果...", "It can be activated for...");
info[i++] = activation_explanation(player_ptr, o_ptr);
info[i++] = _("...ただし装備していなければならない。", "...if it is being worn.");
info[i++] = _("それは二刀流での命中率を向上させる。", "It affects your ability to hit when you are wielding two weapons.");
}
- if (have_flag(flgs, TR_EASY_SPELL)) {
+ if (has_flag(flgs, TR_EASY_SPELL)) {
info[i++] = _("それは魔法の難易度を下げる。", "It affects your ability to cast spells.");
}
info[i++] = _("それは全く光らない。", "It provides no light.");
POSITION rad = 0;
- if (have_flag(flgs, TR_LITE_1) && o_ptr->name2 != EGO_LITE_DARKNESS)
+ if (has_flag(flgs, TR_LITE_1) && o_ptr->name2 != EGO_LITE_DARKNESS)
rad += 1;
- if (have_flag(flgs, TR_LITE_2) && o_ptr->name2 != EGO_LITE_DARKNESS)
+ if (has_flag(flgs, TR_LITE_2) && o_ptr->name2 != EGO_LITE_DARKNESS)
rad += 2;
- if (have_flag(flgs, TR_LITE_3) && o_ptr->name2 != EGO_LITE_DARKNESS)
+ if (has_flag(flgs, TR_LITE_3) && o_ptr->name2 != EGO_LITE_DARKNESS)
rad += 3;
- if (have_flag(flgs, TR_LITE_M1))
+ if (has_flag(flgs, TR_LITE_M1))
rad -= 1;
- if (have_flag(flgs, TR_LITE_M2))
+ if (has_flag(flgs, TR_LITE_M2))
rad -= 2;
- if (have_flag(flgs, TR_LITE_M3))
+ if (has_flag(flgs, TR_LITE_M3))
rad -= 3;
if (o_ptr->name2 == EGO_LITE_SHINE)
rad++;
- if (have_flag(flgs, TR_LITE_FUEL) && o_ptr->name2 != EGO_LITE_DARKNESS) {
+ if (has_flag(flgs, TR_LITE_FUEL) && o_ptr->name2 != EGO_LITE_DARKNESS) {
if (rad > 0)
sprintf(desc, _("それは燃料補給によって明かり(半径 %d)を授ける。", "It provides light (radius %d) when fueled."), (int)rad);
} else {
info[i++] = _("それは長いターン明かりを授ける。", "It provides light for much longer time.");
}
- if (have_flag(flgs, TR_RIDING)) {
+ if (has_flag(flgs, TR_RIDING)) {
if ((o_ptr->tval == TV_POLEARM) && ((o_ptr->sval == SV_LANCE) || (o_ptr->sval == SV_HEAVY_LANCE)))
info[i++] = _("それは乗馬中は非常に使いやすい。", "It is made for use while riding.");
else {
}
}
- if (have_flag(flgs, TR_STR)) {
+ if (has_flag(flgs, TR_STR)) {
info[i++] = _("それは腕力に影響を及ぼす。", "It affects your strength.");
}
- if (have_flag(flgs, TR_INT)) {
+ if (has_flag(flgs, TR_INT)) {
info[i++] = _("それは知能に影響を及ぼす。", "It affects your intelligence.");
}
- if (have_flag(flgs, TR_WIS)) {
+ if (has_flag(flgs, TR_WIS)) {
info[i++] = _("それは賢さに影響を及ぼす。", "It affects your wisdom.");
}
- if (have_flag(flgs, TR_DEX)) {
+ if (has_flag(flgs, TR_DEX)) {
info[i++] = _("それは器用さに影響を及ぼす。", "It affects your dexterity.");
}
- if (have_flag(flgs, TR_CON)) {
+ if (has_flag(flgs, TR_CON)) {
info[i++] = _("それは耐久力に影響を及ぼす。", "It affects your constitution.");
}
- if (have_flag(flgs, TR_CHR)) {
+ if (has_flag(flgs, TR_CHR)) {
info[i++] = _("それは魅力に影響を及ぼす。", "It affects your charisma.");
}
- if (have_flag(flgs, TR_MAGIC_MASTERY)) {
+ if (has_flag(flgs, TR_MAGIC_MASTERY)) {
info[i++] = _("それは魔法道具使用能力に影響を及ぼす。", "It affects your ability to use magic devices.");
}
- if (have_flag(flgs, TR_STEALTH)) {
+ if (has_flag(flgs, TR_STEALTH)) {
info[i++] = _("それは隠密行動能力に影響を及ぼす。", "It affects your stealth.");
}
- if (have_flag(flgs, TR_SEARCH)) {
+ if (has_flag(flgs, TR_SEARCH)) {
info[i++] = _("それは探索能力に影響を及ぼす。", "It affects your searching.");
}
- if (have_flag(flgs, TR_INFRA)) {
+ if (has_flag(flgs, TR_INFRA)) {
info[i++] = _("それは赤外線視力に影響を及ぼす。", "It affects your infravision.");
}
- if (have_flag(flgs, TR_TUNNEL)) {
+ if (has_flag(flgs, TR_TUNNEL)) {
info[i++] = _("それは採掘能力に影響を及ぼす。", "It affects your ability to tunnel.");
}
- if (have_flag(flgs, TR_SPEED)) {
+ if (has_flag(flgs, TR_SPEED)) {
info[i++] = _("それはスピードに影響を及ぼす。", "It affects your speed.");
}
- if (have_flag(flgs, TR_BLOWS)) {
+ if (has_flag(flgs, TR_BLOWS)) {
info[i++] = _("それは打撃回数に影響を及ぼす。", "It affects your attack speed.");
}
- if (have_flag(flgs, TR_BRAND_ACID)) {
+ if (has_flag(flgs, TR_BRAND_ACID)) {
info[i++] = _("それは酸によって大きなダメージを与える。", "It does extra damage from acid.");
}
- if (have_flag(flgs, TR_BRAND_ELEC)) {
+ if (has_flag(flgs, TR_BRAND_ELEC)) {
info[i++] = _("それは電撃によって大きなダメージを与える。", "It does extra damage from electricity.");
}
- if (have_flag(flgs, TR_BRAND_FIRE)) {
+ if (has_flag(flgs, TR_BRAND_FIRE)) {
info[i++] = _("それは火炎によって大きなダメージを与える。", "It does extra damage from fire.");
}
- if (have_flag(flgs, TR_BRAND_COLD)) {
+ if (has_flag(flgs, TR_BRAND_COLD)) {
info[i++] = _("それは冷気によって大きなダメージを与える。", "It does extra damage from frost.");
}
- if (have_flag(flgs, TR_BRAND_POIS)) {
+ if (has_flag(flgs, TR_BRAND_POIS)) {
info[i++] = _("それは敵を毒する。", "It poisons your foes.");
}
- if (have_flag(flgs, TR_CHAOTIC)) {
+ if (has_flag(flgs, TR_CHAOTIC)) {
info[i++] = _("それはカオス的な効果を及ぼす。", "It produces chaotic effects.");
}
- if (have_flag(flgs, TR_VAMPIRIC)) {
+ if (has_flag(flgs, TR_VAMPIRIC)) {
info[i++] = _("それは敵から生命力を吸収する。", "It drains life from your foes.");
}
- if (have_flag(flgs, TR_IMPACT)) {
+ if (has_flag(flgs, TR_IMPACT)) {
info[i++] = _("それは地震を起こすことができる。", "It can cause earthquakes.");
}
- if (have_flag(flgs, TR_VORPAL)) {
+ if (has_flag(flgs, TR_VORPAL)) {
info[i++] = _("それは非常に切れ味が鋭く敵を切断することができる。", "It is very sharp and can cut your foes.");
}
- if (have_flag(flgs, TR_KILL_DRAGON)) {
+ if (has_flag(flgs, TR_KILL_DRAGON)) {
info[i++] = _("それはドラゴンにとっての天敵である。", "It is a great bane of dragons.");
- } else if (have_flag(flgs, TR_SLAY_DRAGON)) {
+ } else if (has_flag(flgs, TR_SLAY_DRAGON)) {
info[i++] = _("それはドラゴンに対して特に恐るべき力を発揮する。", "It is especially deadly against dragons.");
}
- if (have_flag(flgs, TR_KILL_ORC)) {
+ if (has_flag(flgs, TR_KILL_ORC)) {
info[i++] = _("それはオークにとっての天敵である。", "It is a great bane of orcs.");
}
- if (have_flag(flgs, TR_SLAY_ORC)) {
+ if (has_flag(flgs, TR_SLAY_ORC)) {
info[i++] = _("それはオークに対して特に恐るべき力を発揮する。", "It is especially deadly against orcs.");
}
- if (have_flag(flgs, TR_KILL_TROLL)) {
+ if (has_flag(flgs, TR_KILL_TROLL)) {
info[i++] = _("それはトロルにとっての天敵である。", "It is a great bane of trolls.");
}
- if (have_flag(flgs, TR_SLAY_TROLL)) {
+ if (has_flag(flgs, TR_SLAY_TROLL)) {
info[i++] = _("それはトロルに対して特に恐るべき力を発揮する。", "It is especially deadly against trolls.");
}
- if (have_flag(flgs, TR_KILL_GIANT)) {
+ if (has_flag(flgs, TR_KILL_GIANT)) {
info[i++] = _("それは巨人にとっての天敵である。", "It is a great bane of giants.");
- } else if (have_flag(flgs, TR_SLAY_GIANT)) {
+ } else if (has_flag(flgs, TR_SLAY_GIANT)) {
info[i++] = _("それは巨人に対して特に恐るべき力を発揮する。", "It is especially deadly against giants.");
}
- if (have_flag(flgs, TR_KILL_DEMON)) {
+ if (has_flag(flgs, TR_KILL_DEMON)) {
info[i++] = _("それはデーモンにとっての天敵である。", "It is a great bane of demons.");
}
- if (have_flag(flgs, TR_SLAY_DEMON)) {
+ if (has_flag(flgs, TR_SLAY_DEMON)) {
info[i++] = _("それはデーモンに対して聖なる力を発揮する。", "It strikes at demons with holy wrath.");
}
- if (have_flag(flgs, TR_KILL_UNDEAD)) {
+ if (has_flag(flgs, TR_KILL_UNDEAD)) {
info[i++] = _("それはアンデッドにとっての天敵である。", "It is a great bane of undead.");
}
- if (have_flag(flgs, TR_SLAY_UNDEAD)) {
+ if (has_flag(flgs, TR_SLAY_UNDEAD)) {
info[i++] = _("それはアンデッドに対して聖なる力を発揮する。", "It strikes at undead with holy wrath.");
}
- if (have_flag(flgs, TR_KILL_EVIL)) {
+ if (has_flag(flgs, TR_KILL_EVIL)) {
info[i++] = _("それは邪悪なる存在にとっての天敵である。", "It is a great bane of evil monsters.");
}
- if (have_flag(flgs, TR_SLAY_EVIL)) {
+ if (has_flag(flgs, TR_SLAY_EVIL)) {
info[i++] = _("それは邪悪なる存在に対して聖なる力で攻撃する。", "It fights against evil with holy fury.");
}
- if (have_flag(flgs, TR_KILL_ANIMAL)) {
+ if (has_flag(flgs, TR_KILL_ANIMAL)) {
info[i++] = _("それは自然界の動物にとっての天敵である。", "It is a great bane of natural creatures.");
}
- if (have_flag(flgs, TR_SLAY_ANIMAL)) {
+ if (has_flag(flgs, TR_SLAY_ANIMAL)) {
info[i++] = _("それは自然界の動物に対して特に恐るべき力を発揮する。", "It is especially deadly against natural creatures.");
}
- if (have_flag(flgs, TR_KILL_HUMAN)) {
+ if (has_flag(flgs, TR_KILL_HUMAN)) {
info[i++] = _("それは人間にとっての天敵である。", "It is a great bane of humans.");
}
- if (have_flag(flgs, TR_SLAY_HUMAN)) {
+ if (has_flag(flgs, TR_SLAY_HUMAN)) {
info[i++] = _("それは人間に対して特に恐るべき力を発揮する。", "It is especially deadly against humans.");
}
- if (have_flag(flgs, TR_FORCE_WEAPON)) {
+ if (has_flag(flgs, TR_FORCE_WEAPON)) {
info[i++] = _("それは使用者の魔力を使って攻撃する。", "It powerfully strikes at a monster using your mana.");
}
- if (have_flag(flgs, TR_DEC_MANA)) {
+ if (has_flag(flgs, TR_DEC_MANA)) {
info[i++] = _("それは魔力の消費を押さえる。", "It decreases your mana consumption.");
}
- if (have_flag(flgs, TR_SUST_STR)) {
+ if (has_flag(flgs, TR_SUST_STR)) {
info[i++] = _("それはあなたの腕力を維持する。", "It sustains your strength.");
}
- if (have_flag(flgs, TR_SUST_INT)) {
+ if (has_flag(flgs, TR_SUST_INT)) {
info[i++] = _("それはあなたの知能を維持する。", "It sustains your intelligence.");
}
- if (have_flag(flgs, TR_SUST_WIS)) {
+ if (has_flag(flgs, TR_SUST_WIS)) {
info[i++] = _("それはあなたの賢さを維持する。", "It sustains your wisdom.");
}
- if (have_flag(flgs, TR_SUST_DEX)) {
+ if (has_flag(flgs, TR_SUST_DEX)) {
info[i++] = _("それはあなたの器用さを維持する。", "It sustains your dexterity.");
}
- if (have_flag(flgs, TR_SUST_CON)) {
+ if (has_flag(flgs, TR_SUST_CON)) {
info[i++] = _("それはあなたの耐久力を維持する。", "It sustains your constitution.");
}
- if (have_flag(flgs, TR_SUST_CHR)) {
+ if (has_flag(flgs, TR_SUST_CHR)) {
info[i++] = _("それはあなたの魅力を維持する。", "It sustains your charisma.");
}
- if (have_flag(flgs, TR_IM_ACID)) {
+ if (has_flag(flgs, TR_IM_ACID)) {
info[i++] = _("それは酸に対する完全な免疫を授ける。", "It provides immunity to acid.");
}
- if (have_flag(flgs, TR_IM_ELEC)) {
+ if (has_flag(flgs, TR_IM_ELEC)) {
info[i++] = _("それは電撃に対する完全な免疫を授ける。", "It provides immunity to electricity.");
}
- if (have_flag(flgs, TR_IM_FIRE)) {
+ if (has_flag(flgs, TR_IM_FIRE)) {
info[i++] = _("それは火に対する完全な免疫を授ける。", "It provides immunity to fire.");
}
- if (have_flag(flgs, TR_IM_COLD)) {
+ if (has_flag(flgs, TR_IM_COLD)) {
info[i++] = _("それは寒さに対する完全な免疫を授ける。", "It provides immunity to cold.");
}
- if (have_flag(flgs, TR_THROW)) {
+ if (has_flag(flgs, TR_THROW)) {
info[i++] = _("それは敵に投げて大きなダメージを与えることができる。", "It is perfectly balanced for throwing.");
}
- if (have_flag(flgs, TR_FREE_ACT)) {
+ if (has_flag(flgs, TR_FREE_ACT)) {
info[i++] = _("それは麻痺に対する完全な免疫を授ける。", "It provides immunity to paralysis.");
}
- if (have_flag(flgs, TR_HOLD_EXP)) {
+ if (has_flag(flgs, TR_HOLD_EXP)) {
info[i++] = _("それは経験値吸収に対する耐性を授ける。", "It provides resistance to experience draining.");
}
- if (have_flag(flgs, TR_RES_FEAR)) {
+ if (has_flag(flgs, TR_RES_FEAR)) {
info[i++] = _("それは恐怖への完全な耐性を授ける。", "It makes you completely fearless.");
}
- if (have_flag(flgs, TR_RES_ACID)) {
+ if (has_flag(flgs, TR_RES_ACID)) {
info[i++] = _("それは酸への耐性を授ける。", "It provides resistance to acid.");
}
- if (have_flag(flgs, TR_RES_ELEC)) {
+ if (has_flag(flgs, TR_RES_ELEC)) {
info[i++] = _("それは電撃への耐性を授ける。", "It provides resistance to electricity.");
}
- if (have_flag(flgs, TR_RES_FIRE)) {
+ if (has_flag(flgs, TR_RES_FIRE)) {
info[i++] = _("それは火への耐性を授ける。", "It provides resistance to fire.");
}
- if (have_flag(flgs, TR_RES_COLD)) {
+ if (has_flag(flgs, TR_RES_COLD)) {
info[i++] = _("それは寒さへの耐性を授ける。", "It provides resistance to cold.");
}
- if (have_flag(flgs, TR_RES_POIS)) {
+ if (has_flag(flgs, TR_RES_POIS)) {
info[i++] = _("それは毒への耐性を授ける。", "It provides resistance to poison.");
}
- if (have_flag(flgs, TR_RES_LITE)) {
+ if (has_flag(flgs, TR_RES_LITE)) {
info[i++] = _("それは閃光への耐性を授ける。", "It provides resistance to light.");
}
- if (have_flag(flgs, TR_RES_DARK)) {
+ if (has_flag(flgs, TR_RES_DARK)) {
info[i++] = _("それは暗黒への耐性を授ける。", "It provides resistance to dark.");
}
- if (have_flag(flgs, TR_RES_BLIND)) {
+ if (has_flag(flgs, TR_RES_BLIND)) {
info[i++] = _("それは盲目への耐性を授ける。", "It provides resistance to blindness.");
}
- if (have_flag(flgs, TR_RES_CONF)) {
+ if (has_flag(flgs, TR_RES_CONF)) {
info[i++] = _("それは混乱への耐性を授ける。", "It provides resistance to confusion.");
}
- if (have_flag(flgs, TR_RES_SOUND)) {
+ if (has_flag(flgs, TR_RES_SOUND)) {
info[i++] = _("それは轟音への耐性を授ける。", "It provides resistance to sound.");
}
- if (have_flag(flgs, TR_RES_SHARDS)) {
+ if (has_flag(flgs, TR_RES_SHARDS)) {
info[i++] = _("それは破片への耐性を授ける。", "It provides resistance to shards.");
}
- if (have_flag(flgs, TR_RES_NETHER)) {
+ if (has_flag(flgs, TR_RES_NETHER)) {
info[i++] = _("それは地獄への耐性を授ける。", "It provides resistance to nether.");
}
- if (have_flag(flgs, TR_RES_NEXUS)) {
+ if (has_flag(flgs, TR_RES_NEXUS)) {
info[i++] = _("それは因果混乱への耐性を授ける。", "It provides resistance to nexus.");
}
- if (have_flag(flgs, TR_RES_CHAOS)) {
+ if (has_flag(flgs, TR_RES_CHAOS)) {
info[i++] = _("それはカオスへの耐性を授ける。", "It provides resistance to chaos.");
}
- if (have_flag(flgs, TR_RES_DISEN)) {
+ if (has_flag(flgs, TR_RES_DISEN)) {
info[i++] = _("それは劣化への耐性を授ける。", "It provides resistance to disenchantment.");
}
- if (have_flag(flgs, TR_LEVITATION)) {
+ if (has_flag(flgs, TR_LEVITATION)) {
info[i++] = _("それは宙に浮くことを可能にする。", "It allows you to levitate.");
}
- if (have_flag(flgs, TR_SEE_INVIS)) {
+ if (has_flag(flgs, TR_SEE_INVIS)) {
info[i++] = _("それは透明なモンスターを見ることを可能にする。", "It allows you to see invisible monsters.");
}
- if (have_flag(flgs, TR_TELEPATHY)) {
+ if (has_flag(flgs, TR_TELEPATHY)) {
info[i++] = _("それはテレパシー能力を授ける。", "It gives telepathic powers.");
}
- if (have_flag(flgs, TR_ESP_ANIMAL)) {
+ if (has_flag(flgs, TR_ESP_ANIMAL)) {
info[i++] = _("それは自然界の生物を感知する。", "It senses natural creatures.");
}
- if (have_flag(flgs, TR_ESP_UNDEAD)) {
+ if (has_flag(flgs, TR_ESP_UNDEAD)) {
info[i++] = _("それはアンデッドを感知する。", "It senses undead.");
}
- if (have_flag(flgs, TR_ESP_DEMON)) {
+ if (has_flag(flgs, TR_ESP_DEMON)) {
info[i++] = _("それは悪魔を感知する。", "It senses demons.");
}
- if (have_flag(flgs, TR_ESP_ORC)) {
+ if (has_flag(flgs, TR_ESP_ORC)) {
info[i++] = _("それはオークを感知する。", "It senses orcs.");
}
- if (have_flag(flgs, TR_ESP_TROLL)) {
+ if (has_flag(flgs, TR_ESP_TROLL)) {
info[i++] = _("それはトロルを感知する。", "It senses trolls.");
}
- if (have_flag(flgs, TR_ESP_GIANT)) {
+ if (has_flag(flgs, TR_ESP_GIANT)) {
info[i++] = _("それは巨人を感知する。", "It senses giants.");
}
- if (have_flag(flgs, TR_ESP_DRAGON)) {
+ if (has_flag(flgs, TR_ESP_DRAGON)) {
info[i++] = _("それはドラゴンを感知する。", "It senses dragons.");
}
- if (have_flag(flgs, TR_ESP_HUMAN)) {
+ if (has_flag(flgs, TR_ESP_HUMAN)) {
info[i++] = _("それは人間を感知する。", "It senses humans.");
}
- if (have_flag(flgs, TR_ESP_EVIL)) {
+ if (has_flag(flgs, TR_ESP_EVIL)) {
info[i++] = _("それは邪悪な存在を感知する。", "It senses evil creatures.");
}
- if (have_flag(flgs, TR_ESP_GOOD)) {
+ if (has_flag(flgs, TR_ESP_GOOD)) {
info[i++] = _("それは善良な存在を感知する。", "It senses good creatures.");
}
- if (have_flag(flgs, TR_ESP_NONLIVING)) {
+ if (has_flag(flgs, TR_ESP_NONLIVING)) {
info[i++] = _("それは活動する無生物体を感知する。", "It senses non-living creatures.");
}
- if (have_flag(flgs, TR_ESP_UNIQUE)) {
+ if (has_flag(flgs, TR_ESP_UNIQUE)) {
info[i++] = _("それは特別な強敵を感知する。", "It senses unique monsters.");
}
- if (have_flag(flgs, TR_SLOW_DIGEST)) {
+ if (has_flag(flgs, TR_SLOW_DIGEST)) {
info[i++] = _("それはあなたの新陳代謝を遅くする。", "It slows your metabolism.");
}
- if (have_flag(flgs, TR_REGEN)) {
+ if (has_flag(flgs, TR_REGEN)) {
info[i++] = _("それは体力回復力を強化する。", "It speeds your regenerative powers.");
}
- if (have_flag(flgs, TR_WARNING)) {
+ if (has_flag(flgs, TR_WARNING)) {
info[i++] = _("それは危険に対して警告を発する。", "It warns you of danger");
}
- if (have_flag(flgs, TR_REFLECT)) {
+ if (has_flag(flgs, TR_REFLECT)) {
info[i++] = _("それは矢の呪文を反射する。", "It reflects bolt spells.");
}
- if (have_flag(flgs, TR_SH_FIRE)) {
+ if (has_flag(flgs, TR_SH_FIRE)) {
info[i++] = _("それは炎のバリアを張る。", "It produces a fiery sheath.");
}
- if (have_flag(flgs, TR_SH_ELEC)) {
+ if (has_flag(flgs, TR_SH_ELEC)) {
info[i++] = _("それは電気のバリアを張る。", "It produces an electric sheath.");
}
- if (have_flag(flgs, TR_SH_COLD)) {
+ if (has_flag(flgs, TR_SH_COLD)) {
info[i++] = _("それは冷気のバリアを張る。", "It produces a sheath of coldness.");
}
- if (have_flag(flgs, TR_NO_MAGIC)) {
+ if (has_flag(flgs, TR_NO_MAGIC)) {
info[i++] = _("それは反魔法バリアを張る。", "It produces an anti-magic shell.");
}
- if (have_flag(flgs, TR_NO_TELE)) {
+ if (has_flag(flgs, TR_NO_TELE)) {
info[i++] = _("それはテレポートを邪魔する。", "It prevents teleportation.");
}
- if (have_flag(flgs, TR_XTRA_MIGHT)) {
+ if (has_flag(flgs, TR_XTRA_MIGHT)) {
info[i++] = _("それは矢/ボルト/弾をより強力に発射することができる。", "It fires missiles with extra might.");
}
- if (have_flag(flgs, TR_XTRA_SHOTS)) {
+ if (has_flag(flgs, TR_XTRA_SHOTS)) {
info[i++] = _("それは矢/ボルト/弾を非常に早く発射することができる。", "It fires missiles excessively fast.");
}
- if (have_flag(flgs, TR_BLESSED)) {
+ if (has_flag(flgs, TR_BLESSED)) {
info[i++] = _("それは神に祝福されている。", "It has been blessed by the gods.");
}
}
}
- if ((have_flag(flgs, TR_TY_CURSE)) || (o_ptr->curse_flags & TRC_TY_CURSE)) {
+ if ((has_flag(flgs, TR_TY_CURSE)) || (o_ptr->curse_flags & TRC_TY_CURSE)) {
info[i++] = _("それは太古の禍々しい怨念が宿っている。", "It carries an ancient foul curse.");
}
- if ((have_flag(flgs, TR_AGGRAVATE)) || (o_ptr->curse_flags & TRC_AGGRAVATE)) {
+ if ((has_flag(flgs, TR_AGGRAVATE)) || (o_ptr->curse_flags & TRC_AGGRAVATE)) {
info[i++] = _("それは付近のモンスターを怒らせる。", "It aggravates nearby creatures.");
}
- if ((have_flag(flgs, TR_DRAIN_EXP)) || (o_ptr->curse_flags & TRC_DRAIN_EXP)) {
+ if ((has_flag(flgs, TR_DRAIN_EXP)) || (o_ptr->curse_flags & TRC_DRAIN_EXP)) {
info[i++] = _("それは経験値を吸い取る。", "It drains experience.");
}
info[i++] = _("それは回復力を弱める。", "It slows your regenerative powers.");
}
- if ((o_ptr->curse_flags & TRC_ADD_L_CURSE) || have_flag(flgs, TR_ADD_L_CURSE)) {
+ if ((o_ptr->curse_flags & TRC_ADD_L_CURSE) || has_flag(flgs, TR_ADD_L_CURSE)) {
info[i++] = _("それは弱い呪いを増やす。", "It adds weak curses.");
}
- if ((o_ptr->curse_flags & TRC_ADD_H_CURSE) || have_flag(flgs, TR_ADD_H_CURSE)) {
+ if ((o_ptr->curse_flags & TRC_ADD_H_CURSE) || has_flag(flgs, TR_ADD_H_CURSE)) {
info[i++] = _("それは強力な呪いを増やす。", "It adds heavy curses.");
}
- if ((have_flag(flgs, TR_CALL_ANIMAL)) || (o_ptr->curse_flags & TRC_CALL_ANIMAL)) {
+ if ((has_flag(flgs, TR_CALL_ANIMAL)) || (o_ptr->curse_flags & TRC_CALL_ANIMAL)) {
info[i++] = _("それは動物を呼び寄せる。", "It attracts animals.");
}
- if ((have_flag(flgs, TR_CALL_DEMON)) || (o_ptr->curse_flags & TRC_CALL_DEMON)) {
+ if ((has_flag(flgs, TR_CALL_DEMON)) || (o_ptr->curse_flags & TRC_CALL_DEMON)) {
info[i++] = _("それは悪魔を呼び寄せる。", "It attracts demons.");
}
- if ((have_flag(flgs, TR_CALL_DRAGON)) || (o_ptr->curse_flags & TRC_CALL_DRAGON)) {
+ if ((has_flag(flgs, TR_CALL_DRAGON)) || (o_ptr->curse_flags & TRC_CALL_DRAGON)) {
info[i++] = _("それはドラゴンを呼び寄せる。", "It attracts dragons.");
}
- if ((have_flag(flgs, TR_CALL_UNDEAD)) || (o_ptr->curse_flags & TRC_CALL_UNDEAD)) {
+ if ((has_flag(flgs, TR_CALL_UNDEAD)) || (o_ptr->curse_flags & TRC_CALL_UNDEAD)) {
info[i++] = _("それは死霊を呼び寄せる。", "It attracts undeads.");
}
- if ((have_flag(flgs, TR_COWARDICE)) || (o_ptr->curse_flags & TRC_COWARDICE)) {
+ if ((has_flag(flgs, TR_COWARDICE)) || (o_ptr->curse_flags & TRC_COWARDICE)) {
info[i++] = _("それは恐怖感を引き起こす。", "It makes you subject to cowardice.");
}
- if ((have_flag(flgs, TR_TELEPORT)) || (o_ptr->curse_flags & TRC_TELEPORT)) {
+ if ((has_flag(flgs, TR_TELEPORT)) || (o_ptr->curse_flags & TRC_TELEPORT)) {
info[i++] = _("それはランダムなテレポートを引き起こす。", "It induces random teleportation.");
}
- if ((have_flag(flgs, TR_LOW_MELEE)) || o_ptr->curse_flags & TRC_LOW_MELEE) {
+ if ((has_flag(flgs, TR_LOW_MELEE)) || o_ptr->curse_flags & TRC_LOW_MELEE) {
info[i++] = _("それは攻撃を外しやすい。", "It causes you to miss blows.");
}
- if ((have_flag(flgs, TR_LOW_AC)) || (o_ptr->curse_flags & TRC_LOW_AC)) {
+ if ((has_flag(flgs, TR_LOW_AC)) || (o_ptr->curse_flags & TRC_LOW_AC)) {
info[i++] = _("それは攻撃を受けやすい。", "It helps your enemies' blows.");
}
- if ((have_flag(flgs, TR_LOW_MAGIC)) || (o_ptr->curse_flags & TRC_LOW_MAGIC)) {
+ if ((has_flag(flgs, TR_LOW_MAGIC)) || (o_ptr->curse_flags & TRC_LOW_MAGIC)) {
info[i++] = _("それは魔法を唱えにくくする。", "It encumbers you while spellcasting.");
}
- if ((have_flag(flgs, TR_FAST_DIGEST)) || (o_ptr->curse_flags & TRC_FAST_DIGEST)) {
+ if ((has_flag(flgs, TR_FAST_DIGEST)) || (o_ptr->curse_flags & TRC_FAST_DIGEST)) {
info[i++] = _("それはあなたの新陳代謝を速くする。", "It speeds your metabolism.");
}
- if ((have_flag(flgs, TR_DRAIN_HP)) || (o_ptr->curse_flags & TRC_DRAIN_HP)) {
+ if ((has_flag(flgs, TR_DRAIN_HP)) || (o_ptr->curse_flags & TRC_DRAIN_HP)) {
info[i++] = _("それはあなたの体力を吸い取る。", "It drains you.");
}
- if ((have_flag(flgs, TR_DRAIN_MANA)) || (o_ptr->curse_flags & TRC_DRAIN_MANA)) {
+ if ((has_flag(flgs, TR_DRAIN_MANA)) || (o_ptr->curse_flags & TRC_DRAIN_MANA)) {
info[i++] = _("それはあなたの魔力を吸い取る。", "It drains your mana.");
}
}
}
- if (have_flag(flgs, TR_IGNORE_ACID) && have_flag(flgs, TR_IGNORE_ELEC) && have_flag(flgs, TR_IGNORE_FIRE) && have_flag(flgs, TR_IGNORE_COLD)) {
+ if (has_flag(flgs, TR_IGNORE_ACID) && has_flag(flgs, TR_IGNORE_ELEC) && has_flag(flgs, TR_IGNORE_FIRE) && has_flag(flgs, TR_IGNORE_COLD)) {
info[i++] = _("それは酸・電撃・火炎・冷気では傷つかない。", "It cannot be harmed by the elements.");
} else {
- if (have_flag(flgs, TR_IGNORE_ACID)) {
+ if (has_flag(flgs, TR_IGNORE_ACID)) {
info[i++] = _("それは酸では傷つかない。", "It cannot be harmed by acid.");
}
- if (have_flag(flgs, TR_IGNORE_ELEC)) {
+ if (has_flag(flgs, TR_IGNORE_ELEC)) {
info[i++] = _("それは電撃では傷つかない。", "It cannot be harmed by electricity.");
}
- if (have_flag(flgs, TR_IGNORE_FIRE)) {
+ if (has_flag(flgs, TR_IGNORE_FIRE)) {
info[i++] = _("それは火炎では傷つかない。", "It cannot be harmed by fire.");
}
- if (have_flag(flgs, TR_IGNORE_COLD)) {
+ if (has_flag(flgs, TR_IGNORE_COLD)) {
info[i++] = _("それは冷気では傷つかない。", "It cannot be harmed by cold.");
}
}
*/
void decide_blood_sucking(player_type *attacker_ptr, player_attack_type *pa_ptr)
{
- bool is_blood_sucker = have_flag(pa_ptr->flags, TR_VAMPIRIC);
+ bool is_blood_sucker = has_flag(pa_ptr->flags, TR_VAMPIRIC);
is_blood_sucker |= pa_ptr->chaos_effect == CE_VAMPIRIC;
is_blood_sucker |= pa_ptr->mode == HISSATSU_DRAIN;
is_blood_sucker |= hex_spelling(attacker_ptr, HEX_VAMP_BLADE);
*/
static chaotic_effect select_chaotic_effect(player_type *attacker_ptr, player_attack_type *pa_ptr)
{
- if (!(have_flag(pa_ptr->flags, TR_CHAOTIC)) || one_in_(2))
+ if (!(has_flag(pa_ptr->flags, TR_CHAOTIC)) || one_in_(2))
return CE_NONE;
if (one_in_(10))
decide_blood_sucking(attacker_ptr, pa_ptr);
// process_monk_attackの中でplayer_type->magic_num1[0] を書き換えているので、ここでhex_spelling() の判定をしないとダメ.
- bool vorpal_cut = (have_flag(pa_ptr->flags, TR_VORPAL) || hex_spelling(attacker_ptr, HEX_RUNESWORD)) && (randint1(vorpal_chance * 3 / 2) == 1)
+ bool vorpal_cut = (has_flag(pa_ptr->flags, TR_VORPAL) || hex_spelling(attacker_ptr, HEX_RUNESWORD)) && (randint1(vorpal_chance * 3 / 2) == 1)
&& !is_zantetsu_nullified;
calc_attack_damage(attacker_ptr, pa_ptr, do_quake, vorpal_cut, vorpal_chance);
si_ptr->flags[j] |= tflgs[j];
}
- if (have_flag(si_ptr->flags, TR_STR))
- si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Ì\98r\97Í\82Í\91\95\94õ\82É\82æ\82Á\82Ä\89e\8b¿\82ð\8eó\82¯\82Ä\82¢\82é\81B", "Your strength is affected by your equipment.");
+ if (has_flag(si_ptr->flags, TR_STR))
+ si_ptr->info[si_ptr->line++] = _("���Ȃ��̘r�͂͑����ɂ���ĉe�����Ă���B", "Your strength is affected by your equipment.");
- if (have_flag(si_ptr->flags, TR_INT))
- si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Ì\92m\94\\82Í\91\95\94õ\82É\82æ\82Á\82Ä\89e\8b¿\82ð\8eó\82¯\82Ä\82¢\82é\81B", "Your intelligence is affected by your equipment.");
+ if (has_flag(si_ptr->flags, TR_INT))
+ si_ptr->info[si_ptr->line++] = _("���Ȃ��̒m�\�͑����ɂ���ĉe�����Ă���B", "Your intelligence is affected by your equipment.");
- if (have_flag(si_ptr->flags, TR_WIS))
- si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Ì\8c«\82³\82Í\91\95\94õ\82É\82æ\82Á\82Ä\89e\8b¿\82ð\8eó\82¯\82Ä\82¢\82é\81B", "Your wisdom is affected by your equipment.");
+ if (has_flag(si_ptr->flags, TR_WIS))
+ si_ptr->info[si_ptr->line++] = _("���Ȃ��̌����͑����ɂ���ĉe�����Ă���B", "Your wisdom is affected by your equipment.");
- if (have_flag(si_ptr->flags, TR_DEX))
- si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Ì\8aí\97p\82³\82Í\91\95\94õ\82É\82æ\82Á\82Ä\89e\8b¿\82ð\8eó\82¯\82Ä\82¢\82é\81B", "Your dexterity is affected by your equipment.");
+ if (has_flag(si_ptr->flags, TR_DEX))
+ si_ptr->info[si_ptr->line++] = _("���Ȃ��̊�p���͑����ɂ���ĉe�����Ă���B", "Your dexterity is affected by your equipment.");
- if (have_flag(si_ptr->flags, TR_CON))
- si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Ì\91Ï\8bv\97Í\82Í\91\95\94õ\82É\82æ\82Á\82Ä\89e\8b¿\82ð\8eó\82¯\82Ä\82¢\82é\81B", "Your constitution is affected by your equipment.");
+ if (has_flag(si_ptr->flags, TR_CON))
+ si_ptr->info[si_ptr->line++] = _("���Ȃ��̑ϋv�͂͑����ɂ���ĉe�����Ă���B", "Your constitution is affected by your equipment.");
- if (have_flag(si_ptr->flags, TR_CHR))
- si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Ì\96£\97Í\82Í\91\95\94õ\82É\82æ\82Á\82Ä\89e\8b¿\82ð\8eó\82¯\82Ä\82¢\82é\81B", "Your charisma is affected by your equipment.");
+ if (has_flag(si_ptr->flags, TR_CHR))
+ si_ptr->info[si_ptr->line++] = _("���Ȃ��̖��͂͑����ɂ���ĉe�����Ă���B", "Your charisma is affected by your equipment.");
- if (have_flag(si_ptr->flags, TR_STEALTH))
- si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Ì\89B\96§\8ds\93®\94\\97Í\82Í\91\95\94õ\82É\82æ\82Á\82Ä\89e\8b¿\82ð\8eó\82¯\82Ä\82¢\82é\81B", "Your stealth is affected by your equipment.");
+ if (has_flag(si_ptr->flags, TR_STEALTH))
+ si_ptr->info[si_ptr->line++] = _("���Ȃ��̉B���s���\�͂͑����ɂ���ĉe�����Ă���B", "Your stealth is affected by your equipment.");
- if (have_flag(si_ptr->flags, TR_SEARCH))
- si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Ì\92T\8dõ\94\\97Í\82Í\91\95\94õ\82É\82æ\82Á\82Ä\89e\8b¿\82ð\8eó\82¯\82Ä\82¢\82é\81B", "Your searching ability is affected by your equipment.");
+ if (has_flag(si_ptr->flags, TR_SEARCH))
+ si_ptr->info[si_ptr->line++] = _("���Ȃ��̒T���\�͂͑����ɂ���ĉe�����Ă���B", "Your searching ability is affected by your equipment.");
- if (have_flag(si_ptr->flags, TR_INFRA))
- si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Ì\90Ô\8aO\90ü\8e\8b\97Í\82Í\91\95\94õ\82É\82æ\82Á\82Ä\89e\8b¿\82ð\8eó\82¯\82Ä\82¢\82é\81B", "Your infravision is affected by your equipment.");
+ if (has_flag(si_ptr->flags, TR_INFRA))
+ si_ptr->info[si_ptr->line++] = _("���Ȃ��̐ԊO�����͂͑����ɂ���ĉe�����Ă���B", "Your infravision is affected by your equipment.");
- if (have_flag(si_ptr->flags, TR_TUNNEL))
- si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Ì\8dÌ\8c@\94\\97Í\82Í\91\95\94õ\82É\82æ\82Á\82Ä\89e\8b¿\82ð\8eó\82¯\82Ä\82¢\82é\81B", "Your digging ability is affected by your equipment.");
+ if (has_flag(si_ptr->flags, TR_TUNNEL))
+ si_ptr->info[si_ptr->line++] = _("���Ȃ��̍̌@�\�͂͑����ɂ���ĉe�����Ă���B", "Your digging ability is affected by your equipment.");
- if (have_flag(si_ptr->flags, TR_SPEED))
- si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Ì\83X\83s\81[\83h\82Í\91\95\94õ\82É\82æ\82Á\82Ä\89e\8b¿\82ð\8eó\82¯\82Ä\82¢\82é\81B", "Your speed is affected by your equipment.");
+ if (has_flag(si_ptr->flags, TR_SPEED))
+ si_ptr->info[si_ptr->line++] = _("���Ȃ��̃X�s�[�h�͑����ɂ���ĉe�����Ă���B", "Your speed is affected by your equipment.");
- if (have_flag(si_ptr->flags, TR_BLOWS))
- si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Ì\8dU\8c\82\91¬\93x\82Í\91\95\94õ\82É\82æ\82Á\82Ä\89e\8b¿\82ð\8eó\82¯\82Ä\82¢\82é\81B", "Your attack speed is affected by your equipment.");
+ if (has_flag(si_ptr->flags, TR_BLOWS))
+ si_ptr->info[si_ptr->line++] = _("���Ȃ��̍U�����x�͑����ɂ���ĉe�����Ă���B", "Your attack speed is affected by your equipment.");
}
void set_status_sustain_info(player_type *creature_ptr, self_info_type *si_ptr)
{
if (creature_ptr->sustain_str) {
- si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Ì\98r\97Í\82Í\88Û\8e\9d\82³\82ê\82Ä\82¢\82é\81B", "Your strength is sustained.");
+ si_ptr->info[si_ptr->line++] = _("���Ȃ��̘r�͈͂ێ�����Ă���B", "Your strength is sustained.");
}
if (creature_ptr->sustain_int) {
- si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Ì\92m\94\\82Í\88Û\8e\9d\82³\82ê\82Ä\82¢\82é\81B", "Your intelligence is sustained.");
+ si_ptr->info[si_ptr->line++] = _("���Ȃ��̒m�\�͈ێ�����Ă���B", "Your intelligence is sustained.");
}
if (creature_ptr->sustain_wis) {
- si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Ì\8c«\82³\82Í\88Û\8e\9d\82³\82ê\82Ä\82¢\82é\81B", "Your wisdom is sustained.");
+ si_ptr->info[si_ptr->line++] = _("���Ȃ��̌����͈ێ�����Ă���B", "Your wisdom is sustained.");
}
if (creature_ptr->sustain_con) {
- si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Ì\91Ï\8bv\97Í\82Í\88Û\8e\9d\82³\82ê\82Ä\82¢\82é\81B", "Your constitution is sustained.");
+ si_ptr->info[si_ptr->line++] = _("���Ȃ��̑ϋv�͈͂ێ�����Ă���B", "Your constitution is sustained.");
}
if (creature_ptr->sustain_dex) {
- si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Ì\8aí\97p\82³\82Í\88Û\8e\9d\82³\82ê\82Ä\82¢\82é\81B", "Your dexterity is sustained.");
+ si_ptr->info[si_ptr->line++] = _("���Ȃ��̊�p���͈ێ�����Ă���B", "Your dexterity is sustained.");
}
if (creature_ptr->sustain_chr) {
- si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Ì\96£\97Í\82Í\88Û\8e\9d\82³\82ê\82Ä\82¢\82é\81B", "Your charisma is sustained.");
+ si_ptr->info[si_ptr->line++] = _("���Ȃ��̖��͈͂ێ�����Ă���B", "Your charisma is sustained.");
}
}
static void set_weapon_bless_info(self_info_type *si_ptr)
{
- if (have_flag(si_ptr->flags, TR_BLESSED))
- si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Ì\95\90\8aí\82Í\90_\82Ì\8fj\95\9f\82ð\8eó\82¯\82Ä\82¢\82é\81B", "Your weapon has been blessed by the gods.");
+ if (has_flag(si_ptr->flags, TR_BLESSED))
+ si_ptr->info[si_ptr->line++] = _("���Ȃ��̕���͐_�̏j�����Ă���B", "Your weapon has been blessed by the gods.");
- if (have_flag(si_ptr->flags, TR_CHAOTIC))
- si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Ì\95\90\8aí\82Í\83\8d\83O\83\8b\83X\82Ì\92¥\82Ì\91®\90«\82ð\82à\82\81B", "Your weapon is branded with the Sign of Logrus.");
+ if (has_flag(si_ptr->flags, TR_CHAOTIC))
+ si_ptr->info[si_ptr->line++] = _("���Ȃ��̕���̓��O���X�̒��̑��������\81B", "Your weapon is branded with the Sign of Logrus.");
- if (have_flag(si_ptr->flags, TR_IMPACT))
- si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Ì\95\90\8aí\82Í\91Å\8c\82\82Å\92n\90k\82ð\94\90¶\82·\82é\82±\82Æ\82ª\82Å\82«\82é\81B", "The impact of your weapon can cause earthquakes.");
+ if (has_flag(si_ptr->flags, TR_IMPACT))
+ si_ptr->info[si_ptr->line++] = _("���Ȃ��̕���͑Ō��Œn�k�����邱�Ƃ��ł���B", "The impact of your weapon can cause earthquakes.");
- if (have_flag(si_ptr->flags, TR_VORPAL))
- si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Ì\95\90\8aí\82Í\94ñ\8fí\82É\89s\82¢\81B", "Your weapon is very sharp.");
+ if (has_flag(si_ptr->flags, TR_VORPAL))
+ si_ptr->info[si_ptr->line++] = _("���Ȃ��̕���͔��ɉs���B", "Your weapon is very sharp.");
- if (have_flag(si_ptr->flags, TR_VAMPIRIC))
- si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Ì\95\90\8aí\82Í\93G\82©\82ç\90¶\96½\97Í\82ð\8bz\8eû\82·\82é\81B", "Your weapon drains life from your foes.");
+ if (has_flag(si_ptr->flags, TR_VAMPIRIC))
+ si_ptr->info[si_ptr->line++] = _("���Ȃ��̕���͓G���琶���͂��z������B", "Your weapon drains life from your foes.");
}
static void set_brand_attack_info(self_info_type *si_ptr)
{
- if (have_flag(si_ptr->flags, TR_BRAND_ACID))
- si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Ì\95\90\8aí\82Í\93G\82ð\97n\82©\82·\81B", "Your weapon melts your foes.");
+ if (has_flag(si_ptr->flags, TR_BRAND_ACID))
+ si_ptr->info[si_ptr->line++] = _("���Ȃ��̕���͓G��n�����B", "Your weapon melts your foes.");
- if (have_flag(si_ptr->flags, TR_BRAND_ELEC))
- si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Ì\95\90\8aí\82Í\93G\82ð\8a´\93d\82³\82¹\82é\81B", "Your weapon shocks your foes.");
+ if (has_flag(si_ptr->flags, TR_BRAND_ELEC))
+ si_ptr->info[si_ptr->line++] = _("���Ȃ��̕���͓G�����d������B", "Your weapon shocks your foes.");
- if (have_flag(si_ptr->flags, TR_BRAND_FIRE))
- si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Ì\95\90\8aí\82Í\93G\82ð\94R\82â\82·\81B", "Your weapon burns your foes.");
+ if (has_flag(si_ptr->flags, TR_BRAND_FIRE))
+ si_ptr->info[si_ptr->line++] = _("���Ȃ��̕���͓G��R�₷�B", "Your weapon burns your foes.");
- if (have_flag(si_ptr->flags, TR_BRAND_COLD))
- si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Ì\95\90\8aí\82Í\93G\82ð\93\80\82ç\82¹\82é\81B", "Your weapon freezes your foes.");
+ if (has_flag(si_ptr->flags, TR_BRAND_COLD))
+ si_ptr->info[si_ptr->line++] = _("���Ȃ��̕���͓G�𓀂点��B", "Your weapon freezes your foes.");
- if (have_flag(si_ptr->flags, TR_BRAND_POIS))
- si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Ì\95\90\8aí\82Í\93G\82ð\93Å\82Å\90N\82·\81B", "Your weapon poisons your foes.");
+ if (has_flag(si_ptr->flags, TR_BRAND_POIS))
+ si_ptr->info[si_ptr->line++] = _("���Ȃ��̕���͓G��łŐN���B", "Your weapon poisons your foes.");
}
static void set_slay_info(self_info_type *si_ptr)
{
- if (have_flag(si_ptr->flags, TR_KILL_ANIMAL))
- si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Ì\95\90\8aí\82Í\93®\95¨\82Ì\93V\93G\82Å\82 \82é\81B", "Your weapon is a great bane of animals.");
- else if (have_flag(si_ptr->flags, TR_SLAY_ANIMAL))
- si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Ì\95\90\8aí\82Í\93®\95¨\82É\91Î\82µ\82Ä\8b\82¢\97Í\82ð\94\8aö\82·\82é\81B", "Your weapon strikes at animals with extra force.");
-
- if (have_flag(si_ptr->flags, TR_KILL_EVIL))
- si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Ì\95\90\8aí\82Í\8e×\88«\82È\82é\91¶\8dÝ\82Ì\93V\93G\82Å\82 \82é\81B", "Your weapon is a great bane of evil.");
- else if (have_flag(si_ptr->flags, TR_SLAY_EVIL))
- si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Ì\95\90\8aí\82Í\8e×\88«\82È\82é\91¶\8dÝ\82É\91Î\82µ\82Ä\8b\82¢\97Í\82ð\94\8aö\82·\82é\81B", "Your weapon strikes at evil with extra force.");
-
- if (have_flag(si_ptr->flags, TR_KILL_HUMAN))
- si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Ì\95\90\8aí\82Í\90l\8aÔ\82Ì\93V\93G\82Å\82 \82é\81B", "Your weapon is a great bane of humans.");
- else if (have_flag(si_ptr->flags, TR_SLAY_HUMAN))
- si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Ì\95\90\8aí\82Í\90l\8aÔ\82É\91Î\82µ\82Ä\93Á\82É\8b\82¢\97Í\82ð\94\8aö\82·\82é\81B", "Your weapon is especially deadly against humans.");
-
- if (have_flag(si_ptr->flags, TR_KILL_UNDEAD))
- si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Ì\95\90\8aí\82Í\83A\83\93\83f\83b\83h\82Ì\93V\93G\82Å\82 \82é\81B", "Your weapon is a great bane of undead.");
- else if (have_flag(si_ptr->flags, TR_SLAY_UNDEAD))
- si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Ì\95\90\8aí\82Í\83A\83\93\83f\83b\83h\82É\91Î\82µ\82Ä\90_\90¹\82È\82é\97Í\82ð\94\8aö\82·\82é\81B", "Your weapon strikes at undead with holy wrath.");
-
- if (have_flag(si_ptr->flags, TR_KILL_DEMON))
- si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Ì\95\90\8aí\82Í\83f\81[\83\82\83\93\82Ì\93V\93G\82Å\82 \82é\81B", "Your weapon is a great bane of demons.");
- else if (have_flag(si_ptr->flags, TR_SLAY_DEMON))
- si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Ì\95\90\8aí\82Í\83f\81[\83\82\83\93\82É\91Î\82µ\82Ä\90_\90¹\82È\82é\97Í\82ð\94\8aö\82·\82é\81B", "Your weapon strikes at demons with holy wrath.");
-
- if (have_flag(si_ptr->flags, TR_KILL_ORC))
- si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Ì\95\90\8aí\82Í\83I\81[\83N\82Ì\93V\93G\82Å\82 \82é\81B", "Your weapon is a great bane of orcs.");
- else if (have_flag(si_ptr->flags, TR_SLAY_ORC))
- si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Ì\95\90\8aí\82Í\83I\81[\83N\82É\91Î\82µ\82Ä\93Á\82É\8b\82¢\97Í\82ð\94\8aö\82·\82é\81B", "Your weapon is especially deadly against orcs.");
-
- if (have_flag(si_ptr->flags, TR_KILL_TROLL))
- si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Ì\95\90\8aí\82Í\83g\83\8d\83\8b\82Ì\93V\93G\82Å\82 \82é\81B", "Your weapon is a great bane of trolls.");
- else if (have_flag(si_ptr->flags, TR_SLAY_TROLL))
- si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Ì\95\90\8aí\82Í\83g\83\8d\83\8b\82É\91Î\82µ\82Ä\93Á\82É\8b\82¢\97Í\82ð\94\8aö\82·\82é\81B", "Your weapon is especially deadly against trolls.");
-
- if (have_flag(si_ptr->flags, TR_KILL_GIANT))
- si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Ì\95\90\8aí\82Í\8b\90\90l\82Ì\93V\93G\82Å\82 \82é\81B", "Your weapon is a great bane of giants.");
- else if (have_flag(si_ptr->flags, TR_SLAY_GIANT))
- si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Ì\95\90\8aí\82Í\8b\90\90l\82É\91Î\82µ\82Ä\93Á\82É\8b\82¢\97Í\82ð\94\8aö\82·\82é\81B", "Your weapon is especially deadly against giants.");
-
- if (have_flag(si_ptr->flags, TR_KILL_DRAGON))
- si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Ì\95\90\8aí\82Í\83h\83\89\83S\83\93\82Ì\93V\93G\82Å\82 \82é\81B", "Your weapon is a great bane of dragons.");
- else if (have_flag(si_ptr->flags, TR_SLAY_DRAGON))
- si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Ì\95\90\8aí\82Í\83h\83\89\83S\83\93\82É\91Î\82µ\82Ä\93Á\82É\8b\82¢\97Í\82ð\94\8aö\82·\82é\81B", "Your weapon is especially deadly against dragons.");
+ if (has_flag(si_ptr->flags, TR_KILL_ANIMAL))
+ si_ptr->info[si_ptr->line++] = _("���Ȃ��̕���͓����̓V�G�ł���B", "Your weapon is a great bane of animals.");
+ else if (has_flag(si_ptr->flags, TR_SLAY_ANIMAL))
+ si_ptr->info[si_ptr->line++] = _("���Ȃ��̕���͓����ɑ��ċ����͂�����B", "Your weapon strikes at animals with extra force.");
+
+ if (has_flag(si_ptr->flags, TR_KILL_EVIL))
+ si_ptr->info[si_ptr->line++] = _("���Ȃ��̕���͎��Ȃ鑶�݂̓V�G�ł���B", "Your weapon is a great bane of evil.");
+ else if (has_flag(si_ptr->flags, TR_SLAY_EVIL))
+ si_ptr->info[si_ptr->line++] = _("���Ȃ��̕���͎��Ȃ鑶�݂ɑ��ċ����͂�����B", "Your weapon strikes at evil with extra force.");
+
+ if (has_flag(si_ptr->flags, TR_KILL_HUMAN))
+ si_ptr->info[si_ptr->line++] = _("���Ȃ��̕���͐l�Ԃ̓V�G�ł���B", "Your weapon is a great bane of humans.");
+ else if (has_flag(si_ptr->flags, TR_SLAY_HUMAN))
+ si_ptr->info[si_ptr->line++] = _("���Ȃ��̕���͐l�Ԃɑ��ē��ɋ����͂�����B", "Your weapon is especially deadly against humans.");
+
+ if (has_flag(si_ptr->flags, TR_KILL_UNDEAD))
+ si_ptr->info[si_ptr->line++] = _("���Ȃ��̕���̓A���f�b�h�̓V�G�ł���B", "Your weapon is a great bane of undead.");
+ else if (has_flag(si_ptr->flags, TR_SLAY_UNDEAD))
+ si_ptr->info[si_ptr->line++] = _("���Ȃ��̕���̓A���f�b�h�ɑ��Đ_���Ȃ�͂�����B", "Your weapon strikes at undead with holy wrath.");
+
+ if (has_flag(si_ptr->flags, TR_KILL_DEMON))
+ si_ptr->info[si_ptr->line++] = _("���Ȃ��̕���̓f�[�����̓V�G�ł���B", "Your weapon is a great bane of demons.");
+ else if (has_flag(si_ptr->flags, TR_SLAY_DEMON))
+ si_ptr->info[si_ptr->line++] = _("���Ȃ��̕���̓f�[�����ɑ��Đ_���Ȃ�͂�����B", "Your weapon strikes at demons with holy wrath.");
+
+ if (has_flag(si_ptr->flags, TR_KILL_ORC))
+ si_ptr->info[si_ptr->line++] = _("���Ȃ��̕���̓I�[�N�̓V�G�ł���B", "Your weapon is a great bane of orcs.");
+ else if (has_flag(si_ptr->flags, TR_SLAY_ORC))
+ si_ptr->info[si_ptr->line++] = _("���Ȃ��̕���̓I�[�N�ɑ��ē��ɋ����͂�����B", "Your weapon is especially deadly against orcs.");
+
+ if (has_flag(si_ptr->flags, TR_KILL_TROLL))
+ si_ptr->info[si_ptr->line++] = _("���Ȃ��̕���̓g�����̓V�G�ł���B", "Your weapon is a great bane of trolls.");
+ else if (has_flag(si_ptr->flags, TR_SLAY_TROLL))
+ si_ptr->info[si_ptr->line++] = _("���Ȃ��̕���̓g�����ɑ��ē��ɋ����͂�����B", "Your weapon is especially deadly against trolls.");
+
+ if (has_flag(si_ptr->flags, TR_KILL_GIANT))
+ si_ptr->info[si_ptr->line++] = _("���Ȃ��̕���͋��l�̓V�G�ł���B", "Your weapon is a great bane of giants.");
+ else if (has_flag(si_ptr->flags, TR_SLAY_GIANT))
+ si_ptr->info[si_ptr->line++] = _("���Ȃ��̕���͋��l�ɑ��ē��ɋ����͂�����B", "Your weapon is especially deadly against giants.");
+
+ if (has_flag(si_ptr->flags, TR_KILL_DRAGON))
+ si_ptr->info[si_ptr->line++] = _("���Ȃ��̕���̓h���S���̓V�G�ł���B", "Your weapon is a great bane of dragons.");
+ else if (has_flag(si_ptr->flags, TR_SLAY_DRAGON))
+ si_ptr->info[si_ptr->line++] = _("���Ȃ��̕���̓h���S���ɑ��ē��ɋ����͂�����B", "Your weapon is especially deadly against dragons.");
}
void set_weapon_effect_info(player_type *creature_ptr, self_info_type *si_ptr)
set_weapon_bless_info(si_ptr);
set_brand_attack_info(si_ptr);
set_slay_info(si_ptr);
- if (have_flag(si_ptr->flags, TR_FORCE_WEAPON))
- si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Ì\95\90\8aí\82ÍMP\82ð\8eg\82Á\82Ä\8dU\8c\82\82·\82é\81B", "Your weapon causes greate damages using your MP.");
+ if (has_flag(si_ptr->flags, TR_FORCE_WEAPON))
+ si_ptr->info[si_ptr->line++] = _("���Ȃ��̕����MP���g���čU������B", "Your weapon causes greate damages using your MP.");
- if (have_flag(si_ptr->flags, TR_THROW))
- si_ptr->info[si_ptr->line++] = _("\82 \82È\82½\82Ì\95\90\8aí\82Í\93\8a\82°\82â\82·\82¢\81B", "Your weapon can be thrown well.");
+ if (has_flag(si_ptr->flags, TR_THROW))
+ si_ptr->info[si_ptr->line++] = _("���Ȃ��̕���͓����₷���B", "Your weapon can be thrown well.");
}
}
/* Object resists */
- if (have_flag(flgs, TR_IGNORE_ACID)) {
+ if (has_flag(flgs, TR_IGNORE_ACID)) {
msg_format(_("しかし%sには効果がなかった!", "Your %s is unaffected!"), o_name);
return TRUE;
}
}
if ((creature_ptr->action == ACTION_HAYAGAKE)
- && (!have_flag(f_ptr->flags, FF_PROJECT) || (!creature_ptr->levitation && have_flag(f_ptr->flags, FF_DEEP)))) {
+ && (!has_flag(f_ptr->flags, FF_PROJECT) || (!creature_ptr->levitation && has_flag(f_ptr->flags, FF_DEEP)))) {
msg_print(_("ここでは素早く動けない。", "You cannot run in here."));
set_action(creature_ptr, ACTION_NONE);
}
if (creature_ptr->prace == RACE_MERFOLK) {
- if (have_flag(f_ptr->flags, FF_WATER) ^ have_flag(of_ptr->flags, FF_WATER)) {
+ if (has_flag(f_ptr->flags, FF_WATER) ^ has_flag(of_ptr->flags, FF_WATER)) {
creature_ptr->update |= PU_BONUS;
update_creature(creature_ptr);
}
if (!(mpe_mode & MPE_DONT_PICKUP))
carry(creature_ptr, (mpe_mode & MPE_DO_PICKUP) ? TRUE : FALSE);
- if (have_flag(f_ptr->flags, FF_STORE)) {
+ if (has_flag(f_ptr->flags, FF_STORE)) {
disturb(creature_ptr, FALSE, TRUE);
free_turn(creature_ptr);
command_new = SPECIAL_KEY_STORE;
- } else if (have_flag(f_ptr->flags, FF_BLDG)) {
+ } else if (has_flag(f_ptr->flags, FF_BLDG)) {
disturb(creature_ptr, FALSE, TRUE);
free_turn(creature_ptr);
command_new = SPECIAL_KEY_BUILDING;
- } else if (have_flag(f_ptr->flags, FF_QUEST_ENTER)) {
+ } else if (has_flag(f_ptr->flags, FF_QUEST_ENTER)) {
disturb(creature_ptr, FALSE, TRUE);
free_turn(creature_ptr);
command_new = SPECIAL_KEY_QUEST;
- } else if (have_flag(f_ptr->flags, FF_QUEST_EXIT)) {
+ } else if (has_flag(f_ptr->flags, FF_QUEST_EXIT)) {
if (quest[floor_ptr->inside_quest].type == QUEST_TYPE_FIND_EXIT)
complete_quest(creature_ptr, floor_ptr->inside_quest);
creature_ptr->oldpx = 0;
creature_ptr->oldpy = 0;
creature_ptr->leaving = TRUE;
- } else if (have_flag(f_ptr->flags, FF_HIT_TRAP) && !(mpe_mode & MPE_STAYING)) {
+ } else if (has_flag(f_ptr->flags, FF_HIT_TRAP) && !(mpe_mode & MPE_STAYING)) {
disturb(creature_ptr, FALSE, TRUE);
- if (g_ptr->mimic || have_flag(f_ptr->flags, FF_SECRET)) {
+ if (g_ptr->mimic || has_flag(f_ptr->flags, FF_SECRET)) {
msg_print(_("トラップだ!", "You found a trap!"));
disclose_grid(creature_ptr, creature_ptr->y, creature_ptr->x);
}
bool trap_can_be_ignored(player_type *creature_ptr, FEAT_IDX feat)
{
feature_type *f_ptr = &f_info[feat];
- if (!have_flag(f_ptr->flags, FF_TRAP))
+ if (!has_flag(f_ptr->flags, FF_TRAP))
return TRUE;
switch (f_ptr->subtype) {
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_XTRA_MIGHT))
+ if (has_flag(flgs, TR_XTRA_MIGHT))
result |= 0x01 << (i - INVEN_RARM);
}
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_ESP_EVIL))
+ if (has_flag(flgs, TR_ESP_EVIL))
result |= 0x01 << (i - INVEN_RARM);
}
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_ESP_ANIMAL))
+ if (has_flag(flgs, TR_ESP_ANIMAL))
result |= 0x01 << (i - INVEN_RARM);
}
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_ESP_UNDEAD))
+ if (has_flag(flgs, TR_ESP_UNDEAD))
result |= 0x01 << (i - INVEN_RARM);
}
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_ESP_DEMON))
+ if (has_flag(flgs, TR_ESP_DEMON))
result |= 0x01 << (i - INVEN_RARM);
}
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_ESP_ORC))
+ if (has_flag(flgs, TR_ESP_ORC))
result |= 0x01 << (i - INVEN_RARM);
}
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_ESP_TROLL))
+ if (has_flag(flgs, TR_ESP_TROLL))
result |= 0x01 << (i - INVEN_RARM);
}
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_ESP_GIANT))
+ if (has_flag(flgs, TR_ESP_GIANT))
result |= 0x01 << (i - INVEN_RARM);
}
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_ESP_DRAGON))
+ if (has_flag(flgs, TR_ESP_DRAGON))
result |= 0x01 << (i - INVEN_RARM);
}
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_ESP_HUMAN))
+ if (has_flag(flgs, TR_ESP_HUMAN))
creature_ptr->esp_human = TRUE;
}
}
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_ESP_GOOD))
+ if (has_flag(flgs, TR_ESP_GOOD))
creature_ptr->esp_good = TRUE;
}
}
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_ESP_NONLIVING))
+ if (has_flag(flgs, TR_ESP_NONLIVING))
creature_ptr->esp_nonliving = TRUE;
}
}
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_ESP_UNIQUE))
+ if (has_flag(flgs, TR_ESP_UNIQUE))
creature_ptr->esp_unique = TRUE;
}
}
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_TELEPATHY))
+ if (has_flag(flgs, TR_TELEPATHY))
creature_ptr->telepathy = TRUE;
}
}
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_BLESSED))
+ if (has_flag(flgs, TR_BLESSED))
creature_ptr->bless_blade = TRUE;
}
}
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_DEC_MANA))
+ if (has_flag(flgs, TR_DEC_MANA))
creature_ptr->dec_mana = TRUE;
}
}
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_REFLECT))
+ if (has_flag(flgs, TR_REFLECT))
creature_ptr->reflect = TRUE;
}
}
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_WARNING)) {
+ if (has_flag(flgs, TR_WARNING)) {
if (!o_ptr->inscription || !(angband_strchr(quark_str(o_ptr->inscription), '$')))
creature_ptr->warning = TRUE;
}
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_NO_MAGIC))
+ if (has_flag(flgs, TR_NO_MAGIC))
creature_ptr->anti_magic = TRUE;
}
}
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_NO_TELE))
+ if (has_flag(flgs, TR_NO_TELE))
creature_ptr->anti_tele = TRUE;
}
}
continue;
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_SH_FIRE))
+ if (has_flag(flgs, TR_SH_FIRE))
creature_ptr->sh_fire = TRUE;
}
}
continue;
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_SH_ELEC))
+ if (has_flag(flgs, TR_SH_ELEC))
creature_ptr->sh_elec = TRUE;
}
}
continue;
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_SH_COLD))
+ if (has_flag(flgs, TR_SH_COLD))
creature_ptr->sh_cold = TRUE;
}
}
continue;
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_EASY_SPELL))
+ if (has_flag(flgs, TR_EASY_SPELL))
creature_ptr->easy_spell = TRUE;
}
}
continue;
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_HOLD_EXP))
+ if (has_flag(flgs, TR_HOLD_EXP))
creature_ptr->hold_exp = TRUE;
}
}
continue;
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_SEE_INVIS))
+ if (has_flag(flgs, TR_SEE_INVIS))
creature_ptr->see_inv = TRUE;
}
}
continue;
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_FREE_ACT))
+ if (has_flag(flgs, TR_FREE_ACT))
creature_ptr->free_act = TRUE;
}
}
continue;
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_SUST_STR))
+ if (has_flag(flgs, TR_SUST_STR))
creature_ptr->sustain_str = TRUE;
}
}
continue;
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_SUST_INT))
+ if (has_flag(flgs, TR_SUST_INT))
creature_ptr->sustain_int = TRUE;
}
}
continue;
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_SUST_WIS))
+ if (has_flag(flgs, TR_SUST_WIS))
creature_ptr->sustain_wis = TRUE;
}
}
continue;
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_SUST_DEX))
+ if (has_flag(flgs, TR_SUST_DEX))
creature_ptr->sustain_dex = TRUE;
}
}
continue;
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_SUST_CON))
+ if (has_flag(flgs, TR_SUST_CON))
creature_ptr->sustain_con = TRUE;
}
}
continue;
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_SUST_CHR))
+ if (has_flag(flgs, TR_SUST_CHR))
creature_ptr->sustain_chr = TRUE;
}
}
if (!o_ptr->k_idx)
continue;
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_LEVITATION))
+ if (has_flag(flgs, TR_LEVITATION))
creature_ptr->levitation = TRUE;
}
}
if (!o_ptr->k_idx)
continue;
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_SLOW_DIGEST))
+ if (has_flag(flgs, TR_SLOW_DIGEST))
creature_ptr->slow_digest = TRUE;
}
}
if (!o_ptr->k_idx)
continue;
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_REGEN))
+ if (has_flag(flgs, TR_REGEN))
creature_ptr->regenerate = TRUE;
}
}
if (!o_ptr->k_idx)
continue;
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_AGGRAVATE))
+ if (has_flag(flgs, TR_AGGRAVATE))
creature_ptr->cursed |= TRC_AGGRAVATE;
- if (have_flag(flgs, TR_DRAIN_EXP))
+ if (has_flag(flgs, TR_DRAIN_EXP))
creature_ptr->cursed |= TRC_DRAIN_EXP;
- if (have_flag(flgs, TR_TY_CURSE))
+ if (has_flag(flgs, TR_TY_CURSE))
creature_ptr->cursed |= TRC_TY_CURSE;
- if (have_flag(flgs, TR_ADD_L_CURSE))
+ if (has_flag(flgs, TR_ADD_L_CURSE))
creature_ptr->cursed |= TRC_ADD_L_CURSE;
- if (have_flag(flgs, TR_ADD_H_CURSE))
+ if (has_flag(flgs, TR_ADD_H_CURSE))
creature_ptr->cursed |= TRC_ADD_H_CURSE;
- if (have_flag(flgs, TR_DRAIN_HP))
+ if (has_flag(flgs, TR_DRAIN_HP))
creature_ptr->cursed |= TRC_DRAIN_HP;
- if (have_flag(flgs, TR_DRAIN_MANA))
+ if (has_flag(flgs, TR_DRAIN_MANA))
creature_ptr->cursed |= TRC_DRAIN_MANA;
- if (have_flag(flgs, TR_CALL_ANIMAL))
+ if (has_flag(flgs, TR_CALL_ANIMAL))
creature_ptr->cursed |= TRC_CALL_ANIMAL;
- if (have_flag(flgs, TR_CALL_DEMON))
+ if (has_flag(flgs, TR_CALL_DEMON))
creature_ptr->cursed |= TRC_CALL_DEMON;
- if (have_flag(flgs, TR_CALL_DRAGON))
+ if (has_flag(flgs, TR_CALL_DRAGON))
creature_ptr->cursed |= TRC_CALL_DRAGON;
- if (have_flag(flgs, TR_CALL_UNDEAD))
+ if (has_flag(flgs, TR_CALL_UNDEAD))
creature_ptr->cursed |= TRC_CALL_UNDEAD;
- if (have_flag(flgs, TR_COWARDICE))
+ if (has_flag(flgs, TR_COWARDICE))
creature_ptr->cursed |= TRC_COWARDICE;
- if (have_flag(flgs, TR_LOW_MELEE))
+ if (has_flag(flgs, TR_LOW_MELEE))
creature_ptr->cursed |= TRC_LOW_MELEE;
- if (have_flag(flgs, TR_LOW_AC))
+ if (has_flag(flgs, TR_LOW_AC))
creature_ptr->cursed |= TRC_LOW_AC;
- if (have_flag(flgs, TR_LOW_MAGIC))
+ if (has_flag(flgs, TR_LOW_MAGIC))
creature_ptr->cursed |= TRC_LOW_MAGIC;
- if (have_flag(flgs, TR_FAST_DIGEST))
+ if (has_flag(flgs, TR_FAST_DIGEST))
creature_ptr->cursed |= TRC_FAST_DIGEST;
- if (have_flag(flgs, TR_SLOW_REGEN))
+ if (has_flag(flgs, TR_SLOW_REGEN))
creature_ptr->cursed |= TRC_SLOW_REGEN;
creature_ptr->cursed |= (o_ptr->curse_flags & (0xFFFFFFF0L));
if (o_ptr->name1 == ART_CHAINSWORD)
creature_ptr->cursed |= TRC_CHAINSWORD;
- if (have_flag(flgs, TR_TELEPORT)) {
+ if (has_flag(flgs, TR_TELEPORT)) {
if (object_is_cursed(o_ptr))
creature_ptr->cursed |= TRC_TELEPORT;
else {
if (!o_ptr->k_idx)
continue;
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_IMPACT))
+ if (has_flag(flgs, TR_IMPACT))
creature_ptr->impact[(i == INVEN_RARM) ? 0 : 1] = TRUE;
}
}
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_INFRA))
+ if (has_flag(flgs, TR_INFRA))
creature_ptr->see_infra += o_ptr->pval;
- if (have_flag(flgs, TR_BLOWS)) {
+ if (has_flag(flgs, TR_BLOWS)) {
if ((i == INVEN_RARM || i == INVEN_RIGHT) && !have_two_handed_weapons(creature_ptr))
creature_ptr->extra_blows[0] += o_ptr->pval;
else if ((i == INVEN_LARM || i == INVEN_LEFT) && !have_two_handed_weapons(creature_ptr))
continue;
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_RES_ACID))
+ if (has_flag(flgs, TR_RES_ACID))
creature_ptr->resist_acid = TRUE;
}
continue;
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_RES_ELEC))
+ if (has_flag(flgs, TR_RES_ELEC))
creature_ptr->resist_elec = TRUE;
}
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_RES_FIRE))
+ if (has_flag(flgs, TR_RES_FIRE))
creature_ptr->resist_fire = TRUE;
}
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_RES_COLD))
+ if (has_flag(flgs, TR_RES_COLD))
creature_ptr->resist_cold = TRUE;
}
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_RES_POIS))
+ if (has_flag(flgs, TR_RES_POIS))
creature_ptr->resist_pois = TRUE;
}
}
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_RES_CONF))
+ if (has_flag(flgs, TR_RES_CONF))
creature_ptr->resist_conf = TRUE;
}
}
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_RES_SOUND))
+ if (has_flag(flgs, TR_RES_SOUND))
creature_ptr->resist_sound = TRUE;
}
}
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_RES_LITE))
+ if (has_flag(flgs, TR_RES_LITE))
creature_ptr->resist_lite = TRUE;
}
}
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_RES_DARK))
+ if (has_flag(flgs, TR_RES_DARK))
creature_ptr->resist_dark = TRUE;
}
}
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_RES_CHAOS))
+ if (has_flag(flgs, TR_RES_CHAOS))
creature_ptr->resist_chaos = TRUE;
}
}
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_RES_DISEN))
+ if (has_flag(flgs, TR_RES_DISEN))
creature_ptr->resist_disen = TRUE;
}
}
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_RES_DISEN))
+ if (has_flag(flgs, TR_RES_DISEN))
creature_ptr->resist_shard = TRUE;
}
}
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_RES_NEXUS))
+ if (has_flag(flgs, TR_RES_NEXUS))
creature_ptr->resist_nexus = TRUE;
}
}
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_RES_BLIND))
+ if (has_flag(flgs, TR_RES_BLIND))
creature_ptr->resist_blind = TRUE;
}
}
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_RES_NETHER))
+ if (has_flag(flgs, TR_RES_NETHER))
creature_ptr->resist_neth = TRUE;
}
}
continue;
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_RES_FEAR))
+ if (has_flag(flgs, TR_RES_FEAR))
creature_ptr->resist_fear = TRUE;
}
}
continue;
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_IM_ACID))
+ if (has_flag(flgs, TR_IM_ACID))
creature_ptr->immune_acid = TRUE;
}
}
continue;
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_IM_ELEC))
+ if (has_flag(flgs, TR_IM_ELEC))
creature_ptr->immune_elec = TRUE;
}
}
continue;
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_IM_FIRE))
+ if (has_flag(flgs, TR_IM_FIRE))
creature_ptr->immune_fire = TRUE;
}
}
continue;
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_IM_COLD))
+ if (has_flag(flgs, TR_IM_COLD))
creature_ptr->immune_cold = TRUE;
}
}
o_ptr = &creature_ptr->inventory_list[INVEN_RARM + i];
object_flags(creature_ptr, o_ptr, flgs);
- if ((creature_ptr->pclass == CLASS_PRIEST) && (!(have_flag(flgs, TR_BLESSED))) && ((o_ptr->tval == TV_SWORD) || (o_ptr->tval == TV_POLEARM))) {
+ if ((creature_ptr->pclass == CLASS_PRIEST) && (!(has_flag(flgs, TR_BLESSED))) && ((o_ptr->tval == TV_SWORD) || (o_ptr->tval == TV_POLEARM))) {
return TRUE;
} else if (creature_ptr->pclass == CLASS_SORCERER) {
if (!((o_ptr->tval == TV_HAFTED) && ((o_ptr->sval == SV_WIZSTAFF) || (o_ptr->sval == SV_NAMAKE_HAMMER)))) {
o_ptr = &creature_ptr->inventory_list[INVEN_RARM + i];
object_flags(creature_ptr, o_ptr, flgs);
if (creature_ptr->riding != 0 && !(o_ptr->tval == TV_POLEARM) && ((o_ptr->sval == SV_LANCE) || (o_ptr->sval == SV_HEAVY_LANCE))
- && !have_flag(flgs, TR_RIDING)) {
+ && !has_flag(flgs, TR_RIDING)) {
return TRUE;
}
return FALSE;
object_type *o_ptr;
o_ptr = &creature_ptr->inventory_list[INVEN_HANDS];
object_flags(creature_ptr, o_ptr, flgs);
- if (o_ptr->k_idx && !(have_flag(flgs, TR_FREE_ACT)) && !(have_flag(flgs, TR_DEC_MANA)) && !(have_flag(flgs, TR_EASY_SPELL))
- && !((have_flag(flgs, TR_MAGIC_MASTERY)) && (o_ptr->pval > 0)) && !((have_flag(flgs, TR_DEX)) && (o_ptr->pval > 0))) {
+ if (o_ptr->k_idx && !(has_flag(flgs, TR_FREE_ACT)) && !(has_flag(flgs, TR_DEC_MANA)) && !(has_flag(flgs, TR_EASY_SPELL))
+ && !((has_flag(flgs, TR_MAGIC_MASTERY)) && (o_ptr->pval > 0)) && !((has_flag(flgs, TR_DEX)) && (o_ptr->pval > 0))) {
creature_ptr->cumber_glove = TRUE;
msp = (3 * msp) / 4;
}
continue;
object_flags(creature_ptr, q_ptr, flgs);
- if (have_flag(flgs, TR_XTRA_SHOTS))
+ if (has_flag(flgs, TR_XTRA_SHOTS))
extra_shots++;
}
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_XTRA_SHOTS))
+ if (has_flag(flgs, TR_XTRA_SHOTS))
extra_shots++;
int num = 0;
if (!o_ptr->k_idx)
continue;
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_INFRA))
+ if (has_flag(flgs, TR_INFRA))
pow += o_ptr->pval;
}
if (!o_ptr->k_idx)
continue;
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_STEALTH))
+ if (has_flag(flgs, TR_STEALTH))
pow += o_ptr->pval;
}
if (!o_ptr->k_idx)
continue;
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_MAGIC_MASTERY))
+ if (has_flag(flgs, TR_MAGIC_MASTERY))
pow += 8 * o_ptr->pval;
}
if (!o_ptr->k_idx)
continue;
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_SEARCH))
+ if (has_flag(flgs, TR_SEARCH))
pow += (o_ptr->pval * 5);
}
if (!o_ptr->k_idx)
continue;
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_SEARCH))
+ if (has_flag(flgs, TR_SEARCH))
pow += (o_ptr->pval * 5);
}
if (!o_ptr->k_idx)
continue;
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_TUNNEL))
+ if (has_flag(flgs, TR_TUNNEL))
pow += (o_ptr->pval * 20);
}
wgt = class_info[creature_ptr->pclass].wgt;
mul = class_info[creature_ptr->pclass].mul;
- if (creature_ptr->pclass == CLASS_CAVALRY && (creature_ptr->riding) && (have_flag(flgs, TR_RIDING))) {
+ if (creature_ptr->pclass == CLASS_CAVALRY && (creature_ptr->riding) && (has_flag(flgs, TR_RIDING))) {
num = 5;
wgt = 70;
mul = 4;
if (!o_ptr->k_idx)
continue;
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_STR)) {
+ if (has_flag(flgs, TR_STR)) {
pow += o_ptr->pval;
}
}
if (!o_ptr->k_idx)
continue;
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_INT)) {
+ if (has_flag(flgs, TR_INT)) {
pow += o_ptr->pval;
}
}
if (!o_ptr->k_idx)
continue;
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_WIS)) {
+ if (has_flag(flgs, TR_WIS)) {
pow += o_ptr->pval;
}
}
if (!o_ptr->k_idx)
continue;
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_DEX)) {
+ if (has_flag(flgs, TR_DEX)) {
pow += o_ptr->pval;
}
}
if (!o_ptr->k_idx)
continue;
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_CON))
+ if (has_flag(flgs, TR_CON))
pow += o_ptr->pval;
}
if (!o_ptr->k_idx)
continue;
object_flags(creature_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_CHR))
+ if (has_flag(flgs, TR_CHR))
pow += o_ptr->pval;
}
if (!o_ptr->k_idx)
continue;
- if (have_flag(flgs, TR_SPEED))
+ if (has_flag(flgs, TR_SPEED))
pow += o_ptr->pval;
}
}
if (creature_ptr->prace == RACE_MERFOLK) {
- if (have_flag(f_ptr->flags, FF_WATER)) {
+ if (has_flag(f_ptr->flags, FF_WATER)) {
pow += (2 + creature_ptr->lev / 10);
} else if (!creature_ptr->levitation) {
pow -= 2;
damage -= 5;
}
- if ((creature_ptr->pclass == CLASS_PRIEST) && (!(have_flag(flgs, TR_BLESSED))) && ((o_ptr->tval == TV_SWORD) || (o_ptr->tval == TV_POLEARM))) {
+ if ((creature_ptr->pclass == CLASS_PRIEST) && (!(has_flag(flgs, TR_BLESSED))) && ((o_ptr->tval == TV_SWORD) || (o_ptr->tval == TV_POLEARM))) {
damage -= 2;
} else if (creature_ptr->pclass == CLASS_BERSERKER) {
damage += creature_ptr->lev / 6;
hit += ((int)(adj_dex_th[creature_ptr->stat_ind[A_DEX]]) - 128);
hit += ((int)(adj_str_th[creature_ptr->stat_ind[A_STR]]) - 128);
- if ((creature_ptr->pclass == CLASS_PRIEST) && (!(have_flag(flgs, TR_BLESSED))) && ((o_ptr->tval == TV_SWORD) || (o_ptr->tval == TV_POLEARM))) {
+ if ((creature_ptr->pclass == CLASS_PRIEST) && (!(has_flag(flgs, TR_BLESSED))) && ((o_ptr->tval == TV_SWORD) || (o_ptr->tval == TV_POLEARM))) {
hit -= 2;
} else if (creature_ptr->pclass == CLASS_BERSERKER) {
hit += creature_ptr->lev / 5;
}
if (creature_ptr->riding != 0 && !(o_ptr->tval == TV_POLEARM) && ((o_ptr->sval == SV_LANCE) || (o_ptr->sval == SV_HEAVY_LANCE))
- && !have_flag(flgs, TR_RIDING)) {
+ && !has_flag(flgs, TR_RIDING)) {
int penalty;
if ((creature_ptr->pclass == CLASS_BEASTMASTER) || (creature_ptr->pclass == CLASS_CAVALRY)) {
if (!o_ptr->k_idx) continue;
object_flags_known(creature_ptr, o_ptr, o_flags);
- if (have_flag(o_flags, TR_IM_ACID)) add_flag(flags, TR_RES_ACID);
- if (have_flag(o_flags, TR_IM_ELEC)) add_flag(flags, TR_RES_ELEC);
- if (have_flag(o_flags, TR_IM_FIRE)) add_flag(flags, TR_RES_FIRE);
- if (have_flag(o_flags, TR_IM_COLD)) add_flag(flags, TR_RES_COLD);
+ if (has_flag(o_flags, TR_IM_ACID)) add_flag(flags, TR_RES_ACID);
+ if (has_flag(o_flags, TR_IM_ELEC)) add_flag(flags, TR_RES_ELEC);
+ if (has_flag(o_flags, TR_IM_FIRE)) add_flag(flags, TR_RES_FIRE);
+ if (has_flag(o_flags, TR_IM_COLD)) add_flag(flags, TR_RES_COLD);
}
}
info[i++] = _("あなたの魅力は維持されている。", "Your charisma is sustained.");
}
- if (have_flag(flgs, TR_STR)) {
+ if (has_flag(flgs, TR_STR)) {
info[i++] = _("あなたの腕力は装備によって影響を受けている。", "Your strength is affected by your equipment.");
}
- if (have_flag(flgs, TR_INT)) {
+ if (has_flag(flgs, TR_INT)) {
info[i++] = _("あなたの知能は装備によって影響を受けている。", "Your intelligence is affected by your equipment.");
}
- if (have_flag(flgs, TR_WIS)) {
+ if (has_flag(flgs, TR_WIS)) {
info[i++] = _("あなたの賢さは装備によって影響を受けている。", "Your wisdom is affected by your equipment.");
}
- if (have_flag(flgs, TR_DEX)) {
+ if (has_flag(flgs, TR_DEX)) {
info[i++] = _("あなたの器用さは装備によって影響を受けている。", "Your dexterity is affected by your equipment.");
}
- if (have_flag(flgs, TR_CON)) {
+ if (has_flag(flgs, TR_CON)) {
info[i++] = _("あなたの耐久力は装備によって影響を受けている。", "Your constitution is affected by your equipment.");
}
- if (have_flag(flgs, TR_CHR)) {
+ if (has_flag(flgs, TR_CHR)) {
info[i++] = _("あなたの魅力は装備によって影響を受けている。", "Your charisma is affected by your equipment.");
}
- if (have_flag(flgs, TR_STEALTH)) {
+ if (has_flag(flgs, TR_STEALTH)) {
info[i++] = _("あなたの隠密行動能力は装備によって影響を受けている。", "Your stealth is affected by your equipment.");
}
- if (have_flag(flgs, TR_SEARCH)) {
+ if (has_flag(flgs, TR_SEARCH)) {
info[i++] = _("あなたの探索能力は装備によって影響を受けている。", "Your searching ability is affected by your equipment.");
}
- if (have_flag(flgs, TR_INFRA)) {
+ if (has_flag(flgs, TR_INFRA)) {
info[i++] = _("あなたの赤外線視力は装備によって影響を受けている。", "Your infravision is affected by your equipment.");
}
- if (have_flag(flgs, TR_TUNNEL)) {
+ if (has_flag(flgs, TR_TUNNEL)) {
info[i++] = _("あなたの採掘能力は装備によって影響を受けている。", "Your digging ability is affected by your equipment.");
}
- if (have_flag(flgs, TR_SPEED)) {
+ if (has_flag(flgs, TR_SPEED)) {
info[i++] = _("あなたのスピードは装備によって影響を受けている。", "Your speed is affected by your equipment.");
}
- if (have_flag(flgs, TR_BLOWS)) {
+ if (has_flag(flgs, TR_BLOWS)) {
info[i++] = _("あなたの攻撃速度は装備によって影響を受けている。", "Your attack speed is affected by your equipment.");
}
/* Analyze the weapon */
if (o_ptr->k_idx) {
/* Indicate Blessing */
- if (have_flag(flgs, TR_BLESSED)) {
+ if (has_flag(flgs, TR_BLESSED)) {
info[i++] = _("あなたの武器は神の祝福を受けている。", "Your weapon has been blessed by the gods.");
}
- if (have_flag(flgs, TR_CHAOTIC)) {
+ if (has_flag(flgs, TR_CHAOTIC)) {
info[i++] = _("あなたの武器はログルスの徴の属性をもつ。", "Your weapon is branded with the Sign of Logrus.");
}
- if (have_flag(flgs, TR_IMPACT)) {
+ if (has_flag(flgs, TR_IMPACT)) {
info[i++] = _("あなたの武器は打撃で地震を発生することができる。", "The impact of your weapon can cause earthquakes.");
}
- if (have_flag(flgs, TR_VORPAL)) {
+ if (has_flag(flgs, TR_VORPAL)) {
info[i++] = _("あなたの武器は非常に鋭い。", "Your weapon is very sharp.");
}
- if (have_flag(flgs, TR_VAMPIRIC)) {
+ if (has_flag(flgs, TR_VAMPIRIC)) {
info[i++] = _("あなたの武器は敵から生命力を吸収する。", "Your weapon drains life from your foes.");
}
/* Special "Attack Bonuses" */
- if (have_flag(flgs, TR_BRAND_ACID)) {
+ if (has_flag(flgs, TR_BRAND_ACID)) {
info[i++] = _("あなたの武器は敵を溶かす。", "Your weapon melts your foes.");
}
- if (have_flag(flgs, TR_BRAND_ELEC)) {
+ if (has_flag(flgs, TR_BRAND_ELEC)) {
info[i++] = _("あなたの武器は敵を感電させる。", "Your weapon shocks your foes.");
}
- if (have_flag(flgs, TR_BRAND_FIRE)) {
+ if (has_flag(flgs, TR_BRAND_FIRE)) {
info[i++] = _("あなたの武器は敵を燃やす。", "Your weapon burns your foes.");
}
- if (have_flag(flgs, TR_BRAND_COLD)) {
+ if (has_flag(flgs, TR_BRAND_COLD)) {
info[i++] = _("あなたの武器は敵を凍らせる。", "Your weapon freezes your foes.");
}
- if (have_flag(flgs, TR_BRAND_POIS)) {
+ if (has_flag(flgs, TR_BRAND_POIS)) {
info[i++] = _("あなたの武器は敵を毒で侵す。", "Your weapon poisons your foes.");
}
/* Special "slay" flags */
- if (have_flag(flgs, TR_KILL_ANIMAL)) {
+ if (has_flag(flgs, TR_KILL_ANIMAL)) {
info[i++] = _("あなたの武器は動物の天敵である。", "Your weapon is a great bane of animals.");
- } else if (have_flag(flgs, TR_SLAY_ANIMAL)) {
+ } else if (has_flag(flgs, TR_SLAY_ANIMAL)) {
info[i++] = _("あなたの武器は動物に対して強い力を発揮する。", "Your weapon strikes at animals with extra force.");
}
- if (have_flag(flgs, TR_KILL_EVIL)) {
+ if (has_flag(flgs, TR_KILL_EVIL)) {
info[i++] = _("あなたの武器は邪悪なる存在の天敵である。", "Your weapon is a great bane of evil.");
- } else if (have_flag(flgs, TR_SLAY_EVIL)) {
+ } else if (has_flag(flgs, TR_SLAY_EVIL)) {
info[i++] = _("あなたの武器は邪悪なる存在に対して強い力を発揮する。", "Your weapon strikes at evil with extra force.");
}
- if (have_flag(flgs, TR_KILL_HUMAN)) {
+ if (has_flag(flgs, TR_KILL_HUMAN)) {
info[i++] = _("あなたの武器は人間の天敵である。", "Your weapon is a great bane of humans.");
- } else if (have_flag(flgs, TR_SLAY_HUMAN)) {
+ } else if (has_flag(flgs, TR_SLAY_HUMAN)) {
info[i++] = _("あなたの武器は人間に対して特に強い力を発揮する。", "Your weapon is especially deadly against humans.");
}
- if (have_flag(flgs, TR_KILL_UNDEAD)) {
+ if (has_flag(flgs, TR_KILL_UNDEAD)) {
info[i++] = _("あなたの武器はアンデッドの天敵である。", "Your weapon is a great bane of undead.");
- } else if (have_flag(flgs, TR_SLAY_UNDEAD)) {
+ } else if (has_flag(flgs, TR_SLAY_UNDEAD)) {
info[i++] = _("あなたの武器はアンデッドに対して神聖なる力を発揮する。", "Your weapon strikes at undead with holy wrath.");
}
- if (have_flag(flgs, TR_KILL_DEMON)) {
+ if (has_flag(flgs, TR_KILL_DEMON)) {
info[i++] = _("あなたの武器はデーモンの天敵である。", "Your weapon is a great bane of demons.");
- } else if (have_flag(flgs, TR_SLAY_DEMON)) {
+ } else if (has_flag(flgs, TR_SLAY_DEMON)) {
info[i++] = _("あなたの武器はデーモンに対して神聖なる力を発揮する。", "Your weapon strikes at demons with holy wrath.");
}
- if (have_flag(flgs, TR_KILL_ORC)) {
+ if (has_flag(flgs, TR_KILL_ORC)) {
info[i++] = _("あなたの武器はオークの天敵である。", "Your weapon is a great bane of orcs.");
- } else if (have_flag(flgs, TR_SLAY_ORC)) {
+ } else if (has_flag(flgs, TR_SLAY_ORC)) {
info[i++] = _("あなたの武器はオークに対して特に強い力を発揮する。", "Your weapon is especially deadly against orcs.");
}
- if (have_flag(flgs, TR_KILL_TROLL)) {
+ if (has_flag(flgs, TR_KILL_TROLL)) {
info[i++] = _("あなたの武器はトロルの天敵である。", "Your weapon is a great bane of trolls.");
- } else if (have_flag(flgs, TR_SLAY_TROLL)) {
+ } else if (has_flag(flgs, TR_SLAY_TROLL)) {
info[i++] = _("あなたの武器はトロルに対して特に強い力を発揮する。", "Your weapon is especially deadly against trolls.");
}
- if (have_flag(flgs, TR_KILL_GIANT)) {
+ if (has_flag(flgs, TR_KILL_GIANT)) {
info[i++] = _("あなたの武器は巨人の天敵である。", "Your weapon is a great bane of giants.");
- } else if (have_flag(flgs, TR_SLAY_GIANT)) {
+ } else if (has_flag(flgs, TR_SLAY_GIANT)) {
info[i++] = _("あなたの武器は巨人に対して特に強い力を発揮する。", "Your weapon is especially deadly against giants.");
}
/* Special "kill" flags */
- if (have_flag(flgs, TR_KILL_DRAGON)) {
+ if (has_flag(flgs, TR_KILL_DRAGON)) {
info[i++] = _("あなたの武器はドラゴンの天敵である。", "Your weapon is a great bane of dragons.");
- } else if (have_flag(flgs, TR_SLAY_DRAGON)) {
+ } else if (has_flag(flgs, TR_SLAY_DRAGON)) {
info[i++] = _("あなたの武器はドラゴンに対して特に強い力を発揮する。", "Your weapon is especially deadly against dragons.");
}
- if (have_flag(flgs, TR_FORCE_WEAPON)) {
+ if (has_flag(flgs, TR_FORCE_WEAPON)) {
info[i++] = _("あなたの武器はMPを使って攻撃する。", "Your weapon causes greate damages using your MP.");
}
- if (have_flag(flgs, TR_THROW)) {
+ if (has_flag(flgs, TR_THROW)) {
info[i++] = _("あなたの武器は投げやすい。", "Your weapon can be thrown well.");
}
}
if (!get_check(format(_("本当に %s を呪いますか?", "Do you curse %s, really?"), o_name)))
return FALSE;
- if (!one_in_(3) && (object_is_artifact(o_ptr) || have_flag(f, TR_BLESSED))) {
+ if (!one_in_(3) && (object_is_artifact(o_ptr) || has_flag(f, TR_BLESSED))) {
msg_format(_("%s は呪いを跳ね返した。", "%s resists the effect."), o_name);
if (one_in_(3)) {
if (o_ptr->to_d > 0) {
if (!get_check(format(_("本当に %s を呪いますか?", "Do you curse %s, really?"), o_name)))
return FALSE;
- if (!one_in_(3) && (object_is_artifact(o_ptr) || have_flag(f, TR_BLESSED))) {
+ if (!one_in_(3) && (object_is_artifact(o_ptr) || has_flag(f, TR_BLESSED))) {
msg_format(_("%s は呪いを跳ね返した。", "%s resists the effect."), o_name);
if (one_in_(3)) {
if (o_ptr->to_d > 0) {
object_flags(caster_ptr, o_ptr, f);
caster_ptr->csp += (caster_ptr->lev / 5) + randint1(caster_ptr->lev / 5);
- if (have_flag(f, TR_TY_CURSE) || (o_ptr->curse_flags & TRC_TY_CURSE))
+ if (has_flag(f, TR_TY_CURSE) || (o_ptr->curse_flags & TRC_TY_CURSE))
caster_ptr->csp += randint1(5);
if (caster_ptr->csp > caster_ptr->msp)
caster_ptr->csp = caster_ptr->msp;
/* vorpal blade */
basedam *= 5;
basedam /= 3;
- } else if (have_flag(flgs, TR_VORPAL)) {
+ } else if (has_flag(flgs, TR_VORPAL)) {
/* vorpal flag only */
basedam *= 11;
basedam /= 9;
/* vorpal blade */
basedam *= 5;
basedam /= 3;
- } else if (have_flag(flgs, TR_VORPAL)) {
+ } else if (has_flag(flgs, TR_VORPAL)) {
/* vorpal flag only */
basedam *= 11;
basedam /= 9;
}
for (j = 0; j < max_f_idx; j++) {
- if (have_flag(f_info[j].flags, FF_STORE)) {
+ if (has_flag(f_info[j].flags, FF_STORE)) {
if (f_info[j].subtype == stores[i])
break;
}
if (!(attacker_ptr->resist_pois || is_oppose_pois(attacker_ptr)) && (*magnification < 25))
*magnification = 25;
- if ((attacker_ptr->pclass != CLASS_SAMURAI) && (have_flag(death_scythe_flags, TR_FORCE_WEAPON)) && (attacker_ptr->csp > (attacker_ptr->msp / 30))) {
+ if ((attacker_ptr->pclass != CLASS_SAMURAI) && (has_flag(death_scythe_flags, TR_FORCE_WEAPON)) && (attacker_ptr->csp > (attacker_ptr->msp / 30))) {
attacker_ptr->csp -= (1 + (attacker_ptr->msp / 30));
attacker_ptr->redraw |= (PR_MANA);
*magnification = *magnification * 3 / 2 + 20;
object_flags(creature_ptr, o_ptr, flgs);
POSITION rad = 0;
- if (have_flag(flgs, TR_LITE_1) && o_ptr->name2 != EGO_LITE_DARKNESS)
+ if (has_flag(flgs, TR_LITE_1) && o_ptr->name2 != EGO_LITE_DARKNESS)
rad += 1;
- if (have_flag(flgs, TR_LITE_2) && o_ptr->name2 != EGO_LITE_DARKNESS)
+ if (has_flag(flgs, TR_LITE_2) && o_ptr->name2 != EGO_LITE_DARKNESS)
rad += 2;
- if (have_flag(flgs, TR_LITE_3) && o_ptr->name2 != EGO_LITE_DARKNESS)
+ if (has_flag(flgs, TR_LITE_3) && o_ptr->name2 != EGO_LITE_DARKNESS)
rad += 3;
- if (have_flag(flgs, TR_LITE_M1))
+ if (has_flag(flgs, TR_LITE_M1))
rad -= 1;
- if (have_flag(flgs, TR_LITE_M2))
+ if (has_flag(flgs, TR_LITE_M2))
rad -= 2;
- if (have_flag(flgs, TR_LITE_M3))
+ if (has_flag(flgs, TR_LITE_M3))
rad -= 3;
creature_ptr->cur_lite += rad;
if (!in_bounds2(floor_ptr, yyy, xxx))
continue;
cc_ptr = &floor_ptr->grid_array[yyy][xxx];
- if (have_flag(f_info[get_feat_mimic(cc_ptr)].flags, FF_GLOW)) {
+ if (has_flag(f_info[get_feat_mimic(cc_ptr)].flags, FF_GLOW)) {
g_ptr->info |= CAVE_GLOW;
break;
}
f_ptr = &f_info[feat];
/* Process all non-walls */
- if (have_flag(f_ptr->flags, FF_WALL))
+ if (has_flag(f_ptr->flags, FF_WALL))
continue;
/* Scan all neighbors */
}
/* Memorize normal features */
- if (have_flag(f_ptr->flags, FF_REMEMBER)) {
+ if (has_flag(f_ptr->flags, FF_REMEMBER)) {
/* Memorize the grid */
g_ptr->info |= (CAVE_MARK);
}
f_ptr = &f_info[feat];
/* All non-walls are "checked" */
- if (have_flag(f_ptr->flags, FF_WALL))
+ if (has_flag(f_ptr->flags, FF_WALL))
continue;
/* Memorize normal features */
- if (have_flag(f_ptr->flags, FF_REMEMBER)) {
+ if (has_flag(f_ptr->flags, FF_REMEMBER)) {
/* Memorize the object */
g_ptr->info |= (CAVE_MARK);
}
f_ptr = &f_info[feat];
/* Memorize walls (etc) */
- if (have_flag(f_ptr->flags, FF_REMEMBER)) {
+ if (has_flag(f_ptr->flags, FF_REMEMBER)) {
/* Memorize the walls */
g_ptr->info |= (CAVE_MARK);
}
if (!in_bounds2(floor_ptr, yy, xx))
continue;
cc_ptr = &floor_ptr->grid_array[yy][xx];
- if (have_flag(f_info[get_feat_mimic(cc_ptr)].flags, FF_GLOW)) {
+ if (has_flag(f_info[get_feat_mimic(cc_ptr)].flags, FF_GLOW)) {
g_ptr->info |= CAVE_GLOW;
break;
}
if (in_bounds2(caster_ptr->current_floor_ptr, by, bx)) {
grid_type *cc_ptr = &caster_ptr->current_floor_ptr->grid_array[by][bx];
- if (have_flag(f_info[get_feat_mimic(cc_ptr)].flags, FF_GLOW)) {
+ if (has_flag(f_info[get_feat_mimic(cc_ptr)].flags, FF_GLOW)) {
do_dark = FALSE;
break;
}
}
g_ptr->info &= ~(CAVE_GLOW);
- if (!have_flag(f_info[get_feat_mimic(g_ptr)].flags, FF_REMEMBER)) {
+ if (!has_flag(f_info[get_feat_mimic(g_ptr)].flags, FF_REMEMBER)) {
if (!view_torch_grids)
g_ptr->info &= ~(CAVE_MARK);
note_spot(caster_ptr, y, x);
o_ptr = &tracer_ptr->inventory_list[i];
if (o_ptr->k_idx && !object_is_cursed(o_ptr)) {
object_flags(tracer_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_TELEPORT)) {
+ if (has_flag(flgs, TR_TELEPORT)) {
follow = TRUE;
break;
}
g_ptr = &caster_ptr->current_floor_ptr->grid_array[caster_ptr->y + ddy_ddd[i]][caster_ptr->x + ddx_ddd[i]];
if (!cave_have_flag_grid(g_ptr, FF_PROJECT)) {
- if (!g_ptr->mimic || !have_flag(f_info[g_ptr->mimic].flags, FF_PROJECT) || !permanent_wall(&f_info[g_ptr->feat])) {
+ if (!g_ptr->mimic || !has_flag(f_info[g_ptr->mimic].flags, FF_PROJECT) || !permanent_wall(&f_info[g_ptr->feat])) {
do_call = FALSE;
break;
}
}
}
- if (have_flag(f_ptr->flags, FF_HURT_DISI))
+ if (has_flag(f_ptr->flags, FF_HURT_DISI))
cave_alter_feat(caster_ptr, y, x, FF_HURT_DISI);
}
}
f_ptr = &f_info[g_ptr->mimic];
g_ptr->info &= ~(CAVE_ROOM | CAVE_ICKY);
- if (g_ptr->mimic && have_flag(f_ptr->flags, FF_HURT_DISI)) {
+ if (g_ptr->mimic && has_flag(f_ptr->flags, FF_HURT_DISI)) {
g_ptr->mimic = feat_state(caster_ptr, g_ptr->mimic, FF_HURT_DISI);
- if (!have_flag(f_info[g_ptr->mimic].flags, FF_REMEMBER))
+ if (!has_flag(f_info[g_ptr->mimic].flags, FF_REMEMBER))
g_ptr->info &= ~(CAVE_MARK);
}
f_ptr = &f_info[g_ptr->mimic];
g_ptr->info &= ~(CAVE_ROOM | CAVE_ICKY);
- if (g_ptr->mimic && have_flag(f_ptr->flags, FF_HURT_DISI)) {
+ if (g_ptr->mimic && has_flag(f_ptr->flags, FF_HURT_DISI)) {
g_ptr->mimic = feat_state(caster_ptr, g_ptr->mimic, FF_HURT_DISI);
- if (!have_flag(f_info[g_ptr->mimic].flags, FF_REMEMBER))
+ if (!has_flag(f_info[g_ptr->mimic].flags, FF_REMEMBER))
g_ptr->info &= ~(CAVE_MARK);
}
}
f_ptr = &f_info[g_ptr->mimic];
g_ptr->info &= ~(CAVE_ROOM | CAVE_ICKY);
- if (g_ptr->mimic && have_flag(f_ptr->flags, FF_HURT_DISI)) {
+ if (g_ptr->mimic && has_flag(f_ptr->flags, FF_HURT_DISI)) {
g_ptr->mimic = feat_state(caster_ptr, g_ptr->mimic, FF_HURT_DISI);
- if (!have_flag(f_info[g_ptr->mimic].flags, FF_REMEMBER))
+ if (!has_flag(f_info[g_ptr->mimic].flags, FF_REMEMBER))
g_ptr->info &= ~(CAVE_MARK);
}
f_ptr = &f_info[g_ptr->mimic];
g_ptr->info &= ~(CAVE_ROOM | CAVE_ICKY);
- if (g_ptr->mimic && have_flag(f_ptr->flags, FF_HURT_DISI)) {
+ if (g_ptr->mimic && has_flag(f_ptr->flags, FF_HURT_DISI)) {
g_ptr->mimic = feat_state(caster_ptr, g_ptr->mimic, FF_HURT_DISI);
- if (!have_flag(f_info[g_ptr->mimic].flags, FF_REMEMBER))
+ if (!has_flag(f_info[g_ptr->mimic].flags, FF_REMEMBER))
g_ptr->info &= ~(CAVE_MARK);
}
}
{
BIT_FLAGS flgs[TR_FLAG_SIZE];
object_flags(player_ptr, o_ptr, flgs);
- return have_flag(flgs, TR_BLESSED);
+ return has_flag(flgs, TR_BLESSED);
}
static bool check_store_general(object_type *o_ptr)
static concptr decide_target_floor(player_type *subject_ptr, eg_type *eg_ptr)
{
- if (have_flag(eg_ptr->f_ptr->flags, FF_QUEST_ENTER)) {
+ if (has_flag(eg_ptr->f_ptr->flags, FF_QUEST_ENTER)) {
IDX old_quest = subject_ptr->current_floor_ptr->inside_quest;
for (int j = 0; j < 10; j++)
quest_text[j][0] = '\0';
_("クエスト「%s」(%d階相当)", "the entrance to the quest '%s'(level %d)"), quest[eg_ptr->g_ptr->special].name, quest[eg_ptr->g_ptr->special].level);
}
- if (have_flag(eg_ptr->f_ptr->flags, FF_BLDG) && !subject_ptr->current_floor_ptr->inside_arena)
+ if (has_flag(eg_ptr->f_ptr->flags, FF_BLDG) && !subject_ptr->current_floor_ptr->inside_arena)
return building[eg_ptr->f_ptr->subtype].name;
- if (have_flag(eg_ptr->f_ptr->flags, FF_ENTRANCE))
+ if (has_flag(eg_ptr->f_ptr->flags, FF_ENTRANCE))
return format(_("%s(%d階相当)", "%s(level %d)"), d_text + d_info[eg_ptr->g_ptr->special].text, d_info[eg_ptr->g_ptr->special].mindepth);
- if (have_flag(eg_ptr->f_ptr->flags, FF_TOWN))
+ if (has_flag(eg_ptr->f_ptr->flags, FF_TOWN))
return town_info[eg_ptr->g_ptr->special].name;
if (subject_ptr->wild_mode && (eg_ptr->feat == feat_floor))
eg_ptr->feat = feat_none;
eg_ptr->f_ptr = &f_info[eg_ptr->feat];
- if (!eg_ptr->boring && !have_flag(eg_ptr->f_ptr->flags, FF_REMEMBER))
+ if (!eg_ptr->boring && !has_flag(eg_ptr->f_ptr->flags, FF_REMEMBER))
return (eg_ptr->query != '\r') && (eg_ptr->query != '\n') ? eg_ptr->query : 0;
/*
*/
eg_ptr->name = decide_target_floor(subject_ptr, eg_ptr);
if (*eg_ptr->s2
- && ((!have_flag(eg_ptr->f_ptr->flags, FF_MOVE) && !have_flag(eg_ptr->f_ptr->flags, FF_CAN_FLY))
- || (!have_flag(eg_ptr->f_ptr->flags, FF_LOS) && !have_flag(eg_ptr->f_ptr->flags, FF_TREE)) || have_flag(eg_ptr->f_ptr->flags, FF_TOWN))) {
+ && ((!has_flag(eg_ptr->f_ptr->flags, FF_MOVE) && !has_flag(eg_ptr->f_ptr->flags, FF_CAN_FLY))
+ || (!has_flag(eg_ptr->f_ptr->flags, FF_LOS) && !has_flag(eg_ptr->f_ptr->flags, FF_TREE)) || has_flag(eg_ptr->f_ptr->flags, FF_TOWN))) {
eg_ptr->s2 = _("の中", "in ");
}
- if (have_flag(eg_ptr->f_ptr->flags, FF_STORE) || have_flag(eg_ptr->f_ptr->flags, FF_QUEST_ENTER)
- || (have_flag(eg_ptr->f_ptr->flags, FF_BLDG) && !subject_ptr->current_floor_ptr->inside_arena) || have_flag(eg_ptr->f_ptr->flags, FF_ENTRANCE))
+ if (has_flag(eg_ptr->f_ptr->flags, FF_STORE) || has_flag(eg_ptr->f_ptr->flags, FF_QUEST_ENTER)
+ || (has_flag(eg_ptr->f_ptr->flags, FF_BLDG) && !subject_ptr->current_floor_ptr->inside_arena) || has_flag(eg_ptr->f_ptr->flags, FF_ENTRANCE))
eg_ptr->s2 = _("の入口", "");
#ifdef JP
#else
- else if (have_flag(eg_ptr->f_ptr->flags, FF_FLOOR) || have_flag(eg_ptr->f_ptr->flags, FF_TOWN) || have_flag(eg_ptr->f_ptr->flags, FF_SHALLOW)
- || have_flag(eg_ptr->f_ptr->flags, FF_DEEP))
+ else if (has_flag(eg_ptr->f_ptr->flags, FF_FLOOR) || has_flag(eg_ptr->f_ptr->flags, FF_TOWN) || has_flag(eg_ptr->f_ptr->flags, FF_SHALLOW)
+ || has_flag(eg_ptr->f_ptr->flags, FF_DEEP))
eg_ptr->s3 = "";
else
eg_ptr->s3 = (is_a_vowel(eg_ptr->name[0])) ? "an " : "a ";
if (g_ptr->info & CAVE_OBJECT)
return TRUE;
- if (have_flag(f_info[get_feat_mimic(g_ptr)].flags, FF_NOTICE))
+ if (has_flag(f_info[get_feat_mimic(g_ptr)].flags, FF_NOTICE))
return TRUE;
}
#pragma once
-#define have_flag(ARRAY, INDEX) !!((ARRAY)[(INDEX) / 32] & (1L << ((INDEX) % 32)))
+#define has_flag(ARRAY, INDEX) !!((ARRAY)[(INDEX) / 32] & (1L << ((INDEX) % 32)))
#define add_flag(ARRAY, INDEX) ((ARRAY)[(INDEX) / 32] |= (1L << ((INDEX) % 32)))
#define remove_flag(ARRAY, INDEX) ((ARRAY)[(INDEX) / 32] &= ~(1L << ((INDEX) % 32)))
#define is_pval_flag(INDEX) ((TR_STR <= (INDEX) && (INDEX) <= TR_MAGIC_MASTERY) || (TR_STEALTH <= (INDEX) && (INDEX) <= TR_BLOWS))
{
if ((mode & DP_CURSE) == 0) return FALSE;
- if (have_flag(flags, TR_ADD_L_CURSE) || have_flag(flags, TR_ADD_H_CURSE))
+ if (has_flag(flags, TR_ADD_L_CURSE) || has_flag(flags, TR_ADD_H_CURSE))
{
c_put_str(TERM_L_DARK, "+", row, *col);
*header_color = TERM_WHITE;
*/
static void decide_vulnerability_color(u16b mode, TERM_LEN row, TERM_LEN *col, int flag1, BIT_FLAGS *flags, byte *header_color, bool vuln)
{
- if (have_flag(flags, flag1))
+ if (has_flag(flags, flag1))
{
c_put_str((byte)(vuln ? TERM_L_RED : TERM_WHITE),
(mode & DP_IMM) ? "*" : "+", row, *col);
static void display_one_characteristic(TERM_LEN row, TERM_LEN col, concptr header, byte header_color, int header_col, int flag1, bool vuln, all_player_flags *f)
{
c_put_str((byte)(vuln ? TERM_RED : TERM_SLATE), ".", row, col);
- if (have_flag(f->player_flags, flag1))
+ if (has_flag(f->player_flags, flag1))
{
c_put_str((byte)(vuln ? TERM_L_RED : TERM_WHITE), "+", row, col);
header_color = TERM_WHITE;
}
- if (have_flag(f->tim_player_flags, flag1))
+ if (has_flag(f->tim_player_flags, flag1))
{
c_put_str((byte)(vuln ? TERM_ORANGE : TERM_YELLOW), "#", row, col);
header_color = TERM_WHITE;
}
- if (have_flag(f->tim_player_imm, flag1))
+ if (has_flag(f->tim_player_imm, flag1))
{
c_put_str(TERM_YELLOW, "*", row, col);
header_color = TERM_WHITE;
}
- if (have_flag(f->player_imm, flag1))
+ if (has_flag(f->player_imm, flag1))
{
c_put_str(TERM_WHITE, "*", row, col);
header_color = TERM_WHITE;
byte header_color = TERM_L_DARK;
int header_col = col;
bool vuln = FALSE;
- if (have_flag(f->player_vuln, flag1) &&
- !(have_flag(f->known_obj_imm, flag1) || have_flag(f->player_imm, flag1) || have_flag(f->tim_player_imm, flag1)))
+ if (has_flag(f->player_vuln, flag1) &&
+ !(has_flag(f->known_obj_imm, flag1) || has_flag(f->player_imm, flag1) || has_flag(f->tim_player_imm, flag1)))
vuln = TRUE;
col += strlen(header) + 1;
feature_type *f_ptr = &f_info[feat];
TERM_COLOR a;
SYMBOL_CODE c;
- if (!have_flag(f_ptr->flags, FF_REMEMBER)) {
+ if (!has_flag(f_ptr->flags, FF_REMEMBER)) {
if (!player_ptr->blind
&& ((g_ptr->info & (CAVE_MARK | CAVE_LITE | CAVE_MNLT))
|| ((g_ptr->info & CAVE_VIEW) && (((g_ptr->info & (CAVE_GLOW | CAVE_MNDK)) == CAVE_GLOW) || player_ptr->see_nocto)))) {
c = f_ptr->x_char[F_LIT_DARK];
}
} else if (darkened_grid(player_ptr, g_ptr) && !player_ptr->blind) {
- if (have_flag(f_ptr->flags, FF_LOS) && have_flag(f_ptr->flags, FF_PROJECT)) {
+ if (has_flag(f_ptr->flags, FF_LOS) && has_flag(f_ptr->flags, FF_PROJECT)) {
feat = (view_unsafe_grids && (g_ptr->info & CAVE_UNSAFE)) ? feat_undetected : feat_none;
f_ptr = &f_info[feat];
a = f_ptr->x_attr[F_LIT_STANDARD];
} else if ((g_ptr->info & (CAVE_GLOW | CAVE_MNDK)) != CAVE_GLOW) {
a = f_ptr->x_attr[F_LIT_DARK];
c = f_ptr->x_char[F_LIT_DARK];
- } else if (!have_flag(f_ptr->flags, FF_LOS) && !check_local_illumination(player_ptr, y, x)) {
+ } else if (!has_flag(f_ptr->flags, FF_LOS) && !check_local_illumination(player_ptr, y, x)) {
a = f_ptr->x_attr[F_LIT_DARK];
c = f_ptr->x_char[F_LIT_DARK];
}
if (o_ptr->pval < 10) *c = '0' + o_ptr->pval;
}
- if (have_flag(flags, stat + TR_SUST_STR))
+ if (has_flag(flags, stat + TR_SUST_STR))
{
*a = TERM_GREEN;
}
{
TERM_COLOR a = TERM_SLATE;
char c = '.';
- if (have_flag(flags, stat))
+ if (has_flag(flags, stat))
{
compensate_stat_by_weapon(&c, &a, o_ptr, stat, flags);
}
- else if (have_flag(flags, stat + TR_SUST_STR))
+ else if (has_flag(flags, stat + TR_SUST_STR))
{
a = TERM_GREEN;
c = 's';
char c = '.';
change_display_by_mutation(creature_ptr, stat, &c, &a);
- if (have_flag(flags, stat + TR_SUST_STR))
+ if (has_flag(flags, stat + TR_SUST_STR))
{
a = TERM_GREEN;
c = 's';
basedam *= 5;
basedam /= 3;
}
- else if (have_flag(flgs, TR_VORPAL))
+ else if (has_flag(flgs, TR_VORPAL))
{
/* vorpal flag only */
basedam *= 11;
// 理力
bool is_force = creature_ptr->pclass != CLASS_SAMURAI;
- is_force &= have_flag(flgs, TR_FORCE_WEAPON);
+ is_force &= has_flag(flgs, TR_FORCE_WEAPON);
is_force &= creature_ptr->csp > (o_ptr->dd * o_ptr->ds / 5);
if (is_force) basedam = basedam * 7 / 2;
static concptr *spoiler_flag_aux(const BIT_FLAGS art_flags[TR_FLAG_SIZE], const flag_desc *flag_ptr, concptr *desc_ptr, const int n_elmnts)
{
for (int i = 0; i < n_elmnts; ++i)
- if (have_flag(art_flags, flag_ptr[i].flag))
+ if (has_flag(art_flags, flag_ptr[i].flag))
*desc_ptr++ = flag_ptr[i].desc;
return desc_ptr;
object_flags(player_ptr, o_ptr, flgs);
affects_list = pi_ptr->pval_affects;
sprintf(pi_ptr->pval_desc, "%s%d", o_ptr->pval >= 0 ? "+" : "", o_ptr->pval);
- if (have_flag(flgs, TR_STR) && have_flag(flgs, TR_INT) && have_flag(flgs, TR_WIS) && have_flag(flgs, TR_DEX) && have_flag(flgs, TR_CON)
- && have_flag(flgs, TR_CHR)) {
+ if (has_flag(flgs, TR_STR) && has_flag(flgs, TR_INT) && has_flag(flgs, TR_WIS) && has_flag(flgs, TR_DEX) && has_flag(flgs, TR_CON)
+ && has_flag(flgs, TR_CHR)) {
*affects_list++ = _("全能力", "All stats");
- } else if (have_flag(flgs, TR_STR) || have_flag(flgs, TR_INT) || have_flag(flgs, TR_WIS) || have_flag(flgs, TR_DEX) || have_flag(flgs, TR_CON)
- || have_flag(flgs, TR_CHR)) {
+ } else if (has_flag(flgs, TR_STR) || has_flag(flgs, TR_INT) || has_flag(flgs, TR_WIS) || has_flag(flgs, TR_DEX) || has_flag(flgs, TR_CON)
+ || has_flag(flgs, TR_CHR)) {
affects_list = spoiler_flag_aux(flgs, stat_flags_desc, affects_list, N_ELEMENTS(stat_flags_desc));
}
{
BIT_FLAGS flgs[TR_FLAG_SIZE];
object_flags(player_ptr, o_ptr, flgs);
- if (have_flag(flgs, TR_SUST_STR) && have_flag(flgs, TR_SUST_INT) && have_flag(flgs, TR_SUST_WIS) && have_flag(flgs, TR_SUST_DEX)
- && have_flag(flgs, TR_SUST_CON) && have_flag(flgs, TR_SUST_CHR)) {
+ if (has_flag(flgs, TR_SUST_STR) && has_flag(flgs, TR_SUST_INT) && has_flag(flgs, TR_SUST_WIS) && has_flag(flgs, TR_SUST_DEX)
+ && has_flag(flgs, TR_SUST_CON) && has_flag(flgs, TR_SUST_CHR)) {
*sustain_list++ = _("全能力", "All stats");
- } else if (have_flag(flgs, TR_SUST_STR) || have_flag(flgs, TR_SUST_INT) || have_flag(flgs, TR_SUST_WIS) || have_flag(flgs, TR_SUST_DEX)
- || have_flag(flgs, TR_SUST_CON) || have_flag(flgs, TR_SUST_CHR)) {
+ } else if (has_flag(flgs, TR_SUST_STR) || has_flag(flgs, TR_SUST_INT) || has_flag(flgs, TR_SUST_WIS) || has_flag(flgs, TR_SUST_DEX)
+ || has_flag(flgs, TR_SUST_CON) || has_flag(flgs, TR_SUST_CHR)) {
sustain_list = spoiler_flag_aux(flgs, sustain_flags_desc, sustain_list, N_ELEMENTS(sustain_flags_desc));
}
misc_list = spoiler_flag_aux(flgs, misc_flags2_desc, misc_list, N_ELEMENTS(misc_flags2_desc));
misc_list = spoiler_flag_aux(flgs, misc_flags3_desc, misc_list, N_ELEMENTS(misc_flags3_desc));
POSITION rad = 0;
- if (have_flag(flgs, TR_LITE_1))
+ if (has_flag(flgs, TR_LITE_1))
rad += 1;
- if (have_flag(flgs, TR_LITE_2))
+ if (has_flag(flgs, TR_LITE_2))
rad += 2;
- if (have_flag(flgs, TR_LITE_3))
+ if (has_flag(flgs, TR_LITE_3))
rad += 3;
- if (have_flag(flgs, TR_LITE_M1))
+ if (has_flag(flgs, TR_LITE_M1))
rad -= 1;
- if (have_flag(flgs, TR_LITE_M2))
+ if (has_flag(flgs, TR_LITE_M2))
rad -= 2;
- if (have_flag(flgs, TR_LITE_M3))
+ if (has_flag(flgs, TR_LITE_M3))
rad -= 3;
if (o_ptr->name2 == EGO_LITE_SHINE)
rad++;
- if (have_flag(flgs, TR_LITE_FUEL)) {
+ if (has_flag(flgs, TR_LITE_FUEL)) {
if (rad > 0)
sprintf(desc, _("それは燃料補給によって明かり(半径 %d)を授ける。", "It provides light (radius %d) when fueled."), (int)rad);
} else {
if (rad != 0)
*misc_list++ = quark_str(quark_add(desc));
- if (have_flag(flgs, TR_TY_CURSE))
+ if (has_flag(flgs, TR_TY_CURSE))
*misc_list++ = _("太古の怨念", "Ancient Curse");
if (o_ptr->curse_flags & TRC_PERMA_CURSE)
else if (o_ptr->curse_flags & TRC_CURSED)
*misc_list++ = _("呪い", "Cursed");
- if (have_flag(flgs, TR_ADD_L_CURSE))
+ if (has_flag(flgs, TR_ADD_L_CURSE))
*misc_list++ = _("呪いを増やす", "Cursing");
- if (have_flag(flgs, TR_ADD_H_CURSE))
+ if (has_flag(flgs, TR_ADD_H_CURSE))
*misc_list++ = _("強力な呪いを増やす", "Heavily Cursing");
*misc_list = NULL;
feature_type *f_ptr;
f_ptr = &f_info[get_feat_mimic(g_ptr)];
- if (have_flag(f_ptr->flags, FF_GLYPH) || have_flag(f_ptr->flags, FF_MINOR_GLYPH))
+ if (has_flag(f_ptr->flags, FF_GLYPH) || has_flag(f_ptr->flags, FF_MINOR_GLYPH))
g_ptr->info |= CAVE_OBJECT;
- else if (have_flag(f_ptr->flags, FF_MIRROR))
+ else if (has_flag(f_ptr->flags, FF_MIRROR))
g_ptr->info |= CAVE_GLOW | CAVE_OBJECT;
note_spot(creature_ptr, y, x);
feature_type *f_ptr = &f_info[i];
if (!f_ptr->name)
continue;
- if (!have_flag(f_ptr->flags, FF_STORE))
+ if (!has_flag(f_ptr->flags, FF_STORE))
continue;
if (f_ptr->subtype == n) {